SlideShare a Scribd company logo
Introduction to Differential
Equations
Lecture notes for MATH 2351/2352
Jeffrey R. Chasnov
The Hong Kong University of
Science and Technology
The Hong Kong University of Science and Technology
Department of Mathematics
Clear Water Bay, Kowloon
Hong Kong
Copyright cβ—‹ 2009–2014 by Jeffrey Robert Chasnov
This work is licensed under the Creative Commons Attribution 3.0 Hong Kong License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/hk/
or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.
Preface
What follows are my lecture notes for a first course in differential equations,
taught at the Hong Kong University of Science and Technology. Included in
these notes are links to short tutorial videos posted on YouTube.
Much of the material of Chapters 2-6 and 8 has been adapted from the
widely used textbook β€œElementary differential equations and boundary value
problems” by Boyce & DiPrima (John Wiley & Sons, Inc., Seventh Edition,
cβ—‹2001). Many of the examples presented in these notes may be found in this
book. The material of Chapter 7 is adapted from the textbook β€œNonlinear
dynamics and chaos” by Steven H. Strogatz (Perseus Publishing, cβ—‹1994).
All web surfers are welcome to download these notes, watch the YouTube
videos, and to use the notes and videos freely for teaching and learning. An
associated free review book with links to YouTube videos is also available from
the ebook publisher bookboon.com. I welcome any comments, suggestions or
corrections sent by email to jeffrey.chasnov@ust.hk. Links to my website, these
lecture notes, my YouTube page, and the free ebook from bookboon.com are
given below.
Homepage:
http://www.math.ust.hk/~machas
YouTube:
https://www.youtube.com/user/jchasnov
Lecture notes:
http://www.math.ust.hk/~machas/differential-equations.pdf
Bookboon:
http://bookboon.com/en/differential-equations-with-youtube-examples-ebook
iii
Contents
0 A short mathematical review 1
0.1 The trigonometric functions . . . . . . . . . . . . . . . . . . . . . 1
0.2 The exponential function and the natural logarithm . . . . . . . 1
0.3 Definition of the derivative . . . . . . . . . . . . . . . . . . . . . 2
0.4 Differentiating a combination of functions . . . . . . . . . . . . . 2
0.4.1 The sum or difference rule . . . . . . . . . . . . . . . . . . 2
0.4.2 The product rule . . . . . . . . . . . . . . . . . . . . . . . 2
0.4.3 The quotient rule . . . . . . . . . . . . . . . . . . . . . . . 2
0.4.4 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . 3
0.5 Differentiating elementary functions . . . . . . . . . . . . . . . . 3
0.5.1 The power rule . . . . . . . . . . . . . . . . . . . . . . . . 3
0.5.2 Trigonometric functions . . . . . . . . . . . . . . . . . . . 3
0.5.3 Exponential and natural logarithm functions . . . . . . . 3
0.6 Definition of the integral . . . . . . . . . . . . . . . . . . . . . . . 3
0.7 The fundamental theorem of calculus . . . . . . . . . . . . . . . . 4
0.8 Definite and indefinite integrals . . . . . . . . . . . . . . . . . . . 5
0.9 Indefinite integrals of elementary functions . . . . . . . . . . . . . 5
0.10 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
0.11 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . 6
0.12 Taylor series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
0.13 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1 Introduction to odes 11
1.1 The simplest type of differential equation . . . . . . . . . . . . . 11
2 First-order odes 13
2.1 The Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Separable equations . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.1 Compound interest . . . . . . . . . . . . . . . . . . . . . . 20
2.4.2 Chemical reactions . . . . . . . . . . . . . . . . . . . . . . 21
2.4.3 Terminal velocity . . . . . . . . . . . . . . . . . . . . . . . 23
2.4.4 Escape velocity . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.5 RC circuit . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.6 The logistic equation . . . . . . . . . . . . . . . . . . . . . 27
v
vi CONTENTS
3 Second-order odes, constant coefficients 29
3.1 The Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 The principle of superposition . . . . . . . . . . . . . . . . . . . . 30
3.3 The Wronskian . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4 Homogeneous odes . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.4.1 Real, distinct roots . . . . . . . . . . . . . . . . . . . . . . 32
3.4.2 Complex conjugate, distinct roots . . . . . . . . . . . . . 34
3.4.3 Repeated roots . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5 Inhomogeneous odes . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.6 First-order linear inhomogeneous odes revisited . . . . . . . . . . 41
3.7 Resonance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.8 Damped resonance . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 The Laplace transform 47
4.1 Definition and properties . . . . . . . . . . . . . . . . . . . . . . . 47
4.2 Solution of initial value problems . . . . . . . . . . . . . . . . . . 51
4.3 Heaviside and Dirac delta functions . . . . . . . . . . . . . . . . . 54
4.3.1 Heaviside function . . . . . . . . . . . . . . . . . . . . . . 54
4.3.2 Dirac delta function . . . . . . . . . . . . . . . . . . . . . 56
4.4 Discontinuous or impulsive terms . . . . . . . . . . . . . . . . . . 57
5 Series solutions 61
5.1 Ordinary points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.2 Regular singular points: Cauchy-Euler equations . . . . . . . . . 65
5.2.1 Real, distinct roots . . . . . . . . . . . . . . . . . . . . . . 67
5.2.2 Complex conjugate roots . . . . . . . . . . . . . . . . . . 67
5.2.3 Repeated roots . . . . . . . . . . . . . . . . . . . . . . . . 67
6 Systems of equations 69
6.1 Determinants and the eigenvalue problem . . . . . . . . . . . . . 69
6.2 Coupled first-order equations . . . . . . . . . . . . . . . . . . . . 71
6.2.1 Two distinct real eigenvalues . . . . . . . . . . . . . . . . 71
6.2.2 Complex conjugate eigenvalues . . . . . . . . . . . . . . . 75
6.2.3 Repeated eigenvalues with one eigenvector . . . . . . . . . 77
6.3 Normal modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7 Nonlinear differential equations 83
7.1 Fixed points and stability . . . . . . . . . . . . . . . . . . . . . . 83
7.1.1 One dimension . . . . . . . . . . . . . . . . . . . . . . . . 83
7.1.2 Two dimensions . . . . . . . . . . . . . . . . . . . . . . . 84
7.2 One-dimensional bifurcations . . . . . . . . . . . . . . . . . . . . 87
7.2.1 Saddle-node bifurcation . . . . . . . . . . . . . . . . . . . 87
7.2.2 Transcritical bifurcation . . . . . . . . . . . . . . . . . . . 88
7.2.3 Supercritical pitchfork bifurcation . . . . . . . . . . . . . 88
7.2.4 Subcritical pitchfork bifurcation . . . . . . . . . . . . . . 89
7.2.5 Application: a mathematical model of a fishery . . . . . . 92
7.3 Two-dimensional bifurcations . . . . . . . . . . . . . . . . . . . . 94
7.3.1 Supercritical Hopf bifurcation . . . . . . . . . . . . . . . . 94
7.3.2 Subcritical Hopf bifurcation . . . . . . . . . . . . . . . . . 95
CONTENTS vii
8 Partial differential equations 97
8.1 Derivation of the diffusion equation . . . . . . . . . . . . . . . . . 97
8.2 Derivation of the wave equation . . . . . . . . . . . . . . . . . . . 98
8.3 Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4 Fourier cosine and sine series . . . . . . . . . . . . . . . . . . . . 102
8.5 Solution of the diffusion equation . . . . . . . . . . . . . . . . . . 104
8.5.1 Homogeneous boundary conditions . . . . . . . . . . . . . 104
8.5.2 Inhomogeneous boundary conditions . . . . . . . . . . . . 108
8.5.3 Pipe with closed ends . . . . . . . . . . . . . . . . . . . . 109
8.6 Solution of the wave equation . . . . . . . . . . . . . . . . . . . . 112
8.6.1 Plucked string . . . . . . . . . . . . . . . . . . . . . . . . 112
8.6.2 Hammered string . . . . . . . . . . . . . . . . . . . . . . . 114
8.6.3 General initial conditions . . . . . . . . . . . . . . . . . . 114
8.7 The Laplace equation . . . . . . . . . . . . . . . . . . . . . . . . 115
8.7.1 Dirichlet problem for a rectangle . . . . . . . . . . . . . . 115
8.7.2 Dirichlet problem for a circle . . . . . . . . . . . . . . . . 116
viii CONTENTS
Chapter 0
A short mathematical
review
A basic understanding of calculus is required to undertake a study of differential
equations. This zero chapter presents a short review.
0.1 The trigonometric functions
The Pythagorean trigonometric identity is
sin2
π‘₯ + cos2
π‘₯ = 1,
and the addition theorems are
sin(π‘₯ + 𝑦) = sin(π‘₯) cos(𝑦) + cos(π‘₯) sin(𝑦),
cos(π‘₯ + 𝑦) = cos(π‘₯) cos(𝑦) βˆ’ sin(π‘₯) sin(𝑦).
Also, the values of sin π‘₯ in the first quadrant can be remembered by the rule of
quarters, with 0∘
= 0, 30∘
= πœ‹/6, 45∘
= πœ‹/4, 60∘
= πœ‹/3, 90∘
= πœ‹/2:
sin 0∘
=
βˆšοΈ‚
0
4
, sin 30∘
=
βˆšοΈ‚
1
4
, sin 45∘
=
βˆšοΈ‚
2
4
,
sin 60∘
=
βˆšοΈ‚
3
4
, sin 90∘
=
βˆšοΈ‚
4
4
.
The following symmetry properties are also useful:
sin(πœ‹/2 βˆ’ π‘₯) = cos π‘₯, cos(πœ‹/2 βˆ’ π‘₯) = sin π‘₯;
and
sin(βˆ’π‘₯) = βˆ’ sin(π‘₯), cos(βˆ’π‘₯) = cos(π‘₯).
0.2 The exponential function and the natural
logarithm
The transcendental number 𝑒, approximately 2.71828, is defined as
𝑒 = lim
π‘›β†’βˆž
(οΈ‚
1 +
1
𝑛
)οΈ‚ 𝑛
.
1
2 CHAPTER 0. A SHORT MATHEMATICAL REVIEW
The exponential function exp (π‘₯) = 𝑒 π‘₯
and natural logarithm ln π‘₯ are inverse
functions satisfying
𝑒ln π‘₯
= π‘₯, ln 𝑒 π‘₯
= π‘₯.
The usual rules of exponents apply:
𝑒 π‘₯
𝑒 𝑦
= 𝑒 π‘₯+𝑦
, 𝑒 π‘₯
/𝑒 𝑦
= 𝑒 π‘₯βˆ’π‘¦
, (𝑒 π‘₯
) 𝑝
= 𝑒 𝑝π‘₯
.
The corresponding rules for the logarithmic function are
ln (π‘₯𝑦) = ln π‘₯ + ln 𝑦, ln (π‘₯/𝑦) = ln π‘₯ βˆ’ ln 𝑦, ln π‘₯ 𝑝
= 𝑝 ln π‘₯.
0.3 Definition of the derivative
The derivative of the function 𝑦 = 𝑓(π‘₯), denoted as 𝑓′
(π‘₯) or 𝑑𝑦/𝑑π‘₯, is defined
as the slope of the tangent line to the curve 𝑦 = 𝑓(π‘₯) at the point (π‘₯, 𝑦). This
slope is obtained by a limit, and is defined as
𝑓′
(π‘₯) = lim
β„Žβ†’0
𝑓(π‘₯ + β„Ž) βˆ’ 𝑓(π‘₯)
β„Ž
. (1)
0.4 Differentiating a combination of functions
0.4.1 The sum or difference rule
The derivative of the sum of 𝑓(π‘₯) and 𝑔(π‘₯) is
(𝑓 + 𝑔)β€²
= 𝑓′
+ 𝑔′
.
Similarly, the derivative of the difference is
(𝑓 βˆ’ 𝑔)β€²
= 𝑓′
βˆ’ 𝑔′
.
0.4.2 The product rule
The derivative of the product of 𝑓(π‘₯) and 𝑔(π‘₯) is
(𝑓 𝑔)β€²
= 𝑓′
𝑔 + 𝑓 𝑔′
,
and should be memorized as β€œthe derivative of the first times the second plus
the first times the derivative of the second.”
0.4.3 The quotient rule
The derivative of the quotient of 𝑓(π‘₯) and 𝑔(π‘₯) is
(οΈ‚
𝑓
𝑔
)οΈ‚β€²
=
𝑓′
𝑔 βˆ’ 𝑓 𝑔′
𝑔2
,
and should be memorized as β€œthe derivative of the top times the bottom minus
the top times the derivative of the bottom over the bottom squared.”
0.5. DIFFERENTIATING ELEMENTARY FUNCTIONS 3
0.4.4 The chain rule
The derivative of the composition of 𝑓(π‘₯) and 𝑔(π‘₯) is
(︁
𝑓
(οΈ€
𝑔(π‘₯)
)οΈ€)︁′
= 𝑓′
(οΈ€
𝑔(π‘₯)
)οΈ€
Β· 𝑔′
(π‘₯),
and should be memorized as β€œthe derivative of the outside times the derivative
of the inside.”
0.5 Differentiating elementary functions
0.5.1 The power rule
The derivative of a power of π‘₯ is given by
𝑑
𝑑π‘₯
π‘₯ 𝑝
= 𝑝π‘₯ π‘βˆ’1
.
0.5.2 Trigonometric functions
The derivatives of sin π‘₯ and cos π‘₯ are
(sin π‘₯)β€²
= cos π‘₯, (cos π‘₯)β€²
= βˆ’ sin π‘₯.
We thus say that β€œthe derivative of sine is cosine,” and β€œthe derivative of cosine
is minus sine.” Notice that the second derivatives satisfy
(sin π‘₯)β€²β€²
= βˆ’ sin π‘₯, (cos π‘₯)β€²β€²
= βˆ’ cos π‘₯.
0.5.3 Exponential and natural logarithm functions
The derivative of 𝑒 π‘₯
and ln π‘₯ are
(𝑒 π‘₯
)β€²
= 𝑒 π‘₯
, (ln π‘₯)β€²
=
1
π‘₯
.
0.6 Definition of the integral
The definite integral of a function 𝑓(π‘₯) > 0 from π‘₯ = π‘Ž to 𝑏 (𝑏 > π‘Ž) is defined
as the area bounded by the vertical lines π‘₯ = π‘Ž, π‘₯ = 𝑏, the x-axis and the curve
𝑦 = 𝑓(π‘₯). This β€œarea under the curve” is obtained by a limit. First, the area is
approximated by a sum of rectangle areas. Second, the integral is defined to be
the limit of the rectangle areas as the width of each individual rectangle goes to
zero and the number of rectangles goes to infinity. This resulting infinite sum
is called a Riemann Sum, and we define
∫︁ 𝑏
π‘Ž
𝑓(π‘₯)𝑑π‘₯ = lim
β„Žβ†’0
π‘βˆ‘οΈ
𝑛=1
𝑓
(οΈ€
π‘Ž + (𝑛 βˆ’ 1)β„Ž
)οΈ€
Β· β„Ž, (2)
where 𝑁 = (𝑏 βˆ’ π‘Ž)/β„Ž is the number of terms in the sum. The symbols on the
left-hand-side of (2) are read as β€œthe integral from π‘Ž to 𝑏 of f of x dee x.” The
4 CHAPTER 0. A SHORT MATHEMATICAL REVIEW
Riemann Sum definition is extended to all values of π‘Ž and 𝑏 and for all values
of 𝑓(π‘₯) (positive and negative). Accordingly,
∫︁ π‘Ž
𝑏
𝑓(π‘₯)𝑑π‘₯ = βˆ’
∫︁ 𝑏
π‘Ž
𝑓(π‘₯)𝑑π‘₯ and
∫︁ 𝑏
π‘Ž
(βˆ’π‘“(π‘₯))𝑑π‘₯ = βˆ’
∫︁ 𝑏
π‘Ž
𝑓(π‘₯)𝑑π‘₯.
Also, if π‘Ž < 𝑏 < 𝑐, then
∫︁ 𝑐
π‘Ž
𝑓(π‘₯)𝑑π‘₯ =
∫︁ 𝑏
π‘Ž
𝑓(π‘₯)𝑑π‘₯ +
∫︁ 𝑐
𝑏
𝑓(π‘₯)𝑑π‘₯,
which states (when 𝑓(π‘₯) > 0) that the total area equals the sum of its parts.
0.7 The fundamental theorem of calculus
view tutorial
Using the definition of the derivative, we differentiate the following integral:
𝑑
𝑑π‘₯
∫︁ π‘₯
π‘Ž
𝑓(𝑠)𝑑𝑠 = lim
β„Žβ†’0
βˆ«οΈ€ π‘₯+β„Ž
π‘Ž
𝑓(𝑠)𝑑𝑠 βˆ’
βˆ«οΈ€ π‘₯
π‘Ž
𝑓(𝑠)𝑑𝑠
β„Ž
= lim
β„Žβ†’0
βˆ«οΈ€ π‘₯+β„Ž
π‘₯
𝑓(𝑠)𝑑𝑠
β„Ž
= lim
β„Žβ†’0
β„Žπ‘“(π‘₯)
β„Ž
= 𝑓(π‘₯).
This result is called the fundamental theorem of calculus, and provides a con-
nection between differentiation and integration.
The fundamental theorem teaches us how to integrate functions. Let 𝐹(π‘₯)
be a function such that 𝐹′
(π‘₯) = 𝑓(π‘₯). We say that 𝐹(π‘₯) is an antiderivative of
𝑓(π‘₯). Then from the fundamental theorem and the fact that the derivative of a
constant equals zero,
𝐹(π‘₯) =
∫︁ π‘₯
π‘Ž
𝑓(𝑠)𝑑𝑠 + 𝑐.
Now, 𝐹(π‘Ž) = 𝑐 and 𝐹(𝑏) =
βˆ«οΈ€ 𝑏
π‘Ž
𝑓(𝑠)𝑑𝑠 + 𝐹(π‘Ž). Therefore, the fundamental
theorem shows us how to integrate a function 𝑓(π‘₯) provided we can find its
antiderivative:
∫︁ 𝑏
π‘Ž
𝑓(𝑠)𝑑𝑠 = 𝐹(𝑏) βˆ’ 𝐹(π‘Ž). (3)
Unfortunately, finding antiderivatives is much harder than finding derivatives,
and indeed, most complicated functions cannot be integrated analytically.
We can also derive the very important result (3) directly from the definition
of the derivative (1) and the definite integral (2). We will see it is convenient
0.8. DEFINITE AND INDEFINITE INTEGRALS 5
to choose the same β„Ž in both limits. With 𝐹′
(π‘₯) = 𝑓(π‘₯), we have
∫︁ 𝑏
π‘Ž
𝑓(𝑠)𝑑𝑠 =
∫︁ 𝑏
π‘Ž
𝐹′
(𝑠)𝑑𝑠
= lim
β„Žβ†’0
π‘βˆ‘οΈ
𝑛=1
𝐹′
(οΈ€
π‘Ž + (𝑛 βˆ’ 1)β„Ž
)οΈ€
Β· β„Ž
= lim
β„Žβ†’0
π‘βˆ‘οΈ
𝑛=1
𝐹(π‘Ž + π‘›β„Ž) βˆ’ 𝐹
(οΈ€
π‘Ž + (𝑛 βˆ’ 1)β„Ž
)οΈ€
β„Ž
Β· β„Ž
= lim
β„Žβ†’0
π‘βˆ‘οΈ
𝑛=1
𝐹(π‘Ž + π‘›β„Ž) βˆ’ 𝐹
(οΈ€
π‘Ž + (𝑛 βˆ’ 1)β„Ž
)οΈ€
.
The last expression has an interesting structure. All the values of 𝐹(π‘₯) eval-
uated at the points lying between the endpoints π‘Ž and 𝑏 cancel each other in
consecutive terms. Only the value βˆ’πΉ(π‘Ž) survives when 𝑛 = 1, and the value
+𝐹(𝑏) when 𝑛 = 𝑁, yielding again (3).
0.8 Definite and indefinite integrals
The Riemann sum definition of an integral is called a definite integral. It is
convenient to also define an indefinite integral by
∫︁
𝑓(π‘₯)𝑑π‘₯ = 𝐹(π‘₯),
where F(x) is the antiderivative of 𝑓(π‘₯).
0.9 Indefinite integrals of elementary functions
From our known derivatives of elementary functions, we can determine some
simple indefinite integrals. The power rule gives us
∫︁
π‘₯ 𝑛
𝑑π‘₯ =
π‘₯ 𝑛+1
𝑛 + 1
+ 𝑐, 𝑛 ΜΈ= βˆ’1.
When 𝑛 = βˆ’1, and π‘₯ is positive, we have
∫︁
1
π‘₯
𝑑π‘₯ = ln π‘₯ + 𝑐.
If π‘₯ is negative, using the chain rule we have
𝑑
𝑑π‘₯
ln (βˆ’π‘₯) =
1
π‘₯
.
Therefore, since
|π‘₯| =
{οΈ‚
βˆ’π‘₯ if π‘₯ < 0;
π‘₯ if π‘₯ > 0,
we can generalize our indefinite integral to strictly positive or strictly negative
π‘₯: ∫︁
1
π‘₯
𝑑π‘₯ = ln |π‘₯| + 𝑐.
6 CHAPTER 0. A SHORT MATHEMATICAL REVIEW
Trigonometric functions can also be integrated:
∫︁
cos π‘₯𝑑π‘₯ = sin π‘₯ + 𝑐,
∫︁
sin π‘₯𝑑π‘₯ = βˆ’ cos π‘₯ + 𝑐.
Easily proved identities are an addition rule:
∫︁
(οΈ€
𝑓(π‘₯) + 𝑔(π‘₯)
)οΈ€
𝑑π‘₯ =
∫︁
𝑓(π‘₯)𝑑π‘₯ +
∫︁
𝑔(π‘₯)𝑑π‘₯;
and multiplication by a constant:
∫︁
𝐴𝑓(π‘₯)𝑑π‘₯ = 𝐴
∫︁
𝑓(π‘₯)𝑑π‘₯.
This permits integration of functions such as
∫︁
(π‘₯2
+ 7π‘₯ + 2)𝑑π‘₯ =
π‘₯3
3
+
7π‘₯2
2
+ 2π‘₯ + 𝑐,
and ∫︁
(5 cos π‘₯ + sin π‘₯)𝑑π‘₯ = 5 sin π‘₯ βˆ’ cos π‘₯ + 𝑐.
0.10 Substitution
More complicated functions can be integrated using the chain rule. Since
𝑑
𝑑π‘₯
𝑓
(οΈ€
𝑔(π‘₯)
)οΈ€
= 𝑓′
(οΈ€
𝑔(π‘₯)
)οΈ€
Β· 𝑔′
(π‘₯),
we have ∫︁
𝑓′
(οΈ€
𝑔(π‘₯)
)οΈ€
Β· 𝑔′
(π‘₯)𝑑π‘₯ = 𝑓
(οΈ€
𝑔(π‘₯)
)οΈ€
+ 𝑐.
This integration formula is usually implemented by letting 𝑦 = 𝑔(π‘₯). Then one
writes 𝑑𝑦 = 𝑔′
(π‘₯)𝑑π‘₯ to obtain
∫︁
𝑓′
(οΈ€
𝑔(π‘₯)
)οΈ€
𝑔′
(π‘₯)𝑑π‘₯ =
∫︁
𝑓′
(𝑦)𝑑𝑦
= 𝑓(𝑦) + 𝑐
= 𝑓
(οΈ€
𝑔(π‘₯)
)οΈ€
+ 𝑐.
0.11 Integration by parts
Another integration technique makes use of the product rule for differentiation.
Since
(𝑓 𝑔)β€²
= 𝑓′
𝑔 + 𝑓 𝑔′
,
we have
𝑓′
𝑔 = (𝑓 𝑔)β€²
βˆ’ 𝑓 𝑔′
.
Therefore, ∫︁
𝑓′
(π‘₯)𝑔(π‘₯)𝑑π‘₯ = 𝑓(π‘₯)𝑔(π‘₯) βˆ’
∫︁
𝑓(π‘₯)𝑔′
(π‘₯)𝑑π‘₯.
0.12. TAYLOR SERIES 7
Commonly, the above integral is done by writing
𝑒 = 𝑔(π‘₯) 𝑑𝑣 = 𝑓′
(π‘₯)𝑑π‘₯
𝑑𝑒 = 𝑔′
(π‘₯)𝑑π‘₯ 𝑣 = 𝑓(π‘₯).
Then, the formula to be memorized is
∫︁
𝑒𝑑𝑣 = 𝑒𝑣 βˆ’
∫︁
𝑣𝑑𝑒.
0.12 Taylor series
A Taylor series of a function 𝑓(π‘₯) about a point π‘₯ = π‘Ž is a power series rep-
resentation of 𝑓(π‘₯) developed so that all the derivatives of 𝑓(π‘₯) at π‘Ž match all
the derivatives of the power series. Without worrying about convergence here,
we have
𝑓(π‘₯) = 𝑓(π‘Ž) + 𝑓′
(π‘Ž)(π‘₯ βˆ’ π‘Ž) +
𝑓′′
(π‘Ž)
2!
(π‘₯ βˆ’ π‘Ž)2
+
𝑓′′′
(π‘Ž)
3!
(π‘₯ βˆ’ π‘Ž)3
+ . . . .
Notice that the first term in the power series matches 𝑓(π‘Ž), all other terms
vanishing, the second term matches 𝑓′
(π‘Ž), all other terms vanishing, etc. Com-
monly, the Taylor series is developed with π‘Ž = 0. We will also make use of the
Taylor series in a slightly different form, with π‘₯ = π‘₯* + πœ– and π‘Ž = π‘₯*:
𝑓(π‘₯* + πœ–) = 𝑓(π‘₯*) + 𝑓′
(π‘₯*)πœ– +
𝑓′′
(π‘₯*)
2!
πœ–2
+
𝑓′′′
(π‘₯*)
3!
πœ–3
+ . . . .
Another way to view this series is that of 𝑔(πœ–) = 𝑓(π‘₯* + πœ–), expanded about
πœ– = 0.
Taylor series that are commonly used include
𝑒 π‘₯
= 1 + π‘₯ +
π‘₯2
2!
+
π‘₯3
3!
+ . . . ,
sin π‘₯ = π‘₯ βˆ’
π‘₯3
3!
+
π‘₯5
5!
βˆ’ . . . ,
cos π‘₯ = 1 βˆ’
π‘₯2
2!
+
π‘₯4
4!
βˆ’ . . . ,
1
1 + π‘₯
= 1 βˆ’ π‘₯ + π‘₯2
βˆ’ . . . , for |π‘₯| < 1,
ln (1 + π‘₯) = π‘₯ βˆ’
π‘₯2
2
+
π‘₯3
3
βˆ’ . . . , for |π‘₯| < 1.
A Taylor series of a function of several variables can also be developed. Here,
all partial derivatives of 𝑓(π‘₯, 𝑦) at (π‘Ž, 𝑏) match all the partial derivatives of the
power series. With the notation
𝑓 π‘₯ =
πœ•π‘“
πœ•π‘₯
, 𝑓 𝑦 =
πœ•π‘“
πœ•π‘¦
, 𝑓 π‘₯π‘₯ =
πœ•2
𝑓
πœ•π‘₯2
, 𝑓 π‘₯𝑦 =
πœ•2
𝑓
πœ•π‘₯πœ•π‘¦
, 𝑓 𝑦𝑦 =
πœ•2
𝑓
πœ•π‘¦2
, etc.,
we have
𝑓(π‘₯, 𝑦) = 𝑓(π‘Ž, 𝑏) + 𝑓 π‘₯(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž) + 𝑓 𝑦(π‘Ž, 𝑏)(𝑦 βˆ’ 𝑏)
+
1
2!
(οΈ€
𝑓 π‘₯π‘₯(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž)2
+ 2𝑓 π‘₯𝑦(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž)(𝑦 βˆ’ 𝑏) + 𝑓 𝑦𝑦(π‘Ž, 𝑏)(𝑦 βˆ’ 𝑏)2
)οΈ€
+ . . .
8 CHAPTER 0. A SHORT MATHEMATICAL REVIEW
0.13 Complex numbers
view tutorial: Complex Numbers
view tutorial: Complex Exponential Function
We define the imaginary number 𝑖 to be one of the two numbers that satisfies
the rule (𝑖)2
= βˆ’1, the other number being βˆ’π‘–. Formally, we write 𝑖 =
√
βˆ’1. A
complex number 𝑧 is written as
𝑧 = π‘₯ + 𝑖𝑦,
where π‘₯ and 𝑦 are real numbers. We call π‘₯ the real part of 𝑧 and 𝑦 the imaginary
part and write
π‘₯ = Re 𝑧, 𝑦 = Im 𝑧.
Two complex numbers are equal if and only if their real and imaginary parts
are equal.
The complex conjugate of 𝑧 = π‘₯ + 𝑖𝑦, denoted as ¯𝑧, is defined as
¯𝑧 = π‘₯ βˆ’ 𝑖𝑦.
Using 𝑧 and ¯𝑧, we have
Re 𝑧 =
1
2
(𝑧 + ¯𝑧) , Im 𝑧 =
1
2𝑖
(𝑧 βˆ’ ¯𝑧) .
Furthermore,
𝑧¯𝑧 = (π‘₯ + 𝑖𝑦)(π‘₯ βˆ’ 𝑖𝑦)
= π‘₯2
βˆ’ 𝑖2
𝑦2
= π‘₯2
+ 𝑦2
;
and we define the absolute value of 𝑧, also called the modulus of 𝑧, by
|𝑧| = (𝑧¯𝑧)1/2
=
βˆšοΈ€
π‘₯2 + 𝑦2.
We can add, subtract, multiply and divide complex numbers to get new
complex numbers. With 𝑧 = π‘₯ + 𝑖𝑦 and 𝑀 = 𝑠 + 𝑖𝑑, and π‘₯, 𝑦, 𝑠, 𝑑 real numbers,
we have
𝑧 + 𝑀 = (π‘₯ + 𝑠) + 𝑖(𝑦 + 𝑑); 𝑧 βˆ’ 𝑀 = (π‘₯ βˆ’ 𝑠) + 𝑖(𝑦 βˆ’ 𝑑);
𝑧𝑀 = (π‘₯ + 𝑖𝑦)(𝑠 + 𝑖𝑑)
= (π‘₯𝑠 βˆ’ 𝑦𝑑) + 𝑖(π‘₯𝑑 + 𝑦𝑠);
𝑧
𝑀
=
𝑧 ¯𝑀
𝑀 ¯𝑀
=
(π‘₯ + 𝑖𝑦)(𝑠 βˆ’ 𝑖𝑑)
𝑠2 + 𝑑2
=
(π‘₯𝑠 + 𝑦𝑑)
𝑠2 + 𝑑2
+ 𝑖
(𝑦𝑠 βˆ’ π‘₯𝑑)
𝑠2 + 𝑑2
.
0.13. COMPLEX NUMBERS 9
Furthermore,
|𝑧𝑀| =
βˆšοΈ€
(π‘₯𝑠 βˆ’ 𝑦𝑑)2 + (π‘₯𝑑 + 𝑦𝑠)2
=
βˆšοΈ€
(π‘₯2 + 𝑦2)(𝑠2 + 𝑑2)
= |𝑧||𝑀|;
and
𝑧𝑀 = (π‘₯𝑠 βˆ’ 𝑦𝑑) βˆ’ 𝑖(π‘₯𝑑 + 𝑦𝑠)
= (π‘₯ βˆ’ 𝑖𝑦)(𝑠 βˆ’ 𝑖𝑑)
= ¯𝑧 ¯𝑀.
Similarly
βƒ’
βƒ’
βƒ’
𝑧
𝑀
βƒ’
βƒ’
βƒ’ =
|𝑧|
|𝑀|
, (
𝑧
𝑀
) =
¯𝑧
¯𝑀
.
Also, 𝑧 + 𝑀 = 𝑧 + 𝑀. However, |𝑧 + 𝑀| ≀ |𝑧| + |𝑀|, a theorem known as the
triangle inequality.
It is especially interesting and useful to consider the exponential function of
an imaginary argument. Using the Taylor series expansion of an exponential
function, we have
π‘’π‘–πœƒ
= 1 + (π‘–πœƒ) +
(π‘–πœƒ)2
2!
+
(π‘–πœƒ)3
3!
+
(π‘–πœƒ)4
4!
+
(π‘–πœƒ)5
5!
. . .
=
(οΈ‚
1 βˆ’
πœƒ2
2!
+
πœƒ4
4!
βˆ’ . . .
)οΈ‚
+ 𝑖
(οΈ‚
πœƒ βˆ’
πœƒ3
3!
+
πœƒ5
5!
+ . . .
)οΈ‚
= cos πœƒ + 𝑖 sin πœƒ.
Therefore, we have
cos πœƒ = Re π‘’π‘–πœƒ
, sin πœƒ = Im π‘’π‘–πœƒ
.
Since cos πœ‹ = βˆ’1 and sin πœ‹ = 0, we derive the celebrated Euler’s identity
π‘’π‘–πœ‹
+ 1 = 0,
that links five fundamental numbers, 0, 1, 𝑖, 𝑒 and πœ‹, using three basic mathe-
matical operations, addition, multiplication and exponentiation, only once.
Using the even property cos (βˆ’πœƒ) = cos πœƒ and the odd property sin (βˆ’πœƒ) =
βˆ’ sin πœƒ, we also have
π‘’βˆ’π‘–πœƒ
= cos πœƒ βˆ’ 𝑖 sin πœƒ;
and the identities for π‘’π‘–πœƒ
and π‘’βˆ’π‘–πœƒ
results in the frequently used expressions,
cos πœƒ =
π‘’π‘–πœƒ
+ π‘’βˆ’π‘–πœƒ
2
, sin πœƒ =
π‘’π‘–πœƒ
βˆ’ π‘’βˆ’π‘–πœƒ
2𝑖
.
The complex number 𝑧 can be represented in the complex plane with Re 𝑧
as the π‘₯-axis and Im 𝑧 as the 𝑦-axis. This leads to the polar representation of
𝑧 = π‘₯ + 𝑖𝑦:
𝑧 = π‘Ÿπ‘’π‘–πœƒ
,
where π‘Ÿ = |𝑧| and tan πœƒ = 𝑦/π‘₯. We define arg 𝑧 = πœƒ. Note that πœƒ is not unique,
though it is conventional to choose the value such that βˆ’πœ‹ < πœƒ ≀ πœ‹, and πœƒ = 0
when π‘Ÿ = 0.
10 CHAPTER 0. A SHORT MATHEMATICAL REVIEW
Useful trigonometric relations can be derived using π‘’π‘–πœƒ
and properties of the
exponential function. The addition law can be derived from
𝑒𝑖(π‘₯+𝑦)
= 𝑒𝑖π‘₯
𝑒𝑖𝑦
.
We have
cos(π‘₯ + 𝑦) + 𝑖 sin(π‘₯ + 𝑦) = (cos π‘₯ + 𝑖 sin π‘₯)(cos 𝑦 + 𝑖 sin 𝑦)
= (cos π‘₯ cos 𝑦 βˆ’ sin π‘₯ sin 𝑦) + 𝑖(sin π‘₯ cos 𝑦 + cos π‘₯ sin 𝑦);
yielding
cos(π‘₯ + 𝑦) = cos π‘₯ cos 𝑦 βˆ’ sin π‘₯ sin 𝑦, sin(π‘₯ + 𝑦) = sin π‘₯ cos 𝑦 + cos π‘₯ sin 𝑦.
De Moivre’s Theorem derives from π‘’π‘–π‘›πœƒ
= (π‘’π‘–πœƒ
) 𝑛
, yielding the identity
cos(π‘›πœƒ) + 𝑖 sin(π‘›πœƒ) = (cos πœƒ + 𝑖 sin πœƒ) 𝑛
.
For example, if 𝑛 = 2, we derive
cos 2πœƒ + 𝑖 sin 2πœƒ = (cos πœƒ + 𝑖 sin πœƒ)2
= (cos2
πœƒ βˆ’ sin2
πœƒ) + 2𝑖 cos πœƒ sin πœƒ.
Therefore,
cos 2πœƒ = cos2
πœƒ βˆ’ sin2
πœƒ, sin 2πœƒ = 2 cos πœƒ sin πœƒ.
With a little more manipulation using cos2
πœƒ + sin2
πœƒ = 1, we can derive
cos2
πœƒ =
1 + cos 2πœƒ
2
, sin2
πœƒ =
1 βˆ’ cos 2πœƒ
2
,
which are useful formulas for determining
∫︁
cos2
πœƒ π‘‘πœƒ =
1
4
(2πœƒ + sin 2πœƒ) + 𝑐,
∫︁
sin2
πœƒ π‘‘πœƒ =
1
4
(2πœƒ βˆ’ sin 2πœƒ) + 𝑐,
from which follows
∫︁ 2πœ‹
0
sin2
πœƒ π‘‘πœƒ =
∫︁ 2πœ‹
0
cos2
πœƒ π‘‘πœƒ = πœ‹.
Chapter 1
Introduction to odes
A differential equation is an equation for a function that relates the values of
the function to the values of its derivatives. An ordinary differential equation
(ode) is a differential equation for a function of a single variable, e.g., π‘₯(𝑑), while
a partial differential equation (pde) is a differential equation for a function of
several variables, e.g., 𝑣(π‘₯, 𝑦, 𝑧, 𝑑). An ode contains ordinary derivatives and a
pde contains partial derivatives. Typically, pde’s are much harder to solve than
ode’s.
1.1 The simplest type of differential equation
view tutorial
The simplest ordinary differential equations can be integrated directly by finding
antiderivatives. These simplest odes have the form
𝑑 𝑛
π‘₯
𝑑𝑑 𝑛
= 𝐺(𝑑),
where the derivative of π‘₯ = π‘₯(𝑑) can be of any order, and the right-hand-side
may depend only on the independent variable 𝑑. As an example, consider a mass
falling under the influence of constant gravity, such as approximately found on
the Earth’s surface. Newton’s law, 𝐹 = π‘šπ‘Ž, results in the equation
π‘š
𝑑2
π‘₯
𝑑𝑑2
= βˆ’π‘šπ‘”,
where π‘₯ is the height of the object above the ground, π‘š is the mass of the
object, and 𝑔 = 9.8 meter/sec2
is the constant gravitational acceleration. As
Galileo suggested, the mass cancels from the equation, and
𝑑2
π‘₯
𝑑𝑑2
= βˆ’π‘”.
Here, the right-hand-side of the ode is a constant. The first integration, obtained
by antidifferentiation, yields
𝑑π‘₯
𝑑𝑑
= 𝐴 βˆ’ 𝑔𝑑,
11
12 CHAPTER 1. INTRODUCTION TO ODES
with 𝐴 the first constant of integration; and the second integration yields
π‘₯ = 𝐡 + 𝐴𝑑 βˆ’
1
2
𝑔𝑑2
,
with 𝐡 the second constant of integration. The two constants of integration 𝐴
and 𝐡 can then be determined from the initial conditions. If we know that the
initial height of the mass is π‘₯0, and the initial velocity is 𝑣0, then the initial
conditions are
π‘₯(0) = π‘₯0,
𝑑π‘₯
𝑑𝑑
(0) = 𝑣0.
Substitution of these initial conditions into the equations for 𝑑π‘₯/𝑑𝑑 and π‘₯ allows
us to solve for 𝐴 and 𝐡. The unique solution that satisfies both the ode and
the initial conditions is given by
π‘₯(𝑑) = π‘₯0 + 𝑣0 𝑑 βˆ’
1
2
𝑔𝑑2
. (1.1)
For example, suppose we drop a ball off the top of a 50 meter building. How
long will it take the ball to hit the ground? This question requires solution of
(1.1) for the time 𝑇 it takes for π‘₯(𝑇) = 0, given π‘₯0 = 50 meter and 𝑣0 = 0.
Solving for 𝑇,
𝑇 =
βˆšοΈ‚
2π‘₯0
𝑔
=
βˆšοΈ‚
2 Β· 50
9.8
sec
β‰ˆ 3.2sec.
Chapter 2
First-order differential
equations
Reference: Boyce and DiPrima, Chapter 2
The general first-order differential equation for the function 𝑦 = 𝑦(π‘₯) is written
as
𝑑𝑦
𝑑π‘₯
= 𝑓(π‘₯, 𝑦), (2.1)
where 𝑓(π‘₯, 𝑦) can be any function of the independent variable π‘₯ and the depen-
dent variable 𝑦. We first show how to determine a numerical solution of this
equation, and then learn techniques for solving analytically some special forms
of (2.1), namely, separable and linear first-order equations.
2.1 The Euler method
view tutorial
Although it is not always possible to find an analytical solution of (2.1) for
𝑦 = 𝑦(π‘₯), it is always possible to determine a unique numerical solution given
an initial value 𝑦(π‘₯0) = 𝑦0, and provided 𝑓(π‘₯, 𝑦) is a well-behaved function.
The differential equation (2.1) gives us the slope 𝑓(π‘₯0, 𝑦0) of the tangent line
to the solution curve 𝑦 = 𝑦(π‘₯) at the point (π‘₯0, 𝑦0). With a small step size
Ξ”π‘₯, the initial condition (π‘₯0, 𝑦0) can be marched forward in the x-coordinate
to π‘₯ = π‘₯0 + Ξ”π‘₯, and along the tangent line using Euler’s method to obtain the
y-coordinate
𝑦(π‘₯0 + Ξ”π‘₯) = 𝑦(π‘₯0) + Ξ”π‘₯𝑓(π‘₯0, 𝑦0).
This solution (π‘₯0 + Ξ”π‘₯, 𝑦0 + Δ𝑦) then becomes the new initial condition and is
marched forward in the x-coordinate another Ξ”π‘₯, and along the newly deter-
mined tangent line. For small enough Ξ”π‘₯, the numerical solution converges to
the exact solution.
13
14 CHAPTER 2. FIRST-ORDER ODES
2.2 Separable equations
view tutorial
A first-order ode is separable if it can be written in the form
𝑔(𝑦)
𝑑𝑦
𝑑π‘₯
= 𝑓(π‘₯), 𝑦(π‘₯0) = 𝑦0, (2.2)
where the function 𝑔(𝑦) is independent of π‘₯ and 𝑓(π‘₯) is independent of 𝑦. Inte-
gration from π‘₯0 to π‘₯ results in
∫︁ π‘₯
π‘₯0
𝑔(𝑦(π‘₯))𝑦′
(π‘₯)𝑑π‘₯ =
∫︁ π‘₯
π‘₯0
𝑓(π‘₯)𝑑π‘₯.
The integral on the left can be transformed by substituting 𝑒 = 𝑦(π‘₯), 𝑑𝑒 =
𝑦′
(π‘₯)𝑑π‘₯, and changing the lower and upper limits of integration to 𝑦(π‘₯0) = 𝑦0
and 𝑦(π‘₯) = 𝑦. Therefore,
∫︁ 𝑦
𝑦0
𝑔(𝑒)𝑑𝑒 =
∫︁ π‘₯
π‘₯0
𝑓(π‘₯)𝑑π‘₯,
and since 𝑒 is a dummy variable of integration, we can write this in the equivalent
form ∫︁ 𝑦
𝑦0
𝑔(𝑦)𝑑𝑦 =
∫︁ π‘₯
π‘₯0
𝑓(π‘₯)𝑑π‘₯. (2.3)
A simpler procedure that also yields (2.3) is to treat 𝑑𝑦/𝑑π‘₯ in (2.2) like a fraction.
Multiplying (2.2) by 𝑑π‘₯ results in
𝑔(𝑦)𝑑𝑦 = 𝑓(π‘₯)𝑑π‘₯,
which is a separated equation with all the dependent variables on the left-side,
and all the independent variables on the right-side. Equation (2.3) then results
directly upon integration.
Example: Solve 𝑑𝑦
𝑑π‘₯ + 1
2 𝑦 = 3
2 , with 𝑦(0) = 2.
We first manipulate the differential equation to the form
𝑑𝑦
𝑑π‘₯
=
1
2
(3 βˆ’ 𝑦), (2.4)
and then treat 𝑑𝑦/𝑑π‘₯ as if it was a fraction to separate variables:
𝑑𝑦
3 βˆ’ 𝑦
=
1
2
𝑑π‘₯.
We integrate the right-side from the initial condition π‘₯ = 0 to π‘₯ and the left-side
from the initial condition 𝑦(0) = 2 to 𝑦. Accordingly,
∫︁ 𝑦
2
𝑑𝑦
3 βˆ’ 𝑦
=
1
2
∫︁ π‘₯
0
𝑑π‘₯. (2.5)
2.2. SEPARABLE EQUATIONS 15
0 1 2 3 4 5 6 7
0
1
2
3
4
5
6
x
y
dy/dx + y/2 = 3/2
Figure 2.1: Solution of the following ode: 𝑑𝑦
𝑑π‘₯ + 1
2 𝑦 = 3
2 .
The integrals in (2.5) need to be done. Note that 𝑦(π‘₯) < 3 for finite π‘₯ or the
integral on the left-side diverges. Therefore, 3 βˆ’ 𝑦 > 0 and integration yields
βˆ’ ln (3 βˆ’ 𝑦)
]οΈ€ 𝑦
2
=
1
2
π‘₯
]οΈ€ π‘₯
0
,
ln (3 βˆ’ 𝑦) = βˆ’
1
2
π‘₯,
3 βˆ’ 𝑦 = π‘’βˆ’ 1
2 π‘₯
,
𝑦 = 3 βˆ’ π‘’βˆ’ 1
2 π‘₯
.
Since this is our first nontrivial analytical solution, it is prudent to check our
result. We do this by differentiating our solution:
𝑑𝑦
𝑑π‘₯
=
1
2
π‘’βˆ’ 1
2 π‘₯
=
1
2
(3 βˆ’ 𝑦);
and checking the initial conditions, 𝑦(0) = 3 βˆ’ 𝑒0
= 2. Therefore, our solution
satisfies both the original ode and the initial condition.
Example: Solve 𝑑𝑦
𝑑π‘₯ + 1
2 𝑦 = 3
2 , with 𝑦(0) = 4.
This is the identical differential equation as before, but with different initial
conditions. We will jump directly to the integration step:
∫︁ 𝑦
4
𝑑𝑦
3 βˆ’ 𝑦
=
1
2
∫︁ π‘₯
0
𝑑π‘₯.
16 CHAPTER 2. FIRST-ORDER ODES
Now 𝑦(π‘₯) > 3, so that 𝑦 βˆ’ 3 > 0 and integration yields
βˆ’ ln (𝑦 βˆ’ 3)
]οΈ€ 𝑦
4
=
1
2
π‘₯
]οΈ€ π‘₯
0
,
ln (𝑦 βˆ’ 3) = βˆ’
1
2
π‘₯,
𝑦 βˆ’ 3 = π‘’βˆ’ 1
2 π‘₯
,
𝑦 = 3 + π‘’βˆ’ 1
2 π‘₯
.
The solution curves for a range of initial conditions is presented in Fig. 2.1.
All solutions have a horizontal asymptote at 𝑦 = 3 at which 𝑑𝑦/𝑑π‘₯ = 0. For
𝑦(0) = 𝑦0, the general solution can be shown to be 𝑦(π‘₯) = 3+(𝑦0βˆ’3) exp(βˆ’π‘₯/2).
Example: Solve 𝑑𝑦
𝑑π‘₯ = 2 cos 2π‘₯
3+2𝑦 , with 𝑦(0) = βˆ’1. (i) For what values of
π‘₯ > 0 does the solution exist? (ii) For what value of π‘₯ > 0 is 𝑦(π‘₯)
maximum?
Notice that the solution of the ode may not exist when 𝑦 = βˆ’3/2, since 𝑑𝑦/𝑑π‘₯ β†’
∞. We separate variables and integrate from initial conditions:
(3 + 2𝑦)𝑑𝑦 = 2 cos 2π‘₯ 𝑑π‘₯
∫︁ 𝑦
βˆ’1
(3 + 2𝑦)𝑑𝑦 = 2
∫︁ π‘₯
0
cos 2π‘₯ 𝑑π‘₯
3𝑦 + 𝑦2
]οΈ€ 𝑦
βˆ’1
= sin 2π‘₯
]οΈ€ π‘₯
0
𝑦2
+ 3𝑦 + 2 βˆ’ sin 2π‘₯ = 0
𝑦± =
1
2
[βˆ’3 Β±
√
1 + 4 sin 2π‘₯].
Solving the quadratic equation for 𝑦 has introduced a spurious solution that
does not satisfy the initial conditions. We test:
𝑦±(0) =
1
2
[βˆ’3 Β± 1] =
{οΈ‚
-1;
-2.
Only the + root satisfies the initial condition, so that the unique solution to the
ode and initial condition is
𝑦 =
1
2
[βˆ’3 +
√
1 + 4 sin 2π‘₯]. (2.6)
To determine (i) the values of π‘₯ > 0 for which the solution exists, we require
1 + 4 sin 2π‘₯ β‰₯ 0,
or
sin 2π‘₯ β‰₯ βˆ’
1
4
. (2.7)
Notice that at π‘₯ = 0, we have sin 2π‘₯ = 0; at π‘₯ = πœ‹/4, we have sin 2π‘₯ = 1;
at π‘₯ = πœ‹/2, we have sin 2π‘₯ = 0; and at π‘₯ = 3πœ‹/4, we have sin 2π‘₯ = βˆ’1 We
therefore need to determine the value of π‘₯ such that sin 2π‘₯ = βˆ’1/4, with π‘₯ in
the range πœ‹/2 < π‘₯ < 3πœ‹/4. The solution to the ode will then exist for all π‘₯
between zero and this value.
2.3. LINEAR EQUATIONS 17
0 0.5 1 1.5
βˆ’1.6
βˆ’1.4
βˆ’1.2
βˆ’1
βˆ’0.8
βˆ’0.6
βˆ’0.4
βˆ’0.2
0
x
y
(3+2y) dy/dx = 2 cos 2x, y(0) = βˆ’1
Figure 2.2: Solution of the following ode: (3 + 2𝑦)𝑦′
= 2 cos 2π‘₯, 𝑦(0) = βˆ’1.
To solve sin 2π‘₯ = βˆ’1/4 for π‘₯ in the interval πœ‹/2 < π‘₯ < 3πœ‹/4, one needs to
recall the definition of arcsin, or sinβˆ’1
, as found on a typical scientific calculator.
The inverse of the function
𝑓(π‘₯) = sin π‘₯, βˆ’πœ‹/2 ≀ π‘₯ ≀ πœ‹/2
is denoted by arcsin. The first solution with π‘₯ > 0 of the equation sin 2π‘₯ = βˆ’1/4
places 2π‘₯ in the interval (πœ‹, 3πœ‹/2), so to invert this equation using the arcsine
we need to apply the identity sin (πœ‹ βˆ’ π‘₯) = sin π‘₯, and rewrite sin 2π‘₯ = βˆ’1/4 as
sin (πœ‹ βˆ’ 2π‘₯) = βˆ’1/4. The solution of this equation may then be found by taking
the arcsine, and is
πœ‹ βˆ’ 2π‘₯ = arcsin (βˆ’1/4),
or
π‘₯ =
1
2
(οΈ‚
πœ‹ + arcsin
1
4
)οΈ‚
.
Therefore the solution exists for 0 ≀ π‘₯ ≀ (πœ‹ + arcsin (1/4)) /2 = 1.6971 . . . ,
where we have used a calculator value (computing in radians) to find arcsin(0.25) =
0.2527 . . . . At the value (π‘₯, 𝑦) = (1.6971 . . . , βˆ’3/2), the solution curve ends and
𝑑𝑦/𝑑π‘₯ becomes infinite.
To determine (ii) the value of π‘₯ at which 𝑦 = 𝑦(π‘₯) is maximum, we examine
(2.6) directly. The value of 𝑦 will be maximum when sin 2π‘₯ takes its maximum
value over the interval where the solution exists. This will be when 2π‘₯ = πœ‹/2,
or π‘₯ = πœ‹/4 = 0.7854 . . . .
The graph of 𝑦 = 𝑦(π‘₯) is shown in Fig. 2.2.
2.3 Linear equations
view tutorial
18 CHAPTER 2. FIRST-ORDER ODES
The first-order linear differential equation (linear in 𝑦 and its derivative) can be
written in the form
𝑑𝑦
𝑑π‘₯
+ 𝑝(π‘₯)𝑦 = 𝑔(π‘₯), (2.8)
with the initial condition 𝑦(π‘₯0) = 𝑦0. Linear first-order equations can be inte-
grated using an integrating factor πœ‡(π‘₯). We multiply (2.8) by πœ‡(π‘₯),
πœ‡(π‘₯)
[οΈ‚
𝑑𝑦
𝑑π‘₯
+ 𝑝(π‘₯)𝑦
]οΈ‚
= πœ‡(π‘₯)𝑔(π‘₯), (2.9)
and try to determine πœ‡(π‘₯) so that
πœ‡(π‘₯)
[οΈ‚
𝑑𝑦
𝑑π‘₯
+ 𝑝(π‘₯)𝑦
]οΈ‚
=
𝑑
𝑑π‘₯
[πœ‡(π‘₯)𝑦]. (2.10)
Equation (2.9) then becomes
𝑑
𝑑π‘₯
[πœ‡(π‘₯)𝑦] = πœ‡(π‘₯)𝑔(π‘₯). (2.11)
Equation (2.11) is easily integrated using πœ‡(π‘₯0) = πœ‡0 and 𝑦(π‘₯0) = 𝑦0:
πœ‡(π‘₯)𝑦 βˆ’ πœ‡0 𝑦0 =
∫︁ π‘₯
π‘₯0
πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯,
or
𝑦 =
1
πœ‡(π‘₯)
(οΈ‚
πœ‡0 𝑦0 +
∫︁ π‘₯
π‘₯0
πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯
)οΈ‚
. (2.12)
It remains to determine πœ‡(π‘₯) from (2.10). Differentiating and expanding (2.10)
yields
πœ‡
𝑑𝑦
𝑑π‘₯
+ π‘πœ‡π‘¦ =
π‘‘πœ‡
𝑑π‘₯
𝑦 + πœ‡
𝑑𝑦
𝑑π‘₯
;
and upon simplifying,
π‘‘πœ‡
𝑑π‘₯
= π‘πœ‡. (2.13)
Equation (2.13) is separable and can be integrated:
∫︁ πœ‡
πœ‡0
π‘‘πœ‡
πœ‡
=
∫︁ π‘₯
π‘₯0
𝑝(π‘₯)𝑑π‘₯,
ln
πœ‡
πœ‡0
=
∫︁ π‘₯
π‘₯0
𝑝(π‘₯)𝑑π‘₯,
πœ‡(π‘₯) = πœ‡0 exp
(οΈ‚βˆ«οΈ π‘₯
π‘₯0
𝑝(π‘₯)𝑑π‘₯
)οΈ‚
.
Notice that since πœ‡0 cancels out of (2.12), it is customary to assign πœ‡0 = 1. The
solution to (2.8) satisfying the initial condition 𝑦(π‘₯0) = 𝑦0 is then commonly
written as
𝑦 =
1
πœ‡(π‘₯)
(οΈ‚
𝑦0 +
∫︁ π‘₯
π‘₯0
πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯
)οΈ‚
,
with
πœ‡(π‘₯) = exp
(οΈ‚βˆ«οΈ π‘₯
π‘₯0
𝑝(π‘₯)𝑑π‘₯
)οΈ‚
the integrating factor. This important result finds frequent use in applied math-
ematics.
2.3. LINEAR EQUATIONS 19
Example: Solve 𝑑𝑦
𝑑π‘₯ + 2𝑦 = π‘’βˆ’π‘₯
, with 𝑦(0) = 3/4.
Note that this equation is not separable. With 𝑝(π‘₯) = 2 and 𝑔(π‘₯) = π‘’βˆ’π‘₯
, we
have
πœ‡(π‘₯) = exp
(οΈ‚βˆ«οΈ π‘₯
0
2𝑑π‘₯
)οΈ‚
= 𝑒2π‘₯
,
and
𝑦 = π‘’βˆ’2π‘₯
(οΈ‚
3
4
+
∫︁ π‘₯
0
𝑒2π‘₯
π‘’βˆ’π‘₯
𝑑π‘₯
)οΈ‚
= π‘’βˆ’2π‘₯
(οΈ‚
3
4
+
∫︁ π‘₯
0
𝑒 π‘₯
𝑑π‘₯
)οΈ‚
= π‘’βˆ’2π‘₯
(οΈ‚
3
4
+ (𝑒 π‘₯
βˆ’ 1)
)οΈ‚
= π‘’βˆ’2π‘₯
(οΈ‚
𝑒 π‘₯
βˆ’
1
4
)οΈ‚
= π‘’βˆ’π‘₯
(οΈ‚
1 βˆ’
1
4
π‘’βˆ’π‘₯
)οΈ‚
.
Example: Solve 𝑑𝑦
𝑑π‘₯ βˆ’ 2π‘₯𝑦 = π‘₯, with 𝑦(0) = 0.
This equation is separable, and we solve it in two ways. First, using an inte-
grating factor with 𝑝(π‘₯) = βˆ’2π‘₯ and 𝑔(π‘₯) = π‘₯:
πœ‡(π‘₯) = exp
(οΈ‚
βˆ’2
∫︁ π‘₯
0
π‘₯𝑑π‘₯
)οΈ‚
= π‘’βˆ’π‘₯2
,
and
𝑦 = 𝑒 π‘₯2
∫︁ π‘₯
0
π‘₯π‘’βˆ’π‘₯2
𝑑π‘₯.
The integral can be done by substitution with 𝑒 = π‘₯2
, 𝑑𝑒 = 2π‘₯𝑑π‘₯:
∫︁ π‘₯
0
π‘₯π‘’βˆ’π‘₯2
𝑑π‘₯ =
1
2
∫︁ π‘₯2
0
π‘’βˆ’π‘’
𝑑𝑒
= βˆ’
1
2
π‘’βˆ’π‘’
]οΈ€ π‘₯2
0
=
1
2
(︁
1 βˆ’ π‘’βˆ’π‘₯2
)︁
.
Therefore,
𝑦 =
1
2
𝑒 π‘₯2
(︁
1 βˆ’ π‘’βˆ’π‘₯2
)︁
=
1
2
(︁
𝑒 π‘₯2
βˆ’ 1
)︁
.
20 CHAPTER 2. FIRST-ORDER ODES
Second, we integrate by separating variables:
𝑑𝑦
𝑑π‘₯
βˆ’ 2π‘₯𝑦 = π‘₯,
𝑑𝑦
𝑑π‘₯
= π‘₯(1 + 2𝑦),
∫︁ 𝑦
0
𝑑𝑦
1 + 2𝑦
=
∫︁ π‘₯
0
π‘₯𝑑π‘₯,
1
2
ln (1 + 2𝑦) =
1
2
π‘₯2
,
1 + 2𝑦 = 𝑒 π‘₯2
,
𝑦 =
1
2
(︁
𝑒 π‘₯2
βˆ’ 1
)︁
.
The results from the two different solution methods are the same, and the choice
of method is a personal preference.
2.4 Applications
2.4.1 Compound interest
view tutorial
The equation for the growth of an investment with continuous compounding
of interest is a first-order differential equation. Let 𝑆(𝑑) be the value of the
investment at time 𝑑, and let π‘Ÿ be the annual interest rate compounded after
every time interval Δ𝑑. We can also include deposits (or withdrawals). Let π‘˜ be
the annual deposit amount, and suppose that an installment is deposited after
every time interval Δ𝑑. The value of the investment at the time 𝑑 + Δ𝑑 is then
given by
𝑆(𝑑 + Δ𝑑) = 𝑆(𝑑) + (π‘ŸΞ”π‘‘)𝑆(𝑑) + π‘˜Ξ”π‘‘, (2.14)
where at the end of the time interval Δ𝑑, π‘ŸΞ”π‘‘π‘†(𝑑) is the amount of interest
credited and π‘˜Ξ”π‘‘ is the amount of money deposited (π‘˜ > 0) or withdrawn
(π‘˜ < 0). As a numerical example, if the account held $10,000 at time 𝑑, and
π‘Ÿ = 6% per year and π‘˜ = $12,000 per year, say, and the compounding and
deposit period is Δ𝑑 = 1 month = 1/12 year, then the interest awarded after
one month is π‘ŸΞ”π‘‘π‘† = (0.06/12) Γ— $10,000 = $50, and the amount deposited is
π‘˜Ξ”π‘‘ = $1000.
Rearranging the terms of (2.14) to exhibit what will soon become a deriva-
tive, we have
𝑆(𝑑 + Δ𝑑) βˆ’ 𝑆(𝑑)
Δ𝑑
= π‘Ÿπ‘†(𝑑) + π‘˜.
The equation for continuous compounding of interest and continuous deposits
is obtained by taking the limit Δ𝑑 β†’ 0. The resulting differential equation is
𝑑𝑆
𝑑𝑑
= π‘Ÿπ‘† + π‘˜, (2.15)
which can solved with the initial condition 𝑆(0) = 𝑆0, where 𝑆0 is the initial
capital. We can solve either by separating variables or by using an integrating
2.4. APPLICATIONS 21
factor; I solve here by separating variables. Integrating from 𝑑 = 0 to a final
time 𝑑,
∫︁ 𝑆
𝑆0
𝑑𝑆
π‘Ÿπ‘† + π‘˜
=
∫︁ 𝑑
0
𝑑𝑑,
1
π‘Ÿ
ln
(οΈ‚
π‘Ÿπ‘† + π‘˜
π‘Ÿπ‘†0 + π‘˜
)οΈ‚
= 𝑑,
π‘Ÿπ‘† + π‘˜ = (π‘Ÿπ‘†0 + π‘˜)𝑒 π‘Ÿπ‘‘
,
𝑆 =
π‘Ÿπ‘†0 𝑒 π‘Ÿπ‘‘
+ π‘˜π‘’ π‘Ÿπ‘‘
βˆ’ π‘˜
π‘Ÿ
,
𝑆 = 𝑆0 𝑒 π‘Ÿπ‘‘
+
π‘˜
π‘Ÿ
𝑒 π‘Ÿπ‘‘
(οΈ€
1 βˆ’ π‘’βˆ’π‘Ÿπ‘‘
)οΈ€
, (2.16)
where the first term on the right-hand side of (2.16) comes from the initial
invested capital, and the second term comes from the deposits (or withdrawals).
Evidently, compounding results in the exponential growth of an investment.
As a practical example, we can analyze a simple retirement plan. It is
easiest to assume that all amounts and returns are in real dollars (adjusted for
inflation). Suppose a 25 year-old plans to set aside a fixed amount every year of
his/her working life, invests at a real return of 6%, and retires at age 65. How
much must he/she invest each year to have $8,000,000 at retirement? We need
to solve (2.16) for π‘˜ using 𝑑 = 40 years, 𝑆(𝑑) = $8,000,000, 𝑆0 = 0, and π‘Ÿ = 0.06
per year. We have
π‘˜ =
π‘Ÿπ‘†(𝑑)
𝑒 π‘Ÿπ‘‘ βˆ’ 1
,
π‘˜ =
0.06 Γ— 8,000,000
𝑒0.06Γ—40 βˆ’ 1
,
= $47,889 yearβˆ’1
.
To have saved approximately one million US$ at retirement, the worker would
need to save about HK$50,000 per year over his/her working life. Note that the
amount saved over the worker’s life is approximately 40Γ—$50,000 = $2,000,000,
while the amount earned on the investment (at the assumed 6% real return) is
approximately $8,000,000 βˆ’ $2,000,000 = $6,000,000. The amount earned from
the investment is about 3Γ— the amount saved, even with the modest real return
of 6%. Sound investment planning is well worth the effort.
2.4.2 Chemical reactions
Suppose that two chemicals 𝐴 and 𝐡 react to form a product 𝐢, which we write
as
𝐴 + 𝐡
π‘˜
β†’ 𝐢,
where π‘˜ is called the rate constant of the reaction. For simplicity, we will use
the same symbol 𝐢, say, to refer to both the chemical 𝐢 and its concentration.
The law of mass action says that 𝑑𝐢/𝑑𝑑 is proportional to the product of the
concentrations 𝐴 and 𝐡, with proportionality constant π‘˜; that is,
𝑑𝐢
𝑑𝑑
= π‘˜π΄π΅. (2.17)
22 CHAPTER 2. FIRST-ORDER ODES
Similarly, the law of mass action enables us to write equations for the time-
derivatives of the reactant concentrations 𝐴 and 𝐡:
𝑑𝐴
𝑑𝑑
= βˆ’π‘˜π΄π΅,
𝑑𝐡
𝑑𝑑
= βˆ’π‘˜π΄π΅. (2.18)
The ode given by (2.17) can be solved analytically using conservation laws. We
assume that 𝐴0 and 𝐡0 are the initial concentrations of the reactants, and that
no product is initially present. From (2.17) and (2.18),
𝑑
𝑑𝑑
(𝐴 + 𝐢) = 0 =β‡’ 𝐴 + 𝐢 = 𝐴0,
𝑑
𝑑𝑑
(𝐡 + 𝐢) = 0 =β‡’ 𝐡 + 𝐢 = 𝐡0.
Using these conservation laws, (2.17) becomes
𝑑𝐢
𝑑𝑑
= π‘˜(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢), 𝐢(0) = 0,
which is a nonlinear equation that may be integrated by separating variables.
Separating and integrating, we obtain
∫︁ 𝐢
0
𝑑𝐢
(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢)
= π‘˜
∫︁ 𝑑
0
𝑑𝑑
= π‘˜π‘‘. (2.19)
The remaining integral can be done using the method of partial fractions. We
write
1
(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢)
=
π‘Ž
𝐴0 βˆ’ 𝐢
+
𝑏
𝐡0 βˆ’ 𝐢
. (2.20)
The cover-up method is the simplest method to determine the unknown coeffi-
cients π‘Ž and 𝑏. To determine π‘Ž, we multiply both sides of (2.20) by 𝐴0 βˆ’ 𝐢 and
set 𝐢 = 𝐴0 to find
π‘Ž =
1
𝐡0 βˆ’ 𝐴0
.
Similarly, to determine 𝑏, we multiply both sides of (2.20) by 𝐡0 βˆ’ 𝐢 and set
𝐢 = 𝐡0 to find
𝑏 =
1
𝐴0 βˆ’ 𝐡0
.
Therefore,
1
(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢)
=
1
𝐡0 βˆ’ 𝐴0
(οΈ‚
1
𝐴0 βˆ’ 𝐢
βˆ’
1
𝐡0 βˆ’ 𝐢
)οΈ‚
,
and the remaining integral of (2.19) becomes (using 𝐢 < 𝐴0, 𝐡0)
∫︁ 𝐢
0
𝑑𝐢
(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢)
=
1
𝐡0 βˆ’ 𝐴0
(οΈƒβˆ«οΈ 𝐢
0
𝑑𝐢
𝐴0 βˆ’ 𝐢
βˆ’
∫︁ 𝐢
0
𝑑𝐢
𝐡0 βˆ’ 𝐢
)οΈƒ
=
1
𝐡0 βˆ’ 𝐴0
(οΈ‚
βˆ’ ln
(οΈ‚
𝐴0 βˆ’ 𝐢
𝐴0
)οΈ‚
+ ln
(οΈ‚
𝐡0 βˆ’ 𝐢
𝐡0
)οΈ‚)οΈ‚
=
1
𝐡0 βˆ’ 𝐴0
ln
(οΈ‚
𝐴0(𝐡0 βˆ’ 𝐢)
𝐡0(𝐴0 βˆ’ 𝐢)
)οΈ‚
.
2.4. APPLICATIONS 23
Using this integral in (2.19), multiplying by (𝐡0 βˆ’ 𝐴0) and exponentiating, we
obtain
𝐴0(𝐡0 βˆ’ 𝐢)
𝐡0(𝐴0 βˆ’ 𝐢)
= 𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘
.
Solving for 𝐢, we finally obtain
𝐢(𝑑) = 𝐴0 𝐡0
𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘
βˆ’ 1
𝐡0 𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘ βˆ’ 𝐴0
,
which appears to be a complicated expression, but has the simple limits
lim
π‘‘β†’βˆž
𝐢(𝑑) =
{οΈƒ
𝐴0, if 𝐴0 < 𝐡0,
𝐡0, if 𝐡0 < 𝐴0
= min(𝐴0, 𝐡0).
As one would expect, the reaction stops after one of the reactants is depleted;
and the final concentration of product is equal to the initial concentration of
the depleted reactant.
2.4.3 Terminal velocity
view tutorial
Using Newton’s law, we model a mass π‘š free falling under gravity but with
air resistance. We assume that the force of air resistance is proportional to the
speed of the mass and opposes the direction of motion. We define the π‘₯-axis to
point in the upward direction, opposite the force of gravity. Near the surface
of the Earth, the force of gravity is approximately constant and is given by
βˆ’π‘šπ‘”, with 𝑔 = 9.8 m/s2
the usual gravitational acceleration. The force of air
resistance is modeled by βˆ’π‘˜π‘£, where 𝑣 is the vertical velocity of the mass and
π‘˜ is a positive constant. When the mass is falling, 𝑣 < 0 and the force of air
resistance is positive, pointing upward and opposing the motion. The total force
on the mass is therefore given by 𝐹 = βˆ’π‘šπ‘” βˆ’ π‘˜π‘£. With 𝐹 = π‘šπ‘Ž and π‘Ž = 𝑑𝑣/𝑑𝑑,
we obtain the differential equation
π‘š
𝑑𝑣
𝑑𝑑
= βˆ’π‘šπ‘” βˆ’ π‘˜π‘£. (2.21)
The terminal velocity π‘£βˆž of the mass is defined as the asymptotic velocity after
air resistance balances the gravitational force. When the mass is at terminal
velocity, 𝑑𝑣/𝑑𝑑 = 0 so that
π‘£βˆž = βˆ’
π‘šπ‘”
π‘˜
. (2.22)
The approach to the terminal velocity of a mass initially at rest is obtained by
solving (2.21) with initial condition 𝑣(0) = 0. The equation is both linear and
24 CHAPTER 2. FIRST-ORDER ODES
separable, and I solve by separating variables:
π‘š
∫︁ 𝑣
0
𝑑𝑣
π‘šπ‘” + π‘˜π‘£
= βˆ’
∫︁ 𝑑
0
𝑑𝑑,
π‘š
π‘˜
ln
(οΈ‚
π‘šπ‘” + π‘˜π‘£
π‘šπ‘”
)οΈ‚
= βˆ’π‘‘,
1 +
π‘˜π‘£
π‘šπ‘”
= π‘’βˆ’π‘˜π‘‘/π‘š
,
𝑣 = βˆ’
π‘šπ‘”
π‘˜
(︁
1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š
)︁
.
Therefore, 𝑣 = π‘£βˆž
(οΈ€
1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š
)οΈ€
, and 𝑣 approaches π‘£βˆž as the exponential term
decays to zero.
As an example, a skydiver of mass π‘š = 100 kg with his parachute closed
may have a terminal velocity of 200 km/hr. With
𝑔 = (9.8 m/s
2
)(10βˆ’3
km/m)(60 s/min)2
(60 min/hr)2
= 127, 008 km/hr
2
,
one obtains from (2.22), π‘˜ = 63, 504 kg/hr. One-half of the terminal velocity
for free-fall (100 km/hr) is therefore attained when (1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š
) = 1/2, or 𝑑 =
π‘š ln 2/π‘˜ β‰ˆ 4 sec. Approximately 95% of the terminal velocity (190 km/hr ) is
attained after 17 sec.
2.4.4 Escape velocity
view tutorial
An interesting physical problem is to find the smallest initial velocity for a
mass on the Earth’s surface to escape from the Earth’s gravitational field, the
so-called escape velocity. Newton’s law of universal gravitation asserts that the
gravitational force between two massive bodies is proportional to the product of
the two masses and inversely proportional to the square of the distance between
them. For a mass π‘š a position π‘₯ above the surface of the Earth, the force on
the mass is given by
𝐹 = βˆ’πΊ
𝑀 π‘š
(𝑅 + π‘₯)2
,
where 𝑀 and 𝑅 are the mass and radius of the Earth and 𝐺 is the gravitational
constant. The minus sign means the force on the mass π‘š points in the direction
of decreasing π‘₯. The approximately constant acceleration 𝑔 on the Earth’s
surface corresponds to the absolute value of 𝐹/π‘š when π‘₯ = 0:
𝑔 =
𝐺𝑀
𝑅2
,
and 𝑔 β‰ˆ 9.8 m/s2
. Newton’s law 𝐹 = π‘šπ‘Ž for the mass π‘š is thus given by
𝑑2
π‘₯
𝑑𝑑2
= βˆ’
𝐺𝑀
(𝑅 + π‘₯)2
= βˆ’
𝑔
(1 + π‘₯/𝑅)2
, (2.23)
where the radius of the Earth is known to be 𝑅 β‰ˆ 6350 km.
2.4. APPLICATIONS 25
A useful trick allows us to solve this second-order differential equation as
a first-order equation. First, note that 𝑑2
π‘₯/𝑑𝑑2
= 𝑑𝑣/𝑑𝑑. If we write 𝑣(𝑑) =
𝑣(π‘₯(𝑑))β€”considering the velocity of the mass π‘š to be a function of its distance
above the Earthβ€”we have using the chain rule
𝑑𝑣
𝑑𝑑
=
𝑑𝑣
𝑑π‘₯
𝑑π‘₯
𝑑𝑑
= 𝑣
𝑑𝑣
𝑑π‘₯
,
where we have used 𝑣 = 𝑑π‘₯/𝑑𝑑. Therefore, (2.23) becomes the first-order ode
𝑣
𝑑𝑣
𝑑π‘₯
= βˆ’
𝑔
(1 + π‘₯/𝑅)2
,
which may be solved assuming an initial velocity 𝑣(π‘₯ = 0) = 𝑣0 when the mass
is shot vertically from the Earth’s surface. Separating variables and integrating,
we obtain ∫︁ 𝑣
𝑣0
𝑣𝑑𝑣 = βˆ’π‘”
∫︁ π‘₯
0
𝑑π‘₯
(1 + π‘₯/𝑅)2
.
The left integral is 1
2 (𝑣2
βˆ’ 𝑣2
0), and the right integral can be performed using
the substitution 𝑒 = 1 + π‘₯/𝑅, 𝑑𝑒 = 𝑑π‘₯/𝑅:
∫︁ π‘₯
0
𝑑π‘₯
(1 + π‘₯/𝑅)2
= 𝑅
∫︁ 1+π‘₯/𝑅
1
𝑑𝑒
𝑒2
= βˆ’
𝑅
𝑒
]οΈ‚1+π‘₯/𝑅
1
= 𝑅 βˆ’
𝑅2
π‘₯ + 𝑅
=
𝑅π‘₯
π‘₯ + 𝑅
.
Therefore,
1
2
(𝑣2
βˆ’ 𝑣2
0) = βˆ’
𝑔𝑅π‘₯
π‘₯ + 𝑅
,
which when multiplied by π‘š is an expression of the conservation of energy (the
change of the kinetic energy of the mass is equal to the change in the potential
energy). Solving for 𝑣2
,
𝑣2
= 𝑣2
0 βˆ’
2𝑔𝑅π‘₯
π‘₯ + 𝑅
.
The escape velocity is defined as the minimum initial velocity 𝑣0 such that
the mass can escape to infinity. Therefore, 𝑣0 = 𝑣escape when 𝑣 β†’ 0 as π‘₯ β†’ ∞.
Taking this limit, we have
𝑣2
escape = lim
π‘₯β†’βˆž
2𝑔𝑅π‘₯
π‘₯ + 𝑅
= 2𝑔𝑅.
With 𝑅 β‰ˆ 6350 km and 𝑔 = 127 008 km/hr
2
, we determine 𝑣escape =
√
2𝑔𝑅 β‰ˆ
40 000 km/hr. In comparison, the muzzle velocity of a modern high-performance
rifle is 4300 km/hr, almost an order of magnitude too slow for a bullet, shot
into the sky, to escape the Earth’s gravity.
26 CHAPTER 2. FIRST-ORDER ODES
Β 
CΒ 
Β 
R
i
+Β 
_Β 
(a)Β 
(b)
Figure 2.3: RC circuit diagram.
2.4.5 RC circuit
view tutorial
Consider a resister 𝑅 and a capacitor 𝐢 connected in series as shown in Fig. 2.3.
A battery providing an electromotive force, or emf β„°, connects to this circuit
by a switch. Initially, there is no charge on the capacitor. When the switch
is thrown to a, the battery connects and the capacitor charges. When the
switch is thrown to b, the battery disconnects and the capacitor discharges,
with energy dissipated in the resister. Here, we determine the voltage drop
across the capacitor during charging and discharging.
The equations for the voltage drops across a capacitor and a resister are
given by
𝑉 𝐢 = π‘ž/𝐢, 𝑉 𝑅 = 𝑖𝑅, (2.24)
where 𝐢 is the capacitance and 𝑅 is the resistance. The charge π‘ž and the current
𝑖 are related by
𝑖 =
π‘‘π‘ž
𝑑𝑑
. (2.25)
Kirchhoff’s voltage law states that the emf β„° in any closed loop is equal to
the sum of the voltage drops in that loop. Applying Kirchhoff’s voltage law
when the switch is thrown to a results in
𝑉 𝑅 + 𝑉 𝐢 = β„°. (2.26)
Using (2.24) and (2.25), the voltage drop across the resister can be written in
terms of the voltage drop across the capacitor as
𝑉 𝑅 = 𝑅𝐢
𝑑𝑉 𝐢
𝑑𝑑
,
and (2.26) can be rewritten to yield the first-order linear differential equation
for 𝑉 𝑐 given by
𝑑𝑉 𝐢
𝑑𝑑
+ 𝑉 𝐢/𝑅𝐢 = β„°/𝑅𝐢, (2.27)
with initial condition 𝑉 𝐢(0) = 0.
2.4. APPLICATIONS 27
The integrating factor for this equation is
πœ‡(𝑑) = 𝑒 𝑑/𝑅𝐢
,
and (2.27) integrates to
𝑉 𝐢(𝑑) = π‘’βˆ’π‘‘/𝑅𝐢
∫︁ 𝑑
0
(β„°/𝑅𝐢)𝑒 𝑑/𝑅𝐢
𝑑𝑑,
with solution
𝑉 𝐢(𝑑) = β„°
(︁
1 βˆ’ π‘’βˆ’π‘‘/𝑅𝐢
)︁
.
The voltage starts at zero and rises exponentially to β„°, with characteristic time
scale given by 𝑅𝐢.
When the switch is thrown to b, application of Kirchhoff’s voltage law results
in
𝑉 𝑅 + 𝑉 𝐢 = 0,
with corresponding differential equation
𝑑𝑉 𝐢
𝑑𝑑
+ 𝑉 𝐢/𝑅𝐢 = 0.
Here, we assume that the capacitance is initially fully charged so that 𝑉 𝐢(0) = β„°.
The solution, then, during the discharge phase is given by
𝑉 𝐢(𝑑) = β„°π‘’βˆ’π‘‘/𝑅𝐢
.
The voltage starts at β„° and decays exponentially to zero, again with character-
istic time scale given by 𝑅𝐢.
2.4.6 The logistic equation
view tutorial
Let 𝑁 = 𝑁(𝑑) be the size of a population at time 𝑑 and let π‘Ÿ be the growth
rate. The Malthusian growth model (Thomas Malthus, 1766-1834), similar to
a compound interest model, is given by
𝑑𝑁
𝑑𝑑
= π‘Ÿπ‘.
Under a Malthusian growth model, a population grows exponentially like
𝑁(𝑑) = 𝑁0 𝑒 π‘Ÿπ‘‘
,
where 𝑁0 is the initial population size. However, when the population growth
is constrained by limited resources, a heuristic modification to the Malthusian
growth model results in the Verhulst equation,
𝑑𝑁
𝑑𝑑
= π‘Ÿπ‘
(οΈ‚
1 βˆ’
𝑁
𝐾
)οΈ‚
, (2.28)
where 𝐾 is called the carrying capacity of the environment. Making (2.28)
dimensionless using 𝜏 = π‘Ÿπ‘‘ and π‘₯ = 𝑁/𝐾 leads to the logistic equation,
𝑑π‘₯
π‘‘πœ
= π‘₯(1 βˆ’ π‘₯),
28 CHAPTER 2. FIRST-ORDER ODES
where we may assume the initial condition π‘₯(0) = π‘₯0 > 0. Separating variables
and integrating ∫︁ π‘₯
π‘₯0
𝑑π‘₯
π‘₯(1 βˆ’ π‘₯)
=
∫︁ 𝜏
0
π‘‘πœ.
The integral on the left-hand-side can be done using the method of partial
fractions:
1
π‘₯(1 βˆ’ π‘₯)
=
π‘Ž
π‘₯
+
𝑏
1 βˆ’ π‘₯
=
π‘Ž + (𝑏 βˆ’ π‘Ž)π‘₯
π‘₯(1 βˆ’ π‘₯)
;
and equating the coefficients of the numerators proportional to π‘₯0
and π‘₯1
, we
have π‘Ž = 𝑏 = 1. Therefore,
∫︁ π‘₯
π‘₯0
𝑑π‘₯
π‘₯(1 βˆ’ π‘₯)
=
∫︁ π‘₯
π‘₯0
𝑑π‘₯
π‘₯
+
∫︁ π‘₯
π‘₯0
𝑑π‘₯
(1 βˆ’ π‘₯)
= ln
π‘₯
π‘₯0
βˆ’ ln
1 βˆ’ π‘₯
1 βˆ’ π‘₯0
= ln
π‘₯(1 βˆ’ π‘₯0)
π‘₯0(1 βˆ’ π‘₯)
= 𝜏.
Solving for π‘₯, we first exponentiate both sides and then isolate π‘₯:
π‘₯(1 βˆ’ π‘₯0)
π‘₯0(1 βˆ’ π‘₯)
= 𝑒 𝜏
,
π‘₯(1 βˆ’ π‘₯0) = π‘₯0 𝑒 𝜏
βˆ’ π‘₯π‘₯0 𝑒 𝜏
,
π‘₯(1 βˆ’ π‘₯0 + π‘₯0 𝑒 𝜏
) = π‘₯0 𝑒 𝜏
,
π‘₯ =
π‘₯0
π‘₯0 + (1 βˆ’ π‘₯0)π‘’βˆ’πœ
. (2.29)
We observe that for π‘₯0 > 0, we have lim πœβ†’βˆž π‘₯(𝜏) = 1, corresponding to
lim
π‘‘β†’βˆž
𝑁(𝑑) = 𝐾.
The population, therefore, grows in size until it reaches the carrying capacity of
its environment.
Chapter 3
Second-order linear
differential equations with
constant coefficients
Reference: Boyce and DiPrima, Chapter 3
The general second-order linear differential equation with independent variable
𝑑 and dependent variable π‘₯ = π‘₯(𝑑) is given by
Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 𝑔(𝑑), (3.1)
where we have used the standard physics notation Λ™π‘₯ = 𝑑π‘₯/𝑑𝑑 and Β¨π‘₯ = 𝑑2
π‘₯/𝑑𝑑2
.
A unique solution of (3.1) requires initial values π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0.
The equation with constant coefficientsβ€”on which we will devote considerable
effortβ€”assumes that 𝑝(𝑑) and π‘ž(𝑑) are constants, independent of time. The
second-order linear ode is said to be homogeneous if 𝑔(𝑑) = 0.
3.1 The Euler method
view tutorial
In general, (3.1) cannot be solved analytically, and we begin by deriving an
algorithm for numerical solution. Consider the general second-order ode given
by
Β¨π‘₯ = 𝑓(𝑑, π‘₯, Λ™π‘₯).
We can write this second-order ode as a pair of first-order odes by defining
𝑒 = Λ™π‘₯, and writing the first-order system as
Λ™π‘₯ = 𝑒, (3.2)
˙𝑒 = 𝑓(𝑑, π‘₯, 𝑒). (3.3)
The first ode, (3.2), gives the slope of the tangent line to the curve π‘₯ = π‘₯(𝑑);
the second ode, (3.3), gives the slope of the tangent line to the curve 𝑒 = 𝑒(𝑑).
Beginning at the initial values (π‘₯, 𝑒) = (π‘₯0, 𝑒0) at the time 𝑑 = 𝑑0, we move
along the tangent lines to determine π‘₯1 = π‘₯(𝑑0 + Δ𝑑) and 𝑒1 = 𝑒(𝑑0 + Δ𝑑):
π‘₯1 = π‘₯0 + Δ𝑑𝑒0,
𝑒1 = 𝑒0 + Δ𝑑𝑓(𝑑0, π‘₯0, 𝑒0).
29
30 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
The values π‘₯1 and 𝑒1 at the time 𝑑1 = 𝑑0 +Δ𝑑 are then used as new initial values
to march the solution forward to time 𝑑2 = 𝑑1 + Δ𝑑. As long as 𝑓(𝑑, π‘₯, 𝑒) is a
well-behaved function, the numerical solution converges to the unique solution
of the ode as Δ𝑑 β†’ 0.
3.2 The principle of superposition
view tutorial
Consider the second-order linear homogeneous ode:
Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 0; (3.4)
and suppose that π‘₯ = 𝑋1(𝑑) and π‘₯ = 𝑋2(𝑑) are solutions to (3.4). We consider
a linear combination of 𝑋1 and 𝑋2 by letting
𝑋(𝑑) = 𝑐1 𝑋1(𝑑) + 𝑐2 𝑋2(𝑑), (3.5)
with 𝑐1 and 𝑐2 constants. The principle of superposition states that π‘₯ = 𝑋(𝑑)
is also a solution of (3.4). To prove this, we compute
¨𝑋 + 𝑝 ˙𝑋 + π‘žπ‘‹ = 𝑐1
¨𝑋1 + 𝑐2
¨𝑋2 + 𝑝
(︁
𝑐1
˙𝑋1 + 𝑐2
˙𝑋2
)︁
+ π‘ž (𝑐1 𝑋1 + 𝑐2 𝑋2)
= 𝑐1
(︁
¨𝑋1 + 𝑝 ˙𝑋1 + π‘žπ‘‹1
)︁
+ 𝑐2
(︁
¨𝑋2 + 𝑝 ˙𝑋2 + π‘žπ‘‹2
)︁
= 𝑐1 Γ— 0 + 𝑐2 Γ— 0
= 0,
since 𝑋1 and 𝑋2 were assumed to be solutions of (3.4). We have therefore shown
that any linear combination of solutions to the second-order linear homogeneous
ode is also a solution.
3.3 The Wronskian
view tutorial
Suppose that having determined that two solutions of (3.4) are π‘₯ = 𝑋1(𝑑) and
π‘₯ = 𝑋2(𝑑), we attempt to write the general solution to (3.4) as (3.5). We must
then ask whether this general solution will be able to satisfy the two initial
conditions given by
π‘₯(𝑑0) = π‘₯0, Λ™π‘₯(𝑑0) = 𝑒0. (3.6)
Applying these initial conditions to (3.5), we obtain
𝑐1 𝑋1(𝑑0) + 𝑐2 𝑋2(𝑑0) = π‘₯0,
𝑐1
˙𝑋1(𝑑0) + 𝑐2
˙𝑋2(𝑑0) = 𝑒0, (3.7)
which is observed to be a system of two linear equations for the two unknowns
𝑐1 and 𝑐2. Solution of (3.7) by standard methods results in
𝑐1 =
π‘₯0
˙𝑋2(𝑑0) βˆ’ 𝑒0 𝑋2(𝑑0)
π‘Š
, 𝑐2 =
𝑒0 𝑋1(𝑑0) βˆ’ π‘₯0
˙𝑋1(𝑑0)
π‘Š
,
3.4. HOMOGENEOUS ODES 31
where π‘Š is called the Wronskian and is given by
π‘Š = 𝑋1(𝑑0) ˙𝑋2(𝑑0) βˆ’ ˙𝑋1(𝑑0)𝑋2(𝑑0). (3.8)
Evidently, the Wronskian must not be equal to zero (π‘Š ΜΈ= 0) for a solution to
exist.
For examples, the two solutions
𝑋1(𝑑) = 𝐴 sin πœ”π‘‘, 𝑋2(𝑑) = 𝐡 sin πœ”π‘‘,
have a zero Wronskian at 𝑑 = 𝑑0, as can be shown by computing
π‘Š = (𝐴 sin πœ”π‘‘0) (π΅πœ” cos πœ”π‘‘0) βˆ’ (π΄πœ” cos πœ”π‘‘0) (𝐡 sin πœ”π‘‘0)
= 0;
while the two solutions
𝑋1(𝑑) = sin πœ”π‘‘, 𝑋2(𝑑) = cos πœ”π‘‘,
with πœ” ΜΈ= 0, have a nonzero Wronskian at 𝑑 = 𝑑0,
π‘Š = (sin πœ”π‘‘0) (βˆ’πœ” sin πœ”π‘‘0) βˆ’ (πœ” cos πœ”π‘‘0) (cos πœ”π‘‘0)
= βˆ’πœ”.
When the Wronskian is not equal to zero, we say that the two solutions
𝑋1(𝑑) and 𝑋2(𝑑) are linearly independent. The concept of linear independence
is borrowed from linear algebra, and indeed, the set of all functions that satisfy
(3.4) can be shown to form a two-dimensional vector space.
3.4 Second-order linear homogeneous ode with
constant coefficients
view tutorial
We now study solutions of the homogeneous, constant coefficient ode, written
as
π‘ŽΒ¨π‘₯ + 𝑏 Λ™π‘₯ + 𝑐π‘₯ = 0, (3.9)
with π‘Ž, 𝑏, and 𝑐 constants. Such an equation arises for the charge on a capacitor
in an unpowered RLC electrical circuit, or for the position of a freely-oscillating
frictional mass on a spring, or for a damped pendulum. Our solution method
finds two linearly independent solutions to (3.9), multiplies each of these solu-
tions by a constant, and adds them. The two free constants can then be used
to satisfy two given initial conditions.
Because of the differential properties of the exponential function, a natural
ansatz, or educated guess, for the form of the solution to (3.9) is π‘₯ = 𝑒 π‘Ÿπ‘‘
, where
π‘Ÿ is a constant to be determined. Successive differentiation results in Λ™π‘₯ = π‘Ÿπ‘’ π‘Ÿπ‘‘
and Β¨π‘₯ = π‘Ÿ2
𝑒 π‘Ÿπ‘‘
, and substitution into (3.9) yields
π‘Žπ‘Ÿ2
𝑒 π‘Ÿπ‘‘
+ π‘π‘Ÿπ‘’ π‘Ÿπ‘‘
+ 𝑐𝑒 π‘Ÿπ‘‘
= 0. (3.10)
Our choice of exponential function is now rewarded by the explicit cancelation
in (3.10) of 𝑒 π‘Ÿπ‘‘
. The result is a quadratic equation for the unknown constant π‘Ÿ:
π‘Žπ‘Ÿ2
+ π‘π‘Ÿ + 𝑐 = 0. (3.11)
32 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
Our ansatz has thus converted a differential equation into an algebraic equation.
Equation (3.11) is called the characteristic equation of (3.9). Using the quadratic
formula, the two solutions of the characteristic equation (3.11) are given by
π‘ŸΒ± =
1
2π‘Ž
(︁
βˆ’π‘ Β±
βˆšοΈ€
𝑏2 βˆ’ 4π‘Žπ‘
)︁
.
There are three cases to consider: (1) if 𝑏2
βˆ’ 4π‘Žπ‘ > 0, then the two roots are
distinct and real; (2) if 𝑏2
βˆ’4π‘Žπ‘ < 0, then the two roots are distinct and complex
conjugates of each other; (3) if 𝑏2
βˆ’ 4π‘Žπ‘ = 0, then the two roots are degenerate
and there is only one real root. We will consider these three cases in turn.
3.4.1 Real, distinct roots
When π‘Ÿ+ ΜΈ= π‘Ÿβˆ’ are real roots, then the general solution to (3.9) can be written
as a linear superposition of the two solutions 𝑒 π‘Ÿ+ 𝑑
and 𝑒 π‘Ÿβˆ’ 𝑑
; that is,
π‘₯(𝑑) = 𝑐1 𝑒 π‘Ÿ+ 𝑑
+ 𝑐2 𝑒 π‘Ÿβˆ’ 𝑑
.
The unknown constants 𝑐1 and 𝑐2 can then be determined by the given initial
conditions π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0. We now present two examples.
Example 1: Solve Β¨π‘₯ + 5 Λ™π‘₯ + 6π‘₯ = 0 with π‘₯(0) = 2, Λ™π‘₯(0) = 3, and find the
maximum value attained by π‘₯.
view tutorial
We take as our ansatz π‘₯ = 𝑒 π‘Ÿπ‘‘
and obtain the characteristic equation
π‘Ÿ2
+ 5π‘Ÿ + 6 = 0,
which factors to
(π‘Ÿ + 3)(π‘Ÿ + 2) = 0.
The general solution to the ode is thus
π‘₯(𝑑) = 𝑐1 π‘’βˆ’2𝑑
+ 𝑐2 π‘’βˆ’3𝑑
.
The solution for Λ™π‘₯ obtained by differentiation is
Λ™π‘₯(𝑑) = βˆ’2𝑐1 π‘’βˆ’2𝑑
βˆ’ 3𝑐2 π‘’βˆ’3𝑑
.
Use of the initial conditions then results in two equations for the two unknown
constant 𝑐1 and 𝑐2:
𝑐1 + 𝑐2 = 2,
βˆ’2𝑐1 βˆ’ 3𝑐2 = 3.
Adding three times the first equation to the second equation yields 𝑐1 = 9; and
the first equation then yields 𝑐2 = 2 βˆ’ 𝑐1 = βˆ’7. Therefore, the unique solution
that satisfies both the ode and the initial conditions is
π‘₯(𝑑) = 9π‘’βˆ’2𝑑
βˆ’ 7π‘’βˆ’3𝑑
= 9π‘’βˆ’2𝑑
(οΈ‚
1 βˆ’
7
9
π‘’βˆ’π‘‘
)οΈ‚
.
3.4. HOMOGENEOUS ODES 33
Note that although both exponential terms decay in time, their sum increases
initially since Λ™π‘₯(0) > 0. The maximum value of π‘₯ occurs at the time 𝑑 π‘š when
Λ™π‘₯ = 0, or
𝑑 π‘š = ln (7/6) .
The maximum π‘₯ π‘š = π‘₯(𝑑 π‘š) is then determined to be
π‘₯ π‘š = 108/49.
Example 2: Solve Β¨π‘₯ βˆ’ π‘₯ = 0 with π‘₯(0) = π‘₯0, Λ™π‘₯(0) = 𝑒0.
Again our ansatz is π‘₯ = 𝑒 π‘Ÿπ‘‘
, and we obtain the characteristic equation
π‘Ÿ2
βˆ’ 1 = 0,
with solution π‘ŸΒ± = Β±1. Therefore, the general solution for π‘₯ is
π‘₯(𝑑) = 𝑐1 𝑒 𝑑
+ 𝑐2 π‘’βˆ’π‘‘
,
and the derivative satisfies
Λ™π‘₯(𝑑) = 𝑐1 𝑒 𝑑
βˆ’ 𝑐2 π‘’βˆ’π‘‘
.
Initial conditions are satisfied when
𝑐1 + 𝑐2 = π‘₯0,
𝑐1 βˆ’ 𝑐2 = 𝑒0.
Adding and subtracting these equations, we determine
𝑐1 =
1
2
(π‘₯0 + 𝑒0) , 𝑐2 =
1
2
(π‘₯0 βˆ’ 𝑒0) ,
so that after rearranging terms
π‘₯(𝑑) = π‘₯0
(οΈ‚
𝑒 𝑑
+ π‘’βˆ’π‘‘
2
)οΈ‚
+ 𝑒0
(οΈ‚
𝑒 𝑑
βˆ’ π‘’βˆ’π‘‘
2
)οΈ‚
.
The terms in parentheses are the usual definitions of the hyperbolic cosine and
sine functions; that is,
cosh 𝑑 =
𝑒 𝑑
+ π‘’βˆ’π‘‘
2
, sinh 𝑑 =
𝑒 𝑑
βˆ’ π‘’βˆ’π‘‘
2
.
Our solution can therefore be rewritten as
π‘₯(𝑑) = π‘₯0 cosh 𝑑 + 𝑒0 sinh 𝑑.
Note that the relationships between the trigonometric functions and the complex
exponentials were given by
cos 𝑑 =
𝑒𝑖𝑑
+ π‘’βˆ’π‘–π‘‘
2
, sin 𝑑 =
𝑒𝑖𝑑
βˆ’ π‘’βˆ’π‘–π‘‘
2𝑖
,
so that
cosh 𝑑 = cos 𝑖𝑑, sinh 𝑑 = βˆ’π‘– sin 𝑖𝑑.
Also note that the hyperbolic trigonometric functions satisfy the differential
equations
𝑑
𝑑𝑑
sinh 𝑑 = cosh 𝑑,
𝑑
𝑑𝑑
cosh 𝑑 = sinh 𝑑,
which though similar to the differential equations satisfied by the more com-
monly used trigonometric functions, is absent a minus sign.
34 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
3.4.2 Complex conjugate, distinct roots
view tutorial
We now consider a characteristic equation (3.11) with 𝑏2
βˆ’4π‘Žπ‘ < 0, so the roots
occur as complex conjugate pairs. With
πœ† = βˆ’
𝑏
2π‘Ž
, πœ‡ =
1
2π‘Ž
βˆšοΈ€
4π‘Žπ‘ βˆ’ 𝑏2,
the two roots of the characteristic equation are πœ† + π‘–πœ‡ and πœ† βˆ’ π‘–πœ‡. We have
thus found the following two complex exponential solutions to the differential
equation:
𝑍1(𝑑) = 𝑒 πœ†π‘‘
π‘’π‘–πœ‡π‘‘
, 𝑍2(𝑑) = 𝑒 πœ†π‘‘
π‘’βˆ’π‘–πœ‡π‘‘
.
Applying the principle of superposition, any linear combination of 𝑍1 and 𝑍2 is
also a solution to the second-order ode. We can then form two different linear
combinations that are real, given by
𝑋1(𝑑) =
𝑍1 + 𝑍2
2
= 𝑒 πœ†π‘‘
(οΈ‚
π‘’π‘–πœ‡π‘‘
+ π‘’βˆ’π‘–πœ‡π‘‘
2
)οΈ‚
= 𝑒 πœ†π‘‘
cos πœ‡π‘‘,
and
𝑋2(𝑑) =
𝑍1 βˆ’ 𝑍2
2𝑖
= 𝑒 πœ†π‘‘
(οΈ‚
π‘’π‘–πœ‡π‘‘
βˆ’ π‘’βˆ’π‘–πœ‡π‘‘
2𝑖
)οΈ‚
= 𝑒 πœ†π‘‘
sin πœ‡π‘‘.
Having found the two real solutions 𝑋1(𝑑) and 𝑋2(𝑑), we can then apply the
principle of superposition a second time to determine the general solution π‘₯(𝑑):
π‘₯(𝑑) = 𝑒 πœ†π‘‘
(𝐴 cos πœ‡π‘‘ + 𝐡 sin πœ‡π‘‘) . (3.12)
It is best to memorize this result. The real part of the roots of the characteristic
equation goes into the exponential function; the imaginary part goes into the
argument of cosine and sine.
Example 1: Solve Β¨π‘₯ + π‘₯ = 0 with π‘₯(0) = π‘₯0 and Λ™π‘₯(0) = 𝑒0.
view tutorial
The characteristic equation is
π‘Ÿ2
+ 1 = 0,
with roots
π‘ŸΒ± = ±𝑖.
The general solution of the ode is therefore
π‘₯(𝑑) = 𝐴 cos 𝑑 + 𝐡 sin 𝑑.
3.4. HOMOGENEOUS ODES 35
The derivative is
Λ™π‘₯(𝑑) = βˆ’π΄ sin 𝑑 + 𝐡 cos 𝑑.
Applying the initial conditions:
π‘₯(0) = 𝐴 = π‘₯0, Λ™π‘₯(0) = 𝐡 = 𝑒0;
so that the final solution is
π‘₯(𝑑) = π‘₯0 cos 𝑑 + 𝑒0 sin 𝑑.
Recall that we wrote the analogous solution to the ode Β¨π‘₯ βˆ’ π‘₯ = 0 as π‘₯(𝑑) =
π‘₯0 cosh 𝑑 + 𝑒0 sinh 𝑑.
Example 2: Solve Β¨π‘₯ + Λ™π‘₯ + π‘₯ = 0 with π‘₯(0) = 1 and Λ™π‘₯(0) = 0.
The characteristic equation is
π‘Ÿ2
+ π‘Ÿ + 1 = 0,
with roots
π‘ŸΒ± = βˆ’
1
2
Β± 𝑖
√
3
2
.
The general solution of the ode is therefore
π‘₯(𝑑) = π‘’βˆ’ 1
2 𝑑
(οΈƒ
𝐴 cos
√
3
2
𝑑 + 𝐡 sin
√
3
2
𝑑
)οΈƒ
.
The derivative is
Λ™π‘₯(𝑑) = βˆ’
1
2
π‘’βˆ’ 1
2 𝑑
(οΈƒ
𝐴 cos
√
3
2
𝑑 + 𝐡 sin
√
3
2
𝑑
)οΈƒ
+
√
3
2
π‘’βˆ’ 1
2 𝑑
(οΈƒ
βˆ’π΄ sin
√
3
2
𝑑 + 𝐡 cos
√
3
2
𝑑
)οΈƒ
.
Applying the initial conditions π‘₯(0) = 1 and Λ™π‘₯(0) = 0:
𝐴 = 1,
βˆ’1
2
𝐴 +
√
3
2
𝐡 = 0;
or
𝐴 = 1, 𝐡 =
√
3
3
.
Therefore,
π‘₯(𝑑) = π‘’βˆ’ 1
2 𝑑
(οΈƒ
cos
√
3
2
𝑑 +
√
3
3
sin
√
3
2
𝑑
)οΈƒ
.
36 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
3.4.3 Repeated roots
view tutorial
Finally, we consider the characteristic equation,
π‘Žπ‘Ÿ2
+ π‘π‘Ÿ + 𝑐 = 0,
with 𝑏2
βˆ’ 4π‘Žπ‘ = 0. The degenerate root is then given by
π‘Ÿ = βˆ’
𝑏
2π‘Ž
,
yielding only a single solution to the ode:
π‘₯1(𝑑) = exp
(οΈ‚
βˆ’
𝑏𝑑
2π‘Ž
)οΈ‚
. (3.13)
To satisfy two initial conditions, a second independent solution must be found
with nonzero Wronskian, and apparently this second solution is not of the form
of our ansatz π‘₯ = exp (π‘Ÿπ‘‘).
One method to determine this missing second solution is to try the ansatz
π‘₯(𝑑) = 𝑦(𝑑)π‘₯1(𝑑), (3.14)
where 𝑦(𝑑) is an unknown function that satisfies the differential equation ob-
tained by substituting (3.14) into (3.9). This standard technique is called the
reduction of order method and enables one to find a second solution of a ho-
mogeneous linear differential equation if one solution is known. If the original
differential equation is of order 𝑛, the differential equation for 𝑦 = 𝑦(𝑑) reduces
to an order one lower, that is, 𝑛 βˆ’ 1.
Here, however, we will determine this missing second solution through a
limiting process. We start with the solution obtained for complex roots of the
characteristic equation, and then arrive at the solution obtained for degenerate
roots by taking the limit πœ‡ β†’ 0.
Now, the general solution for complex roots was given by (3.12), and to
properly limit this solution as πœ‡ β†’ 0 requires first satisfying the specific initial
conditions π‘₯(0) = π‘₯0 and Λ™π‘₯(0) = 𝑒0. Solving for 𝐴 and 𝐡, the general solution
given by (3.12) becomes the specific solution
π‘₯(𝑑; πœ‡) = 𝑒 πœ†π‘‘
(οΈ‚
π‘₯0 cos πœ‡π‘‘ +
𝑒0 βˆ’ πœ†π‘₯0
πœ‡
sin πœ‡π‘‘
)οΈ‚
.
Here, we have written π‘₯ = π‘₯(𝑑; πœ‡) to show explicitly that π‘₯ depends on πœ‡.
Taking the limit as πœ‡ β†’ 0, and using lim πœ‡β†’0 πœ‡βˆ’1
sin πœ‡π‘‘ = 𝑑, we have
lim
πœ‡β†’0
π‘₯(𝑑; πœ‡) = 𝑒 πœ†π‘‘
(οΈ€
π‘₯0 + (𝑒0 βˆ’ πœ†π‘₯0)𝑑
)οΈ€
.
The second solution is observed to be a constant, 𝑒0 βˆ’ πœ†π‘₯0, times 𝑑 times the
first solution, 𝑒 πœ†π‘‘
. Our general solution to the ode (3.9) when 𝑏2
βˆ’ 4π‘Žπ‘ = 0 can
therefore be written in the form
π‘₯(𝑑) = (𝑐1 + 𝑐2 𝑑)𝑒 π‘Ÿπ‘‘
,
where π‘Ÿ is the repeated root of the characteristic equation. The main result to
be remembered is that for the case of repeated roots, the second solution is 𝑑
times the first solution.
3.5. INHOMOGENEOUS ODES 37
Example: Solve Β¨π‘₯ + 2 Λ™π‘₯ + π‘₯ = 0 with π‘₯(0) = 1 and Λ™π‘₯(0) = 0.
The characteristic equation is
π‘Ÿ2
+ 2π‘Ÿ + 1 = (π‘Ÿ + 1)2
= 0,
which has a repeated root given by π‘Ÿ = βˆ’1. Therefore, the general solution to
the ode is
π‘₯(𝑑) = 𝑐1 π‘’βˆ’π‘‘
+ 𝑐2 π‘‘π‘’βˆ’π‘‘
,
with derivative
Λ™π‘₯(𝑑) = βˆ’π‘1 π‘’βˆ’π‘‘
+ 𝑐2 π‘’βˆ’π‘‘
βˆ’ 𝑐2 π‘‘π‘’βˆ’π‘‘
.
Applying the initial conditions, we have
𝑐1 = 1,
βˆ’π‘1 + 𝑐2 = 0,
so that 𝑐1 = 𝑐2 = 1. Therefore, the solution is
π‘₯(𝑑) = (1 + 𝑑)π‘’βˆ’π‘‘
.
3.5 Second-order linear inhomogeneous ode
We now consider the general second-order linear inhomogeneous ode (3.1):
Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 𝑔(𝑑), (3.15)
with initial conditions π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0. There is a three-step solution
method when the inhomogeneous term 𝑔(𝑑) ΜΈ= 0. (i) Find the general solution
of the homogeneous equation
Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 0. (3.16)
Let us denote the homogeneous solution by
π‘₯β„Ž(𝑑) = 𝑐1 𝑋1(𝑑) + 𝑐2 𝑋2(𝑑),
where 𝑋1 and 𝑋2 are linearly independent solutions of (3.16), and 𝑐1 and 𝑐2
are as yet undetermined constants. (ii) Find any particular solution π‘₯ 𝑝 of the
inhomogeneous equation (3.15). A particular solution is readily found when
𝑝(𝑑) and π‘ž(𝑑) are constants, and when 𝑔(𝑑) is a combination of polynomials,
exponentials, sines and cosines. (iii) Write the general solution of (3.15) as the
sum of the homogeneous and particular solutions,
π‘₯(𝑑) = π‘₯β„Ž(𝑑) + π‘₯ 𝑝(𝑑), (3.17)
and apply the initial conditions to determine the constants 𝑐1 and 𝑐2. Note that
because of the linearity of (3.15),
Β¨π‘₯ + 𝑝 Λ™π‘₯ + π‘žπ‘₯ =
𝑑2
𝑑𝑑2
(π‘₯β„Ž + π‘₯ 𝑝) + 𝑝
𝑑
𝑑𝑑
(π‘₯β„Ž + π‘₯ 𝑝) + π‘ž(π‘₯β„Ž + π‘₯ 𝑝)
= (Β¨π‘₯β„Ž + 𝑝 Λ™π‘₯β„Ž + π‘žπ‘₯β„Ž) + (Β¨π‘₯ 𝑝 + 𝑝 Λ™π‘₯ 𝑝 + π‘žπ‘₯ 𝑝)
= 0 + 𝑔
= 𝑔,
38 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
so that (3.17) solves (3.15), and the two free constants in π‘₯β„Ž can be used to
satisfy the initial conditions.
We will consider here only the constant coefficient case. We now illustrate
the solution method by an example.
Example: Solve Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 3𝑒2𝑑
with π‘₯(0) = 1 and Λ™π‘₯(0) = 0.
view tutorial
First, we solve the homogeneous equation. The characteristic equation is
π‘Ÿ2
βˆ’ 3π‘Ÿ βˆ’ 4 = (π‘Ÿ βˆ’ 4)(π‘Ÿ + 1)
= 0,
so that
π‘₯β„Ž(𝑑) = 𝑐1 𝑒4𝑑
+ 𝑐2 π‘’βˆ’π‘‘
.
Second, we find a particular solution of the inhomogeneous equation. The form
of the particular solution is chosen such that the exponential will cancel out of
both sides of the ode. The ansatz we choose is
π‘₯(𝑑) = 𝐴𝑒2𝑑
, (3.18)
where 𝐴 is a yet undetermined coefficient. Upon substituting π‘₯ into the ode,
differentiating using the chain rule, and canceling the exponential, we obtain
4𝐴 βˆ’ 6𝐴 βˆ’ 4𝐴 = 3,
from which we determine 𝐴 = βˆ’1/2. Obtaining a solution for 𝐴 independent of
𝑑 justifies the ansatz (3.18). Third, we write the general solution to the ode as
the sum of the homogeneous and particular solutions, and determine 𝑐1 and 𝑐2
that satisfy the initial conditions. We have
π‘₯(𝑑) = 𝑐1 𝑒4𝑑
+ 𝑐2 π‘’βˆ’π‘‘
βˆ’
1
2
𝑒2𝑑
;
and taking the derivative,
Λ™π‘₯(𝑑) = 4𝑐1 𝑒4𝑑
βˆ’ 𝑐2 π‘’βˆ’π‘‘
βˆ’ 𝑒2𝑑
.
Applying the initial conditions,
𝑐1 + 𝑐2 βˆ’
1
2
= 1,
4𝑐1 βˆ’ 𝑐2 βˆ’ 1 = 0;
or
𝑐1 + 𝑐2 =
3
2
,
4𝑐1 βˆ’ 𝑐2 = 1.
This system of linear equations can be solved for 𝑐1 by adding the equations
to obtain 𝑐1 = 1/2, after which 𝑐2 = 1 can be determined from the first equa-
tion. Therefore, the solution for π‘₯(𝑑) that satisfies both the ode and the initial
3.5. INHOMOGENEOUS ODES 39
conditions is given by
π‘₯(𝑑) =
1
2
𝑒4𝑑
βˆ’
1
2
𝑒2𝑑
+ π‘’βˆ’π‘‘
=
1
2
𝑒4𝑑
(οΈ€
1 βˆ’ π‘’βˆ’2𝑑
+ 2π‘’βˆ’5𝑑
)οΈ€
,
where we have grouped the terms in the solution to better display the asymptotic
behavior for large 𝑑.
We now find particular solutions for some relatively simple inhomogeneous
terms using this method of undetermined coefficients.
Example: Find a particular solution of Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 sin 𝑑.
view tutorial
We show two methods for finding a particular solution. The first more direct
method tries the ansatz
π‘₯(𝑑) = 𝐴 cos 𝑑 + 𝐡 sin 𝑑,
where the argument of cosine and sine must agree with the argument of sine in
the inhomogeneous term. The cosine term is required because the derivative of
sine is cosine. Upon substitution into the differential equation, we obtain
(βˆ’π΄ cos 𝑑 βˆ’ 𝐡 sin 𝑑) βˆ’ 3 (βˆ’π΄ sin 𝑑 + 𝐡 cos 𝑑) βˆ’ 4 (𝐴 cos 𝑑 + 𝐡 sin 𝑑) = 2 sin 𝑑,
or regrouping terms,
βˆ’ (5𝐴 + 3𝐡) cos 𝑑 + (3𝐴 βˆ’ 5𝐡) sin 𝑑 = 2 sin 𝑑.
This equation is valid for all 𝑑, and in particular for 𝑑 = 0 and πœ‹/2, for which
the sine and cosine functions vanish. For these two values of 𝑑, we find
5𝐴 + 3𝐡 = 0, 3𝐴 βˆ’ 5𝐡 = 2;
and solving for 𝐴 and 𝐡, we obtain
𝐴 =
3
17
, 𝐡 = βˆ’
5
17
.
The particular solution is therefore given by
π‘₯ 𝑝 =
1
17
(3 cos 𝑑 βˆ’ 5 sin 𝑑) .
The second solution method makes use of the relation 𝑒𝑖𝑑
= cos 𝑑 + 𝑖 sin 𝑑 to
convert the sine inhomogeneous term to an exponential function. We introduce
the complex function 𝑧(𝑑) by letting
𝑧(𝑑) = π‘₯(𝑑) + 𝑖𝑦(𝑑),
and rewrite the differential equation in complex form. We can rewrite the equa-
tion in one of two ways. On the one hand, if we use sin 𝑑 = Re{βˆ’π‘–π‘’π‘–π‘‘
}, then the
differential equation is written as
¨𝑧 βˆ’ 3 ˙𝑧 βˆ’ 4𝑧 = βˆ’2𝑖𝑒𝑖𝑑
; (3.19)
40 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
and by equating the real and imaginary parts, this equation becomes the two
real differential equations
Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 sin 𝑑, ¨𝑦 βˆ’ 3 ˙𝑦 βˆ’ 4𝑦 = βˆ’2 cos 𝑑.
The solution we are looking for, then, is π‘₯ 𝑝(𝑑) = Re{𝑧 𝑝(𝑑)}.
On the other hand, if we write sin 𝑑 = Im{𝑒𝑖𝑑
}, then the complex differential
equation becomes
¨𝑧 βˆ’ 3 ˙𝑧 βˆ’ 4𝑧 = 2𝑒𝑖𝑑
, (3.20)
which becomes the two real differential equations
Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 cos 𝑑, ¨𝑦 βˆ’ 3 ˙𝑦 βˆ’ 4𝑦 = 2 sin 𝑑.
Here, the solution we are looking for is π‘₯ 𝑝(𝑑) = Im{𝑧 𝑝(𝑑)}.
We will proceed here by solving (3.20). As we now have an exponential
function as the inhomogeneous term, we can make the ansatz
𝑧(𝑑) = 𝐢𝑒𝑖𝑑
,
where we now expect 𝐢 to be a complex constant. Upon substitution into the
ode (3.20) and using 𝑖2
= βˆ’1:
βˆ’πΆ βˆ’ 3𝑖𝐢 βˆ’ 4𝐢 = 2;
or solving for 𝐢:
𝐢 =
βˆ’2
5 + 3𝑖
=
βˆ’2(5 βˆ’ 3𝑖)
(5 + 3𝑖)(5 βˆ’ 3𝑖)
=
βˆ’10 + 6𝑖
34
=
βˆ’5 + 3𝑖
17
.
Therefore,
π‘₯ 𝑝 = Im{𝑧 𝑝}
= Im
{οΈ‚
1
17
(βˆ’5 + 3𝑖)(cos 𝑑 + 𝑖 sin 𝑑)
}οΈ‚
=
1
17
(3 cos 𝑑 βˆ’ 5 sin 𝑑).
Example: Find a particular solution of Β¨π‘₯ + Λ™π‘₯ βˆ’ 2π‘₯ = 𝑑2
.
view tutorial
The correct ansatz here is the polynomial
π‘₯(𝑑) = 𝐴𝑑2
+ 𝐡𝑑 + 𝐢.
Upon substitution into the ode, we have
2𝐴 + 2𝐴𝑑 + 𝐡 βˆ’ 2𝐴𝑑2
βˆ’ 2𝐡𝑑 βˆ’ 2𝐢 = 𝑑2
,
3.6. FIRST-ORDER LINEAR INHOMOGENEOUS ODES REVISITED 41
or
βˆ’2𝐴𝑑2
+ 2(𝐴 βˆ’ 𝐡)𝑑 + (2𝐴 + 𝐡 βˆ’ 2𝐢)𝑑0
= 𝑑2
.
Equating powers of 𝑑,
βˆ’2𝐴 = 1, 2(𝐴 βˆ’ 𝐡) = 0, 2𝐴 + 𝐡 βˆ’ 2𝐢 = 0;
and solving,
𝐴 = βˆ’
1
2
, 𝐡 = βˆ’
1
2
, 𝐢 = βˆ’
3
4
.
The particular solution is therefore
π‘₯ 𝑝(𝑑) = βˆ’
1
2
𝑑2
βˆ’
1
2
𝑑 βˆ’
3
4
.
3.6 First-order linear inhomogeneous odes re-
visited
The first-order linear ode can be solved by use of an integrating factor. Here I
show that odes having constant coefficients can be solved by our newly learned
solution method.
Example: Solve Λ™π‘₯ + 2π‘₯ = π‘’βˆ’π‘‘
with π‘₯(0) = 3/4.
Rather than using an integrating factor, we follow the three-step approach: (i)
find the general homogeneous solution; (ii) find a particular solution; (iii) add
them and satisfy initial conditions. Accordingly, we try the ansatz π‘₯β„Ž(𝑑) = 𝑒 π‘Ÿπ‘‘
for the homogeneous ode Λ™π‘₯ + 2π‘₯ = 0 and find
π‘Ÿ + 2 = 0, or π‘Ÿ = βˆ’2.
To find a particular solution, we try the ansatz π‘₯ 𝑝(𝑑) = π΄π‘’βˆ’π‘‘
, and upon substi-
tution
βˆ’π΄ + 2𝐴 = 1, or 𝐴 = 1.
Therefore, the general solution to the ode is
π‘₯(𝑑) = π‘π‘’βˆ’2𝑑
+ π‘’βˆ’π‘‘
.
The single initial condition determines the unknown constant 𝑐:
π‘₯(0) =
3
4
= 𝑐 + 1,
so that 𝑐 = βˆ’1/4. Hence,
π‘₯(𝑑) = π‘’βˆ’π‘‘
βˆ’
1
4
π‘’βˆ’2𝑑
= π‘’βˆ’π‘‘
(οΈ‚
1 βˆ’
1
4
π‘’βˆ’π‘‘
)οΈ‚
.
42 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
3.7 Resonance
view tutorial
Resonance occurs when the frequency of the inhomogeneous term matches the
frequency of the homogeneous solution. To illustrate resonance in its simplest
embodiment, we consider the second-order linear inhomogeneous ode
Β¨π‘₯ + πœ”2
0 π‘₯ = 𝑓 cos πœ”π‘‘, π‘₯(0) = π‘₯0, Λ™π‘₯(0) = 𝑒0. (3.21)
Our main goal is to determine what happens to the solution in the limit πœ” β†’ πœ”0.
The homogeneous equation has characteristic equation
π‘Ÿ2
+ πœ”2
0 = 0,
so that π‘ŸΒ± = Β±π‘–πœ”0. Therefore,
π‘₯β„Ž(𝑑) = 𝑐1 cos πœ”0 𝑑 + 𝑐2 sin πœ”0 𝑑. (3.22)
To find a particular solution, we note the absence of a first-derivative term,
and simply try
π‘₯(𝑑) = 𝐴 cos πœ”π‘‘.
Upon substitution into the ode, we obtain
βˆ’πœ”2
𝐴 + πœ”2
0 𝐴 = 𝑓,
or
𝐴 =
𝑓
πœ”2
0 βˆ’ πœ”2
.
Therefore,
π‘₯ 𝑝(𝑑) =
𝑓
πœ”2
0 βˆ’ πœ”2
cos πœ”π‘‘.
Our general solution is thus
π‘₯(𝑑) = 𝑐1 cos πœ”0 𝑑 + 𝑐2 sin πœ”0 𝑑 +
𝑓
πœ”2
0 βˆ’ πœ”2
cos πœ”π‘‘,
with derivative
Λ™π‘₯(𝑑) = πœ”0(𝑐2 cos πœ”0 𝑑 βˆ’ 𝑐1 sin πœ”0 𝑑) βˆ’
𝑓 πœ”
πœ”2
0 βˆ’ πœ”2
sin πœ”π‘‘.
Initial conditions are satisfied when
π‘₯0 = 𝑐1 +
𝑓
πœ”2
0 βˆ’ πœ”2
,
𝑒0 = 𝑐2 πœ”0,
so that
𝑐1 = π‘₯0 βˆ’
𝑓
πœ”2
0 βˆ’ πœ”2
, 𝑐2 =
𝑒0
πœ”0
.
3.7. RESONANCE 43
Therefore, the solution to the ode that satisfies the initial conditions is
π‘₯(𝑑) =
(οΈ‚
π‘₯0 βˆ’
𝑓
πœ”2
0 βˆ’ πœ”2
)οΈ‚
cos πœ”0 𝑑 +
𝑒0
πœ”0
sin πœ”0 𝑑 +
𝑓
πœ”2
0 βˆ’ πœ”2
cos πœ”π‘‘
= π‘₯0 cos πœ”0 𝑑 +
𝑒0
πœ”0
sin πœ”0 𝑑 +
𝑓(cos πœ”π‘‘ βˆ’ cos πœ”0 𝑑)
πœ”2
0 βˆ’ πœ”2
,
where we have grouped together terms proportional to the forcing amplitude 𝑓.
Resonance occurs in the limit πœ” β†’ πœ”0; that is, the frequency of the inhomo-
geneous term (the external force) matches the frequency of the homogeneous
solution (the free oscillation). By L’Hospital’s rule, the limit of the term pro-
portional to 𝑓 is found by differentiating with respect to πœ”:
lim
πœ”β†’πœ”0
𝑓(cos πœ”π‘‘ βˆ’ cos πœ”0 𝑑)
πœ”2
0 βˆ’ πœ”2
= lim
πœ”β†’πœ”0
βˆ’π‘“ 𝑑 sin πœ”π‘‘
βˆ’2πœ”
=
𝑓 𝑑 sin πœ”0 𝑑
2πœ”0
.
(3.23)
At resonance, the term proportional to the amplitude 𝑓 of the inhomogeneous
term increases linearly with 𝑑, resulting in larger-and-larger amplitudes of oscil-
lation for π‘₯(𝑑). In general, if the inhomogeneous term in the differential equation
is a solution of the corresponding homogeneous differential equation, then the
correct ansatz for the particular solution is a constant times the inhomogeneous
term times 𝑑.
To illustrate this same example further, we return to the original ode, now
assumed to be exactly at resonance,
Β¨π‘₯ + πœ”2
0 π‘₯ = 𝑓 cos πœ”0 𝑑,
and find a particular solution directly. The particular solution is the real part
of the particular solution of
¨𝑧 + πœ”2
0 𝑧 = 𝑓 π‘’π‘–πœ”0 𝑑
,
and because the inhomogeneous term is a solution of the corresponding homo-
geneous equation, we take as our ansatz
𝑧 𝑝 = π΄π‘‘π‘’π‘–πœ”0 𝑑
.
We have
˙𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑
(1 + π‘–πœ”0 𝑑) , ¨𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑
(οΈ€
2π‘–πœ”0 βˆ’ πœ”2
0 𝑑
)οΈ€
;
and upon substitution into the ode
¨𝑧 𝑝 + πœ”2
0 𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑
(οΈ€
2π‘–πœ”0 βˆ’ πœ”2
0 𝑑
)οΈ€
+ πœ”2
0 π΄π‘‘π‘’π‘–πœ”0 𝑑
= 2π‘–πœ”0 π΄π‘’π‘–πœ”0 𝑑
= 𝑓 π‘’π‘–πœ”0 𝑑
.
Therefore,
𝐴 =
𝑓
2π‘–πœ”0
,
44 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
and
π‘₯ 𝑝 = Re{
𝑓 𝑑
2π‘–πœ”0
π‘’π‘–πœ”0 𝑑
}
=
𝑓 𝑑 sin πœ”0 𝑑
2πœ”0
,
the same result as (3.23).
Example: Find a particular solution of Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 5π‘’βˆ’π‘‘
.
view tutorial
If we naively try the ansatz
π‘₯ = π΄π‘’βˆ’π‘‘
,
and substitute this into the inhomogeneous differential equation, we obtain
𝐴 + 3𝐴 βˆ’ 4𝐴 = 5,
or 0 = 5, which is clearly nonsense. Our ansatz therefore fails to find a solution.
The cause of this failure is that the corresponding homogeneous equation has
solution
π‘₯β„Ž = 𝑐1 𝑒4𝑑
+ 𝑐2 π‘’βˆ’π‘‘
,
so that the inhomogeneous term 5π‘’βˆ’π‘‘
is one of the solutions of the homogeneous
equation. To find a particular solution, we should therefore take as our ansatz
π‘₯ = π΄π‘‘π‘’βˆ’π‘‘
,
with first- and second-derivatives given by
Λ™π‘₯ = π΄π‘’βˆ’π‘‘
(1 βˆ’ 𝑑), Β¨π‘₯ = π΄π‘’βˆ’π‘‘
(βˆ’2 + 𝑑).
Substitution into the differential equation yields
π΄π‘’βˆ’π‘‘
(βˆ’2 + 𝑑) βˆ’ 3π΄π‘’βˆ’π‘‘
(1 βˆ’ 𝑑) βˆ’ 4π΄π‘‘π‘’βˆ’π‘‘
= 5π‘’βˆ’π‘‘
.
The terms containing 𝑑 cancel out of this equation, resulting in βˆ’5𝐴 = 5, or
𝐴 = βˆ’1. Therefore, the particular solution is
π‘₯ 𝑝 = βˆ’π‘‘π‘’βˆ’π‘‘
.
3.8 Damped resonance
view tutorial
A more realistic study of resonance assumes an additional damping term. The
forced, damped harmonic oscillator equation may be written as
π‘šΒ¨π‘₯ + 𝛾 Λ™π‘₯ + π‘˜π‘₯ = 𝐹 cos πœ”π‘‘, (3.24)
where π‘š > 0 is the oscillator’s mass, 𝛾 > 0 is the damping coefficient, π‘˜ >
0 is the spring constant, and 𝐹 is the amplitude of the external force. The
homogeneous equation has characteristic equation
π‘šπ‘Ÿ2
+ π›Ύπ‘Ÿ + π‘˜ = 0,
3.8. DAMPED RESONANCE 45
so that
π‘ŸΒ± = βˆ’
𝛾
2π‘š
Β±
1
2π‘š
βˆšοΈ€
𝛾2 βˆ’ 4π‘šπ‘˜.
When 𝛾2
βˆ’ 4π‘šπ‘˜ < 0, the motion of the unforced oscillator is said to be under-
damped; when 𝛾2
βˆ’ 4π‘šπ‘˜ > 0, overdamped; and when 𝛾2
βˆ’ 4π‘šπ‘˜ = 0, critically
damped. For all three types of damping, the roots of the characteristic equa-
tion satisfy Re(π‘ŸΒ±) < 0. Therefore, both linearly independent homogeneous
solutions decay exponentially to zero, and the long-time asymptotic solution
of (3.24) reduces to the (non-decaying) particular solution. Since the initial
conditions are satisfied by the free constants multiplying the (decaying) homo-
geneous solutions, the long-time asymptotic solution is independent of the initial
conditions.
If we are only interested in the long-time asymptotic solution of (3.24), we
can proceed directly to the determination of a particular solution. As before,
we consider the complex ode
π‘šΒ¨π‘§ + 𝛾 ˙𝑧 + π‘˜π‘§ = 𝐹 π‘’π‘–πœ”π‘‘
,
with π‘₯ 𝑝 = Re(𝑧 𝑝). With the ansatz 𝑧 𝑝 = π΄π‘’π‘–πœ”π‘‘
, we have
βˆ’π‘šπœ”2
𝐴 + π‘–π›Ύπœ”π΄ + π‘˜π΄ = 𝐹,
or
𝐴 =
𝐹
(π‘˜ βˆ’ π‘šπœ”2) + π‘–π›Ύπœ”
.
To simplify, we define πœ”0 =
βˆšοΈ€
π‘˜/π‘š, which corresponds to the natural frequency
of the undamped oscillator, and define Ξ“ = π›Ύπœ”/π‘š and 𝑓 = 𝐹/π‘š. Therefore,
𝐴 =
𝑓
(πœ”2
0 βˆ’ πœ”2) + 𝑖Γ
=
(οΈ‚
𝑓
(πœ”2
0 βˆ’ πœ”2)2 + Ξ“2
)οΈ‚
(οΈ€
(πœ”2
0 βˆ’ πœ”2
) βˆ’ 𝑖Γ
)οΈ€
.
(3.25)
To determine π‘₯ 𝑝, we utilize the polar form of a complex number. The complex
number 𝑧 = π‘₯ + 𝑖𝑦 can be written in polar form as 𝑧 = π‘Ÿπ‘’π‘–πœ‘
, where π‘₯ = π‘Ÿ cos πœ‘,
𝑦 = π‘Ÿ sin πœ‘, and π‘Ÿ =
βˆšοΈ€
π‘₯2 + 𝑦2, tan πœ‘ = 𝑦/π‘₯. We therefore write
(πœ”2
0 βˆ’ πœ”2
) βˆ’ 𝑖Γ = π‘Ÿπ‘’π‘–πœ‘
,
with
π‘Ÿ =
√︁
(πœ”2
0 βˆ’ πœ”2)2 + Ξ“2, tan πœ‘ =
Ξ“
(πœ”2 βˆ’ πœ”2
0)
.
Using the polar form, 𝐴 in (3.25) becomes
𝐴 =
(οΈƒ
𝑓
βˆšοΈ€
(πœ”2
0 βˆ’ πœ”2)2 + Ξ“2
)οΈƒ
π‘’π‘–πœ‘
,
and π‘₯ 𝑝 = Re(π΄π‘’π‘–πœ”π‘‘
) becomes
π‘₯ 𝑝 =
(οΈƒ
𝑓
βˆšοΈ€
(πœ”2
0 βˆ’ πœ”2)2 + Ξ“2
)οΈƒ
Re
(︁
𝑒𝑖(πœ”π‘‘+πœ‘)
)︁
=
(οΈƒ
𝑓
βˆšοΈ€
(πœ”2
0 βˆ’ πœ”2)2 + Ξ“2
)οΈƒ
cos (πœ”π‘‘ + πœ‘).
(3.26)
46 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS
The particular solution given by (3.26), with πœ”2
0 = π‘˜/π‘š, Ξ“ = π›Ύπœ”/π‘š, 𝑓 = 𝐹/π‘š,
and tan πœ‘ = π›Ύπœ”/π‘š(πœ”2
βˆ’ πœ”2
0), is the long-time asymptotic solution of the forced,
damped, harmonic oscillator equation (3.24).
We conclude with a couple of observations about (3.26). First, if the forcing
frequency πœ” is equal to the natural frequency πœ”0 of the undamped oscillator, then
𝐴 = βˆ’π‘–πΉ/π›Ύπœ”0, and π‘₯ 𝑝 = (𝐹/π›Ύπœ”0) sin πœ”0 𝑑. The oscillator position is observed
to be πœ‹/2 out of phase with the external force, or in other words, the velocity
of the oscillator, not the position, is in phase with the force. Second, the value
of the forcing frequency πœ” π‘š that maximizes the amplitude of oscillation is the
value of πœ” that minimizes the denominator of (3.26). To determine πœ” π‘š we thus
minimize the function 𝑔(πœ”2
) with respect to πœ”2
, where
𝑔(πœ”2
) = (πœ”2
0 βˆ’ πœ”2
)2
+
𝛾2
πœ”2
π‘š2
.
Taking the derivative of 𝑔 with respect to πœ”2
and setting this to zero to determine
πœ” π‘š yields
2(πœ”2
π‘š βˆ’ πœ”2
0) +
𝛾2
π‘š2
= 0,
or
πœ”2
π‘š = πœ”2
0 βˆ’
𝛾2
2π‘š2
.
We can interpret this result by saying that damping lowers the β€œresonance”
frequency of the undamped oscillator.
Chapter 4
The Laplace transform
Reference: Boyce and DiPrima, Chapter 6
The Laplace transform is most useful for solving linear, constant-coefficient
ode’s when the inhomogeneous term or its derivative is discontinuous. Although
ode’s with discontinuous inhomogeneous terms can also be solved by adopting
already learned methods, we will see that the Laplace transform technique pro-
vides a simpler, more elegant solution.
4.1 Definitions and properties of the forward
and inverse Laplace transforms
view tutorial
The main idea is to Laplace transform the constant-coefficient differential equa-
tion for π‘₯(𝑑) into a simpler algebraic equation for the Laplace-transformed func-
tion 𝑋(𝑠), solve this algebraic equation, and then transform 𝑋(𝑠) back into
π‘₯(𝑑). The correct definition of the Laplace transform and the properties that
this transform satisfies makes this solution method possible.
An exponential ansatz is used in solving homogeneous constant-coefficient
odes, and the exponential function correspondingly plays a key role in defining
the Laplace transform. The Laplace transform of 𝑓(𝑑), denoted by 𝐹(𝑠) =
β„’{𝑓(𝑑)}, is defined by the integral transform
𝐹(𝑠) =
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
𝑓(𝑑)𝑑𝑑. (4.1)
The improper integral given by (4.1) diverges if 𝑓(𝑑) grows faster than 𝑒 𝑠𝑑
for
large 𝑑. Accordingly, some restriction on the range of 𝑠 may be required to
guarantee convergence of (4.1), and we will assume without further elaboration
that these restrictions are always satisfied.
The Laplace transform is a linear transformation. We have
β„’{𝑐1 𝑓1(𝑑) + 𝑐2 𝑓2(𝑑)} =
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
(οΈ€
𝑐1 𝑓1(𝑑) + 𝑐2 𝑓2(𝑑)
)οΈ€
𝑑𝑑
= 𝑐1
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
𝑓1(𝑑)𝑑𝑑 + 𝑐2
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
𝑓2(𝑑)𝑑𝑑
= 𝑐1β„’{𝑓1(𝑑)} + 𝑐2β„’{𝑓2(𝑑)}.
47
48 CHAPTER 4. THE LAPLACE TRANSFORM
𝑓(𝑑) = β„’βˆ’1
{𝐹(𝑠)} 𝐹(𝑠) = β„’{𝑓(𝑑)}
1. 𝑒 π‘Žπ‘‘
𝑓(𝑑) 𝐹(𝑠 βˆ’ π‘Ž)
2. 1
1
𝑠
3. 𝑒 π‘Žπ‘‘ 1
𝑠 βˆ’ π‘Ž
4. 𝑑 𝑛 𝑛!
𝑠 𝑛+1
5. 𝑑 𝑛
𝑒 π‘Žπ‘‘ 𝑛!
(𝑠 βˆ’ π‘Ž) 𝑛+1
6. sin 𝑏𝑑
𝑏
𝑠2 + 𝑏2
7. cos 𝑏𝑑
𝑠
𝑠2 + 𝑏2
8. 𝑒 π‘Žπ‘‘
sin 𝑏𝑑
𝑏
(𝑠 βˆ’ π‘Ž)2 + 𝑏2
9. 𝑒 π‘Žπ‘‘
cos 𝑏𝑑
𝑠 βˆ’ π‘Ž
(𝑠 βˆ’ π‘Ž)2 + 𝑏2
10. 𝑑 sin 𝑏𝑑
2𝑏𝑠
(𝑠2 + 𝑏2)2
11. 𝑑 cos 𝑏𝑑
𝑠2
βˆ’ 𝑏2
(𝑠2 + 𝑏2)2
12. 𝑒 𝑐(𝑑)
π‘’βˆ’π‘π‘ 
𝑠
13. 𝑒 𝑐(𝑑)𝑓(𝑑 βˆ’ 𝑐) π‘’βˆ’π‘π‘ 
𝐹(𝑠)
14. 𝛿(𝑑 βˆ’ 𝑐) π‘’βˆ’π‘π‘ 
15. Λ™π‘₯(𝑑) 𝑠𝑋(𝑠) βˆ’ π‘₯(0)
16. Β¨π‘₯(𝑑) 𝑠2
𝑋(𝑠) βˆ’ 𝑠π‘₯(0) βˆ’ Λ™π‘₯(0)
Table 4.1: Table of Laplace Transforms
4.1. DEFINITION AND PROPERTIES 49
There is also a one-to-one correspondence between functions and their Laplace
transforms. A table of Laplace transforms can therefore be constructed and used
to find both Laplace and inverse Laplace transforms of commonly occurring
functions. Such a table is shown in Table 4.1 (and this table will be distributed
with the exams). In Table 4.1, 𝑛 is a positive integer. Also, the cryptic entries
for 𝑒 𝑐(𝑑) and 𝛿(𝑑 βˆ’ 𝑐) will be explained later in S4.3.
The rows of Table 4.1 can be determined by a combination of direct inte-
gration and some tricks. We first compute directly the Laplace transform of
𝑒 π‘Žπ‘‘
𝑓(𝑑) (line 1):
β„’{𝑒 π‘Žπ‘‘
𝑓(𝑑)} =
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
𝑒 π‘Žπ‘‘
𝑓(𝑑)𝑑𝑑
=
∫︁ ∞
0
π‘’βˆ’(π‘ βˆ’π‘Ž)𝑑
𝑓(𝑑)𝑑𝑑
= 𝐹(𝑠 βˆ’ π‘Ž).
We also compute directly the Laplace transform of 1 (line 2):
β„’{1} =
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
𝑑𝑑
= βˆ’
1
𝑠
π‘’βˆ’π‘ π‘‘
]οΈ‚βˆž
0
=
1
𝑠
.
Now, the Laplace transform of 𝑒 π‘Žπ‘‘
(line 3) may be found using these two results:
β„’{𝑒 π‘Žπ‘‘
} = β„’{𝑒 π‘Žπ‘‘
Β· 1}
=
1
𝑠 βˆ’ π‘Ž
.
(4.2)
The transform of 𝑑 𝑛
(line 4) can be found by successive integration by parts. A
more interesting method uses Taylor series expansions for 𝑒 π‘Žπ‘‘
and 1/(π‘ βˆ’ π‘Ž). We
have
β„’{𝑒 π‘Žπ‘‘
} = β„’
{οΈƒ βˆžβˆ‘οΈ
𝑛=0
(π‘Žπ‘‘) 𝑛
𝑛!
}οΈƒ
=
βˆžβˆ‘οΈ
𝑛=0
π‘Ž 𝑛
𝑛!
β„’{𝑑 𝑛
}.
(4.3)
Also, with 𝑠 > π‘Ž,
1
𝑠 βˆ’ π‘Ž
=
1
𝑠(1 βˆ’ π‘Ž
𝑠 )
=
1
𝑠
βˆžβˆ‘οΈ
𝑛=0
(︁ π‘Ž
𝑠
)︁ 𝑛
=
βˆžβˆ‘οΈ
𝑛=0
π‘Ž 𝑛
𝑠 𝑛+1
.
(4.4)
50 CHAPTER 4. THE LAPLACE TRANSFORM
Using (4.2), and equating the coefficients of powers of π‘Ž in (4.3) and (4.4), results
in line 4:
β„’{𝑑 𝑛
} =
𝑛!
𝑠 𝑛+1
.
The Laplace transform of 𝑑 𝑛
𝑒 π‘Žπ‘‘
(line 5) can be found from line 1 and line 4:
β„’{𝑑 𝑛
𝑒 π‘Žπ‘‘
} =
𝑛!
(𝑠 βˆ’ π‘Ž) 𝑛+1
.
The Laplace transform of sin 𝑏𝑑 (line 6) may be found from the Laplace transform
of 𝑒 π‘Žπ‘‘
(line 3) using π‘Ž = 𝑖𝑏:
β„’{sin 𝑏𝑑} = Im
{οΈ€
β„’{𝑒𝑖𝑏𝑑
}
}οΈ€
= Im
{οΈ‚
1
𝑠 βˆ’ 𝑖𝑏
}οΈ‚
= Im
{οΈ‚
𝑠 + 𝑖𝑏
𝑠2 + 𝑏2
}οΈ‚
=
𝑏
𝑠2 + 𝑏2
.
Similarly, the Laplace transform of cos 𝑏𝑑 (line 7) is
β„’{cos 𝑏𝑑} = Re
{οΈ€
β„’{𝑒𝑖𝑏𝑑
}
}οΈ€
=
𝑠
𝑠2 + 𝑏2
.
The transform of 𝑒 π‘Žπ‘‘
sin 𝑏𝑑 (line 8) can be found from the transform of sin 𝑏𝑑
(line 6) and line 1:
β„’{𝑒 π‘Žπ‘‘
sin 𝑏𝑑} =
𝑏
(𝑠 βˆ’ π‘Ž)2 + 𝑏2
;
and similarly for the transform of 𝑒 π‘Žπ‘‘
cos 𝑏𝑑:
β„’{𝑒 π‘Žπ‘‘
cos 𝑏𝑑} =
𝑠 βˆ’ π‘Ž
(𝑠 βˆ’ π‘Ž)2 + 𝑏2
.
The Laplace transform of 𝑑 sin 𝑏𝑑 (line 10) can be found from the Laplace trans-
form of 𝑑𝑒 π‘Žπ‘‘
(line 5 with 𝑛 = 1) using π‘Ž = 𝑖𝑏:
β„’{𝑑 sin 𝑏𝑑} = Im
{οΈ€
β„’{𝑑𝑒𝑖𝑏𝑑
}
}οΈ€
= Im
{οΈ‚
1
(𝑠 βˆ’ 𝑖𝑏)2
}οΈ‚
= Im
{οΈ‚
(𝑠 + 𝑖𝑏)2
(𝑠2 + 𝑏2)2
}οΈ‚
=
2𝑏𝑠
(𝑠2 + 𝑏2)2
.
Similarly, the Laplace transform of 𝑑 cos 𝑏𝑑 (line 11) is
β„’{𝑑 cos 𝑏𝑑} = Re
{οΈ€
β„’{𝑑𝑒𝑖𝑏𝑑
}
}οΈ€
= Re
{οΈ‚
(𝑠 + 𝑖𝑏)2
(𝑠2 + 𝑏2)2
}οΈ‚
=
𝑠2
βˆ’ 𝑏2
(𝑠2 + 𝑏2)2
.
4.2. SOLUTION OF INITIAL VALUE PROBLEMS 51
We now transform the inhomogeneous constant-coefficient, second-order, lin-
ear inhomogeneous ode for π‘₯ = π‘₯(𝑑),
π‘ŽΒ¨π‘₯ + 𝑏 Λ™π‘₯ + 𝑐π‘₯ = 𝑔(𝑑),
making use of the linearity of the Laplace transform:
π‘Žβ„’{Β¨π‘₯} + 𝑏ℒ{ Λ™π‘₯} + 𝑐ℒ{π‘₯} = β„’{𝑔}.
To determine the Laplace transform of Λ™π‘₯(𝑑) (line 15) in terms of the Laplace
transform of π‘₯(𝑑) and the initial conditions π‘₯(0) and Λ™π‘₯(0), we define 𝑋(𝑠) =
β„’{π‘₯(𝑑)}, and integrate ∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
Λ™π‘₯𝑑𝑑
by parts. We let
𝑒 = π‘’βˆ’π‘ π‘‘
𝑑𝑣 = Λ™π‘₯𝑑𝑑
𝑑𝑒 = βˆ’π‘ π‘’βˆ’π‘ π‘‘
𝑑𝑑 𝑣 = π‘₯.
Therefore,
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
Λ™π‘₯𝑑𝑑 = π‘₯π‘’βˆ’π‘ π‘‘
]οΈ€βˆž
0
+ 𝑠
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
π‘₯𝑑𝑑
= 𝑠𝑋(𝑠) βˆ’ π‘₯(0),
where assumed convergence of the Laplace transform requires
lim
π‘‘β†’βˆž
π‘₯(𝑑)π‘’βˆ’π‘ π‘‘
= 0.
Similarly, the Laplace transform of Β¨π‘₯(𝑑) (line 16) is determined by integrating
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
Β¨π‘₯ 𝑑𝑑
by parts and using the just derived result for the first derivative. We let
𝑒 = π‘’βˆ’π‘ π‘‘
𝑑𝑣 = Β¨π‘₯ 𝑑𝑑
𝑑𝑒 = βˆ’π‘ π‘’βˆ’π‘ π‘‘
𝑑𝑑 𝑣 = Λ™π‘₯,
so that
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
Β¨π‘₯ 𝑑𝑑 = Λ™π‘₯π‘’βˆ’π‘ π‘‘
]οΈ€βˆž
0
+ 𝑠
∫︁ ∞
0
π‘’βˆ’π‘ π‘‘
Λ™π‘₯𝑑𝑑
= βˆ’ Λ™π‘₯(0) + 𝑠
(οΈ€
𝑠𝑋(𝑠) βˆ’ π‘₯(0)
)οΈ€
= 𝑠2
𝑋(𝑠) βˆ’ 𝑠π‘₯(0) βˆ’ Λ™π‘₯(0),
where similarly we assume lim π‘‘β†’βˆž Λ™π‘₯(𝑑)π‘’βˆ’π‘ π‘‘
= 0.
4.2 Solution of initial value problems
We begin with a simple homogeneous ode and show that the Laplace transform
method yields an identical result to our previously learned method. We then
apply the Laplace transform method to solve an inhomogeneous equation.
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations
Differential equations

