Dkunb

45 Reputation

3 Badges

1 years, 264 days

MaplePrimes Activity


These are questions asked by Dkunb

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

 

Why did the last line is(ysol2[1]>0) give false?

Maple does not recognize the assumption?

Thanks in advance.
 

restart;

 

 

interface(showassumed=0);

0

(1)

assume(theta>1,alpha>0,sigma1>0,beta>0,sigma2>0,delta>0,x>0,y>0,z>0);

 

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

(theta*x-1)*(1-x)-y

 

y/(beta*y^2+1)

 

(alpha*x-sigma1)*(beta*y^2+1)

 

delta*y/(beta*y^2+1)-sigma2

 

x*((theta*x-1)*(1-x)-y)

 

y*((alpha*x-sigma1)*(beta*y^2+1)-z)/(beta*y^2+1)

 

z*(delta*y/(beta*y^2+1)-sigma2)

(2)

case0; x = 0, y = 0, z = 0

E0:=<0,0,0>;

Vector[column](%id = 36893490685786064044)

(3)

"case1: z=0 ,  h(x,y)=0,  f(x,y)=0 :   From y=(theta*x-1)*(1-x)=y -> 1/(theta)<x and x<1"

xsol1:=solve(h=0,x) assuming x>1/theta and x<1;
ysol1:=solve(subs(x=xsol1,f)=0,y)assuming xsol1>1/theta and xsol1<1;
E1:=<xsol1,ysol1,0>;

xsol1 := sigma1/alpha

 

ysol1 := -(-sigma1*theta+alpha)*(alpha-sigma1)/alpha^2

 

Vector[column](%id = 36893490685786055012)

(4)

case2; g(y) = 0, h(x, y) = 0

ysol:=[solve(j=0,y)];
ysol2:=simplify(subs(sigma2=delta*eta,ysol)) assuming (1-4*beta*eta^2>0 and eta>0);

Warning, solve may be ignoring assumptions on the input variables.

 

[(1/2)*(delta+(-4*beta*sigma2^2+delta^2)^(1/2))/(beta*sigma2), -(1/2)*(-delta+(-4*beta*sigma2^2+delta^2)^(1/2))/(beta*sigma2)]

 

[(1/2)*(1+(-4*beta*eta^2+1)^(1/2))/(beta*eta), (1/2)*(1-(-4*beta*eta^2+1)^(1/2))/(beta*eta)]

(5)

is(ysol2[1]>0)

false

(6)

 

(1/2)*(1+(-4*beta*eta^2+1)^(1/2))/(beta*eta)

(7)

 

 


 

Download Project_v1.mw

restart;

with(Physics):with(plots):with(DETools):

sys := {diff(r(t),t)=p(t)/m,
diff(p(t),t)=l^2/(m*r(t)^3)-n*k*r(t)^(n-1),
diff(phi(t),t)=l/(m*r(t)^2)};

{diff(p(t), t) = l^2/(m*r(t)^3)-n*k*r(t)^(n-1), diff(phi(t), t) = l/(m*r(t)^2), diff(r(t), t) = p(t)/m}

(1)

sys1:=subs({n=1,k=1},sys);

{diff(p(t), t) = l^2/(m*r(t)^3)-1, diff(phi(t), t) = l/(m*r(t)^2), diff(r(t), t) = p(t)/m}

(2)

conv:=plottools:-transform((a,b)->[a*cos(b),a*sin(b)]):

p1:=DEplot(sys1,[r(t),phi(t)],t=0..30,r=0..10,phi=0..2*Pi,stepsize=0.01);

Error, (in DEtools/DEplot) system must have same number of dependent variables as DE's.

 

plots:-display([conv(p1)],axiscoordinates=polar);

Error, (in conv) invalid argument

 

 


Could you help how to fix the code?

Download DEplot_v1.mw

As2_v2.mw 

What should I fix my code in order to work?

Thanks in advance,

The loop for HFS _data_2 and SFS_data_2 and the loop for HFS _data_3 and SFS_data_3 do not seem to be terminated. I do not know what it is the issue here. Anyone who can help this?

Negativity_(v12_beta_gamma_mu).mw

Thank you in advance,

1 2 3 4 Page 2 of 4