## 42 Reputation

15 years, 222 days

## Further questions...

Fristly, thanks for your suggestions. I have some questions to consult you.
1. Do you mean that the dimension of the vector L or S is the number of steps using rk4?
If so, can I use linalg[vectdim](L) to estimate the size?

2. When I use this

p2 := dsolve({ics, ode}, numeric,method=[rk4],output=listprocedure,known=q):

I have the same dimension of L with different parameters w = 500 and w = 1000;

When I use the other order
p2 := dsolve({ics, ode}, numeric,method=rkf45,abserr=10^(-10),relerr=10^(-16),range=0..3,maxfun=0,output=listprocedure,known=q):

I get the dimension with w= 500 is 55353.

The dimension with w = 1000 is 94966.
This difference is what I want to obtain.
Does is accurate to illustrate the number of steps using rk4?

## It does not work! Sorry...

Thank you very much! I can plot this figure. I should use complexplot command;

But I am not realize this function?

restart:
with(plots):
yexa:=proc(t):
A:=I:
a:=50:
w:=100:
ode:=diff(y(t),t)=A*y(t)+a*sin(w*t):
ics:=y(0)=1:
sol:=t->subs(dsolve({ode,ics},y(t)),y(t)):
end proc:

yexa(2);

## How to plot the solution obtained by dso...

ode := diff(y(x),x,x) = 2*y(x) + 1;
ics := y(0)=1, D(y)(0)=0;
dsolve({ode,ics});
plot(dsolve, x=1..5);

It does not work. How to plot it directly?

Thank you !