More Related Content

What's hot

Quadric surfaces
Quadric surfacesQuadric surfaces
Quadric surfaces
Ankur Kumar
Β 
Structure chart
Structure chartStructure chart
Structure chart
Roy Antony Arnold G
Β 
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project PresentationSouvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Akshit Arora
Β 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
Satyamevjayte Haxor
Β 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
Ankur Kumar
Β 
Project report
Project reportProject report
Project report
shailendra patidar
Β 
B-spline
B-spline B-spline
B-spline
nmahi96
Β 
Solution of equations and eigenvalue problems
Solution of equations and eigenvalue problemsSolution of equations and eigenvalue problems
Solution of equations and eigenvalue problems
Santhanam Krishnan
Β 
Bayes Theorem.pdf
Bayes Theorem.pdfBayes Theorem.pdf
Bayes Theorem.pdf
Nirmalavenkatachalam
Β 
Pressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-modelsPressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-models
Noor Ul Hudda Memon
Β 
Anna university-ug-pg-ppt-presentation-format
Anna university-ug-pg-ppt-presentation-formatAnna university-ug-pg-ppt-presentation-format
Anna university-ug-pg-ppt-presentation-format
Veera Victory
Β 
Software Engineering - Chapter 4 - Requirements engineering
Software Engineering - Chapter 4 - Requirements engineering  Software Engineering - Chapter 4 - Requirements engineering
Software Engineering - Chapter 4 - Requirements engineering
Ra'Fat Al-Msie'deen
Β 
Lecture 1 introduction to software engineering 1
Lecture 1   introduction to software engineering 1Lecture 1   introduction to software engineering 1
Lecture 1 introduction to software engineering 1
IIUI
Β 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-Vertices
Ashikur Rahman
Β 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
Omprakash Chauhan
Β 
Computer graphics godse (technical publications)
Computer graphics  godse (technical publications)Computer graphics  godse (technical publications)
Computer graphics godse (technical publications)Manaswi Sharma
Β 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
Β 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
Nareek
Β 
Statistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptxStatistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
Β 

