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 replies submitted by Robert Israel

For example, suppose the first 100 lines of your file are the first row, the next 100 are the second row, etc, for 101 rows.

> phi:= ImportMatrix("E:\\POTENTIAL FOR MAPLE", transpose=false, datatype=float[8]); 
  B:= ArrayTools[Reshape](phi, 1..100,1..101,1..3);
  plots[surfdata](B);

For example, suppose the first 100 lines of your file are the first row, the next 100 are the second row, etc, for 101 rows.

> phi:= ImportMatrix("E:\\POTENTIAL FOR MAPLE", transpose=false, datatype=float[8]); 
  B:= ArrayTools[Reshape](phi, 1..100,1..101,1..3);
  plots[surfdata](B);

Interesting... I'm not sure exactly what's causing Maple to compute F1(x) or F2(x) as undefined for some values of x, but here's one piece of the puzzle:
with your command, Maple first evaluates F1(x) with x as a symbolic variable, obtaining

Int((-1.*sin(.5000000000*k)/(6.283185308+k)+sin(.5000000000*k)/(6.283185308-1.*k)+2.*sin(.5000000000*k)/k)*exp(-.5000000000e-2*k^2)*exp(-.1250000000e-2*k^2)*cos(t*k),k = Float(-infinity) .. Float(infinity))}

and that is what is sent to plot.  On the other hand, you can plot the function F1 rather than the expression F1(x) with

> plot(F1, -2 .. 2);

and this will produce a complete plot like that of F3(x+1/2), with no missing points.


... and indeed, if you plot it up to t = 1.23 or so, you'll see u(t) going off toward infinity, signalling the singularity.

Perhaps your initial conditions are not correct.

 

... and indeed, if you plot it up to t = 1.23 or so, you'll see u(t) going off toward infinity, signalling the singularity.

Perhaps your initial conditions are not correct.

 

In this form, possibly: I stopped Maple when memory usage got to 293 MB.  The standard thing to do in a central-force problem is to
take advantage of the fact that the motion will be in a plane, and choose coordinates so that will be the plane Z=0 (so phi = Pi/2).  Your differential equations become

{diff(R(t),`$`(t,2)) = -R(t)*(-diff(theta(t),t)^2+exp(-R(t)^2)), diff(theta(t),`$`(t,2)) = -2*diff(theta(t),t)*diff(R(t),t)/R(t)}

and then dsolve rapidly produces a solution (not explicit, unfortunately):

[{theta(t) = Int(RootOf(-Int(exp(_C1^2/_h)/(exp(_C1^2/_h)*_h*(-4*_C1^2*exp(_C1^2/_h)*_h+4+_C2*_C1^2*exp(_C1^2/_h)))^(1/2)/_h*_C1,_h = `` .. _Z)+t+_C3),t)+_C4, theta(t) = Int(RootOf(Int(exp(_C1^2/_h)/(exp(_C1^2/_h)*_h*(-4*_C1^2*exp(_C1^2/_h)*_h+4+_C2*_C1^2*exp(_C1^2/_h)))^(1/2)/_h*_C1,_h = `` .. _Z)+t+_C3),t)+_C4}, {R(t) = _C1/diff(theta(t),t)^(1/2)}]

 

In this form, possibly: I stopped Maple when memory usage got to 293 MB.  The standard thing to do in a central-force problem is to
take advantage of the fact that the motion will be in a plane, and choose coordinates so that will be the plane Z=0 (so phi = Pi/2).  Your differential equations become

{diff(R(t),`$`(t,2)) = -R(t)*(-diff(theta(t),t)^2+exp(-R(t)^2)), diff(theta(t),`$`(t,2)) = -2*diff(theta(t),t)*diff(R(t),t)/R(t)}

and then dsolve rapidly produces a solution (not explicit, unfortunately):

[{theta(t) = Int(RootOf(-Int(exp(_C1^2/_h)/(exp(_C1^2/_h)*_h*(-4*_C1^2*exp(_C1^2/_h)*_h+4+_C2*_C1^2*exp(_C1^2/_h)))^(1/2)/_h*_C1,_h = `` .. _Z)+t+_C3),t)+_C4, theta(t) = Int(RootOf(Int(exp(_C1^2/_h)/(exp(_C1^2/_h)*_h*(-4*_C1^2*exp(_C1^2/_h)*_h+4+_C2*_C1^2*exp(_C1^2/_h)))^(1/2)/_h*_C1,_h = `` .. _Z)+t+_C3),t)+_C4}, {R(t) = _C1/diff(theta(t),t)^(1/2)}]

 

Yes, I used Maple 13 as well.  What didn't work?  What results did you get?  Can you upload a worksheet?

Yes, I used Maple 13 as well.  What didn't work?  What results did you get?  Can you upload a worksheet?

If the ics are "correct", the answer is that there is no solution.  So your "approximate solution" is an approximation of something that doesn't exist.  I suggest you choose a problem that does have a solution.

If the ics are "correct", the answer is that there is no solution.  So your "approximate solution" is an approximation of something that doesn't exist.  I suggest you choose a problem that does have a solution.

> E0:=0.1; S0:=1; k[1]:=1; k[-1]:=1; k[2]:=10;
  v[0]:= (k[2]*E0*S0*k[1])/(S0*k[1]+k[-1]+k[2]);
  S:= S0*(1-v[0]/S0)^t;
  plot(S, t=0 .. 30); 
  

Note that I used S0 rather than S[0].  There can be problems when you use both a name and a subscripted form of the same name as variables. 

 

> E0:=0.1; S0:=1; k[1]:=1; k[-1]:=1; k[2]:=10;
  v[0]:= (k[2]*E0*S0*k[1])/(S0*k[1]+k[-1]+k[2]);
  S:= S0*(1-v[0]/S0)^t;
  plot(S, t=0 .. 30); 
  

Note that I used S0 rather than S[0].  There can be problems when you use both a name and a subscripted form of the same name as variables. 

 

I'm not sure what you mean by differentiation with respect to a function.  What is the answer to diff(sin(x)*x^2, sin(x)) supposed to be?    Do you mean something like this?

> implicitdiff({z = sin(x)*x^2, y = sin(x)},{z,x},z,y);

x*(cos(x)*x+2*sin(x))/cos(x)

 

Try it like this:

> with(plots); 
  m1 := implicitplot3d(9*x^2+4*y^2-36*z^2, x = -2 .. 2, 
     y = -3 .. 3, z = -1 .. 1, grid = [20, 20, 20]):
  n := animate(plot3d, [t, x = -2 .. 2, y = -3 .. 3], 
      t = -1 .. 1, background=m1):
  n;
First 35 36 37 38 39 40 41 Last Page 37 of 187