Differential Equations and Linear Equations

Contributed by:
Sharp Tutor
In this section, we will learn: How to solve linear equations using an integrating factor.
1. 9
DIFFERENTIAL EQUATIONS
2. DIFFERENTIAL EQUATIONS
9.5
Linear Equations
In this section, we will learn:
How to solve linear equations
using an integrating factor.
3. LINEAR EQUATIONS Equation 1
A first-order linear differential equation is
one that can be put into the form
dy
 P ( x) y Q( x)
dx
where P and Q are continuous functions
on a given interval.
 This type of equation occurs frequently in various
sciences, as we will see.
4. LINEAR EQUATIONS Equation 2
An example of a linear equation is
xy’ + y = 2x
because, for x ≠ 0, it can be written
in the form 1
y ' y 2
x
5. LINEAR EQUATIONS
Notice that this differential equation
is not separable.
 It’s impossible to factor the expression for y’
as a function of x times a function of y.
6. LINEAR EQUATIONS
However, we can still solve the equation
by noticing, by the Product Rule, that
xy’ + y = (xy)’
So, we can rewrite the equation as:
(xy)’ = 2x
7. LINEAR EQUATIONS
If we now integrate both sides,
we get:
xy = x2 + C or y = x + C/x
 If the differential equation had been in the form of
Equation 2, we would have had to initially multiply
each side of the equation by x.
8. INTEGRATING FACTOR
It turns out that every first-order linear
differential equation can be solved in a similar
fashion by multiplying both sides of Equation 1
by a suitable function I(x).
 This is called an integrating factor.
9. LINEAR EQUATIONS Equation 3
We try to find I so that the left side of
Equation 1, when multiplied by I(x), becomes
the derivative of the product I(x)y:
I(x)(y’ + P(x)y) = (I(x)y)’
10. LINEAR EQUATIONS
If we can find such a function I, then
Equation 1 becomes:
(I(x)y)’ = I(x)Q(x)
Integrating both sides, we would have:
I(x)y = ∫ I(x)Q(x) dx + C
11. LINEAR EQUATIONS Equation 4
So, the solution would be:
1 
y ( x)   I ( x )Q ( x ) dx  C 

I ( x)
12. LINEAR EQUATIONS
To find such an I, we expand Equation 3 and
cancel terms:
I(x)y’ + I(x)P(x)y = (I(x)y)’
= I’(x)y + I(x)y’
I(x)P(x) = I’(x)
13. SEPERABLE DIFFERENTIAL EQUATIONS
This is a separable differential equation for I,
which we solve as follows:
dI
 I P( x) dx
ln I P ( x) dx
P ( x ) dx
I  Ae
where A = ±eC.
14. LINEAR EQUATIONS Equation 5
We are looking for a particular integrating
factor—not the most general one.
So, we take A = 1 and use:
P ( x ) dx
Ix e
15. LINEAR EQUATIONS
Thus, a formula for the general solution
to Equation 1 is provided by Equation 4,
where I is given by Equation 5.
 However, instead of memorizing the formula,
we just remember the form of the integrating
factor—as follows.
16. LINEAR EQUATIONS
To solve the linear differential equation
y’ + P(x)y = Q(x)
multiply both sides by the integrating factor
P ( x ) dx
Ix e
and integrate both sides.
17. LINEAR EQUATIONS Example 1
Solve the differential equation
dy 2 2
 3 x y 6 x
dx
 The given equation is linear as it has the form
of Equation 1:
P(x) = 3x2 and Q(x) = 6x2
 An integrating factor is:
2
3x dx x3
I ( x) e e
18. LINEAR EQUATIONS Example 1
 Multiplying both sides of the equation by ex3,
we get
dy
x3 2 x3 2 x3
e  3 x e y 6 x e
dx
or d x3 2 x3
(e y ) 6 x e
dx
19. LINEAR EQUATIONS Example 1
 Integrating both sides, we have:
x3 2 x3 x3
e y 6 x e dx 2e  C
 x3
y 2  Ce
20. LINEAR EQUATIONS Example 1
The figure shows the graphs of several
members of the family of solutions in
Example 1.
 Notice that they
all approach 2
as x → ∞.
21. LINEAR EQUATIONS Example 2
Find the solution of the initial-value
x2y’ + xy = 1 x>0 y(1) = 2
22. LINEAR EQUATIONS E. g. 2—Equation 6
First, we must divide both sides by
the coefficient of y’ to put the differential
equation into standard form:
1 1
y ' y  2 x 0
x x
23. LINEAR EQUATIONS Example 2
The integrating factor is:
I(x) = e ∫ (1/x) dx = eln x = x
Multiplication of Equation 6 by x gives:
1 1
xy ' y  or ( xy ) ' 
x x
24. LINEAR EQUATIONS Example 2
Hence, 1
xy  dx ln x  C
x
Thus, ln x  C
y
x
ln1  C
 Since y(1) = 2, we have: 2  C
