30 Reputation

2 Badges

5 years, 8 days

MaplePrimes Activity

These are replies submitted by patient


Thanks a lot for you help.



What I have to do is finding a numerical solution. I don't know if it is possible to start with

dsolve({Eq, u1(-2)=1},numeric,method=rkf45)

@Preben Alsholm 

OK. I see what you say.

Thanks again.


@Preben Alsholm

If I understand your reasoning u can be determined after integration stops (that is when v(x)=0). In addition, u can be anythig but as a condition, u must be positive. I have two questions:

1) Without computing the singular point value  I can use  

p:= dsolve( SYS union ICS,method=rkf45_dae,numeric,output=listprocedure,events=[[v(x)=0,halt]]);

But, how can be written sol0 equivalent to {u(x)=0, v(x)=0} as a solution of "after integration stops" to display then like  plots[display](solp, sol0);

2) Is it sufficient to use your reasoning above as a proof of nonuniqueness ?

Thanks for your help.

@Preben Alsholm 

That's right. I would like to continue with u(x)=0 when v(x)=0 which is correct if we look at the first ODE of the system.

@Carl Love 

Thank you Carl for drawing my attention to the impact of the singularity on plots.

I think that the acceptable alpha not leading to the singularity is such that its value is greater than 1.1.  

By applying the change I find the same plot.

Thanks again for your time.

@Carl Love 

Thanks a lot Carl. There is a bit problem about illustration of curves. They don't reach their maximum (shown cut: max(U(x))=30) compared to the other version of plotted curves max(U(x))=80), see below :


@Carl Love

Is it possible to refine the plot so as to have the same style as is shown in the example below ?

@Carl Love 

Thanks Carl.

Again, I would like to display U(x) as three dimensionnel plot with x in x-axis and alpha in y-axis. How can I do it?

@Carl Love 


But my problem is how to display plots of U(x) for alpha=0.1..10 istead of animate. I tried

plots:-display(pU, [alpha, -1 .. -0.01], alpha = 0.1 .. 10);
Error, (in plots:-display) expecting plot structure but received: pU

I tried also,

  pU := [ seq(odeplot(res, [x, U(x)], x = -1 .. -0.01), alpha = 0.1 .. 10)];

But no result.


Thanks a lot.

I used another loop for plot before :   for j from 0 by N/10 to N do P[j]:=plot(<X|S>); end do;

But didn't work. That's why I forgot j.

I tried your version of worksheet. It is solved.

Thanks again. 



Thanks tomleslie you've saved me because I have to code more complicated schemes and I don't want to be jamed in the easiest one.

Of course I still have to solve the problem of picking up only 10 plots so as the evolution in time could be well illustrated.

With N:=100 :


if irem(k, N/10)=0  then
end if:

Error, Array index out of range


Error, (in plots:-display) expecting plot structures but received: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Error, (in plots:-display) expecting plot structures but received: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]





I excute separetly parts of code  and I found that the problem set on command copy. See Code.



Please help to insert a loop of time step.

I use for example

for k from 1 to N do


end do;

The computation doesn't stop.

When I delete the loop I get the result. If I repeat manually and amny times the computation I also get result.

What's wrong with that loop?





In my reply "A way to make difference between time step and...", I show that at each time step I solve A,

I copy A into a and clear it for the next time step.

What is exppected from plots is showing how larger the maximum becomes compared to the previous state.    

1 2 3 4 Page 1 of 4