matlab:dy/dx-x*sin(x+y)=0;y(1)=0
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 14:42:44
matlab:dy/dx-x*sin(x+y)=0;y(1)=0
matlab:dy/dx-x*sin(x+y)=0;y(1)=0
matlab:dy/dx-x*sin(x+y)=0;y(1)=0
因为当你输入
dsolve('Dy=x*sin(x+y)','y(1)=0')时,注意,没有指明自变量,matlab默认自变量是t,因此x被看作了常数,此时y(1)=0可能是个有问题的初值,所以不行.这也就是楼上的结果为什么会出现t的原因.
本题正
>> syms x y;
>> dsolve('Dy=x*sin(x+y)','x')
Warning: Explicit solution could not be found.
> In dsolve at 330
ans =
[ empty sym ]
说明matlab解不出来,变一下形.
令z=x+y,则dy/dx=dz/dx-1,原方程化为dz/dx-1-xsinz=0, z(1)=1
>> dsolve('Dz=x*sinz+1','z(1)=1','x')
ans =
1/2*x^2*sinz+x-1/2*sinz
然后将z换回x+y就行了.
syms x y;
dsolve('Dy=x*sin(x+y)','y(1)=0')
ans=
2*atan(exp(log(tan(x/2)) - x + t*x)) - x你的是怎么解出来的;为什么我的出现: ??? Error using ==> dsolve Error, (in dsolve/IC) The 'implicit' option is not a...
全部展开
syms x y;
dsolve('Dy=x*sin(x+y)','y(1)=0')
ans=
2*atan(exp(log(tan(x/2)) - x + t*x)) - x
收起