我正在嘗試求解包含代數和微分方程的方程系統。要象徵性地做到這一點,我需要結合dsolve和解決(我呢?)。將求解和dsolve結合起來求解具有微分和代數方程的方程系統
考慮下面的例子: 我們有三個基方程
a == b + c; % algebraic equation
diff(b,1) == 1/C1*y(t); % differential equation 1
diff(c,1) == 1/C2*y(t); % differential equation 2
求解兩個微分方程,消除INT(Y,0..t),然後求解C = F(C1,C2,一個)收益率
C1*b == C2*c or C1*(a-c) == C2*c
c = C1/(C1+C2) * a
我該如何說服Matlab給我那個結果?這是我的嘗試:
syms a b c y C1 C2;
Eq1 = a == b + c; % algebraic equation
dEq1 = 'Db == 1/C1*y(t)'; % differential equation 1
dEq2 = 'Dc == 1/C2*y(t)'; % differential equation 2
[sol_dEq1, sol_dEq2]=dsolve(dEq1,dEq2,'b(0)==0','c(0)==0'); % this works, but no inclusion of algebraic equation
%[sol_dEq1, sol_dEq2]=dsolve(dEq1,dEq2,Eq1,'c'); % does not work
%solve(Eq1,dEq1,dEq2,'c') % does not work
%solve(Eq1,sol_dEq_C1,sol_dEq_C2,'c') % does not work
解決方案和/或dsolve與方程或他們的解決方案沒有組合我嘗試給了我一個有用的結果。有任何想法嗎?