I am plotting phase plot of two first order ode's.
I noticed when added +t to one ode, the plot generated losses all the slope fields. Any one knows why and if this is just limitation of DEplot or if there is a way to workaround it.
THis worksheet has first example showing expected output, then second example where +t was added first ode. Now same code generates plot will all the slope field gone.
> |
sys:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t), 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
DEtools:-DEplot(sys,[x(t), y(t)],
t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
[[x(0)=1, y(0)=2]],
labels = [x(t), y(t)],
linecolor =red,arrowsize = 1.5,axes = boxed,
color = 'magnitude[legacy]')
|
> |
#added +t to the RHS of one ode. Everything else the same.
sys_2:=[diff(x(t),t)+diff(y(t),t) = x(t)+y(t)+t, 2*diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)];
DEtools:-DEplot(sys_2,[x(t), y(t)],
t = 0 .. 200,x = -1000 .. 1000,y = -1000 .. 1000,
[[x(0)=1, y(0)=2]],
labels = [x(t), y(t)],
linecolor =red,arrowsize = 1.5,axes = boxed,
color = 'magnitude[legacy]')
|
> |
dsolve([op(sys),x(0)=1, y(0)=2]);
|
> |
dsolve([op(sys_2),x(0)=1, y(0)=2]);
|
|
Download strange_DEplot.mw
update
if someone is interested, I found Maple has builtin function to check if system of ode's is autonomous or not. So changed my code to check first. Here is how to check:
Download strange_DEplot_V2.mw