Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Trying to solve system of ODE

The given code is used to find out the solution to the system of equations. All equations need to be equated to 0 and soln must be found.

image description
However, when I run this code I am not getting any soln. var('S,E1,E2,V,Ip,Iexp,T,R,p1,p2,p3,beta,delta,theta,mu,w1,w2,gammap, gammaexp, sigma,m,r, q, n, i, j ');

N = S+V+E1+E2+Ip+Iexp+R;

eqS = pi-(muS)-(p1betaS(Ip+Iexp))-(p2betaS(Ip+Iexp))-(p3mS)+(thetaV);

eqE1 = (p1betaS(Ip+Iexp))-(muE1)-(w1E1)+((1-n)qbetaV(Ip+Iexp))+((1-j)ibetaR*(Ip+Iexp));

eqE2 = (p2betaS(Ip+Iexp))-(muE2)-(w2E2)+(nqbetaV(Ip+Iexp))+(jibetaR*(Ip+Iexp));

eqV=(p3mS)-(thetaV)-(muV)-((1-n)qbetaV(Ip+Iexp))-(nqbetaV(Ip+Iexp));

eqIp = (deltaw1E1)+(deltaw2E2)-(gammapIp)-((mu+sigma)Ip);

eqIexp = ((1-delta)w1E1)+((1-delta)w2E2)-((mu+sigma)Iexp)-(gammaexpIexp);

eqR=(gammapIp)+(gammaexpIexp)-(muR)-((1-j)ibetaR(Ip+Iexp))-(jibetaR*(Ip+Iexp));

pretty_print((eqS+eqE1+eqE2+eqV+eqIp+eqIexp+eqR).full_simplify())

sistema = [eqS==0, eqE1 == 0, eqE2==0, eqV==0, eqIp == 0,eqIexp==0, eqR ];

sol = solve(sistema, S,E1, E2,V, Ip,Iexp, R); pretty_print(sol)

DFE = sol[2]; pretty_print(DFE)

EE = sol[0]; pretty_print(EE)

Trying to solve system of ODE

The given code is used to find out the solution to the system of equations. All equations need to be equated to 0 and soln must be found.

image description

However, when I run this code I am not getting any soln.

var('S,E1,E2,V,Ip,Iexp,T,R,p1,p2,p3,beta,delta,theta,mu,w1,w2,gammap, gammaexp, sigma,m,r, q, n, i, j ');

'); N = S+V+E1+E2+Ip+Iexp+R;

S+V+E1+E2+Ip+Iexp+R; eqS = pi-(muS)-(p1betaS(Ip+Iexp))-(p2betaS(Ip+Iexp))-(p3mS)+(thetaV);

pi-(mu*S)-(p1*beta*S*(Ip+Iexp))-(p2*beta*S*(Ip+Iexp))-(p3*m*S)+(theta*V); eqE1 = (p1betaS(Ip+Iexp))-(muE1)-(w1E1)+((1-n)qbetaV(Ip+Iexp))+((1-j)ibetaR*(Ip+Iexp));

(p1*beta*S*(Ip+Iexp))-(mu*E1)-(w1*E1)+((1-n)*q*beta*V*(Ip+Iexp))+((1-j)*i*beta*R*(Ip+Iexp)); eqE2 = (p2betaS(Ip+Iexp))-(muE2)-(w2E2)+(nqbetaV(Ip+Iexp))+(jibetaR*(Ip+Iexp));

eqV=(p3mS)-(thetaV)-(muV)-((1-n)qbetaV(Ip+Iexp))-(nqbetaV(Ip+Iexp));

(p2*beta*S*(Ip+Iexp))-(mu*E2)-(w2*E2)+(n*q*beta*V*(Ip+Iexp))+(j*i*beta*R*(Ip+Iexp)); eqV=(p3*m*S)-(theta*V)-(mu*V)-((1-n)*q*beta*V*(Ip+Iexp))-(n*q*beta*V*(Ip+Iexp)); eqIp = (deltaw1E1)+(deltaw2E2)-(gammapIp)-((mu+sigma)Ip);

(delta*w1*E1)+(delta*w2*E2)-(gammap*Ip)-((mu+sigma)*Ip);

eqIexp = ((1-delta)w1E1)+((1-delta)w2E2)-((mu+sigma)Iexp)-(gammaexpIexp);

((1-delta)*w1*E1)+((1-delta)*w2*E2)-((mu+sigma)*Iexp)-(gammaexp*Iexp); eqR=(gammap*Ip)+(gammaexp*Iexp)-(mu*R)-((1-j)*i*beta*R*(Ip+Iexp))-(j*i*beta*R*(Ip+Iexp));

eqR=(gammapIp)+(gammaexpIexp)-(muR)-((1-j)ibetaR(Ip+Iexp))-(jibetaR*(Ip+Iexp));

pretty_print((eqS+eqE1+eqE2+eqV+eqIp+eqIexp+eqR).full_simplify())

pretty_print((eqS+eqE1+eqE2+eqV+eqIp+eqIexp+eqR).full_simplify())

sistema = [eqS==0, eqE1 == 0, eqE2==0, eqV==0, eqIp == 0,eqIexp==0, eqR ];

];

sol = solve(sistema, S,E1, E2,V, Ip,Iexp, R); pretty_print(sol)

pretty_print(sol)

DFE = sol[2]; pretty_print(DFE)

pretty_print(DFE)

EE = sol[0]; pretty_print(EE)

pretty_print(EE)