题目
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.
为什么会出错?
方程组: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(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x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1已知四边形abcd中,对角线ac与bd交于点o,oa=oc,ob=od,求证四边形abcd是平行四边形
- 21.204×10二十四次方个H2SO4分子的物质的量是多少mol 2molO2含多少个氧分子,含多少个氧原子
- 3请为以"时间"为主题的主题班会设计一段主持人的开场白
- 4cos30°— sin45° ———————— sin60°— cos45°计算
- 5函数y=(2x+3)/(x-a)+b的图像的对称中心是(-1,3)则a,b的值分别是 () A.1,1B.1,2C.-1,1D.1,-1
- 6She cooked on a fire变成疑问句,没有画线部分,怎么变?求救!
- 7如何制硫酸,硝酸和盐酸?还有化学反应式
- 8新疆农业以畜牧业为主还是绿洲农业?
- 9You are welcome 怎么会有“不客气”的意思?
- 10红星乡去年计划创造林9公顷,实际造林12公顷,实际造林是原计划的百分之几?比原计划多百分之几?
热门考点
- 188和44的最大公因数是几?
- 2生命的本质特征有哪些
- 3启普发生器为什么不能用于制反应时放热的气体?
- 4关于“鼠”的褒义词(可谐音)
- 545乘六点三加2.45乘三点七用简便计算.
- 6质量为 10kg的物体在F=200N的水平推力作用下,从粗糙斜面的底端由静止开始沿斜面运动,斜面固定不动,与水平地面的夹角θ=37°.力F作用2秒钟后撤去,物体在斜面上继续上滑了1.25秒钟后,
- 7带日带日的成语有哪些成语
- 8Whose postcards are these?=Whose ___ ___ ___?=Who___ these postcards____ ____?
- 9水中溶解氧为21mg/L 属于几类水
- 10与计算尼罗河的涨落有关的天文学成就是什么?它有何历史价值和社会价值?古代埃及还有什么科学成就与尼罗河有关?