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!