Question: problem with ode

why is  the figure  so weird ? How can I get the smooth trajectories of the ode system?


 

with(DEtools)

with(DEtools)

with(plots)

with(plots, implicitplot)

[implicitplot]

(1)

with(MatrixTools)

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received MatrixTools

 

with(LinearAlgebra)

with(VectorCalculus)

R := PolynomialRing([x, y])

PolynomialRing([x, y])

(2)

``

p1 := phaseportrait([diff(x(t), t) = x(t)*(1-x(t)^2-y(t)^2)+y(t)*(y(t)^2+(x(t)^2-1)^2), diff(y(t), t) = y(t)*(1-x(t)^2-y(t)^2)-x(t)*(y(t)^2+(x(t)^2-1)^2)], [x(t), y(t)], t = 0 .. 50, [[x(0) = -3, y(0) = .5], [x(0) = 4, y(0) = 2]], x = -4 .. 4, y = -4 .. 4, dirgrid = [13, 13], stepsize = 0.5e-1, axes = BOXED)

 

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

 

``

 

display(p1, p2)

 

solve({x*(-x^2-y^2+1)+y*(y^2+(x^2-1)^2), y*(-x^2-y^2+1)-x*(y^2+(x^2-1)^2)}, {x, y})

{x = 0, y = 0}, {x = RootOf(_Z^8-6*_Z^6+11*_Z^4-6*_Z^2+2), y = RootOf(_Z^8-6*_Z^6+11*_Z^4-6*_Z^2+2)^5-3*RootOf(_Z^8-6*_Z^6+11*_Z^4-6*_Z^2+2)^3+RootOf(_Z^8-6*_Z^6+11*_Z^4-6*_Z^2+2)}, {x = 1, y = 0}, {x = -1, y = 0}, {x = RootOf(_Z^2-2), y = RootOf(_Z^2+1)}

(3)

subs({x = .5, y = -.5}, x*(-x^2-y^2+1)+y*(y^2+(x^2-1)^2))

-.15625

(4)

sys := [x*(-x^2-y^2+1)+y*(y^2+(x^2-1)^2), y*(-x^2-y^2+1)-x*(y^2+(x^2-1)^2)]

[x*(-x^2-y^2+1)+y*(y^2+(x^2-1)^2), y*(-x^2-y^2+1)-x*(y^2+(x^2-1)^2)]

(5)

A := Jacobian(sys, [x, y])

Matrix(%id = 18446746647299284134)

(6)

latex(Matrix(2, 2, {(1, 1) = -2, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0}))

 \left[ \begin {array}{cc} -2&0\\ \noalign{\medskip}0&0\end {array}
 \right]

 

A1 := subs([x = 1, y = 0], A)

Matrix(%id = 18446746647299319918)

(7)

A2 := subs([x = -1, y = 0], A)

Matrix(%id = 18446746647176545934)

(8)

A3 := subs([x = 0, y = 0], A)

Matrix(%id = 18446746647213830142)

(9)

r1, e1 := Eigenvectors(A1)

Vector[column](%id = 18446746647213811102), Matrix(%id = 18446746647213811582)

(10)

r2, e2 := Eigenvectors(A3)

Vector[column](%id = 18446746647299291126), Matrix(%id = 18446746647299291246)

(11)

``


 

Download as22a.mw

Please Wait...