What is Ralston's method?

Ralston's second order Runge-Kutta method approximates the solution to various ordinary differential equations (ODEs).

This method involves dividing the ODE into smaller time steps and calculating the approximate solution iteratively at each step. Ralston's method utilizes two evaluation functions to estimate the solution at each point.

Working example

Consider the following second order Runge-Kutta ODE:

where

We are supposed to approximate the solution for yy. Ralston's method uses the following equation to approximate the solution:

along with the two evaluation functions mentioned below:

As mentioned earlier, Ralston's method involves iterative estimation of the solution. Each iteration utilizes the results from the previous iteration to refine the approximation.

0th0th iteration

First, we'll solve for k1k_{1}. Since y0=1.0y_{0}=1.0 at x0=0x_{0}=0 (given) the value for k1k_{1} will be:

Now for k2k_{2} it will be:

Since we have x0=0,k1=2,h=0.5,and y0=1.0x_{0} = 0, k_{1} = 2, h=0.5, \textnormal{and } y_{0} = 1.0, then the value for above equation will become:

Now that we have k1=2 and k2=1.233k_{1} = 2 \textnormal{ and } k_{2}=1.233, we can approximate y1y_{1}using the Ralston's equation as follows:

1st1st iteration

With the value of y1y_{1} obtained from the 0th iteration, we can calculate y2y_{2} in the 1st iteration using the same equations provided by Ralston's method as follow:

Just plug in the values and evaluate. This activity is left as an exercise for you.

Note: You can keep iterating this process as long as you want. The more you iterate, the better the approximation you will get.

Conclusion

In most cases, you will be given a specified number of iterations for Ralston's method. Increasing the number of iterations brings you closer to the optimal solution and improves accuracy. However, it's important to note that with more iterations, the computational complexity also increases. Thus, finding a balance between accuracy and computational efficiency is crucial when determining Ralston's method's appropriate number of iterations.

Check out 4th order Runge-Kutta method.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved