Ordinary Differential Equation Using Fourth Order Runge Kutta (RK) Method Algorithm
1. Start 2. Define function f(x,y) 3. Read values of initial condition(x0 and y0), number of steps (n) and calculation point (xn) 4. Calculate step size (h) = (xn - x0)/n 5. Set i=0 6. Loop k1 = h * f(x0, y0) k2 = h * f(x0+h/2, y0+k1/2) k3 = h * f(x0+h/2, y0+k2/2) k4 = h * f(x0+h, y0+k3) k = (k1+2*k2+2*k3+k4)/6 yn = y0 + k i = i + 1 x0 = x0 + h y0 = yn While i < n 7. Display yn as result 8. Stop
Recommended Readings
- Ordinary Differential Equation Using Euler's Method Algorithm
- Ordinary Differential Equation Using Euler's Method Pseudocode
- Ordinary Differential Equation Using Euler's Method Using C Programming
- Ordinary Differential Equation Using Euler's Method Using C++ Programming
- Ordinary Differential Equation Using Fourth Order Runge Kutta (RK) Method Algorithm
- Ordinary Differential Equation Using Fourth Order Runge Kutta (RK) Method Pseudocode
- Ordinary Differential Equation Using Fourth Order Runge Kutta (RK) Method Using C
- Runge Kutta (RK) Fourth Order Using C++ with Output