You are on page 1of 10

Linear Differential Equations

A rst-order linear differential equation is one that can be put into the form
1

dy dx

Pxy

Qx

where P and Q are continuous functions on a given interval. This type of equation occurs frequently in various sciences, as we will see. An example of a linear equation is xy y 2x because, for x 0, it can be written in the form
2

1 y x

Notice that this differential equation is not separable because its impossible to factor the expression for y as a function of x times a function of y. But we can still solve the equation by noticing, by the Product Rule, that xy and so we can rewrite the equation as xy 2x y xy

If we now integrate both sides of this equation, we get xy x2 C or y x C x

If we had been given the differential equation in the form of Equation 2, we would have had to take the preliminary step of multiplying each side of the equation by x. It turns out that every rst-order linear differential equation can be solved in a similar fashion by multiplying both sides of Equation 1 by a suitable function I x called an integrating factor. We try to nd I so that the left side of Equation 1, when multiplied by I x , becomes the derivative of the product I x y:
3

I x y

Pxy

I xy

If we can nd such a function I , then Equation 1 becomes I xy Integrating both sides, we would have I xy so the solution would be
4

I xQx

yI xQx

dx

y x

1 I x

yI xQx

dx

To nd such an I, we expand Equation 3 and cancel terms: I xy I xPxy I xPx I xy I x


1

I xy

Ixy

2 LINEAR DIFFERENTIAL EQUATIONS

This is a separable differential equation for I , which we solve as follows:

dI I

yPx yPx

dx dx
dx

ln I I

Ae x P x

e C. We are looking for a particular integrating factor, not the most general where A one, so we take A 1 and use
5

Ix

ex P x

dx

Thus, a formula for the general solution to Equation 1 is provided by Equation 4, where I is given by Equation 5. Instead of memorizing this formula, however, we just remember the form of the integrating factor. P x y Q x , multiply both sides by To solve the linear differential equation y e x P x dx and integrate both sides. the integrating factor I x dy dx

EXAMPLE 1 Solve the differential equation

3x 2 y

6x 2.

SOLUTION The given equation is linear since it has the form of Equation 1 with

Px

3x 2 and Q x

6x 2. An integrating factor is I x e x 3x
2

dx

ex

Multiplying both sides of the differential equation by e x , we get


Figure 1 shows the graphs of several members of the family of solutions in Example 1. Notice that they all approach 2 as x l .

ex

dy dx

3x 2e x y d x3 e y dx

6x 2e x 6x 2e x

6 C=2 C=1 C=0 C=_1 _1.5 C=_2 _3 1.8

or Integrating both sides, we have ex y y


3

y 6x e
2

2 x3

dx
x3

2e x

FIGURE 1

Ce

EXAMPLE 2 Find the solution of the initial-value problem

x2y

xy

y1

SOLUTION We must rst divide both sides by the coefcient of y to put the differential equation into standard form: 6

1 y x

1 x2

The integrating factor is I x ex


1 x dx

e ln x

LINEAR DIFFERENTIAL EQUATIONS 3

Multiplication of Equation 6 by x gives xy y 1 x or 1 dx x ln x x ln 1 1 C xy 1 x C

Then
The solution of the initial-value problem in Example 2 is shown in Figure 2.

xy

y
y

ln x C

5 (1,2) 0 4

and so Since y 1 2, we have 2

Therefore, the solution to the initial-value problem is


_5

FIGURE 2

y
EXAMPLE 3 Solve y

ln x x

2xy

1.

SOLUTION The given equation is in the standard form for a linear equation. Multiplying by the integrating factor

e x 2x dx we get or
Even though the solutions of the differential equation in Example 3 are expressed in terms of an integral, they can still be graphed by a computer algebra system (Figure 3).

ex ex ex

ex y

2xe x y

(e x y)
ex y
2 2

Therefore

ye

x2

dx

Recall from Section 5.8 that x e x dx cant be expressed in terms of elementary functions. Nonetheless, its a perfectly good function and we can leave the answer as y e
x2

2.5 C=2 _2.5 C=_2 2.5

ye

x2

dx

Ce

x2

Another way of writing the solution is y e


x2

_2.5

e t dt

Ce

x2

FIGURE 3

(Any number can be chosen for the lower limit of integration.) Application to Electric Circuits
R

switch FIGURE 4

In Section 7.2 we considered the simple electric circuit shown in Figure 4: An electromotive force (usually a battery or generator) produces a voltage of E t volts (V) and a current of I t amperes (A) at time t . The circuit also contains a resistor with a resistance of R ohms ( ) and an inductor with an inductance of L henries (H). Ohms Law gives the drop in voltage due to the resistor as RI . The voltage drop due to the inductor is L dI dt . One of Kirchhoffs laws says that the sum of the voltage drops is equal to the supplied voltage E t . Thus, we have
7

