Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@patient If this is to be considered an ODE system with a parameter t that would be OK, but initial conditions would have to be given at a particular value of z.

Actually the solution seems to be found, but rejected in favor of a more general "solution":

restart;
debug(solve);
solve({abs(a-b)=0, sqrt(2*b+c)=0, c^2-c+1/4=0});

This seems to be used by solve (and works):

SolveTools:-Identity({c^2-c+1/4 = 0, abs(a-b) = 0, sqrt(2*b+c) = 0},{},{a,b,c});



@patient You have a variable t in ode1, should that be z? You also refer to t (and T) later.
Could you clarify?

There are some missing parentheses. I suppose what you intended was:

ode1:= -0.1*diff(u(z),z,z)+(z-2*diff(v(z)^(-1/2),z))*diff(u(z),z)+(3-2*diff(v(z)^(-1/2),z,z))*u(z)=0;
ode2:= 0.1*diff(v(z),z,z)+0.01*z*diff(v(z),z)+0.02*v(z)-u(z)*v(z)^(1/2)=0;
ics:= u(0)=0, v(0)=0.1, D(u)(0)=0, D(v)(0)=0;

With the zero initial conditions you clearly have a problem just getting started.

@khoirun When I run your code in Maple 2015 I don't get any complaints about singularity.
Be aware that fieldplot3d and display belong to the plots package.

However, if you extend the t-interval to the left e.g. to -10 then you get warnings about singularities.

You could try the first initial condition in IC and use dsolve/numeric like the following.
The construction {SYS[],IC[1][]} just gives you a set containing the odes and the initial condition.

res:=dsolve({SYS[],IC[1][]},numeric);
plots:-odeplot(res,[t,y(t)],-6..5);
res(-5.1383855);

#There is most likely indeed a singularity at about t=-5.1383855. What this means here is that the orbit "reaches" infinity in a finite time. There is nothing weird about that.
The simple example dsolve({diff(y(t),t) = -y(t)^2, y(0)=1}) has a singularity at t=-1.


@yellowcanary If you want to switch to using 1D input either permanently (i.e. until you actively change back) or for just one session, you can do that under the menu item Tools/Options/Display/Input Display.
You should know that Maple Notation is the same as 1D.
Then go to Interface in the same dialog box and under Default format for new worksheets choose Worksheet.
After that click the button Apply Globally (or Apply to Session).

@In-Jee Jeong Since it is not clear what you are actually doing I think you ought to present us with the details, perhaps as an uploaded worksheet.

It is not clear what you are actually doing because in the question itself the word 'numeric' does not appear in the dsolve command as tomleslie points out, and yet you are using odeplot there.
Secondly, in your reply to bogo you write plot(b[0](t),t=0..1). For a numerical solution that will only work if you are using output=listprocedure and b[0] is assigned one of the solution procedures.

@tomleslie I agree. The problem is (again) the 2D input, where spacing is interpreted as multiplication, which apparently is indeed intended in this case. But then there are (it appears) two cases of missing a space after PB.

Since everybody knows that if an expession F is an antiderivative of the expression f on some interval I then so is F+C, where C is any constant, there is no need for Maple to add a constant. What would be the purpose? Knowing one antiderivative (on some interval) means knowing all.
You just have to know that Maple doesn't add such a constant.

I noticed that in the help page for int in Maple 2015 this is pointed out explicitly.

@bfathi Could you tell me what the problem was?
The code I gave in full should work also in Maple 14. I did it in Maple 2015.

@bfathi OK, but you really don't need this procedure. odeplot will do the job as I described above.

@maple fan As Kitonum pointed out, obviously taking only the first 3 and the last 3 terms of the truncated series for cosine (called p by you) is not very likely to look like cos(70) at all. Why should it?

Since the signs of the cosine series alternate in signs there is no reason to expect s evaluated (one way or the other) at 70 is going to be between -1 and 1.

You mention this as a problem in a book on Mathematica. But you don't mention what the point of the problem is.

Could it be that you are misunderstanding the Mathematica code and that your translation into Maple therefore is incorrect?


Just a question: If you are going to have 10^4 - 10^5 odes, then you are obviously generating them in some programmatic way. Are you varying some parameters or what is the process?

@Carl Love method=lsode[adamsfull] seems to work fine:

SollsodeFull := dsolve({ODEs}, numeric, method=lsode[adamsfull]);

SollsodeFull(0.5);

returns

[x = .5, f[0, 0](x) = 0.453528451308833e-2, f[0, 1](x) = -11.5167207961770]

@patient An immediate observation about your worksheet res_syst.
There are two occurrences of v where these should be v(z).

Thus the odes should be:

odes:=0.4e-2*z*diff(u(z),z,z)+(z-8*z*diff(v(z), z)+0.6e-2)*diff(u(z), z)+(3/2-12*diff(v(z), z)-8*z*diff(v(z),z,z))*u(z) = 0, .8*z*(diff(v(z), z)^2+v(z)*diff(v(z),z,z))+(2*(.6+z))*v(z)*diff(v(z), z)+v(z)*u(z)+v(z)^2 = 0;

With that system and initial conditions
ics1:=D(u)(eps) = 0, D(v)(eps) = 0, u(eps) = 1, v(eps) = 1;

with eps=0 the system has a singularity at 0.

You can play with eps=0.001 or similar.

First 122 123 124 125 126 127 128 Last Page 124 of 231