Question: CharacteristicPolynimial

I could not figure how to fix my code. Could you help me?

Thanks in advance,

LinearAnalysis.mw

restart;

:with(DynamicSystems):with(DEtools):with(plots):with(plottools):with(DETools):

wiht(LinearAlgebra): with(VectorCalculus):

 

 

e1:=0.5: e2:=0.2:

sigma1:=e1*alpha: sigma2:=e2*delta:

g:=x/(1+beta*x^2);
f:=(theta*x-1)*(1-x)*(1+beta*x^2)-y;
h:=alpha*g-z-sigma1;
j:=delta*y-sigma2;
F:=g*f;
H:=y*h;
G:=z*j;

x/(1+.4*x^2)

 

(5*x-1)*(1-x)*(1+.4*x^2)-y

 

x/(1+.4*x^2)-z-.5

 

y-.2

 

x*((5*x-1)*(1-x)*(1+.4*x^2)-y)/(1+.4*x^2)

 

y*(x/(1+.4*x^2)-z-.5)

 

z*(y-.2)

(1)

 

theta:=5;alpha:=1;delta:=1;beta:=0.4;
Ffunc:=unapply(F,x,y); Hfunc:=unapply(H,x,y,z);Gfunc:=unapply(G,y,z);
J1:=Jacobian([Ffunc(x,y),Hfunc(x,y,z),Gfunc(y,z)],[x,y,z]);
C:= CharacteristicPolynomial(J1,lambda);
R:= RouthTable(C,lambda);

theta := 5

 

alpha := 1

 

delta := 1

 

beta := .4

 

Ffunc := proc (x, y) options operator, arrow; x*((5*x-1)*(1-x)*(1+.4*x^2)-y)/(1+.4*x^2) end proc

 

Hfunc := proc (x, y, z) options operator, arrow; y*(x/(1+.4*x^2)-z-.5) end proc

 

Gfunc := proc (y, z) options operator, arrow; z*(y-.2) end proc

 

Matrix(3, 3, {(1, 1) = ((5*x-1)*(1-x)*(1+.4*x^2)-y)/(1+.4*x^2)-.8*x^2*((5*x-1)*(1-x)*(1+.4*x^2)-y)/(1+.4*x^2)^2+x*((5-5*x)*(1+.4*x^2)-(5*x-1)*(1+.4*x^2)+(4.0*x-.8)*(1-x)*x)/(1+.4*x^2), (1, 2) = -x/(1+.4*x^2), (1, 3) = 0, (2, 1) = y*(1/(1+.4*x^2)-.8*x^2/(1+.4*x^2)^2), (2, 2) = x/(1+.4*x^2)-z-.5, (2, 3) = -y, (3, 1) = 0, (3, 2) = z, (3, 3) = y-.2})

 

Error, (in Verify:-CommonExports) system object is not a module

 

Matrix(%id = 36893491070243237028)

(2)

E0:= [0,0,0];
JE0:=subs(x=E0[1],y=E0[2],z=E0[3],J1);
CE0:=CharacteristicPolynomial(JE0,lambda);
RE0:= RouthTable(CE0,lambda);
RouthTable(CE0,lambda,'stablecondition'=true);

E0 := [0, 0, 0]

 

Matrix(3, 3, {(1, 1) = -1., (1, 2) = -0., (1, 3) = 0, (2, 1) = 0., (2, 2) = -.5, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -.2})

 

Error, (in Verify:-CommonExports) system object is not a module

 

Matrix(%id = 36893491070243233172)

 

true

(3)

E1:= [1,0,0];
JE1:=subs(x=E1[1],y=E1[2],z=E1[3],J1);
CE1:=CharacteristicPolynomial(JE1,lambda);
RE1:= RouthTable(CE1,lambda);
RouthTable(CE1,lambda,'stablecondition'=true);

E1 := [1, 0, 0]

 

Matrix(3, 3, {(1, 1) = -4.000000000, (1, 2) = -.7142857143, (1, 3) = 0, (2, 1) = 0., (2, 2) = .2142857143, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -.2})

 

Error, (in Verify:-CommonExports) system object is not a module

 

Matrix(%id = 36893491070243221500)

 

true

(4)

E2:= [1/theta,0,0];
JE2:=subs(x=E2[1],y=E2[2],z=E2[3],J1);
CE2:=CharacteristicPolynomial(JE2,lambda);
RE2:= RouthTable(CE2,lambda);
RouthTable(CE2,lambda,'stablecondition'=true);

E2 := [1/5, 0, 0]

 

Matrix(3, 3, {(1, 1) = .8000000000, (1, 2) = -.1968503937, (1, 3) = 0, (2, 1) = 0., (2, 2) = -.3031496063, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -.2})

 

Error, (in Verify:-CommonExports) system object is not a module

 

Matrix(%id = 36893491070243218004)

 

true

(5)

 

Download LinearAnalysis.mw

 
Please Wait...