dI dt

RI

Et

which is a rst-order linear differential equation. The solution gives the current I at time t .

4 LINEAR DIFFERENTIAL EQUATIONS

EXAMPLE 4 Suppose that in the simple circuit of Figure 4 the resistance is 12 and the inductance is 4 H. If a battery gives a constant voltage of 60 V and the switch is closed when t 0 so the current starts with I 0 0, nd (a) I t , (b) the current after 1 s, and (c) the limiting value of the current.
SOLUTION
The differential equation in Example 4 is both linear and separable, so an alternative method is to solve it as a separable equation (Example 4 in Section 7.3). If we replace the battery by a generator, however, we get an equation that is linear but not separable (Example 5).

(a) If we put L problem

4, R

12, and E t dI dt dI dt

60 in Equation 7, we obtain the initial-value

12I

60

I0

or

3I

15

I0 e 3t, we get

Multiplying by the integrating factor e x 3 dt e 3t dI dt 3e 3tI d 3t e I dt e 3tI I t


Figure 5 shows how the current in Example 4 approaches its limiting value.

15e 3t 15e 3t

y 15e
5

3t

dt
3t

5e 3t

Ce

Since I 0

0, we have 5

0, so C I t 51

5 and e
3t

6 y=5

(b) After 1 second the current is I1 (c)


tl

51

e
tl

4.75 A e
3t

lim I t

lim 5 1
tl

2.5

5 5

5 lim e 0 5

3t

FIGURE 5

EXAMPLE 5 Suppose that the resistance and inductance remain as in Example 4 but, instead of the battery, we use a generator that produces a variable voltage of Et 60 sin 30t volts. Find I t .
SOLUTION This time the differential equation becomes
Figure 6 shows the graph of the current when the battery is replaced by a generator.

dI dt

12I

60 sin 30t

or

dI dt

3I

15 sin 30t

The same integrating factor e 3t gives d 3t e I dt e 3t dI dt 3e 3tI 15e 3t sin 30t

2.5

Using Formula 98 in the Table of Integrals, we have e 3tI

15e 3t sin 30t dt sin 30t

15

_2

e 3t 3 sin 30t 909 Ce


3t

30 cos 30t

FIGURE 6

5 101

10 cos 30t

LINEAR DIFFERENTIAL EQUATIONS 5

Since I 0

0, we get
50 101 5 101

0
50 101

so

I t

sin 30t

10 cos 30t

3t

Exercises
A Click here for answers.
14

Click here for solutions.

Observe that, if n 0 or 1, the Bernoulli equation is linear. For other values of n, show that the substitution u y 1 n transforms the Bernoulli equation into the linear equation du dx
2426

Determine whether the differential equation is linear. e xy ln x


1. y 3. xy

x 2y 2 x 2y

2. y

sin x cos y

x 3y tan x

nPxu

nQx

4. y

Use the method of Exercise 23 to solve the differential 2 y x


equation.
24. xy

514

Solve the differential equation. 2y 2y y 2xy 2e


x

5. y 7. xy 9. xy

6. y 8. x 2 y 10. 1
2

5y 2xy cos 2 x

y y

xy 2 xy 3

25. y

y3 x2

x2 sx x

26. y

xy

xy

27. In the circuit shown in Figure 4, a battery supplies a constant

dy 11. dx
12.

dy dx

x sin 2x du t dt dr dt

y tan x, u 1 te t t, t

2 0

voltage of 40 V, the inductance is 2 H, the resistance is 10 and I 0 0. (a) Find I t . (b) Find the current after 0.1 s.

28. In the circuit shown in Figure 4, a generator supplies a voltage

13. 1 14. t ln t

of E t 40 sin 60t volts, the inductance is 1 H, the resistance is 20 , and I 0 1 A. (a) Find I t . (b) Find the current after 0.1 s. (c) Use a graphing device to draw the graph of the current function.
29. The gure shows a circuit containing an electromotive force,

1520

Solve the initial-value problem. x dy dt y, 2y 2tv y y x


15. y 16. t 17.

y0 t 3, t
2

2 0, y1 5 y 4 0 y1

a capacitor with a capacitance of C farads (F), and a resistor with a resistance of R ohms ( ). The voltage drop across the 0
C

dv dt

3t 2e t , v 0 6x, x 0, y

18. 2xy 19. xy 20. x


20

x 2 sin x, y 1 x,

