3.5 Variation of Parameters

INTRODUCTION

It was pointed out in the Remarks at the end of Section 3.4 that the method of undetermined coefficients has an inherent weakness that limits its wider application to linear equations: The DE must have constant coefficients, and the input function g(x) must be of the type listed in Table 3.4.1. In this section we examine a method for determining a particular solution yp of a nonhomogeneous linear DE that has, in theory, no such restrictions on it. This method, due to the eminent Italian astronomer and mathematician Joseph-Louis Lagrange (1736–1813), is known as variation of parameters.

Some Assumptions

To adapt the method of variation of parameters to a linear second-order differential equation

a2(x)y″ + a1(x)y′ + a0(x)y = g(x), (1)

we begin as we did in Section 3.2—we put (1) in the standard form

y″ + P(x)y′ + Q(x)y = f(x) (2)

by dividing through by the lead coefficient a2(x). Equation (2) is the second-order analogue of the linear first-order equation dy/dx + P(x)y = f(x). In (2) we shall assume P(x), Q(x), and f(x) are continuous on some common interval I. As we have already seen in Section 3.3, there is no difficulty in obtaining the complementary function yc of (2) when the coefficients are constants.

Method of Variation of Parameters

Corresponding to the substitution yp = u1(x)y1(x) that we used in Section 2.3 to find a particular solution yp of dy/dx + P(x)y = f(x), for the linear second-order DE (2) we seek a solution of the form

yp(x) = u1(x)y1(x) + u2(x)y2(x), (3)

where y1 and y2 form a fundamental set of solutions on I of the associated homogeneous form of (1). Using the product rule to differentiate yp twice, we get

Substituting (3) and the foregoing derivatives into (2) and grouping terms yields

(4)

Because we seek to determine two unknown functions u1 and u2, reason dictates that we need two equations. We can obtain these equations by making the further assumption that the functions u1 and u2 satisfy . This assumption does not come out of the blue but is prompted by the first two terms in (4), since, if we demand that , then (4) reduces to . We now have our desired two equations, albeit two equations for determining the derivatives and . By Cramer’s rule, the solution of the system

If you are unfamiliar with Cramer’s rule, see Section 8.7.

can be expressed in terms of determinants:

(5)

where

(6)

The functions u1 and u2 are found by integrating the results in (5). The determinant W is recognized as the Wronskian of y1 and y2. By linear independence of y1 and y2 on I, we know that W(y1(x), y2(x)) ≠ 0 for every x in the interval.

Summary of the Method

Usually it is not a good idea to memorize formulas in lieu of understanding a procedure. However, the foregoing procedure is too long and complicated to use each time we wish to solve a differential equation. In this case it is more efficient simply to use the formulas in (5). Thus to solve a2y″ + a1y′ + a0y = g(x), first find the complementary function yc = c1y1 + c2y2 and then compute the Wronskian W(y1(x), y2(x)). By dividing by a2, we put the equation into the standard form y″ + Py′ + Qy = f(x) to determine f(x). We find u1 and u2 by integrating = W1/W and = W2/W, where W1 and W2 are defined as in (6). A particular solution is yp = u1y1 + u2 y2. The general solution of equation (1) is then y = yc + yp.

EXAMPLE 1 General Solution Using Variation of Parameters

Solve y″ − 4y′ + 4y = (x + 1)e2x.

SOLUTION

From auxiliary equation m2 − 4m + 4 = (m − 2)2 = 0 we have yc = c1e2x + c2xe2x. With the identifications y1 = e2x and y2 = xe2x, we next compute the Wronskian:

Since the given differential equation is already in form (2) (that is, the coefficient of y″ is 1), we identify f(x) = (x + 1)e2x. From (6) we obtain

and so from (5)

Integrating the foregoing derivatives gives

Hence from (3) we have

and

EXAMPLE 2 General Solution Using Variation of Parameters

Solve 4y″ + 36y = csc 3x.

SOLUTION

We first put the equation in the standard form (2) by dividing by 4:

y″ + 9y = csc 3x.

Since the roots of the auxiliary equation m2 + 9 = 0 are m1 = 3i and m2 = −3i, the complementary function is yc = c1 cos 3x + c2 sin 3x. Using y1 = cos 3x, y2 = sin 3x, and f(x) = csc 3x, we obtain

,

Integrating

gives

Thus from (3) a particular solution is

yp = − x cos 3x + (sin 3x) ln |sin 3x|.

The general solution of the equation is

y = yc + yp = c1 cos 3x + c2 sin 3x x cos 3x + (sin 3x) ln |sin 3x|. (7)

Equation (7) represents the general solution of the differential equation on, say, the interval (0, π/3).

Constants of Integration

When computing the indefinite integrals of and , we need not introduce any constants. This is because

Integral-Defined Functions

We have seen several times in the preceding sections and chapters that when a solution method involves integration we may encounter nonelementary integrals. As the next example shows, sometimes the best we can do in constructing a particular solution (3) of a linear second-order differential equation is to use the integral-defined functions.

Here we assume that the integrand is continuous on the interval [x0, x]. See Problems 27–30 in Exercises 3.5.

EXAMPLE 3 General Solution Using Variation of Parameters

Solve y″y = .

