6.4 Higher-Order Equations and Systems

INTRODUCTION

So far we have focused on numerical techniques that can be used to approximate the solution of a first-order initial-value problem y′ = f(x, y), y(x0) = y0. In order to approximate the solution of a second-order initial-value problem we must express a second-order DE as a system of two first-order DEs. To do this we begin by writing the second-order DE in normal form by solving for y″ in terms of x, y, and y′.

Second-Order IVPs

A second-order initial-value problem

y″ = f(x, y, y′),     y(x0) = y0,     y′(x0) = u0,(1)

can be expressed as an initial-value problem for a system of first-order differential equations. If we let y′ = u, the differential equation in (1) becomes the system

(2)

Since y′(x0) = u(x0), the corresponding initial conditions for (2) are then y(x0) = y0, u(x0) = u0. The system (2) can now be solved numerically by simply applying a particular numerical method to each first-order differential equation in the system. For example, Euler’s method applied to the system (2) would be

(3)

whereas the fourth-order Runge–Kutta method, or RK4 method, would be

(4)

where

In general, we can express every nth-order differential equation

y(n) = f(x, y, y′, . . . , y(n − 1))

as a system of n first-order equations using the substitutions y = u1, y′ = u2, y″ = u3, . . . , y(n − 1) = un.

EXAMPLE 1 Euler’s Method

Use Euler’s method to obtain the approximate value of y(0.2), where y(x) is the solution of the initial-value problem

y″ + xy′ + y = 0,     y(0) = 1,     y′(0) = 2. (5)

SOLUTION

In terms of the substitution y′ = u, the equation is equivalent to the system

Thus from (3) we obtain

Using the step size h = 0.1 and y0 = 1, u0 = 2, we find

In other words, y(0.2) ≈ 1.39 and y′(0.2) ≈ 1.761.

With the aid of the graphing feature of a numerical solver we have compared in FIGURE 6.4.1(a) the solution curve of (5) generated by Euler’s method (h = 0.1) on the interval [0, 3] with the solution curve generated by the RK4 method (h = 0.1). From Figure 6.4.1(b), it would appear that the solution y(x) of (4) has the property that y(x) → 0 as x → ∞.

Two graphs of Numerical solution curves are titled: (a) Euler’s method (blue), Runge–Kutta method (red) and (b) Runge–Kutta. The graph (a) has two curves graphed on an x y plane. The blue curve representing Euler’s method starts at the point (0, 1), goes up and to the right, and reaches a high point approximately at (1, 2.1). Then it goes down and to the right, and ends at the right of the first quadrant. The red curve representing Runge–Kutta method starts at the point (0, 1), goes up and to the right, and reaches a high point approximately at (1, 2). Then it goes down and to the right, and ends at the right of the first quadrant. A dashed vertical line starts from the point (0.2, 0) and ends at a point on the red curve. It is labeled: approximate y(0.2). The graph (b) has a curve graphed on an x y plane. The curve starts at the point (0, 1), goes sharply up and to the right, and reaches a high point approximately at (1.5, 2). Then it goes sharply down and to the right to the approximate point (5, 0.4), goes slowly down and to the right, becomes flat at the end, and ends at the right of the first quadrant just above the positive x axis.

FIGURE 6.4.1 Numerical solution curves

Systems Reduced to First-Order Systems

Using a procedure similar to that just discussed, we can often reduce a system of higher-order differential equations to a system of first-order equations by first solving for the highest-order derivative of each dependent variable and then making appropriate substitutions for the lower-order derivatives.

EXAMPLE 2 A System Rewritten as a First-Order System

Write

as a system of first-order differential equations.

SOLUTION

Write the system as

and then eliminate y″ by multiplying the second equation by 2 and subtracting. This gives

x″ = −9x + 4y + x′ + et − 6t2.

Since the second equation of the system already expresses the highest-order derivative of y in terms of the remaining functions, we are now in a position to introduce new variables. If we let x′ = u and y′ = v, the expressions for x″ and y″ become, respectively,

The original system can then be written in the form

It may not always be possible to carry out the reductions illustrated in Example 2.

Numerical Solution of a System

The solution of a system of the form

= g1(t, x1, x2, . . . , xn)

= g2(t, x1, x2, . . . , xn)

⁝     ⁝

= gn(t, x1, x2, . . . , xn)

can be approximated by a version of the Euler, Runge–Kutta, or Adams–Bashforth–Moulton method adapted to the system. For example, the RK4 method applied to the system

x′ = f(t, x, y)

y′ = g(t, x, y)(6)

x(t0) = x0, y(t0) = y0

looks like this:

(7)

where

(8)

EXAMPLE 3 RK4 Method

Consider the initial-value problem

x′ = 2x + 4y

y′ = –x + 6y

x(0) = –1, y(0) = 6.

Use the RK4 method to approximate x(0.6) and y(0.6). Compare the results for h = 0.2 and h = 0.1.

SOLUTION

We illustrate the computations of x1 and y1 with the step size h = 0.2. With the identifications f(t, x, y) = 2x + 4y, g(t, x, y) = −x + 6y, t0 = 0, x0 = −1, and y0 = 6, we see from (8) that

