Items tagged with deplot deplot Tagged Items Feed

I am interested in dynamic systems that changes system equations at a given point in time. So i often want to plot graphs that shows what would happen in the first 500 seconds, then using the point reached after 500 seconds as the starting point show what happens over the next 500 seconds.

For example my equations might innitially

diff(x,t)=x+p*y

diff(y,t)=x/y

and then after 500 seconds switch to 

diff(x,t)=x-p*y

diff(y,t)=x/y

simply estimating where the system is and feeding that into the other equation isn't an option because these equations have lots of parameters which p is representing in the above, and generally i want too use these graphs to illustrate the behaveious of the systems with the given parameters.

So far i use display and DEplot to make these grpahs.

Hello,

I have an non coupled non linear oscillator.

I notice that, if I try to plot for a time too big, my plot doesn't converge anymore and didn't keep an elliptic trajectory. In other words, the plot didn't stay in the limit cycle.

Do you know why, if tmax is too big, the solution is no longer stable ? Do you have ideas so that I can keep a stable limit cycle even if I increase tmax ?

My code is the following :

r:=sqrt((x(t)/a)^2+(z(t)/b)^2);
eqx:=diff(x(t),t)=alpha*(1-r^2)*x(t)+w*a/b*z(t);
eqz:=diff(z(t),t)=beta*(1-r^2)*z(t)-w*b/a*x(t);
EqSys:=[eqx,eqz];

params := alpha=1, beta=1, a=0.4, b=0.2, w=1;

EqSys := eval([eqx,eqz], [params]);
xmax := 0.8; zmax := 0.4;
tmax := 400;
ic:=[x(0)=0.4, z(0)=0];
DEplot(EqSys, [x(t),z(t)], t= 0..tmax, [ic],linecolor=black, thickness=1,x(t)=-xmax..xmax, z(t)=-zmax..zmax, scaling=constrained,arrows=none);

Thanks a lot for your help.

hello guys,

 

i have a system of autonomous equations which i want to plot its 3D phase space with directional field,

i have some problem with it :dy.mw , and i dont know how to command for add some directional field for 3D phase space .

 

thank you guys

 

Hello,

I would like to plot an non coupled non linear oscillator.

The equations are the following:

K:=Matrix([<0, -1, 1, -1>,<-1, 0, -1, 1>,<-1, 1, 0,-1>,<1, -1, -1,0>]);
omega[sw]:=beta/(1-beta)*omega[s];
for i to 4
do
r[i]:=sqrt((u[i](t)/(L/2))^2+(v[i](t)/H)^2):
omega[i]:=omega[st]/(1+exp(b*v[i](t)))+omega[sw]/(1+exp(-b*v[i](t))):
Equ[i]:=diff(u[i](t),t)=Au*(1-r[i]^2)*u[i](t)+omega[i]*(L/2)/H*v[i](t):
Eqv[i]:=diff(v[i](t),t)=Av*(1-r[i]^2)*v[i]+omega[i]*(L/2)/H*v[i](t)+MatrixVectorMultiply(K,<seq(v[i](t),i=1..4)>)[i]:
EqSys[i]:=[Equ[i],Eqv[i]]:
end do:

My parameters are the following:

paramsGeo:=L=0.015,H=0.015,beta=0.5,Vf=0.3;
omegaS:=eval(Pi*Vf/L, [paramsGeo]);
paramsCycle:=omega[s]=omegaS,Au=1,Av=1,b=100;
params:=paramsGeo,paramsCycle;

I'm not sure with my initial equations. But, may be it is possible to start with:

ic:=[u[1](0)=0.8, v[1](0)=0,u[2](0)=0.8, v[2](0)=0,u[3](0)=0.8, v[3](0)=0,u[4](0)=0.8, v[4](0)=0];

