primemath

42 Reputation

5 Badges

15 years, 185 days

MaplePrimes Activity


These are replies submitted by primemath

Sorry for that. s1 and s2 have no realtion with the before.

We can change them as other like T1 and T2.

Now the problem is how to estimate the error of rkf45.

Is it right comparing with itself to get the error?

Thanks very much. I got it very much.

There is a small mistake here. When I use this procedure to plot, this order

odeplot(res,[e1r(t),e1i(t)],0..Pi,refine=1);

can not be realized. The error is

Error, (in dsolve/numeric/SC/IVPpoints) Array index out of range?

Thanks very much. I got it very much.

There is a small mistake here. When I use this procedure to plot, this order

odeplot(res,[e1r(t),e1i(t)],0..Pi,refine=1);

can not be realized. The error is

Error, (in dsolve/numeric/SC/IVPpoints) Array index out of range?

The exact solution can  not be obtained. So I am looking for the numerical procedure.

There is something wrong here. How do I modify it?

restart;
with(plots);
w := 10;
u(t) :=exp(I*w*t) + 2* exp(I * 2 * w * t);
daesys0:={diff(e2(t),t) = e1(t) + Jv(t) - diff(u(t),t), 2*diff(e2(t),t) = -e2(t) - diff(u(t),t), e1(t) = -1* u(t), e1(0)=0,e2(0) = 0, Jv(0) = 50};
res:=dsolve(daesys0,{e1(t),e2(t),Jv(t)},numeric, method =rkf45_dae,abserr=10^(-10),relerr=10^(-10),range=0..2*Pi,maxfun = 0,output=listprocedure);
X,Y,Z:=op(subs(res,[e1(t),e2(t),Jv(t)]));

with(plots):
plot(Re(X),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Im(X),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Re(Y),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Im(Y),t=0..Pi,color=red,font=[Times, roman, 14]);

The exact solution can  not be obtained. So I am looking for the numerical procedure.

There is something wrong here. How do I modify it?

restart;
with(plots);
w := 10;
u(t) :=exp(I*w*t) + 2* exp(I * 2 * w * t);
daesys0:={diff(e2(t),t) = e1(t) + Jv(t) - diff(u(t),t), 2*diff(e2(t),t) = -e2(t) - diff(u(t),t), e1(t) = -1* u(t), e1(0)=0,e2(0) = 0, Jv(0) = 50};
res:=dsolve(daesys0,{e1(t),e2(t),Jv(t)},numeric, method =rkf45_dae,abserr=10^(-10),relerr=10^(-10),range=0..2*Pi,maxfun = 0,output=listprocedure);
X,Y,Z:=op(subs(res,[e1(t),e2(t),Jv(t)]));

with(plots):
plot(Re(X),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Im(X),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Re(Y),t=0..Pi,color=red,font=[Times, roman, 14]);
plot(Im(Y),t=0..Pi,color=red,font=[Times, roman, 14]);

It works!!!!!! I am very grateful for your help.

It works!!!!!! I am very grateful for your help.

Your suggestion is very helpful for me. It is a good idea. I have tried it. It works. Thanks for your kindness.

On the other hand, I have never used the“known = q” in Maple. I didn’t find any information in Maple help. How can we use“known = q” in procedure.

 

Using this procedure,

u := 8.53;
dsys0:={diff(q(t), `$`(t, 2)) = u*(1 - q(t)*q(t)) * diff(q(t), `$`(t, 1)) - q(t), q(0) = 0, D(q)(0) = 1};
dsol0:=dsolve(dsys0,numeric,output=listprocedure);

I can get the numerical function q(t); Then define this order

known := q;

dsys10:={diff(q10(t), `$`(t, 2)) = u*(1 -q(t)*q(t)) * diff(q10(t), `$`(t, 1)) - 2*u*q(t)*diff(q(t), `$`(t, 1)) * diff(q10(t), `$`(t, 1))- q10(t), q10(0) = 0, D(q10)(0) = 1};
dsol10:=dsolve(dsys10,numeric,output=listprocedure);

q10(t) is obtained. Is the way of “known := q;” right?

Your suggestion is very helpful for me. It is a good idea. I have tried it. It works. Thanks for your kindness.

On the other hand, I have never used the“known = q” in Maple. I didn’t find any information in Maple help. How can we use“known = q” in procedure.

 

Using this procedure,

u := 8.53;
dsys0:={diff(q(t), `$`(t, 2)) = u*(1 - q(t)*q(t)) * diff(q(t), `$`(t, 1)) - q(t), q(0) = 0, D(q)(0) = 1};
dsol0:=dsolve(dsys0,numeric,output=listprocedure);

I can get the numerical function q(t); Then define this order

known := q;

dsys10:={diff(q10(t), `$`(t, 2)) = u*(1 -q(t)*q(t)) * diff(q10(t), `$`(t, 1)) - 2*u*q(t)*diff(q(t), `$`(t, 1)) * diff(q10(t), `$`(t, 1))- q10(t), q10(0) = 0, D(q10)(0) = 1};
dsol10:=dsolve(dsys10,numeric,output=listprocedure);

q10(t) is obtained. Is the way of “known := q;” right?

When I have changed the dsolve as follows

dsol:=dsolve(dsys,numeric,method=rkf45,abserr=10^(-10),relerr=10^(-16),range=0..6,maxfun=0,output=listprocedure);

It has the numerical solution.

Thanks for your help.

When I have changed the dsolve as follows

dsol:=dsolve(dsys,numeric,method=rkf45,abserr=10^(-10),relerr=10^(-16),range=0..6,maxfun=0,output=listprocedure);

It has the numerical solution.

Thanks for your help.

Page 1 of 1