Introduction to Differential Equations - Ryan Lok-Wing Pang

41
Introduction to Differential Equations Ryan Lok-Wing Pang [email protected] August 1, 2014

description

This book gives an introduction to Differential Equations. Topic includes first and second order differential equations, initial value problems, series solutions, Laplace transform, numerical methods, boundary value problems, eigenvalues and eigenfunctions, etc.

Transcript of Introduction to Differential Equations - Ryan Lok-Wing Pang

Page 1: Introduction to Differential Equations - Ryan Lok-Wing Pang

Introduction to Differential Equations

Ryan Lok-Wing [email protected]

August 1, 2014

Page 2: Introduction to Differential Equations - Ryan Lok-Wing Pang

2

Page 3: Introduction to Differential Equations - Ryan Lok-Wing Pang

Contents

1 First-Order Differential Equations 51.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 First Order Ordinary Differential Equations . . . . . . . . . . . . 5

1.2.1 1st Order Linear ODEs . . . . . . . . . . . . . . . . . . . 51.2.2 1st Order Separable Equations . . . . . . . . . . . . . . . 61.2.3 1st Order Homogeneous Equations . . . . . . . . . . . . . 71.2.4 1st Order Exact Equations . . . . . . . . . . . . . . . . . 8

1.3 Existence and Uniqueness of Solutions . . . . . . . . . . . . . . . 101.4 Modeling with first-order ODEs . . . . . . . . . . . . . . . . . . . 121.5 Introduction to Numerical Methods . . . . . . . . . . . . . . . . . 13

1.5.1 Euler Method . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Second-Order Linear Ordinary Differential Equations 152.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2 General Solution of a Homogeneous Linear 2nd-Order ODE . . . 162.3 High Order ODEs with Constant Coefficients . . . . . . . . . . . 162.4 Reduction of Order . . . . . . . . . . . . . . . . . . . . . . . . . . 172.5 Nonhomogeneous Equations . . . . . . . . . . . . . . . . . . . . . 172.6 Method of Undetermined Coefficients . . . . . . . . . . . . . . . . 182.7 Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . 192.8 Mechanical Vibrations . . . . . . . . . . . . . . . . . . . . . . . . 20

2.8.1 Free Undamped Oscillation . . . . . . . . . . . . . . . . . 212.8.2 Free Damped Oscillation . . . . . . . . . . . . . . . . . . . 222.8.3 Forced Undamped Oscillation . . . . . . . . . . . . . . . . 222.8.4 Forced Damped Oscillation . . . . . . . . . . . . . . . . . 23

3 Series Solutions for Second-Order Linear Equations 253.1 Series Solutions for Linear ODEs . . . . . . . . . . . . . . . . . . 253.2 Ordinary and Singular Points of an ODE . . . . . . . . . . . . . 263.3 Series Solution about an Ordinary Point . . . . . . . . . . . . . . 263.4 Series Solution about a Regular Singular Point . . . . . . . . . . 27

3.4.1 Euler Equations . . . . . . . . . . . . . . . . . . . . . . . 273.4.2 The Method of Frobenius . . . . . . . . . . . . . . . . . . 28

4 Laplace Transform 314.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.2 Laplace Transform of Elementary Functions . . . . . . . . . . . . 314.3 Laplace Transform of Derivatives . . . . . . . . . . . . . . . . . . 32

3

Page 4: Introduction to Differential Equations - Ryan Lok-Wing Pang

4 CONTENTS

4.4 Inverse Laplace Transform . . . . . . . . . . . . . . . . . . . . . . 324.5 Solving Initial Value Problem by Laplace Transform . . . . . . . 334.6 Unit Step Function . . . . . . . . . . . . . . . . . . . . . . . . . . 334.7 Initial Value Problems with Discontinuous Functions . . . . . . . 344.8 Impulse Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 354.9 Convolution Integral . . . . . . . . . . . . . . . . . . . . . . . . . 36

5 Systems of First-Order ODEs 375.1 System of Differential Equations . . . . . . . . . . . . . . . . . . 375.2 Solution of a General First-Order System . . . . . . . . . . . . . 375.3 Homogeneous System of 1st-Order Linear ODEs with Constant

Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.4 Non-Homogeneous System . . . . . . . . . . . . . . . . . . . . . . 39

5.4.1 Diagonalization . . . . . . . . . . . . . . . . . . . . . . . . 395.4.2 Variation of Parameter . . . . . . . . . . . . . . . . . . . . 39

Page 5: Introduction to Differential Equations - Ryan Lok-Wing Pang

Chapter 1

First-Order DifferentialEquations

1.1 Preliminaries

An Ordinary Differential Equation (ODE) is an equation involving single vari-able deriatives only.

Defintion 1.1.1 (Order). The order of an ODE is the highest derivative appearsin the ODE.

Example 1.1.2. ty′′′ + 2ty2 + et = 1 is an ODE of order 3.

The general form of an ODE is F (y(n), y(n−1), · · · , y, t) = 0, y = y(t). AnODE is called linear if the coefficients of y(n), · · · , y′, y are not functions of yand is called non linear otherwise.

Example 1.1.3. y′′ + t2y′ + y2 = et is a non-linear ODE.

Example 1.1.4. t2y′′′ + sin(t)y = t2 is a linear ODE.

1.2 First Order Ordinary Differential Equations

In general, an ODE y′ = f(y, t) is NOT solvable in terms of elementary func-tions (e.g. ex, sinx, log). However, if an ODE is in one of the following threecategories, we can solve the equation and obtain an analytical solution.

1. Linear Equation: y′ + p(t)y = q(t).2. Separable Equations:: P (t) +Q(y)y′ = 0.3. Exact Equations.

1.2.1 1st Order Linear ODEs

For a 1st-oder ODE of the form

dy

dt+ p(t)y = q(t),

5

Page 6: Introduction to Differential Equations - Ryan Lok-Wing Pang

6 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

we may solve it by the method of Integrating Factor. First, we find an antideriva-tive P (t) of p(t), then multiply both sides of the ODE by the integrating factorexp(P (t)):

eP (t)y′ + eP (t)p(t)y = q(t)eP (t)

d

dt(eP (t)y) = q(t)eP (t)

eP (t)y =

∫q(t)eP (t)dt

y = e−P (t)

∫q(t)eP (t)dt.

Example 1.2.1. Solve ty′ + 2y = t5 for t > 0.

Proof. Rewrite the equation in the form y′ + (2/t)y = t4. Then an integratingfactor is

e2 ln t = t2.

Multiplying t2 to both sides of the ODE yields

t2y′ + 2ty = t6

d

dt(t2y) = t6

t2y =t7

7+ C

y =t5

7+ Ct−2.

1.2.2 1st Order Separable Equations

If a 1st order ODE can be written in the form

dy

dx= P (x)Q(y),

then the ODE is said to be in a separable form. In general, it can be solved nomatter the ODE is linear or not, but the solution may be implicit. i.e. Cannotbe written in the form y = f(x).

Example 1.2.2. Solve (t2 + 1)y′ + tey = 0.

Proof. We have−dyey

=t

t2 + 1dt.

Integrating both sides yields

e−y =1

2ln(t2 + 1) + C.

Hencey = − ln | ln

√t2 + 1 + C|.

Page 7: Introduction to Differential Equations - Ryan Lok-Wing Pang

1.2. FIRST ORDER ORDINARY DIFFERENTIAL EQUATIONS 7

Example 1.2.3 (Romanian MO 1971). Find all continuous functions f : R→R satisfying the equation

f(x) = λ(1 + x)

(1 +

∫ x

0

f(t)

1 + t2dt

),

for all x ∈ R. Here λ is a fixed real number.

Proof. Since f is continuous, thr R.H.S. of the equation is a differentiable func-tion, so is f . Rewrite the equation as

f(x)

1 + x2= λ

(1 +

∫ x

0

f(t)

1 + t2dt

),

and then differentiate w.r.t. x to obtain

f ′(x)(1 + x2)− f(x)2x

(1 + x2)2= λ

f(x)

1 + x2.

Separating variables and integrating yields∫f ′(x)

f(x)dx =

∫ (λ+

2x

1 + x2

)dx.

Hence ln f(x) = λx + ln(1 + x2) + C. Hence f(x) = a(1 + x2)eλx for someconstant a. Substituting in the original relation, we obtain a = λ. Hence, theunique solution is f(x) = λ(1 + x2)eλx.

1.2.3 1st Order Homogeneous Equations

A function f(x, y) is homogeneous of degree n if f(kx, ky) = knf(x).A 1st order ODE P (x, y) +Q(x, y) dydx = 0 is homogeneous if both functions

P (x, y) and Q(x, y) are homogeneous functions of the same degree n.The general form of a 1-st order homogeneous equation is

dy

dx= F (

y

x).

They can be solved by transforming to separable equations.Let u = y/t, then dy/dt = t(du/dt) + u. The homogeneous ODE then

become separable:

tdu

dt+ u = F (u)

tdu

dt= F (u)− u.

Hence homogeneous equations can be considered as a class of separable equa-tions.

Example 1.2.4. Solvedy

dt=t2 + ty + y2

t2.

Proof.dy

dt= 1 +

y

t+ (

y

t)2,

so the ODE is homogeneous and can be solved by transforming to a separableequation.

Page 8: Introduction to Differential Equations - Ryan Lok-Wing Pang

