You are on page 1of 10

5.

First Order Linear Equations

The standard form for a first order linear differential equation is

y! + p(t)y = q(t) (5.1)

where y! = dy / dt and p(t) and q(t) are any functions of t. Rearranging,

[ p(t)y ! q(t)] dt + dy = 0 (5.2)

which has the form M (t, y)dt + N(t, y)dy = 0 with

M (t, y) = p(t)y ! q(t),!!N(t, y) = 1 (5.3)

Equation (5.2) is not, in general, exact because M y = p(t) and N t = 0 ; exactness would

require M y = N t or p(t) = 0 , in which case (5.1)reduces to y! = q(t) and the variables

easily separate to give y = ! q(s)ds + C .


t
In the more general case, when p(t) ! 0 , we

look for an integrating factor. Since

(M t ! N t ) / 1 = [ p(t) ! 0] / 1 = p(t) (5.4)

is only a function of t, an integrating factor is

µ (t) = e !t
p(s)ds
(5.5)

Multiplying equation (5.2) by the integrating factor gives M (t, y)dt + N(t, y)dy = 0 where

M (t, y) = µ (t)p(t)y ! µ (t)q(t),!!N(t, y) = µ (t) (5.6)

and a solution is ! (t, y) = C , where

!" !"
= M (t, y) = µ (t)p(t)y # µ (t)q(t),!! = N(t, y) = µ (t) (5.7)
!t !y

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.1
From the second of equations (5.7),

! (t, y) = "y µ(t)dy + h(t) = µ(t)y + h(t) (5.8)

where h may depend on t but not on y. Differentiating with respect to t and setting the

result equal to the first of equations (5.7)

!" dh
= µ #(t)y + = µ (t)p(t)y $ µ (t)q(t) (5.9)
!t dt

From equation (5.5) we calculate

d "t p(s)ds
= p(t)e "t
p(s)ds
µ !(t) = e = p(t)µ (t) (5.10)
dt

Substituting (5.10) into (5.9) and canceling like terms gives

dh
= ! µ (t)q(t) (5.11)
dt

Therefore h(t) = ! " µ (s)q(s)ds and by equation (5.8)


t

! (t, y) = µ (t)y " # µ (s)q(s)ds = C (5.12)


t

is a solution of (5.1). The result is summarized in the following theorem.

THEOREM. The one-parameter family of solutions to the general first order linear

differential equation y! + p(t)y = q(t) is

1 "
y= C + ! µ (s)q(s)ds $ (5.13)
µ (t) # t %

where µ (t) = e !t
p(s)ds
.

The following constructive algorithm gives an alternative proof of (5.13) and is generally

more useful for solving the general linear equation than memorization of the formula.

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.2
ALGORITHM 1. To solve y! + p(t)y = q(t)

(1) Compute µ (t) = e !t


p(s)ds
and observe that µ !(t) = p(t)µ (t) .

(2) Multiply the ODE through by µ (t) , giving µ (t) y! + µ !(t)y = µ (t)q(t) .

d
(3) Apply the product rule and observe from this that [ µ (t)y ] = µ (t)q(t) .
dt

(4) Integrate over t, µ (t)y = ! µ(s)q(s)ds .


t

(5) Divide by µ (t) to obtain equation (5.13).

Example 1. Solve the differential equation


y! + 2ty = t (5.14)

This has the form y! + p(t)y = q(t) , where p(t) = 2t and q(t) = t . An integrating factor

µ (t) = e !t = e !t
p(s)ds 2sds 2
is = et . Multiplying equation (5.14) through by the integrating

factor

d ! t2 # t2 2
ye = e ( y% + 2ty) = tet (5.15)
dt " $

Hence

