Solving System of Differential Equations

조회 수: 2 (최근 30일)
R.sch
R.sch 2016년 12월 2일
댓글: Pablo Estuardo 2020년 2월 21일
syms I so s(t) as(t) mo m(t) am(t) im(t) img(t) po p(t) kcp t a(t) ao am(t) kca kona koffa konm koffm kong koffg ksig g(t) go
eqn1 = diff(s) == (-kona*s*a)+koffa*as;
eqn2 = diff(m) == -konm*m*a+koffm*a*m-konm*I*m+koffm*im; eqn3 = diff(g) == -kong*im*g+koffg*img; eqn4 = diff(img) == kong*im*g-koffg*img; eqn5 = diff(p) == ksig*img-kcp;
I= 1; so=1; mo=1;go=1; po=1; kcp=1; ao=1; kca=1; kona=1; koffa=1; konm=1; koffm=1; kong=1; koffg=1; ksig=1; eqn6= so==s+as; eqn7= mo==m+am+im+img; eqn8= go==g+img; eqn9= po==p+kcp*t; eqn10= a==(a-am-as)/((kca*t)+1);
S = dsolve(eqn5, eqn2, eqn3, eqn4,eqn5,eqn6,eqn7,eqn8,eqn9,eqn10)
Error using mupadengine/feval (line 163)
Invalid equation or initial condition.
Error in dsolve>mupadDsolve (line 336)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 193)
sol = mupadDsolve(args, options);
I am trying to solve a system of differential equations, but I get these errors which I'm not sure how to fix. Thanks for the help!
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 12월 2일
dsolve(eqn5, eqn2, eqn3, eqn4,eqn5,eqn6,eqn7,eqn8,eqn9,eqn10)
repeats eqn5 and does not mention eqn1
Pablo Estuardo
Pablo Estuardo 2020년 2월 21일
same probleme here..
syms u(t) v(t) f taux tauy Hm rho R u0 v0
du = diff(u);
dv = diff(v);
DE = [du - f*v == taux/(Hm*rho) - R*u; dv + f*u == tauy/(Hm*rho) - R*v]
Soln = dsolve(DE, u(0)==u0, v(0)==v0)
Error using mupadengine/feval (line 163)
The equations are invalid.
Error in dsolve>mupadDsolve (line 336)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 193)
sol = mupadDsolve(args, options);

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 12월 2일
eqn10 is of the form
a(t) == -(am(t) - a(t) + as(t))/(t + 1)
Even if you simplify to
a(t) = -(am(t) + as(t))/t
you have the problem that this is not a differential equation and is not an initial condition.
You eqn6, eqn7, eqn8, and eqn9 are of the form
constant == sum of functions of t
Those are not initial conditions or differential equations either.
If the line
a(t) == -(am(t) - a(t) + as(t))/(t + 1)
exists for the purpose of defining a(t) for use in the other equations, then instead of presenting it as a condition or equation, you have to substitute it into the other equations (preferably after reducing it to -(am(t) + as(t))/t )

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by