1
25. LINEAR EQUATIONS Example 2
Thus, the solution to the initial-value
problem is:
ln x  2
y
x
26. LINEAR EQUATIONS Example 3
Solve y’ +2xy = 1
 The equation is in the standard form for a linear
equation.
 Multiplying by the integrating factor e ∫ 2x dx = ex2,
we get
ex2y’ + 2xex2y = ex2
or (ex2y)’ = ex2
27. LINEAR EQUATIONS Example 3
Therefore, ex2y = ∫ ex2dx + C
 Recall from Section 7.5 that ∫ ex2dx can’t be
expressed in terms of elementary functions.
 Nonetheless, it’s a perfectly good function
and we can leave the answer as:
y = e-x2 ∫ ex2 dx + Ce-x2
28. LINEAR EQUATIONS Example 3
Another way of writing the solution is:
x
 x2 t2  x2
y e  e dt  Ce
0
 Any number can be chosen for the lower limit
of integration.
29. LINEAR EQUATIONS
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 (CAS).
30. APPLICATION TO ELECTRIC CIRCUITS
In Section 9.2, we considered the simple
electric circuit shown here.
31. APPLICATION TO ELECTRIC CIRCUITS
An electromotive force (usually a battery or
generator) produces:
 A voltage of E(t) volts (V)
 A current of I(t) amperes (A) at time t
32. APPLICATION TO ELECTRIC CIRCUITS
The circuit also contains:
 A resistor with a resistance of R ohms (Ω)
 An inductor with an inductance of L henries (H)
33. ELECTRIC CIRCUITS
Ohm’s Law gives the drop in voltage due
to the resistor as RI.
The drop due to the inductor is L(dI/dt).
34. ELECTRIC CIRCUITS
One of Kirchhoff’s laws says that
the sum of the voltage drops is equal
to the supplied voltage E(t).
35. ELECTRIC CIRCUITS Equation 7
Thus, we have
dI
L  RI E (t )
dt
which is a first-order linear differential
 The solution gives the current I at time t.
36. ELECTRIC CIRCUITS Example 4
In this simple circuit, suppose:
 The resistance is 12 Ω
 The inductance is 4 H
37. ELECTRIC CIRCUITS Example 4
Then, 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.
38. ELECTRIC CIRCUITS Example 4
Now, find:
a. I(t)
b. The current after 1 s
c. The limiting value of the current
39. ELECTRIC CIRCUITS Example 4 a
If we put L = 4, R = 12, and E(t) = 60
in Equation 7, we obtain the initial-value
dI
4  12 I 60 I (0) 0
dt
or dI
 3I 15 I (0) 0
dt
40. ELECTRIC CIRCUITS Example 4 a
Multiplying by the integrating factor
e ∫ 3 dt = e3t, we get:
dI
3t 3t 3t
e  3e I 15e
dt
d 3t
dt
 e I  15e 3t
3t 3t 3t
e I 15e dt 5e  C
 3t
I (t ) 5  Ce
41. ELECTRIC CIRCUITS Example 4 a
Since I(0) = 0, we have:
5+C=0
Thus, C = –5 and
I(t) = 5(1 – e-3t)
42. ELECTRIC CIRCUITS Example 4 b
After 1 second, the current is:
I(1) = 5(1 – e-3)
≈ 4.75 A
43. ELECTRIC CIRCUITS Example 4 c
The limiting value of the current is
given by:
 3t
lim I (t ) lim 5(1  e )
t  t 
 3t
5  5lim e
t 
5  0
5
44. ELECTRIC CIRCUITS
The figure shows how the current in
Example 4 approaches its limiting value.
45. ELECTRIC CIRCUITS
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 9.3).
46. ELECTRIC CIRCUITS
However, if we replace the battery by
a generator, we get an equation that is
linear but not separable—as in the next
47. ELECTRIC CIRCUITS Example 5
Suppose the resistance and inductance
remain as in Example 4 but—instead of
the battery—we use a generator that
produces a variable voltage of:
E(t) = 60 sin 30t volts
Find I(t).
48. ELECTRIC CIRCUITS Example 5
This time, the differential equation
dI
4  12 I 60sin 30t
dt
dI
or  3I 15sin 30t
dt
49. ELECTRIC CIRCUITS Example 5
The same integrating factor e3t
d 3t 3t dI 3t
(e I ) e  3e I
dt dt
3t
15e sin 30t
50. ELECTRIC CIRCUITS Example 5
Using Formula 98 in the Table of Integrals,
we have:
e3t I 15e3t sin 30t dt
e3t
15 (3sin 30t  30 cos 30t )  C
909
5  3t
I (sin 30t  10 cos 30t )  Ce
101
51. ELECTRIC CIRCUITS Example 5
Since I(0) = 0, we get:
 50
101  C 0
 3t
I (t )  50
101 (sin 30t  10 cos 30t )  50
101 e
52. ELECTRIC CIRCUITS
The figure shows the graph of the
current when the battery is replaced
by a generator.