Therefore from (7) we get

where, as usual, the computed values of x1 and y1 are rounded to four decimal places. These numbers give us the approximations x1x(0.2) and y1y(0.2). The subsequent values, obtained with the aid of a computer, are summarized in Tables 6.4.1 and 6.4.2.

TABLE 6.4.1 h = 0.2
tn xn yn
0.00   −1.0000     6.0000
0.20     9.2453   19.0683
0.40   46.0327   55.1203
0.60 158.9430 150.8192
TABLE 6.4.2 h = 0.1
tn xn yn
0.00     −1.0000       6.0000
0.10       2.3840     10.8883
0.20       9.3379     19.1332
0.30     22.5541     32.8539
0.40     46.5103     55.4420
0.50     88.5729     93.3006
0.60   160.7563   152.0025

You should verify that the solution of the initial-value problem in Example 3 is given by From these equations we see that the actual values x(0.6) = 160.9384 and y(0.6) = 152.1198 compare favorably with the entries in the last line of Table 6.4.2. The graph of the solution in a neighborhood of t = 0 is shown in FIGURE 6.4.2; the graph was obtained from a numerical solver using the RK4 method with h = 0.1.

Two curves are graphed on the t and x y plane. The curve labeled x(t) starts at the left end of the negative t axis, goes down and to the right, and reaches a low point in the third quadrant. Then it goes up and to the right through the marked point (0, negative 1), goes sharply up and slightly to the right through the positive t axis, and ends at the top of the first quadrant. The curve labeled y(t) starts at the approximate point (negative 1.5, 0), goes to the right, then goes slightly down to a point in the third quadrant. Then it goes up and to the right through the negative t axis, goes sharply up and slightly to the right through the marked point (0, 6), and ends at the top of the first quadrant.

FIGURE 6.4.2 Numerical solution curves for IVP in Example 3

In conclusion, we state Euler’s method for the general system (6):

6.4 Exercises Answers to selected odd-numbered problems begin on page ANS-15.

  1. Use Euler’s method to approximate y(0.2), where y(x) is the solution of the initial-value problem

    y″ − 4y′ + 4y = 0,     y(0) = −2,     y′(0) = 1.

    Use h = 0.1. Find the exact solution of the problem, and compare the actual value of y(0.2) with y2.

  2. Use Euler’s method to approximate y(1.2), where y(x) is the solution of the initial-value problem

    x2y″ − 2xy′ + 2y = 0,     y(1) = 4,     y′(1) = 9,

    where x > 0. Use h = 0.1. Find the analytic solution of the problem, and compare the actual value of y(1.2) with y2.

In Problems 3 and 4, repeat the indicated problem using the RK4 method. First use h = 0.2 and then use h = 0.1.

  1. Problem 1
  2. Problem 2
  3. Use the RK4 method to approximate y(0.2), where y(x) is a solution of the initial-value problem

    y″ − 2y′ + 2y = et cos t,     y(0) = 1, y′(0) = 2.

    First use h = 0.2 and then h = 0.1.

  4. When E = 100 V, R = 10 Ω, and L = 1 h, the system of differential equations for the currents i1(t) and i3(t) in the electrical network given in FIGURE 6.4.3 is

    where i1(0) = 0 and i3(0) = 0. Use the RK4 method to approximate i1(t) and i3(t) at t = 0.1, 0.2, 0.3, 0.4, and 0.5. Use h = 0.1. Use a numerical solver to graph the solution for 0 ≤ t ≤ 5. Use their graphs to predict the behavior of i1(t) and i3(t) as t → ∞.

    The circuit consisting of the following components: a battery of voltage E, three resistors R, and two inductors L. The two inductors L are connected in series to the voltage. Two resistors and voltage E are connected parallel to each other. Another resistor is connected in series between the voltage and inductor. A current i subscript 1 from the voltage passes through the first resistor, current i subscript 2 passes through another resistor which is connected at the blob between the two inductors, and current i subscript 3 passes through the second inductor.

    FIGURE 6.4.3 Network in Problem 6

In Problems 7–12, use the Runge–Kutta method to approximate x(0.2) and y(0.2). First use h = 0.2 and then use h = 0.1.
Use a numerical solver and h = 0.1 to graph the solution in a neighborhood of t = 0.

  1. x′ = 2xy
    y′ = x
    x(0) = 6, y(0) = 2
  2. x′ = x + 2y
    y′ = 4x + 3y
    x(0) = 1, y(0) = 1
  3. x′ = −y + t
    y′ = xt
    x(0) = –3, y(0) = 5
  4. x′ = 6x + y + 6t
    y′ = 4x + 3y − 10t + 4
    x(0) = 0.5, y(0) = 0.2
  5. x′ + 4xy′ = 7t
    x′ + y′ − 2y = 3t
    x(0) = 1, y(0) = –2
  6. x′ + y′ = 4t
    x′ + y′ + y = 6t2 + 10
    x(0) = 3, y(0) = –1