dy dx

0,

capacitor is Q C, where Q is the charge (in coulombs), so in this case Kirchhoffs Law gives RI But I Q C Et

; 2122

Solve the differential equation and use a graphing calculator or computer to graph several members of the family of solutions. How does the solution curve change as C varies? y

21. xy

x cos x,

22. y

cos x y

cos x

dQ dt (see Example 3 in Section 3.3), so we have R dQ dt 1 Q C Et

23. A Bernoulli differential equation (named after James

Bernoulli) is of the form dy dx Pxy Qxy


n

Suppose the resistance is 5 , the capacitance is 0.05 F, a battery gives a constant voltage of 60 V, and the initial charge is Q 0 0 C. Find the charge and the current at time t.

6 LINEAR DIFFERENTIAL EQUATIONS

30. In the circuit of Exercise 29, R

and E t

2 , C 0.01 F, Q 0 0, 10 sin 60t. Find the charge and the current at time t.

t minutes, show that y satises the differential equation dy dt 2 3y 100 2t

31. Let P t be the performance level of someone learning a skill

as a function of the training time t. The graph of P is called a learning curve. In Exercise 13 in Section 7.1 we proposed the differential equation dP dt

Solve this equation and nd the concentration after 20 minutes.


34. A tank with a capacity of 400 L is full of a mixture of water

and chlorine with a concentration of 0.05 g of chlorine per liter. In order to reduce the concentration of chlorine, fresh water is pumped into the tank at a rate of 4 L s. The mixture is kept stirred and is pumped out at a rate of 10 L s. Find the amount of chlorine in the tank as a function of time.
35. An object with mass m is dropped from rest and we assume

kM

Pt

as a reasonable model for learning, where k is a positive constant. Solve it as a linear differential equation and use your solution to graph the learning curve.
32. Two new workers were hired for an assembly line. Jim

processed 25 units during the rst hour and 45 units during the second hour. Mark processed 35 units during the rst hour and 50 units the second hour. Using the model of Exercise 31 and 0, estimate the maximum number of assuming that P 0 units per hour that each worker is capable of processing.
33. In Section 7.3 we looked at mixing problems in which the

that the air resistance is proportional to the speed of the object. If s t is the distance dropped after t seconds, then the speed is v s t and the acceleration is a v t . If t is the acceleration due to gravity, then the downward force on the object is mt cv, where c is a positive constant, and Newtons Second Law gives dv m mt cv dt (a) Solve this as a linear equation to show that
v

mt 1 c

ct m

volume of uid remained constant and saw that such problems give rise to separable equations. (See Example 6 in that section.) If the rates of ow into and out of the system are different, then the volume is not constant and the resulting differential equation is linear but not separable. A tank contains 100 L of water. A solution with a salt concentration of 0.4 kg L is added at a rate of 5 L min. The solution is kept mixed and is drained from the tank at a rate of 3 L min. If y t is the amount of salt (in kilograms) after

(b) What is the limiting velocity? (c) Find the distance the object has fallen after t seconds.
36. If we ignore air resistance, we can conclude that heavier

objects fall no faster than lighter objects. But if we take air resistance into account, our conclusion changes. Use the expression for the velocity of a falling object in Exercise 35(a) to nd dv dm and show that heavier objects do fall faster than lighter ones.

LINEAR DIFFERENTIAL EQUATIONS 7

Answers
S 1. No 7. y 11. 13. 15. 19. 21.

Click here for solutions.


e x Ce 2x 2 x 2 ln x Cx 2 C x 9. y 3 sx 2 2 2 1 1 x Ce x x e x dx 2x 2e t 2 2t 2C 2 t 1 2 2 x 1 3e x 17. v t 3e t 5e t x cos x x sin x cos x x C x 6
3. Yes 5. y
C=2 C=1 C=0.2
2 3

25. 27. 29. 31.

y Cx 4 2 5x 1 2 (a) I t (b) 4 4e 1 2 4 4e 5t 4t Qt 3 1 e ,I t 12e 4t kt P(t) Pt M Ce


M

1.57 A

y u y y y

P(0) 0
2 5

100 2t 40,000 100 2t 3 2; 0.2275 kg L 35. (b) mt c (c) mt c t m c e ct m m 2t c 2


33. y
10

0
C=_1 C=_2 _4

8 LINEAR DIFFERENTIAL EQUATIONS

Solutions: Linear Differential Equations