What's hot (20)

Quadric surfaces
Quadric surfacesQuadric surfaces
Quadric surfaces
Β 
Structure chart
Structure chartStructure chart
Structure chart
Β 
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project PresentationSouvenir's Booth - Algorithm Design and Analysis Project Presentation
Souvenir's Booth - Algorithm Design and Analysis Project Presentation
Β 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
Β 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
Β 
Project report
Project reportProject report
Project report
Β 
B-spline
B-spline B-spline
B-spline
Β 
Solution of equations and eigenvalue problems
Solution of equations and eigenvalue problemsSolution of equations and eigenvalue problems
Solution of equations and eigenvalue problems
Β 
Bayes Theorem.pdf
Bayes Theorem.pdfBayes Theorem.pdf
Bayes Theorem.pdf
Β 
Pressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-modelsPressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-models
Β 
Ch09
Ch09Ch09
Ch09
Β 
Anna university-ug-pg-ppt-presentation-format
Anna university-ug-pg-ppt-presentation-formatAnna university-ug-pg-ppt-presentation-format
Anna university-ug-pg-ppt-presentation-format
Β 
Software Engineering - Chapter 4 - Requirements engineering
Software Engineering - Chapter 4 - Requirements engineering  Software Engineering - Chapter 4 - Requirements engineering
Software Engineering - Chapter 4 - Requirements engineering
Β 
Lecture 1 introduction to software engineering 1
Lecture 1   introduction to software engineering 1Lecture 1   introduction to software engineering 1
Lecture 1 introduction to software engineering 1
Β 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-Vertices
Β 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
Β 
Computer graphics godse (technical publications)
Computer graphics  godse (technical publications)Computer graphics  godse (technical publications)
Computer graphics godse (technical publications)
Β 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
Β 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
Β 
Statistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptxStatistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptx
Β 

