Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are answers submitted by Robert Israel

Maple's dsolve does not deal with delay differential equations.  You might look at the following MaplePrimes discussions that have dealt with this topic:

www.mapleprimes.com/forum/differentialequationsdelay

www.mapleprimes.com/forum/delaydifferentialequation

www.mapleprimes.com/forum/delaylogistic

The problem is that p = (1/2)*(n+sqrt(n^2-4*n*sigma^2))/n and n=-((sigma)^(2))/(p*(p-1)) are not equivalent.  If you solve the quadratic
n=-((sigma)^(2))/(p*(p-1)) for p, you get two solutions, one with the +sqrt and one with the -sqrt.  For the values p = .2, phi = .5, mu = 2, sigma = 1
that you used, n = 6.25, and then p = (1/2)*(n-sqrt(n^2-4*n*sigma^2))/n, not (1/2)*(n+sqrt(n^2-4*n*sigma^2))/n.

 

 

It seems to be 3 for an empty list + 1 for each position in the list + the sum of the lengths of the members of the list.

If what you have is a rectangular grid of points, use the surfdata command in the plots package. Otherwise, you might look at Paul Weiss's package in www.mapleprimes.com/forum/surfaceplots.

Hmmm, the links there don't seem to be working.  Does anyone know if these files are still available?

> expand(%);

It seems the RootFinding procedures don't like CylinderD with the variable in the first argument, because Maple doesn't know how to differentiate CylinderD with respect to its first argument.

For a complex root with V=10:

> z:=2.0: W:=(2^(n+3/2)*Pi)/(GAMMA(-n/2)*GAMMA(1/2-n/2)):
  f:=1+((abs(V))^2/W^2)*(CylinderD(n,z)^2)*(CylinderD(n,-z)^2-CylinderD(n,z)^2):
  f10:= eval(f, V=10);
> with(plots): 
  implicitplot([Re,Im](eval(f10, n=s+I*t)), s = 0 .. 15, t = 0 .. 1, gridrefine=2, colour=[red,blue]);

The roots correspond to intersections of the red and blue curves.

> fsolve(f10, n = 3 .. 4+I, complex);

3.412828570+.1737752246*I

 

It doesn't look to me like there are any real zeros of this function.

> F:= CylinderD(n,2)*CylinderD(n,2*I)+exp(I*n*Pi/2);
  plots[complexplot](F, n=-5 .. 5);

 

You don't need to do it by "hand". 

> sys:={ diff(Pb(X),X) = .3*(-(1.6+.2*X^2)*sqrt(3)*(1-A(X))^2/(1.6+.4*X^2)-Q)/
  (sqrt(3)*(sqrt(3)*(1-A(X))^2)^2), 
 diff(A(X),X) = (.4*X*(2-(1-A(X))*Pb(X))/A(X)-Pb(X))*(-.86*A(X)^2+.345*A(X)+.515)/
  ((0.8e-1+0.2e-1*X^2)*(2-((2-(1-A(X))*Pb(X))/A(X)-Pb(X))/(2.571-A(X)-A(X)*log(1-A(X))))), 
  Pb(0)= 0, A (0)=.441};
  S:= dsolve(sys,numeric,parameters=[Q]);
  F:= proc(q) S(parameters=[q]); subs(S(1), Pb(X)) end proc;
# thus F(q) is the value of Pb(1) for the solution with Q = q  
   Q0:= fsolve(F);

         Q0 := -.0006338875370

> S(parameters=[Q0]):
  plots[odeplot](S,[[X,Pb(X)],[X,A(X)]], X=0..1, colour=[red,blue], numpoints=1000);

You can get other solutions by specifying an appropriate interval for fsolve.  The graph of F near Q = 0 is quite complicated: it looks like there may be infinitely many solutions.

> plot(F, -.002 .. 0, -5 .. 5, numpoints=1000);

Maple doesn't have "student software" as such.  The "Student Edition" of Maple is the full Maple software at a discounted price.  It contains a Student package which contains a number of things useful to students at various levels.  Yes, it is good.  However, I wouldn't say it's "easy to use".  It's easy to do some things, but to really use it effectively requires a fair amount of learning.

Yes - but it might help if you told us what quantities you want to find the ratio of.  In general, the ratio of A to B is expressed as the quotient A/B

Yes, it is singular at x=0, because the coefficient of the second derivative is 0 there.  This makes numerical methods have trouble with it, and it also means that you have to be very careful about boundary conditions at that point: the conditions for existence and uniqueness are often not what you would expect.

 
Actually, this equation can be solved symbolically:

> S:= dsolve(- diff(u(x),x) - x*diff(u(x),x$2) + u(x)=0);
 
    S := u(x) = _C1*BesselI(0,2*x^(1/2))+_C2*BesselK(0,2*x^(1/2))

 

The leading behaviour as x -> 0 is as follows:

> series(rhs(S), x = 0, 1);

(_C1 + _C2*(-1/2*ln(x)-gamma)) + O(x)

In order to have u(x) bounded as x -> 0, you need _C2 = 0.  To have u(0) = 1, you then need _C1 = 1.  So your first boundary condition determines a solution:

> u0:= eval(rhs(S), {_C1=1,_C2=0});
 
    u0 := BesselI(0,2*x^(1/2))

 

However, that will not satisfy your second boundary condition.  In fact, it and all its derivatives are increasing on [0,infty), because its Taylor coefficients are all positive.

Here's one way to use a Slider and Plotter in a Maplet.  It's not really a continuous action, though: to get the plot to change, you must release the mouse button on the slider.

> with(Maplets[Elements]):
  maplet := Maplet([   
   Plotter['PL1']( plot(sin(x), x = 0..10,title=(Phase = 0)) ),
   Slider['SL1'](0..360,filled=true, majorticks=30, minorticks=5, snapticks=false, 
     onchange=Evaluate('PL1'= 'plot(sin(x+'SL1'/180*Pi),x=0..10, title=(Phase='SL1'*degrees))')),
   Button("Done", Shutdown(['SL1']))
   ]):
   Maplets[Display](maplet);

Unfortunately, there doesn't seem to be a way to detect a mouse action in a Plotter.  This has been requested before.

P1 := pointplot([0, 1/4]): P2:=plot(x^2, x = -2 .. 2):
F1 := t -> rotate(translate(P1, L(t)-t, -t^2), -arctan(2*t), 
      [L(t), 0]);
F2 := t -> rotate(translate(P2, L(t)-t, -t^2), -arctan(2*t), 
      [L(t), 0]) end proc;
display([animate(F1, [t], t = -2 .. 2, trace = 10),
         animate(F2,[t], t = -2 .. 2)], scaling = constrained);

It's not at all clear to me what you're trying to do.  You set E0 to a sequence of two numbers 0, 1.  Is that really what you wanted?  Or did you mean 0.1?

First 44 45 46 47 48 49 50 Last Page 46 of 138