0% found this document useful (0 votes)
23 views32 pages

Lecture 6

This lecture focuses on second-order linear ordinary differential equations (ODEs) with constant coefficients, covering both homogeneous and inhomogeneous cases. It explains the characteristic equation, methods for finding solutions, and provides examples for each case. The general solution for inhomogeneous ODEs is derived from a particular solution and the general solution of the corresponding homogeneous equation.

Uploaded by

aagunbb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views32 pages

Lecture 6

This lecture focuses on second-order linear ordinary differential equations (ODEs) with constant coefficients, covering both homogeneous and inhomogeneous cases. It explains the characteristic equation, methods for finding solutions, and provides examples for each case. The general solution for inhomogeneous ODEs is derived from a particular solution and the general solution of the corresponding homogeneous equation.

Uploaded by

aagunbb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Lecture 6: Second-order linear ODEs

with constant coefficients

page 1/31
Outline

1. Second-order homogeneous ODEs

2. Second-order inhomogeneous ODEs

page 1/31
Introduction

In this lecture, we consider k th -order linear ODE with constant coefficients:

dk y(t) dk−1 y(t) dk−2 y(t)


+ ak−1 + a k−2 · · · + a0 y = f (t)
dtk dtk−1 dtk−2
where a0 , a1 , . . . , ak−1 are constants, called coefficients of the equation,
and f (t) is a given function.

page 2/31
Introduction

Example (1st-order linear ODE)

dy(t)
+ ay(t) = f (t)
dt

Example (2nd-order linear ODE)

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.

Basic properties of a homogeneous ODE: if y1 (t) and y2 (t) are two


solution, then their combination y(t) = c1 y1 (t) + c2 y2 (t) is also a solution.

page 4/31
1. Second-order homogeneous ODEs

Consequently, if we can find two independent solutions y1 (t) and y2 (t),


then we immediately get general solution of the homogeneous ODE:

y(t) = c1 y1 (t) + c2 y2 (t),

where c1 and c2 are arbitrary constants.


Find two solutions in the form of ert : substituting y(t) = ert to the
homogeneous ODE yields

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.

To solve r2 + a1 r + a0 = 0, we have to consider three different cases:

page 5/31
1. Second-order homogeneous ODEs

Case 1: Equation r2 + a1 r + a0 = 0 has two different roots r1 and r2 .


In this case, we have two independent solutions of the homogeneous ODE,
namely,
y1 (t) = er1 t and y2 (t) = er2 t .
Then the general solution of the homogenous ODE is given by

y(t) = c1 er1 t + c2 er2 t .

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

which has two different solutions r1 = 2, r2 = −3.


Therefore, the general solution is

y(t) = c1 e2t + c2 e−3t .

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 .

In this case, we get only one solution

y1 (t) = er1 t .

We still need another solution of the homogenous ODE.


We can verify that the other solution is given by

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.

In this case, we have two independent solutions:

y1 (t) = er1 t = e(a+ib)t = eat (cos(bt) + i sin(bt)),


y2 (t) = er2 t = e(a−ib)t = eat (cos(bt) − i sin(bt)).

The general solution is

y(t) = c1 er1 t + c2 er2 t


= c1 eat cos(bt) + ic1 eat sin(bt) + c2 eat cos(bt) − ic2 eat sin(bt)
= (c1 + c2 )eat cos(bt) + i(c1 − c2 )eat sin(bt)
= ĉ1 eat cos(bt) + ĉ2 eat sin(bt),

where ĉ1 and ĉ2 are arbitrary constants.


page 12/31
1. Second-order homogeneous ODEs

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

y(t) = c1 cos(2t) + c2 sin(2t).

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.

Therefore, the general solution is given by

y(t) = c1 e−3t cos(4t) + c2 e−3t sin(4t).

page 14/31
2. Second-order inhomogeneous ODEs

For a 2nd-order linear ODE:


d2 y(t) dy(t)
2
+ a1 + a0 y(t) = f (t)
dt dt
If f (t) 6= 0, then the ODE is called inhomogeneous.

If yp (t) is a solution of the inhomogeneous ODE, i.e.,

d2 yp (t) dyp (t)


2
+ a1 + a0 yp (t) = f (t)
dt dt
then any other solution y(t) satisfies

d2 (y(t) − yp (t)) d(y(t) − yp (t))


+ a1 + a0 (y(t) − yp (t)) = 0.
dt2 dt
In other words, y(t) − yp (t) is the solution of the homogeneous equation.

page 15/31
2. Second-order inhomogeneous ODEs

Since y(t) − yp (t) is the solution of the homogeneous equation, it is given


by
y(t) − yp (t) = c1 y1 (t) + c2 y2 (t),
where two arbitrary constants c1 and c2 .

Consequently, the general solution of the inhomogeneous ODE is

y(t) = yp (t) + c1 y1 (t) + c2 y2 (t).

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.

Therefore, the general solution of the homogeneous ODE is

c1 cos(2t) + c2 sin(2t)

Finally, the general solution of the inhomogeneous ODE is

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

Second, find the general solution of the homogeneous equation.


The characteristic equation is r2 + 6r + 13 = 0, which has two complex
roots
r1 = −3 + 4i and r2 = −3 − 4i.
Therefore, the general solution of the homogeneous equation is

c1 e−3t cos(4t) + c2 e−3t sin(4t).

Finally, the general solution of the inhomogeneous equation is


t3 18t2 138t 360
y= − + − + c1 e−3t cos(4t) + c2 e−3t sin(4t).
13 169 2197 28561
page 20/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

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

Solution: First, find a particular solution yp = A + Bt of the equation.


Substituting yp = A + Bt into the equation yields

−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.

Therefore, the solution is


y = 2 + t + (1 − 2t)et .
page 23/31
2. Second-order inhomogeneous ODEs

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

1 Find general solutions of second-order homogeneous ODEs

2 Find general solutions of simple second-order inhomogeneous ODEs

3 Given initial conditions, determine the solutions of second-order ODEs


uniquely.

page 25/31
Exercises

1 Find the general solutions of the following ODEs.

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

Solution: y(t) = c1 et + c2 e−t .

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

Solution: y(t) = (c1 + c2 t)e−t .

d2 y dy
(e) 2
+2 = 0.
dt dt

Solution: y(t) = c1 + c2 e−2t .

page 27/31
Exercises

2 Find the general solutions of the following ODEs.

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

Solution: y(t) = c1 et + c2 e−t − t2 − 1.

page 28/31
Exercises

d2 y
(c) + y = t3 + t.
dt2

Solution: y(t) = c1 cos(t) + c2 sin(t) + t3 − 5t.

d2 y dy
(d) 2
+2 + y = 2t + 3.
dt dt

Solution: y(t) = (c1 + c2 t)e−t + 2t − 1.

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

Solution: y(t) = et + e−t − t2 − 1.


page 30/31
Exercises

d2 y
(c) + y = t3 + t, under the initial conditions y(0) = 0 and
dt2
dy(0)
= 0.
dt

Solution: y(t) = 5 sin(t) + t3 − 5t.

d2 y dy
(d) 2
+2 + y = 2t + 3, under the initial conditions y(0) = 2
dt dt
dy(0)
and = 0.
dt

Solution: y(t) = (3 + t)e−t + 2t − 1.

page 31/31

You might also like