-D*X1+U*X1=dX1/dt,
问题描述:
-D*X1+U*X1=dX1/dt,
D*(R-X2)-)*B*X1/A=dX2/dt
初始条件t[0,t]; X1[0,X1]; X2[0,X2]
D,R,A,B均为常数项
求X1,X2
第二的方程有笔误,正确的应该是D*(R-X2)-B*X1/A=dX2/dt
答
>> [X1,X2]=dsolve('-d*X1+U*X1=DX1','d*(R-X2)*B*X1/A=DX2')
X1 =
C2*exp((-d+U)*t)
X2 =
(R*exp(d*B/A*C2/(-d+U)*exp((-d+U)*t))+C1)*exp(-d*B/A*C2/(-d+U)*exp((-d+U)*t))
或者
clc;clear
[X1,X2]=dsolve('-d*X1+U*X1=DX1','d*(R-X2)*B*X1/A=DX2')
C2=solve(X1-'X1','C2')
X2=subs(X2)
C1=solve(X2-'X2','C1')
X1=subs(X1)
X2=subs(X2)
结果:
X1 =
X1
X2 =
(R*exp(d*B/A*X1/(-d+U))-(exp(-d*B/A*X1/(-d+U))*R*exp(d*B/A*X1/(-d+U))-X2)/exp(-d*B/A*X1/(-d+U)))*exp(-d*B/A*X1/(-d+U))