8 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

1.2.4 1st Order Exact Equations

Recall from multivariable calculus that for a continuous vector field F : R2 →R2, F (x, y) = (P (x, y), Q(x, y)), we call F is conservative if

∂f

∂x= P (x, y) and

∂f

∂y= Q(x, y) for some function f(x, y).

. i.e. F = ∇f. The function f is called the potential function for F . If F isdefined on a simply connected region D ⊆ R2, then the condition is equivalentto

∂P

∂y=∂Q

∂x.

There are two ways to find a potential function.

Example 1.2.5. Prove that the vector field F (x, y) = (2x + 3y, 3x − 2y) isconservative and find a potential function f for F .

Proof. We claim that f(x, y) = x2 − y2 + 3xy is a potential function for F . IfF = ∇f , then we have

∂f

∂x= 2x+ 3y.

Integrating w.r.t. x gives f(x, y) = x2 + 3xy + g(y) for some g(y) which onlydepends on y but not on x. Differentiating w.r.t. y gives

∂f

∂y= 3x+ g′(y) = 3x− 2y.

Hence g′(y) = −2y and g(y) = −y2 + C. In particular, we see that f(x, y) =x2 − y2 + 3xy is a potenital function for F .

Alternatively, we can find f by performing a line integral along the segments(0, 0)→ (x, 0) and (x, 0)→ (x, y).

f(x, y) =

∫ x

0

(2t+ 0)dt+

∫ y

0

(3x− 2t)dt = x2 − y2 + 3xy + C.

A first order ODE of the form

P (x, y) +Q(x, y)dy

dx= 0

is called exact if

∂f

∂x= P (x, y) and

∂f

∂y= Q(x, y) for some function f(x, y).

If P and Q are defined on a simply connected region, then the definition ofexactness is equivalent to

∂P

∂y=∂Q

∂x

If the ODE is exact with potential function f(x, y) = f(x, g(x)) (i.e. f is afunction of x only), then by chain rule, we have

df

dx=∂f

∂x

dx

dx+∂f

∂y

dy

dx=∂f

∂x+∂f

∂y

dy

dx.

Page 9: Introduction to Differential Equations - Ryan Lok-Wing Pang

1.2. FIRST ORDER ORDINARY DIFFERENTIAL EQUATIONS 9

i.e. the ODE can be written in the form

df

dx= 0

so that f(x, y) = C is a constant.

Example 1.2.6. Solve

dy

dx=x3 − yx+ y3

.

Proof. We easily check that this ODE is exact and an associated potential func-tion is f(x, y) = xy − (x4/4) + (y4/4). Hence f(x, y) = C. i.e. xy − (x4/4) +(y4/4) = C.

For the ODE P (x, y) +Q(x, y)y′ = 0, sometimes, there exists an integratingfactor µ(x, y) such that the new ODE µP + µQy′ = 0 is exact. So that

∂µP

∂y=∂µQ

∂x,

which implies

µ(∂P

∂y− ∂Q

∂x) + P

∂µ

∂y−Q∂µ

∂x= 0. (∗)

This is a partial differential equation for µ(x, y) and is generally very hard tosolve.

However, an integrating factor µ can be found in some special cases. Thishappens when µ is a single variable function of x or y.

When µ(x, y) = µ(x), we have ∂µ/∂y = 0 so that (∗) becomes

∂µ

∂x=Py −Qx

Qµ.

If (Py −Qx)/Q is a function of x only, µ can be solved.

When µ(x, y) = µ(y), we have ∂µ/∂x = 0 so that (∗) becomes

∂µ

∂y=Qx − Py

Pµ.

If (Qx − Py)/Q is a function of y only, µ can be solved.

Therefore, to determine whether integrating factor exists, we check (Py −Qx)/Q and (Qx − Py)/P to see if they are single variable functions of x and yrespectively.

Example 1.2.7. Solve (3xy + y2) + (x2 + xy)y′ = 0.

Proof. Let P (x, y) = 3xy+y2, Q(x, y) = x2+xy, then Py = 3x+2y,Qx = 2x+y.Hence the ODE is not exact. Now (Py −Qx)/Q = (x+ y)/(x2 + xy) = 1/x is afunction of x only. Hence we can find an integrating factor µ(x).

µP + µQdy

dx= 0

Page 10: Introduction to Differential Equations - Ryan Lok-Wing Pang

10 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

is exact. Hence

∂µP

∂y=

∂µQ

∂x

µPy = µxQ+ µQxµxµ

=Py −Qx

Q=

1

x∫dµ

µ=

∫dx

x

µ = x+ C

Take µ = x, there exists potential function f(x, y) such that

∂f

∂x= µP (x, y) = 3x2y + xy2 and

∂f

∂y= µQ(x, y) = x3 + x2y.

Solving for f gives f(x, y) = x3y + (x2y2)/2. Hence the solution of the ODE isgiven by x3y + (x2y2)/2 = C, where C is a constant.

Remark. In fact, the ODE is homogeneous.

Example 1.2.8 (Razvan Gelca). Let f and g be differentiable functions on thereal line satisfying the equation

(f2 + g2)f ′ + (fg)g′ = 0.

Prove that f is bounded.

Proof. The idea is to integrate the equation using an integrating factor. Ifinstead we had the 1st-order ODE (x2 + y2)dx + xydy = 0, then the standardmethod as in the above example finds x as an integrating factor. So if wemultiply the equation by f , then we have (f3 + fg2)f ′ + f2gg′ = 0, which isequivalent to (

1

4f4 +

1

2f2g2

)′= 0.

Hence f4+2f2g2 = C for some real constant C. In particular, f is bounded.

1.3 Existence and Uniqueness of Solutions

Theorem 1.3.1. For the initial value problem

dy

dt= f(t, y), y(t0) = y0.

If f and ∂f/∂y are continuous on some rectangle α < t0 < β, γ < y0 < δcontaining the point (t0, y0), then there exists a unique solution y = φ(t) to theinitial value problem defined on some interval (a, b) satisfying α ≤ a < t0 < b ≤β.

Page 11: Introduction to Differential Equations - Ryan Lok-Wing Pang

1.3. EXISTENCE AND UNIQUENESS OF SOLUTIONS 11

Corollary 1.3.2. [Existence and Uniqueness Theorem for 1st-Order LinearODEs] CoFnsider the 1st-order linear ODE initial value problem

dy

dt+ p(t)y = g(t), y(t0) = y0.

If p(t) and q(t) are continuous functions on an open interval α < t0 < β, thenthere exists a unique solution to the initial value problem defined on the interval(α, β).

There are a few things to notice here. First, unlike Theorem 1.3.2, Theorem1.3.1 doesn’t tell us the interval of validity for a unique solution guaranteed byit. Instead, it tells us the largest possible interval that the solution will existin; we’d need to actually solve the initial value problem to get the interval ofvalidity.

Secondly, for nonlinear differential equations, the value of y0 may affect theinterval of validity, as we will see in a later example.

Example 1.3.3. Does the initial value problem y′ = 1/x, y(0) = 0 have aunique solution?

Proof. The ODE in linear. Since 1/x is not continous at x = 0, and the initialvalue is given at x = 0, so uniue solution does not exist in this case.

Example 1.3.4. For ty′ − 2y = 5t2, y(−1) = 2, what is the interval for aunique solution to exist?

Proof. The ODE in linear. p(t) = −2/t and g(t) = 5t are both continuous forall t except at t = 0. Hence the desired interval is t ∈ (−∞, 0). Solving theODE gives y(t) = 5t2 ln |t|+ Ct2. Finally y(−1) = 2 implies C = 2.

Example 1.3.5. For (t2 + t− 6)y′ + (t− 3)y = 1/(sin t), y(−4) = 1, what isthe interval for a unique solution to exist?

Proof. The ODE in linear. p(t) = (t − 3)/((t + 3)(t − 2)) is not continuous att = −3, 2 and g(t) = 1/((sin t)(t + 3)(t − 2)) is not continuous at t = −3, 2, kπfor k ∈ Z. Hence the desired interval is t ∈ (−2π,−π).

Example 1.3.6. Does the initial value problem y′ = 2√y, y(0) = 0 have a

unique solution?

Proof. The ODE in non-linear. f(t, y) = 2√y is continuous for y > 0, fy =

1/(√y) is continuous for y > 0. However, the initial condition y(0) = 0 is at

y = 0. Hence there is no solution for the initial value problem.

Example 1.3.7. For y′ = (2 cos(2x))/(3+2y), y(0) = −1, what is the intervalfor a unique solution to exist?

Proof. The ODE in non-linear. f(x, y) = (2 cos(2x))/(3+2y) and fy = (−4 cos(2x))/(3+2y)2 are continuous for all y except at y = −3/2. To determine the interval, wefirst solve the ODE For y 6= −3/2, separating variables and integrating gives

3y + y2 = sin(2x) + C.

Page 12: Introduction to Differential Equations - Ryan Lok-Wing Pang

12 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

y(0) = −1 implies C = −2. Hence y2 + 3y + 2 − sin(2x) = 0 is the im-plicit solution to the initial value problem. By quadratic formula, we havey = (−3/2)± (1/2)

√1 + 4 sin(2x). The initial condition implies y = (−3/2) +

(1/2)√

