Solving a third order ODE in MATLAB
显示 更早的评论
Hi, MATLAB is quite about this command:
syms a h Y(x) g x B E T
D3Y = diff(Y, 3)
eqn = a.*D3Y -0.5*x^2*Y == (abs(Y))
D2Y = diff(Y, 2)
DY = diff(Y)
cond1 = Y(0) == 1;
cond2 = DY(0) == 0;
cond3 = D2Y(0) == 0
Y(x) = dsolve(eqn, cond1, cond2, cond3)
latex(Y(x))
Is there a limit here for solving it? Thanks
采纳的回答
更多回答(3 个)
Sergio Manzetti
2018-2-14
0 个投票
2 个评论
Sergio Manzetti
2018-2-14
Karan Gill
2018-2-14
编辑:Karan Gill
2018-2-14
Is this what you tried? Didn't work for me.
Could you post your input to Wolfram?
Sergio Manzetti
2018-2-15
编辑:Sergio Manzetti
2018-2-15
3 个评论
Torsten
2018-2-15
You used
eqn = a.*D3Y -0.5*x^2*Y == Y
instead of
eqn = a.*D3Y -0.5*x^2*Y == abs(Y)
Best wishes
Torsten.
Karan Gill
2018-2-15
Thanks for catching that. I also noticed the third condition is different.
Torsten
2018-2-15
... and I'm surprised that the solution does not depend on "a".
Sergio Manzetti
2018-2-15
0 个投票
2 个评论
Karan Gill
2018-2-15
Thanks for the clarifications. I'll investigate. Note that cond3 is different in your two codes.
Sergio Manzetti
2018-2-15
编辑:Sergio Manzetti
2018-2-15
类别
在 帮助中心 和 File Exchange 中查找有关 Common Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!