You are on page 1of 51

MATH1.

3 CALCULUS II - AY2020/21
Chapter 4: Second-order Differential Equations

MATH1.3 CALCULUS II - AY2020/21 1 / 51


Outline

1 Reduction to first-order differential equations

2 Homogeneous Linear Diff. Equ. with Constant Coefficients

3 Non-homogeneous Linear Differential Equations

MATH1.3 CALCULUS II - AY2020/21 2 / 51


Outline

1 Reduction to first-order differential equations

2 Homogeneous Linear Diff. Equ. with Constant Coefficients

3 Non-homogeneous Linear Differential Equations

MATH1.3 CALCULUS II - AY2020/21 3 / 51


1. Reduction to first-order d.e.

Some type of second-order differential equations can be reduced to a


first-order differential equations by a suitable change of variable.
00
For a typical second-order d.e. involving x, y , y 0 , and y , we keep in
mind that x is an independent variable and y is a dependent variable.

We discuss two forms of these d.e.:


y is missing,
x is missing.

MATH1.3 CALCULUS II - AY2020/21 4 / 51


• Case 1: Missing dependent variable y
Suppose y is missing from the differential equation (that is, there is no
y ). Then it can be written in the form

d 2y
 
dy
= F x, ,
dx 2 dx

where F is a known function

Theorem (1 - Solution technique.)


We can do the following steps:
dy d 2y dz
1 Let z = . Then = , and solve the equation
dx dx 2 dx
dz
= F (x, z) for z in terms of x.
dx
dy
2 Solve the equation = z for y as a function of x.
dx
MATH1.3 CALCULUS II - AY2020/21 5 / 51
Example (2.)
Find the general solution to

d 2y
 
1 dy 2
= + x cos x , x > 0.
dx 2 x dx

Solution. This is a second-order d.e. in which y is missing.


dy dz d 2y
First, let z = , a function of x. Then = , and we have
dx dx dx 2
dz 1
= (z + x 2 cos x) x > 0.
dx x

This is a linear first-order d.e. in the standard form


dz 1
− z = x cos x,
dx x
R 1 1
which has an integrating factor I = e− x
dx
= e− ln x = .
x
MATH1.3 CALCULUS II - AY2020/21 6 / 51
Example 2 (cont.)

Hence,
 
d 1 1
z = cos x =⇒ z = sin x + C =⇒ z = x sin x + Cx.
dx x x

Next, from
dy
= x sin x + Cx
dx
it follows that
y = −x cos x + sin x + C1 x 2 + C2 ,

where C1 , C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 7 / 51


• Case 2: Missing independent variable x

Suppose x is missing from the differential equation (that is, there is no


x). Then it can be written in the form

d 2y
 
dy
= F y , .
dx 2 dx

dy
As in the previous case, let z = , by the chain rule
dx
d 2y dz dz dy dz
= = = z.
dx 2 dx dy dx dy

dy d 2y
Substituting for and into the given d.e. yields the following
dx dx 2
solution technique.

MATH1.3 CALCULUS II - AY2020/21 8 / 51


Theorem (3 - Solution technique.)
We can do the following steps:
dy d 2y dz
1 Let z = . Then 2
= z , and solve the equation
dx dx dy
dz
z = F (y , z) for z in terms of y .
dy
dy
2 Solve the equation = z for y as a function of x.
dx

MATH1.3 CALCULUS II - AY2020/21 9 / 51


Example (4.)
Find the general solution to
2
d 2y

2 dy
=− .
dx 2 1−y dx

Solution. This is a second-order d.e. in which x is missing.


dy d 2y dz
First, let z = . Then 2
= z , and we have.
dx dx dy

dz 2
z =− z 2.
dy 1−y

We solve z in terms of y .

MATH1.3 CALCULUS II - AY2020/21 10 / 51


Example 4 (cont.)
For this equation
dz 2
z =− z 2, (∗)
dy 1−y
if separate the variables, we have to assume that z 6= 0. So we
consider two cases.

Case 1: z = 0.
dy
This is a solution of (∗), which gives = 0, and hence y = C (6= 1) is
dx
a solution of the given differential equation.

Case 2: z 6= 0.
In this case, y is non-constant, and hence equation (∗) becomes a
separable d.e.
1 2
dz = − dy .
z 1−y
MATH1.3 CALCULUS II - AY2020/21 11 / 51
Example 4 (cont.)

Integrating both sides


Z Z
1 2
dz = − dy ,
z 1−y

we obtain
ln |z| = 2 ln |1 − y | + C = ln(1 − y )2 + C.

From this, it follows that