1 + 4 sin(2x). Ths solution is valid if 1+4 sin(2x) > 0 iff sin(2x) > −1/4iff arcsin(−1/4) < 2x < π + arcsin(−1/4) iff (1/2) arcsin(−1/4) < x < (π +arcsin(−1/4))/2. Therefore the desired interval is x ∈ ((1/2) arcsin(−1/4), ((π+arcsin(−1/4))/2).

Example 1.3.8. For y′ = y2 y(0) = 1, what is the interval for a uniquesolution to exist?

Proof. The ODE in non-linear. f(t, y) = y2 and fy = 2y are continuous forall y and t. By Theorem 1.3.1, there exists a unique solution to the initialvalue problem. To determine the interval, we first solve the ODE. Solving givesy = −1/(t + C). The initial condition y(0) = 1 implies C = −1. Hencey = 1/(1− t) is the solution to the initial value problem. Therefore the desiredinterval is t ∈ (−∞, 1).

Example 1.3.9 (Putnam 1988). A common calculus mistake is to believe that

the product rule for derivatives says that (fg)′ = f ′g′. If f(x) = ex2

, determine,with proof, whether there exists an open interval (a, b) and a nonzero functiong defined on (a, b) such that this wrong product rule is true for x in (a, b).

Proof. We want to find a solution g to fg′ + f ′g = f ′g′, which is equivalent tog′ + (f ′/(f − f ′))g = 0. Now f − f ′ = (1 − 2x)ex

2

. If x0 6= 1/2 and y0 ∈ R,then by the existence and uniqueness theorem for 1st order ODEs, there existsa unique solution g(x), defined in some open neighborhood (a, b) of x0, withg(x0) = y0. By taking y0 nonzero, we obtain a nonzero solution g.

One can solve the ODE by separation of variables. If g is nonzero, the ODEis equivalent to

g′

g=

f ′

f ′ − f=

2xex2

(2x− 1)ex2 = 1 +1

2x− 1,

ln |g(x)| = x+1

2ln |2x− 1|+ c,

from which one finds that the nonzero solutions are of the form g(x) = Cex|2x−1|1/2 for any nonzero number C, on any interval not containing 1/2.

1.4 Modeling with first-order ODEs

One of the main application of ODEs is to model the processes of physicalphenomena, or other problems from economics, social science, finance, etc. Inthis section, we discuss some processes that can be modeled by 1st-order ODEs.

Example 1.4.1 (Radioactive Decay). Let Q(t) be the amount of radioactivesubstance at time t. Assume the decay of Q is proportional to the currentamount. Then the process is governed by the equation

dQ

dt= −λQ.

Solving gives Q = ce−λt, which means Q decays exponentially.

Page 13: Introduction to Differential Equations - Ryan Lok-Wing Pang

1.5. INTRODUCTION TO NUMERICAL METHODS 13

Example 1.4.2 (Compound Interest). Let P (t) be the principal, r be the in-terest rate (which is a constant), then

dP

dt= rP, P (0) = P0,

solving the initial value problem gives P (t) = P0ert.

1.5 Introduction to Numerical Methods

1.5.1 Euler Method

For the initial value problem

dy

dt= f(t, y), y(t0) = y0.

If f and ∂f/∂y are conntinuous, then the initial value problem has a uniquesolution y = φ(t) in some interval containing the initial point t = t0. It isusually impossible to find the solution exactly. In that case, we use numericalmethods to approximate the solution. One of the oldest method is called theEuler method or the tangent line method.

We know that the solution passes through the initial point (t0, y0) and theslope at this point is dy/dt = f(t, y). Hence consider the tangent to the solutioncurve at (t0, y0), namely

y = y0 + f(t0, y0)(t− t0).

Thus if t1 is close enough to t0, then we can approximate φ(t1) by substi-tuting t = t1 into the tangent line:

y1 = y0 + f(t0, y0)(t1 − t0).

We can repeat the process. But we do not know the value φ(t1) of thesolution at t1. The best we can do is to use the approximate value y1 instead,Thus we construct the line through (t1, y1) with the slope f(t1, y1),

y = y1 + f(t1, y1)(t− t1).

If t2 is close enough to t1, then substituting to the above equation gives

y2 = y1 + f(t1, y1)(t2 − t1).

In general, we have

yn+1 = yn + f(tn, yn)(tn+1 − tn), n = 0, 1, 2, · · ·

Page 14: Introduction to Differential Equations - Ryan Lok-Wing Pang

14 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

Page 15: Introduction to Differential Equations - Ryan Lok-Wing Pang

Chapter 2

Second-Order LinearOrdinary DifferentialEquations

2.1 Introduction

The general form of a 2nd-order ODE is

y′′ = f(t, y, y′).

It is linear if it can be written as

y′′ + p(t)y′ + q(t)y = g(t).

Otherwise it is non-linear. If g(t) = 0, then the ODE is called homogeneous.Otherwise it is called non-homogeneous.

Theorem 2.1.1 (Principle of Superposition). For any homogeneous linear ODE,the set of all solutions forms a vector space over C.

Theorem 2.1.2 (Dimension Theorem). The dimension of the vector space Vof solutions to an n-th order homogeneous linear ODE is dim(V ) = n.

Defintion 2.1.3 (Wronskian). The Wronskian of two functions f(t) and g(t),denoted by W (f, g), is defined as

W (f, g) = det

(f(t) g(t)f ′(t) g′(t)

)The Wronskian is used to test the linear independence of functions on an

interval.

Theorem 2.1.4. If W (f, g) 6= 0 on an interval I, then f(t) and g(t) are linearlyindependent on I.

Example 2.1.5. W (et, e2t) = e3t 6= 0 for all t ∈ R. Hence et, e2t are linearlyindependent on R.

Example 2.1.6. W (et, 2et) = 0 for all t ∈ R. Hence et, 2et are linearly depen-dent on R. Alternatively, 2et/et = 2 is a constant for all t ∈ R.

15

Page 16: Introduction to Differential Equations - Ryan Lok-Wing Pang

16CHAPTER 2. SECOND-ORDER LINEARORDINARYDIFFERENTIAL EQUATIONS

2.2 General Solution of a Homogeneous Linear2nd-Order ODE

By the principle of superposition and the dimension theorem , if y1(t) and y2(t)are two linearly independent solutions of the homogeneous equation

y′′ + p(t)y′ + q(t)y = 0,

then the general solution of this equation is given by y = c1y1+c2y2 for arbitraryconstants c1, c2 ∈ C.

2.3 High Order ODEs with Constant Coefficients

Given

any(n) + an−1y

(n−1) + · · ·+ a1y′ + a0y = 0, ai ∈ C (∗)

We define the characteristic equation

p(r) = anrn + an−1r

n−1 + · · ·+ a1r + a0.

By the fundamental theorem of algebra, we can factor p(r) into n factors:

p(r) = an(r − r1)(r − r2) · · · (r − rn).

If r1, · · · , rn are distinct, then the functions er1t, · · · , ernt form a basis forthe space of the solution to (∗). In other words, the general solution is

C1er1t + C2e

r2t + · · ·+ Cnernt.

If r1, · · · , rn are not distinct. Consider a particular root r with multiplicitym, then replace

ert, ert, · · · , ert (m copies)

by

ert, tert, · · · , tm−1ert.

Example 2.3.1. Solve y(6) + 6y(5) + 9y(4) = 0.

Proof. The associated characteristic equation is p(r) = r6 + 6r5 + 9r4 = r4(r+3)2, whose roots are 0, 0, 0, 0,−3,−3 (counting multiplicities). Hence the generalsolution is

C1 + C2t+ C3t2 + C4t

3 + C5e−3t + C6te

−3t.

Example 2.3.2 (Putnam). Solve the system of differential equations

x′′ − y′ + x = 0,

y′′ + x′ + y = 0

in real-valued functions x(t) and y(t).

Page 17: Introduction to Differential Equations - Ryan Lok-Wing Pang

2.4. REDUCTION OF ORDER 17

Proof. Multiply the second equation by i then add it to the first to obtain

(x+ iy)′′ + i(x+ iy)′ + (x+ iy) = 0.

Substitutes z = x + iy, we have z′′ + iz′ + z = 0. The characteristic equationis r2 + ir + 1 = 0 with solutions r1 = i(−1 +

√5)/2, r2 = i(−1−

√5)/2. Hence

the general solution is

z(t) = (a+ ib)er1t + (c+ id)er2t

for arbitrary real numbers a, b, c, d. Comparing real and imaginary parts gives

x(t) = a cos r1t− b sin r1t+ c cos r2t− d sin r2t,

y(t) = a sin r1t+ b cos r1t+ c sin r2t+ d sin r2t.

2.4 Reduction of Order

For a general homogeneous linear 2nd-order ODE

y′′ + p(t)y′ + q(t)y = 0.

Suppose one particular solution y1 is known, a second linearly independentparticular solution y2 can be found by the method of reduction of order.

The idea is to let y2(t) = v(t)y1(t), and put y2 into the ODE, and then solvefor v(t).

Example 2.4.1. Find the general solution of x2y′′+ xy′− 9y = 0, x > 0, givena particular solution y1 = x3.

Proof. Let y2(t) = v(t)x3. Then we have y′2 = x3v + 3x2v and y′′2 = x3v′′ +6x2v′ + 6xv. This implies

v′′ +7

xv′ = 0.

Let u = v′, then the equation becomes u′+(7/x)u = 0, solving gives u = C1x−7.

Hence v(x) = (−C1x−6/6) + C2. Takes v(x) = x−6. Then y2 = x−6x3 = x−3.

Hence the general solution is

y = c1y1 + c2y2 = c1x3 + c2

1

x3.

2.5 Nonhomogeneous Equations

Defintion 2.5.1 (Differential Operator). For a function y(t), define the differ-ential operator L by L[y] = y′′ + p(t)y′ + q(t)y.

Page 18: Introduction to Differential Equations - Ryan Lok-Wing Pang

18CHAPTER 2. SECOND-ORDER LINEARORDINARYDIFFERENTIAL EQUATIONS

Theorem 2.5.2. L is a linear operator, i.e. L[y1 + y2] = L[y1] +L[y2], L[cy] =cL[y]. Moreover, if yp is a particular solution of the non-homogeneous linearODE L[y] = g(t), and yh = c1y1+c2y2 is the general solution to the correspond-ing homogeneous linear equation L[y] = 0, then

φ(t) = yp + yh = yp + c1y1 + c2y2

is the general solution of the non-homogeneous linear equation L[y] = g(t).

Proof. The fact that L is linear is clear. Let Y (t) be another solution to L[y] =g(t), then L[Y (t)] = g(t). Hence L[Y (t)]−L[yp] = 0. i.e. L[Y (t)− yp] = 0 sinceL is linear. Therefore, Y (t)−yp = yh by assumption. Hence Y (t) = yp+yh.

The problem is how to find a particular solution yp. One common methodis called the Method of Undetermined Coefficients, which is the subject of thenext section.

2.6 Method of Undetermined Coefficients

This method is suitable for non-homogeneous linear ODEs with constant coeffi-cients, i.e. equation of the form ay′′+by′+cy = g(t), where g(t) is an elementaryfunction.

The basic principle is to seek a particular solution yp (a trial function) basedon the the form of g(t) and the form of yh (solutions of the associated homoge-neous equation). Below are five typical cases of g(t).

(a) g(t) is a polynomial, i.e. g(t) = antn + an−1t

n−1 + · · ·+ a0.

case 1. c = 0, try yp = t(Antn +An−1t

n−1 + · · ·+A0).

case 2. b = c = 0, try yp = t2(Antn +An−1t

n−1 + · · ·+A0).

case 3. Otherwise, try yp = Antn +An−1t

n−1 + · · ·+A0.

Example 2.6.1. Solve y′′ + 4y = 3x2.

Proof. Solving the corresponding homogeneous ODE gives yh = c1 cos(2x) +c2 sin(2x). Let yp = Ax3 + Bx2 + Cx + D, then y′p = 3Ax2 + 2Bx + C andy′′p = 6Ax+ 2B. Substituting yp into the ODE gives

(6Ax+ 2B) + 4(Ax3 +Bx2 + Cx+D) = 3x2.

Comparing coefficients gives 4A = 3, 4B = 0, 4C+6A = 0, 2B+4D = 0. Solvinggives A = 3/4, B = 0, C = −9/8, D = 0. Hence

yp =3

4x3 − 9

8x.

(b) g(t) = α cos(βt) or α sin(βt), then let yp = ts(A cos(βt) + B sin(βt)),where s = 0 if ±βi is not a root to the characteristic equation, and s = 1 if itis a root.

Page 19: Introduction to Differential Equations - Ryan Lok-Wing Pang

2.7. VARIATION OF PARAMETERS 19

Example 2.6.2. Find a particular solution of 3y′′ + y′ − 2y = 2 cos t.

Proof. The characteristic equation is 3r2 + r− 2 = 0, solving gives r = −1, 2/3.Let yp = A cos t + B sin t, then y′p = −A sin t + B cos t, y′′p = −A cos t − B sin t.Substituting yp into the ODE and simplifying gives

(−5A+B − 2) cos t+ (−A− 5B) sin t = 0.

Which implies −5A+ B − 2 = 0,−A− 5B − 0 since sin t and cos t are linearlyindependent. Solving gives A = −5/13, B = 1/13.

(c) g(t) = (antn+an−1t

n−1+· · ·+a0)eαt, then let yp = ts(Antn+An−1t

n−1+· · ·+A0)eαt, with

s = 0 if α is not a root to the characteristic equation.s = 1 if α is a simple root to the characteristic equation.s = 2 if α is a double root to the characteristic equation.

Example 2.6.3. Find a particular solution of y′′ − 4y = 2e2t.

Proof. Solving ths characteristic equation r2 − 4 = 0 gives r = ±2. Let yp =Ate2t. Then y′p = A(2te2t + e2t), y′′p = 4A(e2t + te2t). Substituting yp into theODE gives 4A(e2t + te2t)− 4Ate2t = 2e2t, which gives A = 1/2.

(d) g(t) = pn(t)eαt cos(βt) or pn(t)eαt sin(βt), with pn(t) = antn+ · · ·+a1t+

a0, then let yp = ts(Antn+ · · ·+A0)eαt cos(βt) + ts(Bnt

n+ · · ·+B0)eαt sin(βt),with

s = 0 if α+ iβ is not a root to the characteristic equation.s = 1 if α+ iβ is a simple root to the characteristic equation.s = 2 if α+ iβ is a double root to the characteristic equation.

Example 2.6.4. Fina a particular solution of y′′ + 6y′ + 13y = e−3t cos(2t).

Proof. The characteristic equation is r2 + 6r+ 13 = 0, solving r = −3± 2i. Letyp = Ate−3t cos 2t+Bte−3t sin 2t.

(e) g(t) = g1(t)+g2(t)+· · ·+gn(t), then let yp = yp1 +yp2 +· · ·+ypn . i.e., lin-ear combination of forms of particular solutions suitable for g1(t), g2(t), · · · , gn(t).

Example 2.6.5. Solve y′′ − 3y′ + 2y = 3e−t − 10 cos(3t).

Proof. Solving the characteristic equation r2 − 3r + 2 = 0 gives r = 1, 2. Letyp = Ae−t +B cos(3t) + C sin(3t).

2.7 Variation of Parameters

The method of Variation of Parameters can be applied to a general non-homogeneous2nd-order ODE

L[y] = y′′ + p(t)y′ + q(t)y = g(t).

Unlike the method of undetermined coefficients, g(t) can be any function.If y1(t) and y2(t) are two solutions to the corresponding homogeneous equa-

tion L[y] = 0, we want to find a particular solution yp(t) for the ODE L[y] = g(t)of the form

yp = u1y1 + u2y2,

where u1(t) and u2(t) are unknown functions to be determined.

Page 20: Introduction to Differential Equations - Ryan Lok-Wing Pang

20CHAPTER 2. SECOND-ORDER LINEARORDINARYDIFFERENTIAL EQUATIONS

Theorem 2.7.1. With the notation as above, we have

u1(t) = −∫

y2(t)g(t)

W (y1, y2)dt, u2(t) =

∫y1(t)g(t)

W (y1, y2)dt,

where W (y1, y2) 6= 0 is the Wronskian.

Example 2.7.2. Find the general solution of y′′ + y = tan t.

Proof. Solving the characteristic equation r2 + 1 = 0 gives r = ±i. Hence y1 =cos t, y2 = sin t. Hence yh = c1y2 + c2y2, c1, c2 ∈ C. Let yp = u1(t)y1 + u2(t)y2,then by Theorem 2.7.1, we have

u1 = −∫

sin t tan t

1dt = sin(t)− ln | sec t+ tan t|,

u2 =

∫cos t tan t

1dt = − cos t+ C.

Hence yp = (sin(t)− ln | sec t+ tan t|) cos t+ sin t cos t = − cos t(ln | sec t+ tan t|)and the general solution is y(t) = yh + yp.

Example 2.7.3 (Putnam 1987). For all real x, the real-valued function y =f(x) satisfies

y′′ − 2y′ + y = 2ex.

(a) If f(x) > 0 for all real x, must f ′(x) > 0 for all real x? Explain.(b) If f ′(x) > 0 for all real x, must f(x) > 0 for all real x? Explain.

Proof. Solving the characteristic equation r2 − 2r + 1 = 0 gives r = 1. Henceyh = c1e

x + c2xex for c1, c2 ∈ R. Let yp = u1(x)ex + u2(x)xex then

u1 = −∫

xex · 2ex

W (ex, xex)dx = −x2 + C,

u2 =

∫ex · 2ex

W (ex, xex)dx = 2x+ C.

Hence yp = −x2ex + 2x2ex = x2ex and the general solution is f(x) = yh + yp =(x2 + c2x+ c1)ex.

Hence f(x) > 0 ∀x ∈ R iff x2 + c2x+ c1 > 0 ∀x ∈ R iff c22 − 4c1 < 0.Simlarly f ′(x) > 0 ∀x ∈ R iff (c2 + 2)2 − 4(c1 + c2) < 0 iff c22 − 4c1 + 4 < 0.Clearly c22 − 4c1 < 0 does not imply c22 − 4c1 + 4 < 0. (Take c2 = 1, c1 = 1

for instance.) But c22 − 4c1 + 4 < 0 does imply c22 − 4c1 < 0. Hence the answeris NO for (a) and YES for (b).

2.8 Mechanical Vibrations

The spring mass system is a typical example to illustrate the behavior of adynamical system modeled by a linear 2nd order ODE.

Letl = natural length of the spring.

L = Stretching length of the spring after attaching the object.

Page 21: Introduction to Differential Equations - Ryan Lok-Wing Pang

2.8. MECHANICAL VIBRATIONS 21

u = displacement from equilibrium position (take downward as +ve).

m = mass of the object.

k = spring constant. Recall Fs = −ku (Hooke’s Law).

γ = damping coefficient of the system. Damping force Fd = −γu′(t).

F (t) = external force applied to the object at time t.

Fg = gravitional force Fg = mg

By Newton’s Sceond Law,we have

F = ma = mu′′

F (t) + Fg + Fd + Fs = mu′′

mu′′ + γu′ + ku+ kL−mg = F (t).

But mg − kL = 0 (by considering equilibrium state), hence the spring-masssystem is governed by the equation

u′′ +γ

mu′ +

k

mu =

F (t)

m,

which is a linear non-homogeneous 2nd-order ODE with constant coefficients.The oscillation is free if F (t) = 0.The oscillation is forced if F (t) 6= 0.The motion is undamped if γ = 0 and is called damped otherwise.

2.8.1 Free Undamped Oscillation

In this case, γ = 0 and F (t) = 0. The governing equation becomes

u′′ +k

mu = 0,

which is a homogeneous 2nd-order ODE with constant coefficients. The char-acteristic equation is r2 + k/m = 0. Solving gives r = ±i

√k/m. Hence the

general solution is

u = c1 cosω0t+ c2 sinω2t,

where ω0 =√k/m is called the natural frequency of the oscillation. Rewrite

the solution as

u =√c21 + c22(

c1√c21 + c22

cosω0t+c2√c21 + c22

sinω0t)

= A0(cos δ cosω0t+ sin δ sinω0t)

= A0 cos(ω0t− δ).

Where A0 =√c21 + c22, ω0 =

√k/m, δ = arctan(c2/c1) are the amplitude,

natural frequency and phase shift respectively, all determined by initial condi-tions. Note that T = 2π/ω0 = 2π

√m/k is the period.

Page 22: Introduction to Differential Equations - Ryan Lok-Wing Pang

22CHAPTER 2. SECOND-ORDER LINEARORDINARYDIFFERENTIAL EQUATIONS

2.8.2 Free Damped Oscillation

In this case, F (t) = 0, but γ 6= 0. The governing equation becomes

u′′ +γ

mu′ +

k

mu = 0.

This is a homogeneous 2nd-order ODE with constant coefficients. Solving thecharacteristic equation gives

r =−γ2m±√

2m)2 − k

