Items tagged with deplot deplot Tagged Items Feed

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?

Consider the differential equation   d/dx y(x)=2*y(x)*(y(x)-4), on the rectangle -1 < x < 1, -2 < y < 7.40 in the xy-plane.

(a) Use DEplot to plot the direction field for the differential equation on the given domain. Assign your answer to my_plot_1.

restart: with(DEtools):
DEexp1:=2*y(x)*(y(x)-4);

DE:=Diff(y(x),x)=DEexp1;


DEplot(DE, y(x), x=-1..1, y=-2..7.4);
Error, (in DEtools/DEplot/CheckDE) derivatives must be given explicitly

 

Thanks for your help!

task:

Use DEplot to sketch a direction field for my_deq and the solution curve for the initial condition T(0) = 88 C. Assign your plot to my_plot.

*Note: my_deq is the differential equation 

 

My input:

 

ODE2:=(Diff(T(t), t) = 1/59*(18-T(t)));

DEplot( ODE2, T(t), t=-4..4, {[T(0)=88]}, y=0..100);

 

Error Received: 

Error, (in DEtools/DEplot/CheckInitial) the 'number' option must be specified before initial conditions

 

The only thing I can find about this error is the input isn't in the form of a differential equation... But I'm pretty sure it is.

Thanks!

I am having trouble printing out a limit cylce on maple 16.  I have the attached file and if anybody could look at it and perhaps help me out it would be greatly appreciated.  The first limit cycle is supposed to look somewhat like the second one.  I'v tried many different things but nothing seems to be working.  an explenation would also be nice too.  if the file does not open correctly also let me know. thank you very much.  

 Math_4710_Hilbert_16.mw

> with(DEtools);
> L := -1.576674; MU := 0; DE13 := {(D(x))(t) = x(t)*(1+4*x(t)*x(t)-y(t)*y(t))+MU*y(t)*(x(t)*x(t)-.43*y(t)*y(t)-L), (D(y))(t) = y(t)*(1+x(t)*x(t)-.5*y(t)*y(t))+MU*x(t)*(x(t)*x(t)-.43*y(t)*y(t)-L)}; DEplot(DE13, [x(t), y(t)], t = 0 .. 20, [[x(0) = 0.1e-1, y(0) = .99], [x(0) = -.1, y(0) = -.9], [x(0) = 1.1, y(0) = 0], [x(0) = 0, y(0) = .2], [x(0) = 0, y(0) = .6], [x(0) = .6, y(0) = 0], [x(0) = .75, y(0) = 1], [x(0) = .1, y(0) = .1], [x(0) = .5, y(0) = 1.0], [x(0) = -.5, y(0) = 1], [x(0) = .5, y(0) = -1], [x(0) = -.5, y(0) = -1], [x(0) = -0.1e-1, y(0) = .99], [x(0) = 0.1e-1, y(0) = -.99], [x(0) = -0.1e-1, y(0) = -.99], [x(0) = .5, y(0) = -1], [x(0) = -.5, y(0) = -1], [x(0) = 0.1e-1, y(0) = .9]], stepsize = 0.1e-1, scene = [x(t), y(t)], title = "phaseplane 3 prime plot", linecolor = black, thickness = 1);
-1.576674
0
/ / 2 2\
{ D(x)(t) = x(t) \1 + 4 x(t) - y(t) /,
\

/ 2 2\\
D(y)(t) = y(t) \1 + x(t) - 0.5 y(t) / }
/
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .93908020e-1, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .26367741, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .23463732, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of 1.7040014, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .62484768, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .62484768, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .62484768, probably a singularity
Warning, plot may be incomplete, the following errors(s) were issued:
cannot evaluate the solution further right of .62484768, probably a singularity

 

what do i need to do so there are no more singularites?

i cant find the error the program is saying i have 

> L := -1.576674; MU := 0; DE13 := {D(y)*t = -x(t)*(1-2*x(t)*x(t))+MU*y(t)*(x(t)*x(t)-3*y(t)*y(t)-L), (D(x))(t) = y(t)*(1-y(t)*y(t))+MU*y(t)*(x(t)*x(t)-3*y(t)*y(t)-L)}; DEplot(DE13, [x(t), y(t)], t = -20 .. 20, [[x(0) = 0.1e-1, y(0) = .99], [x(0) = 0.5e-1, y(0) = .95], [x(0) = .1, y(0) = .9], [x(0) = 0.4e-1, y(0) = .96]], stepsize = 0.1e-2, scene = [x(t), y(t)], title = "phaseplane plot", linecolor = black, thickness = 1, number = 1000);
 
