Lecture 6
Lecture 6
page 1/31
Outline
page 1/31
Introduction
page 2/31
Introduction
dy(t)
+ ay(t) = f (t)
dt
d2 y(t) dy(t)
2
+ a1 + a0 y(t) = f (t)
dt dt
• First-order linear ODEs has already been discussed in the last lecture.
• We mainly focus on second-order linear ODEs in this lecture.
page 3/31
1. Second-order homogeneous ODEs
For a 2nd-order linear ODE:
d2 y(t) dy(t)
+ a1 + a0 y(t) = f (t)
dt2 dt
If f (t) = 0, then the ODE
d2 y(t) dy(t)
2
+ a1 + a0 y(t) = 0,
dt dt
is called homogeneous.
page 4/31
1. Second-order homogeneous ODEs
d2 ert dert
+ a 1 + a0 ert = (r2 + a1 r + a0 )ert .
dt2 dt
This implies that y(t) = ert is a solution of the homogeneous ODE if and
only if r2 + a1 r + a0 = 0. This is called characteristic equation of the ODE.
page 5/31
1. Second-order homogeneous ODEs
page 6/31
1. Second-order homogeneous ODEs
Example
d2 y
Find the general solution of the equation 4 − y = 0.
dt2
Solution: The characteristic equation of this ODE is 4r2 − 1 = 0, which
has two different roots
1
r=± .
2
Therefore, the general solution is given by
1 1
y(t) = c1 e 2 t + c2 e− 2 t .
page 7/31
1. Second-order homogeneous ODEs
Example
d2 y dy
Find the general solution of the equation + − 6y = 0.
dt2 dt
Solution: The characteristic equation of this ODE is r2 + r − 6 = 0.
r2 + r − 6 = 0 =⇒ (r − 2)(r + 3) = 0
page 8/31
1. Second-order homogeneous ODEs
Case 2: the two roots of equation r2 + a1 r + a0 = 0 are the same, namely,
r1 = r2 .
y1 (t) = er1 t .
y2 (t) = ter1 t .
page 9/31
1. Second-order homogene ous ODEs
In fact, the r2 + a1 r + a0 = 0 has a double root r1 = r2 means that
r2 + a1 r + a0 = (r − r1 )2 .
Differentiating this equation yields 2r + a1 = 2(r − r1 ), which implies that
2r1 + a1 = 0.
Consequently,
d2 (ter1 t ) d(ter1 t )
+ a1 + a0 ter1 t
dt2 dt
d
= (er1 t + r1 ter1 t ) + a1 (er1 t + r1 ter1 t ) + a0 ter1 t
dt
= r1 er1 t + r1 er1 t + r12 ter1 t + a1 (er1 t + r1 ter1 t ) + a0 ter1 t
= (2r1 + a1 )er1 t + (r2 + a1 r + a0 )tert
=0
Therefore, in Case 2 (r1 = r2 ), the general solution of the homogeneous ODE is
y(t) = c1 er1 t + c2 ter1 t .
page 10/31
1. Second-order homogeneous ODEs
Example
d2 y dy
Find the general solution of the equation 4 2
+ 12 + 9y = 0.
dt dt
9
Solution: The characteristic equation is r2 + 3r + = 0, which has a
4
double root
3
r1 = r2 = .
2
Therefore, the general solution is given by
3 3
y(t) = c1 e 2 t + c2 te 2 t .
page 11/31
1. Second-order homogeneous ODEs
Case 3: equation r2 + a1 r + a0 = 0 has two different complex roots
r1 = a + ib and r2 = a − ib.
Example
d2 y
Find the general solution of the equation + 4y = 0.
dt2
Solution: The characteristic equation is r2 + 4 = 0, which has two different
complex solutions
r = ±2i.
Therefore, the general solution is given by
page 13/31
1. Second-order homogeneous ODEs
Example
d2 y dy
Find the general solution of the equation 2
+6 + 13y = 0.
dt dt
Solution: The characteristic equation is r2 + 6r + 13 = 0, which has two
different complex solutions
r = −3 ± 4i.
page 14/31
2. Second-order inhomogeneous ODEs
page 15/31
2. Second-order inhomogeneous ODEs
where
• yp (t) is one particular solution of the inhomogeneous ODE.
• c1 y1 (t) + c2 y2 (t) is the general solution of the homogeneous ODE.
page 16/31
2. Second-order inhomogeneous ODEs
Example
d2 y
Find the general solution of the equation + 4y = t2 .
dt2
Solution: First, we find a particular solution of the equation.
(Hint: If the right-hand side is a polynomial, then we try to look for a particular
solution of polynomial form: yp (t) = At2 + Bt + C.)
Substituting yp (t) = At2 + Bt + C into the equation yields
2A + 4(At2 + Bt + C) = t2
4At2 + 4Bt + 4C + 2A = t2 ,
4A = 1, 4B = 0, 4C + 2A = 0
1 1
which implies A = , B = 0 and C = − .
4 8
1 2 1
Therefore, particular solution is yp (t) = t − .
4 8
page 17/31
2. Second-order inhomogeneous ODEs
d2 y
Second, find the general solution of the homogeneous ODE + 4y = 0:
dt2
The characteristic equation is r2 + 4r = 0, which has two complex roots
r1 = 2i and r2 = −2i.
c1 cos(2t) + c2 sin(2t)
t2 1
y(t) = − + c1 cos(2t) + c2 sin(2t).
4 8
page 18/31
2. Second-order inhomogeneous ODEs
Example
d2 y dy
Find the general solution of the equation +6 + 13y = t3 .
dt2 dt
Solution: First, find a particular solution of the equation.
Since the right-hand side is a polynomial, we look for a particular solution of
polynomial form: yp (t) = At3 + Bt2 + Ct + D.)
Substituting yp (t) = At3 + Bt2 + Ct + D into the equation yields
6At + 2B + 6(3At2 + 2Bt + C) + 13(At3 + Bt2 + Ct + D) = t3 ,
which reduces to
13At3 + (18A + 13B)t2 + 13(6A + 12B + 13C)t + 2B + 6C + 13D = t3 ,
which implies
1 18 138 360
A= ,B = − ,C = ,D = − .
13 169 2197 28561
page 19/31
2. Second-order inhomogeneous ODEs
We find a particular solution
t3 18t2 138t −360
yp = − + − .
13 169 2197 28561
Example
Find the solution of the second-order differential equation
2
d y − 2 dy + y = t,
dt2 dt
y(0) = 3, y 0 (0) = 0
page 21/31
2. Second-order inhomogeneous ODEs
Example
Find the solution of the second-order differential equation
2
d y − 2 dy + y = t,
dt2 dt
y(0) = 3, y 0 (0) = 0
−2B + A + Bt = t (1)
which implies
−2B + A = 0, B=1
Therefore, A = 2 and B = 1. A particular solution is
yp = 2 + t.
page 22/31
2. Second-order inhomogeneous ODEs
Second, find the general solution of the homogeneous equations by solving the
characteristic equation
r2 − 2r + 1 = 0
This yields two roots r1 = r2 = 1.
Therefore, the general solution of the homogeneous equation is
yh = (c1 + c2 t)et .
The general solution of the inhomogeneous equation is
y = 2 + t + (c1 + c2 t)et .
Finally, to determine the constants c1 and c2 , we substitute the initial condition
into the solution:
c1 + 2 = 3, c1 + c2 + 1 = 0
This implies c1 = 1 and c2 = −2.
Remark
We have considered two simple examples here, where the ODEs possess
particular solutions of polynomial form. However, in general, some more
complicated ODEs do not have particular solutions of polynomial form.
page 24/31
Outcome of this lecture
page 25/31
Exercises
d2 y dy
(a) 3 + − 2y = 0.
dt2 dt
2
Solution: y(t) = c1 e 3 t + c2 e−t .
d2 y
(b) − y = 0.
dt2
page 26/31
Exercises
d2 y
(c) + y = 0.
dt2
Solution: y(t) = c1 cos(t) + c2 sin(t).
d2 y dy
(d) 2
+2 + y = 0.
dt dt
d2 y dy
(e) 2
+2 = 0.
dt dt
page 27/31
Exercises
d2 y dy
(a) 3 + − 2y = t.
dt2 dt
2 1 1
Solution: y(t) = c1 e 3 t + c2 e−t − t − .
2 4
d2 y
(b) − y = t2 − 1.
dt2
page 28/31
Exercises
d2 y
(c) + y = t3 + t.
dt2
d2 y dy
(d) 2
+2 + y = 2t + 3.
dt dt
page 29/31
Exercises
3 Find the solutions of the following ODEs under the given initial
conditions.
d2 y dy
(a) 3 + − 2y = t, under the initial conditions y(0) = 0 and
dt2 dt
dy(0)
= 1.
dt
4 2 21 1 1
Solution: y(t) = − e 3 t + e−t − t − .
5 20 2 4
d2 y
(b) − y = t2 − 1, under the initial conditions y(0) = 1 and
dt2
dy(0)
= 0.
dt
d2 y
(c) + y = t3 + t, under the initial conditions y(0) = 0 and
dt2
dy(0)
= 0.
dt
d2 y dy
(d) 2
+2 + y = 2t + 3, under the initial conditions y(0) = 2
dt dt
dy(0)
and = 0.
dt
page 31/31