m.

Hence we have three cases:(Case 1) (Under Damping) (γ/2m)2 < k/m. Then we have two complex

roots.

u(t) = exp(−γt2m

)(c1 cosβt+ c2 sinβt),

where β =√

(k/m)− (γ/2m)2. It is an oscillating solution.(Case 2) (Critical Damping) (γ/2m)2 = k/m. Then we have a double root.

u(t) = c1 exp(−γt2m

) + c2t exp(−γt2m

).

(Case 3) (Over Damped) (γ/2m)2 > k/m. Then we have two distinct realroots.

u(t) = c1er1t + c2e

r2t,

where r1 and r2 are the two distinct real roots of the characteristic equation.In all three cases, we have limt→∞ u(t) = 0.The damping effect depends on the ratio γ/(mk). Therefore, for large m

and k, oscillation is more likely to occur.

2.8.3 Forced Undamped Oscillation

In this case, γ = 0 but F (t) 6= 0. The governing equation is a non-homogeneous2nd-order ODE with constant coefficients,

u′′ +k

mu =

F (t)

m.

If the force F (t) is a sinusoidal function with F (t) = F0 cosωt, then the govern-ing equation becomes

u′′ + ω0u =F0

mcosωt,

where ω0 =√k/m is the natural frequency. The solution uh for the corre-

