Solving a non-linear second order ODE with Matlab
7 ビュー (過去 30 日間)
古いコメントを表示
I am brand new to Matlab, but I have to find an approximate numerical solution to the following differential equation:
d^2p/dr^2+dp/dr*1/r-2*exp(m(r))*sinh(p)=0 OR p''+p'*(1/r)-2*exp(m(r))*sinh(p)=0
I have separated it (I think correctly??) into two first order ODEs:
y0'=y1 y1'=2*exp(m(r))*sinh(y1)
Now I am confused on how to input this into Matlab. Any help is greatly appreciated!
0 件のコメント
採用された回答
その他の回答 (2 件)
Pratik Bajaria
2015 年 4 月 29 日
Hello,
ode45 must work for you. All you have to do is make a function handle, which carries your ode function that you have split into set of first order differential equations and then use ode45 solver in MATLAB to attain a solution.
Hope it helps!
Regards, Pratik
0 件のコメント
Bjorn Gustavsson
2015 年 4 月 29 日
Another pointer...
You have in fact not separated your DE correctly. You get y1' directly from your DE if you change dp/dr with y1.
HTH
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!