Joe Riel

9665 Reputation

23 Badges

20 years, 29 days

MaplePrimes Activity


These are answers submitted by Joe Riel

solve needs to know the variables to solve for.  A nice way to do this, given that you've already assumed the knowns as constants (which doesn't otherwise do anything useful here) is the following:

vars := remove(hasassumptions, indets(sys));
solve(sys, vars);

Those are really old worksheets. Maple used to distribute an executable, updtsrc, for updating old worksheets to a newer format, however, that hasn't been needed since Maple 6, so is no longer distributed (I believe).

The equation of the "force" is incomplete.  What is R?  What is UOXB? Probably you wrote a vector using angle-bracket notation, but the html doesn't display that.

You want to find x such that it is a member of the kernel, or nullspace, of A.  See ?LinearAlgebra[NullSpace]. It returns a set of vectors that correspond to a basis for the kernel.  Any linear combination of the vectors in the kernel satisfy the equation (A.x=0).

The error is occurring in TrapRule, which isn't shown here.

There are various minor issues with the above code. The type-checking conditionals aren't quite correct in that they won't raise an error if m or n is not numeric. Also, ERROR is deprecated in Maple, use ?error. The while-statement works, but really should be an if-statement.

If there is no requirement for the precise error message, you may use parameter type declarations for part of the error checking:

RombInt := proc(f, a, b, m::nonnegint, n::nonnegint)
...
end proc:

To issue an error when m > n, add the following conditional at the start of the procedure body

if m > n then
   error "parameter m must be less than or equal to n";
end if;

See the help page for ?error.

 

Use the "Z" modifier.  For example,

printf("%5.3Zf\n", 5+3*I);
5.000+3.000I

See ?printf

It works for me using Debian (Squeeze, stable) with Maple 15. Are you sure the browser is configured properly in Maple?  To select a browser in the Standard GUI, click Tools --> Options --> General --> Browser and select the browser.  To test it, try doing

error "testing";

The resulting error message should be a hyperlink. Clicking on it should cause the browser to open to a Maplesoft online help page. Clicking on the link doesn't necessarily give the browser the focus, you may have to manually change to the browser.

This is a round-off issue.  You might first try modifying the assignments to L and v so that they are exact fractions, rather than floats. Then call fsolve with ?Digits := 50 or thereabouts.

Put the procedures in a startup region. Click on the gear-like symbol on the toolbar.

You can use a ?try catch statement to handle exceptions.

try
    ...
catch:
   go here if an error occurs above
end try;

 

 

First, Maple expresses angles in radians rather than degrees. See ?convert,degrees for a method for converting. Second, you might want to check your interpretation of the law of cosines.  The denominator is incorrect

Try using ?plottools[getdata].  For example,

plt := plot3d(sin(x)^2/(2+cos(y)^2), x=0..Pi, y=0..Pi):
pts := plottools:-getdata(plt)[3]:
(min,max)(pts);
                    0., 0.500000000000000000

Posting the code would help.  Note that after completing the loop

for i from 1 to 15 do
  ...
end do;

the value of i is 16 (not 15).  If you later using i without reassigning it then there could be an issue.

I don't know much about bifurcation diagrams other than what I picked up from a quick read of Wikipedia, so don't trust the following without verification.  The idea is to solve for B at equilibrium, which means the diff's are all 0.  To that, I'll first enter the system in proper Maple syntax:

sys := { NULL
, diff(A(r),r) = k + m * Y(r) - A(r) * B(r) * B(r) - A(r)
, diff(B(r),r) = 1/q * (A(r) * B(r) * B(r) + A(r) - B(r))
, diff(Y(r),r) = 1/s * (B(r) - Y(r))
}:

params := {NULL
, k = 10
, q = 5 * 10^(-3)
, s = 2 * 10^(-2)
}:

Next, modify the equations so that the diff is replaced with 0

equil := eval(sys, diff=0):

Use solve to solve the equations

sol := solve(equil, [A,B,Y](r));
(m - 1) k k k
[[A(r) = - -----------------, B(r) = - -----, Y(r) = - -----]]
2 2 m - 1 m - 1
k + m - 2 m + 1

Finally, extract the rhs of B(r), substitute the parameter values, and plot

plot(subs(sol[1], params, B(r)), m = 0..0.18);


First 47 48 49 50 51 52 53 Last Page 49 of 114