We study a fourth order method known as Runge-Kutta which is more accurate than any of the other methods studied in this chapter.

### Runge-Kutta Method

In general, if is any positive integer and satisfies appropriate assumptions, there are numerical methods with local truncation error for solving an initial value problem

Moreover, it can be shown that a method with local truncation error has global truncation error . In Trench 3.1 and Trench 3.2 we studied numerical methods where and . We’ll skip methods for which and proceed to the Runge-Kutta method, the most widely used method, for which . The magnitude of the local truncation error is determined by the fifth derivative of the solution of the initial value problem. Therefore the local truncation error will be larger where is large, or smaller where is small.The Runge-Kutta method computes approximate values of the solution of (eq:3.3.1) at as follows: Given , compute

The next example, which deals with the initial value problem considered in Examples example:3.1.1 and example:3.2.1, illustrates the computational procedure indicated in the Runge-Kutta method.

The Runge-Kutta method is sufficiently accurate for most applications.

The following interactive Sage Cell offers a visual comparison between Runge-Kutta and Euler’s methods for the initial value problem.

You can experiment with different values of .

The following example offers a numeric comparison of Runge-Kutta to the improved Euler’s method.

The results obtained by the Runge-Kutta method are clearly better than those obtained by the improved Euler method in fact; the results obtained by the Runge-Kutta method with are better than those obtained by the improved Euler method with .

#### The Case Where Isn’t The Left Endpoint

So far in this chapter we’ve considered numerical methods for solving an initial value problem

on an interval , for which is the left endpoint. We haven’t discussed numerical methods for solving (eq:3.3.3) on an interval , for which is the right endpoint. To be specific, how can we obtain approximate values of the solution of (eq:3.3.3) at , where ? Here’s the answer to this question:Consider the initial value problem

on the interval , for which is the left endpoint. Use a numerical method to obtain approximate values of the solution of at . Then , are approximate values of the solution of at .The justification for this answer is sketched in Exercise exer:3.3.23. Note how easy it is to make the change the given problem (eq:3.3.3) to the modified problem (eq:3.3.4): first replace by and then replace , , and by , , and , respectively.

Reversing the order of the rows in the table above, and changing the signs of the values of yields the first two columns of the table below. The last column of the table below shows the exact values of , which are given by (Since the differential equation in (eq:3.3.6) is separable, this formula can be obtained by the method of Trench 2.2.)

We leave it to you to develop a procedure for handling the numerical solution of (eq:3.3.3) on an interval such that .

### Text Source

Trench, William F., ”Elementary Differential Equations” (2013). Faculty Authored and Edited Books & CDs. 8. (CC-BY-NC-SA)