How to solve simultaneous differential equations?
이전 댓글 표시
% Parameters
mumax=0.2;
Ks=1.0;
Yxs=0.5;
Ypx=0.2;
Sf=10;
F=0.02;
Yps=1.0;
% Equaiotns
syms V(t) X(t) P(t) S(t)
Rg=mumax*(S/(S+Ks))*X;
Rp=Ypx*Rg;
% differential equations
ode1 = diff(V) == F;
ode2 = diff(X) == Rg-((X*F)/V);
ode3 = diff(P) == Rp-((P*F)/V);
ode4 = diff(S) == (F*(Sf-S)/V)-(Rg/Yxs)-(Rp/Yps);
cond1 = V(0) == 1;
cond2 = X(0) == 0.05;
cond3= P(0) == 0;
cond4 = S(0) == 10;
% Solution
sol1=dsolve(ode1,cond1);
sol2=dsolve(ode2,cond2);
sol3=dsolve(ode3,cond3);
sol4=dsolve(ode4,cond4)
This is my code, But sol4 is the message like "Warning: Symbolic solution not available." and dsolve 209 line.
What should I do fix the problem?
댓글 수: 1
Bjorn Gustavsson
2021년 10월 4일
First: you have to call dsolve with all your coupled ODEs, see the dsolve-documentation for example of that.
Second: Not all differential equations have explicit analytical solutions - since X P and S are nonlinear in the solutions containing one factor of 1/V(t) this doesn't seem unlikely, it might be possible to find some cunning variable-transform that converts this into something with an analytical solution, that might be difficult. Therefore you might need to turn to numerical solutions, see the help and documentation for ode45, ode23, ode15s and their siblings.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


