4.3 The Method of Undetermined Coefficients

C H A P T E R
2
This chapter deals with differential equations of first order, d y = f (t, y),
(1)
dt where f is a given function of two variables. Any differentiable function y = φ(t) that satisfies this equation for all t in some interval is called a solution, and our object is to determine whether such functions exist and, if so, to develop methods for finding them.
Unfortunately, for an arbitrary function f , there is no general method for solving the equation in terms of elementary functions. Instead, we will describe several methods, each of which is applicable to a certain subclass of first order equations. The most important of these are linear equations (Section 2.1), separable equations and exact equations (Section 2.6). Other sections of this chapter describe some of the important applications of first order differential equations, introduce the idea of approximating a solution by numerical computation, and discuss some theoretical questions related to existence and uniqueness of solutions. The final section deals with first order difference equations, which have some important points of similarity with differential equations and are in some respects simpler to investigate.
2.1 Linear Equations with Variable Coefficients
If the function f in Eq. (1) depends linearly on the dependent variable y, then Eq. (1)
is called a first order linear equation. In Sections 1.1 and 1.2 we discussed a restricted ODE
29
Chapter 2. First Order Differential Equations type of first order linear equation in which the coefficients are constants. A typical example is d y = −ay + b,
(2)
dt
where a and b are given constants. Recall that an equation of this form describes the motion of an object falling in the atmosphere. Now we want to consider the most general first order linear equation, which is obtained by replacing the coefficients a
and b in Eq. (2) by arbitrary functions of t. We will usually write the general in the form d y + p(t)y = g(t), (3)
dt where p and g are given functions of the independent variable t.
Equation (2) can be solved by the straightforward integration method introduced in Section 1.2. That is, we rewrite the equation as d y/dt = −a.
(4)
y − (b/a) Then, by integration we obtain ln |y − (b/a)| = −at + C, from which it follows that the general solution of Eq. (2) is y = (b/a) + ce−at ,
(5)
where c is an arbitrary constant. For example, if a = 2 and b = 3, then Eq. (2) becomes d y + 2y = 3, (6)
dt and its general solution is y = 3 + ce−2t .
(7)
2
Unfortunately, this direct method of solution cannot be used to solve the general equation (3), so we need to use a different method of solution for it. The method is due to Leibniz; it involves multiplying the differential equation (3) by a certain function µ(t), chosen so that the resulting equation is readily integrable. The function µ(t) is called an integrating factor and the main difficulty is to determine how to find it. To make the initial presentation as simple as possible, we will first use this method to solve Eq. (6), later showing how to extend it to other first order linear equations, including the general equation (3).
Solve Eq. (6), E X A M P L Ed y
1
+ 2y = 3,
dt
by finding an integrating factor for this equation.
The first step is to multiply Eq. (6) by a function µ(t), as yet undetermined; thus µ(t)dy + 2µ(t)y = 3µ(t).
(8)
dt
2.1Linear Equations with Variable Coefficients
The question now is whether we can choose µ(t) so that the left side of is recognizable as the derivative of some particular expression. If so, then we can integrate Eq. (8), even though we do not know the function y. To guide our choice of the integrating factor µ(t), observe that the left side of Eq. (8) contains two terms and that the first term is part of the result of differentiating the product µ(t)y. Thus, let us try to determine µ(t) so that the left side of Eq. (8) becomes the derivative of the expression µ(t)y. If we compare the left side of Eq. (8) with the differentiation formula d [µ(t)y] = µ(t)dy + dµ(t) y, (9)
dt
dt
dt
we note that the first terms are identical and that the second terms also agree, provided we choose µ(t) to satisfy dµ(t) = 2µ(t).
(10)
dt
Therefore our search for an integrating factor will be successful if we can find a solution of Eq. (10). Perhaps you can readily identify a function that satisfies Eq. (10):
What function has a derivative that is equal to two times the original function? More systematically, rewrite Eq. (10) as dµ(t)/dt =
µ(
2,
(11) t) which is equivalent to d ln |µ(t)| = 2.
(12)
dt
Then it follows that ln |µ(t)| = 2t + C, (13) or µ(t) = ce2t.
(14)
The function µ(t) given by Eq. (14) is the integrating factor for Eq. (6). Since we do not need the most general integrating factor, we will choose c to be one in Eq. (14) and use µ(t) = e2t .
Now we return to Eq. (6), multiply it by the integrating factor e2t , and obtain d ye2t
+ 2e2t y = 3e2t.
(15)
dt
By the choice we have made of the integrating factor, the left side of Eq. (15) is the derivative of e2t y, so that Eq. (15) becomes d (e2t y) = 3e2t.
(16)
dt
By integrating both sides of Eq. (16) we obtain e2t y = 3 e2t + c, (17)
2
Chapter 2. First Order Differential Equations where c is an arbitrary constant. Finally, on solving Eq. (17) for y, we have the general solution of Eq. (6), namely, y = 3 + ce−2t .
(18)
2
Of course, the solution (18) is the same as the solution (7) found earlier. Figure 2.1.1 shows the graph of Eq. (18) for several values of c. The solutions converge to the equilibrium solution y = 3/2, which corresponds to c = 0.
y
3
2
1
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
t
FIGURE 2.1.1
Integral curves of y + 2y = 3.
Now that we have shown how the method of integrating factors works in this simple example, let us extend it to other classes of equations. We will do this in three stages.
First, consider again Eq. (2), which we now write in the form d y + ay = b.
(19)
dt
The derivation in Example 1 can now be repeated line for line, the only changes being that the coefficients 2 and 3 in Eq. (6) are replaced by a and b, respectively. The integrating factor is µ(t) = eat and the solution is given by Eq. (5), which is the same as Eq. (18) with 2 replaced by a and 3 replaced by b.
The next stage is to replace the constant b by a given function g(t), so that the differential equation becomes d y + ay = g(t).
(20)
dt
The integrating factor depends only on the coefficient of y so for Eq. (20) the integrating factor is again µ(t) = eat . Multiplying Eq. (20) by µ(t), we obtain d yeat + aeat y = eat g(t),
dt
or d (eat y) = eatg(t).
(21)
dt
2.1Linear Equations with Variable Coefficients
By integrating both sides of Eq. (21) we find that eat y = eas g(s) ds + c, (22)
where c is an arbitrary constant. Note that we have used s to denote the integration variable to distinguish it from the independent variable t. By solving Eq. (22) for y we obtain the general solution y = e−ateas g(s) ds + ce−at .
(23)
For many simple functions g(s) the integral in Eq. (23) can be evaluated and the solution y expressed in terms of elementary functions, as in the following examples. However, for more complicated functions g(s), it may be necessary to leave the solution in the integral form given by Eq. (23).
Solve the differential equation E X A M P L E
2
d y + 1 y = 2 + t.
(24)
dt
2
Sketch several solutions and find the particular solution whose graph contains the point (0, 2).
In this case a = 1/2, so the integrating factor is µ(t) = et/2. Multiplying Eq. (24)
by this factor leads to the equation d (et/2y) = 2et/2 + tet/2.
(25)
dt
By integrating both sides of Eq. (25), using integration by parts on the second term on the right side, we obtain et/2 y = 4et/2 + 2tet/2 − 4et/2 + c, where c is an arbitrary constant. Thus y = 2t + ce−t/2.
(26)
To find the solution that passes through the initial point (0, 2), we set t = 0 and y = 2 in Eq. (26), with the result that 2 = 0 + c, so that c = 2. Hence the desired solution is y = 2t + 2e−t/2.
(27)
Graphs of the solution (26) for several values of c are shown in Figure 2.1.2. Observe that the solutions converge, not to a constant solution as in Example 1 and in the examples in Chapter 1, but to the solution y = 2t, which corresponds to c = 0.
Chapter 2. First Order Differential Equations
y
10
8
6
4
2
1
2
3
4
5
t
–2
FIGURE 2.1.2
Integral curves of y + 1 y = 2 + t.
2
Solve the differential equation E X A M P L E
3
d y − 2y = 4 − t (28)
dt
and sketch the graphs of several solutions. Find the initial point on the y-axis that separates solutions that grow large positively from those that grow large negatively as t → ∞.
Since the coefficient of y is −2, the integrating factor for Eq. (28) is µ(t) = e−2t .
Multiplying the differential equation by µ(t), we obtain d (e−2t y) = 4e−2t − te−2t.
(29)
dt
Then, by integrating both sides of this equation, we have e−2t y = −2e−2t + 1 te−2t + 1 e−2t + c, 2
4
where we have used integration by parts on the last term in Eq. (29). Thus the general solution of Eq. (28) is y = − 7 + 1 t + ce2t .
(30)
4
2
Graphs of the solution (30) for several values of c are shown in Figure 2.1.3. The behavior of the solution for large values of t is determined by the term ce2t . If c = 0, then the solution grows exponentially large in magnitude, with the same sign as c
itself. Thus the solutions diverge as t becomes large. The boundary between solutions that ultimately grow positively from those that ultimately grow negatively occurs when c = 0. If we substitute c = 0 into Eq. (30) and then set t = 0, we find that y = −7/4. This is the separation point on the y-axis that was requested. Note that, for this initial value, the solution is y = − 7 + 1 t; it grows positively (but not
4
2
exponentially).
2.1Linear Equations with Variable Coefficients
y
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
t
–1
–2
–3
–4
FIGURE 2.1.3
Integral curves of y − 2y = 4 − t.
Examples 2 and 3 are special cases of Eq. (20), d y + ay = g(t),
dt
whose solutions are given by Eq. (23),
y = e−ateas g(s) ds + ce−at .
The solutions converge if a > 0, as in Example 2, and diverge if a < 0, as in In contrast to the equations considered in Sections 1.1 and 1.2, however, does not have an equilibrium solution.
The final stage in extending the method of integrating factors is to the general first order linear equation (3), d y + p(t)y = g(t),
dt where p and g are given functions. If we multiply Eq. (3) by an as yet undetermined function µ(t), we obtain µ(t)dy + p(t)µ(t)y = µ(t)g(t).
(31)
dt
Following the same line of development as in Example 1, we see that the left side of Eq. (31) is the derivative of the product µ(t)y, provided that µ(t) satisfies the equation dµ(t) = p(t)µ(t).
(32)
dt
If we assume temporarily that µ(t) is positive, then we have dµ(t)/dt =
µ(p(t),t)
Chapter 2. First Order Differential Equations and consequently ln µ(t) = p(t) dt + k.
By choosing the arbitrary constant k to be zero, we obtain the simplest possible function for µ, namely, µ(t) = exp p(t) dt.
(33)
Note that µ(t) is positive for all t, as we assumed. Returning to Eq. (31), we have d [µ(t)y] = µ(t)g(t).
(34)
dt
Hence
µ(t)y = µ(s)g(s) ds + c, so the general solution of Eq. (3) is µ(s)g(s)ds+cy =
.
µ(
(35) t)
Observe that, to find the solution given by Eq. (35), two integrations are required: one to obtain µ(t) from Eq. (33) and the other to obtain y from Eq. (35).
Solve the initial value problem E X A M P L E
4
t y + 2y = 4t2, (36) y(1) = 2.
(37)
Rewriting Eq. (36) in the standard form (3), we have y + (2/t)y = 4t, (38)
so p(t) = 2/t and g(t) = 4t. To solve Eq. (38) we first compute the integrating factor µ(t):
µ(
2
t) = exp dt = e2 ln |t| = t2.
(39)
t
On multiplying Eq. (38) by µ(t) = t2, we obtain t2 y + 2t y = (t2 y) = 4t3, and therefore t2 y = t4 + c, where c is an arbitrary constant. It follows that y = t2 + c
(40)
t2
is the general solution of Eq. (36). Integral curves of Eq. (36) for several values of c
are shown in Figure 2.1.4. To satisfy the initial condition (37) it is necessary to choose c = 1; thus y = t2 + 1 ,t > 0
(41)
t2
is the solution of the initial value problem (36), (37). This solution is shown by the heavy curve in Figure 2.1.4. Note that it becomes unbounded and is asymptotic to the positive y-axis as t → 0 from the right. This is the effect of the infinite discontinuity in the coefficient p(t) at the origin. The function y = t2 + (1/t2) for t < 0 is not part of the solution of this initial value problem.
This is the first example in which the solution fails to exist for some values of t.
Again, this is due to the infinite discontinuity in p(t) at t = 0, which restricts the solution to the interval 0 < t < ∞.
y
3
2 (1, 2) 1
–1
1
t
–1
FIGURE 2.1.4
Integral curves of t y + 2y = 4t2.
Looking again at Figure 2.1.4, we see that some solutions (those for which c > 0) are asymptotic to the positive y-axis as t → 0 from the right, while other solutions (for which c < 0) are asymptotic to the negative y-axis. The solution for which c = 0, namely, y = t2, remains bounded and differentiable even at t = 0. If we generalize the initial condition (37) to y(1) = y , (42)
0
then c = y − 1 and the solution (41) becomes
0
y − 1 y = t2 + 0 ,
t > 0.
(43)
t2
As in Example 3, this is another instance where there is a critical initial value, namely, y = 1, that separates solutions that behave in two quite different ways.
0
Chapter 2. First Order Differential Equations
PROBLEMS
In each of Problems 1 through 12:
(a) Draw a direction field for the given differential equation.
(b) Based on an inspection of the direction field, describe how solutions behave for large t.
(c) Find the general solution of the given differential equation and use it to determine how solutions behave as t → ∞.
䉴
䉴
䉴
䉴
䉴
䉴
2
In each of Problems 21 and 22:
(a) Draw a direction field for the given differential equation. How do solutions appear to
0
0
0
0
䉴
2
In each of Problems 23 and 24:
(a) Draw a direction field for the given differential equation. How do solutions appear to
0
0
0
䉴
䉴 25. Consider the initial value problem
2
䉴 26. Consider the initial value problem
3
2
0
0
䉴 27. Consider the initial value problem
4
2.1Linear Equations with Variable Coefficients
0
29. Consider the initial value problem
2
0
0
0
of the equation In each of Problems 31 through 34 construct a first order linear differential equation whose solutions have the required behavior as t → ∞. Then solve your equation and confirm that the solutions do indeed have the specified property.
31. All solutions have the limit 3 as t → ∞.
33. All solutions are asymptotic to the line y = 2t − 5 as t → ∞.
34. All solutions approach the curve y = 4 − t2 as t → ∞.
equation of first order: y + p(t)y = g(t).
(i) (a) If g(t) is identically zero, show that the solution is
y = A exp − p(t) dt , (ii) where A is a constant.
(b) If g(t) is not identically zero, assume that the solution is of the form
y = A(t) exp − p(t) dt , (iii) where A is now a function of t. By substituting for y in the given differential equation, show that A(t) must satisfy the condition
A(t) = g(t) exp p(t) dt .
(iv)
(c) Find A(t) from Eq. (iv). Then substitute for A(t) in Eq. (iii) and determine y. Verify that the solution obtained in this manner agrees with that of Eq. (35) in the text. This technique is known as the method it is discussed in detail in Section 3.7 in connection with second order linear equations.
In each of Problems 36 and 37 use the method of Problem 35 to solve the given differential equation.