sponding homogeneous equation is the same as in the case of free undampedoscillation,

uh = c1 cosω0t+ c2 sinω0t.

A particular solution up of the non-homogeneous equation can be obtained bythe method of undetermined coefficients. Depending on ω, we have the followingtwo cases.

Page 23: Introduction to Differential Equations - Ryan Lok-Wing Pang

2.8. MECHANICAL VIBRATIONS 23

(Case 1) ω 6= ω0. Then cosωt is not a solution of the homogeneous equation.Let up = B cosωt+D sinωt. Then solving for B,D gives

D = 0, B =F0

m(ω20 − ω2)

.

Hence the general solution of the ODE is

u(t) = uh + up = c1 cosω0t+ c2 sinω0t+F0

m(ω20 − ω2)

cosωt

= A0 cos(ω0t− δ) +F0

m(ω20 − ω2)

cosωt

with A0 and δ as in the case of free undamped oscillation.(Case 2) ω = ω0. Then resonance occurs. cosωt is a solution of the homo-

geneous equation. Let up = Bt cosω0t+Dt sinω0t. Solving for B,D gives

B = 0, D =F0

2mω0

Hence the general solution is

u(t) = uh + up = c1 cosω0t+ c2 sinω0t+F0

2mω0t sinω0t.

For the initial conditions u(0) = u′(0) = 0, c1 = c2 = 0, we have

u(t) =F0

2mω0t sinω0t.

The amplitude of u increases with time t.

2.8.4 Forced Damped Oscillation

In this case, F (t) 6= 0, γ 6= 0. Let F (t) = (F0/m) cosωt, the governing equationbecomes

u′′ +γ

mu′ +

k

mu =

F0

mcosωt.

So thatu(t) = uh + up

Note that the homogeneous solution is the solution of the free damped caseand recall that in the free damped case, u → 0 as t → ∞. Hence back to theforced damped case, we have

limt→∞

uh(t) = 0.

and uh is called the transient solution. On the other hand, we have u → upas t → ∞ and hence the particular solution up is often called the steady statesolution.

Page 24: Introduction to Differential Equations - Ryan Lok-Wing Pang

24CHAPTER 2. SECOND-ORDER LINEARORDINARYDIFFERENTIAL EQUATIONS

Page 25: Introduction to Differential Equations - Ryan Lok-Wing Pang

Chapter 3

Series Solutions forSecond-Order LinearEquations

3.1 Series Solutions for Linear ODEs

Example 3.1.1. Find a power series solution to the differential equation y(t) =y(t) + 2 with initial condition y(0) = 6.

Proof. Let y(t) =∑∞k=0 akt

k, then

y′(t) =

∞∑k=1

kaktk−1.

Substitutes these into the ODE gives

∞∑k=1

kaktk−1 =

∞∑k=0

aktk + 2 =

∞∑k=1

ak−1tk−1 + 2,

∞∑k=1

[kak − ak−1]tk−1 = 2.

Comparing coefficients of constant term gives a1 − a0 = 2. Comparingcoefficients of tk gives kak − ak−1 = 0, k = 2, 3, 4, · · · . Hence ak = ak−1/k.Therefore

y(t) =

∞∑k=0

aktk = a0 + a1t+ a2t

2 + · · ·

= a0 + a1

(t+

t2

2!+t3

3!+ · · ·

)= a0 + a1(et − 1) = a0 + (a0 + 2)(et − 1).

Hence y(t) = 8et − 2 by the initial value condition.

25

Page 26: Introduction to Differential Equations - Ryan Lok-Wing Pang

26CHAPTER 3. SERIES SOLUTIONS FOR SECOND-ORDER LINEAR EQUATIONS

The above example is the typical way to obtain the series solution of a linearODE. In general, we have the following procedures:

1. Let y(t) =∑∞k=0 akt

k.2. Take the corresponding derivatives on the power series and substitute

them into the equation.3. Shift the index in the summations so that they start from the same index.4. Comparing the coefficients for the terms of tk to obtain a relation between

ak. Usually the coefficients are related by recurrence relations.5. If an initial value problem is to be solved, the values of first few coefficients

can be evaluated from the initial conditions.

3.2 Ordinary and Singular Points of an ODE

Consider the homogeneous linear 2nd-order ODE of the general form

d2y

dx2+ p(x)

dy

dx+ q(x)y = 0 . . . (1)

We do not discuss the corresponding non-homogeneous ODE since once thegeneral solutions for the homogeneous ODE have been found, we can obtain aparticular solution by variation of parameters.

Defintion 3.2.1 (Analytic Function). A function f(x) is said to be real ana-lytic, or analytic at the point x = a if f(x) can be represented by a Taylor seriescentered about the point x = a with radius of convergence R > 0.

Defintion 3.2.2 (Ordinary and Singular Points). For the equation in (1), thepoint x = x0 is called an ordinary point for the ODE if the functions p(x) andq(x) are analytic at x0. Otherwise, it is called a singular point for the ODE.

Defintion 3.2.3 (Regular Singular Point). Let x = x0 be a singular point forthe ODE in (1). This point is called a regular singular point for the ODE ifthe functions (x−x0)p(x) and (x−x0)2q(x) are analytic at x0. Alternatively, ifboth the limit limx→x0(x−x0)p(x) and limx→x0(x−x0)2q(x) have finite values,then the point x0 is a regular singular point.

Example 3.2.4. The Legendre equation (1− x2)y′′− 2xy′+α(α+ 1)y = 0 hasregular singular points at x = −1, 1.