Viewers also liked

Mano
ManoMano
Treatment for diabetes with herbs and herbal supplements
Treatment for diabetes with herbs and herbal supplementsTreatment for diabetes with herbs and herbal supplements
Treatment for diabetes with herbs and herbal supplements
roycv
Β 
PMI-ACP Exam Study Flashcards sample
PMI-ACP Exam Study Flashcards samplePMI-ACP Exam Study Flashcards sample
PMI-ACP Exam Study Flashcards sample
Joseph Flahiff
Β 
Intel 8080 8085 assembly language programming 1977 intel
Intel 8080 8085 assembly language programming 1977 intelIntel 8080 8085 assembly language programming 1977 intel
Intel 8080 8085 assembly language programming 1977 intel
Omar Alkinani
Β 
Calculo earl swokowski subido JHS
Calculo  earl swokowski subido JHSCalculo  earl swokowski subido JHS
Calculo earl swokowski subido JHSjohnny herrera
Β 
Beaumont the algebraic foundations of mathematics
Beaumont   the algebraic foundations of mathematicsBeaumont   the algebraic foundations of mathematics
Beaumont the algebraic foundations of mathematics
Henry Gerardo GonzΓ‘lez
Β 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
Vale
Β 
Painting Manual :: Stampingcard
Painting Manual :: StampingcardPainting Manual :: Stampingcard
Painting Manual :: Stampingcard
Florencia San Martin BrΓΌck
Β 
capitulos 6
capitulos 6capitulos 6
capitulos 6
Carlos Correa Alvarez
Β 

Viewers also liked (11)

