How do I use Euler's forward difference method and the second order Runge-Kutta method to work out a third order ODE?
Show older comments
The given equation is y'''-3y'-3xy=0 with initial conditons y(0)=1.11983, y'(0)=0.83697, y''(0)=0.12356. h=0.1. The question asks to find the numerical solution y at x=0.1, x=0.2 and x=0.3 using the Euler's forward difference method and the second order Runge-Kutta method based on, k1=hf(xn,yn) k2=hf(xn+h/2, yn+k1/2) yn+1=yn+k2.
I first turned the given equation into three first oder differential equations such that dy/dx=v so y(0)=1.11983, dv/dx=w so v(0)=y'(0)=0.83697 and dw/dx=3v+3xy so w(0)=y''(0)=0.12356.
However, Im not sure on how to work out y1,y2 and y3 for both Eulers and Runge-Kutta methods.
1 Comment
James Tursa
on 21 Mar 2022
Can you post the code you have written so far? Then we can help steer you in the right direction.
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!