Proof. Rewrite the equation as y′′+p(x)y′+ q(x)y = 0, where p(x) = −2x/(1−x2), q(x) = α(α + 1)/(1 − x2). Then p(x), q(x) are not continuous at x = ±1.Hence x = ±1 are singular points. For x = 1, (x − 1)p(x) = 2x/(x + 1), (x −1)2q(x) = α(α + 1)(1 − x)/(1 + x) are continuous at x = 1, hence x = 1 is aregular singular point. Likewise for x = −1.

3.3 Series Solution about an Ordinary Point

Theorem 3.3.1 (Existence of Power Series Solution). Let I be the intervalcontaining an ordinary point x0. If p(x), q(x) in (1) are analytic at x0 and theirTaylor series both converges in I, then a series solution of y(x) about x0 can beobtained and converges at least in the interval I.

Page 27: Introduction to Differential Equations - Ryan Lok-Wing Pang

3.4. SERIES SOLUTION ABOUT A REGULAR SINGULAR POINT 27

Recall that the general solution of a second-order ODE has the form y(x) =c1y1(x) + c2y2(x), with two arbitrary constants c1 and c2. The series solutionof y(x) is a linear combination of two power series solutions y1(x) and y2(x).

3.4 Series Solution about a Regular Singular Point

3.4.1 Euler Equations

The Euler Equation is a linear ODE with the general form

x2y′′ + αxy′ + βy = 0,

where α and β are real constants. Is is routine to check that the Euler equationhas the only regular singular point at x = 0.

In any interval not including x = 0, the Euler equation has a general solutionof the form y = c1y1 + c2y2, where y1 and y2 are linearly independent. Forconvenience we first consider the interval x > 0, extending our results later tothe interval x < 0.

First note that (xr)′ = rxr−1, (xr)′′ = r(r − 1)xr−2. Hence if we assumethat the Euler equation has a solution of the form y = xr, then

x2(xr)′′ + αx(xr)′ + βxr = 0,

xr(r(r − 1) + αr + β) = 0.

Hence if r is a root of F (r) = r(r− 1) +αr+β = 0, then y = xr is a solution ofthe Euler equation. Denote the roots of F (r) = 0 by r1, r2. Then we have thefollowing cases:

Case 1, r1, r2 are real and distinct: Then y1(x) = xr1 , y2(x) = xr2 aresolutions of the Euler equation. Hence the general solution of the Euler equationis y = c1x

r1 + c2xr2 , x > 0.

Case 2, r1 = r2 = r and is real: Then y1(x) = xr1 is a solution. The secondsolutiojn can be found by the method of reduction of order. Let y2 = xrv(x),then y′2 = rxr−1v + xrv′, y′′2 = r(r − 1)xr−2v + 2rxr−1v′ + xrv′′. Substitutesthese into the equation gives x2(r(r−1)xr−2v+2rxr−1v′+xrv′′)+αx(rxr−1v+xrv′) +β(xrv) = 0. Simplifying gives x2v′′+xv′ = 0 since r(r−1) +αr+β = 0and 2r + α = 1. Let u = v′, then separating variables gives du/u = −dx/x,integrating w.r.t. x and setting the integration constant C = 0 gives u = x−1,hence v = lnx and y2 = xr lnx, x > 0.

Case 3, r1 = a + ib, r2 = a − ib are complex and distinct: Then y1(x) =xr1 = er1 ln x = e(a+ib) ln x = xa(cos(b lnx) + i sin(b lnx)), similarly y2(x) =xa(cos(b lnx) − i sin(b lnx)). To obatin the general solution without i, we con-struct another solution: y1 + y2, y1 − y2, so that

y(x) = c1xa cos(b lnx) + c2x

a sin(b lnx).

The solution of the Euler equation for x < 0 is similar to the case x > 0.We can make the substitution x = −u, with u > 0 so that y = y(u), dy/dx =−dy/du, d2y/dx2 = d2y/du2. Therefore, the Euler equation beomces u2y′′(u) +αuy′(u) +βy(u) = 0 and we have the following theorem for the general solutionof the Euler equation for x 6= 0.

Page 28: Introduction to Differential Equations - Ryan Lok-Wing Pang

28CHAPTER 3. SERIES SOLUTIONS FOR SECOND-ORDER LINEAR EQUATIONS

Theorem 3.4.1. The general solution of the Euler equation x2y′′+αxy′+βy =0 in any interval not containing x = 0 is determined by the roots r1, r2 of theequation

F (r) = r(r − 1) + αr + β = 0.

If the roots are real and distinct, then

y = c1|x|r1 + c2|x|r2 .

If the roots are real and equal, then

y = (c1 + c2 ln |x|)|x|r1 .

If the roots are complex: r1 = a+ ib, r2 = a− ib, then

y = y(x) = c1|x|a cos(b ln |x|) + c2|x|a sin(b ln |x|).

3.4.2 The Method of Frobenius

We are ready to solve the general 2nd order linear equation in the neighborhoodof a regular singular point x = x0. Without loss of generality, we may assumex0 = 0,

Theorem 3.4.2 (Method of Frobenius). Suppose the equation x2y′′+xp(x)y′+q(x)y = 0 has a regular singular point at x = 0. If the functions p(x), q(x) areanalytic at x = 0, then at least one solution to the equation can be representedby a power series in the form

y(x) = |x|r∞∑k=0

akxk,

where r can be a real or complex number (chosen so that a0 6= 0).

Remark. The Euler equation has a solution of the form y = |x|r, which isa special case of the above theorem.

Remark. We will discuss the solution for x > 0, i.e. to seek the solutionof the form y(x) = xr

∑∞k=0 akx

k, the corresponding solution for x < 0 can befound by the substitution x = −u, u > 0.

Consider the equation x2y′′ + xp(x)y′ + q(x)y = 0, x > 0. Then

y(x) = xr∞∑k=0

akxk, y′ =

∞∑k=0

(r+k)akxr+k−1, y′′ =

∞∑k=0

(r+k)(r+k−1)akxr+k−2.

Also, since p(x), q(x) are analytic at x = 0, we can write

p(x) =

∞∑k=0

pkxk, q(x) =

∞∑k=0

qkxk.

Substitutes all these into the equation gives

∞∑k=0

(r+k)(r+k−1)akxr+k+

∞∑k=0

pkxk∞∑k=0

(r+k)akxr+k+

∞∑k=0

qkxk∞∑k=0

akxr+k = 0.

Page 29: Introduction to Differential Equations - Ryan Lok-Wing Pang

3.4. SERIES SOLUTION ABOUT A REGULAR SINGULAR POINT 29

In the above equation, the smallest power of x is xr. Equating the coefficientsfor xr (i.e. the terms for k = 0) gives r(r− 1)a0 + rp0a0 + q0a0 = 0. Since a0 issupposed to be nonzero, we have

r(r − 1) + rp0 + q0 = 0.

The above equation is called the indicial equation of the ODE. The rootsof the indicial equation determine the nature of the solutions of the ODE. Wehave the following cases:

Case 1, Distinct Roots (real or complex): r = r1, r2. Then the two solutionsare given by

y1(x) = xr1∞∑k=0

akxk, y2(x) = xr2

∞∑k=0

bkxk.

Case 2, Double Roots. Then the two solutions are given by

y1(x) = xr1∞∑k=0

akxk, y2(x) = y1(x) lnx+ xr1

∞∑k=1

bkxk

Case 3, Real roots differing by an integer: r = r1, r2, with r1− r2 ∈ Z. Thenthe two solutions are given by

y1 = xr1∞∑k=0

akxk, y2 = my1 lnx+ xr2

∞∑k=0

ckxk,

where m may or may not be zero so that y2 may or may not involve the termwith lnx.

Example 3.4.3 (Distinct Roots, real or complex). Solve 2x2y′′−xy′+(1+x)y =0 for x > 0.

Proof. It is routine to check that x = 0 is a regular singular point. Let

y = xr∞∑k=0

ckxk, then y′ =

∞∑k=0

(k+r)ckxk+r−1, y′′ =

∞∑k=0

(k+r)(k+r−1)ckxk+r−2.

Substitutes these into the equation gives

∞∑k=0

{[2(k + r)(k + r − 1)ck − (k + r)ck + ck]xk+r + ckxk+r+1} = 0.

Comparing coefficients of xr yields the indicial equation 2r(r − 1)− r + 1 = 0.Solving gives r = 1/2, 1. Equating coefficients of xr + k for k ≥ 1 implies

[2(k + r)(k + r − 1)− (k + r) + 1]ck + ck−1 = 0.

For r = 1/2, we have ck = −ck−1/(k(2k − 1)).For r = 1, we have ck = −ck−1/(k(2k + 1)). Therefore

y = x1/2c0(1− x+1

6x2 − · · · ) + xc2(1− 1

3x+

1

30x2 + · · · ).

Page 30: Introduction to Differential Equations - Ryan Lok-Wing Pang

30CHAPTER 3. SERIES SOLUTIONS FOR SECOND-ORDER LINEAR EQUATIONS

Page 31: Introduction to Differential Equations - Ryan Lok-Wing Pang

Chapter 4

Laplace Transform

4.1 Introduction

For an ODE like ay′′+ by′+ cy = f(t), we may solve the equation by analyticalmethod such as method of undetermined coefficients. Most methods requirethat f(t) is a continuous function.