Mano
ManoMano
Mano
Β 
Treatment for diabetes with herbs and herbal supplements
Treatment for diabetes with herbs and herbal supplementsTreatment for diabetes with herbs and herbal supplements
Treatment for diabetes with herbs and herbal supplements
Β 
PMI-ACP Exam Study Flashcards sample
PMI-ACP Exam Study Flashcards samplePMI-ACP Exam Study Flashcards sample
PMI-ACP Exam Study Flashcards sample
Β 
Intel 8080 8085 assembly language programming 1977 intel
Intel 8080 8085 assembly language programming 1977 intelIntel 8080 8085 assembly language programming 1977 intel
Intel 8080 8085 assembly language programming 1977 intel
Β 
Curso de-mcu-proteus
Curso de-mcu-proteusCurso de-mcu-proteus
Curso de-mcu-proteus
Β 
Calculo earl swokowski subido JHS
Calculo  earl swokowski subido JHSCalculo  earl swokowski subido JHS
Calculo earl swokowski subido JHS
Β 
Beaumont the algebraic foundations of mathematics
Beaumont   the algebraic foundations of mathematicsBeaumont   the algebraic foundations of mathematics
Beaumont the algebraic foundations of mathematics
Β 
Uml
UmlUml
Uml
Β 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
Β 
Painting Manual :: Stampingcard
Painting Manual :: StampingcardPainting Manual :: Stampingcard
Painting Manual :: Stampingcard
Β 
capitulos 6
capitulos 6capitulos 6
capitulos 6
Β 

Similar to Differential equations

Ode2015
Ode2015Ode2015
Partial differential equations, graduate level problems and solutions by igor...
Partial differential equations, graduate level problems and solutions by igor...Partial differential equations, graduate level problems and solutions by igor...
Partial differential equations, graduate level problems and solutions by igor...
Julio Banks
Β 
Business Mathematics Code 1429
Business Mathematics Code 1429Business Mathematics Code 1429
Business Mathematics Code 1429
eniacnetpoint
Β 
Zettili.pdf
Zettili.pdfZettili.pdf
Zettili.pdf
BrayanLopezRaymundo
Β 
Lecture notes on planetary sciences and orbit determination
Lecture notes on planetary sciences and orbit determinationLecture notes on planetary sciences and orbit determination
Lecture notes on planetary sciences and orbit determination
Ernst Schrama
Β 
Introduction_to modern algebra David_Joyce
Introduction_to modern algebra   David_JoyceIntroduction_to modern algebra   David_Joyce
Introduction_to modern algebra David_Joyce
vorticidad
Β 
Quantum Mechanics: Lecture notes
Quantum Mechanics: Lecture notesQuantum Mechanics: Lecture notes
Quantum Mechanics: Lecture notespolariton
Β 
Quantum mechanics
Quantum mechanicsQuantum mechanics
Quantum mechanicsSergio Zaina
Β 
Fundamentals of computational fluid dynamics
Fundamentals of computational fluid dynamicsFundamentals of computational fluid dynamics
Fundamentals of computational fluid dynamicsAghilesh V
Β 
The Cellular Automaton Interpretation of Quantum Mechanics
The Cellular Automaton Interpretation of Quantum MechanicsThe Cellular Automaton Interpretation of Quantum Mechanics
The Cellular Automaton Interpretation of Quantum MechanicsHunter Swart
Β 
Qmall20121005
Qmall20121005Qmall20121005
Qmall20121005
Oneil Henry
Β 
Nb
NbNb
Thermal and statistical physics h. gould, j. tobochnik-1
Thermal and statistical physics   h. gould, j. tobochnik-1Thermal and statistical physics   h. gould, j. tobochnik-1
Thermal and statistical physics h. gould, j. tobochnik-1
Petrus Bahy
Β 
Basic calculus free
Basic calculus freeBasic calculus free
Basic calculus free
lydmilaroy
Β 
Transport
TransportTransport
Quantm mechanics book
Quantm mechanics bookQuantm mechanics book
Quantm mechanics book
ish khan
Β 
Thesis lebanon
Thesis lebanonThesis lebanon
Thesis lebanon
Guy Lebanon
Β 
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Aditya Singh
Β 
main-moonmath.pdf
main-moonmath.pdfmain-moonmath.pdf
main-moonmath.pdf
SonalKumarSingh8
Β 

Similar to Differential equations (20)

Ode2015
Ode2015Ode2015
Ode2015
Β 
Partial differential equations, graduate level problems and solutions by igor...
Partial differential equations, graduate level problems and solutions by igor...Partial differential equations, graduate level problems and solutions by igor...
Partial differential equations, graduate level problems and solutions by igor...
Β 
Business Mathematics Code 1429
Business Mathematics Code 1429Business Mathematics Code 1429
Business Mathematics Code 1429
Β 
Zettili.pdf
Zettili.pdfZettili.pdf
Zettili.pdf
Β 
SMA206_NOTES
SMA206_NOTESSMA206_NOTES
SMA206_NOTES
Β 
Lecture notes on planetary sciences and orbit determination
Lecture notes on planetary sciences and orbit determinationLecture notes on planetary sciences and orbit determination
Lecture notes on planetary sciences and orbit determination
Β 
Introduction_to modern algebra David_Joyce
Introduction_to modern algebra   David_JoyceIntroduction_to modern algebra   David_Joyce
Introduction_to modern algebra David_Joyce
Β 
Quantum Mechanics: Lecture notes
Quantum Mechanics: Lecture notesQuantum Mechanics: Lecture notes
Quantum Mechanics: Lecture notes
Β 
Quantum mechanics
Quantum mechanicsQuantum mechanics
Quantum mechanics
Β 
Fundamentals of computational fluid dynamics
Fundamentals of computational fluid dynamicsFundamentals of computational fluid dynamics
Fundamentals of computational fluid dynamics
Β 
The Cellular Automaton Interpretation of Quantum Mechanics
The Cellular Automaton Interpretation of Quantum MechanicsThe Cellular Automaton Interpretation of Quantum Mechanics
The Cellular Automaton Interpretation of Quantum Mechanics
Β 
Qmall20121005
Qmall20121005Qmall20121005
Qmall20121005
Β 
Nb
NbNb
Nb
Β 
Thermal and statistical physics h. gould, j. tobochnik-1
Thermal and statistical physics   h. gould, j. tobochnik-1Thermal and statistical physics   h. gould, j. tobochnik-1
Thermal and statistical physics h. gould, j. tobochnik-1
Β 
Basic calculus free
Basic calculus freeBasic calculus free
Basic calculus free
Β 
Transport
TransportTransport
Transport
Β 
Quantm mechanics book
Quantm mechanics bookQuantm mechanics book
Quantm mechanics book
Β 
Thesis lebanon
Thesis lebanonThesis lebanon
Thesis lebanon
Β 
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Xin-She Yang - Introductory Mathematics for Earth Scientists -Dunedin Academi...
Β 
main-moonmath.pdf
main-moonmath.pdfmain-moonmath.pdf
main-moonmath.pdf
Β 

Recently uploaded

Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
Β 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
Β 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
Β 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
Areesha Ahmad
Β 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
SΓ©rgio Sacani
Β 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
Β 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
Β 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
AADYARAJPANDEY1
Β 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
Β 
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
NathanBaughman3
Β 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Health Advances
Β 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
Β 
Predicting property prices with machine learning algorithms.pdf
Predicting property prices with machine learning algorithms.pdfPredicting property prices with machine learning algorithms.pdf
Predicting property prices with machine learning algorithms.pdf
binhminhvu04
Β 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Richard Gill
Β 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
Β 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
Β 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
Cherry
Β 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
Cherry
Β 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
Β 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
Β 

Recently uploaded (20)

Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Β 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
Β 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
Β 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
Β 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Β 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
Β 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Β 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
Β 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
Β 
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Β 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Β 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
Β 
Predicting property prices with machine learning algorithms.pdf
Predicting property prices with machine learning algorithms.pdfPredicting property prices with machine learning algorithms.pdf
Predicting property prices with machine learning algorithms.pdf
Β 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Β 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Β 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Β 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
Β 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
Β 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
Β 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
Β 