2 2
|z| = eC+ln(1−y ) = eC · eln(1−y ) = eC (1 − y )2 ,

which gives
z = C1 (1 − y )2 ,

where C1 = ±eC 6= 0 is an arbitrary constant.


MATH1.3 CALCULUS II - AY2020/21 12 / 51
Example 4 (cont.)

Thus we have
dy
= C1 (1 − y )2 .
dx
Note that y 6= 1, and separating variables, we get

1
dy = C1 dx,
(1 − y )2

which after integrating both sides yields

1
= C1 x + C2 ,
1−y

where C1 6= 0 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 13 / 51


Example 4 (cont.)

The last equation is equivalent to or

C1 x + (C2 − 1)
y= , (C1 6= 0).
C1 x + C2

Note. When C1 = 0, the above solution becomes


C2 − 1 1
y= =1− 6= 1, which is the constant solution obtained
C2 C2
from the case z = 0.

Therefore the required general solution can be written as follows

C1 x + (C2 − 1)
y= ,
C1 x + C2

where C1 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 14 / 51


Outline

1 Reduction to first-order differential equations

2 Homogeneous Linear Diff. Equ. with Constant Coefficients

3 Non-homogeneous Linear Differential Equations

MATH1.3 CALCULUS II - AY2020/21 15 / 51


2. Homogeneous Linear Diff. Equ. with Constant
Coefficients

The second-order linear differential equations have important


applications, especially in mechanical and electrical engineering.

First we consider the following type of second-order linear differential


equations
00
ay + by 0 + cy = 0, a 6= 0,
00
where the coefficients (of y , y 0 , and y ) are real constants a, b and c.

This type of differential equations is known a homogeneous linear


differential equations with constant coefficients.

MATH1.3 CALCULUS II - AY2020/21 16 / 51


Example (1.)
00
1 y − y 0 − 2y = 0
00
2 4y − y 0 = 0
00
3 3y − 27y = 0
00
4 y + 9y 0 y = 0 (Non-linear)
00
5 y + y2 = 0 (Non-linear)

MATH1.3 CALCULUS II - AY2020/21 17 / 51


• Application 1: Vibrating Springs

Consider an object with mass m attached at the end of spring so that


the spring is stretched x units from its natural length.

• By Hooke’s law, the restoring force is −kx, with k > 0.

• By Newton’s Law, we have

d 2x d 2x
m = −kx ⇐⇒ m + kx = 0
dt 2 dt 2
(simple harmonic motion).

MATH1.3 CALCULUS II - AY2020/21 18 / 51


Vibrating Springs (cont.)

dx
• (Damped Vibration) Suppose there is a damping force, −c , which
dt
is proportional to the velocity of the mass and acts in the opposite
direction.
We have
d 2x dx d 2x dx
m 2
= −c − kx ⇐⇒ m 2
+c + kx = 0.
dt dt dt dt

• (Forced Vibration) Furthermore, if there is an external force F (t),


then we have
d 2x dx
m 2 +c + kx = F (t).
dt dt

MATH1.3 CALCULUS II - AY2020/21 19 / 51


• Application 2: Electric Circuits
Consider a circuit which contains a resistor R, an inductor L, a
capacitor C, and an electromotive force F in series.
Let Q be the charge on the capacitor at time t. Then the current I is
the rate of change of Q with respect to t, dQ
dt = I.
Voltage drops across the resistor, inductor and capacitor are
respectively,

dQ dI d 2Q Q 1
RI = R , L =L 2 , and = Q.
dt dt dt C C
• Kirchhoff’s voltage law says that the sum of these voltage drops is
equal to the supplied voltage:

d 2Q dQ 1
L 2
+R + Q = F (t).
dt dt C

MATH1.3 CALCULUS II - AY2020/21 20 / 51


• Second-order linear differential equation
Important Remarks.
For a general second-order linear differential equation
00
a(x)y + b(x)y 0 + c(x)y = F (x),

where a(x), b(x), c(x), and F (x) are functions of a variable x, it is


not easy to find or discover a solution.

However, for a homogeneous second-order linear differential


equation with constant coefficients
00
ay + by 0 + cy = 0, a 6= 0,

where a, b, and c are real constants, there is a systematic way to


solve it.
MATH1.3 CALCULUS II - AY2020/21 21 / 51
Consider a homogeneous linear differential equation of order 2 with
constant coefficients of the standard form
00
y + ay 0 + by = 0,

where a, b are constants.

The solution technique for solving this equation consists of the


following steps.

Step 1. Define the quadratic equation

P(t) = t 2 + at + b = 0,

which is called the characteristic equation of the given


homogeneous differential equation.