Error, (in DEtools/DEplot/CheckInitial) too few initial conditions: [x(0) = 0.1e-1, y(0) = .99]

it might be hard to read but if someone could help me it would be very appreciated 

expect to export a series of graphs, but no diagram,

 

then i debug to export one diagram, it is success, why in this case not export

https://drive.google.com/file/d/0B2D69u2pweEvcDZVZ0tsRTc2dTg/edit?usp=sharing

restart;
with(combinat):
list1 := permute([a, b, a, b, a, b], 3);
list1a := subs(b=1,subs(a=0, list1));
n := 3;
list1a := permute([seq(seq(k,k=0..1),k2=1..n)], n);
list2 := permute([a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h], 3);
list3 := subs(h=18,subs(g=17,subs(f=16,subs(e=15,subs(d=14,subs(c=13,subs(b=12,subs(a=11,list2))))))));
list3 := permute([seq(seq(k,k=11..18),k2=1..3)], 3);
Iter:= iterstructs(Permutation([seq(seq(k,k=11..(10+nops(list1a))),k2=1..3)]), size=3):
list3b := [];
while not Iter[finished] do
p:= Iter[nextvalue]();
list3b := [p, op(list3b)];
end do:
list5 := Matrix(nops(list1a)*nops(list3), 1);
count := 1;
for n from 1 to nops(list3) do
temp1 := subs(1=list1a[1],list3[n]);
for k from 11 to nops(list1a)+10 do
temp1 := subs(k=list1a[k-10],temp1);
od;
list5[count] := temp1;
count := count + 1;
od;
Lfh := proc(numoflevel, hx, fx, varx)
if numoflevel = 1 then
hello := 0;
for kk from 1 to nops(var) do
hello := hello + diff(hx[kk], varx[kk])*fx[kk];
od;
return hello;
else
hello := 0;
for kk from 1 to nops(var) do
hello := hello + diff(Lfh(numoflevel-1, hx, fx, varx), varx[kk])*fx[kk];
od;
return hello;
end if;
end proc:
CheckRelativeRankZero := proc(h1, f1, g1,variables1,Count)
IsFinish := 0;
Result := 0;
for ii from 1 to 8 do
if IsFinish = 0 then
Lf2h := Lfh(ii,h1,f1,variables1);
Print(“Lf2h=”);
Print(Lf2h);
Lgf2h := Lfh(1,[seq(Lf2h,n=1..nops(variables1))],g1,variables1);
if Lgf2h = 0 then
print(“Lgf2h = 0”)
print(f1);
print(Lf2h);
print("find at ", ii);
IsFinish := 1;
Result :=Lf2h;
end if;
end if;
od;
return Result;
end proc:
IsZeroMatrix := proc(h1)
Iszero := 1;
for ii from 1 to 3 do
for jj from 1 to 3 do
if h1[ii][jj] <> 0 then
Iszero := 0;
end if
od;
od;
return Iszero;
end proc:
with(combstruct):
list6:= convert(list5, list):
list7 := [];
for ii from 1 to nops(list6) do
if list6[ii] <> 0 then
list7 := [list6[ii], op(list7)];
end if;
od;
with(LinearAlgebra):
with(VectorCalculus):
varlist := [x1, x2, x3];
Iter:= iterstructs(Permutation(list7), size=2):
Count := 1;

with(DEtools):
Iter:= iterstructs(Permutation(list7), size=2):
Count := 1;
list8 := [];
while not Iter[finished] do
p:= Iter[nextvalue]();
I1 := 0;
I2 := 0;
if IsZeroMatrix(p[1]) = 0 and IsZeroMatrix(p[2]) = 0 then
group1 := Matrix(p[1]);
for ii from 1 to 3 do
for jj from 1 to 3 do
if group1[ii][jj] = 1 then
I1 := I1 + varlist[ii]*varlist[jj];
end if;
od;
od;
group2 := Matrix(p[2]);
for ii from 1 to 3 do
for jj from 1 to 3 do
if group2[ii][jj] = 1 then
I2 := I2 + varlist[ii]*varlist[jj];
end if;
od;
od;
f2:=[I1, I2];
g2:=[0,-1,1];
h2:=[x1,0,0];
Lf2h := CheckRelativeRankZero(h2,f2, g2, varlist, Count);
print(“Lf2h=”);
print(Lf2h);
RightSide := MatrixMatrixMultiply(Matrix([[0,diff(I2, varlist[3]),-diff(I2,varlist[2])],[-diff(I2, varlist[3]),0,diff(I2, varlist[1])],[diff(I2, varlist[2]),-diff(I2, varlist[1]),0]]), Matrix([[diff(I1, varlist[1])],[diff(I1, varlist[2])],[diff(I1, varlist[3])]]));
print(“RightSide”);
print(RightSide);
Lf2_h := Lfh(1, Lf2h, f2, varlist);
LgLf_h := Lfh(1,Lfh(1,h2,f2,varlist),g2, varlist);
if LgLf_h = 0 then
u:=0;
else
u := -Lf2_h/LgLf_h;
end if;
newsys := [Diff(x1(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[1][1]))) + g[1]*u,
Diff(x2(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[2][1]))) + g[2]*u,
Diff(x3(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[3][1]))) + g[3]*u];
eval(plotsetup):
`plotsetup/devices`[jpeg]:=[jpeg,`plot.jpg`,[],[],``]:
plotsetup(jpeg, plotoutput=cat(cat(`testhamiplot`, Count),`.jpg`),plotoptions=`height=700,width=800`);
DEplot3d(value(newsys), [x1(t), x2(t), x3(t)], t = 0..1,[[x1(0) = 1, x2(0) = 1, x3(0) = 1]]);

