MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】新手求助,如何求解以下微分方程 (https://www.labfans.com/bbs/showthread.php?t=87)

jadejcbking 2007-04-22 17:07

【求助】新手求助,如何求解以下微分方程
 
请问各位高手如何求解以下的微分方程
D2y+cosysiny+cosy=0;
使用dsolve求不出正确解,
y关于t的函数,D2y 是y的二次导数,
谢谢

yfchenth2 2008-07-26 10:37

x0=[0 ;10];
tspan=[-2*pi:pi/10:2*pi];
[T,X]=ode45('wangshang',tspan,x0)

function dx=wangshang(t,x)
dx=[x(2);-cos(x(1))*sin(x(1))-cos(x(1))];

yfchenth2 2008-07-26 10:37

这是求微分方程的数值解


所有时间均为北京时间。现在的时间是 09:03

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.