Question: How i can fix this issue ?

i want to plot the function appear in P but there is a variable t which appear from variable which my system is depending on u,v and must v appear in my function instead of exponential so exponential contain the t variable  there is any way for fixing this?

restart;

with(plots):

 

f := (u,v) -> -u+u^3;
g := (u,v) -> -2*v;

proc (u, v) options operator, arrow; -u+u^3 end proc

 

proc (u, v) options operator, arrow; -2*v end proc

(1)

 

equilibria := solve({f(u,v)=0, g(u,v)=0}, {u,v});

{u = 0, v = 0}, {u = 1, v = 0}, {u = -1, v = 0}

(2)

 

de1 := diff(u(t),t) = f(u(t),v(t));
de2 := diff(v(t),t) = g(u(t),v(t));

diff(u(t), t) = -u(t)+u(t)^3

 

diff(v(t), t) = -2*v(t)

(3)
   

PDEtools:-ConservedCurrents({de1, de2}, [u(t), v(t)]); P1 := -(1/2)*op(1, rhs(op(%)))

[_J[t](t, u(t), v(t)) = f__1((-u(t)^2+1)*exp(-2*t)/u(t)^2, v(t)*exp(2*t))]

 

-(1/2)*(-u(t)^2+1)*exp(-2*t)/u(t)^2

(4)

P := -(-u^2+1)*exp(-2*t)/(2*u^2)

-(1/2)*(-u^2+1)*exp(-2*t)/u^2

(5)

 

equilibria;

{u = 0, v = 0}, {u = 1, v = 0}, {u = -1, v = 0}

(6)

 

p1 := contourplot(P, u=-1.5..2, v=-1.5..1.5, scaling=constrained,
    colorscheme="DivergeRainbow", contours=[seq](x, x=-0.4..0.4,0.1)):

Error, (in plot/iplot2d:-Levels) could not evaluate expression

 

 

p2 := pointplot([[0,0],[1,0],[-1,0]], symbol=solidcircle, symbolsize=15, color=black):

 

p3 := fieldplot([f(u,v), g(u,v)], u=-1.5..2, v=-1.5..1.5,
        arrows=medium, fieldstrength=fixed(0.4), grid=[10,10], labels=["",""]):

 

display(p1,p2,p3, axes=normal);

 

 

Download p1-1.mw

Please Wait...