SOLUTION

The auxiliary equation m2 − 1 = 0 yields m1 = −1 and m2 = 1. Therefore yc = c1ex + c2ex. Now W(ex, ex) = −2 and

Since the foregoing integrals are nonelementary, we are forced to write

and so

In Example 3 we can integrate on any interval [x0, x] not containing the origin. Also see Examples 2 and 3 in Section 3.10.

Higher-Order Equations

The method we have just examined for nonhomogeneous second-order differential equations can be generalized to linear nth-order equations that have been put into the standard form

y(n) + Pn−1(x)y(n−1) + ... + P1(x)y′ + P0(x)y = f(x). (8)

If yc = c1y1 + c2y2 + ... + cnyn is the complementary function for (8), then a particular solution is

yp(x) = u1(x)y1(x) + u2(x)y2(x) + ... + un(x)yn(x),

where the , k = 1, 2, ..., n, are determined by the n equations

(9)

The first n − 1 equations in this system, like y1 + y2 = 0 in (4), are assumptions made to simplify the resulting equation after yp = u1(x)y1(x) + ... + un(x)yn(x) is substituted in (8). In this case, Cramer’s rule gives

= k = 1, 2, ..., n,

where W is the Wronskian of y1, y2, ..., yn and Wk is the determinant obtained by replacing the kth column of the Wronskian by the column consisting of the right-hand side of (9), that is, the column (0, 0, ..., f(x)). When n = 2 we get (5). When n = 3, the particular solution is yp = u1y1 + u2y2 + u3y3, where y1, y2, and y3 constitute a linearly independent set of solutions of the associated homogeneous DE, and u1, u2, u3 are determined from

(10)

See Problems 33 and 34 in Exercises 3.5.

Particular Solution May Not Be Unique

In the problems in Exercises 3.5, do not hesitate to simplify, if possible, the form of the particular solution yp found by variation of parameters. Depending on how the antiderivatives of and are found, you might not obtain the same yp given in the answer section. For example, in Problem 3 in Exercises 3.5, both and are particular solutions of the differential equation If we use the first particular solution, then a general solution of the differential equation is

But note that by writing and defining another perfectly valid general solution is

3.5 Exercises Answers to selected odd-numbered problems begin on page ANS-6.

In Problems 1–20, solve each differential equation by variation of parameters.

  1. y″ + y = sec x
  2. y″ + y = tan x
  3. y″ + y = sin x
  4. y″ + y = sec θ tan θ
  5. y″ + y = cos2x
  6. y″ + y = sec2x
  7. y″y = cosh x
  8. y″y = sinh 2x
  9. y″ − 9y =
  10. 4y″y = ex/2 + 3
  11. y″ + y′ = 3
  12. y″ − 4y′ + 3y = ex
  13. y″ + 3y′ + 2y =
  14. y″ − 2y′ + y =
  15. y″ + 3y′ + 2y = sin ex
  16. y″ − 2y′ + y = et arctan t
  17. y″ + 2y′ + y = et ln t
  18. 2y″ + y′ = 6x
  19. 3y″ − 6y′ + 6y = ex sec x
  20. 4y″ − 4y′ + y =

In Problems 21–26, solve each differential equation by variation of parameters subject to the initial conditions y(0) = 1, y′(0) = 0.

  1. 4y″y = xex/2
  2. y″ + y′ = ex
  3. y″ − 2y′ + y = ex sec2 x
  4. 2y″ + y′y = x + 1
  5. y″ + 2y′ − 8y = 2e−2xex
  6. y″ − 4y′ + 4y = (12x2 − 6x)e2x

In Problems 27–30, proceed as in Example 3 and solve each differential equation by variation of parameters.

In Problems 31 and 32, the indicated functions are known linearly independent solutions of the associated homogeneous differential equation on the interval (0, ∞). Find the general solution of the given nonhomogeneous equation.

  1. x2y″ + xy′ +(x2)y = ; y1 = cos x,
    y2 = sin x
  2. x2y″ + xy′ + y = sec(ln x); y1 = cos(ln x), y2 = sin(ln x)

In Problems 33–36, solve the given third-order differential equation by variation of parameters.

  1. y‴ + y′ = tan x
  2. y‴ + 4y′ = sec 2x
  3. y‴ −2y″y′ + 2y = e4x

Discussion Problems

In Problems 37 and 38, discuss how the methods of undetermined coefficients and variation of parameters can be combined to solve the given differential equation. Carry out your ideas.

  1. 3y″ − 6y′ + 30y = 15 sin x + ex tan 3x
  2. y″ − 2y′ + y = 4x2 − 3 + x−1ex
  3. What are the intervals of definition of the general solutions in Problems 1, 7, 17, and 20? Discuss why the interval of definition of the general solution in Problem 32 is not (0, ∞).
  4. Find the general solution of x4y″ + x3y′ − 4x2y = 1 given that y1 = x2 is a solution of the associated homogeneous equation.

Computer Lab Assignments

In Problems 41 and 42, the indefinite integrals of the equations in (5) are nonelementary. Use a CAS to find the first four nonzero terms of a Maclaurin series of each integrand and then integrate the result. Find a particular solution of the given differential equation.

  1. y″ + y =