Runge Kutta 4 (RK4) Numerical Method Calculator for Systems or Second Order Differential Equations
How to Use the Calculator
- If you're estimating solutions to a system of first order differential equations, adjust
f_1(x,y,t)
as needed. Note: if you're only estimating solutions to a second order differential equation (by way of its systemification), then skip this step. - Adjust
f_2(x,y,t)
as needed. If you are estimating solutions to a second order differential equation, then this is the only thing you need to change. Previous lessons in this book discuss how to choosef_2
appropriately. Note thatx_1=x
andx_2=y
in this program. Also note that no changes are needed tof_1
if representing a second order differential equation. - Adjust
h
to your desired step size. - Adjust
x_{10}
andx_{20}
to match your initial conditions. - Unfortunately it's tricky to add more steps. To do so, select the entire final row of data, and drag the "Fill Handle" (blue box in the bottom right of a selected cell or cells) to extend the formula into more cells and calculate the desired number of steps.
J.
. At the outset, the above applet illustrates the numerical estimate of the solution to
which has systemification
using
n=10
steps of h=0.1
to arrive at an estimate of y(1)
and y'(1)
, as well as all intermediate values of y
and y'
at multiples of 0.1.
Be sure to compare this calculator with the results of the Euler's Method calculator from earlier. In particular, note the improved accuracy of these estimates compared to the Euler's Method estimates.