Differential equations

  • 1. Introduction to Differential Equations Lecture notes for MATH 2351/2352 Jeffrey R. Chasnov The Hong Kong University of Science and Technology
  • 2. The Hong Kong University of Science and Technology Department of Mathematics Clear Water Bay, Kowloon Hong Kong Copyright cβ—‹ 2009–2014 by Jeffrey Robert Chasnov This work is licensed under the Creative Commons Attribution 3.0 Hong Kong License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/hk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
  • 3. Preface What follows are my lecture notes for a first course in differential equations, taught at the Hong Kong University of Science and Technology. Included in these notes are links to short tutorial videos posted on YouTube. Much of the material of Chapters 2-6 and 8 has been adapted from the widely used textbook β€œElementary differential equations and boundary value problems” by Boyce & DiPrima (John Wiley & Sons, Inc., Seventh Edition, cβ—‹2001). Many of the examples presented in these notes may be found in this book. The material of Chapter 7 is adapted from the textbook β€œNonlinear dynamics and chaos” by Steven H. Strogatz (Perseus Publishing, cβ—‹1994). All web surfers are welcome to download these notes, watch the YouTube videos, and to use the notes and videos freely for teaching and learning. An associated free review book with links to YouTube videos is also available from the ebook publisher bookboon.com. I welcome any comments, suggestions or corrections sent by email to jeffrey.chasnov@ust.hk. Links to my website, these lecture notes, my YouTube page, and the free ebook from bookboon.com are given below. Homepage: http://www.math.ust.hk/~machas YouTube: https://www.youtube.com/user/jchasnov Lecture notes: http://www.math.ust.hk/~machas/differential-equations.pdf Bookboon: http://bookboon.com/en/differential-equations-with-youtube-examples-ebook iii
  • 4.
  • 5. Contents 0 A short mathematical review 1 0.1 The trigonometric functions . . . . . . . . . . . . . . . . . . . . . 1 0.2 The exponential function and the natural logarithm . . . . . . . 1 0.3 Definition of the derivative . . . . . . . . . . . . . . . . . . . . . 2 0.4 Differentiating a combination of functions . . . . . . . . . . . . . 2 0.4.1 The sum or difference rule . . . . . . . . . . . . . . . . . . 2 0.4.2 The product rule . . . . . . . . . . . . . . . . . . . . . . . 2 0.4.3 The quotient rule . . . . . . . . . . . . . . . . . . . . . . . 2 0.4.4 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . 3 0.5 Differentiating elementary functions . . . . . . . . . . . . . . . . 3 0.5.1 The power rule . . . . . . . . . . . . . . . . . . . . . . . . 3 0.5.2 Trigonometric functions . . . . . . . . . . . . . . . . . . . 3 0.5.3 Exponential and natural logarithm functions . . . . . . . 3 0.6 Definition of the integral . . . . . . . . . . . . . . . . . . . . . . . 3 0.7 The fundamental theorem of calculus . . . . . . . . . . . . . . . . 4 0.8 Definite and indefinite integrals . . . . . . . . . . . . . . . . . . . 5 0.9 Indefinite integrals of elementary functions . . . . . . . . . . . . . 5 0.10 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 0.11 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . 6 0.12 Taylor series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0.13 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1 Introduction to odes 11 1.1 The simplest type of differential equation . . . . . . . . . . . . . 11 2 First-order odes 13 2.1 The Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Separable equations . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3 Linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4.1 Compound interest . . . . . . . . . . . . . . . . . . . . . . 20 2.4.2 Chemical reactions . . . . . . . . . . . . . . . . . . . . . . 21 2.4.3 Terminal velocity . . . . . . . . . . . . . . . . . . . . . . . 23 2.4.4 Escape velocity . . . . . . . . . . . . . . . . . . . . . . . . 24 2.4.5 RC circuit . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.4.6 The logistic equation . . . . . . . . . . . . . . . . . . . . . 27 v
  • 6. vi CONTENTS 3 Second-order odes, constant coefficients 29 3.1 The Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2 The principle of superposition . . . . . . . . . . . . . . . . . . . . 30 3.3 The Wronskian . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.4 Homogeneous odes . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.4.1 Real, distinct roots . . . . . . . . . . . . . . . . . . . . . . 32 3.4.2 Complex conjugate, distinct roots . . . . . . . . . . . . . 34 3.4.3 Repeated roots . . . . . . . . . . . . . . . . . . . . . . . . 36 3.5 Inhomogeneous odes . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.6 First-order linear inhomogeneous odes revisited . . . . . . . . . . 41 3.7 Resonance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.8 Damped resonance . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4 The Laplace transform 47 4.1 Definition and properties . . . . . . . . . . . . . . . . . . . . . . . 47 4.2 Solution of initial value problems . . . . . . . . . . . . . . . . . . 51 4.3 Heaviside and Dirac delta functions . . . . . . . . . . . . . . . . . 54 4.3.1 Heaviside function . . . . . . . . . . . . . . . . . . . . . . 54 4.3.2 Dirac delta function . . . . . . . . . . . . . . . . . . . . . 56 4.4 Discontinuous or impulsive terms . . . . . . . . . . . . . . . . . . 57 5 Series solutions 61 5.1 Ordinary points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.2 Regular singular points: Cauchy-Euler equations . . . . . . . . . 65 5.2.1 Real, distinct roots . . . . . . . . . . . . . . . . . . . . . . 67 5.2.2 Complex conjugate roots . . . . . . . . . . . . . . . . . . 67 5.2.3 Repeated roots . . . . . . . . . . . . . . . . . . . . . . . . 67 6 Systems of equations 69 6.1 Determinants and the eigenvalue problem . . . . . . . . . . . . . 69 6.2 Coupled first-order equations . . . . . . . . . . . . . . . . . . . . 71 6.2.1 Two distinct real eigenvalues . . . . . . . . . . . . . . . . 71 6.2.2 Complex conjugate eigenvalues . . . . . . . . . . . . . . . 75 6.2.3 Repeated eigenvalues with one eigenvector . . . . . . . . . 77 6.3 Normal modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 7 Nonlinear differential equations 83 7.1 Fixed points and stability . . . . . . . . . . . . . . . . . . . . . . 83 7.1.1 One dimension . . . . . . . . . . . . . . . . . . . . . . . . 83 7.1.2 Two dimensions . . . . . . . . . . . . . . . . . . . . . . . 84 7.2 One-dimensional bifurcations . . . . . . . . . . . . . . . . . . . . 87 7.2.1 Saddle-node bifurcation . . . . . . . . . . . . . . . . . . . 87 7.2.2 Transcritical bifurcation . . . . . . . . . . . . . . . . . . . 88 7.2.3 Supercritical pitchfork bifurcation . . . . . . . . . . . . . 88 7.2.4 Subcritical pitchfork bifurcation . . . . . . . . . . . . . . 89 7.2.5 Application: a mathematical model of a fishery . . . . . . 92 7.3 Two-dimensional bifurcations . . . . . . . . . . . . . . . . . . . . 94 7.3.1 Supercritical Hopf bifurcation . . . . . . . . . . . . . . . . 94 7.3.2 Subcritical Hopf bifurcation . . . . . . . . . . . . . . . . . 95
  • 7. CONTENTS vii 8 Partial differential equations 97 8.1 Derivation of the diffusion equation . . . . . . . . . . . . . . . . . 97 8.2 Derivation of the wave equation . . . . . . . . . . . . . . . . . . . 98 8.3 Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 8.4 Fourier cosine and sine series . . . . . . . . . . . . . . . . . . . . 102 8.5 Solution of the diffusion equation . . . . . . . . . . . . . . . . . . 104 8.5.1 Homogeneous boundary conditions . . . . . . . . . . . . . 104 8.5.2 Inhomogeneous boundary conditions . . . . . . . . . . . . 108 8.5.3 Pipe with closed ends . . . . . . . . . . . . . . . . . . . . 109 8.6 Solution of the wave equation . . . . . . . . . . . . . . . . . . . . 112 8.6.1 Plucked string . . . . . . . . . . . . . . . . . . . . . . . . 112 8.6.2 Hammered string . . . . . . . . . . . . . . . . . . . . . . . 114 8.6.3 General initial conditions . . . . . . . . . . . . . . . . . . 114 8.7 The Laplace equation . . . . . . . . . . . . . . . . . . . . . . . . 115 8.7.1 Dirichlet problem for a rectangle . . . . . . . . . . . . . . 115 8.7.2 Dirichlet problem for a circle . . . . . . . . . . . . . . . . 116
  • 9. Chapter 0 A short mathematical review A basic understanding of calculus is required to undertake a study of differential equations. This zero chapter presents a short review. 0.1 The trigonometric functions The Pythagorean trigonometric identity is sin2 π‘₯ + cos2 π‘₯ = 1, and the addition theorems are sin(π‘₯ + 𝑦) = sin(π‘₯) cos(𝑦) + cos(π‘₯) sin(𝑦), cos(π‘₯ + 𝑦) = cos(π‘₯) cos(𝑦) βˆ’ sin(π‘₯) sin(𝑦). Also, the values of sin π‘₯ in the first quadrant can be remembered by the rule of quarters, with 0∘ = 0, 30∘ = πœ‹/6, 45∘ = πœ‹/4, 60∘ = πœ‹/3, 90∘ = πœ‹/2: sin 0∘ = βˆšοΈ‚ 0 4 , sin 30∘ = βˆšοΈ‚ 1 4 , sin 45∘ = βˆšοΈ‚ 2 4 , sin 60∘ = βˆšοΈ‚ 3 4 , sin 90∘ = βˆšοΈ‚ 4 4 . The following symmetry properties are also useful: sin(πœ‹/2 βˆ’ π‘₯) = cos π‘₯, cos(πœ‹/2 βˆ’ π‘₯) = sin π‘₯; and sin(βˆ’π‘₯) = βˆ’ sin(π‘₯), cos(βˆ’π‘₯) = cos(π‘₯). 0.2 The exponential function and the natural logarithm The transcendental number 𝑒, approximately 2.71828, is defined as 𝑒 = lim π‘›β†’βˆž (οΈ‚ 1 + 1 𝑛 )οΈ‚ 𝑛 . 1
  • 10. 2 CHAPTER 0. A SHORT MATHEMATICAL REVIEW The exponential function exp (π‘₯) = 𝑒 π‘₯ and natural logarithm ln π‘₯ are inverse functions satisfying 𝑒ln π‘₯ = π‘₯, ln 𝑒 π‘₯ = π‘₯. The usual rules of exponents apply: 𝑒 π‘₯ 𝑒 𝑦 = 𝑒 π‘₯+𝑦 , 𝑒 π‘₯ /𝑒 𝑦 = 𝑒 π‘₯βˆ’π‘¦ , (𝑒 π‘₯ ) 𝑝 = 𝑒 𝑝π‘₯ . The corresponding rules for the logarithmic function are ln (π‘₯𝑦) = ln π‘₯ + ln 𝑦, ln (π‘₯/𝑦) = ln π‘₯ βˆ’ ln 𝑦, ln π‘₯ 𝑝 = 𝑝 ln π‘₯. 0.3 Definition of the derivative The derivative of the function 𝑦 = 𝑓(π‘₯), denoted as 𝑓′ (π‘₯) or 𝑑𝑦/𝑑π‘₯, is defined as the slope of the tangent line to the curve 𝑦 = 𝑓(π‘₯) at the point (π‘₯, 𝑦). This slope is obtained by a limit, and is defined as 𝑓′ (π‘₯) = lim β„Žβ†’0 𝑓(π‘₯ + β„Ž) βˆ’ 𝑓(π‘₯) β„Ž . (1) 0.4 Differentiating a combination of functions 0.4.1 The sum or difference rule The derivative of the sum of 𝑓(π‘₯) and 𝑔(π‘₯) is (𝑓 + 𝑔)β€² = 𝑓′ + 𝑔′ . Similarly, the derivative of the difference is (𝑓 βˆ’ 𝑔)β€² = 𝑓′ βˆ’ 𝑔′ . 0.4.2 The product rule The derivative of the product of 𝑓(π‘₯) and 𝑔(π‘₯) is (𝑓 𝑔)β€² = 𝑓′ 𝑔 + 𝑓 𝑔′ , and should be memorized as β€œthe derivative of the first times the second plus the first times the derivative of the second.” 0.4.3 The quotient rule The derivative of the quotient of 𝑓(π‘₯) and 𝑔(π‘₯) is (οΈ‚ 𝑓 𝑔 )οΈ‚β€² = 𝑓′ 𝑔 βˆ’ 𝑓 𝑔′ 𝑔2 , and should be memorized as β€œthe derivative of the top times the bottom minus the top times the derivative of the bottom over the bottom squared.”
  • 11. 0.5. DIFFERENTIATING ELEMENTARY FUNCTIONS 3 0.4.4 The chain rule The derivative of the composition of 𝑓(π‘₯) and 𝑔(π‘₯) is (︁ 𝑓 (οΈ€ 𝑔(π‘₯) )οΈ€)︁′ = 𝑓′ (οΈ€ 𝑔(π‘₯) )οΈ€ Β· 𝑔′ (π‘₯), and should be memorized as β€œthe derivative of the outside times the derivative of the inside.” 0.5 Differentiating elementary functions 0.5.1 The power rule The derivative of a power of π‘₯ is given by 𝑑 𝑑π‘₯ π‘₯ 𝑝 = 𝑝π‘₯ π‘βˆ’1 . 0.5.2 Trigonometric functions The derivatives of sin π‘₯ and cos π‘₯ are (sin π‘₯)β€² = cos π‘₯, (cos π‘₯)β€² = βˆ’ sin π‘₯. We thus say that β€œthe derivative of sine is cosine,” and β€œthe derivative of cosine is minus sine.” Notice that the second derivatives satisfy (sin π‘₯)β€²β€² = βˆ’ sin π‘₯, (cos π‘₯)β€²β€² = βˆ’ cos π‘₯. 0.5.3 Exponential and natural logarithm functions The derivative of 𝑒 π‘₯ and ln π‘₯ are (𝑒 π‘₯ )β€² = 𝑒 π‘₯ , (ln π‘₯)β€² = 1 π‘₯ . 0.6 Definition of the integral The definite integral of a function 𝑓(π‘₯) > 0 from π‘₯ = π‘Ž to 𝑏 (𝑏 > π‘Ž) is defined as the area bounded by the vertical lines π‘₯ = π‘Ž, π‘₯ = 𝑏, the x-axis and the curve 𝑦 = 𝑓(π‘₯). This β€œarea under the curve” is obtained by a limit. First, the area is approximated by a sum of rectangle areas. Second, the integral is defined to be the limit of the rectangle areas as the width of each individual rectangle goes to zero and the number of rectangles goes to infinity. This resulting infinite sum is called a Riemann Sum, and we define ∫︁ 𝑏 π‘Ž 𝑓(π‘₯)𝑑π‘₯ = lim β„Žβ†’0 π‘βˆ‘οΈ 𝑛=1 𝑓 (οΈ€ π‘Ž + (𝑛 βˆ’ 1)β„Ž )οΈ€ Β· β„Ž, (2) where 𝑁 = (𝑏 βˆ’ π‘Ž)/β„Ž is the number of terms in the sum. The symbols on the left-hand-side of (2) are read as β€œthe integral from π‘Ž to 𝑏 of f of x dee x.” The
  • 12. 4 CHAPTER 0. A SHORT MATHEMATICAL REVIEW Riemann Sum definition is extended to all values of π‘Ž and 𝑏 and for all values of 𝑓(π‘₯) (positive and negative). Accordingly, ∫︁ π‘Ž 𝑏 𝑓(π‘₯)𝑑π‘₯ = βˆ’ ∫︁ 𝑏 π‘Ž 𝑓(π‘₯)𝑑π‘₯ and ∫︁ 𝑏 π‘Ž (βˆ’π‘“(π‘₯))𝑑π‘₯ = βˆ’ ∫︁ 𝑏 π‘Ž 𝑓(π‘₯)𝑑π‘₯. Also, if π‘Ž < 𝑏 < 𝑐, then ∫︁ 𝑐 π‘Ž 𝑓(π‘₯)𝑑π‘₯ = ∫︁ 𝑏 π‘Ž 𝑓(π‘₯)𝑑π‘₯ + ∫︁ 𝑐 𝑏 𝑓(π‘₯)𝑑π‘₯, which states (when 𝑓(π‘₯) > 0) that the total area equals the sum of its parts. 0.7 The fundamental theorem of calculus view tutorial Using the definition of the derivative, we differentiate the following integral: 𝑑 𝑑π‘₯ ∫︁ π‘₯ π‘Ž 𝑓(𝑠)𝑑𝑠 = lim β„Žβ†’0 βˆ«οΈ€ π‘₯+β„Ž π‘Ž 𝑓(𝑠)𝑑𝑠 βˆ’ βˆ«οΈ€ π‘₯ π‘Ž 𝑓(𝑠)𝑑𝑠 β„Ž = lim β„Žβ†’0 βˆ«οΈ€ π‘₯+β„Ž π‘₯ 𝑓(𝑠)𝑑𝑠 β„Ž = lim β„Žβ†’0 β„Žπ‘“(π‘₯) β„Ž = 𝑓(π‘₯). This result is called the fundamental theorem of calculus, and provides a con- nection between differentiation and integration. The fundamental theorem teaches us how to integrate functions. Let 𝐹(π‘₯) be a function such that 𝐹′ (π‘₯) = 𝑓(π‘₯). We say that 𝐹(π‘₯) is an antiderivative of 𝑓(π‘₯). Then from the fundamental theorem and the fact that the derivative of a constant equals zero, 𝐹(π‘₯) = ∫︁ π‘₯ π‘Ž 𝑓(𝑠)𝑑𝑠 + 𝑐. Now, 𝐹(π‘Ž) = 𝑐 and 𝐹(𝑏) = βˆ«οΈ€ 𝑏 π‘Ž 𝑓(𝑠)𝑑𝑠 + 𝐹(π‘Ž). Therefore, the fundamental theorem shows us how to integrate a function 𝑓(π‘₯) provided we can find its antiderivative: ∫︁ 𝑏 π‘Ž 𝑓(𝑠)𝑑𝑠 = 𝐹(𝑏) βˆ’ 𝐹(π‘Ž). (3) Unfortunately, finding antiderivatives is much harder than finding derivatives, and indeed, most complicated functions cannot be integrated analytically. We can also derive the very important result (3) directly from the definition of the derivative (1) and the definite integral (2). We will see it is convenient
  • 13. 0.8. DEFINITE AND INDEFINITE INTEGRALS 5 to choose the same β„Ž in both limits. With 𝐹′ (π‘₯) = 𝑓(π‘₯), we have ∫︁ 𝑏 π‘Ž 𝑓(𝑠)𝑑𝑠 = ∫︁ 𝑏 π‘Ž 𝐹′ (𝑠)𝑑𝑠 = lim β„Žβ†’0 π‘βˆ‘οΈ 𝑛=1 𝐹′ (οΈ€ π‘Ž + (𝑛 βˆ’ 1)β„Ž )οΈ€ Β· β„Ž = lim β„Žβ†’0 π‘βˆ‘οΈ 𝑛=1 𝐹(π‘Ž + π‘›β„Ž) βˆ’ 𝐹 (οΈ€ π‘Ž + (𝑛 βˆ’ 1)β„Ž )οΈ€ β„Ž Β· β„Ž = lim β„Žβ†’0 π‘βˆ‘οΈ 𝑛=1 𝐹(π‘Ž + π‘›β„Ž) βˆ’ 𝐹 (οΈ€ π‘Ž + (𝑛 βˆ’ 1)β„Ž )οΈ€ . The last expression has an interesting structure. All the values of 𝐹(π‘₯) eval- uated at the points lying between the endpoints π‘Ž and 𝑏 cancel each other in consecutive terms. Only the value βˆ’πΉ(π‘Ž) survives when 𝑛 = 1, and the value +𝐹(𝑏) when 𝑛 = 𝑁, yielding again (3). 0.8 Definite and indefinite integrals The Riemann sum definition of an integral is called a definite integral. It is convenient to also define an indefinite integral by ∫︁ 𝑓(π‘₯)𝑑π‘₯ = 𝐹(π‘₯), where F(x) is the antiderivative of 𝑓(π‘₯). 0.9 Indefinite integrals of elementary functions From our known derivatives of elementary functions, we can determine some simple indefinite integrals. The power rule gives us ∫︁ π‘₯ 𝑛 𝑑π‘₯ = π‘₯ 𝑛+1 𝑛 + 1 + 𝑐, 𝑛 ΜΈ= βˆ’1. When 𝑛 = βˆ’1, and π‘₯ is positive, we have ∫︁ 1 π‘₯ 𝑑π‘₯ = ln π‘₯ + 𝑐. If π‘₯ is negative, using the chain rule we have 𝑑 𝑑π‘₯ ln (βˆ’π‘₯) = 1 π‘₯ . Therefore, since |π‘₯| = {οΈ‚ βˆ’π‘₯ if π‘₯ < 0; π‘₯ if π‘₯ > 0, we can generalize our indefinite integral to strictly positive or strictly negative π‘₯: ∫︁ 1 π‘₯ 𝑑π‘₯ = ln |π‘₯| + 𝑐.
  • 14. 6 CHAPTER 0. A SHORT MATHEMATICAL REVIEW Trigonometric functions can also be integrated: ∫︁ cos π‘₯𝑑π‘₯ = sin π‘₯ + 𝑐, ∫︁ sin π‘₯𝑑π‘₯ = βˆ’ cos π‘₯ + 𝑐. Easily proved identities are an addition rule: ∫︁ (οΈ€ 𝑓(π‘₯) + 𝑔(π‘₯) )οΈ€ 𝑑π‘₯ = ∫︁ 𝑓(π‘₯)𝑑π‘₯ + ∫︁ 𝑔(π‘₯)𝑑π‘₯; and multiplication by a constant: ∫︁ 𝐴𝑓(π‘₯)𝑑π‘₯ = 𝐴 ∫︁ 𝑓(π‘₯)𝑑π‘₯. This permits integration of functions such as ∫︁ (π‘₯2 + 7π‘₯ + 2)𝑑π‘₯ = π‘₯3 3 + 7π‘₯2 2 + 2π‘₯ + 𝑐, and ∫︁ (5 cos π‘₯ + sin π‘₯)𝑑π‘₯ = 5 sin π‘₯ βˆ’ cos π‘₯ + 𝑐. 0.10 Substitution More complicated functions can be integrated using the chain rule. Since 𝑑 𝑑π‘₯ 𝑓 (οΈ€ 𝑔(π‘₯) )οΈ€ = 𝑓′ (οΈ€ 𝑔(π‘₯) )οΈ€ Β· 𝑔′ (π‘₯), we have ∫︁ 𝑓′ (οΈ€ 𝑔(π‘₯) )οΈ€ Β· 𝑔′ (π‘₯)𝑑π‘₯ = 𝑓 (οΈ€ 𝑔(π‘₯) )οΈ€ + 𝑐. This integration formula is usually implemented by letting 𝑦 = 𝑔(π‘₯). Then one writes 𝑑𝑦 = 𝑔′ (π‘₯)𝑑π‘₯ to obtain ∫︁ 𝑓′ (οΈ€ 𝑔(π‘₯) )οΈ€ 𝑔′ (π‘₯)𝑑π‘₯ = ∫︁ 𝑓′ (𝑦)𝑑𝑦 = 𝑓(𝑦) + 𝑐 = 𝑓 (οΈ€ 𝑔(π‘₯) )οΈ€ + 𝑐. 0.11 Integration by parts Another integration technique makes use of the product rule for differentiation. Since (𝑓 𝑔)β€² = 𝑓′ 𝑔 + 𝑓 𝑔′ , we have 𝑓′ 𝑔 = (𝑓 𝑔)β€² βˆ’ 𝑓 𝑔′ . Therefore, ∫︁ 𝑓′ (π‘₯)𝑔(π‘₯)𝑑π‘₯ = 𝑓(π‘₯)𝑔(π‘₯) βˆ’ ∫︁ 𝑓(π‘₯)𝑔′ (π‘₯)𝑑π‘₯.
  • 15. 0.12. TAYLOR SERIES 7 Commonly, the above integral is done by writing 𝑒 = 𝑔(π‘₯) 𝑑𝑣 = 𝑓′ (π‘₯)𝑑π‘₯ 𝑑𝑒 = 𝑔′ (π‘₯)𝑑π‘₯ 𝑣 = 𝑓(π‘₯). Then, the formula to be memorized is ∫︁ 𝑒𝑑𝑣 = 𝑒𝑣 βˆ’ ∫︁ 𝑣𝑑𝑒. 0.12 Taylor series A Taylor series of a function 𝑓(π‘₯) about a point π‘₯ = π‘Ž is a power series rep- resentation of 𝑓(π‘₯) developed so that all the derivatives of 𝑓(π‘₯) at π‘Ž match all the derivatives of the power series. Without worrying about convergence here, we have 𝑓(π‘₯) = 𝑓(π‘Ž) + 𝑓′ (π‘Ž)(π‘₯ βˆ’ π‘Ž) + 𝑓′′ (π‘Ž) 2! (π‘₯ βˆ’ π‘Ž)2 + 𝑓′′′ (π‘Ž) 3! (π‘₯ βˆ’ π‘Ž)3 + . . . . Notice that the first term in the power series matches 𝑓(π‘Ž), all other terms vanishing, the second term matches 𝑓′ (π‘Ž), all other terms vanishing, etc. Com- monly, the Taylor series is developed with π‘Ž = 0. We will also make use of the Taylor series in a slightly different form, with π‘₯ = π‘₯* + πœ– and π‘Ž = π‘₯*: 𝑓(π‘₯* + πœ–) = 𝑓(π‘₯*) + 𝑓′ (π‘₯*)πœ– + 𝑓′′ (π‘₯*) 2! πœ–2 + 𝑓′′′ (π‘₯*) 3! πœ–3 + . . . . Another way to view this series is that of 𝑔(πœ–) = 𝑓(π‘₯* + πœ–), expanded about πœ– = 0. Taylor series that are commonly used include 𝑒 π‘₯ = 1 + π‘₯ + π‘₯2 2! + π‘₯3 3! + . . . , sin π‘₯ = π‘₯ βˆ’ π‘₯3 3! + π‘₯5 5! βˆ’ . . . , cos π‘₯ = 1 βˆ’ π‘₯2 2! + π‘₯4 4! βˆ’ . . . , 1 1 + π‘₯ = 1 βˆ’ π‘₯ + π‘₯2 βˆ’ . . . , for |π‘₯| < 1, ln (1 + π‘₯) = π‘₯ βˆ’ π‘₯2 2 + π‘₯3 3 βˆ’ . . . , for |π‘₯| < 1. A Taylor series of a function of several variables can also be developed. Here, all partial derivatives of 𝑓(π‘₯, 𝑦) at (π‘Ž, 𝑏) match all the partial derivatives of the power series. With the notation 𝑓 π‘₯ = πœ•π‘“ πœ•π‘₯ , 𝑓 𝑦 = πœ•π‘“ πœ•π‘¦ , 𝑓 π‘₯π‘₯ = πœ•2 𝑓 πœ•π‘₯2 , 𝑓 π‘₯𝑦 = πœ•2 𝑓 πœ•π‘₯πœ•π‘¦ , 𝑓 𝑦𝑦 = πœ•2 𝑓 πœ•π‘¦2 , etc., we have 𝑓(π‘₯, 𝑦) = 𝑓(π‘Ž, 𝑏) + 𝑓 π‘₯(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž) + 𝑓 𝑦(π‘Ž, 𝑏)(𝑦 βˆ’ 𝑏) + 1 2! (οΈ€ 𝑓 π‘₯π‘₯(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž)2 + 2𝑓 π‘₯𝑦(π‘Ž, 𝑏)(π‘₯ βˆ’ π‘Ž)(𝑦 βˆ’ 𝑏) + 𝑓 𝑦𝑦(π‘Ž, 𝑏)(𝑦 βˆ’ 𝑏)2 )οΈ€ + . . .
  • 16. 8 CHAPTER 0. A SHORT MATHEMATICAL REVIEW 0.13 Complex numbers view tutorial: Complex Numbers view tutorial: Complex Exponential Function We define the imaginary number 𝑖 to be one of the two numbers that satisfies the rule (𝑖)2 = βˆ’1, the other number being βˆ’π‘–. Formally, we write 𝑖 = √ βˆ’1. A complex number 𝑧 is written as 𝑧 = π‘₯ + 𝑖𝑦, where π‘₯ and 𝑦 are real numbers. We call π‘₯ the real part of 𝑧 and 𝑦 the imaginary part and write π‘₯ = Re 𝑧, 𝑦 = Im 𝑧. Two complex numbers are equal if and only if their real and imaginary parts are equal. The complex conjugate of 𝑧 = π‘₯ + 𝑖𝑦, denoted as ¯𝑧, is defined as ¯𝑧 = π‘₯ βˆ’ 𝑖𝑦. Using 𝑧 and ¯𝑧, we have Re 𝑧 = 1 2 (𝑧 + ¯𝑧) , Im 𝑧 = 1 2𝑖 (𝑧 βˆ’ ¯𝑧) . Furthermore, 𝑧¯𝑧 = (π‘₯ + 𝑖𝑦)(π‘₯ βˆ’ 𝑖𝑦) = π‘₯2 βˆ’ 𝑖2 𝑦2 = π‘₯2 + 𝑦2 ; and we define the absolute value of 𝑧, also called the modulus of 𝑧, by |𝑧| = (𝑧¯𝑧)1/2 = βˆšοΈ€ π‘₯2 + 𝑦2. We can add, subtract, multiply and divide complex numbers to get new complex numbers. With 𝑧 = π‘₯ + 𝑖𝑦 and 𝑀 = 𝑠 + 𝑖𝑑, and π‘₯, 𝑦, 𝑠, 𝑑 real numbers, we have 𝑧 + 𝑀 = (π‘₯ + 𝑠) + 𝑖(𝑦 + 𝑑); 𝑧 βˆ’ 𝑀 = (π‘₯ βˆ’ 𝑠) + 𝑖(𝑦 βˆ’ 𝑑); 𝑧𝑀 = (π‘₯ + 𝑖𝑦)(𝑠 + 𝑖𝑑) = (π‘₯𝑠 βˆ’ 𝑦𝑑) + 𝑖(π‘₯𝑑 + 𝑦𝑠); 𝑧 𝑀 = 𝑧 ¯𝑀 𝑀 ¯𝑀 = (π‘₯ + 𝑖𝑦)(𝑠 βˆ’ 𝑖𝑑) 𝑠2 + 𝑑2 = (π‘₯𝑠 + 𝑦𝑑) 𝑠2 + 𝑑2 + 𝑖 (𝑦𝑠 βˆ’ π‘₯𝑑) 𝑠2 + 𝑑2 .
  • 17. 0.13. COMPLEX NUMBERS 9 Furthermore, |𝑧𝑀| = βˆšοΈ€ (π‘₯𝑠 βˆ’ 𝑦𝑑)2 + (π‘₯𝑑 + 𝑦𝑠)2 = βˆšοΈ€ (π‘₯2 + 𝑦2)(𝑠2 + 𝑑2) = |𝑧||𝑀|; and 𝑧𝑀 = (π‘₯𝑠 βˆ’ 𝑦𝑑) βˆ’ 𝑖(π‘₯𝑑 + 𝑦𝑠) = (π‘₯ βˆ’ 𝑖𝑦)(𝑠 βˆ’ 𝑖𝑑) = ¯𝑧 ¯𝑀. Similarly βƒ’ βƒ’ βƒ’ 𝑧 𝑀 βƒ’ βƒ’ βƒ’ = |𝑧| |𝑀| , ( 𝑧 𝑀 ) = ¯𝑧 ¯𝑀 . Also, 𝑧 + 𝑀 = 𝑧 + 𝑀. However, |𝑧 + 𝑀| ≀ |𝑧| + |𝑀|, a theorem known as the triangle inequality. It is especially interesting and useful to consider the exponential function of an imaginary argument. Using the Taylor series expansion of an exponential function, we have π‘’π‘–πœƒ = 1 + (π‘–πœƒ) + (π‘–πœƒ)2 2! + (π‘–πœƒ)3 3! + (π‘–πœƒ)4 4! + (π‘–πœƒ)5 5! . . . = (οΈ‚ 1 βˆ’ πœƒ2 2! + πœƒ4 4! βˆ’ . . . )οΈ‚ + 𝑖 (οΈ‚ πœƒ βˆ’ πœƒ3 3! + πœƒ5 5! + . . . )οΈ‚ = cos πœƒ + 𝑖 sin πœƒ. Therefore, we have cos πœƒ = Re π‘’π‘–πœƒ , sin πœƒ = Im π‘’π‘–πœƒ . Since cos πœ‹ = βˆ’1 and sin πœ‹ = 0, we derive the celebrated Euler’s identity π‘’π‘–πœ‹ + 1 = 0, that links five fundamental numbers, 0, 1, 𝑖, 𝑒 and πœ‹, using three basic mathe- matical operations, addition, multiplication and exponentiation, only once. Using the even property cos (βˆ’πœƒ) = cos πœƒ and the odd property sin (βˆ’πœƒ) = βˆ’ sin πœƒ, we also have π‘’βˆ’π‘–πœƒ = cos πœƒ βˆ’ 𝑖 sin πœƒ; and the identities for π‘’π‘–πœƒ and π‘’βˆ’π‘–πœƒ results in the frequently used expressions, cos πœƒ = π‘’π‘–πœƒ + π‘’βˆ’π‘–πœƒ 2 , sin πœƒ = π‘’π‘–πœƒ βˆ’ π‘’βˆ’π‘–πœƒ 2𝑖 . The complex number 𝑧 can be represented in the complex plane with Re 𝑧 as the π‘₯-axis and Im 𝑧 as the 𝑦-axis. This leads to the polar representation of 𝑧 = π‘₯ + 𝑖𝑦: 𝑧 = π‘Ÿπ‘’π‘–πœƒ , where π‘Ÿ = |𝑧| and tan πœƒ = 𝑦/π‘₯. We define arg 𝑧 = πœƒ. Note that πœƒ is not unique, though it is conventional to choose the value such that βˆ’πœ‹ < πœƒ ≀ πœ‹, and πœƒ = 0 when π‘Ÿ = 0.
  • 18. 10 CHAPTER 0. A SHORT MATHEMATICAL REVIEW Useful trigonometric relations can be derived using π‘’π‘–πœƒ and properties of the exponential function. The addition law can be derived from 𝑒𝑖(π‘₯+𝑦) = 𝑒𝑖π‘₯ 𝑒𝑖𝑦 . We have cos(π‘₯ + 𝑦) + 𝑖 sin(π‘₯ + 𝑦) = (cos π‘₯ + 𝑖 sin π‘₯)(cos 𝑦 + 𝑖 sin 𝑦) = (cos π‘₯ cos 𝑦 βˆ’ sin π‘₯ sin 𝑦) + 𝑖(sin π‘₯ cos 𝑦 + cos π‘₯ sin 𝑦); yielding cos(π‘₯ + 𝑦) = cos π‘₯ cos 𝑦 βˆ’ sin π‘₯ sin 𝑦, sin(π‘₯ + 𝑦) = sin π‘₯ cos 𝑦 + cos π‘₯ sin 𝑦. De Moivre’s Theorem derives from π‘’π‘–π‘›πœƒ = (π‘’π‘–πœƒ ) 𝑛 , yielding the identity cos(π‘›πœƒ) + 𝑖 sin(π‘›πœƒ) = (cos πœƒ + 𝑖 sin πœƒ) 𝑛 . For example, if 𝑛 = 2, we derive cos 2πœƒ + 𝑖 sin 2πœƒ = (cos πœƒ + 𝑖 sin πœƒ)2 = (cos2 πœƒ βˆ’ sin2 πœƒ) + 2𝑖 cos πœƒ sin πœƒ. Therefore, cos 2πœƒ = cos2 πœƒ βˆ’ sin2 πœƒ, sin 2πœƒ = 2 cos πœƒ sin πœƒ. With a little more manipulation using cos2 πœƒ + sin2 πœƒ = 1, we can derive cos2 πœƒ = 1 + cos 2πœƒ 2 , sin2 πœƒ = 1 βˆ’ cos 2πœƒ 2 , which are useful formulas for determining ∫︁ cos2 πœƒ π‘‘πœƒ = 1 4 (2πœƒ + sin 2πœƒ) + 𝑐, ∫︁ sin2 πœƒ π‘‘πœƒ = 1 4 (2πœƒ βˆ’ sin 2πœƒ) + 𝑐, from which follows ∫︁ 2πœ‹ 0 sin2 πœƒ π‘‘πœƒ = ∫︁ 2πœ‹ 0 cos2 πœƒ π‘‘πœƒ = πœ‹.
  • 19. Chapter 1 Introduction to odes A differential equation is an equation for a function that relates the values of the function to the values of its derivatives. An ordinary differential equation (ode) is a differential equation for a function of a single variable, e.g., π‘₯(𝑑), while a partial differential equation (pde) is a differential equation for a function of several variables, e.g., 𝑣(π‘₯, 𝑦, 𝑧, 𝑑). An ode contains ordinary derivatives and a pde contains partial derivatives. Typically, pde’s are much harder to solve than ode’s. 1.1 The simplest type of differential equation view tutorial The simplest ordinary differential equations can be integrated directly by finding antiderivatives. These simplest odes have the form 𝑑 𝑛 π‘₯ 𝑑𝑑 𝑛 = 𝐺(𝑑), where the derivative of π‘₯ = π‘₯(𝑑) can be of any order, and the right-hand-side may depend only on the independent variable 𝑑. As an example, consider a mass falling under the influence of constant gravity, such as approximately found on the Earth’s surface. Newton’s law, 𝐹 = π‘šπ‘Ž, results in the equation π‘š 𝑑2 π‘₯ 𝑑𝑑2 = βˆ’π‘šπ‘”, where π‘₯ is the height of the object above the ground, π‘š is the mass of the object, and 𝑔 = 9.8 meter/sec2 is the constant gravitational acceleration. As Galileo suggested, the mass cancels from the equation, and 𝑑2 π‘₯ 𝑑𝑑2 = βˆ’π‘”. Here, the right-hand-side of the ode is a constant. The first integration, obtained by antidifferentiation, yields 𝑑π‘₯ 𝑑𝑑 = 𝐴 βˆ’ 𝑔𝑑, 11
  • 20. 12 CHAPTER 1. INTRODUCTION TO ODES with 𝐴 the first constant of integration; and the second integration yields π‘₯ = 𝐡 + 𝐴𝑑 βˆ’ 1 2 𝑔𝑑2 , with 𝐡 the second constant of integration. The two constants of integration 𝐴 and 𝐡 can then be determined from the initial conditions. If we know that the initial height of the mass is π‘₯0, and the initial velocity is 𝑣0, then the initial conditions are π‘₯(0) = π‘₯0, 𝑑π‘₯ 𝑑𝑑 (0) = 𝑣0. Substitution of these initial conditions into the equations for 𝑑π‘₯/𝑑𝑑 and π‘₯ allows us to solve for 𝐴 and 𝐡. The unique solution that satisfies both the ode and the initial conditions is given by π‘₯(𝑑) = π‘₯0 + 𝑣0 𝑑 βˆ’ 1 2 𝑔𝑑2 . (1.1) For example, suppose we drop a ball off the top of a 50 meter building. How long will it take the ball to hit the ground? This question requires solution of (1.1) for the time 𝑇 it takes for π‘₯(𝑇) = 0, given π‘₯0 = 50 meter and 𝑣0 = 0. Solving for 𝑇, 𝑇 = βˆšοΈ‚ 2π‘₯0 𝑔 = βˆšοΈ‚ 2 Β· 50 9.8 sec β‰ˆ 3.2sec.
  • 21. Chapter 2 First-order differential equations Reference: Boyce and DiPrima, Chapter 2 The general first-order differential equation for the function 𝑦 = 𝑦(π‘₯) is written as 𝑑𝑦 𝑑π‘₯ = 𝑓(π‘₯, 𝑦), (2.1) where 𝑓(π‘₯, 𝑦) can be any function of the independent variable π‘₯ and the depen- dent variable 𝑦. We first show how to determine a numerical solution of this equation, and then learn techniques for solving analytically some special forms of (2.1), namely, separable and linear first-order equations. 2.1 The Euler method view tutorial Although it is not always possible to find an analytical solution of (2.1) for 𝑦 = 𝑦(π‘₯), it is always possible to determine a unique numerical solution given an initial value 𝑦(π‘₯0) = 𝑦0, and provided 𝑓(π‘₯, 𝑦) is a well-behaved function. The differential equation (2.1) gives us the slope 𝑓(π‘₯0, 𝑦0) of the tangent line to the solution curve 𝑦 = 𝑦(π‘₯) at the point (π‘₯0, 𝑦0). With a small step size Ξ”π‘₯, the initial condition (π‘₯0, 𝑦0) can be marched forward in the x-coordinate to π‘₯ = π‘₯0 + Ξ”π‘₯, and along the tangent line using Euler’s method to obtain the y-coordinate 𝑦(π‘₯0 + Ξ”π‘₯) = 𝑦(π‘₯0) + Ξ”π‘₯𝑓(π‘₯0, 𝑦0). This solution (π‘₯0 + Ξ”π‘₯, 𝑦0 + Δ𝑦) then becomes the new initial condition and is marched forward in the x-coordinate another Ξ”π‘₯, and along the newly deter- mined tangent line. For small enough Ξ”π‘₯, the numerical solution converges to the exact solution. 13
  • 22. 14 CHAPTER 2. FIRST-ORDER ODES 2.2 Separable equations view tutorial A first-order ode is separable if it can be written in the form 𝑔(𝑦) 𝑑𝑦 𝑑π‘₯ = 𝑓(π‘₯), 𝑦(π‘₯0) = 𝑦0, (2.2) where the function 𝑔(𝑦) is independent of π‘₯ and 𝑓(π‘₯) is independent of 𝑦. Inte- gration from π‘₯0 to π‘₯ results in ∫︁ π‘₯ π‘₯0 𝑔(𝑦(π‘₯))𝑦′ (π‘₯)𝑑π‘₯ = ∫︁ π‘₯ π‘₯0 𝑓(π‘₯)𝑑π‘₯. The integral on the left can be transformed by substituting 𝑒 = 𝑦(π‘₯), 𝑑𝑒 = 𝑦′ (π‘₯)𝑑π‘₯, and changing the lower and upper limits of integration to 𝑦(π‘₯0) = 𝑦0 and 𝑦(π‘₯) = 𝑦. Therefore, ∫︁ 𝑦 𝑦0 𝑔(𝑒)𝑑𝑒 = ∫︁ π‘₯ π‘₯0 𝑓(π‘₯)𝑑π‘₯, and since 𝑒 is a dummy variable of integration, we can write this in the equivalent form ∫︁ 𝑦 𝑦0 𝑔(𝑦)𝑑𝑦 = ∫︁ π‘₯ π‘₯0 𝑓(π‘₯)𝑑π‘₯. (2.3) A simpler procedure that also yields (2.3) is to treat 𝑑𝑦/𝑑π‘₯ in (2.2) like a fraction. Multiplying (2.2) by 𝑑π‘₯ results in 𝑔(𝑦)𝑑𝑦 = 𝑓(π‘₯)𝑑π‘₯, which is a separated equation with all the dependent variables on the left-side, and all the independent variables on the right-side. Equation (2.3) then results directly upon integration. Example: Solve 𝑑𝑦 𝑑π‘₯ + 1 2 𝑦 = 3 2 , with 𝑦(0) = 2. We first manipulate the differential equation to the form 𝑑𝑦 𝑑π‘₯ = 1 2 (3 βˆ’ 𝑦), (2.4) and then treat 𝑑𝑦/𝑑π‘₯ as if it was a fraction to separate variables: 𝑑𝑦 3 βˆ’ 𝑦 = 1 2 𝑑π‘₯. We integrate the right-side from the initial condition π‘₯ = 0 to π‘₯ and the left-side from the initial condition 𝑦(0) = 2 to 𝑦. Accordingly, ∫︁ 𝑦 2 𝑑𝑦 3 βˆ’ 𝑦 = 1 2 ∫︁ π‘₯ 0 𝑑π‘₯. (2.5)
  • 23. 2.2. SEPARABLE EQUATIONS 15 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 x y dy/dx + y/2 = 3/2 Figure 2.1: Solution of the following ode: 𝑑𝑦 𝑑π‘₯ + 1 2 𝑦 = 3 2 . The integrals in (2.5) need to be done. Note that 𝑦(π‘₯) < 3 for finite π‘₯ or the integral on the left-side diverges. Therefore, 3 βˆ’ 𝑦 > 0 and integration yields βˆ’ ln (3 βˆ’ 𝑦) ]οΈ€ 𝑦 2 = 1 2 π‘₯ ]οΈ€ π‘₯ 0 , ln (3 βˆ’ 𝑦) = βˆ’ 1 2 π‘₯, 3 βˆ’ 𝑦 = π‘’βˆ’ 1 2 π‘₯ , 𝑦 = 3 βˆ’ π‘’βˆ’ 1 2 π‘₯ . Since this is our first nontrivial analytical solution, it is prudent to check our result. We do this by differentiating our solution: 𝑑𝑦 𝑑π‘₯ = 1 2 π‘’βˆ’ 1 2 π‘₯ = 1 2 (3 βˆ’ 𝑦); and checking the initial conditions, 𝑦(0) = 3 βˆ’ 𝑒0 = 2. Therefore, our solution satisfies both the original ode and the initial condition. Example: Solve 𝑑𝑦 𝑑π‘₯ + 1 2 𝑦 = 3 2 , with 𝑦(0) = 4. This is the identical differential equation as before, but with different initial conditions. We will jump directly to the integration step: ∫︁ 𝑦 4 𝑑𝑦 3 βˆ’ 𝑦 = 1 2 ∫︁ π‘₯ 0 𝑑π‘₯.
  • 24. 16 CHAPTER 2. FIRST-ORDER ODES Now 𝑦(π‘₯) > 3, so that 𝑦 βˆ’ 3 > 0 and integration yields βˆ’ ln (𝑦 βˆ’ 3) ]οΈ€ 𝑦 4 = 1 2 π‘₯ ]οΈ€ π‘₯ 0 , ln (𝑦 βˆ’ 3) = βˆ’ 1 2 π‘₯, 𝑦 βˆ’ 3 = π‘’βˆ’ 1 2 π‘₯ , 𝑦 = 3 + π‘’βˆ’ 1 2 π‘₯ . The solution curves for a range of initial conditions is presented in Fig. 2.1. All solutions have a horizontal asymptote at 𝑦 = 3 at which 𝑑𝑦/𝑑π‘₯ = 0. For 𝑦(0) = 𝑦0, the general solution can be shown to be 𝑦(π‘₯) = 3+(𝑦0βˆ’3) exp(βˆ’π‘₯/2). Example: Solve 𝑑𝑦 𝑑π‘₯ = 2 cos 2π‘₯ 3+2𝑦 , with 𝑦(0) = βˆ’1. (i) For what values of π‘₯ > 0 does the solution exist? (ii) For what value of π‘₯ > 0 is 𝑦(π‘₯) maximum? Notice that the solution of the ode may not exist when 𝑦 = βˆ’3/2, since 𝑑𝑦/𝑑π‘₯ β†’ ∞. We separate variables and integrate from initial conditions: (3 + 2𝑦)𝑑𝑦 = 2 cos 2π‘₯ 𝑑π‘₯ ∫︁ 𝑦 βˆ’1 (3 + 2𝑦)𝑑𝑦 = 2 ∫︁ π‘₯ 0 cos 2π‘₯ 𝑑π‘₯ 3𝑦 + 𝑦2 ]οΈ€ 𝑦 βˆ’1 = sin 2π‘₯ ]οΈ€ π‘₯ 0 𝑦2 + 3𝑦 + 2 βˆ’ sin 2π‘₯ = 0 𝑦± = 1 2 [βˆ’3 Β± √ 1 + 4 sin 2π‘₯]. Solving the quadratic equation for 𝑦 has introduced a spurious solution that does not satisfy the initial conditions. We test: 𝑦±(0) = 1 2 [βˆ’3 Β± 1] = {οΈ‚ -1; -2. Only the + root satisfies the initial condition, so that the unique solution to the ode and initial condition is 𝑦 = 1 2 [βˆ’3 + √ 1 + 4 sin 2π‘₯]. (2.6) To determine (i) the values of π‘₯ > 0 for which the solution exists, we require 1 + 4 sin 2π‘₯ β‰₯ 0, or sin 2π‘₯ β‰₯ βˆ’ 1 4 . (2.7) Notice that at π‘₯ = 0, we have sin 2π‘₯ = 0; at π‘₯ = πœ‹/4, we have sin 2π‘₯ = 1; at π‘₯ = πœ‹/2, we have sin 2π‘₯ = 0; and at π‘₯ = 3πœ‹/4, we have sin 2π‘₯ = βˆ’1 We therefore need to determine the value of π‘₯ such that sin 2π‘₯ = βˆ’1/4, with π‘₯ in the range πœ‹/2 < π‘₯ < 3πœ‹/4. The solution to the ode will then exist for all π‘₯ between zero and this value.
  • 25. 2.3. LINEAR EQUATIONS 17 0 0.5 1 1.5 βˆ’1.6 βˆ’1.4 βˆ’1.2 βˆ’1 βˆ’0.8 βˆ’0.6 βˆ’0.4 βˆ’0.2 0 x y (3+2y) dy/dx = 2 cos 2x, y(0) = βˆ’1 Figure 2.2: Solution of the following ode: (3 + 2𝑦)𝑦′ = 2 cos 2π‘₯, 𝑦(0) = βˆ’1. To solve sin 2π‘₯ = βˆ’1/4 for π‘₯ in the interval πœ‹/2 < π‘₯ < 3πœ‹/4, one needs to recall the definition of arcsin, or sinβˆ’1 , as found on a typical scientific calculator. The inverse of the function 𝑓(π‘₯) = sin π‘₯, βˆ’πœ‹/2 ≀ π‘₯ ≀ πœ‹/2 is denoted by arcsin. The first solution with π‘₯ > 0 of the equation sin 2π‘₯ = βˆ’1/4 places 2π‘₯ in the interval (πœ‹, 3πœ‹/2), so to invert this equation using the arcsine we need to apply the identity sin (πœ‹ βˆ’ π‘₯) = sin π‘₯, and rewrite sin 2π‘₯ = βˆ’1/4 as sin (πœ‹ βˆ’ 2π‘₯) = βˆ’1/4. The solution of this equation may then be found by taking the arcsine, and is πœ‹ βˆ’ 2π‘₯ = arcsin (βˆ’1/4), or π‘₯ = 1 2 (οΈ‚ πœ‹ + arcsin 1 4 )οΈ‚ . Therefore the solution exists for 0 ≀ π‘₯ ≀ (πœ‹ + arcsin (1/4)) /2 = 1.6971 . . . , where we have used a calculator value (computing in radians) to find arcsin(0.25) = 0.2527 . . . . At the value (π‘₯, 𝑦) = (1.6971 . . . , βˆ’3/2), the solution curve ends and 𝑑𝑦/𝑑π‘₯ becomes infinite. To determine (ii) the value of π‘₯ at which 𝑦 = 𝑦(π‘₯) is maximum, we examine (2.6) directly. The value of 𝑦 will be maximum when sin 2π‘₯ takes its maximum value over the interval where the solution exists. This will be when 2π‘₯ = πœ‹/2, or π‘₯ = πœ‹/4 = 0.7854 . . . . The graph of 𝑦 = 𝑦(π‘₯) is shown in Fig. 2.2. 2.3 Linear equations view tutorial
  • 26. 18 CHAPTER 2. FIRST-ORDER ODES The first-order linear differential equation (linear in 𝑦 and its derivative) can be written in the form 𝑑𝑦 𝑑π‘₯ + 𝑝(π‘₯)𝑦 = 𝑔(π‘₯), (2.8) with the initial condition 𝑦(π‘₯0) = 𝑦0. Linear first-order equations can be inte- grated using an integrating factor πœ‡(π‘₯). We multiply (2.8) by πœ‡(π‘₯), πœ‡(π‘₯) [οΈ‚ 𝑑𝑦 𝑑π‘₯ + 𝑝(π‘₯)𝑦 ]οΈ‚ = πœ‡(π‘₯)𝑔(π‘₯), (2.9) and try to determine πœ‡(π‘₯) so that πœ‡(π‘₯) [οΈ‚ 𝑑𝑦 𝑑π‘₯ + 𝑝(π‘₯)𝑦 ]οΈ‚ = 𝑑 𝑑π‘₯ [πœ‡(π‘₯)𝑦]. (2.10) Equation (2.9) then becomes 𝑑 𝑑π‘₯ [πœ‡(π‘₯)𝑦] = πœ‡(π‘₯)𝑔(π‘₯). (2.11) Equation (2.11) is easily integrated using πœ‡(π‘₯0) = πœ‡0 and 𝑦(π‘₯0) = 𝑦0: πœ‡(π‘₯)𝑦 βˆ’ πœ‡0 𝑦0 = ∫︁ π‘₯ π‘₯0 πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯, or 𝑦 = 1 πœ‡(π‘₯) (οΈ‚ πœ‡0 𝑦0 + ∫︁ π‘₯ π‘₯0 πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯ )οΈ‚ . (2.12) It remains to determine πœ‡(π‘₯) from (2.10). Differentiating and expanding (2.10) yields πœ‡ 𝑑𝑦 𝑑π‘₯ + π‘πœ‡π‘¦ = π‘‘πœ‡ 𝑑π‘₯ 𝑦 + πœ‡ 𝑑𝑦 𝑑π‘₯ ; and upon simplifying, π‘‘πœ‡ 𝑑π‘₯ = π‘πœ‡. (2.13) Equation (2.13) is separable and can be integrated: ∫︁ πœ‡ πœ‡0 π‘‘πœ‡ πœ‡ = ∫︁ π‘₯ π‘₯0 𝑝(π‘₯)𝑑π‘₯, ln πœ‡ πœ‡0 = ∫︁ π‘₯ π‘₯0 𝑝(π‘₯)𝑑π‘₯, πœ‡(π‘₯) = πœ‡0 exp (οΈ‚βˆ«οΈ π‘₯ π‘₯0 𝑝(π‘₯)𝑑π‘₯ )οΈ‚ . Notice that since πœ‡0 cancels out of (2.12), it is customary to assign πœ‡0 = 1. The solution to (2.8) satisfying the initial condition 𝑦(π‘₯0) = 𝑦0 is then commonly written as 𝑦 = 1 πœ‡(π‘₯) (οΈ‚ 𝑦0 + ∫︁ π‘₯ π‘₯0 πœ‡(π‘₯)𝑔(π‘₯)𝑑π‘₯ )οΈ‚ , with πœ‡(π‘₯) = exp (οΈ‚βˆ«οΈ π‘₯ π‘₯0 𝑝(π‘₯)𝑑π‘₯ )οΈ‚ the integrating factor. This important result finds frequent use in applied math- ematics.
  • 27. 2.3. LINEAR EQUATIONS 19 Example: Solve 𝑑𝑦 𝑑π‘₯ + 2𝑦 = π‘’βˆ’π‘₯ , with 𝑦(0) = 3/4. Note that this equation is not separable. With 𝑝(π‘₯) = 2 and 𝑔(π‘₯) = π‘’βˆ’π‘₯ , we have πœ‡(π‘₯) = exp (οΈ‚βˆ«οΈ π‘₯ 0 2𝑑π‘₯ )οΈ‚ = 𝑒2π‘₯ , and 𝑦 = π‘’βˆ’2π‘₯ (οΈ‚ 3 4 + ∫︁ π‘₯ 0 𝑒2π‘₯ π‘’βˆ’π‘₯ 𝑑π‘₯ )οΈ‚ = π‘’βˆ’2π‘₯ (οΈ‚ 3 4 + ∫︁ π‘₯ 0 𝑒 π‘₯ 𝑑π‘₯ )οΈ‚ = π‘’βˆ’2π‘₯ (οΈ‚ 3 4 + (𝑒 π‘₯ βˆ’ 1) )οΈ‚ = π‘’βˆ’2π‘₯ (οΈ‚ 𝑒 π‘₯ βˆ’ 1 4 )οΈ‚ = π‘’βˆ’π‘₯ (οΈ‚ 1 βˆ’ 1 4 π‘’βˆ’π‘₯ )οΈ‚ . Example: Solve 𝑑𝑦 𝑑π‘₯ βˆ’ 2π‘₯𝑦 = π‘₯, with 𝑦(0) = 0. This equation is separable, and we solve it in two ways. First, using an inte- grating factor with 𝑝(π‘₯) = βˆ’2π‘₯ and 𝑔(π‘₯) = π‘₯: πœ‡(π‘₯) = exp (οΈ‚ βˆ’2 ∫︁ π‘₯ 0 π‘₯𝑑π‘₯ )οΈ‚ = π‘’βˆ’π‘₯2 , and 𝑦 = 𝑒 π‘₯2 ∫︁ π‘₯ 0 π‘₯π‘’βˆ’π‘₯2 𝑑π‘₯. The integral can be done by substitution with 𝑒 = π‘₯2 , 𝑑𝑒 = 2π‘₯𝑑π‘₯: ∫︁ π‘₯ 0 π‘₯π‘’βˆ’π‘₯2 𝑑π‘₯ = 1 2 ∫︁ π‘₯2 0 π‘’βˆ’π‘’ 𝑑𝑒 = βˆ’ 1 2 π‘’βˆ’π‘’ ]οΈ€ π‘₯2 0 = 1 2 (︁ 1 βˆ’ π‘’βˆ’π‘₯2 )︁ . Therefore, 𝑦 = 1 2 𝑒 π‘₯2 (︁ 1 βˆ’ π‘’βˆ’π‘₯2 )︁ = 1 2 (︁ 𝑒 π‘₯2 βˆ’ 1 )︁ .
  • 28. 20 CHAPTER 2. FIRST-ORDER ODES Second, we integrate by separating variables: 𝑑𝑦 𝑑π‘₯ βˆ’ 2π‘₯𝑦 = π‘₯, 𝑑𝑦 𝑑π‘₯ = π‘₯(1 + 2𝑦), ∫︁ 𝑦 0 𝑑𝑦 1 + 2𝑦 = ∫︁ π‘₯ 0 π‘₯𝑑π‘₯, 1 2 ln (1 + 2𝑦) = 1 2 π‘₯2 , 1 + 2𝑦 = 𝑒 π‘₯2 , 𝑦 = 1 2 (︁ 𝑒 π‘₯2 βˆ’ 1 )︁ . The results from the two different solution methods are the same, and the choice of method is a personal preference. 2.4 Applications 2.4.1 Compound interest view tutorial The equation for the growth of an investment with continuous compounding of interest is a first-order differential equation. Let 𝑆(𝑑) be the value of the investment at time 𝑑, and let π‘Ÿ be the annual interest rate compounded after every time interval Δ𝑑. We can also include deposits (or withdrawals). Let π‘˜ be the annual deposit amount, and suppose that an installment is deposited after every time interval Δ𝑑. The value of the investment at the time 𝑑 + Δ𝑑 is then given by 𝑆(𝑑 + Δ𝑑) = 𝑆(𝑑) + (π‘ŸΞ”π‘‘)𝑆(𝑑) + π‘˜Ξ”π‘‘, (2.14) where at the end of the time interval Δ𝑑, π‘ŸΞ”π‘‘π‘†(𝑑) is the amount of interest credited and π‘˜Ξ”π‘‘ is the amount of money deposited (π‘˜ > 0) or withdrawn (π‘˜ < 0). As a numerical example, if the account held $10,000 at time 𝑑, and π‘Ÿ = 6% per year and π‘˜ = $12,000 per year, say, and the compounding and deposit period is Δ𝑑 = 1 month = 1/12 year, then the interest awarded after one month is π‘ŸΞ”π‘‘π‘† = (0.06/12) Γ— $10,000 = $50, and the amount deposited is π‘˜Ξ”π‘‘ = $1000. Rearranging the terms of (2.14) to exhibit what will soon become a deriva- tive, we have 𝑆(𝑑 + Δ𝑑) βˆ’ 𝑆(𝑑) Δ𝑑 = π‘Ÿπ‘†(𝑑) + π‘˜. The equation for continuous compounding of interest and continuous deposits is obtained by taking the limit Δ𝑑 β†’ 0. The resulting differential equation is 𝑑𝑆 𝑑𝑑 = π‘Ÿπ‘† + π‘˜, (2.15) which can solved with the initial condition 𝑆(0) = 𝑆0, where 𝑆0 is the initial capital. We can solve either by separating variables or by using an integrating
  • 29. 2.4. APPLICATIONS 21 factor; I solve here by separating variables. Integrating from 𝑑 = 0 to a final time 𝑑, ∫︁ 𝑆 𝑆0 𝑑𝑆 π‘Ÿπ‘† + π‘˜ = ∫︁ 𝑑 0 𝑑𝑑, 1 π‘Ÿ ln (οΈ‚ π‘Ÿπ‘† + π‘˜ π‘Ÿπ‘†0 + π‘˜ )οΈ‚ = 𝑑, π‘Ÿπ‘† + π‘˜ = (π‘Ÿπ‘†0 + π‘˜)𝑒 π‘Ÿπ‘‘ , 𝑆 = π‘Ÿπ‘†0 𝑒 π‘Ÿπ‘‘ + π‘˜π‘’ π‘Ÿπ‘‘ βˆ’ π‘˜ π‘Ÿ , 𝑆 = 𝑆0 𝑒 π‘Ÿπ‘‘ + π‘˜ π‘Ÿ 𝑒 π‘Ÿπ‘‘ (οΈ€ 1 βˆ’ π‘’βˆ’π‘Ÿπ‘‘ )οΈ€ , (2.16) where the first term on the right-hand side of (2.16) comes from the initial invested capital, and the second term comes from the deposits (or withdrawals). Evidently, compounding results in the exponential growth of an investment. As a practical example, we can analyze a simple retirement plan. It is easiest to assume that all amounts and returns are in real dollars (adjusted for inflation). Suppose a 25 year-old plans to set aside a fixed amount every year of his/her working life, invests at a real return of 6%, and retires at age 65. How much must he/she invest each year to have $8,000,000 at retirement? We need to solve (2.16) for π‘˜ using 𝑑 = 40 years, 𝑆(𝑑) = $8,000,000, 𝑆0 = 0, and π‘Ÿ = 0.06 per year. We have π‘˜ = π‘Ÿπ‘†(𝑑) 𝑒 π‘Ÿπ‘‘ βˆ’ 1 , π‘˜ = 0.06 Γ— 8,000,000 𝑒0.06Γ—40 βˆ’ 1 , = $47,889 yearβˆ’1 . To have saved approximately one million US$ at retirement, the worker would need to save about HK$50,000 per year over his/her working life. Note that the amount saved over the worker’s life is approximately 40Γ—$50,000 = $2,000,000, while the amount earned on the investment (at the assumed 6% real return) is approximately $8,000,000 βˆ’ $2,000,000 = $6,000,000. The amount earned from the investment is about 3Γ— the amount saved, even with the modest real return of 6%. Sound investment planning is well worth the effort. 2.4.2 Chemical reactions Suppose that two chemicals 𝐴 and 𝐡 react to form a product 𝐢, which we write as 𝐴 + 𝐡 π‘˜ β†’ 𝐢, where π‘˜ is called the rate constant of the reaction. For simplicity, we will use the same symbol 𝐢, say, to refer to both the chemical 𝐢 and its concentration. The law of mass action says that 𝑑𝐢/𝑑𝑑 is proportional to the product of the concentrations 𝐴 and 𝐡, with proportionality constant π‘˜; that is, 𝑑𝐢 𝑑𝑑 = π‘˜π΄π΅. (2.17)
  • 30. 22 CHAPTER 2. FIRST-ORDER ODES Similarly, the law of mass action enables us to write equations for the time- derivatives of the reactant concentrations 𝐴 and 𝐡: 𝑑𝐴 𝑑𝑑 = βˆ’π‘˜π΄π΅, 𝑑𝐡 𝑑𝑑 = βˆ’π‘˜π΄π΅. (2.18) The ode given by (2.17) can be solved analytically using conservation laws. We assume that 𝐴0 and 𝐡0 are the initial concentrations of the reactants, and that no product is initially present. From (2.17) and (2.18), 𝑑 𝑑𝑑 (𝐴 + 𝐢) = 0 =β‡’ 𝐴 + 𝐢 = 𝐴0, 𝑑 𝑑𝑑 (𝐡 + 𝐢) = 0 =β‡’ 𝐡 + 𝐢 = 𝐡0. Using these conservation laws, (2.17) becomes 𝑑𝐢 𝑑𝑑 = π‘˜(𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢), 𝐢(0) = 0, which is a nonlinear equation that may be integrated by separating variables. Separating and integrating, we obtain ∫︁ 𝐢 0 𝑑𝐢 (𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢) = π‘˜ ∫︁ 𝑑 0 𝑑𝑑 = π‘˜π‘‘. (2.19) The remaining integral can be done using the method of partial fractions. We write 1 (𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢) = π‘Ž 𝐴0 βˆ’ 𝐢 + 𝑏 𝐡0 βˆ’ 𝐢 . (2.20) The cover-up method is the simplest method to determine the unknown coeffi- cients π‘Ž and 𝑏. To determine π‘Ž, we multiply both sides of (2.20) by 𝐴0 βˆ’ 𝐢 and set 𝐢 = 𝐴0 to find π‘Ž = 1 𝐡0 βˆ’ 𝐴0 . Similarly, to determine 𝑏, we multiply both sides of (2.20) by 𝐡0 βˆ’ 𝐢 and set 𝐢 = 𝐡0 to find 𝑏 = 1 𝐴0 βˆ’ 𝐡0 . Therefore, 1 (𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢) = 1 𝐡0 βˆ’ 𝐴0 (οΈ‚ 1 𝐴0 βˆ’ 𝐢 βˆ’ 1 𝐡0 βˆ’ 𝐢 )οΈ‚ , and the remaining integral of (2.19) becomes (using 𝐢 < 𝐴0, 𝐡0) ∫︁ 𝐢 0 𝑑𝐢 (𝐴0 βˆ’ 𝐢)(𝐡0 βˆ’ 𝐢) = 1 𝐡0 βˆ’ 𝐴0 (οΈƒβˆ«οΈ 𝐢 0 𝑑𝐢 𝐴0 βˆ’ 𝐢 βˆ’ ∫︁ 𝐢 0 𝑑𝐢 𝐡0 βˆ’ 𝐢 )οΈƒ = 1 𝐡0 βˆ’ 𝐴0 (οΈ‚ βˆ’ ln (οΈ‚ 𝐴0 βˆ’ 𝐢 𝐴0 )οΈ‚ + ln (οΈ‚ 𝐡0 βˆ’ 𝐢 𝐡0 )οΈ‚)οΈ‚ = 1 𝐡0 βˆ’ 𝐴0 ln (οΈ‚ 𝐴0(𝐡0 βˆ’ 𝐢) 𝐡0(𝐴0 βˆ’ 𝐢) )οΈ‚ .
  • 31. 2.4. APPLICATIONS 23 Using this integral in (2.19), multiplying by (𝐡0 βˆ’ 𝐴0) and exponentiating, we obtain 𝐴0(𝐡0 βˆ’ 𝐢) 𝐡0(𝐴0 βˆ’ 𝐢) = 𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘ . Solving for 𝐢, we finally obtain 𝐢(𝑑) = 𝐴0 𝐡0 𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘ βˆ’ 1 𝐡0 𝑒(𝐡0βˆ’π΄0)π‘˜π‘‘ βˆ’ 𝐴0 , which appears to be a complicated expression, but has the simple limits lim π‘‘β†’βˆž 𝐢(𝑑) = {οΈƒ 𝐴0, if 𝐴0 < 𝐡0, 𝐡0, if 𝐡0 < 𝐴0 = min(𝐴0, 𝐡0). As one would expect, the reaction stops after one of the reactants is depleted; and the final concentration of product is equal to the initial concentration of the depleted reactant. 2.4.3 Terminal velocity view tutorial Using Newton’s law, we model a mass π‘š free falling under gravity but with air resistance. We assume that the force of air resistance is proportional to the speed of the mass and opposes the direction of motion. We define the π‘₯-axis to point in the upward direction, opposite the force of gravity. Near the surface of the Earth, the force of gravity is approximately constant and is given by βˆ’π‘šπ‘”, with 𝑔 = 9.8 m/s2 the usual gravitational acceleration. The force of air resistance is modeled by βˆ’π‘˜π‘£, where 𝑣 is the vertical velocity of the mass and π‘˜ is a positive constant. When the mass is falling, 𝑣 < 0 and the force of air resistance is positive, pointing upward and opposing the motion. The total force on the mass is therefore given by 𝐹 = βˆ’π‘šπ‘” βˆ’ π‘˜π‘£. With 𝐹 = π‘šπ‘Ž and π‘Ž = 𝑑𝑣/𝑑𝑑, we obtain the differential equation π‘š 𝑑𝑣 𝑑𝑑 = βˆ’π‘šπ‘” βˆ’ π‘˜π‘£. (2.21) The terminal velocity π‘£βˆž of the mass is defined as the asymptotic velocity after air resistance balances the gravitational force. When the mass is at terminal velocity, 𝑑𝑣/𝑑𝑑 = 0 so that π‘£βˆž = βˆ’ π‘šπ‘” π‘˜ . (2.22) The approach to the terminal velocity of a mass initially at rest is obtained by solving (2.21) with initial condition 𝑣(0) = 0. The equation is both linear and
  • 32. 24 CHAPTER 2. FIRST-ORDER ODES separable, and I solve by separating variables: π‘š ∫︁ 𝑣 0 𝑑𝑣 π‘šπ‘” + π‘˜π‘£ = βˆ’ ∫︁ 𝑑 0 𝑑𝑑, π‘š π‘˜ ln (οΈ‚ π‘šπ‘” + π‘˜π‘£ π‘šπ‘” )οΈ‚ = βˆ’π‘‘, 1 + π‘˜π‘£ π‘šπ‘” = π‘’βˆ’π‘˜π‘‘/π‘š , 𝑣 = βˆ’ π‘šπ‘” π‘˜ (︁ 1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š )︁ . Therefore, 𝑣 = π‘£βˆž (οΈ€ 1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š )οΈ€ , and 𝑣 approaches π‘£βˆž as the exponential term decays to zero. As an example, a skydiver of mass π‘š = 100 kg with his parachute closed may have a terminal velocity of 200 km/hr. With 𝑔 = (9.8 m/s 2 )(10βˆ’3 km/m)(60 s/min)2 (60 min/hr)2 = 127, 008 km/hr 2 , one obtains from (2.22), π‘˜ = 63, 504 kg/hr. One-half of the terminal velocity for free-fall (100 km/hr) is therefore attained when (1 βˆ’ π‘’βˆ’π‘˜π‘‘/π‘š ) = 1/2, or 𝑑 = π‘š ln 2/π‘˜ β‰ˆ 4 sec. Approximately 95% of the terminal velocity (190 km/hr ) is attained after 17 sec. 2.4.4 Escape velocity view tutorial An interesting physical problem is to find the smallest initial velocity for a mass on the Earth’s surface to escape from the Earth’s gravitational field, the so-called escape velocity. Newton’s law of universal gravitation asserts that the gravitational force between two massive bodies is proportional to the product of the two masses and inversely proportional to the square of the distance between them. For a mass π‘š a position π‘₯ above the surface of the Earth, the force on the mass is given by 𝐹 = βˆ’πΊ 𝑀 π‘š (𝑅 + π‘₯)2 , where 𝑀 and 𝑅 are the mass and radius of the Earth and 𝐺 is the gravitational constant. The minus sign means the force on the mass π‘š points in the direction of decreasing π‘₯. The approximately constant acceleration 𝑔 on the Earth’s surface corresponds to the absolute value of 𝐹/π‘š when π‘₯ = 0: 𝑔 = 𝐺𝑀 𝑅2 , and 𝑔 β‰ˆ 9.8 m/s2 . Newton’s law 𝐹 = π‘šπ‘Ž for the mass π‘š is thus given by 𝑑2 π‘₯ 𝑑𝑑2 = βˆ’ 𝐺𝑀 (𝑅 + π‘₯)2 = βˆ’ 𝑔 (1 + π‘₯/𝑅)2 , (2.23) where the radius of the Earth is known to be 𝑅 β‰ˆ 6350 km.
  • 33. 2.4. APPLICATIONS 25 A useful trick allows us to solve this second-order differential equation as a first-order equation. First, note that 𝑑2 π‘₯/𝑑𝑑2 = 𝑑𝑣/𝑑𝑑. If we write 𝑣(𝑑) = 𝑣(π‘₯(𝑑))β€”considering the velocity of the mass π‘š to be a function of its distance above the Earthβ€”we have using the chain rule 𝑑𝑣 𝑑𝑑 = 𝑑𝑣 𝑑π‘₯ 𝑑π‘₯ 𝑑𝑑 = 𝑣 𝑑𝑣 𝑑π‘₯ , where we have used 𝑣 = 𝑑π‘₯/𝑑𝑑. Therefore, (2.23) becomes the first-order ode 𝑣 𝑑𝑣 𝑑π‘₯ = βˆ’ 𝑔 (1 + π‘₯/𝑅)2 , which may be solved assuming an initial velocity 𝑣(π‘₯ = 0) = 𝑣0 when the mass is shot vertically from the Earth’s surface. Separating variables and integrating, we obtain ∫︁ 𝑣 𝑣0 𝑣𝑑𝑣 = βˆ’π‘” ∫︁ π‘₯ 0 𝑑π‘₯ (1 + π‘₯/𝑅)2 . The left integral is 1 2 (𝑣2 βˆ’ 𝑣2 0), and the right integral can be performed using the substitution 𝑒 = 1 + π‘₯/𝑅, 𝑑𝑒 = 𝑑π‘₯/𝑅: ∫︁ π‘₯ 0 𝑑π‘₯ (1 + π‘₯/𝑅)2 = 𝑅 ∫︁ 1+π‘₯/𝑅 1 𝑑𝑒 𝑒2 = βˆ’ 𝑅 𝑒 ]οΈ‚1+π‘₯/𝑅 1 = 𝑅 βˆ’ 𝑅2 π‘₯ + 𝑅 = 𝑅π‘₯ π‘₯ + 𝑅 . Therefore, 1 2 (𝑣2 βˆ’ 𝑣2 0) = βˆ’ 𝑔𝑅π‘₯ π‘₯ + 𝑅 , which when multiplied by π‘š is an expression of the conservation of energy (the change of the kinetic energy of the mass is equal to the change in the potential energy). Solving for 𝑣2 , 𝑣2 = 𝑣2 0 βˆ’ 2𝑔𝑅π‘₯ π‘₯ + 𝑅 . The escape velocity is defined as the minimum initial velocity 𝑣0 such that the mass can escape to infinity. Therefore, 𝑣0 = 𝑣escape when 𝑣 β†’ 0 as π‘₯ β†’ ∞. Taking this limit, we have 𝑣2 escape = lim π‘₯β†’βˆž 2𝑔𝑅π‘₯ π‘₯ + 𝑅 = 2𝑔𝑅. With 𝑅 β‰ˆ 6350 km and 𝑔 = 127 008 km/hr 2 , we determine 𝑣escape = √ 2𝑔𝑅 β‰ˆ 40 000 km/hr. In comparison, the muzzle velocity of a modern high-performance rifle is 4300 km/hr, almost an order of magnitude too slow for a bullet, shot into the sky, to escape the Earth’s gravity.
  • 34. 26 CHAPTER 2. FIRST-ORDER ODES Β  CΒ  Β  R i +Β  _Β  (a)Β  (b) Figure 2.3: RC circuit diagram. 2.4.5 RC circuit view tutorial Consider a resister 𝑅 and a capacitor 𝐢 connected in series as shown in Fig. 2.3. A battery providing an electromotive force, or emf β„°, connects to this circuit by a switch. Initially, there is no charge on the capacitor. When the switch is thrown to a, the battery connects and the capacitor charges. When the switch is thrown to b, the battery disconnects and the capacitor discharges, with energy dissipated in the resister. Here, we determine the voltage drop across the capacitor during charging and discharging. The equations for the voltage drops across a capacitor and a resister are given by 𝑉 𝐢 = π‘ž/𝐢, 𝑉 𝑅 = 𝑖𝑅, (2.24) where 𝐢 is the capacitance and 𝑅 is the resistance. The charge π‘ž and the current 𝑖 are related by 𝑖 = π‘‘π‘ž 𝑑𝑑 . (2.25) Kirchhoff’s voltage law states that the emf β„° in any closed loop is equal to the sum of the voltage drops in that loop. Applying Kirchhoff’s voltage law when the switch is thrown to a results in 𝑉 𝑅 + 𝑉 𝐢 = β„°. (2.26) Using (2.24) and (2.25), the voltage drop across the resister can be written in terms of the voltage drop across the capacitor as 𝑉 𝑅 = 𝑅𝐢 𝑑𝑉 𝐢 𝑑𝑑 , and (2.26) can be rewritten to yield the first-order linear differential equation for 𝑉 𝑐 given by 𝑑𝑉 𝐢 𝑑𝑑 + 𝑉 𝐢/𝑅𝐢 = β„°/𝑅𝐢, (2.27) with initial condition 𝑉 𝐢(0) = 0.
  • 35. 2.4. APPLICATIONS 27 The integrating factor for this equation is πœ‡(𝑑) = 𝑒 𝑑/𝑅𝐢 , and (2.27) integrates to 𝑉 𝐢(𝑑) = π‘’βˆ’π‘‘/𝑅𝐢 ∫︁ 𝑑 0 (β„°/𝑅𝐢)𝑒 𝑑/𝑅𝐢 𝑑𝑑, with solution 𝑉 𝐢(𝑑) = β„° (︁ 1 βˆ’ π‘’βˆ’π‘‘/𝑅𝐢 )︁ . The voltage starts at zero and rises exponentially to β„°, with characteristic time scale given by 𝑅𝐢. When the switch is thrown to b, application of Kirchhoff’s voltage law results in 𝑉 𝑅 + 𝑉 𝐢 = 0, with corresponding differential equation 𝑑𝑉 𝐢 𝑑𝑑 + 𝑉 𝐢/𝑅𝐢 = 0. Here, we assume that the capacitance is initially fully charged so that 𝑉 𝐢(0) = β„°. The solution, then, during the discharge phase is given by 𝑉 𝐢(𝑑) = β„°π‘’βˆ’π‘‘/𝑅𝐢 . The voltage starts at β„° and decays exponentially to zero, again with character- istic time scale given by 𝑅𝐢. 2.4.6 The logistic equation view tutorial Let 𝑁 = 𝑁(𝑑) be the size of a population at time 𝑑 and let π‘Ÿ be the growth rate. The Malthusian growth model (Thomas Malthus, 1766-1834), similar to a compound interest model, is given by 𝑑𝑁 𝑑𝑑 = π‘Ÿπ‘. Under a Malthusian growth model, a population grows exponentially like 𝑁(𝑑) = 𝑁0 𝑒 π‘Ÿπ‘‘ , where 𝑁0 is the initial population size. However, when the population growth is constrained by limited resources, a heuristic modification to the Malthusian growth model results in the Verhulst equation, 𝑑𝑁 𝑑𝑑 = π‘Ÿπ‘ (οΈ‚ 1 βˆ’ 𝑁 𝐾 )οΈ‚ , (2.28) where 𝐾 is called the carrying capacity of the environment. Making (2.28) dimensionless using 𝜏 = π‘Ÿπ‘‘ and π‘₯ = 𝑁/𝐾 leads to the logistic equation, 𝑑π‘₯ π‘‘πœ = π‘₯(1 βˆ’ π‘₯),
  • 36. 28 CHAPTER 2. FIRST-ORDER ODES where we may assume the initial condition π‘₯(0) = π‘₯0 > 0. Separating variables and integrating ∫︁ π‘₯ π‘₯0 𝑑π‘₯ π‘₯(1 βˆ’ π‘₯) = ∫︁ 𝜏 0 π‘‘πœ. The integral on the left-hand-side can be done using the method of partial fractions: 1 π‘₯(1 βˆ’ π‘₯) = π‘Ž π‘₯ + 𝑏 1 βˆ’ π‘₯ = π‘Ž + (𝑏 βˆ’ π‘Ž)π‘₯ π‘₯(1 βˆ’ π‘₯) ; and equating the coefficients of the numerators proportional to π‘₯0 and π‘₯1 , we have π‘Ž = 𝑏 = 1. Therefore, ∫︁ π‘₯ π‘₯0 𝑑π‘₯ π‘₯(1 βˆ’ π‘₯) = ∫︁ π‘₯ π‘₯0 𝑑π‘₯ π‘₯ + ∫︁ π‘₯ π‘₯0 𝑑π‘₯ (1 βˆ’ π‘₯) = ln π‘₯ π‘₯0 βˆ’ ln 1 βˆ’ π‘₯ 1 βˆ’ π‘₯0 = ln π‘₯(1 βˆ’ π‘₯0) π‘₯0(1 βˆ’ π‘₯) = 𝜏. Solving for π‘₯, we first exponentiate both sides and then isolate π‘₯: π‘₯(1 βˆ’ π‘₯0) π‘₯0(1 βˆ’ π‘₯) = 𝑒 𝜏 , π‘₯(1 βˆ’ π‘₯0) = π‘₯0 𝑒 𝜏 βˆ’ π‘₯π‘₯0 𝑒 𝜏 , π‘₯(1 βˆ’ π‘₯0 + π‘₯0 𝑒 𝜏 ) = π‘₯0 𝑒 𝜏 , π‘₯ = π‘₯0 π‘₯0 + (1 βˆ’ π‘₯0)π‘’βˆ’πœ . (2.29) We observe that for π‘₯0 > 0, we have lim πœβ†’βˆž π‘₯(𝜏) = 1, corresponding to lim π‘‘β†’βˆž 𝑁(𝑑) = 𝐾. The population, therefore, grows in size until it reaches the carrying capacity of its environment.
  • 37. Chapter 3 Second-order linear differential equations with constant coefficients Reference: Boyce and DiPrima, Chapter 3 The general second-order linear differential equation with independent variable 𝑑 and dependent variable π‘₯ = π‘₯(𝑑) is given by Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 𝑔(𝑑), (3.1) where we have used the standard physics notation Λ™π‘₯ = 𝑑π‘₯/𝑑𝑑 and Β¨π‘₯ = 𝑑2 π‘₯/𝑑𝑑2 . A unique solution of (3.1) requires initial values π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0. The equation with constant coefficientsβ€”on which we will devote considerable effortβ€”assumes that 𝑝(𝑑) and π‘ž(𝑑) are constants, independent of time. The second-order linear ode is said to be homogeneous if 𝑔(𝑑) = 0. 3.1 The Euler method view tutorial In general, (3.1) cannot be solved analytically, and we begin by deriving an algorithm for numerical solution. Consider the general second-order ode given by Β¨π‘₯ = 𝑓(𝑑, π‘₯, Λ™π‘₯). We can write this second-order ode as a pair of first-order odes by defining 𝑒 = Λ™π‘₯, and writing the first-order system as Λ™π‘₯ = 𝑒, (3.2) ˙𝑒 = 𝑓(𝑑, π‘₯, 𝑒). (3.3) The first ode, (3.2), gives the slope of the tangent line to the curve π‘₯ = π‘₯(𝑑); the second ode, (3.3), gives the slope of the tangent line to the curve 𝑒 = 𝑒(𝑑). Beginning at the initial values (π‘₯, 𝑒) = (π‘₯0, 𝑒0) at the time 𝑑 = 𝑑0, we move along the tangent lines to determine π‘₯1 = π‘₯(𝑑0 + Δ𝑑) and 𝑒1 = 𝑒(𝑑0 + Δ𝑑): π‘₯1 = π‘₯0 + Δ𝑑𝑒0, 𝑒1 = 𝑒0 + Δ𝑑𝑓(𝑑0, π‘₯0, 𝑒0). 29
  • 38. 30 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS The values π‘₯1 and 𝑒1 at the time 𝑑1 = 𝑑0 +Δ𝑑 are then used as new initial values to march the solution forward to time 𝑑2 = 𝑑1 + Δ𝑑. As long as 𝑓(𝑑, π‘₯, 𝑒) is a well-behaved function, the numerical solution converges to the unique solution of the ode as Δ𝑑 β†’ 0. 3.2 The principle of superposition view tutorial Consider the second-order linear homogeneous ode: Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 0; (3.4) and suppose that π‘₯ = 𝑋1(𝑑) and π‘₯ = 𝑋2(𝑑) are solutions to (3.4). We consider a linear combination of 𝑋1 and 𝑋2 by letting 𝑋(𝑑) = 𝑐1 𝑋1(𝑑) + 𝑐2 𝑋2(𝑑), (3.5) with 𝑐1 and 𝑐2 constants. The principle of superposition states that π‘₯ = 𝑋(𝑑) is also a solution of (3.4). To prove this, we compute ¨𝑋 + 𝑝 ˙𝑋 + π‘žπ‘‹ = 𝑐1 ¨𝑋1 + 𝑐2 ¨𝑋2 + 𝑝 (︁ 𝑐1 ˙𝑋1 + 𝑐2 ˙𝑋2 )︁ + π‘ž (𝑐1 𝑋1 + 𝑐2 𝑋2) = 𝑐1 (︁ ¨𝑋1 + 𝑝 ˙𝑋1 + π‘žπ‘‹1 )︁ + 𝑐2 (︁ ¨𝑋2 + 𝑝 ˙𝑋2 + π‘žπ‘‹2 )︁ = 𝑐1 Γ— 0 + 𝑐2 Γ— 0 = 0, since 𝑋1 and 𝑋2 were assumed to be solutions of (3.4). We have therefore shown that any linear combination of solutions to the second-order linear homogeneous ode is also a solution. 3.3 The Wronskian view tutorial Suppose that having determined that two solutions of (3.4) are π‘₯ = 𝑋1(𝑑) and π‘₯ = 𝑋2(𝑑), we attempt to write the general solution to (3.4) as (3.5). We must then ask whether this general solution will be able to satisfy the two initial conditions given by π‘₯(𝑑0) = π‘₯0, Λ™π‘₯(𝑑0) = 𝑒0. (3.6) Applying these initial conditions to (3.5), we obtain 𝑐1 𝑋1(𝑑0) + 𝑐2 𝑋2(𝑑0) = π‘₯0, 𝑐1 ˙𝑋1(𝑑0) + 𝑐2 ˙𝑋2(𝑑0) = 𝑒0, (3.7) which is observed to be a system of two linear equations for the two unknowns 𝑐1 and 𝑐2. Solution of (3.7) by standard methods results in 𝑐1 = π‘₯0 ˙𝑋2(𝑑0) βˆ’ 𝑒0 𝑋2(𝑑0) π‘Š , 𝑐2 = 𝑒0 𝑋1(𝑑0) βˆ’ π‘₯0 ˙𝑋1(𝑑0) π‘Š ,
  • 39. 3.4. HOMOGENEOUS ODES 31 where π‘Š is called the Wronskian and is given by π‘Š = 𝑋1(𝑑0) ˙𝑋2(𝑑0) βˆ’ ˙𝑋1(𝑑0)𝑋2(𝑑0). (3.8) Evidently, the Wronskian must not be equal to zero (π‘Š ΜΈ= 0) for a solution to exist. For examples, the two solutions 𝑋1(𝑑) = 𝐴 sin πœ”π‘‘, 𝑋2(𝑑) = 𝐡 sin πœ”π‘‘, have a zero Wronskian at 𝑑 = 𝑑0, as can be shown by computing π‘Š = (𝐴 sin πœ”π‘‘0) (π΅πœ” cos πœ”π‘‘0) βˆ’ (π΄πœ” cos πœ”π‘‘0) (𝐡 sin πœ”π‘‘0) = 0; while the two solutions 𝑋1(𝑑) = sin πœ”π‘‘, 𝑋2(𝑑) = cos πœ”π‘‘, with πœ” ΜΈ= 0, have a nonzero Wronskian at 𝑑 = 𝑑0, π‘Š = (sin πœ”π‘‘0) (βˆ’πœ” sin πœ”π‘‘0) βˆ’ (πœ” cos πœ”π‘‘0) (cos πœ”π‘‘0) = βˆ’πœ”. When the Wronskian is not equal to zero, we say that the two solutions 𝑋1(𝑑) and 𝑋2(𝑑) are linearly independent. The concept of linear independence is borrowed from linear algebra, and indeed, the set of all functions that satisfy (3.4) can be shown to form a two-dimensional vector space. 3.4 Second-order linear homogeneous ode with constant coefficients view tutorial We now study solutions of the homogeneous, constant coefficient ode, written as π‘ŽΒ¨π‘₯ + 𝑏 Λ™π‘₯ + 𝑐π‘₯ = 0, (3.9) with π‘Ž, 𝑏, and 𝑐 constants. Such an equation arises for the charge on a capacitor in an unpowered RLC electrical circuit, or for the position of a freely-oscillating frictional mass on a spring, or for a damped pendulum. Our solution method finds two linearly independent solutions to (3.9), multiplies each of these solu- tions by a constant, and adds them. The two free constants can then be used to satisfy two given initial conditions. Because of the differential properties of the exponential function, a natural ansatz, or educated guess, for the form of the solution to (3.9) is π‘₯ = 𝑒 π‘Ÿπ‘‘ , where π‘Ÿ is a constant to be determined. Successive differentiation results in Λ™π‘₯ = π‘Ÿπ‘’ π‘Ÿπ‘‘ and Β¨π‘₯ = π‘Ÿ2 𝑒 π‘Ÿπ‘‘ , and substitution into (3.9) yields π‘Žπ‘Ÿ2 𝑒 π‘Ÿπ‘‘ + π‘π‘Ÿπ‘’ π‘Ÿπ‘‘ + 𝑐𝑒 π‘Ÿπ‘‘ = 0. (3.10) Our choice of exponential function is now rewarded by the explicit cancelation in (3.10) of 𝑒 π‘Ÿπ‘‘ . The result is a quadratic equation for the unknown constant π‘Ÿ: π‘Žπ‘Ÿ2 + π‘π‘Ÿ + 𝑐 = 0. (3.11)
  • 40. 32 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS Our ansatz has thus converted a differential equation into an algebraic equation. Equation (3.11) is called the characteristic equation of (3.9). Using the quadratic formula, the two solutions of the characteristic equation (3.11) are given by π‘ŸΒ± = 1 2π‘Ž (︁ βˆ’π‘ Β± βˆšοΈ€ 𝑏2 βˆ’ 4π‘Žπ‘ )︁ . There are three cases to consider: (1) if 𝑏2 βˆ’ 4π‘Žπ‘ > 0, then the two roots are distinct and real; (2) if 𝑏2 βˆ’4π‘Žπ‘ < 0, then the two roots are distinct and complex conjugates of each other; (3) if 𝑏2 βˆ’ 4π‘Žπ‘ = 0, then the two roots are degenerate and there is only one real root. We will consider these three cases in turn. 3.4.1 Real, distinct roots When π‘Ÿ+ ΜΈ= π‘Ÿβˆ’ are real roots, then the general solution to (3.9) can be written as a linear superposition of the two solutions 𝑒 π‘Ÿ+ 𝑑 and 𝑒 π‘Ÿβˆ’ 𝑑 ; that is, π‘₯(𝑑) = 𝑐1 𝑒 π‘Ÿ+ 𝑑 + 𝑐2 𝑒 π‘Ÿβˆ’ 𝑑 . The unknown constants 𝑐1 and 𝑐2 can then be determined by the given initial conditions π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0. We now present two examples. Example 1: Solve Β¨π‘₯ + 5 Λ™π‘₯ + 6π‘₯ = 0 with π‘₯(0) = 2, Λ™π‘₯(0) = 3, and find the maximum value attained by π‘₯. view tutorial We take as our ansatz π‘₯ = 𝑒 π‘Ÿπ‘‘ and obtain the characteristic equation π‘Ÿ2 + 5π‘Ÿ + 6 = 0, which factors to (π‘Ÿ + 3)(π‘Ÿ + 2) = 0. The general solution to the ode is thus π‘₯(𝑑) = 𝑐1 π‘’βˆ’2𝑑 + 𝑐2 π‘’βˆ’3𝑑 . The solution for Λ™π‘₯ obtained by differentiation is Λ™π‘₯(𝑑) = βˆ’2𝑐1 π‘’βˆ’2𝑑 βˆ’ 3𝑐2 π‘’βˆ’3𝑑 . Use of the initial conditions then results in two equations for the two unknown constant 𝑐1 and 𝑐2: 𝑐1 + 𝑐2 = 2, βˆ’2𝑐1 βˆ’ 3𝑐2 = 3. Adding three times the first equation to the second equation yields 𝑐1 = 9; and the first equation then yields 𝑐2 = 2 βˆ’ 𝑐1 = βˆ’7. Therefore, the unique solution that satisfies both the ode and the initial conditions is π‘₯(𝑑) = 9π‘’βˆ’2𝑑 βˆ’ 7π‘’βˆ’3𝑑 = 9π‘’βˆ’2𝑑 (οΈ‚ 1 βˆ’ 7 9 π‘’βˆ’π‘‘ )οΈ‚ .
  • 41. 3.4. HOMOGENEOUS ODES 33 Note that although both exponential terms decay in time, their sum increases initially since Λ™π‘₯(0) > 0. The maximum value of π‘₯ occurs at the time 𝑑 π‘š when Λ™π‘₯ = 0, or 𝑑 π‘š = ln (7/6) . The maximum π‘₯ π‘š = π‘₯(𝑑 π‘š) is then determined to be π‘₯ π‘š = 108/49. Example 2: Solve Β¨π‘₯ βˆ’ π‘₯ = 0 with π‘₯(0) = π‘₯0, Λ™π‘₯(0) = 𝑒0. Again our ansatz is π‘₯ = 𝑒 π‘Ÿπ‘‘ , and we obtain the characteristic equation π‘Ÿ2 βˆ’ 1 = 0, with solution π‘ŸΒ± = Β±1. Therefore, the general solution for π‘₯ is π‘₯(𝑑) = 𝑐1 𝑒 𝑑 + 𝑐2 π‘’βˆ’π‘‘ , and the derivative satisfies Λ™π‘₯(𝑑) = 𝑐1 𝑒 𝑑 βˆ’ 𝑐2 π‘’βˆ’π‘‘ . Initial conditions are satisfied when 𝑐1 + 𝑐2 = π‘₯0, 𝑐1 βˆ’ 𝑐2 = 𝑒0. Adding and subtracting these equations, we determine 𝑐1 = 1 2 (π‘₯0 + 𝑒0) , 𝑐2 = 1 2 (π‘₯0 βˆ’ 𝑒0) , so that after rearranging terms π‘₯(𝑑) = π‘₯0 (οΈ‚ 𝑒 𝑑 + π‘’βˆ’π‘‘ 2 )οΈ‚ + 𝑒0 (οΈ‚ 𝑒 𝑑 βˆ’ π‘’βˆ’π‘‘ 2 )οΈ‚ . The terms in parentheses are the usual definitions of the hyperbolic cosine and sine functions; that is, cosh 𝑑 = 𝑒 𝑑 + π‘’βˆ’π‘‘ 2 , sinh 𝑑 = 𝑒 𝑑 βˆ’ π‘’βˆ’π‘‘ 2 . Our solution can therefore be rewritten as π‘₯(𝑑) = π‘₯0 cosh 𝑑 + 𝑒0 sinh 𝑑. Note that the relationships between the trigonometric functions and the complex exponentials were given by cos 𝑑 = 𝑒𝑖𝑑 + π‘’βˆ’π‘–π‘‘ 2 , sin 𝑑 = 𝑒𝑖𝑑 βˆ’ π‘’βˆ’π‘–π‘‘ 2𝑖 , so that cosh 𝑑 = cos 𝑖𝑑, sinh 𝑑 = βˆ’π‘– sin 𝑖𝑑. Also note that the hyperbolic trigonometric functions satisfy the differential equations 𝑑 𝑑𝑑 sinh 𝑑 = cosh 𝑑, 𝑑 𝑑𝑑 cosh 𝑑 = sinh 𝑑, which though similar to the differential equations satisfied by the more com- monly used trigonometric functions, is absent a minus sign.
  • 42. 34 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS 3.4.2 Complex conjugate, distinct roots view tutorial We now consider a characteristic equation (3.11) with 𝑏2 βˆ’4π‘Žπ‘ < 0, so the roots occur as complex conjugate pairs. With πœ† = βˆ’ 𝑏 2π‘Ž , πœ‡ = 1 2π‘Ž βˆšοΈ€ 4π‘Žπ‘ βˆ’ 𝑏2, the two roots of the characteristic equation are πœ† + π‘–πœ‡ and πœ† βˆ’ π‘–πœ‡. We have thus found the following two complex exponential solutions to the differential equation: 𝑍1(𝑑) = 𝑒 πœ†π‘‘ π‘’π‘–πœ‡π‘‘ , 𝑍2(𝑑) = 𝑒 πœ†π‘‘ π‘’βˆ’π‘–πœ‡π‘‘ . Applying the principle of superposition, any linear combination of 𝑍1 and 𝑍2 is also a solution to the second-order ode. We can then form two different linear combinations that are real, given by 𝑋1(𝑑) = 𝑍1 + 𝑍2 2 = 𝑒 πœ†π‘‘ (οΈ‚ π‘’π‘–πœ‡π‘‘ + π‘’βˆ’π‘–πœ‡π‘‘ 2 )οΈ‚ = 𝑒 πœ†π‘‘ cos πœ‡π‘‘, and 𝑋2(𝑑) = 𝑍1 βˆ’ 𝑍2 2𝑖 = 𝑒 πœ†π‘‘ (οΈ‚ π‘’π‘–πœ‡π‘‘ βˆ’ π‘’βˆ’π‘–πœ‡π‘‘ 2𝑖 )οΈ‚ = 𝑒 πœ†π‘‘ sin πœ‡π‘‘. Having found the two real solutions 𝑋1(𝑑) and 𝑋2(𝑑), we can then apply the principle of superposition a second time to determine the general solution π‘₯(𝑑): π‘₯(𝑑) = 𝑒 πœ†π‘‘ (𝐴 cos πœ‡π‘‘ + 𝐡 sin πœ‡π‘‘) . (3.12) It is best to memorize this result. The real part of the roots of the characteristic equation goes into the exponential function; the imaginary part goes into the argument of cosine and sine. Example 1: Solve Β¨π‘₯ + π‘₯ = 0 with π‘₯(0) = π‘₯0 and Λ™π‘₯(0) = 𝑒0. view tutorial The characteristic equation is π‘Ÿ2 + 1 = 0, with roots π‘ŸΒ± = ±𝑖. The general solution of the ode is therefore π‘₯(𝑑) = 𝐴 cos 𝑑 + 𝐡 sin 𝑑.
  • 43. 3.4. HOMOGENEOUS ODES 35 The derivative is Λ™π‘₯(𝑑) = βˆ’π΄ sin 𝑑 + 𝐡 cos 𝑑. Applying the initial conditions: π‘₯(0) = 𝐴 = π‘₯0, Λ™π‘₯(0) = 𝐡 = 𝑒0; so that the final solution is π‘₯(𝑑) = π‘₯0 cos 𝑑 + 𝑒0 sin 𝑑. Recall that we wrote the analogous solution to the ode Β¨π‘₯ βˆ’ π‘₯ = 0 as π‘₯(𝑑) = π‘₯0 cosh 𝑑 + 𝑒0 sinh 𝑑. Example 2: Solve Β¨π‘₯ + Λ™π‘₯ + π‘₯ = 0 with π‘₯(0) = 1 and Λ™π‘₯(0) = 0. The characteristic equation is π‘Ÿ2 + π‘Ÿ + 1 = 0, with roots π‘ŸΒ± = βˆ’ 1 2 Β± 𝑖 √ 3 2 . The general solution of the ode is therefore π‘₯(𝑑) = π‘’βˆ’ 1 2 𝑑 (οΈƒ 𝐴 cos √ 3 2 𝑑 + 𝐡 sin √ 3 2 𝑑 )οΈƒ . The derivative is Λ™π‘₯(𝑑) = βˆ’ 1 2 π‘’βˆ’ 1 2 𝑑 (οΈƒ 𝐴 cos √ 3 2 𝑑 + 𝐡 sin √ 3 2 𝑑 )οΈƒ + √ 3 2 π‘’βˆ’ 1 2 𝑑 (οΈƒ βˆ’π΄ sin √ 3 2 𝑑 + 𝐡 cos √ 3 2 𝑑 )οΈƒ . Applying the initial conditions π‘₯(0) = 1 and Λ™π‘₯(0) = 0: 𝐴 = 1, βˆ’1 2 𝐴 + √ 3 2 𝐡 = 0; or 𝐴 = 1, 𝐡 = √ 3 3 . Therefore, π‘₯(𝑑) = π‘’βˆ’ 1 2 𝑑 (οΈƒ cos √ 3 2 𝑑 + √ 3 3 sin √ 3 2 𝑑 )οΈƒ .
  • 44. 36 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS 3.4.3 Repeated roots view tutorial Finally, we consider the characteristic equation, π‘Žπ‘Ÿ2 + π‘π‘Ÿ + 𝑐 = 0, with 𝑏2 βˆ’ 4π‘Žπ‘ = 0. The degenerate root is then given by π‘Ÿ = βˆ’ 𝑏 2π‘Ž , yielding only a single solution to the ode: π‘₯1(𝑑) = exp (οΈ‚ βˆ’ 𝑏𝑑 2π‘Ž )οΈ‚ . (3.13) To satisfy two initial conditions, a second independent solution must be found with nonzero Wronskian, and apparently this second solution is not of the form of our ansatz π‘₯ = exp (π‘Ÿπ‘‘). One method to determine this missing second solution is to try the ansatz π‘₯(𝑑) = 𝑦(𝑑)π‘₯1(𝑑), (3.14) where 𝑦(𝑑) is an unknown function that satisfies the differential equation ob- tained by substituting (3.14) into (3.9). This standard technique is called the reduction of order method and enables one to find a second solution of a ho- mogeneous linear differential equation if one solution is known. If the original differential equation is of order 𝑛, the differential equation for 𝑦 = 𝑦(𝑑) reduces to an order one lower, that is, 𝑛 βˆ’ 1. Here, however, we will determine this missing second solution through a limiting process. We start with the solution obtained for complex roots of the characteristic equation, and then arrive at the solution obtained for degenerate roots by taking the limit πœ‡ β†’ 0. Now, the general solution for complex roots was given by (3.12), and to properly limit this solution as πœ‡ β†’ 0 requires first satisfying the specific initial conditions π‘₯(0) = π‘₯0 and Λ™π‘₯(0) = 𝑒0. Solving for 𝐴 and 𝐡, the general solution given by (3.12) becomes the specific solution π‘₯(𝑑; πœ‡) = 𝑒 πœ†π‘‘ (οΈ‚ π‘₯0 cos πœ‡π‘‘ + 𝑒0 βˆ’ πœ†π‘₯0 πœ‡ sin πœ‡π‘‘ )οΈ‚ . Here, we have written π‘₯ = π‘₯(𝑑; πœ‡) to show explicitly that π‘₯ depends on πœ‡. Taking the limit as πœ‡ β†’ 0, and using lim πœ‡β†’0 πœ‡βˆ’1 sin πœ‡π‘‘ = 𝑑, we have lim πœ‡β†’0 π‘₯(𝑑; πœ‡) = 𝑒 πœ†π‘‘ (οΈ€ π‘₯0 + (𝑒0 βˆ’ πœ†π‘₯0)𝑑 )οΈ€ . The second solution is observed to be a constant, 𝑒0 βˆ’ πœ†π‘₯0, times 𝑑 times the first solution, 𝑒 πœ†π‘‘ . Our general solution to the ode (3.9) when 𝑏2 βˆ’ 4π‘Žπ‘ = 0 can therefore be written in the form π‘₯(𝑑) = (𝑐1 + 𝑐2 𝑑)𝑒 π‘Ÿπ‘‘ , where π‘Ÿ is the repeated root of the characteristic equation. The main result to be remembered is that for the case of repeated roots, the second solution is 𝑑 times the first solution.
  • 45. 3.5. INHOMOGENEOUS ODES 37 Example: Solve Β¨π‘₯ + 2 Λ™π‘₯ + π‘₯ = 0 with π‘₯(0) = 1 and Λ™π‘₯(0) = 0. The characteristic equation is π‘Ÿ2 + 2π‘Ÿ + 1 = (π‘Ÿ + 1)2 = 0, which has a repeated root given by π‘Ÿ = βˆ’1. Therefore, the general solution to the ode is π‘₯(𝑑) = 𝑐1 π‘’βˆ’π‘‘ + 𝑐2 π‘‘π‘’βˆ’π‘‘ , with derivative Λ™π‘₯(𝑑) = βˆ’π‘1 π‘’βˆ’π‘‘ + 𝑐2 π‘’βˆ’π‘‘ βˆ’ 𝑐2 π‘‘π‘’βˆ’π‘‘ . Applying the initial conditions, we have 𝑐1 = 1, βˆ’π‘1 + 𝑐2 = 0, so that 𝑐1 = 𝑐2 = 1. Therefore, the solution is π‘₯(𝑑) = (1 + 𝑑)π‘’βˆ’π‘‘ . 3.5 Second-order linear inhomogeneous ode We now consider the general second-order linear inhomogeneous ode (3.1): Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 𝑔(𝑑), (3.15) with initial conditions π‘₯(𝑑0) = π‘₯0 and Λ™π‘₯(𝑑0) = 𝑒0. There is a three-step solution method when the inhomogeneous term 𝑔(𝑑) ΜΈ= 0. (i) Find the general solution of the homogeneous equation Β¨π‘₯ + 𝑝(𝑑) Λ™π‘₯ + π‘ž(𝑑)π‘₯ = 0. (3.16) Let us denote the homogeneous solution by π‘₯β„Ž(𝑑) = 𝑐1 𝑋1(𝑑) + 𝑐2 𝑋2(𝑑), where 𝑋1 and 𝑋2 are linearly independent solutions of (3.16), and 𝑐1 and 𝑐2 are as yet undetermined constants. (ii) Find any particular solution π‘₯ 𝑝 of the inhomogeneous equation (3.15). A particular solution is readily found when 𝑝(𝑑) and π‘ž(𝑑) are constants, and when 𝑔(𝑑) is a combination of polynomials, exponentials, sines and cosines. (iii) Write the general solution of (3.15) as the sum of the homogeneous and particular solutions, π‘₯(𝑑) = π‘₯β„Ž(𝑑) + π‘₯ 𝑝(𝑑), (3.17) and apply the initial conditions to determine the constants 𝑐1 and 𝑐2. Note that because of the linearity of (3.15), Β¨π‘₯ + 𝑝 Λ™π‘₯ + π‘žπ‘₯ = 𝑑2 𝑑𝑑2 (π‘₯β„Ž + π‘₯ 𝑝) + 𝑝 𝑑 𝑑𝑑 (π‘₯β„Ž + π‘₯ 𝑝) + π‘ž(π‘₯β„Ž + π‘₯ 𝑝) = (Β¨π‘₯β„Ž + 𝑝 Λ™π‘₯β„Ž + π‘žπ‘₯β„Ž) + (Β¨π‘₯ 𝑝 + 𝑝 Λ™π‘₯ 𝑝 + π‘žπ‘₯ 𝑝) = 0 + 𝑔 = 𝑔,
  • 46. 38 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS so that (3.17) solves (3.15), and the two free constants in π‘₯β„Ž can be used to satisfy the initial conditions. We will consider here only the constant coefficient case. We now illustrate the solution method by an example. Example: Solve Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 3𝑒2𝑑 with π‘₯(0) = 1 and Λ™π‘₯(0) = 0. view tutorial First, we solve the homogeneous equation. The characteristic equation is π‘Ÿ2 βˆ’ 3π‘Ÿ βˆ’ 4 = (π‘Ÿ βˆ’ 4)(π‘Ÿ + 1) = 0, so that π‘₯β„Ž(𝑑) = 𝑐1 𝑒4𝑑 + 𝑐2 π‘’βˆ’π‘‘ . Second, we find a particular solution of the inhomogeneous equation. The form of the particular solution is chosen such that the exponential will cancel out of both sides of the ode. The ansatz we choose is π‘₯(𝑑) = 𝐴𝑒2𝑑 , (3.18) where 𝐴 is a yet undetermined coefficient. Upon substituting π‘₯ into the ode, differentiating using the chain rule, and canceling the exponential, we obtain 4𝐴 βˆ’ 6𝐴 βˆ’ 4𝐴 = 3, from which we determine 𝐴 = βˆ’1/2. Obtaining a solution for 𝐴 independent of 𝑑 justifies the ansatz (3.18). Third, we write the general solution to the ode as the sum of the homogeneous and particular solutions, and determine 𝑐1 and 𝑐2 that satisfy the initial conditions. We have π‘₯(𝑑) = 𝑐1 𝑒4𝑑 + 𝑐2 π‘’βˆ’π‘‘ βˆ’ 1 2 𝑒2𝑑 ; and taking the derivative, Λ™π‘₯(𝑑) = 4𝑐1 𝑒4𝑑 βˆ’ 𝑐2 π‘’βˆ’π‘‘ βˆ’ 𝑒2𝑑 . Applying the initial conditions, 𝑐1 + 𝑐2 βˆ’ 1 2 = 1, 4𝑐1 βˆ’ 𝑐2 βˆ’ 1 = 0; or 𝑐1 + 𝑐2 = 3 2 , 4𝑐1 βˆ’ 𝑐2 = 1. This system of linear equations can be solved for 𝑐1 by adding the equations to obtain 𝑐1 = 1/2, after which 𝑐2 = 1 can be determined from the first equa- tion. Therefore, the solution for π‘₯(𝑑) that satisfies both the ode and the initial
  • 47. 3.5. INHOMOGENEOUS ODES 39 conditions is given by π‘₯(𝑑) = 1 2 𝑒4𝑑 βˆ’ 1 2 𝑒2𝑑 + π‘’βˆ’π‘‘ = 1 2 𝑒4𝑑 (οΈ€ 1 βˆ’ π‘’βˆ’2𝑑 + 2π‘’βˆ’5𝑑 )οΈ€ , where we have grouped the terms in the solution to better display the asymptotic behavior for large 𝑑. We now find particular solutions for some relatively simple inhomogeneous terms using this method of undetermined coefficients. Example: Find a particular solution of Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 sin 𝑑. view tutorial We show two methods for finding a particular solution. The first more direct method tries the ansatz π‘₯(𝑑) = 𝐴 cos 𝑑 + 𝐡 sin 𝑑, where the argument of cosine and sine must agree with the argument of sine in the inhomogeneous term. The cosine term is required because the derivative of sine is cosine. Upon substitution into the differential equation, we obtain (βˆ’π΄ cos 𝑑 βˆ’ 𝐡 sin 𝑑) βˆ’ 3 (βˆ’π΄ sin 𝑑 + 𝐡 cos 𝑑) βˆ’ 4 (𝐴 cos 𝑑 + 𝐡 sin 𝑑) = 2 sin 𝑑, or regrouping terms, βˆ’ (5𝐴 + 3𝐡) cos 𝑑 + (3𝐴 βˆ’ 5𝐡) sin 𝑑 = 2 sin 𝑑. This equation is valid for all 𝑑, and in particular for 𝑑 = 0 and πœ‹/2, for which the sine and cosine functions vanish. For these two values of 𝑑, we find 5𝐴 + 3𝐡 = 0, 3𝐴 βˆ’ 5𝐡 = 2; and solving for 𝐴 and 𝐡, we obtain 𝐴 = 3 17 , 𝐡 = βˆ’ 5 17 . The particular solution is therefore given by π‘₯ 𝑝 = 1 17 (3 cos 𝑑 βˆ’ 5 sin 𝑑) . The second solution method makes use of the relation 𝑒𝑖𝑑 = cos 𝑑 + 𝑖 sin 𝑑 to convert the sine inhomogeneous term to an exponential function. We introduce the complex function 𝑧(𝑑) by letting 𝑧(𝑑) = π‘₯(𝑑) + 𝑖𝑦(𝑑), and rewrite the differential equation in complex form. We can rewrite the equa- tion in one of two ways. On the one hand, if we use sin 𝑑 = Re{βˆ’π‘–π‘’π‘–π‘‘ }, then the differential equation is written as ¨𝑧 βˆ’ 3 ˙𝑧 βˆ’ 4𝑧 = βˆ’2𝑖𝑒𝑖𝑑 ; (3.19)
  • 48. 40 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS and by equating the real and imaginary parts, this equation becomes the two real differential equations Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 sin 𝑑, ¨𝑦 βˆ’ 3 ˙𝑦 βˆ’ 4𝑦 = βˆ’2 cos 𝑑. The solution we are looking for, then, is π‘₯ 𝑝(𝑑) = Re{𝑧 𝑝(𝑑)}. On the other hand, if we write sin 𝑑 = Im{𝑒𝑖𝑑 }, then the complex differential equation becomes ¨𝑧 βˆ’ 3 ˙𝑧 βˆ’ 4𝑧 = 2𝑒𝑖𝑑 , (3.20) which becomes the two real differential equations Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 2 cos 𝑑, ¨𝑦 βˆ’ 3 ˙𝑦 βˆ’ 4𝑦 = 2 sin 𝑑. Here, the solution we are looking for is π‘₯ 𝑝(𝑑) = Im{𝑧 𝑝(𝑑)}. We will proceed here by solving (3.20). As we now have an exponential function as the inhomogeneous term, we can make the ansatz 𝑧(𝑑) = 𝐢𝑒𝑖𝑑 , where we now expect 𝐢 to be a complex constant. Upon substitution into the ode (3.20) and using 𝑖2 = βˆ’1: βˆ’πΆ βˆ’ 3𝑖𝐢 βˆ’ 4𝐢 = 2; or solving for 𝐢: 𝐢 = βˆ’2 5 + 3𝑖 = βˆ’2(5 βˆ’ 3𝑖) (5 + 3𝑖)(5 βˆ’ 3𝑖) = βˆ’10 + 6𝑖 34 = βˆ’5 + 3𝑖 17 . Therefore, π‘₯ 𝑝 = Im{𝑧 𝑝} = Im {οΈ‚ 1 17 (βˆ’5 + 3𝑖)(cos 𝑑 + 𝑖 sin 𝑑) }οΈ‚ = 1 17 (3 cos 𝑑 βˆ’ 5 sin 𝑑). Example: Find a particular solution of Β¨π‘₯ + Λ™π‘₯ βˆ’ 2π‘₯ = 𝑑2 . view tutorial The correct ansatz here is the polynomial π‘₯(𝑑) = 𝐴𝑑2 + 𝐡𝑑 + 𝐢. Upon substitution into the ode, we have 2𝐴 + 2𝐴𝑑 + 𝐡 βˆ’ 2𝐴𝑑2 βˆ’ 2𝐡𝑑 βˆ’ 2𝐢 = 𝑑2 ,
  • 49. 3.6. FIRST-ORDER LINEAR INHOMOGENEOUS ODES REVISITED 41 or βˆ’2𝐴𝑑2 + 2(𝐴 βˆ’ 𝐡)𝑑 + (2𝐴 + 𝐡 βˆ’ 2𝐢)𝑑0 = 𝑑2 . Equating powers of 𝑑, βˆ’2𝐴 = 1, 2(𝐴 βˆ’ 𝐡) = 0, 2𝐴 + 𝐡 βˆ’ 2𝐢 = 0; and solving, 𝐴 = βˆ’ 1 2 , 𝐡 = βˆ’ 1 2 , 𝐢 = βˆ’ 3 4 . The particular solution is therefore π‘₯ 𝑝(𝑑) = βˆ’ 1 2 𝑑2 βˆ’ 1 2 𝑑 βˆ’ 3 4 . 3.6 First-order linear inhomogeneous odes re- visited The first-order linear ode can be solved by use of an integrating factor. Here I show that odes having constant coefficients can be solved by our newly learned solution method. Example: Solve Λ™π‘₯ + 2π‘₯ = π‘’βˆ’π‘‘ with π‘₯(0) = 3/4. Rather than using an integrating factor, we follow the three-step approach: (i) find the general homogeneous solution; (ii) find a particular solution; (iii) add them and satisfy initial conditions. Accordingly, we try the ansatz π‘₯β„Ž(𝑑) = 𝑒 π‘Ÿπ‘‘ for the homogeneous ode Λ™π‘₯ + 2π‘₯ = 0 and find π‘Ÿ + 2 = 0, or π‘Ÿ = βˆ’2. To find a particular solution, we try the ansatz π‘₯ 𝑝(𝑑) = π΄π‘’βˆ’π‘‘ , and upon substi- tution βˆ’π΄ + 2𝐴 = 1, or 𝐴 = 1. Therefore, the general solution to the ode is π‘₯(𝑑) = π‘π‘’βˆ’2𝑑 + π‘’βˆ’π‘‘ . The single initial condition determines the unknown constant 𝑐: π‘₯(0) = 3 4 = 𝑐 + 1, so that 𝑐 = βˆ’1/4. Hence, π‘₯(𝑑) = π‘’βˆ’π‘‘ βˆ’ 1 4 π‘’βˆ’2𝑑 = π‘’βˆ’π‘‘ (οΈ‚ 1 βˆ’ 1 4 π‘’βˆ’π‘‘ )οΈ‚ .
  • 50. 42 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS 3.7 Resonance view tutorial Resonance occurs when the frequency of the inhomogeneous term matches the frequency of the homogeneous solution. To illustrate resonance in its simplest embodiment, we consider the second-order linear inhomogeneous ode Β¨π‘₯ + πœ”2 0 π‘₯ = 𝑓 cos πœ”π‘‘, π‘₯(0) = π‘₯0, Λ™π‘₯(0) = 𝑒0. (3.21) Our main goal is to determine what happens to the solution in the limit πœ” β†’ πœ”0. The homogeneous equation has characteristic equation π‘Ÿ2 + πœ”2 0 = 0, so that π‘ŸΒ± = Β±π‘–πœ”0. Therefore, π‘₯β„Ž(𝑑) = 𝑐1 cos πœ”0 𝑑 + 𝑐2 sin πœ”0 𝑑. (3.22) To find a particular solution, we note the absence of a first-derivative term, and simply try π‘₯(𝑑) = 𝐴 cos πœ”π‘‘. Upon substitution into the ode, we obtain βˆ’πœ”2 𝐴 + πœ”2 0 𝐴 = 𝑓, or 𝐴 = 𝑓 πœ”2 0 βˆ’ πœ”2 . Therefore, π‘₯ 𝑝(𝑑) = 𝑓 πœ”2 0 βˆ’ πœ”2 cos πœ”π‘‘. Our general solution is thus π‘₯(𝑑) = 𝑐1 cos πœ”0 𝑑 + 𝑐2 sin πœ”0 𝑑 + 𝑓 πœ”2 0 βˆ’ πœ”2 cos πœ”π‘‘, with derivative Λ™π‘₯(𝑑) = πœ”0(𝑐2 cos πœ”0 𝑑 βˆ’ 𝑐1 sin πœ”0 𝑑) βˆ’ 𝑓 πœ” πœ”2 0 βˆ’ πœ”2 sin πœ”π‘‘. Initial conditions are satisfied when π‘₯0 = 𝑐1 + 𝑓 πœ”2 0 βˆ’ πœ”2 , 𝑒0 = 𝑐2 πœ”0, so that 𝑐1 = π‘₯0 βˆ’ 𝑓 πœ”2 0 βˆ’ πœ”2 , 𝑐2 = 𝑒0 πœ”0 .
  • 51. 3.7. RESONANCE 43 Therefore, the solution to the ode that satisfies the initial conditions is π‘₯(𝑑) = (οΈ‚ π‘₯0 βˆ’ 𝑓 πœ”2 0 βˆ’ πœ”2 )οΈ‚ cos πœ”0 𝑑 + 𝑒0 πœ”0 sin πœ”0 𝑑 + 𝑓 πœ”2 0 βˆ’ πœ”2 cos πœ”π‘‘ = π‘₯0 cos πœ”0 𝑑 + 𝑒0 πœ”0 sin πœ”0 𝑑 + 𝑓(cos πœ”π‘‘ βˆ’ cos πœ”0 𝑑) πœ”2 0 βˆ’ πœ”2 , where we have grouped together terms proportional to the forcing amplitude 𝑓. Resonance occurs in the limit πœ” β†’ πœ”0; that is, the frequency of the inhomo- geneous term (the external force) matches the frequency of the homogeneous solution (the free oscillation). By L’Hospital’s rule, the limit of the term pro- portional to 𝑓 is found by differentiating with respect to πœ”: lim πœ”β†’πœ”0 𝑓(cos πœ”π‘‘ βˆ’ cos πœ”0 𝑑) πœ”2 0 βˆ’ πœ”2 = lim πœ”β†’πœ”0 βˆ’π‘“ 𝑑 sin πœ”π‘‘ βˆ’2πœ” = 𝑓 𝑑 sin πœ”0 𝑑 2πœ”0 . (3.23) At resonance, the term proportional to the amplitude 𝑓 of the inhomogeneous term increases linearly with 𝑑, resulting in larger-and-larger amplitudes of oscil- lation for π‘₯(𝑑). In general, if the inhomogeneous term in the differential equation is a solution of the corresponding homogeneous differential equation, then the correct ansatz for the particular solution is a constant times the inhomogeneous term times 𝑑. To illustrate this same example further, we return to the original ode, now assumed to be exactly at resonance, Β¨π‘₯ + πœ”2 0 π‘₯ = 𝑓 cos πœ”0 𝑑, and find a particular solution directly. The particular solution is the real part of the particular solution of ¨𝑧 + πœ”2 0 𝑧 = 𝑓 π‘’π‘–πœ”0 𝑑 , and because the inhomogeneous term is a solution of the corresponding homo- geneous equation, we take as our ansatz 𝑧 𝑝 = π΄π‘‘π‘’π‘–πœ”0 𝑑 . We have ˙𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑 (1 + π‘–πœ”0 𝑑) , ¨𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑 (οΈ€ 2π‘–πœ”0 βˆ’ πœ”2 0 𝑑 )οΈ€ ; and upon substitution into the ode ¨𝑧 𝑝 + πœ”2 0 𝑧 𝑝 = π΄π‘’π‘–πœ”0 𝑑 (οΈ€ 2π‘–πœ”0 βˆ’ πœ”2 0 𝑑 )οΈ€ + πœ”2 0 π΄π‘‘π‘’π‘–πœ”0 𝑑 = 2π‘–πœ”0 π΄π‘’π‘–πœ”0 𝑑 = 𝑓 π‘’π‘–πœ”0 𝑑 . Therefore, 𝐴 = 𝑓 2π‘–πœ”0 ,
  • 52. 44 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS and π‘₯ 𝑝 = Re{ 𝑓 𝑑 2π‘–πœ”0 π‘’π‘–πœ”0 𝑑 } = 𝑓 𝑑 sin πœ”0 𝑑 2πœ”0 , the same result as (3.23). Example: Find a particular solution of Β¨π‘₯ βˆ’ 3 Λ™π‘₯ βˆ’ 4π‘₯ = 5π‘’βˆ’π‘‘ . view tutorial If we naively try the ansatz π‘₯ = π΄π‘’βˆ’π‘‘ , and substitute this into the inhomogeneous differential equation, we obtain 𝐴 + 3𝐴 βˆ’ 4𝐴 = 5, or 0 = 5, which is clearly nonsense. Our ansatz therefore fails to find a solution. The cause of this failure is that the corresponding homogeneous equation has solution π‘₯β„Ž = 𝑐1 𝑒4𝑑 + 𝑐2 π‘’βˆ’π‘‘ , so that the inhomogeneous term 5π‘’βˆ’π‘‘ is one of the solutions of the homogeneous equation. To find a particular solution, we should therefore take as our ansatz π‘₯ = π΄π‘‘π‘’βˆ’π‘‘ , with first- and second-derivatives given by Λ™π‘₯ = π΄π‘’βˆ’π‘‘ (1 βˆ’ 𝑑), Β¨π‘₯ = π΄π‘’βˆ’π‘‘ (βˆ’2 + 𝑑). Substitution into the differential equation yields π΄π‘’βˆ’π‘‘ (βˆ’2 + 𝑑) βˆ’ 3π΄π‘’βˆ’π‘‘ (1 βˆ’ 𝑑) βˆ’ 4π΄π‘‘π‘’βˆ’π‘‘ = 5π‘’βˆ’π‘‘ . The terms containing 𝑑 cancel out of this equation, resulting in βˆ’5𝐴 = 5, or 𝐴 = βˆ’1. Therefore, the particular solution is π‘₯ 𝑝 = βˆ’π‘‘π‘’βˆ’π‘‘ . 3.8 Damped resonance view tutorial A more realistic study of resonance assumes an additional damping term. The forced, damped harmonic oscillator equation may be written as π‘šΒ¨π‘₯ + 𝛾 Λ™π‘₯ + π‘˜π‘₯ = 𝐹 cos πœ”π‘‘, (3.24) where π‘š > 0 is the oscillator’s mass, 𝛾 > 0 is the damping coefficient, π‘˜ > 0 is the spring constant, and 𝐹 is the amplitude of the external force. The homogeneous equation has characteristic equation π‘šπ‘Ÿ2 + π›Ύπ‘Ÿ + π‘˜ = 0,
  • 53. 3.8. DAMPED RESONANCE 45 so that π‘ŸΒ± = βˆ’ 𝛾 2π‘š Β± 1 2π‘š βˆšοΈ€ 𝛾2 βˆ’ 4π‘šπ‘˜. When 𝛾2 βˆ’ 4π‘šπ‘˜ < 0, the motion of the unforced oscillator is said to be under- damped; when 𝛾2 βˆ’ 4π‘šπ‘˜ > 0, overdamped; and when 𝛾2 βˆ’ 4π‘šπ‘˜ = 0, critically damped. For all three types of damping, the roots of the characteristic equa- tion satisfy Re(π‘ŸΒ±) < 0. Therefore, both linearly independent homogeneous solutions decay exponentially to zero, and the long-time asymptotic solution of (3.24) reduces to the (non-decaying) particular solution. Since the initial conditions are satisfied by the free constants multiplying the (decaying) homo- geneous solutions, the long-time asymptotic solution is independent of the initial conditions. If we are only interested in the long-time asymptotic solution of (3.24), we can proceed directly to the determination of a particular solution. As before, we consider the complex ode π‘šΒ¨π‘§ + 𝛾 ˙𝑧 + π‘˜π‘§ = 𝐹 π‘’π‘–πœ”π‘‘ , with π‘₯ 𝑝 = Re(𝑧 𝑝). With the ansatz 𝑧 𝑝 = π΄π‘’π‘–πœ”π‘‘ , we have βˆ’π‘šπœ”2 𝐴 + π‘–π›Ύπœ”π΄ + π‘˜π΄ = 𝐹, or 𝐴 = 𝐹 (π‘˜ βˆ’ π‘šπœ”2) + π‘–π›Ύπœ” . To simplify, we define πœ”0 = βˆšοΈ€ π‘˜/π‘š, which corresponds to the natural frequency of the undamped oscillator, and define Ξ“ = π›Ύπœ”/π‘š and 𝑓 = 𝐹/π‘š. Therefore, 𝐴 = 𝑓 (πœ”2 0 βˆ’ πœ”2) + 𝑖Γ = (οΈ‚ 𝑓 (πœ”2 0 βˆ’ πœ”2)2 + Ξ“2 )οΈ‚ (οΈ€ (πœ”2 0 βˆ’ πœ”2 ) βˆ’ 𝑖Γ )οΈ€ . (3.25) To determine π‘₯ 𝑝, we utilize the polar form of a complex number. The complex number 𝑧 = π‘₯ + 𝑖𝑦 can be written in polar form as 𝑧 = π‘Ÿπ‘’π‘–πœ‘ , where π‘₯ = π‘Ÿ cos πœ‘, 𝑦 = π‘Ÿ sin πœ‘, and π‘Ÿ = βˆšοΈ€ π‘₯2 + 𝑦2, tan πœ‘ = 𝑦/π‘₯. We therefore write (πœ”2 0 βˆ’ πœ”2 ) βˆ’ 𝑖Γ = π‘Ÿπ‘’π‘–πœ‘ , with π‘Ÿ = √︁ (πœ”2 0 βˆ’ πœ”2)2 + Ξ“2, tan πœ‘ = Ξ“ (πœ”2 βˆ’ πœ”2 0) . Using the polar form, 𝐴 in (3.25) becomes 𝐴 = (οΈƒ 𝑓 βˆšοΈ€ (πœ”2 0 βˆ’ πœ”2)2 + Ξ“2 )οΈƒ π‘’π‘–πœ‘ , and π‘₯ 𝑝 = Re(π΄π‘’π‘–πœ”π‘‘ ) becomes π‘₯ 𝑝 = (οΈƒ 𝑓 βˆšοΈ€ (πœ”2 0 βˆ’ πœ”2)2 + Ξ“2 )οΈƒ Re (︁ 𝑒𝑖(πœ”π‘‘+πœ‘) )︁ = (οΈƒ 𝑓 βˆšοΈ€ (πœ”2 0 βˆ’ πœ”2)2 + Ξ“2 )οΈƒ cos (πœ”π‘‘ + πœ‘). (3.26)
  • 54. 46 CHAPTER 3. SECOND-ORDER ODES, CONSTANT COEFFICIENTS The particular solution given by (3.26), with πœ”2 0 = π‘˜/π‘š, Ξ“ = π›Ύπœ”/π‘š, 𝑓 = 𝐹/π‘š, and tan πœ‘ = π›Ύπœ”/π‘š(πœ”2 βˆ’ πœ”2 0), is the long-time asymptotic solution of the forced, damped, harmonic oscillator equation (3.24). We conclude with a couple of observations about (3.26). First, if the forcing frequency πœ” is equal to the natural frequency πœ”0 of the undamped oscillator, then 𝐴 = βˆ’π‘–πΉ/π›Ύπœ”0, and π‘₯ 𝑝 = (𝐹/π›Ύπœ”0) sin πœ”0 𝑑. The oscillator position is observed to be πœ‹/2 out of phase with the external force, or in other words, the velocity of the oscillator, not the position, is in phase with the force. Second, the value of the forcing frequency πœ” π‘š that maximizes the amplitude of oscillation is the value of πœ” that minimizes the denominator of (3.26). To determine πœ” π‘š we thus minimize the function 𝑔(πœ”2 ) with respect to πœ”2 , where 𝑔(πœ”2 ) = (πœ”2 0 βˆ’ πœ”2 )2 + 𝛾2 πœ”2 π‘š2 . Taking the derivative of 𝑔 with respect to πœ”2 and setting this to zero to determine πœ” π‘š yields 2(πœ”2 π‘š βˆ’ πœ”2 0) + 𝛾2 π‘š2 = 0, or πœ”2 π‘š = πœ”2 0 βˆ’ 𝛾2 2π‘š2 . We can interpret this result by saying that damping lowers the β€œresonance” frequency of the undamped oscillator.
  • 55. Chapter 4 The Laplace transform Reference: Boyce and DiPrima, Chapter 6 The Laplace transform is most useful for solving linear, constant-coefficient ode’s when the inhomogeneous term or its derivative is discontinuous. Although ode’s with discontinuous inhomogeneous terms can also be solved by adopting already learned methods, we will see that the Laplace transform technique pro- vides a simpler, more elegant solution. 4.1 Definitions and properties of the forward and inverse Laplace transforms view tutorial The main idea is to Laplace transform the constant-coefficient differential equa- tion for π‘₯(𝑑) into a simpler algebraic equation for the Laplace-transformed func- tion 𝑋(𝑠), solve this algebraic equation, and then transform 𝑋(𝑠) back into π‘₯(𝑑). The correct definition of the Laplace transform and the properties that this transform satisfies makes this solution method possible. An exponential ansatz is used in solving homogeneous constant-coefficient odes, and the exponential function correspondingly plays a key role in defining the Laplace transform. The Laplace transform of 𝑓(𝑑), denoted by 𝐹(𝑠) = β„’{𝑓(𝑑)}, is defined by the integral transform 𝐹(𝑠) = ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ 𝑓(𝑑)𝑑𝑑. (4.1) The improper integral given by (4.1) diverges if 𝑓(𝑑) grows faster than 𝑒 𝑠𝑑 for large 𝑑. Accordingly, some restriction on the range of 𝑠 may be required to guarantee convergence of (4.1), and we will assume without further elaboration that these restrictions are always satisfied. The Laplace transform is a linear transformation. We have β„’{𝑐1 𝑓1(𝑑) + 𝑐2 𝑓2(𝑑)} = ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ (οΈ€ 𝑐1 𝑓1(𝑑) + 𝑐2 𝑓2(𝑑) )οΈ€ 𝑑𝑑 = 𝑐1 ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ 𝑓1(𝑑)𝑑𝑑 + 𝑐2 ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ 𝑓2(𝑑)𝑑𝑑 = 𝑐1β„’{𝑓1(𝑑)} + 𝑐2β„’{𝑓2(𝑑)}. 47
  • 56. 48 CHAPTER 4. THE LAPLACE TRANSFORM 𝑓(𝑑) = β„’βˆ’1 {𝐹(𝑠)} 𝐹(𝑠) = β„’{𝑓(𝑑)} 1. 𝑒 π‘Žπ‘‘ 𝑓(𝑑) 𝐹(𝑠 βˆ’ π‘Ž) 2. 1 1 𝑠 3. 𝑒 π‘Žπ‘‘ 1 𝑠 βˆ’ π‘Ž 4. 𝑑 𝑛 𝑛! 𝑠 𝑛+1 5. 𝑑 𝑛 𝑒 π‘Žπ‘‘ 𝑛! (𝑠 βˆ’ π‘Ž) 𝑛+1 6. sin 𝑏𝑑 𝑏 𝑠2 + 𝑏2 7. cos 𝑏𝑑 𝑠 𝑠2 + 𝑏2 8. 𝑒 π‘Žπ‘‘ sin 𝑏𝑑 𝑏 (𝑠 βˆ’ π‘Ž)2 + 𝑏2 9. 𝑒 π‘Žπ‘‘ cos 𝑏𝑑 𝑠 βˆ’ π‘Ž (𝑠 βˆ’ π‘Ž)2 + 𝑏2 10. 𝑑 sin 𝑏𝑑 2𝑏𝑠 (𝑠2 + 𝑏2)2 11. 𝑑 cos 𝑏𝑑 𝑠2 βˆ’ 𝑏2 (𝑠2 + 𝑏2)2 12. 𝑒 𝑐(𝑑) π‘’βˆ’π‘π‘  𝑠 13. 𝑒 𝑐(𝑑)𝑓(𝑑 βˆ’ 𝑐) π‘’βˆ’π‘π‘  𝐹(𝑠) 14. 𝛿(𝑑 βˆ’ 𝑐) π‘’βˆ’π‘π‘  15. Λ™π‘₯(𝑑) 𝑠𝑋(𝑠) βˆ’ π‘₯(0) 16. Β¨π‘₯(𝑑) 𝑠2 𝑋(𝑠) βˆ’ 𝑠π‘₯(0) βˆ’ Λ™π‘₯(0) Table 4.1: Table of Laplace Transforms
  • 57. 4.1. DEFINITION AND PROPERTIES 49 There is also a one-to-one correspondence between functions and their Laplace transforms. A table of Laplace transforms can therefore be constructed and used to find both Laplace and inverse Laplace transforms of commonly occurring functions. Such a table is shown in Table 4.1 (and this table will be distributed with the exams). In Table 4.1, 𝑛 is a positive integer. Also, the cryptic entries for 𝑒 𝑐(𝑑) and 𝛿(𝑑 βˆ’ 𝑐) will be explained later in S4.3. The rows of Table 4.1 can be determined by a combination of direct inte- gration and some tricks. We first compute directly the Laplace transform of 𝑒 π‘Žπ‘‘ 𝑓(𝑑) (line 1): β„’{𝑒 π‘Žπ‘‘ 𝑓(𝑑)} = ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ 𝑒 π‘Žπ‘‘ 𝑓(𝑑)𝑑𝑑 = ∫︁ ∞ 0 π‘’βˆ’(π‘ βˆ’π‘Ž)𝑑 𝑓(𝑑)𝑑𝑑 = 𝐹(𝑠 βˆ’ π‘Ž). We also compute directly the Laplace transform of 1 (line 2): β„’{1} = ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ 𝑑𝑑 = βˆ’ 1 𝑠 π‘’βˆ’π‘ π‘‘ ]οΈ‚βˆž 0 = 1 𝑠 . Now, the Laplace transform of 𝑒 π‘Žπ‘‘ (line 3) may be found using these two results: β„’{𝑒 π‘Žπ‘‘ } = β„’{𝑒 π‘Žπ‘‘ Β· 1} = 1 𝑠 βˆ’ π‘Ž . (4.2) The transform of 𝑑 𝑛 (line 4) can be found by successive integration by parts. A more interesting method uses Taylor series expansions for 𝑒 π‘Žπ‘‘ and 1/(π‘ βˆ’ π‘Ž). We have β„’{𝑒 π‘Žπ‘‘ } = β„’ {οΈƒ βˆžβˆ‘οΈ 𝑛=0 (π‘Žπ‘‘) 𝑛 𝑛! }οΈƒ = βˆžβˆ‘οΈ 𝑛=0 π‘Ž 𝑛 𝑛! β„’{𝑑 𝑛 }. (4.3) Also, with 𝑠 > π‘Ž, 1 𝑠 βˆ’ π‘Ž = 1 𝑠(1 βˆ’ π‘Ž 𝑠 ) = 1 𝑠 βˆžβˆ‘οΈ 𝑛=0 (︁ π‘Ž 𝑠 )︁ 𝑛 = βˆžβˆ‘οΈ 𝑛=0 π‘Ž 𝑛 𝑠 𝑛+1 . (4.4)
  • 58. 50 CHAPTER 4. THE LAPLACE TRANSFORM Using (4.2), and equating the coefficients of powers of π‘Ž in (4.3) and (4.4), results in line 4: β„’{𝑑 𝑛 } = 𝑛! 𝑠 𝑛+1 . The Laplace transform of 𝑑 𝑛 𝑒 π‘Žπ‘‘ (line 5) can be found from line 1 and line 4: β„’{𝑑 𝑛 𝑒 π‘Žπ‘‘ } = 𝑛! (𝑠 βˆ’ π‘Ž) 𝑛+1 . The Laplace transform of sin 𝑏𝑑 (line 6) may be found from the Laplace transform of 𝑒 π‘Žπ‘‘ (line 3) using π‘Ž = 𝑖𝑏: β„’{sin 𝑏𝑑} = Im {οΈ€ β„’{𝑒𝑖𝑏𝑑 } }οΈ€ = Im {οΈ‚ 1 𝑠 βˆ’ 𝑖𝑏 }οΈ‚ = Im {οΈ‚ 𝑠 + 𝑖𝑏 𝑠2 + 𝑏2 }οΈ‚ = 𝑏 𝑠2 + 𝑏2 . Similarly, the Laplace transform of cos 𝑏𝑑 (line 7) is β„’{cos 𝑏𝑑} = Re {οΈ€ β„’{𝑒𝑖𝑏𝑑 } }οΈ€ = 𝑠 𝑠2 + 𝑏2 . The transform of 𝑒 π‘Žπ‘‘ sin 𝑏𝑑 (line 8) can be found from the transform of sin 𝑏𝑑 (line 6) and line 1: β„’{𝑒 π‘Žπ‘‘ sin 𝑏𝑑} = 𝑏 (𝑠 βˆ’ π‘Ž)2 + 𝑏2 ; and similarly for the transform of 𝑒 π‘Žπ‘‘ cos 𝑏𝑑: β„’{𝑒 π‘Žπ‘‘ cos 𝑏𝑑} = 𝑠 βˆ’ π‘Ž (𝑠 βˆ’ π‘Ž)2 + 𝑏2 . The Laplace transform of 𝑑 sin 𝑏𝑑 (line 10) can be found from the Laplace trans- form of 𝑑𝑒 π‘Žπ‘‘ (line 5 with 𝑛 = 1) using π‘Ž = 𝑖𝑏: β„’{𝑑 sin 𝑏𝑑} = Im {οΈ€ β„’{𝑑𝑒𝑖𝑏𝑑 } }οΈ€ = Im {οΈ‚ 1 (𝑠 βˆ’ 𝑖𝑏)2 }οΈ‚ = Im {οΈ‚ (𝑠 + 𝑖𝑏)2 (𝑠2 + 𝑏2)2 }οΈ‚ = 2𝑏𝑠 (𝑠2 + 𝑏2)2 . Similarly, the Laplace transform of 𝑑 cos 𝑏𝑑 (line 11) is β„’{𝑑 cos 𝑏𝑑} = Re {οΈ€ β„’{𝑑𝑒𝑖𝑏𝑑 } }οΈ€ = Re {οΈ‚ (𝑠 + 𝑖𝑏)2 (𝑠2 + 𝑏2)2 }οΈ‚ = 𝑠2 βˆ’ 𝑏2 (𝑠2 + 𝑏2)2 .
  • 59. 4.2. SOLUTION OF INITIAL VALUE PROBLEMS 51 We now transform the inhomogeneous constant-coefficient, second-order, lin- ear inhomogeneous ode for π‘₯ = π‘₯(𝑑), π‘ŽΒ¨π‘₯ + 𝑏 Λ™π‘₯ + 𝑐π‘₯ = 𝑔(𝑑), making use of the linearity of the Laplace transform: π‘Žβ„’{Β¨π‘₯} + 𝑏ℒ{ Λ™π‘₯} + 𝑐ℒ{π‘₯} = β„’{𝑔}. To determine the Laplace transform of Λ™π‘₯(𝑑) (line 15) in terms of the Laplace transform of π‘₯(𝑑) and the initial conditions π‘₯(0) and Λ™π‘₯(0), we define 𝑋(𝑠) = β„’{π‘₯(𝑑)}, and integrate ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ Λ™π‘₯𝑑𝑑 by parts. We let 𝑒 = π‘’βˆ’π‘ π‘‘ 𝑑𝑣 = Λ™π‘₯𝑑𝑑 𝑑𝑒 = βˆ’π‘ π‘’βˆ’π‘ π‘‘ 𝑑𝑑 𝑣 = π‘₯. Therefore, ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ Λ™π‘₯𝑑𝑑 = π‘₯π‘’βˆ’π‘ π‘‘ ]οΈ€βˆž 0 + 𝑠 ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ π‘₯𝑑𝑑 = 𝑠𝑋(𝑠) βˆ’ π‘₯(0), where assumed convergence of the Laplace transform requires lim π‘‘β†’βˆž π‘₯(𝑑)π‘’βˆ’π‘ π‘‘ = 0. Similarly, the Laplace transform of Β¨π‘₯(𝑑) (line 16) is determined by integrating ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ Β¨π‘₯ 𝑑𝑑 by parts and using the just derived result for the first derivative. We let 𝑒 = π‘’βˆ’π‘ π‘‘ 𝑑𝑣 = Β¨π‘₯ 𝑑𝑑 𝑑𝑒 = βˆ’π‘ π‘’βˆ’π‘ π‘‘ 𝑑𝑑 𝑣 = Λ™π‘₯, so that ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ Β¨π‘₯ 𝑑𝑑 = Λ™π‘₯π‘’βˆ’π‘ π‘‘ ]οΈ€βˆž 0 + 𝑠 ∫︁ ∞ 0 π‘’βˆ’π‘ π‘‘ Λ™π‘₯𝑑𝑑 = βˆ’ Λ™π‘₯(0) + 𝑠 (οΈ€ 𝑠𝑋(𝑠) βˆ’ π‘₯(0) )οΈ€ = 𝑠2 𝑋(𝑠) βˆ’ 𝑠π‘₯(0) βˆ’ Λ™π‘₯(0), where similarly we assume lim π‘‘β†’βˆž Λ™π‘₯(𝑑)π‘’βˆ’π‘ π‘‘ = 0. 4.2 Solution of initial value problems We begin with a simple homogeneous ode and show that the Laplace transform method yields an identical result to our previously learned method. We then apply the Laplace transform method to solve an inhomogeneous equation.