1. y 0 + ex y = x2 y 2 is not linear since it cannot be put into the standard linear form (1), y 0 + P (x) y = Q(x). 3. xy0 + ln x x2 y = 0 xy 0 x2 y = ln x form (1), so this equation is linear. 5. Comparing the given equation, y0 + 2y = 2ex , with the general form, y0 + P (x)y = Q(x), we see that P (x) = 2 and the integrating factor is I(x) = e P (x)dx = e 2 dx = e2x . Multiplying the differential equation by I(x) gives 0 R e2x y 0 + 2e2x y = 2e3x e2x y = 2e3x e2x y = 2e3x dx e2x y = 2 e3x + C 3 y = 2 ex + Ce2x . 3
0 2 R R

y0 + (x) y =

ln x , which is in the standard linear x

7. xy 2y = x I(x) = e
R

[divide by x] =e
R (2/x) dx

2 y + x
0

P (x) dx

= e2 ln|x| = eln|x|

y = x ().
2

equation () by I(x) gives

2 1 1 0 y 3y= x2 x x

y = x2 (ln |x| + C ) = x2 ln |x| + Cx2 .

= eln(1/x ) = 1/x2 . Multiplying the differential 0 1 1 1 y = y = ln |x| + C x2 x x2

9. Since P (x) is the derivative of the coefcient of y0 [P (x) = 1 and the coefcient is x], we can write the differential equation xy 0 + y = x in the easily integrable form (xy)0 = x xy = 2 x3/2 + C 3 2 y = 3 x + C/x. 11. I(x) = e = ex . Multiplying the differential equation y 0 + 2xy = x2 by I(x) gives 2 0 2 2 2 2 ex y 0 + 2xex y = x2 ex ex y = x2 ex . Thus
2x dx
2

y = ex

hR

i h R 2 2 2 x2 ex dx + C = ex 1 xex 2

1 x2 e 2

i 2 2 R dx + C = 1 x + Cex ex 2

1 x2 e 2

dx.

13. (1 + t)

du + u = 1 + t, t > 0 [divide by 1 + t] dt

du 1 + u = 1 (), which has the form dt 1+t


P (t) dt

u0 + P (t) u = Q(t). The integrating factor is I(t) = e

=e

[1/(1+t)] dt

= eln(1+t) = 1 + t.

Multiplying () by I(t) gives us our original equation back. We rewrite it as [(1 + t) u]0 = 1 + t. Thus, (1 + t) u = R (1 + t) dt = t + 1 t2 + C 2 u=
R

t + 1 t2 + C t2 + 2t + 2C 2 or u = . 1+t 2 (t + 1)

15. y 0 = x + y

dv = ex dx]

