We explore some ways to improve upon Euler’s method for approximating the solution of a differential equation.

### The Improved Euler Method and Related Methods

In Trench 3.1 we saw that the global truncation error of Euler’s method is , which would seem to imply that we can achieve arbitrarily accurate results with Euler’s method by simply choosing the step size sufficiently small. However, this isn’t a good idea, for two reasons. First, after a certain point decreasing the step size will increase roundoff errors to the point where the accuracy will deteriorate rather than improve. The second and more important reason is that in most applications of numerical methods to an initial value problem

the expensive part of the computation is the evaluation of . Therefore we want methods that give good results for a given number of such evaluations. This is what motivates us to look for numerical methods better than Euler’s.To clarify this point, suppose we want to approximate the value of by applying Euler’s method to the initial value problem on , with , , and , respectively. Since each step in Euler’s method requires one evaluation of , the number of evaluations of in each of these attempts is , , and , respectively. In each case we accept as an approximation to . The table below shows the results.

The first column of the table indicates the number of evaluations of required to obtain the approximation, and the last column contains the value of rounded to ten significant figures.

In this module we’ll study the improved Euler method, which requires two evaluations of at each step. We’ve used this method with , , and . The required number of evaluations of were 12, 24, and , as in the three applications of Euler’s method; however, you can see from the third column of the table below that the approximation to obtained by the improved Euler method with only 12 evaluations of is better than the approximation obtained by Euler’s method with 48 evaluations.

In Trench 3.1 we’ll study the Runge-Kutta method, which requires four evaluations of at each step. We’ve used this method with , , and . The required number of evaluations of were again 12, 24, and , as in the three applications of Euler’s method and the improved Euler method; however, you can see from the fourth column of the table below that the approximation to obtained by the Runge-Kutta method with only 12 evaluations of is better than the approximation obtained by the improved Euler method with 48 evaluations.

#### The Improved Euler Method

The improved Euler method for solving the initial value problem (eq:3.2.1) is based on approximating the integral curve of (eq:3.2.1) at by the line through with slope that is, is the average of the slopes of the tangents to the integral curve at the endpoints of . The equation of the approximating line is therefore

Setting in (eq:3.2.2) yields as an approximation to . As in our derivation of Euler’s method, we replace (unknown if ) by its approximate value ; then (eq:3.2.3) becomes However, this still won’t work, because we don’t know , which appears on the right. We overcome this by replacing by , the value that the Euler method would assign to . Thus, the improved Euler method starts with the known value and computes successively with the formula The computation indicated here can be conveniently organized as follows: given , computeThe improved Euler method requires two evaluations of per step, while Euler’s method requires only one. However, we’ll see at the end of this section that if satisfies appropriate assumptions, the local truncation error with the improved Euler method is , rather than as with Euler’s method. Therefore the global truncation error with the improved Euler method is ; however, we won’t prove this.

We note that the magnitude of the local truncation error in the improved Euler method and other methods discussed in this section is determined by the third 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 next example, which deals with the initial value problem considered in Example example:3.1.1, illustrates the computational procedure indicated in the improved Euler method.

(We used Euler’s method and the Euler semilinear method on this problem in example:3.1.4.)

item:3.2.4b Since is a solution of the complementary equation , we can apply the improved Euler semilinear method to (eq:3.2.6), with The results listed in the table below are clearly better than those obtained by the improved Euler method.

#### A Family of Methods with Local Truncation Error

We’ll now derive a class of methods with local truncation error for solving (eq:3.2.1). For simplicity, we assume that , , , , , and are continuous and bounded for all . This implies that if is the solution of (eq:3.2.1 then and are bounded.

We begin by approximating the integral curve of (eq:3.2.1) at by the line through with slope where , , and are constants that we’ll soon specify; however, we insist at the outset that , so that The equation of the approximating line is

Setting in (eq:3.2.7) yields as an approximation to .To determine , , and so that the error

in this approximation is , we begin by recalling from Taylor’s theorem that where is in . Since is bounded this implies that Comparing this with (eq:3.2.8) shows that if However, applying Taylor’s theorem to shows that where is in . Since is bounded, this implies that Substituting this into (eq:3.2.9) and noting that the sum of two terms is again shows that if which is true ifSince , we can now conclude from (eq:3.2.8) that

if , , and satisfy (eq:3.2.10). However, this formula would not be useful even if we knew exactly (as we would for ), since we still wouldn’t know exactly. To overcome this difficulty, we again use Taylor’s theorem to write where is in . Since and is bounded, this implies that for some constant . Since is bounded, the mean value theorem implies that for some constant . Letting and recalling (eq:3.2.12) shows that Substituting this into (eq:3.2.11) yieldsThe computation indicated here can be conveniently organized as follows: given , compute

Consistent with our requirement that , we require that . Letting in (eq:3.2.13) yields the improved Euler method (eq:3.2.4). Letting yields Heun’s method, which can be organized as

*midpoint method*, which can be organized as

### Text Source

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