first order differential equation
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how can we solve this differential equation numerically in matlab
2xy(dy/dx)+(1+x)y^2=e^x ?
0 Kommentare
Antworten (1)
Star Strider
am 17 Dez. 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!