MATH1.3 CALCULUS II - AY2020/21 22 / 51


Step 2. Compute the roots of this quadratic equation

−a ± a2 − 4b
t1,2 = .
2

There are three possibilities for the roots, depending on the sign of the
discriminant ∆ = a2 − 4b:

1) If ∆ > 0, then P(t) has two distinct real roots.


2) If ∆ = 0, then P(t) has a real double root.
3) If ∆ < 0, then P(t) has two complex conjugate roots.

MATH1.3 CALCULUS II - AY2020/21 23 / 51


• Case 1: t1 6= t2 , distinct real roots
In this case, the corresponding general solution is

yh (x) = C1 et1 x + C2 et2 x ,

where C1 and C2 are arbitrary constants.


Example (2.)
Determine the general solution to
00
y − y 0 − 2y = 0.

Solution. We have P(t) = t 2 − t − 2 = 0 =⇒ t1 = 2, t2 = −1.


Then the general solution to the differential equation is

yh (x) = C1 e−x + C2 e2x ,

where C1 and C2 are arbitrary constants.


MATH1.3 CALCULUS II - AY2020/21 24 / 51
• Case 2: t1 = t2 := t0 , a real double root
In this case, the corresponding general solution is

yh (x) = C1 et0 x + C2 xet0 x ,


a
where C1 and C2 are arbitrary constants (here t0 = − .)
2
Example (3.)
Determine the general solution to
00
y + 4y 0 + 4y = 0.

Solution. We have P(t) = t 2 + 4t + 4 = 0 =⇒ t1 = t2 = −2.


Then the general solution to the differential equation is

yh (x) = C1 e−2x + C2 xe−2x ,

where C1 and C2 are arbitrary constants.


MATH1.3 CALCULUS II - AY2020/21 25 / 51
• Case 3: t1,2 = α ± iω, two complex conjugate roots
In this case, the corresponding general solution is

yh (x) = C1 eαx cos ωx + C2 eαx sin ωx,



a −∆
where C1 and C2 are arbitrary constants (here α = − , ω = .)
2 2
Example (4.)
Determine the general solution to

y 00 + 6y 0 + 25y = 0.

Solution. We have P(t) = t 2 + 6t + 25 = 0 =⇒ t1,2 = −3 ± 4i.


Then the general solution to the differential equation is

yh (x) = C1 e−3x cos 4x + C2 e−3x sin 4x,

where C1 and C2 are arbitrary constants.


MATH1.3 CALCULUS II - AY2020/21 26 / 51
Outline

1 Reduction to first-order differential equations

2 Homogeneous Linear Diff. Equ. with Constant Coefficients

3 Non-homogeneous Linear Differential Equations

MATH1.3 CALCULUS II - AY2020/21 27 / 51


3. Non-homogeneous Linear Differential Equations
Consider a non-homogeneous linear differential equation with constant
coefficients
ay 00 + by 0 + cy = F (x), x ∈ I, (∗)

where F (x) is defined and not identically zero on the interval I.

Definition (1.)
The associated homogeneous equation to the non-homogeneous
equation (∗) is the equation

ay 00 + by 0 + cy = 0. (∗∗)

The following result gives a relationship between solutions of


non-homogeneous linear differential equation (∗) and its associated
homogeneous equation (∗∗).
MATH1.3 CALCULUS II - AY2020/21 28 / 51
• Main result

Theorem (2.)
Consider a non-homogeneous equation

ay 00 + by 0 + cy = F (x) (∗)

and it associated homogeneous equation

ay 00 + by 0 + cy = 0. (∗∗)

If yh (x) is the general solution to (∗∗), and yp (x) a particular solution to


(∗), then the general solution to (∗) on I is of the form

y (x) = yh (x) + yp (x).

MATH1.3 CALCULUS II - AY2020/21 29 / 51


• How to find a particular solution

We have learnt how to solve the associated homogeneous differential


equation (∗∗). So it remains to find just particular solution yp (x) to the
non-homogeneous (∗).

We study the technique for obtaining such a particular solution yp to


the equation (∗) when F (x) is one of the following forms:

F (x) F 0 (x)
power of x n nx n−1
eαx αeαx
a sin Ax + b cos Ax aA cos Ax − bA sin Ax

or sums or products of such functions.

The reason is these functions have derivatives similar to F (x) itself.


MATH1.3 CALCULUS II - AY2020/21 30 / 51
• Method of Undetermined Coefficients

The solution technique can be introduced quite simply as follows:


choose a form for yp similar to F (x), but with unknown coefficients.

These coefficients will be determined by substituting that yp into the


given equation. That is why this is called the method of undetermined
coefficients.

