当前位置: > matlab微分方程组求解...
题目
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.
为什么会出错?

提问时间:2020-12-27

答案
把第三个式子也微分.
>> [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
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.