y0 + (1)y = x. I(x) = e (1) dx = ex . Multiplying by ex gives ex y 0 ex y = xex R (ex y)0 = xex ex y = xex dx = xex ex + C [integration by parts with u = x, y = x 1 + Cex . y(0) = 2 1 + C = 2 C = 3, so y = x 1 + 3ex .

17.

R 2 2 dv 2tv = 3t2 et , v (0) = 5. I(t) = e (2t)dt = et . Multiply the differential equation by I(t) to get dt 2 0 R 2 dv 2 2 2 2 et 2tet v = 3t2 et v = 3t2 et v = 3t2 dt = t3 + C v = t3 et + Cet . dt

5 = v(0) = 0 1 + C 1 = C, so v = t3 et + 5et .

LINEAR DIFFERENTIAL EQUATIONS 9

19. xy0 = y + x2 sin x

R 1 1 1 y = x sin x. I(x) = e (1/x) dx = e ln x = eln x = . x x 0 1 1 1 1 1 y = sin x y = cos x + C Multiplying by gives y0 2 y = sin x x x x x x

y0

y = x cos x + Cx. y() = 0 (1) + C = 0 C = 1, so y = x cos x x. 21. y 0 +


R 1 y = cos x (x 6= 0), so I(x) = e (1/x)dx = eln|x| = x (for x x > 0). Multiplying the differential equation by I(x) gives

xy0 + y = x cos x (xy)0 = x cos x. Thus, Z 1 1 y= x cos x dx + C = [x sin x + cos x + C] x x = sin x + C cos x + x x

The solutions are asymptotic to the y-axis (except for C = 1). In fact, for C > 1, y as x 0+ , whereas for C < 1, y as x 0+ . As x gets larger, the solutions approximate y = sin x more closely. The graphs for larger C lie above those for smaller C. The distance between the graphs lessens as x increases. 23. Setting u = y 1n , dy du dy yn du un/(1n) du = (1 n) y n or = = . Then the Bernoulli differential dx dx dx 1 n dx 1 n dx un/(1n) du du + P (x)u1/(1n) = Q(x)un/(1n) or + (1 n)P (x)u = Q(x)(1 n). 1 n dx dx

equation becomes

25. y 0 +

y3 1 2 2 2 4u y = 2 . Here n = 3, P (x) = , Q(x) = 2 and setting u = y 2 , u satises u0 = 2. x x x x x x Z R 2 2 2 Then I(x) = e (4/x)dx = x4 and u = x4 6 dx + C = x4 + C = Cx4 + . x 5x5 5x 1/2 2 Thus, y = Cx4 + . 5x

27. (a) 2

R dI dI + 10I = 40 or + 5I = 20. Then the integrating factor is e dt dt

5 dt

= e5t . Multiplying the differential e5t I 0 = 20e5t

equation by the integrating factor gives e5t I(t) = e5t R

dI + 5Ie5t = 20e5t dt

(b) I(0.1) = 4 4e0.5 1.57 A 29. 5

20e5t dt + C = 4 + Ce5t . But 0 = I(0) = 4 + C, so I(t) = 4 4e5t .


4 dt

R dQ + 20Q = 60 with Q(0) = 0 C. Then the integrating factor is e dt

= e4t , and multiplying the differential e4t Q 0 = 12e4t

equation by the integrating factor gives e4t Q(t) = e4t R

dQ + 4e4t Q = 12e4t dt

t and I = dQ/dt = 12e4t is the current at time t.

12e4t dt + C = 3 + Ce4t . But 0 = Q(0) = 3 + C so Q(t) = 3 1 e4t is the charge at time

10 LINEAR DIFFERENTIAL EQUATIONS

31.

R dP + kP = kM , so I(t) = e k dt = ekt . Multiplying the differential dt dP equation by I(t) gives ekt + kP ekt = kM ekt dt kt 0 e P = kM ekt R P (t) = ekt kM ekt dt + C = M + Cekt , k > 0. Furthermore, it is

reasonable to assume that 0 P (0) M , so M C 0. 0.4 kg L 5 L min

33. y(0) = 0 kg. Salt is added at a rate of

=2

kg . Since solution is drained from the tank at a min

rate of 3 L/min, but salt solution is added at a rate of 5 L/min, the tank, which starts out with 100 L of water, contains (100 + 2t) L of liquid after t min. Thus, the salt concentration at time t is leaves the tank at a rate of y(t) kg 100 + 2t L L 3 min = y(t) kg . Salt therefore 100 + 2t L

3y kg . Combining the rates at which salt enters 100 + 2t min dy 3y dy 3 and leaves the tank, we get =2 . Rewriting this equation as + y = 2, we see that dt 100 + 2t dt 100 + 2t Z 3 dt it is linear. I(t) = exp = exp 3 ln(100 + 2t) = (100 + 2t)3/2 . Multiplying the differential 2 100 + 2t equation by I(t) gives (100 + 2t)3/2 h (100 + 2t)3/2 y i0 dy + 3(100 + 2t)1/2 y = 2(100 + 2t)3/2 dt

= 2(100 + 2t)3/2

(100 + 2t)3/2 y = 2 (100 + 2t)5/2 + C 5

1 y = 2 (100 + 2t) + C(100 + 2t)3/2 . Now 0 = y(0) = 2 (100) + C 1003/2 = 40 + 1000 C 5 5 i h C = 40,000, so y = 2 (100 + 2t) 40,000(100 + 2t)3/2 kg. From this solution (no pun intended), we 5

y(t) calculate the salt concentration at time t to be C(t) = = 100 + 2t C(20) =

"

(100 + 2t)

40,000

5/2

2 + 5

kg . In particular, L

40,000 2 kg + 0.2275 and y(20) = 2 (140) 40,000(140)3/2 31.85 kg. 5 1405/2 5 L R c dv + v = g and I(t) = e (c/m)dt = e(c/m)t , and multiplying the differential equation by I(t) gives 35. (a) dt m h i0 dv vce(c/m)t e(c/m)t + = ge(c/m)t e(c/m)t v = ge(c/m)t . Hence, dt m i hR v(t) = e(c/m)t ge(c/m)t dt + K = mg/c + Ke(c/m)t . But the object is dropped from rest, so v(0) = 0 i h and K = mg/c. Thus, the velocity at time t is v(t) = (mg/c) 1 e(c/m)t . (b) lim v(t) = mg/c
t

(c) s(t) =

h i v(t) dt = (mg/c) t + (m/c)e(c/m)t + c1 where c1 = s(0) m2 g/c2 . s(0) is the initial position, i h so s(0) = 0 and s(t) = (mg/c) t + (m/c)e(c/m)t m2 g/c2 . R