MATH1.3 CALCULUS II - AY2020/21 31 / 51


• Case 1: F (x) does not contain a solution of ay 00 + by 0 + cy = 0.

Choose a form for yp similar to F (x).

We have the following technique.

Given F (x) Propose yp (x)


a0 + a1 x + · · · + ak xk A0 + A1 x + · · · + Ak x k
aeαx Aeαx
a sin ωx + b cos ωx A sin ωx + B cos ωx

In case F (x) is a sum or a product of above functions, then choose


yp (x) as a sum or product of corresponding functions.

MATH1.3 CALCULUS II - AY2020/21 32 / 51


Example (3.)
Solve the non-homogeneous d.e.

y 00 − y 0 − 2y = 10 sin x.

Solution. First, consider the associated homogeneous equation:


y 00 − y 0 − 2y = 0, whose the characteristic equation is

λ2 − λ − 20 = 0 ⇐⇒ λ1 = 2, λ2 = −1.

Then we have the general solution

yh = C1 e2x + C2 e−x ,

where C1 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 33 / 51


Example 3 (cont.)

Next we proceed to find a particular solution yp of

y 00 − y 0 − 2y = 10 sin x.

Since F (x) = 10 sin x, we choose

yp (x) = A sin x + B cos x,


0 00
and substitute yp , yp and yp into the given d.e. to solve for A and B.

MATH1.3 CALCULUS II - AY2020/21 34 / 51


Example 3 (cont.)

00 0
We have yp − yp − 2yp = 10 sin x which gives

(−A sin x −B cos x)−(A cos x −B sin x)−2(A sin x +B cos x) = 10 sin x.

Grouping terms involving cos Ax and sin Ax, we have

(−3A + B) sin x − (A + 3B) cos x = 10 sin x.

This equation is satisfied for all x if and only if



−3A + B = 10
=⇒ A = −3, B = 1.
A + 3B = 0,

MATH1.3 CALCULUS II - AY2020/21 35 / 51


Example 3 (cont.)

Thus a particular solution is

yp (x) = −3 sin x + cos x.

Consequently, the general solution to the given non-homogeneous


linear d.e. is

y (x) = C1 e2x + C2 e−x − 3 sin x + cos x,

where C1 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 36 / 51


• Case 2: F (x) contains a solution of ay 00 + by 0 + cy = 0.

Suppose y0 is a homogeneous solution and F (x) is a homogeneous


solution of the same type as y0 .

Then we choose yp with the same form as y0 but with a multiple of x,


i.e.,
yp = A x · y0 (x).

We have the following technique.

y0 & F (x) yp (x)


a0 + a1 x + · · · + ak x k x A0 + A1 x + · · · + Ak x k


aeαx Axeαx
a sin ωx + b cos ωx x (A sin ωx + B cos ωx)

MATH1.3 CALCULUS II - AY2020/21 37 / 51


Example (4 - Different F (x)’s.)
Solve the non-homogeneous d.e.
(a)
y 00 − y 0 − 2y = x 2 .

(b)
y 00 − y 0 − 2y = 3e2x .

(c)
y 00 − y 0 − 2y = x 2 + sin x.

Note. The general solution for y 00 − y 0 − 2y = 0 is yh = C1 e2x + C2 e−x


with arbitrary constants C1 , C2 .

MATH1.3 CALCULUS II - AY2020/21 38 / 51


Solution. The general solution for the associated homogeneous
equation has been given above.

Now we find a particular solution to the non-homogeneous equations.


What is a choice of yp ?

(a) F (x) = x 2 .

=⇒ Answer: We choose yp = A + Bx + Cx 2 .

(b) F (x) = 3e2x .

=⇒ Answer: Note that e2x is a solution to the homogeneous d.e.,


and hence we choose yp = Axe2x .

(c) F (x) = x 2 + sin x.

=⇒ Answer: We choose yp = A + Bx + Cx 2 + D sin x + E cos x.

MATH1.3 CALCULUS II - AY2020/21 39 / 51


Example (5.)
Solve
y 00 − 4y 0 + 4y = e2x .

Solution. First consider the associated homogeneous d.e.

y 00 − 4y 0 + 4y = 0.

Characteristic equation: λ2 − 4λ + 4 = 0 ⇐⇒ λ1,2 = 2.

General solution to homogeneous d.e.:

yh = C1 e2x + C2 xe2x .

MATH1.3 CALCULUS II - AY2020/21 40 / 51


Example 5 (cont.)
We note that F (x) = e2x , while both e2x and xe2x are solutions of the
associated homogeneous d.e. Therefore, to find a particular solution to
the non-homogeneous equation, we choose

