Items tagged with deplot

Error, More than two dependent variables, please indicate the desired scene

I am having touble plotting the equation, diff(y(t), t$3)+3*(diff(y(t), t$2))+4*(diff(y(t), t))+12*y(t) = 0. With the intional conditons y'(0)=y''(0)=0 and y(0)=3.

Currently I am getting this error, "Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem."

My current eqution is DEplot(ode, y(t), t = -1 .. 5, y(t) = -5 .. 5, [ivp]), with ivp := [((D@D)(y(t)))(0) = 0, (D(y(t)))(0) = 0, (y(t))(0) = 3].

I am trying to use y* to label a point on the axis of a graph made with DEplot, and am currently unable to.


with(DEtools);
NLC := diff(y(t), t) = k*(Am-y(t));
Am := 20; k := .1;
ivs := [y(0) = 10, y(0) = 30, y(0) = 50];
DEplot(NLC, y(t), t = 0 .. 20, ivs, tickmarks = [default, [20 = y^`*`]], font = [default, default, 30]);

makes y`*` apear as the label, as does the code

tickmarks = [default, [20 = y^`*`]]

wheras if i remove the `` marks I get an error

 

 

 

I need to receive a plot of the next equation:

E:=0.001;

eq := E*(diff(y(x), `$`(x, 2)))+(x^2+1)*(diff(y(x), x))-x*(x-1/2)^2 = -x^2+2.7^x ;

/*(x=0..1, y(0)=-1, y(1)=0)*/

I try to use DEplot in such way DEplot(eq, y(x), x = 0 .. 1, y = -1 .. 0); but i always get a bug like 

Error, (in DEtools/DEplot) cannot produce plot, non-autonomous DE(s) require initial conditions.

 

sys := {diff(b(t),t) = 0,diff(c(t),t) = -b(t)/a(t)};
DEplot(sys, [b(t),c(t)], t=0..5, x=-5..5, y=-5..5);
Error, (in DEtools/DEplot) Option keyword (x) was not in the allowed set of options, consisting of: iterations, arrows, dirgrid, obsrange, scene, colour, linecolour, stepsize, a dependent variable range, a list of initial conditions or one of the allowed plot options: {animate, axes, color, colour, coords, font, scaling, style, symbol, title, view, animatecurves, animatefield, axesfont, dirfield, labelfont, linestyle, numframes, resolution, thickness, tickmarks, titlefont, xtickmarks, ytickmarks}, or one of the allowed dsolve/numeric options: {abserr, control, ctrl, initial, itask, maxder, maxfun, maxkop, maxord, maxpts, maxstep, method, mi..

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

1 2 3 Page 1 of 3