开发者

singularity at differential equation with MATLAB

I can't solve this differential equation by ode45 beacause it has sig开发者_JAVA百科ularity.

xy"=3xcos(x)+sin(x) ; x(0)=0 , x'(0)=0

can you help me to write ode45 function?


You can use the sinc(x) function, which is defined as sin(π*x)/(π*x), except at x=0 where its value is 1. So, you can rewrite your ODE as:

y'' = 3*cos(x) + sinc(x/π)

which ode45 shouldn't have any trouble solving.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