For these equations, I would like to obtain the following plots:
- plot 1: horizontal axis : u[1](t) vertical axis : v[1](t).
- plot 2: horizontal axis : u[2](t) vertical axis : v[2](t).
- plot 3: horizontal axis : u[3](t) vertical axis : v[3](t).
- plot 4: horizontal axis : u[4](t) vertical axis : v[4](t).
- plot 5: horizontal axis : t, vertical axis : v[1](t), v[2](t), v[3](t), v[4](t).

For this last plot, I would like to obtain this kind of curve:

I image that since my equations are coupled i can not use directly use Deplot function but Dsolve.

May you help me for defining a good syntax for solving my system and then deducing the following plots?

Thanks a lot for your help

Hello

i have an ODE like this:

I sove this ODE with plot order:

with(plots);
odeplot(sol, [x, (3*D1*a+4*D2)*P(x)/((1-q*S(x))*D2)], .5 .. (1/2)*Pi, tickmarks = [[seq((1/10)*i*Pi = (180*i*(1/10))*`°`, i = 1 .. 8)], default]);
my plot work very well. but i need to plot this ODE with five different parameter (q for for instance, q=0.1 & q=0.2 ....) all in one axis. something like this:

Hello,

I would like to plot an non linear oscillator.

The equations are the following:

r:=sqrt((x(t)/a)^2+(z(t)/b)^2);
eqx:=diff(x(t),t)=alpha*(1-r^2)*x+wa/b*z(t);
eqz:=diff(z(t),t)=beta*(1-r^2)*y+wb/a*x(t);
EqSys:=[eqx,eqz];

The constants are the following :

alpha:=1:
beta:=1:
a=0.4:
b=0.2:
w=1:

I didn't manage with Deplots. May you help me to plot this oscillator?

Thank a lot for your help and ideas

sys := [(diff(c(t), t))*(diff(a(t), t))*(diff(b(t), t))+(diff(c(t), t))*t^2, (diff(c(t), t))*(diff(a(t), t))*t+(diff(c(t), t))*t*(diff(b(t), t)), (diff(c(t), t))*(diff(a(t), t))*(diff(b(t), t))+(diff(c(t), t))*(diff(a(t), t))*t+(diff(c(t), t))*t^2]
DEplot(sys, [a(t), b(t), c(t)], t = 0 .. 2, a = -15 .. 15, b = -15 .. 15, c = -15 .. 15, color = magnitude, title = `Stable Limit Cycles`, arrows = curve, dirfield = 800, axes = none);
odeplot(sys, [t, a(t), b(t), c(t)], -4 .. 4, color = orange);

eq1 := a(t)*(diff(a(t), t))+a(t)*(diff(a(t), t))*b(t)*(diff(b(t), t))*c(t)*(diff(c(t), t));
eq2 := a(t)*(diff(a(t), t))+a(t)*(diff(a(t), t))*c(t)*(diff(c(t), t))+a(t)*(diff(a(t), t))*b(t)*(diff(b(t), t))*c(t)*(diff(c(t), t));

DEplot({eq1, eq2}, [b(t), c(t)], t = 0 .. 1, b = 0 .. 1, c = 0 .. 1, [[b(0) = 1, c(0) = 1]], arrows = large);

Error, (in DEtools/DEplot/CheckDE) only derivatives of dependent variables can be present

DEplot({eq1 = 3*t^2, eq2 = 2*t^3}, [b(t), c(t)], t = 0 .. 1, b = 0 .. 1, c = 0 .. 1, [[b(0) = 1, c(0) = 1]], arrows = large);
Error, (in DEtools/DEplot/CheckDE) only derivatives of dependent variables can be present

DEtools[DEplot](diff(x(t),t)=-abs(x(t)),x(t),t=0..40,[x(0)=1],numpoints=1000,dirgrid=[30,30],linecolor=blue)

Hi,

i make an attempt to plot the solution to

Here is my code :

