primemath

42 Reputation

5 Badges

15 years, 353 days

MaplePrimes Activity


These are questions asked by primemath

When one equation has no exact solution. I use rkf45 to solve it.

How can I plot the error figures. Can I use the order:s1 := seq([tt[p], Xrre[p] - Xrre[p - 1]], p = 2..N):

restart;
with(plots):
with(LinearAlgebra):
Digits:=15:
w := 500:
k1 := 1:
k2 := sqrt(2):
k3 := -1-sqrt(2):
u1(t):= t/(t + 1)*exp(I * k1 * w * t) + cos(t) * exp(I * k2 * w * t) + exp(I * k3 * w * t):
u2(t):= exp(I * k1 * w * t) + exp(I * k2 * w * t) + t * exp(I * k3 * w * t):

What is the difference between them?

daesys0:={diff(I3(t),t) = 1/L*u(t), I1(t) = I3(t) + 1/R * u(t), I3(0)=0, I1(0)=0};

and

daesys0:={diff(I3(t),t) = 1/L*u(t), I1(t) = I3(t) + 1/R * u(t), I3(0)=0};

If I use the procedure for numerical solution, their solutions are similar.

 

Please help me to check this procedure for solving complex DAE, I want to plot this error figures

There are some errors for the initial conditions?

restart;
with(plots);
w := 10;
L :=0.001;
R :=1;
u(t) :=exp(I*w*t) + 2* exp(I * 2 * w * t);
daesys:={diff(I3(t),t) = 1/L*u(t), I1(t) = I3(t) + 1/R * u(t), I1(0)=0, I3(0)=0};
dsys1:= map(eq -> (evalc(Re(eq)), evalc(Im(eq))), eval(daesys, {x(t) = xre(t) + I*xim(t), y(t) = yre(t) + I*yim(t)}));

Firstly, I need solve q(t) by the following 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,method=rkf45,abserr=10^(-10),relerr=10^(-16),range=0..6,maxfun=0,output=listprocedure);
yy0:= eval(q(t), dsol0);

Furthermore, I need substitute q(t) into two second order differential equations for solving yy10 and yy01. The procedure is

Thanks for your attention firstly. I want to plot the error function between the exact solution and numerical

solution. However, there are some errors. Here is my procedure. would do you like help for this procedure?

restart:
with(plots):
Digits:= 32;
u := 1;
w1 := 10;
w2 := 5;
ode := diff(y(t), `$`(t, 2)) = u*(1 - y(t)* y(t))*diff(y(t), `$`(t, 1)) - y(t) + t*exp(I*2*w1*t) + t^2*exp(I*2*w2*t):
ics := y(0) = 1:
dics:= D(y)(0)= 0:

1 2 Page 1 of 2