However, if f(t) is a piecewise continuous function like

f(t) =

t, 0 ≤ t < acos t, a ≤ t < bπ, t ≥ b

,

the method of undetermined coefficients does not work. Instead, the method ofLaplace Transform is a suitable technique for these kinds of problems.

Defintion 4.1.1 (Laplace Transform). For a function f(t), define

L{f(t)} =

∫ ∞0

e−stf(t)dt = F (s).

Theorem 4.1.2. The Laplace Transform operator is a linear operator. i.e.

L{af(t) + bg(t)} = aL{f(t)}+ bL{g(t)}, for constants a, b.

Theorem 4.1.3 (Conditions for Existence). If1. f(t) is a piecewise continuous function on an interval 0 ≤ t ≤ A for

A > 0, and2. |f(t)| ≤ keat when t ≥ T , for some constants a, k, T with k, T > 0,then L{f(t)} = F (s) exists for s > a.

4.2 Laplace Transform of Elementary Functions

The following examples will come in handy later.

Example 4.2.1.

L{1} =1

sfor s > 0.

31

Page 32: Introduction to Differential Equations - Ryan Lok-Wing Pang

32 CHAPTER 4. LAPLACE TRANSFORM

Example 4.2.2.

L{t} =1

s2for s > 0.

Example 4.2.3.

L{eat} =1

s− afor s > a.

Example 4.2.4.

L{sin at} =a

s2 + a2for s > 0.

Example 4.2.5.

L{cos at} =s

s2 + a2for s > 0.

4.3 Laplace Transform of Derivatives

Theorem 4.3.1. L{f (n)(t)} = snL{f(t)} −∑n−1k=0 s

kf (n−1−k)(0).

Corollary 4.3.2. L{f ′(t)} = sL{f(t)} − f(0) = sF (s)− f(0).

Corollary 4.3.3. L{f ′′(t)} = s2L{f(t)}−sf(0)−f ′(0) = s2F (s)−sf(0)−f ′(0).

4.4 Inverse Laplace Transform

Defintion 4.4.1 (Inverse Laplace Transform). If L{f(t)} = F (s), then wedefine the inverse Laplace transofrm of F (s) to be f(t) = L−1{F (s)}. It is easyto see that L−1 is also a linear operator.

Theorem 4.4.2 (Conditions for Existence). The inverse Laplace transform ofa function F (s) exists iff

1. lims→∞ F (s) = 0, and2. lims→∞ sF (s) = L < +∞.

Example 4.4.3. Find L−1{(4s+ 1)/(s2 + 9)}.

Proof.

L−1{4s+ 1

s2 + 9} = 4L−1{ s

s2 + 9}+

1

3L−1{ 3

s2 + 9} = 4 cos 3t+

1

3sin 3t.

Example 4.4.4. Find L−1{s/(s2 + s− 2)}.

Proof. Sinces

s2 + s− 2=

1

3· 1

s− 1+

2

3· 1

s+ 2,

we have

L−1{ s

s2 + s− 2} =

1

3L−1{ 1

s− 1}+

2

3L−1{ 1

s+ 2} =

1

3et +

2

3e−2t.

Page 33: Introduction to Differential Equations - Ryan Lok-Wing Pang

4.5. SOLVING INITIAL VALUE PROBLEM BY LAPLACE TRANSFORM33

Example 4.4.5. Find L{1/((s− 2)(s+ 2)(s2 + 1))}.

Proof. The transform equals

1

5L{ (s2 + 1)− (s2 − 4)

(s2 − 4)(s2 + 1)} =

1

10L{ 2

s2 − 22} − 1

5L{ 1

s2 + 1} =

1

10sinh 2t− 1

5sin t.

Theorem 4.4.6. L−1 is a one to one operator. i.e. If L{f(t)} = F (s),L{g(t)} =F (s), then f(t) = g(t).

4.5 Solving Initial Value Problem by LaplaceTransform

The basic idea is to transform a homogeneous or non-homogeneous ODE of y(t)with constant coefficients to an algebraic equation with functions of s (y(t) 7→Y (s)), then we can perform inverse Laplace Transform L−1 to Y (s) to obtainthe solution y(t).

Example 4.5.1. Solve the initial value problem y′′ + y = −t, y(0) = 0, y′(0) =−1.

Proof. Apply the Laplace Transform to the equation yields L{y′′+y} = L{−t}.Hence s2Y (s)− sy(0)− y′(0) + Y (s) = −1/s2. Simplifying gives Y (s) = −1/s2.Hence y(t) = L−1{Y (s)} = L−1{−1/s2} = −t.

4.6 Unit Step Function

To describe discontinuous or piecewise continuous functions efficiently, it is con-venient to introduce the unit step function, which is defined as

Defintion 4.6.1 (Unit Step Function). Define the unit step function as

uc(t) =