> with(plots); with(DEtools);
> ode1 := diff(x(t), t) = v(t); ode2 := diff(v(t), t) = -(.8*9.8)*v(t)/abs(v(t))-cos(t)^2;
> MODEL := {ode1, ode2}; VARS := {v(t), x(t)}; DOMAIN := t = 0 .. 150; RANGE := x = -1 .. 1, v = -5 .. 5; COLORS := [BLACK, BLUE]; IC1 := [x(0) = .5, v(0) = .25]; IC2 := [x(0) = 2.5, v(0) = 3];
> DEplot(MODEL, VARS, DOMAIN, RANGE, [IC1, IC2], stepsize = .1, linecolor = COLORS, scene = [t, x]);
>

and the message cannot evaluate the solution further right of .16015784, maxfun limit exceeded (see ?dsolve,maxfun for details)

Any other attemp has failed.

Have you got somme ideas

Thanks

Phil

Hi guys,

I'm trying to draw a phase portrait based on a system of differential equations, but executing the DEplot command gives me the response in the title. 

The command I entered is this one :

DEplot(sysdif,[u(t),nu(t)],t=0..50,{[u(0)=0.831,nu(0)=0.7]},linecolor=red,numpoints=1000, thickness=1, u=0.5...1, nu=0.6...1, color=black);

the system of equation is this one :

eqd1 := diff(u(t), t) = u(t)*[-gamma + (rho)/(mu - nu(t)) - delta*u(t) + pii - (tau)/(alpha + epsilon*exp(-beta*((omega-u(t))/(kappa-u(t)))))] ;
eqd2 := diff(nu(t), t) = nu(t)*[(omega-u(t))/(kappa-u(t)) - (tau)/(alpha+epsilon*exp(-beta*((omega-u(t))/(kappa-u(t)))))] ;

 

the model is calibrated. I understand that maple cannot store a kind of number but even changing the parameters won't help. I've been looking for people with same error message but using solutions provided by forum members don't work. Before getting that error message i did have the one with "vars must be declared as a list ..." so I did :

u:='u' ;

nu:='nu';

but now I have the error  "unable to store  '[HFloat(0.005711776872341132)]' when datatype=float[8]".

Does anybody have an idea of the solution to my problem ?

Thanks for your time,

best regards,

Louis

 

While I was using DEplot3d, I want to draw a space curve, the equation of which is a list of functions of the vars in DEs. I put them in "scene", but Maple told me this:

Error, (in DEtools/DEplot) Invalid scene; must be list of vars: scene = ...

Now I know that I cannot put functions in "scene", but I am wandering if there are some other way so I can draw this kind of space curve.

Thank you very much!

Use the Maple command DEplot to draw a direction field for the equation

make sure it at least covers the area −1 ≤ x ≤ 1,
−1 ≤ y ≤ 1

the equation is dy/dx+4y^3 −3y = 0.

then I have :

y(x):=dy/(dx)+4*y^(3)-3*y=0

with(DEtools); DEplot(y(x), x = -1 .. .1, y = -1 .. .1);

Error, (in DEtools/DEplot) vars must be declared as a list, e.g. [x(t),y(t),...]

 

so how can I change the command to make it work..

In the attached Maple worksheet I attempt to plot the solution of an initial value problem for a first order ODE.  DEplot fails with a cryptic message.  Strangely enough, if I give the "arrows=none" option to DEplot, it produces the correct plot!

I see this behavior in Maple 17 and 18.

Maple 11, however, works fine with or without the "arrows=none" option.

Is there an explanation for this or is it a bug?

DEplot-bug.mw

I have a DEplot :

DEplot(sys, [x(t), y(t)], t = 0 .. 30, [[x(0) = 0.8, y(0) = 0]], x = -1.25 .. 1.25, y = -1.25 .. 1.25, numpoints = 300, axes = boxed);

I would like to draw on this plot two circles centered in the origin with different radiuses.

How can I proceed?

1 2 3 Page 1 of 3