Robert Israel

6577 Reputation

21 Badges

18 years, 214 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

f:= (x1,x2,x3) -> x1 + x2^2 - x1*x3;
plot3d([s,t,1-s-t],s=0..1,t=0..1-s, color=f(s,t,1-s-t),
  style=patchnogrid);

 

 

The csum command in my Maple Advisor Database www.math.ubc.ca/~israel/advisor
will test convergence for a series.  If used with infolevel[csum] set to 1 or more, it will tell you which tests it used.  However, these tests may be different than the ones you would use by hand.


Most of the dsolve,numeric methods, including the default rkf45, are adaptive, so there is no such thing as a fixed step size.  The help page suggests using the range option in dsolve (which you already have) together with the refine option of odeplot.  If you need a fixed step size, you could try one of the classical methods: see ?dsolve,classical.

Undefined and 0 are not the same thing.  The Hessian being 0 and its determinant being 0 are also not the same thing.

Basically, if the Hessian determinant is 0, the higher-order terms may be needed to determine the classification of a critical point, but this is not at all trivial to do in general (with or without Maple).  If I were trying to do it by hand, I'd hope there were special features of the problem that I could use.  In your example, you know that f(x,y) = 0 only on the lines y=x and y=-x, which divide the xy plane into regions, in each of which f(x,y) is either positive or negative.  Thus a critical point that only touches regions where f(x,y) is positive would be a local minimum.

(x-1)^2 + y^2 = 1 is an implicit equation, i.e. an equation involving the variables x and y, but not in the form y = (function of x).  A parametric equation would make x and y functions of a parameter (let's say x = f(t) and y = g(t)), so that as t varies over some interval [a,b] the point (f(t),g(t)) traverses the curve.  The parametric plot command might then be of the form

> plot([f(t), g(t), t = a .. b]);

The simplest parametric form for a circle uses the central angle as parameter. 
Is that enough of a hint?

Not quite: it should be tP + t = 0, not t = tP.
Also, you probably want to plot it with the t axis horizontal and the P axis vertical, e.g. as follows:

> plot([-tP,P,P=8 .. 10]);

A more robust method is to use dsolve(..., numeric).  For example:

> Sol := dsolve({eq, P(0)=8}, P(t), numeric);
    with(plots):
    odeplot(Sol, t=0..16);

 

The event "make one shot out of two"  consists of two different outcomes: "make the first, miss the second" and "miss the first, make the second".  So the probability of this event is the sum of the probabilities of these two outcomes.

By writing n::posint, you are telling Maple that it is an error  to call  shrinkTime with an argument that is not a positive integer.  Now you call it with the argument n.  Unless n has been assigned a positive integer as a value, you'll get that error message.

If you want to plot shrinkTime(n) as a function of n (but only for positive integer values), you might try something like

> plot([seq([n, shrinkTime(n)], n=1..20)], style=point);

 

It's a bug, I guess.  But you could use

> ColumnGraph(map(rhs,X), captions=map(lhs,X));

 

> collect(%, a);

x = xo+(-1/2*vo^2+1/2*v^2)/a

> applyop(normal,[2,2],%);

x = xo+1/2*(-vo^2+v^2)/a

> applyop(sort,[2,2],%,v);

x = xo+1/2*(v^2-vo^2)/a

Perhaps something like this (in Maple 11).

> with(plots):
   P := implicitplot(x*y-1,x=-2..2,y=-2..2):
   Q:= < op(indets(P,Array))>;

The result in this case is a 52 x 2 Matrix whose rows are the points to be plotted.

Maple's answer of -3*Pi/2 is correct.

int(x*cos(x+y), y = 0 .. x) = -x*sin(x)+x*sin(2*x)

(an antiderivative is x*sin(x+y))

int(-x*sin(x)+x*sin(2*x), x=0..Pi) = -3*Pi/2

(an antiderivative is -sin(x)+x*cos(x)+1/4*sin(2*x)-1/2*x*cos(2*x))

 

OK, I _think_ I can guess what is going on here.

The differential equations as you wrote them have the general solution

{H(t) = exp(-.6206479550e-3*t)*_C2+exp(-.9937935205e-1*t)*_C1+1538.228407, W(t) = 18378.37332*exp(-.9937935205e-1*t)*_C1+236986.3014+114.777361*exp(-.6206479550e-3*t)*_C2}

Since the coefficients of t in the exponentials are negative, all solutions should approach the equilibrium {H(t) = 1538.228407, W(t) = 236986.3014} as t -> infinity.  The equilibrium is stable.

On the other hand, if you change the sign of dW/dt, the general solution is

{W(t) = -18606.52069*exp(.1006130378*t)*_C2+113.3699949*exp(-.6130377500e-3*t)*_C1+236986.3014, H(t) = exp(.1006130378*t)*_C2+_C1*exp(-.61303775e-3*t)+1538.228407}

Thus as long as _C2 is nonzero, the solution will "blow up" as t -> infinity.  The equilibrium is unstable.

In terms of the initial conditions,

{_C1 = .9939438752*H(0)+.5341911536e-4*W(0)-1541.572302, _C2 = -.5341911536e-4*W(0)+.6056124836e-2*H(0)+3.343895314}

so the requirement for the solution to not blow up would be

-.5341911536e-4*W(0)+.6056124836e-2*H(0)+3.343895314 = 0

This is almost, but not quite, satisfied by your initial condition H(0) = 3400, W(0) = 448056.  However, even if it was satisfied exactly, the inevitable roundoff errors in any numerical method would introduce a small component of exp(.1006130378*t), causing the solution to still blow up eventually.

If alpha[k] is a 1 x 1 Matrix, then alpha[k][1,1] is its single entry.  So try:

> alpha[k][1,1] * d[k];

"I put a negative sign in front of one of the differential equations" is a very strange
method.  Depending on precisely what you mean by this, it is either changing the whole problem or not changing anything.  If you're using dsolve(..., numeric), there's no such thing as "it does not know which roots to use": it is not using characteristic roots at all.  Your example is solved perfectly well with dsolve's default method: I find no evidence of stiffness which would require a Rosenbrock method.
 

First 104 105 106 107 108 109 110 Last Page 106 of 138