first order differential equation
4 ビュー (過去 30 日間)
古いコメントを表示
how can we solve this differential equation numerically in matlab
2xy(dy/dx)+(1+x)y^2=e^x ?
0 件のコメント
回答 (1 件)
Star Strider
2022 年 12 月 17 日
One approach —
syms y(x) x Y
Dy = diff(y);
Eqn = 2*x*y*Dy+(1+x)*y^2 == exp(x);
[VF,Subs] = odeToVectorField(Eqn)
odefcn = matlabFunction(VF, 'Vars',{x,Y})
Then, use ‘odefcn’ in the differential equation solver (perhaps ode45) of your choice.
.
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!