'1 2 * 1
y = e!t # " ses ds % = e!t ) et + C , = + Ce!t . ■
2 2 2 2
(5.16)
$ t & (2 + 2

Example 2. Solve ty! " y = t 2 e"t .

Putting this into standard form gives y! " y / t = te"t . Hence µ = e "
! (1/t )dt
= e! ln t = 1 / t .

Multiplying throught,

d
[(1 / t)y ] = (1 / t)( y! " y / t) = te"t (5.17)
dt

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.3
Therefore

y = t #$ " e!t dt %& = C ! e!t . (5.18)

Example 3. Solve the initial value problem

y! + y = cost, y(0) = 1 (5.19)

Since p(t) = 1 an integrating factor is µ = et . Multiplying the differential equation

through by the integrating factor gives

d t
! e y # = et ( y% + y) = et cost (5.20)
dt " $

Integrating and solving for y,

#1 &
y = e!t " es cos s!ds = e!t % et (sin t + cost) + C ( (5.21)
t $2 '

The initial condition gives C = 1 / 2 and hence the solution of the initial value problem is

1
y= " cost + sin t + e!t $ .  (5.22)
2# %

The Linear Differential Operator D

We write the general linear first order initial value problem in terms of the linear

differential operator D = d / dt as

[ D + p(t)] y = q(t) , y(t 0 ) = y0 (5.23)

The operator D has several useful properties, among them the following.

D !1[ f (t)] = "t f (s)ds + C (5.24)

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.4
D[eat y] = eat (D + a)y (5.25)

D[e f (t ) y] = e f (t ) [D + f !(t)]y (5.26)

D "$ e !t y %' = e !t [ D + p(t)] y


p(s)ds p(s)ds
(5.27)
# &

Property (5.24) is the fundamental theorem of calculus (let f (t) = F !(t) and the result

follows), and property (5.25) follows immediately from (5.26) with f (t) = at. Equation

(5.26) follows from the product rule for derivatives, and equation (5.27) is a special case

of (5.26) with p(t) any anti-derivative of f (t) .

Applying property (5.27) to (5.23)

D "$ e !t y %' = e !t
p(s)ds p(s)ds
q(t) (5.28)
# &

Applying property (5.24) to (5.28)

= D "1D #% e !t
p(s)ds &
ye !t y ( = D "1 #% e !t q(t) &( = !t e !
p(s)ds p(s)ds p(r)dr
s
q(s)ds + C (5.29)
$ ' $ '

Hence the solution of (5.23) is

! p(s)ds # "s p(r)dr q(s)ds + C &


y = e "t %$ "t e (' (5.30)

which is identical to equation (5.13).

To generalize to the initial value problem define the function

µ (t) = µ (t 0 )exp "$ ! p(s)ds %'


t
(5.31)
# to &

Then by (5.26),

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.5
D[ µ (t)y] = µ (t)[D + p(t)]y (5.32)

Substituting (5.23),

D [ µ (t)y ] = µ (t)q(t) (5.33)

and hence by (5.24)

t
µ (t)y = C + ! µ (s)q(s)ds (5.34)
t0

Setting t = t 0 gives C = µ (t 0 )y0 . Hence we have derived the following existence

theorem.

THEOREM. The unique solution to the initial value problem

y! + p(t)y = q(t),!y(t 0 ) = y0 (5.35)

where p(t) is a bounded function in some open neighborhood N of (t 0 , y0 ) is


1 "
µ (s)q(s)ds %'
t
y= $
µ (t) #
y0 µ (t 0 ) + !t 0 &
(5.36)

where µ (t) = µ (t 0 )exp "$ ! p(s)ds %' .


t

# to &

The proof holds regardless of the choice of initial condition on µ (t) and hence we are

free to set µ (t 0 ) = 1 . This is equivalent to defining µ (t) = exp " ! p(s)ds $ where we
# t %

ignore the constant of integration; then

1 "
µ (s)q(s)ds %'
t
y= $
µ (t) #
y0 + !t 0 &
(5.37)

Proof. We have already demonstrated existence by deriving the solution. To prove

uniqueness, we observe that the differential equation can be written in the form

y! = f (t, y) where f (t, y) = q(t) ! p(t)y . Then

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.6
f (t, y1 ) ! f (t, y2 ) = q(t) ! p(t)y1 ! q(t) + p(t)y2
= p(t) y1 ! y2 (5.38)
< M y1 ! y2

where M = sup N p(t) . Hence f is Lipshitz and the solution is unique. 

Example 4. Solve the initial value problem y! " 2y = e7t , y(0) = 1

t
An integrating factor is µ = exp " (!2)dt = e!2t . From equation (5.36)B
0

# t !2s 7s & # 1 5s t & 2t # 4 1 5t &


y = e 1 + " e e ds = e %1 + e
2t 2t
(=e % + e (  (5.39)
%$ (
' $5 5 '
0
%$ 5 0('

Bernoulli Equations

These equations are similar in form to equation (5.1), although they are not linear, and

have the form

y! + p(t)y = y n q(t) (5.40)

Were it not for the factor of y n equation (5.40) would be linear, and in fact it is linear if

n = 0 or n = 1 . For any other value of n, Bernoulli equations can be made linear by

making the substitution

z = y1! n (5.41)

Differentiating,

z! = (1 " n)y "n y ! (5.42)

where z! = dz / dt , and therefore

1 n
y! = y z! (5.43)
1"n

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.7
Substituting (5.43) into (5.40) gives

1 n
y z" + p(t)y = y n q(t) (5.44)
1! n

Dividing through by y n and using (5.41)

1
z" + p(t)z = q(t) (5.45)
1! n

which is linear in the variable z, and in standard from becomes

z! + (1 " n)p(t)z = (1 " n)q(t) (5.46)

Example 5. Solve y! + ty = t / y 3 , y(1) = 2

This is a Bernoulli equation with n = -3, so we let

z = y1! n = y1!(!3) = y 4 (5.47)

The initial condition is z(1) = [y(1)]4 = 2 4 = 16 . Differentiating (5.47),

z! = 4y3 y! (5.48)

Substituting (5.48) into the original differential equation gives

z! t
3
+ ty = (5.49)
4y y3

Multiplying through by 4y 3 ,

z! + 4tz = 4t (5.50)

An integrating factor is µ = e !
4t 2
= e2t . Multiplying equation (5.50) through by µ and

rearranging,

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.8
d ! 2t 2 #
= e2t ( z% + 4tz ) = 4te2t
2 2
ze (5.51)
dt " $

Integrating,

!t
2 2 2
ze2t = 4se2s ds = e2t + C (5.52)

From the initial condition z(1) = 16 , we find that C = 15e2 , so that

2
z = 1 + 15e2!2t (5.53)

and hence

( )
2 1/4
y = z1/4 = 1 + 15e2!2t  (5.54)

Exercises

sin t C ! cost
(1) t 2 y! + 3ty = , t <0 ans: y =
t t3
et (t ! 1) + C
(2) ty! + 2y = et , t > 0 ans: y =
t2
2 cost sin t
(3) y! + y = 2 , y(" ) = 0, t > 0 ans: y =
t t t2
(4) y! + 4t 3 y = t 3 ,!!y(0) = 1

(5) y! + y = sin t,!!y(" ) = 1

dy 1
(6) y(1) = ! / 2 + y = et y(a) = ya
dt t

n
(7) y! + y = At " n ,
t
5Ct
(8) t 2 y! + 2ty " y 3 = 0 ans: y = ±
2C 2 ! t 5

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.9
3 139t 18 ! 3t
(9) y! " y = 4y "5 ,!!y(1) = 2 ans: y = 2 6
t 17

(10) y! = t 2 y 2 " 4t 2 , !!y ( 3


)
3/ 4 = 2
1+ e
1" e
ans: y = !2 coth(2t 3 / 3)

dy 1
(11) = y ans: y = ln !t ± t 2 + C #
dt e ! t " $

ecos y
(12) y! = cos y
te sin y + y

(13) Ricatti's equation is y! = p(t) + q(t)y + r(t)y 2 . Suppose that we already know one
particular solution u(t).
(a) Show that a more general solution is given by
1
v(t)= u(t) +
w(t)
for some function w(t).
(b) Show that w!(t) = "[q(t) + 2r(t)u(t)]w(t) " r(t)

Historical Notes
Jacob (Jacques) Bernoulli (1654-1705) was the first member of the great Bernoulli family to study mathematics
(including his nephew Nicolaus (1662-1716), his brother Johann (1667-1748), Johann’s sons Nicolaus (1695-1726),
Daniel (1700-1782) and Johann II (1710-1790) and Johann II’s sons Johann III (1744-1807) and Jacob II (1759-1789)
was born into an influential Swiss family; his father ran a lucrative spice business, was a magistrate and member of the
Basel town council, and his mother came from a family of bankers. He attended the University of Basel, receiving a
master’s degree in philosophy (1671) and a licentiate in theology (1676). He traveled as a tutor, first in Geneva and
later in France, studying with the leading mathematicians of Europe including Boyle and Hooke, finally returning to
teach mechanics at the University of Basel in 1683. He married Judith Stupanus the following year and eventually had
two children, neither of whom studied mathematics. Bernoulli was appointed professor of mathematics in 1687. His
younger brother Johann also began to study mathematics at about this time. Johann was jealous of his brother and
become one of his greatest critics, eventually being dismissed from the University and leading to a total breakdown in
sibling relations by 1697. Jacob Bernoulli’s contributions to mathematics include a study of logic and algebra (1685);
probability (1685); geometry (1687); several works on infinite series (1682-1704); and the law of large numbers
(1689). He showed that the isochrone (a curve of constant rate of descent in a gravitational field) can be solved with a
first-order nonlinear differential equation (1689); developed the technique of separation of variables and used the word
“integral” in calculus for the first time (1690); a studied the solution of the Bernoulli Differential Equation (1696);
properties of curves including parabolas, epicycloids, evolutes, and spirals and lemniscates (1692-1694); found a
method to keep a drawbridge balanced (1695); and probability and games of chance (published posthumously, 1713).

© 2005 BE Shapiro [Math 351 Spring 2005 revised 3/25/05] Page 5.10

You might also like