{0, t < c1, t ≥ c ,

for c > 0.

Example 4.6.2. If

f(t) =

{1, a ≤ t < b0, otherwise

,

then f(t) = ua(t)− ub(t).

Example 4.6.3. If

f(t) =

{sin t, 0 ≤ t < π/4sin t+ cos(t− π/4), t ≥ π/4 ,

then f(t) = (u0− uπ/4) sin t+ uπ/4(sin t+ cos(t− π/4)) = u0 sin t+ uπ/4 cos(t−π/4).

Page 34: Introduction to Differential Equations - Ryan Lok-Wing Pang

34 CHAPTER 4. LAPLACE TRANSFORM

Example 4.6.4. Write the following function in terms of the unit step function.

f(t) =

2, t ≤ 3−4, 3 ≤ t < 68, 6 ≤ t < 25−16, t ≥ 25

Proof. f(t) = 2(1− u3)− 4(u3 − u6) + 8(u6 − u25)− 15u25 = 2− 6u3 + 12u6 −24u25.

Theorem 4.6.5.

L{uc(t)} =

∫ ∞0

e−stuc(t)dt =

∫ ∞c

e−stdt =e−cs

s.(s > 0)

Theorem 4.6.6. If L{f(t)} = F (s), then L{uc(t)f(t − c)} = e−csL{f(t)} =e−csF (s).

Theorem 4.6.7. If L{f(t)} = F (s), then L{ectf(t)} = F (s− c).

Example 4.6.8. If

f(t) =

{0, t < πsin 2t, t ≥ π ,

find L{f(t)}.

Proof. We have f(t) = uπ(t) sin 2t = uπ sin(2t − 2π) = uπ sin(2(t − π)). HenceL{f(t)} = L{uπ sin(2(t− π))} = e−πsL{sin 2t} = (2e−πs)/(s2 + 4).

Example 4.6.9. If f(t) = uπ(t)t, find L{f(t)}.

Proof. f(t) = uπ(t)(t − π + π) = uπ(t − π) + πuπ, hence L{f(t)} = L{uπ(u −π)}+ πL{uπ} = e−πs

s2 + π e−πs

s .

Example 4.6.10. Find L−1{(1− e−2s)/(s2 + 1)}.

Proof. Let F (s) = 1/(s2 + 1), then (1− e−2s)/(s2 + 1) = F (s)− e−2sF (s). NowL{F (s)} = sin t, hence L−1{(1−e−2s)/(s2+1)} = L−1{F (s)}−L−1{e−2sF (s)} =sin t− u2(t) sin(t− 2).

Example 4.6.11. Find L−1{1/(s2 − 4s+ 5)}.

Proof. 1/(s2 − 4s+ 5) = 1/((s− 2)2 + 1) = F (s− 2), where F (s) = 1/(s2 + 1).Hence L−1{1/(s2 − 4s+ 5)} = L−1{F (s− 2)} = e2tL−1{F (s)} = e2t sin t.

4.7 Initial Value Problems with DiscontinuousFunctions

Example 4.7.1. Solve y′′ + 4y = g(t), y(0) = y′(0) = 0, where

g(t) =

{1, π ≤ t < 3π0, 0 ≤ t < π or t ≥ 3π

Page 35: Introduction to Differential Equations - Ryan Lok-Wing Pang

4.8. IMPULSE FUNCTIONS 35

Proof. Applying Laplace Transform to both sides of the equation gives L{y′′ +4y} = L{g(t)}, g(t) = uπ − u3π. Hence s2Y (s) − s · 0 − 0 + 4Y (s) = (e−πs −e−3πs)/s. Solving for Y (s) yields

Y (s) = (e−πs − e−3πs) · 1

s(s2 + 4)

=1

4· e−πs

s− 1

4· se

−πs

s2 + 4− 1

4· e−3πs

s+

1

4· se−3πs

s2 + 4.

Therefore

y(s) = L−1{Y (s)} = (uπ − u3π)1− cos 2t

4.

4.8 Impulse Functions

An impulse function is a very large magnitude signal applied over a very shortperiod. An example is the impluse of a voltage to a electric circuit.

If g(t) is an impulse function with non-zero value over a short time intervalt0 − τ < t < t0 + τ with τ → 0, and g(t) = 0 otherwise. then the total impulseof g(t) is I(τ), given by

I(τ) =

∫ ∞−∞

g(t)dt =

∫ t0+τ

t0−τg(t)dt.

Example 4.8.1. Let

dτ (t) =

{1/(2τ), −τ < t < τ0, otherwise

,

which represents an impulse at t = 0. Then the total impulse is

I(τ) =

∫ ∞−∞

dτ (t)dt =

∫ τ

−τ

1

2τdt = 1

Hence the total impulse of dτ (t) is always 1 and is independent of τ.

As τ → 0, the function is called a Dirac delta function and is denoted byδ(t). It is an impulse at t = 0 and has the following preperties:

1. δ(t) =∞ at t = 0.

2. δ(t) = 0 for t 6= 0.

3.∫∞−∞ δ(t)dt = 1.

Delta function at t = t0 is represented by δ(t− t0).

Theorem 4.8.2. L{δ(t− t0)} = e−st0 .

Theorem 4.8.3.∫∞−∞ δ(t− t0)f(t)dt = f(t0).

Theorem 4.8.4. L{δ(t− t0)f(t)} = e−st0f(t0).

Page 36: Introduction to Differential Equations - Ryan Lok-Wing Pang

36 CHAPTER 4. LAPLACE TRANSFORM

4.9 Convolution Integral

To evaluate L{Y (s)}, sometimes we may see that Y (s) can be decomposed intoproduct of functions (i.e. Y (s) = F (s)G(s)) that their inverse Laplace transformare known. i.e. L−1{F (s)} = f(t),L−1{G(s)} = g(t) are known.

To take this advantage, we have the following theorem:

Theorem 4.9.1. If Y (s) = F (s)G(s) and L−1{F (s)} = f(t),L−1{G(s)} =g(t), then

L−1{Y (s)} = f ∗ g(t),

where

f ∗ g(t) =

∫ t

0

f(τ)g(t− τ)dτ =

∫ t

0

f(t− τ)g(τ)dτ

is the convolution integral.

Theorem 4.9.2 (Basic Properties of Convolution). 1. f ∗ g = g ∗ f .2. f ∗ (g1 + g2) = f ∗ g1 + f ∗ g2.3. (f ∗ g) ∗ h = f ∗ (g ∗ h).4. f ∗ 1 6= f(t)5. L{f ∗ g(t)} = L{f(t)}L{g(t)}.

Example 4.9.3. Evaluate L{1/(s(s2 + 2s+ 2))}.

Proof. We have 1/(s(s2 + 2s + 2)) = (1/s)(1/(s2 + 2s + 2)) = F (s)G(s). NowL−1{1/s} = f(t) = 1,L−1{1/(s2+2s+2)} = g(t) = e−t sin t. Hence L{1/(s(s2+2s + 2))} = f ∗ g(t). It is not hard to find that f ∗ g(t) = (1/2)(1 − e−t sin t −e−t cos t) and the result follows.

Page 37: Introduction to Differential Equations - Ryan Lok-Wing Pang

Chapter 5

Systems of First-OrderODEs

5.1 System of Differential Equations

Systems of 1st-order ODEs are important because many linear ODEs of highorder can be transformed into a system of 1st-order linear ODEs.

Example 5.1.1. For y′′ + py′ + qy = 0, where p, q are constants, we may letx1 = y, x2 = y′, then x2 = x′1 and the equation becomes{

x′1 = x2x′2 = −qx1 − px2

,

i.e. (x1x2

)′=

(0 1−q −p

)(x1x2

),

x′ = Ax.

Example 5.1.2. For y′′′+3y′′+2y′−5y = sin 2t, let x1 = y, x2 = y′ = x′1, x3 =y′′ = x′2, then the equation becomes{

x′1 = x2x′2 = x3x

′3 = 5x1 − 2x2 − 3x3 + sin 2t

,

i.e. x1x2x3

′ =

0 1 00 0 15 −2 −3

x1x2x3

+

00

sin 2t

,

x′ = Ax + F(t).

5.2 Solution of a General First-Order System

A general system of 1st-order linear ODEs

37

Page 38: Introduction to Differential Equations - Ryan Lok-Wing Pang

38 CHAPTER 5. SYSTEMS OF FIRST-ORDER ODES

x′1 = p11(t)x1 + p12(t)x2 + · · ·+ p1n(t) + g1(t)...x′n = pn1(t)x1 + pn2(t)x2 + · · ·+ pnn(t) + gn(t)

,

can be written as the matrix equation X′ = P(t)X + G(t), where

X =

x1(t)...

xn(t)

,G(t) =

g1(t)...

gn(t)

,P(t) =

p11(t) · · · p1n(t)...

. . ....

pn1(t) · · · pnn(t)

.

If G(t) = 0, then the system is called a homogeneous system.

Theorem 5.2.1. The general solution of the homogeneous differential systemX′ = P(t)X, where X = (x1(t), · · · , xn(t))T is

X = c1X1 + · · ·+ cnXn,

where X1, · · · ,Xn are linearly independent solutions and ci are arbitrary con-stants.

Theorem 5.2.2. Consider a non-homogeneous system of ODE X′ = P(t)X +G(t). If Xh is the general solution to the associated homogeneous system X′ =P(t)X, and Xp is a particular solution to the non-homogeneous system X′ =P(t)X+G(t). then the general solution to the non-homogeneous system is givenby

X = Xh + Xp = c1X1 + · · ·+ cnXn + Xp.

5.3 Homogeneous System of 1st-Order LinearODEs with Constant Coefficients

To find the solution of a homogeneous system X′ = AX, where A is a n×n realmatrix, and X = (x1(t), · · · , xn(t))T .

Suppose X = veλt, with v = (v1, · · · , vn), and vi are constant scalars, thenX′ = λveλt, and the system becomes λveλt = Aveλt. i.e. Av = λv. Therefore,λ,v are eigenbalue and eigenvector of the matrix A by definition. Then we havethe following 3 cases:

Case 1: Eigenvalues are all real and distinct.In this case, the n eigenvectors v1, · · · ,vn corresponding to the n distinct

eigenvalues λ1, · · · , λn are linearly independent, so the general solution is

X = c1eλ1tv1 + · · ·+ cne

λntvn.

Case 2: Complex eigenvalues.If λ1 = a + ib, λ2 = a − ib, then the corresponding eigenvectors are also in

conjugate pair: v1 = u + iv,v2 = u− iv. and the corressponding solutions are

X1 = eat(u cos bt− v sin bt),

X2 = eat(u cos bt+ v sin bt).

Page 39: Introduction to Differential Equations - Ryan Lok-Wing Pang

5.4. NON-HOMOGENEOUS SYSTEM 39

Case 3: Repeated eigenvalues.If two eigenvalues are repeated (with algebraic multiplicity m), then compute

a basis for the eigenspace ker(A−λI) to get m linearly independent eigenvectors.Remark. if A is diagonalizable, then the method described in this section

can produce n linearly independent solutions. If A is non-diagonalizable, thegeneral solution can still be found, using the Jordan canonical form of A, butthis is beyond the scope of this notes.

5.4 Non-Homogeneous System

Consider the non-homogeneous system

X′ = AX + G(t),

the general solution X = Xh + Xp can be obatined by two methods.

5.4.1 Diagonalization

If A is diagonalizable, i.e. A = PDP−1 for some diagonal matrix D and invert-ible matrix P , then X′ = PDP−1X+G(t), or (P−1X)′ = D(P−1X)+P−1G(t).

Let X̂ = P−1X, F = P−1G(t), then the system becomes X̂′ = DX̂ + F.

This new system is a system of n linear 1-st order ODEs: x̂i(t)′

= λix̂i(t) +Fi(t), i = 1, · · ·n. Therefore

x̂i(t) = eλit∫e−λitFi(t)dt+ cie

λit

for i = 1, · · · , n and ci are arbitrary constants. Hence the general solution ofthe system X′ = AX + G(t) is then given by X = P X̂.

5.4.2 Variation of Parameter

Defintion 5.4.1 (Fundamental Solution Matrix). Consider the non-homogeneoussystem

X′ = AX + G(t),

if Xh = c1X1 + · · · + cnXn are the solutions of the associated homogeneoussystem, then the fundamental solution matrix Φ is defined as the matrix suchthat the n-th columns of the matrix are formed by the n-th linearly independenthomogeneous solution. i.e.

Φ = (X1X2 · · ·Xn).

Then we have Φ′ = AΦ. Also, we have Xh = ΦC, where C = (c1, · · · , cn)T .Let Xp = ΦV(t), where V(t) = (v1(t), · · · , vn(t))T , then we have X′p =

Φ′V(t) + ΦV(t)′. Substituting these into the system gives Φ′V(t) + ΦV(t)′ =AΦV(t) + G(t), which implies ΦV(t)′ = G(t) since Φ′ = AΦ.

Φ is invertible (since its columns are linearly independent), hence V(t)′ =Φ−1G(t) and V(t) =

∫Φ−1G(t)dt. Hence

Xp = Φ

∫Φ−1G(t)dt,

Page 40: Introduction to Differential Equations - Ryan Lok-Wing Pang

40 CHAPTER 5. SYSTEMS OF FIRST-ORDER ODES

and the general solution is given by

X = Xh + Xp = ΦC + Φ

∫Φ−1G(t)dt.

Page 41: Introduction to Differential Equations - Ryan Lok-Wing Pang

Bibliography[1] B. Poonen, Differential Equations Lecture Notes at MIT, 2014.

[2] J R. Chansnov, Differential Equations Lecture Notes at HKUST, 2014.

[3] W. E. Boyce and R. C. Diprima, Elementary Differential Equations andBoundary Value Problems, 8th Ed., Wiley, 2005.

41