matlab微分方程组求解方程组:dx/dt=-2Ax+uydy/dt=2Ax+auz-(A+u)yx+y+z=1matlab求解如下:>>global A,u>>[x,y,z]=dsolve('Dx=(-2)*A*x+u*y','Dy=2*A*x+2*u*z-(A+u)*y','x+y+z=1','x(0)=1,y(0)=0,z(0)=0')结果出错:Error using ==> dsolveThere ar

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 05:47:27

matlab微分方程组求解方程组:dx/dt=-2Ax+uydy/dt=2Ax+auz-(A+u)yx+y+z=1matlab求解如下:>>global A,u>>[x,y,z]=dsolve('Dx=(-2)*A*x+u*y','Dy=2*A*x+2*u*z-(A+u)*y','x+y+z=1','x(0)=1,y(0)=0,z(0)=0')结果出错:Error using ==> dsolveThere ar
matlab微分方程组求解
方程组:dx/dt=-2Ax+uy
dy/dt=2Ax+auz-(A+u)y
x+y+z=1
matlab求解如下:
>>global A,u
>>[x,y,z]=dsolve('Dx=(-2)*A*x+u*y','Dy=2*A*x+2*u*z-(A+u)*y','x+y+z=1','x(0)=1,y(0)=0,z(0)=0')
结果出错:
Error using ==> dsolve
There are more ODEs than variables.
为什么会出错?

matlab微分方程组求解方程组:dx/dt=-2Ax+uydy/dt=2Ax+auz-(A+u)yx+y+z=1matlab求解如下:>>global A,u>>[x,y,z]=dsolve('Dx=(-2)*A*x+u*y','Dy=2*A*x+2*u*z-(A+u)*y','x+y+z=1','x(0)=1,y(0)=0,z(0)=0')结果出错:Error using ==> dsolveThere ar
把第三个式子也微分.
>> [x,y,z]=dsolve('Dx=(-2)*A*x+u*y','Dy=2*A*x+2*u*z-(A+u)*y','Dx+Dy+Dz=0','x(0)=1,y(0)=0,z(0)=0')
x =
u^2/(A^2+2*u*A+u^2)+2*u*A/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)
y =
-(-2*u*A^2/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+2*u^2*A/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+2*A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)*u-2*A*u^2/(A^2+2*u*A+u^2))/u
z =
(-2*u^2*A^2/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)*u^2+A^2*u^2/(A^2+2*u*A+u^2))/u^2
>> test=x+y+z
test =
u^2/(A^2+2*u*A+u^2)+2*u*A/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)-(-2*u*A^2/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+2*u^2*A/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+2*A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)*u-2*A*u^2/(A^2+2*u*A+u^2))/u+(-2*u^2*A^2/(A^2+2*u*A+u^2)*exp(-(A+u)*t)+A^2/(A^2+2*u*A+u^2)*exp(-2*(A+u)*t)*u^2+A^2*u^2/(A^2+2*u*A+u^2))/u^2
>> simplify(test)
ans =
1

a小写??