Count := Count +1;
end if;
end do:

c1 := u1*u2-u1*u3;

c2 := -u1*u2+u2*u3-(1/2)*((u2-u3)*(u1*u2-u1*u3)+(u1)*(-u1*u2+u2*u3)-(u1)*(u1*u3-u2*u3))/(u1);

c3 := u1*u3-u2*u3+(1/2)*((u2-u3)*(u1*u2-u1*u3)+(u1)*(-u1*u2+u2*u3)-(u1)*(u1*u3-u2*u3))/(u1);

c4 := u1;

d1 := subs(u3=u3(t),subs(u2=u2(t),subs(u1=u1(t),c1)));

d2 := subs(u3=u3(t),subs(u2=u2(t),subs(u1=u1(t),c2)));

d3 := subs(u3=u3(t),subs(u2=u2(t),subs(u1=u1(t),c3)));

d4 := subs(u3=u3(t),subs(u2=u2(t),subs(u1=u1(t),c4)));

sys := {Diff(u1(t), t) = d1,

Diff(u2(t), t) = d2,

Diff(u3(t), t) = d3,

y = d4};

sys := {Diff(u1(t), t) = d1,

Diff(u2(t), t) = d2,

Diff(u3(t), t) = d3};

with(DEtools):

DEplot(sys, [u1(t), u2(t), u3(t)], t = 0 .. 15,number = 3, [[u1(0) = 0, u2(0) = 0, u3(0) = 0]]);

 

Error, (in DEtools/DEplot/WhichPlot) More than two dependent variables - please indicate the desired scene.

                          

I have a numerical procedure that reads data from a file and builds a composition of maps from the half-plane to the slit half-plane.  Maple does not deal with this very well symbolically.  I want to use the complex values from this function as a vector field and plot some integral curves.  The 'mystery' function below is a stand-in for the real thing*

I can get DEplot to at least show the vector field, but it fails mysteriously on drawing any curves,...

Hi,

I have a second order differential equation

d2y/dt2 = -6.478831125*sin(y)

to be solved numerically. I've successfully been able to solve it using the 4th order Runge-Kutta method, however it is not properly written as a procedure and I'm unsure of how to do this.

So far I have:

R:= -6.478831125
z[0]:= 0:
y[0]:= Pi/2:
h:= 0.01:
t:= 10:
for i from 0 to t-1 by 1 do
c0:= evalf(h*R*sin(y[i])):
k0:= evalf(h*(z[i])):

Hey, I have a system of ODE and I can't draw it's phase curve. I tried to use DEplot and phaseportrait, but it doesn't work. Here is my system:

 dx/dt=x

dy/dt=ky              (k is a constant)

 

Here is my piece of code:

DE := [diff(x(t), t) = x(t)];

DF := [diff(y(t), t) = k*y(t)];

with(DEtools);

phaseportrait([DE, DF], [y, x], t = -5 .. 5, y = -5 .. 5, x = -5 .. 5, k...

Hi

I am trying to do a phase plot of an autonomous system using DEplot command. However, no phase plot appears. Could you tell me what am I doing wrong? The same code worked for my professor in class, but it's not working for me. I am using Maple 16. The code is posted below.

 

> with DEtools

> sys := diff(x(t), t) = y(t), diff(y(t), t) = x(t)*(1-x(t)*x(t))+y(t);

> DEplot([sys], [x(t), y(t)], t = 0 .. 0.1e-8, x = -3 .. 3, y = -3 .. 3, color = black)

1 2 Page 1 of 2