yp = Ax 2 e2x .

We have to determine the value of A.

Substituting

yp = Ax 2 e2x , yp0 = 2A(x + x 2 )e2x , yp00 = 2A(1 + 4x + 2x 2 )e2x

to the given equations y 00 − 4y 0 + 4y = e2x , we obtain

2A(1 + 4x + 2x 2 )e2x − 4 2A(x + x 2 )e2x + 4Ax 2 e2x = e2x ,




MATH1.3 CALCULUS II - AY2020/21 41 / 51


Example 5 (cont.)

1
which gives, 2Ae2x = e2x , i.e, A = .
2
Thus we have
1 2 2x
yp = x e .
2
Finally, the general solution to the given non-homogeneous d.e. is

1
y = C1 e2x + C2 xe2x + x 2 e2x ,
| {z } 2
y h
| {z }
yp

where C1 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 42 / 51


• Method of Variation-of-Parameters

The aim of this section is to determine particular solutions to


non-homogeneous differential equations, provided that the general
solution to the associated homogeneous differential equation is known.

This variation-of-parameters method is not restricted to differential


equations with constant coefficients.

MATH1.3 CALCULUS II - AY2020/21 43 / 51


Suppose the general solution to the associated homogeneous
differential equation is

yh = C1 y1 (x) + C2 y2 (x).

For the variation-of-parameters method, we replace the constants C1


and C2 by functions C1 (x) and C2 (x). (That is, we allow the
parameters C1 , C2 to vary.)

We determine C1 (x) and C2 (x) so that

yp = C1 (x)y1 (x) + C2 (x)y2 (x)

is a particular solution to the given equation.

MATH1.3 CALCULUS II - AY2020/21 44 / 51


• Solution technique for variation-of-parameters

Theorem (6.)
Consider a differential equation y 00 + ay 0 + by = F , where a,b are
constants, and F is continuous on an interval I.

Suppose the general solution to the associated homogeneous


differential equation is yh = C1 y1 (x) + C2 y2 (x), where C1 and C2 are
arbitrary constants.

Then a particular solution to the given non-homogeneous equation is

yp (x) = C1 (x)y1 (x) + C2 (x)y2 (x),



y C 0 + y C 0 = 0,
1 1 2 2
where C1 (x) and C2 (x) satisfy
y 0 C 0 + y 0 C 0 = F .
1 1 2 2

MATH1.3 CALCULUS II - AY2020/21 45 / 51


• How to find C1 (x) and C2 (x)?

The system 
y C 0 + y C 0 = 0,
1 1 2 2
y 0 C 0 + y 0 C 0 = F ,
1 1 2 2

can be considered as a linear system of two equations with unknown


C10 and C20 .

Solving this system, we get C10 (x) and C20 (x). Then integrating the
formulas of these functions, we obtain C1 (x) and C2 (x).

In general, there are many solutions for C1 and C2 . However, we only


have to find one such pair.

MATH1.3 CALCULUS II - AY2020/21 46 / 51


Example (7.)
Solve y 00 + y = sec x.

Solution. The associated homogeneous d.e.

y 00 + y = 0

has the characteristic equation

λ2 + 1 = 0 ⇐⇒ λ1,2 = ±i.

So the general solution to the homogeneous equation is

yh = C1 cos x + C2 sin x,

where C1 and C2 are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 47 / 51


Example 7 (cont.)

We find a particular solution to the given non-homogeneous d.e. in the


form
yp = C1 (x)y1 + C2 (x)y2 = C1 (x) cos x + C2 (x) sin x,

where C1 and C2 satisfy



cos x C 0 + sin x C 0 = 0,
1 2
− sin x C 0 + cos x C 0 = sec x.
1 2

MATH1.3 CALCULUS II - AY2020/21 48 / 51


Example 7 (cont.)

1
Note that sec x = . Solving the linear system of two equations,
cos x
we get
sin x
C10 = − and C20 = 1.
cos x
Integrating w.r.t. x, we obtain
Z
sin x
C1 = − dx = ln | cos x|
cos x
and
C2 = x.

Here we have set the integration constants to zero, since we require


only one particular solution.

MATH1.3 CALCULUS II - AY2020/21 49 / 51


Thus
yp = cos x ln | cos x| + x sin x.

Therefore, the general solution to the given differential equation is

y (x) = α cos x + β sin x + cos x ln | cos x| + x sin x,

where α and β are arbitrary constants.

MATH1.3 CALCULUS II - AY2020/21 50 / 51


END OF CHAPTER 4

MATH1.3 CALCULUS II - AY2020/21 51 / 51

You might also like