Math Methods Book
Math Methods Book
P UBLISHED O NLINE
3 Partial Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.1 Introduction and Notation 87
3.1.1 Review of Product, Quotient, and Chain Rule . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.2 Power Series in Two Variables 90
3.3 Total Differentials 92
3.4 Approximations Using Differentials 93
3.5 Chain Rule or Differentiating a Function of a Function 95
3.6 Implicit Differentiation 97
3.7 More Chain Rule 99
3.7.1 Using Cramer’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.8 Maximum and Minimum Problems with Constraints 101
3.9 Lagrange Multipliers 105
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
I
Part One: Complex Numbers
1.1 Introduction
The two course sequence Mathematical Methods in the Physical Sciences I and II are designed to
condense many courses in higher level mathematics into the essential information needed to study
upper level physics undergraduate courses. Our main focus is to develop mathematical intuition for
solving real world problems while developing our tool box of useful methods. Topics in this course
are derived from five principle subjects in Mathematics
(ii) Linear Algebra (Math 21001, Boas Ch. 3) → Transformations, Change of Coor.,
Stability
(iii) Multivariable Calculus (Math 22005, Boas Ch. 4-6) → Forces, Inertia, Volume, Area
(iv) Introduction to Ordinary Differential Equations (Math 32044, Boas Ch. 7-8) →
Particle Motion, Dynamics
(v) Introduction to Partial Differential Equations (Math 42045, Boas Ch. 13) → Signal
Analysis, Heat Conduction, Waves, Equilibrium Physics
Each class individually goes deeper into the subject, but we will cover the basic tools needed to
handle problems arising in physics, materials sciences, and the life sciences. Your upper level
curses will introduce the physical motivation for the problems, but here we will develop the solution
methods for solving those problems. In Math Methods 1 we will cover Chapters 2 - 5 or the first
half of our list.
Recall the first place you most likely saw a complex number: solving a quadratic equation
ax2 + bx + c = 0 with the quadratic formula
√
−b ± b2 − 4ac
x= .
2a
12 Chapter 1. Fundamentals of Complex Numbers
When the so-called discriminant, b2 − 4ac is negative the square root produces p an imaginary
2
number. For example if one wants to solve x + 1 = 0 the quadratic formula gives ± ( − 1) = ±i.
A quadratic equation must have two roots or solutions and the imaginary number i was introduced
to handle such cases.
Consider some easy examples for how to handle negative square roots.
√ √
Example 1.1 i)
√ √ √ −64
√ = 8 −1 = 8i
ii) −5 = 5 −1√ = 5i √ √
iii) Powers of i: i = −1, i2 = −1 −1 = −1, i3 = i2 i = −i, i4 = i2 i2 = 1. Any other power of i
can be found by dividing the exponent by 4 and only considering the remainder i5 3 = i4(13) i1 = i.
Just as a refresher solve the following quadratic equation using the quadratic formula
Example 1.2 Solve x2 − x + 1 = 0. The quadratic formula gives
√ √ √
1 ± 1 − 4 1 ± −3 1 3
x= = = ± i
2 2 2 2
We have this built up intuition from the past, but what exactly is a complex number. Let’s
make an analogy with negative numbers (thanks Kalid Azad for the insight). Imagine a time before
negative numbers were accepted around the 1700’s in Europe. Given two numbers 7 and 8 we can
easily write 8 − 7 = 1. Starting with 8 sheep, if I give you 7 I will only have one left. What about
7 − 8? How can I have less than nothing? The problem is trying to think about this problem with
concrete objects. The easiest way to understand this is with money. If I owe you $50 and I am paid
only $10 to teach this course, then at the end of the day I have lost $40 hence the negative sign. In
this case −40 represents a debt or something I owe. The negative sign was invented to keep track
of which direction I am (positive I earned money or negative I owe money).
Now, how to we handle a square root of a number less than zero? Suppose we want to solve
x2 = 9. This mean finding a number such that 1 × x × x = 9. What can I apply to 1 twice so that I
receive 9? The answers are 3 and −3. We can scale 1 by 3 and then scale by 3 again or we can
scale 1 by negative 3 (scale by 3 and reflect it to negative side) and do the same again.
Now, try to solve x2 = −1, or 1 × x × x = −1. What can we apply twice to turn 1 into -1? We
cannot multiply by a positive or negative number twice, because the result will be negative. What if
we rotated it by 90◦ (see Figure‘1.1)? This works, but what does it mean. Summary:
1.1 Introduction 13
Complex numbers are very similar to real numbers. Can we make sense of arithmetic operations
of complex number (e.g., +, −, ×, ÷)? What about functions of complex numbers such as ei or
sin(iz) and cos(iz)?. Also, in the upcoming sections we will consider graphing, power series of
complex functions/radius of convergence, and distances or magnitudes of complex numbers.
14 Chapter 1. Fundamentals of Complex Numbers
R Notice the imaginary part y of a complex number z = x + iy is in fact real! It is the real
number coefficient for i.
All real numbers are complex numbers with zero imaginary part. Therefore the real numbers
are a subset of the complex numbers; however, there is a more useful observation. All complex
numbers can be written as z = x + yi. If we associate this with the point (x, y) in two-dimensional
space, then we can plot complex numbers (see Figure 1.3.2). In the next section we will investigate
graphing complex numbers further.
(2, 3)
•
(0, 3) (4, 3)
• •
(5, 0)
•x
•
(−1, −1)
Recall from calculus another form on coordinates in two dimensions, polar coordinates
(x, y) 7→ (r, θ ). Can we use the same idea to identify complex numbers with their associated
polar coordinates? Yes!
Definition 1.3.1 (Polar Coordinates of Complex Numbers) Any complex number z = x + iy can
be written in polar form using the same relations from two dimensional Cartesian coordinates
p
r = x 2 + y2
θ = tan−1 (y/x)
or
x = r cos(θ )
y = r sin(θ ).
Thus, z = x + iy = rcos(θ ) + i sin(θ ) = r [cos(θ ) + i sin(θ )]. NOTE: That all the quantities
involved are real (e.g., x, y, r, θ )!
16 Chapter 1. Fundamentals of Complex Numbers
(x, y)
•
r y
θ
x
x
We can actually simplify this expression further with the help of Euler’s Identity
Definition 1.3.2 (Euler’s Identity) The polar form of a complex number can be written as
This will be taken as a fact for now and will be shown explicitly in a few sections when we study
complex power series.
R Traditionally if asked for the polar form of a complex number z the expectation is that it is
written z = reiθ .
Key idea: For solving a lot of problems with complex numbers the main task is to identify
whether it would be easier to tackle the problem in Cartesian (x, y) or polar (r, θ ) coordinates.
You need to be very familiar with the standard right triangles, 45-45-90 and 30-60-90 in each
quadrant in order to effectively use the polar form of a complex number. Even though the unit
circle is familiar we must also be able to scale to any size right triangle of these two forms.
1.3 The Complex Plane 17
(0, 1)
√ √
− 12 , 23 1
,
2 2
3
√ √ √ √
− 22 , 2
2 π
2
2
, 2
2
2
2π π
√ 3 3 √
− 23 , 21 3π
90◦
π 3 1
2 ,2
4 4
120◦ 60◦
5π π
6 6
150◦ 30◦
(−1, 0) (1, 0)
π 180◦ 0◦ ◦
360 2π x
210◦ 330◦
7π 11π
6 6
√ 5π
240◦ 300◦ 7π
√
− 23 , − 12 270◦ 3 1
4 4 2 ,−2
4π 5π
√ √ 3 3 √ √
3π
2 2 2 2
− 2 ,− 2 2
2 , − 2
√ √
− 21 , − 23 1
2 , − 2
3
(0, −1)
Example 1.5 For each of the following find the polar form and plot the result in two-dimensions.
√
i) z = −1 + 3i
p √
Step 1: Find r = x2 + y2 = 1 + 3 = 2.
√
Step 2: Find θ = tan−1 ( 3/1). Recall that tangent
√ is opposite over adjacent. Thus, we need
a triangle where the opposite side has length 3 and the adjacent side is along -1. If x < 0 and
y > 0 we are in quadrant II with a 30-60-90 right triangle. Therefore θ = 2π
3 .
2π
Step 3: Write in polar form z = 2ei 3 .
√ y
(−1, 3)
•
r
θ
x
ii) z = 1 − i
p √ √
Step 1: Find r = x2 + y2 = 1 + 1 = 2.
Step 2: Find θ = tan−1 (−1/1). The tangent is opposite over adjacent. Thus, we need a tri-
angle where the opposite side is along -1 and the adjacent side is along 1. If x > 0 and y < 0 we are
in quadrant IV with a 45-45-90 right triangle. Therefore θ = 3π π
4 or − 4 . Note that it is important to
observe the sign of both x and y to be in the correct quadrant.
√ i 7π
Step 3: Write in polar form z = 2e 4 .
x
θ
r
•
(−1, 1)
iii) z = 3i
p √
Step 1: Find r = x2 + y2 = 0 + 9 = 3.
Step 2: Find θ = tan−1 (5/0). We are looking for an angle whose tangent is ∞. Recall that
tangent is sine over cosine. the tangent is infinite if cos(θ ) = 0 or θ = π/2 or θ = −π/2. Since
y > 0, then θ = π/2.
1.3 The Complex Plane 19
π
Step 3: Write in polar form z = 3ei 2 .
• (0, 3)
θ
x
Euler’s Identity eiθ = cos(θ ) + i sin(θ ) is a formula, which explains how to move around the
unit circle. Consider a point confined to the unit circle traveling x radians. The horizontal distance
traveled is cos(x) and the vertical distance traveled is sin(x). To take these two coordinates and
combine them into one number we make it complex! z = cos(x) + i sin(y). Thus, the right side of
Euler’s formula/identity describes motion on a circle.
The left-hand side of Euler’s Identity contains the exponential function e. In real number the
function ex arises in problems involving growth or decay at a fast rate. Here what do we mean
by imaginary growth (eiθ )?!? Imaginary growth is different than normal exponential growth. The
growth is in a different direction, instead of going forward we growth along the imaginary axis
(y-direction or 90◦ ). Instead of speeding up or slowing down a point begins to rotate (multiplying a
number by i does not change its magnitude it only rotates it).
Thinking Question In real numbers the exponential function keeps growing larger and larger,
so in the case of “imaginary growth" should we rotate faster and faster?
Since we are constrained to the unit circle instead of growing larger and larger, a point moves
further along the circle. For example if we compare eiθ and e2iθ . The magnitude does not change
(still 1), but we rotate twice as far (or travel twice as long if θ is thought of as time).
Interesting Case: Complex Growth What if the growth rate is complex ex+iy ?
The real part ex grows like normal while the imaginary part eiy rotates. Thus, one can expect
a spiral shape. This will be seen later when finding complex solutions to equations of motion!!
where the real part of z, Re{z} = x, and the imaginary part of z, Im{z}p= y. In addition, the
magnitude or length associated with the complex number z is r = |z| = x2 + y2 and the angle
θ = tan−1 (y/x).
√
Example 1.6 Write z = − 3 − 3i in polar form and plot it.
p √ √
Step 1: Find r = x2 + y2 = 3 + 9 = 2 3.
√ √
Step 2: Find θ = tan−1 (−3/ − 3) = tan−1 (− 3/ − 1). Recall that √ tangent is opposite over
adjacent. Thus, we need a triangle where the opposite side along − 3 and the adjacent side is
along -1. If x < 0 and y < 0 we are in quadrant III with a 30-60-90 right triangle. Therefore θ = 4π
3 .
√ 4π
Step 3: Write in polar form z = 2 3ei 3 .
θ
x
θre f
•
√
(− 3, −3)
4π
Note that due to periodicity the true answer for the angle is θ = + 2πn where n is an integer.
3
The first component, θ principle := 4π
3 , is known as the principle angle and must be between the
standard interval of 0 ≤ θ p < 2π. Another angle of importance is the reference angle, 0 ≤ θre f ≤ π2 ,
which gives the magnitudes of the sides of the 30-60-90 or 45-45-90 right triangle. Observe that the
reference angle has nothing to do with the sign of each side of the triangle, because it is independent
of the quadrant it is in.
Figure 1.7: Difference between principle angle θ p (black) and the reference angle θre f (red).
R When working with complex numbers make sure that the angle θ you find is in the same
quadrant as the complex number itself.
before when solving quadratic equations, because complex solutions to equations always come as
conjugate pairs. In other words, if z = 2 + 3i is a solution, then z = 2 − 3i must also be a solution.
Example 1.7 Find the complex conjugate of each of the following complex numbers:
i) z = 1 + i, then z̄ = 1 − i
v) z = 0, then z̄ = 0
It is easy to blindly remember to change the sign of the imaginary part, but let’s look at a pair
of complex conjugates plotted on the same coordinate plane to see if there is any relationship. Lets
look back at Example 3 i) and ii) .
(−2, 4) y
•
(1, 1)
•
•
(1, −1)
•
(−2, −4)
The complex conjugate of a number is just its reflection across the x-axis (real axis).
Thinking Question: A complex conjugate is just a reflection across the x-axis so the change
in (x, y) coordinates is simple y 7→ −y. How does a complex conjugate effect the polar form of a
complex number?
Answer: The magnitude of a complex number and its conjugate are identical so r remains the same.
However, θ 7→ −θ . What does this mean in terms of the principle angle and the reference angle?
The reference angle θre f remains unchanged, but the principle angle changes sign. So if θ = π4 ,
then θz̄ = − π4 or 7π
4 .
24 Chapter 1. Fundamentals of Complex Numbers
We can also directly see this from the polar form of a complex number
With real numbers we can perform various algebraic operations to combine them into something
new. These include, but are not limited to
Now we will consider the complex analogue of each of these as well as some physical applications
for complex numbers.
As we have seen before complex numbers can be written in two equivalent forms z = x + iy = reiθ .
The first form is referred to as standard form and will be useful for the basic operations.
Definition 1.5.1 Given two complex numbers z1 = x1 + iy1 and z2 = x2 + iy2 , their sum z1 + z2
is defined as
Just add the real parts and add the imaginary parts.
z1
z1 + z2 z1 + z2
z2
z2 + z1
1. The addition of complex numbers behaves exactly as vector addition in two-dimensions (recall
the analogy between R2 ∼= C).
Definition 1.5.2 Given two complex numbers z1 = x1 + iy1 and z2 = x2 + iy2 , their difference
z1 − z2 is defined as
z1 − z2
z1 − z2
z1
x
z2
z2 − z1
z2 − z1
2. Subtraction of real numbers is NOT commutative, a − b = b − a. The results are the same except
for the sign. Here we see also that the subtraction of complex numbers is NOT commutative. In
others words the order in which one subtracts does matter!
Multiplication of Complex Numbers
Definition 1.5.3 Given two complex numbers z1 = x1 + iy1 and z2 = x2 + iy2 , their product z1 z2
is defined as
Just FOIL as you would any product of binomials! Once the four terms are found just combine
the two real numbers into x and the two imaginary numbers into y
R The most common mistake made is that one forgets i2 = −1 so when multiplying the two
imaginary parts you receive a real number and a sign change.
v) (1 + i)(1 − i) = 1 − i + i − i2 = 2
z1
z1 z2
x
z2
1. What is special about multiplying two complex conjugates? Example 7 v) shows that this
always results in a real number
2. The multiplication of complex numbers behaves exactly as FOIL in the case of two binomials.
3. Multiplication of real numbers is commutative, ab = ba. Here we see also that the multi-
plication of complex numbers is commutative. In others words the order in which one multiplies is
not important.
In some cases multiplication may be easier to carry out in polar form (while polar form is
clearly not a good choice for addition/subtraction). To multiply two complex numbers in polar form
we simply multiply the magnitudes, r, and add the angles
Thus, visually multiplication amounts to rotating the first complex number z1 by angle θ2 and
extending its length by a factor of r2 .
Example 1.11 i) (1 − i)2 = (1 − i)(1 − i) = 1 − i − i − 1 = −2i
√ −i π
In Polar Form: (1 − i) = 2e 4
√ −i π √ −i π pi
(1 − i)2 = 2e 4 2e 4 = 2e−i 2 = −2i
28 Chapter 1. Fundamentals of Complex Numbers
x
z1
θ2
z1 z2
(1, −1)
(0, −2)
Step 1: Multiply the top and bottom by the complex conjugate of the denominator (re-
sulting in a real number in the denominator).
Step 2: Separate the real and imaginary parts to find x and y in the standard form.
1 5 2
CHECK: (2 − 3i)(− 13 + 13 i) = − 13 + 10 3 15 2
13 i + 13 i − 13 i = 1 + i
Unlike in multiplication, using the polar form is not a good choice unless the angle of both the
numerator and denominator are easy to find (e.g., 30 − 60 − 90 or 45 − 45 − 90 right triangle). To
divide two complex numbers in polar form we simply divide the magnitudes, r, and subtract the
angle in the denominator from the angle in the numerator
r1 eiθ1 r1
z1 /z2 = iθ
= ei(θ1 −θ2 ) . (1.10)
r2 e 2 r2
Thus, visually division amounts to rotating the first complex number z1 by angle −θ2 and reducing
its length by a factor of r2 .
1−i−i+i2 −2i
Example 1.13 i) 1−i 1−i 1−i
1+i = Method 1: 1+i 1−i = 1−i+i−i2 = 2 = −i
√ π
2e−i 4
= ei(− 4 − 4 ) = e−i 2 = cos( −π
π π π π
Method 2: √ iπ
2e 4 2 ) + i sin(− 2 ) = −i
1.5 Complex Algebra 29
(1, 1)
z2
θ1 z1 z2
x
θ2
z1 /z2
z1
(1, −1)
R Multiplication and Division amount to rotating complex numbers in one direction or another
and scaling them. Most times it is useful to avoid the polar form and carry out these operations
on the standard form. No matter which method is used the final answer should always be
reported in standard form, x + iy.
z1 + z2 = (x1 + x2 ) + i(y1 + y2 ) = (x1 +x2 )−i(y1 +y2 ) = (x1 −iy1 )+(x2 −iy2 ) = z̄1 + z̄2 . (1.11)
In addition, the conjugate of a difference, product, or quotient is equal to the difference, product,
or quotient of the conjugates (e.g., z1 − z2 = z̄1 − z̄2 , z1 z2 = z̄1 z̄2 , and z1 /z2 = z̄1 /z̄2 ).
3−4i−3i+4i2
ii) (1 + i)/(3 − 4i) = 1−i 1−i 3−4i
3+4i = 3+4i 3−4i = 9+16 = −1−7i
25 =
1
− 25 7
− 25 i
2
OR: 1+i 3+4i
3−4i 3+4i = 3+4i+3i+4i
9+16 = −1+7i −1 7 1 7
25 = 25 + 25 i = − 25 − 25 i.
Example 1.16 Show the conjugate of the quotient is the quotient of the conjugates.
Observe that if it works for a sum then it automatically works for a difference A − B = A + (−B).
If it works for a quotient, then it will work for a product A/B = A × (1/B).
30 Chapter 1. Fundamentals of Complex Numbers
R The absolute value of a product or quotient is the product or quotient of the absolute values.
2
Example 1.19 i) 1+i
1+i 1+i
1+i+i+i
2i
1−i = 1−i 1+i = 1+1 = 2 = |i| = 1
√ √
|1+i| 12 +12 √2
OR: |1−i| =√ = 2
= 1.
12 +(−1)2
√ √
|2−3i| 22 +(−3)2
√13 .
2−3i
ii) 5+6i = = √ =
|5+6i| 52 +62 61
|2+4i|
√
2 2
√ √
ii) 2+4i √2 +4 √20
1+i = = = = 10.
|1+i| 12 +12 2
For example, 2 + i 6= 2 − i. What does this say about complex equations? When solving a
complex equation we really need to solve two equations at once (for the real and imaginary parts).
Knowing that an equations is complex gives a relationship between each part.
Example 1.20 Find z = x + iy if z2 = 4i.
(x + iy)2 = 4i
FOIL x2 + 2ixy − y2 = 4i
Split into two equations Real: x2 − y2 = 0, Imaginary: 2xy = 4.
Solving the first equation gives x2 = y2 . Either x = −y or√x = y. In the first case (x = −y), the
second equation gives −2x2 = 4, which implies x = ± = −2 = ±2i, but we know x must be a
real number so this case cannot hold!
2
√
In the second √ (x = y), √
√ case √ equation gives 2x = 4 or x = ± 2. Thus, the two so-
the second
lutions are ( 2, 2) and (− 2, − 2).
1.5 Complex Algebra 31
Matching real and imaginary parts, this is always true if x = y. So there are infinitely many
solutions that lie on the line y = x in the complex plane.
Now for a harder example! If you can solve this you can handle most quadratic equations and
have demonstrated you follow all the necessary steps.
x+iy+2+3i z+2+3i
Example 1.22 x+iy−3 = i + 2. Let z = x + iy and rewrite the equation as z−3 = i + 2.
z + 2 + 3i = (i + 2)(z − 3)
z + 2 + 3i = zi + −3i + 2z − 6
Rearrange terms with z: z − (2 + i)z = −3i − 6 − (2 − 3i)
(−1 − i)z = −8 − 6i.
−8−6i −8−6i −1+i 8−8i+6i−6i2 14−2i
Thus, z = −1−i = −1−i −1+i = 1+1 = 2 = 7 − i.
In others words, find x and y such that x2 + y2 = 1. This is just the equation of a circle of ra-
dius 1.
y
x
32 Chapter 1. Fundamentals of Complex Numbers
ii) |z − 3| ≥ 4. This is the area outside the circle centered at (3,0) of radius 4 including the
circle boundary.
iii) |z − 3| < 4. This is the interior of the circle centered at (3,0) of radius 4.
θ x
i) Re{z} < 2
ii) Re{z} ≥ −1
iii) Im{z} ≥ 3.
given by
i + 3t
z = x + iy = .
t − 2i
Find the magnitudes of the velocity and the acceleration as a function of time.
Answer: First recall the definitions of position, velocity, and acceleration as well as their re-
lationships
Position: z = x + iy
dy
Velocity: dz dx
dt = dt + i dt
2
d2z d2x
Acceleration: dt 2
= dt 2
+ i ddt 2y
3(t−2i)−(i+3t) 3t−6i−i−3t −7i
First find the velocity using the Quotient Rule, dzdt = (t−2i)2 )
= (t−2i)2
= (t−2i) 2 . We need to
dz |−7i|
find the magnitude so consider dt = |t 2 −4it−4| = √ 2 72 2
= √ 7
t 4 −8t 2 +16+16t 2
= √t 4 +8t7 2 +16 =
(t −4) +(4t)
√ 7 7
= t 2 +4
.
(t 2 +4)2
d2z 14i
Now find the acceleration by taking one more derivative. dt 2
= (t−2i)3
. Last find its magnitude
2 s
d z 14i −14i 14
a = 2 = =p ,
dt (t − 2i)3 (t + 2i)3 (t − 6it − 12t + 8i)(t 3 + 6it 2 − 12t − 8i)
3 2
14 14
then a = √ = (t 2 +4)3/2
.
(t 2 +4)3
For a real series we can define a partial sum of the first n terms, Sn := ∑nk=1 f (k) (a)(x − a)k . We
say the series converges if limn→∞ Sn = S where S is the sum.
R In future courses, you may see convergence defined different. Rigorously, a series is said to
converge if the partial sums get closer and closer together, |Sm − Sn | → 0 as m, n → ∞.
Analogously, for complex numbers we say that the partial sum Sn = Xn + iYn consisting of a
sum in the real parts and a sum in the imaginary parts. The sum converges if both expressions
approach some limit!
Thus, Xn → ∞ and Yn → ∞. In other words, the real and imaginary parts of the series each converge
as a series of real numbers.
First, let’s review the definition of absolute convergence and convergence tests for series of real
numbers.
Definition 1.6.1 If the series of absolute values ∑∞n=1 |zn | < ∞, then the series is called absolutely
convergence.
There is also a special type of series, which converges known as a geometric series.
Definition 1.6.2 A geometric series has the form: ∑∞ i
i=1 ar . If |r| < 1 this series converges.
Useful formulas for the infinite sum and all partial sums are
n
1 − rn
∞
i a
∑ ar = a , ∑ ari = .
i=1 1−r i=1 1−r
Comparison Test
Consider two series a1 + a2 + a3 + ... and b1 + b2 + b3 + .... If |an | ≤ |bn | for all n and the series
∑ bn converges, then the series for an is absolutely convergent OR if |an | ≥ dn and the series for dn
diverges, then the series for an diverges.
1 1 1 1
Example 1.27 ∑∞
n=1 n! = 1 + 2 + 6 + .... Let bn = 2n , then |an | ≤ bn and ∑ bn < ∞ (geometric
series). Thus an converges!
Integral Test
R∞
If 0 < an+1 ≤ an for n > N, then ∑∞
n=1 an converges/diverges if
an dn converges/diverges.
0
∞
∞ 1 R∞ 1
Example 1.28 ∑n=1 . Using the Integral Test: dn = ln(n) = ln(∞) − 0 → ∞. So the
n 1 n
1
original series diverges!
Ratio Test
Take the ratio of two consecutive terms in the series: ρn = aan+1 and consider limn→∞ ρn . If:
n
i) ρ < 1 the series converges
ii) ρ > 1 the series diverges
iii) ρ = 1 there is not enough info to conclude if the series converges or diverges.
∞ 1 1 n! n! 1
Example 1.29 ∑n=1
n! , then ρn = (n+1)! 1 = (n+1)! = n+1 → 0. Thus, the original series
converges.
Root Test
p
Consider the nth root of the summand L := limn→∞ n |an |. If:
i) L < 1 the series is absolutely convergent
ii) L > 1 the series is divergent
iii) L = 1 there is not enough info to conclude if the series converges or diverges.
n
∞ 5n−3n3 5n−3n3 −3 3
Example 1.30 ∑n=0 3
7n +2
, then L = 3
7n +2
= 7 = 7 < 1. The series converges!
1.7 Complex Power Series and Disk of Convergence 35
Alternating Series
An alternating series is a series where the terms have the form an = (−1)n bn or an = (−1)n+1 bn .
An alternating series converges if the limit of the absolute value of the terms converges to zero and
the terms are decreasing: |an+1 | < |an | and limn→∞ an = 0.
Example 1.31 1 − 21 + 31 − 14 + 51 − 16 + ..., converges by the alternating series test.
Definition 1.6.3 If a series converges, but not absolutely, then it is said to be conditionally
convergent. This is a weaker form of convergence. In particular, the terms in the sum can be
rearranged to form any total. In contrast, for a series that is absolutely convergent, rearranging
the terms does not change the sum.
i n
ii) ∑∞ √
n=1 n .
(−1) n (−1) n
Consider the Real Part: ∑∞ n=1
√
2n
and Imaginary Part: ∑∞ √
n=0 2n+1 . Both series converge by
the alternating series test. Thus, the complex series converges!
iii) ∑∞ n
n=0 (z + 1) .
p
Using the Root Test: L := limn→∞ |z + 1| converges for |z + 1| < 1 or (x + 1)2 + y2 < 1 or
(x + 1)2 + y2 < 1. Thus, the series converges for z inside the circle centered at (−1, 0) of radius 1
not including the boundary.
or centered at point x = a
∞ ∞
f (n) (a)
f (x) = ∑ bn (x − a)n = ∑ n!
(x − a)n .
n=1 n=1
Definition 1.7.1 (Interval of Convergence) The values of x where the series converges.
n+1
Example 1.33 Given the power series ∑ xn . By the ratio test ρ := xxn = |x|. For convergence
Before defining a complex power series, let’s discuss some facts for real power series (review
from Calculus):
1. A power series can be differentiated or integrated term by term. The resulting series con-
verges to the derivative or integral of the original function within the same interval of convergence.
36 Chapter 1. Fundamentals of Complex Numbers
x n
Example 1.34 Consider the function f (x) = ex , which has power series ∑∞
n=0 n! .
nx n−1
x n−1
∞ x k
a) Differentiating term by term: ∑∞ ∞ x
n=1 n! = ∑n=1 (n−1)! →k:=n−1 ∑k=0 k! = e .
x n+1 ∞ x k
x x x
R
b) Integrating term by term: ∑∞n=0 (n+1)! →k:=n+1 ∑k=1 k! = e − 1. Note e = e +C.
xn+1
x
c) The Interval of Convergence (I.O.C.) can be found using the ratio test ρ := (n+1)!
xn = limn→∞ n+1 →
n!
0. Thus, the interval of convergence is all real numbers.
2. Two power series can be added, subtracted, multiplied. The result converges in the common
interval of convergence.
3. One series can be substituted into another if the substituted series values are in the inter-
val of convergence of the series it is being plugged into.
4. The power series of a function is unique! Only one power series of the form ∑n an xn con-
verges to a given function.
Definition 1.7.2 A complex power series has the form ∑n an zn where z = x + iy. The real
power series just a special case of the complex power series when y = 0.
2 3 n
Example 1.35 i) 1 + z + z2 + z6 + ... = ∑∞ z
n=0 n!
2 3 4
ii) 1 − i(z + 1) + (i[z+1])
2 + (i[z+1])
6 + (i[z+1])
24
(z−2+2i) n
iii) ∑∞
n=0 6n n3
.
Definition 1.7.3 The complex analogue of the radius of convergence is the disk of convergence
(in the 2D complex plane).
Example 1.36 Find the Disk of Convergence (D.O.C.) for each complex power series in the
previous example.
n+1
zn z z
i) For ∑∞ , use the ratio test. := lim (n+1)! n!
zn = limn→∞ n+1 → 0. Thus, the series
n=1 n! ρ n→∞
converges for all z in the complex plane. Therefore, the disk of convergence is the entire complex
plane, C.
(i[z+1])n (−1)n (i[z+1])n+1 (−1)n+1 n i(z+1)(−1)n
ii) For 1+ ∑∞ . By the ratio test = lim = lim →
n=1 n ρ n→∞ n+1 (i[z+1])n (−1)n n→∞ n+1
|z+1|
1 . Thus, ρ < 1 if |z + 1| < 1. Thus, the disk of convergence is the interior of the circle centered
at (−1, 0) with radius 1.
1.8 Elementary Functions of Complex Numbers 37
(−2, 0) (−1, 0)
• • x
(z−2+2i)n (z−2+2i)n+1 6n n3 (z−2+2i)n3
iii) ∑∞n=0 6n n3
. Use the ratio test, ρ = limn→∞ 6n+1 (n+1)3 (z−2+2i)n
= lim n→∞ 6(n+1)3
→
z−2+2i
. Thus, the series converges if ρ < 1 or |z − 2 + 2i| < 6. The disk of convergence is centered
6 √
at (2, −2) of radius 6.
z2 z4 (−1)n z2n
Example 1.37 iv) 1 − 3! + 5! + .... General Form: ∑∞
n=0 (2n+1)! . Then by the ratio test,
n+1 2(n+1)
2
ρ = limn→∞ (−1) (2n+1)!
z (−1)z
[2(n+1)+1]! (−1)n z2n = limn→∞ (2n+3)(2n+2) → 0. Thus, the disk of convergence
is the entire complex plane, C.
n+1
n+1 (z + i − 3)2(n+1) . Then by the ratio test, ρ = lim 2 (z+i−3)2(n+1)
v) ∑∞n=0 2 n→∞ 2n (z+i−3)2n
= limn→∞ |2(z +
1
i − 3)2 | = |2(z + i − 3)2 |. the disk of convergence is where |(z + i − 3)|2 < or the disk centered at
√ 2
(3, −1) of radius 1/ 2.
d n
ii) Note: = nzn (just like normal derivatives of real numbers!
dz [z ]
d z d z2 zn 2 n−1
dz [e ] = dz 1 + z + 2 + ... + n! + ... = 0 + 1 + z + z2 + ... + nzn! + ...
2 n−1
= 0 + 1 + z + z2 + ... + (n−1)!
z
+ ... = ez
x3 x5 x7
sin(x) = x − + − + ...
3! 5! 7!
x2 x4 x6
cos(x) = 1 − + − + ...
2! 4! 6!
Can we do something similar for complex trig functions? First, consider the complex Taylor series
for the exponential function
We have been using this formula since Section 3.2, but now we can see why it holds. We also have
verified
1
i) 3eiπ/3 ⇒ r = 3, θ = π/3. Recall from
polar coordinates x = r cos(θ ) = 3 cos(π/3) = 3
√ √ √ 2 = 3/2
3 3 3 3 3 3
and y = r sin(θ ) = 3 sin(π/3) = 3 2 = 2 . Thus, z = +
2 2 i.
ii) eiπ/2 ⇒ r = 1, θ = π/2. Recall from polar coordinates x = r cos(θ ) = cos(π/2) = 0 and
y = r sin(θ ) = sin(π/2) = 1. Thus, z = i.
iii) 2e−iπ/6 ⇒ r= 2, θ = −π/6. Recall from polar coordinates x = r cos(θ ) = 2 cos(−π/6) =
√
3
√
2 cos(π/6) = 2 2 = 3 and y = r sin(θ ) = 2 sin(−π/6) = −2 sin(π/6) = 2 − 21 = −1. Thus,
√
z = 3 − i.
iv) e2nπi ⇒ r = 1, θ = 2nπ. Recall from polar coordinates x = r cos(θ ) = 1 and y = r sin(θ ) = 0.
Thus, z = 1 for all n.
Recall that Euler’s Formula/Identity is especially useful for multiplying and dividing complex
numbers
z1 z2 = r1 eiθ1 r2 eiθ2 = r1 r2 ei(θ1 +θ2 )
r1 eiθ1 r1
z1 /z2 = iθ
= ei(θ1 −θ2 )
r2 e 2 r2
(1−i)2
Example 1.41 Evaluate 1+i .
h√ i2 √
Step 1: Write in Polar Form: z1 = (1 − i)2 = 2e−iπ/4 = 2e−iπ/2 and z2 = 1 + i = 2eiπ/4 .
We have clear definitions for powers and roots (fractional powers) of real numbers. Can we define
the analogous notions for complex numbers?
Given a complex number z, consider it raised to the nth power.
Definition 1.10.1 To raise a complex number to the nth power one needs to raise the modulus,
r, to the nth power and multiply the angle by n.
h in
zn = reiθ = rn einθ (1.15)
Theorem 1.10.1 (Demoivre’s Theorem) When r = 1, the nth power can be expressed int he
following way:
n
eiθ = (cos(θ ) + i sin(θ ))n = cos(nθ ) + i sin)nθ ). (1.16)
h√ i4 √
(1 + i)4 = 2eiπ/4 = ( 2)4 eiπ = 4 [cos(π) + i sin(π)] = 4[−1 + 0] = −4. (1.17)
Now we want to consider taking the nth root. Recall that taking the nth root of a real number
√
is equivalent to raising that number to the 1n power. Similarly, for a complex number, n z = z1/n .
Definition 1.10.2 To take the nth root of a complex number one needs to take the nth root of
the modulus, r, and divide the angle by n.
√ h i1/n √
n
z = z1/n = reiθ = r1/n eiθ /n = n r [cos(θ /n) + i sin(θ /n)] . (1.18)
Example 1.45 Find the cube roots of 64. In other words, find z so that z3 = 64. Let’s at-
tack this problem using the polar form of the complex number, z = 64. Thus, r = 64 and
θ = 0, 2π, 4π, ..., 2πn. Now, by the definition of the root: z1/3 = r1/3 eiθ /3 = r1/3 ei(2πn+θ )/3 ⇒
r = 4, θ = 0, 2π/3, 4π/3, 6π/3, .... Observe that 6π/3 =√2π = 0 (on √ the complex plane). Thus, the
three roots are: 4ei0 = 4, 4ei2π/3 , 4e4π/3 or z = 4, −2 + 2 3i, −2 − 2 3i.
√ √ √ √ √
As√a check:√(−2 + 2 3i)3 = (−2 + 2 3i)(4 − 8 3i − 12) = (−2 + 2 3i)(−8 − 8 3i) = (16 +
16 3i − 16 3i + 48) = 64.
1.10 Powers and Roots of Complex Numbers 41
y
√
(−2, 2 •3)
(4,
• x0)
•
√
(−2, −2 3)
Example 1.46 Find the 4th roots of -81. In other words, find z so that z4 = −81. Use the polar
form of the complex number, z = −81. Thus, r = 81 and θ = π, 3π, 5π, 7π, ..., π + 2πn.
Now, by the definition of the root: z1/4 = r1/4 eiθ /4 = r1/4 ei(2πn+θ )/4 ⇒ r = 3, θ = π/4, 3π/4, 5π/4, 7π/4, ....
Observe that 9π/4 = π/4 (on the complex plane).
√ √ √ √ √
3 2
Thus,
√
the√ four roots
√
are: 3eiπ/4 , 3ei3π/4 , 3ei5π/4 , 3ei7π/4 or z = 2 + i322, 322 − i322,−322 +
i322,−322 −i322.
√ √
As a check: ( 3 2 2 + i 3 2 2 )4 = ( 18 36 18 18 36 18
4 + 4 i − 4 )( 4 + 4 i − 4 ) = (9i)(9i) = −81.
y
√ √ √ √
(−3 2/2, 3 2/2) (3 2/2, 3 2/2)
• •
√ •√ √ • √
(−3 2/2, −3 2/2) (3 2/2, −3 2/2)
42 Chapter 1. Fundamentals of Complex Numbers
√
6
Example 1.47 Find and plot the values of −64.
6
Thus, we need to find r, θ such that reiθ = −64. Consider the polar form of −64, where
r = 64 and θ = π, 3π, 5π, 7π, 9π, 11π.
Now, by the definition of the root: z1/6 = r1/6 eiθ /6 = r1/6 ei(2πn+θ )/6 ⇒ r = 2, θ = π/6, π/2, 5π/6, 7π/6, 3π/2, 11π/6, ..
Observe that 13π/6 = π/6 (on the complex plane).
(0, 2)
•
√ √
(− 3, 1) ( 3, 1)
• •
√
(− 3, −1)• •
√
( 3, −1)
•
(0, −2)
eiθ − e−iθ
eiθ − e−iθ = 2i sin(θ ) ⇒ sin(θ ) = .
2i
Adding (8.54) to (8.114) gives:
eiθ + e−iθ
eiθ + e−iθ = 2 cos(θ ) ⇒ cos(θ ) = .
2
These expressions hold for real θ , but can be extended to all complex numbers, z, by replacing
θ 7→ z.
Definition 1.11.1 (Complex Trigonometric Functions)
sin(z) cos(z) 1 1
tan(z) = , cot(z) = , csc(z) = , sec(z) = . (1.22)
cos(z) sin(z) sin(z) cos(z)
R One interesting difference from real numbers is the range for sine and cos. For real x,
| sin(z), cos(z)| ≤ 1. This bound does not hold for the complex forms of sine and cosine as
seen by the previous example.
We can recover some of the same calculus trig identities for the complex versions.
Example 1.50 Does sin2 (z) + cos2 (z) = 1?
2
eiz −e−iz e2iz −2+e−2iz
Check: sin2 (z) = 2i = −4 .
2
eiz +e−iz e2iz +2+e−2iz
Check: cos2 (z) = 2i = 4 .
Example 1.51 Show the double angle formula: sin(2z) = 2 cos(z) sin(z).
What about the derivatives of the sine and cosine? Are they the same or very different?
h i
d eiz −e−iz iz −iz iz −iz
Example 1.52 i)
d
dz sin(z) = dz 2i = ie +ie2i = e +e2 = cos(z). Same!
h i h iz −iz i
d d eiz +e−iz ieiz −ie−iz e −e
ii) dz cos(z) = dz 2 = 2 = − 2i = − sin(z). Same!
44 Chapter 1. Fundamentals of Complex Numbers
ez − e−z ez + e−z
sinh(z) = cosh(z) = . (1.23)
2 2
Similarly,
sinh(z) cosh(z) 1 1
tanh(z) = , coth(z) = , sech(z) = , csch(z) = . (1.24)
cosh(z) sinh(z) cosh(z) sinh(z)
Thus, observe that sin(iy) = i sinh(y) and cos(iy) = cosh(y). Now consider some trig identities
with hyperbolic trig functions.
Example 1.53 Show: cosh2 (z) − sinh2 (z) = 1
h i2
ez +e−z e2z +2+e−2z
Using the definition, cosh2 (z) = 2 = 4
h i2
ez −e−z e2z −2+e−2z
Also, using the definition: sinh2 (z) = 2 = 4 . So, cosh2 (z) − sinh2 (z) = 4
4 = 1.
R Observe that there is no sign change when taking the derivative of the hyperbolic cosine. This
d
is in contrast to normal trig functions where dz cos(z) = − sin(z).
Exercise 1.1 Why are complex roots of quadratic equations always found in pairs?
Hint: Look at the Quadratic Formula, which is valid for any quadratic equation.
II
Part Two: Linear Algebra
Linear Algebra basically refers to linear relationships between objects. Can we think of examples
of linear functions we have seen in the past?
Definition 2.0.2 A function f (x) is linear if:
1. f (x + y) = f (x) + f (y).
Linear algebra takes this idea to the next level of abstraction by introducing the idea of a linear
operation. The idea is to take a system of linear equations and solve them simultaneously using
object called matrices. This section will start by introducing the relationship between matrices and
systems of linear equations. After the basic definitions are known we will begin to explore how to
work with these objects to solve real problems.
a1 x1 + a2 x2 + ... + an xn = b,
where a1 , ..., an , b are constant real numbers and x1 , ..., xn are the unknown variables.
i) 4x1 − 5x2 + 2 = x1
Sometime it is easier to see if an equation meets any of these easy cases for being nonlinear to
rule out linearity:
Definition 2.1.3 (Solution of a Linear System) A list (s1 , s2 , ..., sn ) of numbers that makes
each equation in the system true when the values s1 , s2 , ..., sn are substituted for x1 , x2 , ..., xn
respectively.
Definition 2.1.4 (Equivalent Systems) Two linear systems with the same solution set.
Fact: If the augmented matrices of two linear systems are row equivalent, then the
two systems have the same solution set.
Definition 2.1.6 (Size of a Matrix) We say a matrix with m rows and n columns is an m × n
matrix. Thus, a 2 × 3 matrix has two rows and three columns. In fact the Matrix A is composed
of elements (numbers) ai j where i corresponds to the row and j the column.
Example 2.3 Use the three elementary row operations to solve the following linear system:
x1 − 2x2 + x3 = 0
2x2 − 8x3 = 8
−4x1 + 5x2 + 9x3 = −9,
Solution: (29,16,3)
Final Step: Check by plugging the solution back into the original system.
2. If a solution exists, is it unique? (Is there one and only one solution)?
These questions are answered during the course of elementary row operations.
If the augmented matrix ever has a row with all zeros except the last element is nonzero, [00...0b],
then the system is inconsistent and there is no solution!
More on uniqueness in the next section (hint: it will have to do with the concept of pivot variables).
Definition 2.2.2 (Reduced Echelon Form). A matrix is in reduced echelon form if in addition to
1.-3.:
Example 2.4 i) Row reduce the following matrix to echelon form and locate the pivot columns
Row reduce to see that the pivot columns are 1, 2, and 4. There can be no more than 1 pivot in any
row.
The final step in solving any linear system is writing all the basic variables in terms of any free
variables.
Example 2.5
x1 = −6x2 − 3x4
x2 is free
1 6 0 3 0 0
0 0 1 −8 5 ⇒ x3 = 5 + 8x4
0 0 0 0 1 7
x4 is free
x5 = 7.
2.3 Determinants and Cramer’s Rule 51
Definition 2.2.4 The general solution of a system of linear equations provides a parametric
description of the solution set.
Thinking Question: The above example has infinitely many solutions. Why is it true?
Definition 2.2.5 The Transpose of a matrix denoted AT is the matrix formed when the rows
and columns of A are switched. (AT )i j = A ji , and thus the transpose of an m × n matrix is an
n × m matrix.
1 2 3
Example 2.6 Given a matrix A = , find its transpose.
4 5 6
1 4
AT = 2 5 .
3 6
Definition 2.2.6 (Rank of a Matrix) The number of nonzero rows remaining when a matrix has
been row reduced is the rank of the matrix.
If we know the rank of a matrix we know how many solutions to expect based on the original
size of the matrix, M is m × n and A is the row-reduced augmented matrix. Consider the general
problem of solving m equations in n unknowns:
1. If rank(M) < rank(A), the equations are inconsistent .
2. If rank(M) = rank(A) = n (the number of unknowns), there is exactly one solution.
3. If rank(M) = rank(A) = R < n, then there are R basic variables and n − R free variables resulting
in infinitely many solutions.
Note that the determinant of a 1 × 1 matrix, A = a is a trivial extension of this idea |A| = a.
52 Chapter 2. Fundamentals of Linear Algebra
1 2
Example 2.7 i) Find the determinant of A = .
3 4
1 2
det(A) = = 1(4) − 2(3) = 4 − 6 = −2.
3 4
1 2
ii) Find the determinant of A = .
2 4
1 2
det(A) = = 1(4) − 2(2) = 4 − 4 = 0.
2 4
In order to introduce a formula for the determinant of an arbitrary n × n matrix we first must
introduce some notation. Given a matrix A we can define a sub-matrix Ai j where the ith row and
jth column have been deleted.
Example 2.8
1 2 3 4
5 6 7 8 1 2 4
A=
9 10 11 12 ,
A23 = 9 10 12 .
13 14 16
13 14 15 16
n
det(A) = a11 det(A1 1) − a12 det(A12 ) + ... + (−1)1+n a1n det(A1n ) = ∑ (−1)1+ j a1 j det(A1 j ).
j=1
(2.3)
Thus, for an n × n matrix we keep applying cofactor expansion until all the remaining determi-
nants are 2 × 2.
1 2 0
Example 2.9 i) Compute the determinant of A = 3 −1 2
2 0 1
Solution: 1
1 0 0
ii) Compute the determinant of A = 0 2 0
0 0 3
Solution: 6
R Cofactor expansion can actually be done about any row or column not just the first one
(
∑nj=1 (−1)i+ j ai j det(Ai j ) Expand about row i
|A| = det(A) = n i+ j a det(A )
(2.4)
∑i=1 (−1) ij ij Expand about column j.
1 2 0
Example 2.10 i) Compute the determinant of A = 3 −1 2 using cofactor expansion
2 0 1
about the third column
2.3 Determinants and Cramer’s Rule 53
Solution: 1
1 2 3 4
0 2 1 5
ii) Compute the determinant of A =
0
0 2 1
0 0 3 5
Solution: 14
Definition 2.3.3 An n × n matrix A is said to be upper triangular if all the elements below the
main diagonal, ai j for i < j, are zero. An n × n matrix A is said to be lower triangular if all the
elements above the main diagonal, ai j for i > j, are zero. Finally, a matrix is said to be diagonal
if the only nonzero elements are in positions (i, i) for i = 1, ..., n.
FACT: If a matrix A is one of the three cases of triangular matrices (e.g., upper, lower, diagonal),
then the determinant is just the product of the diagonal elements.
1 2 0
Example 2.11 i) Compute the determinant of A = 0 −1 2
0 0 1
Solution: -1
2 3 4 5
0 1 2 3
ii) Compute the determinant of A =
0 0 −3 5
0 0 0 4
Solution: -24
Facts:
1. If each element of one row or one column of a determinant is multiplied by a number k, the value
of the determinant is multiplied by k.
3. If two rows or two columns of a determinant are interchanged, the value of the determi-
nant changes sign.
2 9 7 11
Solution: -10.
2 4 6
ii) Find the determinant of A = 5 6 7 .
7 6 10
Solution: -40.
2 3 0 1
4 7 0 3
iii) Find the determinant of A = .
7 9 −2 4
1 2 0 4
Solution: -12.
Example 2.13 (Application) Find the equation of a plane through (0, 0, 0), (1, 0, 1), (1, 2, 0).
Recall the equation of a plane has the form ax + by + cz + d = 0. Treat a, b, c, d as the unknowns.
We can setup the following determinant problems to find the equation of the plane
x y z 1
0 0 0 1
= 0.
(2.5)
1 0 1 1
1 2 0 1
Using cofactor expansion about the first row and simplifying we find −2x + y + 2z = 0 is the
equation for the plane.
Theorem 2.3.1 (Cramer’s Rule) Given the following linear system with n unknowns, x1 , ..., xn
and coefficients ai j
Also, define D := det(A) is the determinant of the coefficient matrix consisting of the ai j and
D j = det(A j ) where A j is the matrix where the jth column is replaced by the righthand side
b1 , ..., bn . Using these quantities we can find the solution:
D1 Dj Dn
x1 = , ..., x j = , ..., xn = . (2.6)
D D D
Observe that if the determinant D = 0 there is no solution.
2.4 Vectors 55
Example 2.14 Use Cramer’s Rule to solve the following linear systems: i)
x + 2y = 1
−x + 3y = 4
Solution: x = 1, y = −1.
i)
x+y+z = 3
3y − z = −2
2x − z = 0
Solution: x = 1, y = 0, z = 2.
2.4 Vectors
This section should be a review from calculus or a brief introduction to vectors if you are unfamiliar.
In terms of matrices, a vector is a matrix with only one column.
Definition 2.4.1 An n-dimensional vector has the form:
u1
u2
u= .
..
.
un
A vector describes physical quantities such as velocity which require a magnitude and a
direction.
Definition 2.4.2 The magnitude or norm of a vector is denoted by
q
|u| = kuk = u21 + ... + u2n .
Definition 2.4.3 (Unit Vector) There is a special kind of vector which will be useful in the
coming lectures that has length 1. Any vector with this property is called a unit vector. If a
vector does not have unit length it can easy be scaled to have length 1 by dividing each element
of the vector v by its norm, |v|, v̂ = v/|v|.
In 2D, we have two basis vector from which all other vectors can be constructed,
î = [1, 0], ĵ = [0, 1]. In 3D, we have three basis vectors, î = [1, 0, 0], ĵ = [0, 1, 0], k̂ = [0, 0, 1].
This idea can be extended to any dimension n, resulting in n basis vectors êi having a zero in
every component except for the ith component which is 1.
Definition 2.4.4 (Zero Vector) There is another special kind of vector which has magnitude
zero. The zero vector 0 = [0, 0, ..., 0].
1
Example 2.15 Let u = . Express u, 2u, and − 32 u on a graph.
2
u · v = u1 v1 + u2 v2 + ... + un vn .
Example 2.16 i) Let u = [1, 2, 3] and v = [−1, 0, 1]. Then u · v = 1(−1) + 2(0) + 3(1) = 2.
ii) Let u = [1, 4] and v = [−1, −2]. Then u · v = 1(−1) + 4(−2) = −9.
The scalar product is a very useful quantity we can give information about the angle between
the two vectors involved and the magnitude. This will be crucial for application that require one to
determine when vectors are parallel or perpendicular.
Theorem 2.4.1 Given two vectors of equal length u, v, then the scalar product can also be
expressed as
where θ is the angle between the two vectors. In particular we see that if the two vectors are
parallel (e.g., θ = 0), then the scalar product is just the product of the magnitudes (and positive!).
If the two vectors are perpendicular (e.g., θ = π/2), then the scalar product is zero.
Notice that in the previous example all the unit basis vectors in any dimension are perpendicular.
R If two vectors are parallel, then every component of one of the vectors is proportional to the
same component in the other vector (e.g., u1 /v1 = u2 /v2 = u3 /v3 ). In other words, they are
scalar multiples of each other. For example, u = [1, 1] and v = [2, 2].
Example 2.17 i) Take the scalar product of a vector with itself, v · v = |v|2 cos(0) = |v|2 . In
√
particular, we find an alternate definition for the norm of a vector: |v| = v · v.
ii) Find the angle between u = [1, 0] and v = [1, 1]. Using the alternate definition
√ of the scalar
product u · v√= |u||v| cos(θ ). Plugging in the appropriate values we find 1 = 2 cos(θ ). Thus,
cos(θ ) = 1/ 2 and therefore θ = π/4.
2.4 Vectors 57
In addition to the scalar product we can define another form of product that results in a vector.
Definition 2.4.6 (Cross Product) To find a vector which is perpendicular to two given three
dimensional vectors, denoted w = u × v.
î ĵ k̂
u × v = ux uy uz = î(uy vz − uz by ) + ĵ(uz vx − ux vz ) + k̂(ux vy − uy vx ). (2.8)
vx vy vz
Similar to the scalar product there is an alternate way to find the magnitude of the cross product
|u × v| = |u||v| sin(θ ) where θ is the angle between u and v.
The resulting vector w is perpendicular to the plane containing u and v. Its direction
is determined by the “righthand rule".
There are a few special cases of the cross product we should highlight before moving on:
1. If u × v = 0, the u and v are parallel or anti-parallel (opposite directions).
2. u × u = |u|2 sin(θ ) = 0, since θ = 0.
3. u × v = −v × u.
4. u × (v + w) = u × v + u × w.
2.4.3 Orthogonality
Definition 2.4.7 (Orthogonal) If two vectors are perpendicular we say they are orthogonal.
Orthogonal vectors are characterized by vectors whose scalar product is zero. If, in addition, the
vectors have unit length then they are called orthonormal.
Returning to Matrices
Not all linear systems Ax = b have solutions. For example
1 2 x1 3
= . (2.10)
2 4 x2 2
1
The solution to this system are multiples of and the righthand side is not a multiple. Thus,
2
many times when we solve linear systems in physical applications we have to find the closest
solution to the real thing, x̂. This is defined to be the point whose distance from the solutions is
minimized, kAx̂ − bk.
In particular, the orthogonal projection of the righthand side onto the solution will be the best
approximation.
Definition 2.4.9 (Orthogonal Projection) The projection of vector u onto v is
(u · v)
projv u = v. (2.11)
v·v
Using the orthogonal projection, the closest right hand side which has a solution is [1.4, 2.8]
and the x̂ which produces this is x̂ = [1.4, 0].
In two dimension another common problem is finding the line from a point (x0 , y0 ) in the
direction of a given vector v = [a, b]. This general line has the form
x − x0 = î(x − x0 ) + ĵ(y − y0 ).
If the line must be parallel to the vector v, then the components of the line must be proportional to
the components of v (Recall from 3.3 if vectors are parallel their components are proportional).
x − x0 y − y0 y − y0 b b
= ⇒ = ⇒ y = (x − x0 ) + y0 . (2.12)
a b x − x0 a a
This is exactly the familiar slope intercept form of a line. Another way to write this is in parametric
form where x − x0 is a scalar multiple of v
x − x0 = vt ⇒ x = x0 + vt. (2.13)
This form has a physical meaning: x0 is the starting point of a particle and x is the location of the
particle at time t if it moves with velocity v.
We can preform and analogous procedure in three dimensions. Find the line that passes through
x = (x0 , y0 , z0 ) in the direction of v = (a, b, c). Using the first approach of parallel vectors we
known the components are proportional:
x − x0 y − y0 z − z0
= = (if a, b, c 6= 0). (2.14)
a b c
2.5 Lines, Planes, and Geometric Applications 59
For example, if c = 0 then z = z0 . Using the second approach we can find the parametric form:
x = x0 + at
x = x0 + vt = y = y0 + bt . (2.15)
z = z0 + ct
Example 2.21 Given the point (1, 0, 1) find the equation for the line through this point and
parallel to (1, 2, 3).
x = 1 + t
x = x0 + vt = y = 2t . (2.16)
z = 1 + 3t
It possible to ask a similar question, given a point find the line through this point , but perpen-
dicular to a vector v = (a, b). Recall, that two line are perpendicular (orthogonal) if their scalar
product is zero
a
(x − x0 ) · v = 0 ⇒ a(x − x0 ) + b(y − y0 ) = 0 ⇒ y = − (x − x0 ) + y0 . (2.17)
b
Example 2.22 Given the point (1, 1) find the equation for the line through this point and
orthogonal to (1, 2).
1
y = − (x − 1) + 1. (2.18)
2
In three dimensions, this can be used to find the equation of a plane (x − x0 ) · v = a(x − x0 ) +
b(y − y0 ) + c(z − z0 ) = 0 or after rearranging ax + by + cz = d = ax0 + by0 + cz0 .
Example 2.23 Find the equation of the plane through u = (1, 0, 0), v = (1, 1, 1), and w = (0, 1, 1).
First we need to find a normal vector! To do this we find the vector from u to v, v − u = (0, 1, 1) and
the vector from u to w, w − u = (−1, 1, 1). Now that we have two vectors in the plane containing
u, v, w we can compute the normal to this plane using the cross product.
î ĵ k̂
N = (v − u) × (w − u) = 0 1 1 = î(1 − 1) + ĵ(−1 − 0) + k̂(0 + 1) = (0, −1, 1). (2.19)
−1 1 1
−1(y − 1) + (z − 1) = 0 ⇒ −y + z = 0. (2.21)
Example 2.24 Find the equation of the line through u = (−1, 1, 0), and orthogonal to the plane
in the previous example.
60 Chapter 2. Fundamentals of Linear Algebra
Since N = (0, −1, 1) is perpendicular to the plane, then it must be parallel to the vector we
want. Thus, returning to the previous set of examples we need to find the equation for the line
through u and parallel to N.
x = −1
x = u + Nt = y = 1 − t . (2.22)
z=t
Example 2.25 Find the closest distance from a point P = (1, 2, 3) to the plane defined by
x + 2y + 2z − 1 = 0.
What we need to solve this problem is the normal vector n = (1, 2, 2) and a point on the plane (e.g.,
Q = (1, 0, 0). We now construct the vector from Q to P, PQ = P − Q = (0, 2, 3). The distance is
then
n
dist = PQ · .
(2.23)
|n|
√ √ n
Now we find |n| = 12 + 22 + 22 = 9 = 3. Then |n| = (1/3, 2/3, 2/3) and
n
dist = PQ · = |0(1/3) + (2)(2/3) + (3)2/3| = |4/3 + 6/3| = |10/3| = 10/3.
|n|
Or there is an alternative method using the cross product instead of the scalar product. The distance
from a point to a plane will be the magnitude of the vector from the point P to the nearest spot on
the plane denoted R. Thus,
v
|PR| = |PQ| sin(θ ) = PQ × ,
(2.24)
|v|
where θ is the angle between PQ and RQ and v = RQ. To find R we must use the previous example
to find the line through P, but orthogonal to the plane
x = 1 + t
x = P + nt = y = 2 + 2t . (2.25)
z = 3 + 2t
Now plug the expressions for x, y, z into the equation of the plane and solve for t
Substitution of this value of t into (6.202) gives R = (−1/9, −2/9, 7/9), the point on the plane
that is also on the line through P. Now RQ = R − Q = (−10/9, −2/9, 7/9). To complete the
computation we need to find
10
√
|PQ × RQ| |(20/9, −30/9, 20/9)| 9 17 10
|PQ| sin(θ ) = = = 1√ = .
|RQ| |(−10/9, −2/9.7/9)| 3 17
3
2.5 Lines, Planes, and Geometric Applications 61
Example 2.26 Find the distance from the point P = (1, 2, 2) to the line joining Q = (1, 0, 0) and
R = (−1, 1, 0).
Observe here that R is not necessarily the closest point to P so we will p use the formula from√
the last part of (8.111). First, define v = R − Q = (−2, 1, 0). Then |v| = (−2) 2 + 12 + 02 = 5
√ √
and v/|v| = (−2/ 5, 1/ 5, 0). Also, PQ = P − Q = (0, 2, 2). Then from (8.111)
√ √
v 1
dist = PQ × = |(0, 2, 2) × (−2/ 5, 1/ 5, 0)| = √ |(0, 2, 2) × (−2, 1, 0)|
(2.26)
|v| 5
p √ √
1 (−2)2 + (−4)2 + 42 36 6 6 5
= √ |(−2, −4, 4)| = √ = √ =√ = . (2.27)
5 5 5 5 5
Example 2.27 Find the distance between the lines x1 = −î + 2ĵ + (î − k̂)t and x2 = ĵ − 2k̂ + (ĵ −
î)t.
To use (2.23), we need to identify P, Q and n. First, P and Q are just x0,1 and x0,2 respectively.
Thus, P = (−1, 2, 0) and Q = (0, 1, −2) and PQ = P − Q = (1, −1, −2). To find the normal vector
n we use the only tool we have for finding a vector orthogonal to another ... the cross product
î ĵ k̂
√
n = v1 × v2 = 1 0 −1 = −î + ĵ + k̂ = (−1, 1, 1), |n| = 3. (2.29)
−1 1 0
√ √ √ √ √ √ √
n 4
dist = PQ · = (1, −1, −2) · (−1/ 3, 1/ 3, 1/ 3) = |−1/ 3−1/ 3−2/ 3| = |4/ 3| = √ .
|n| 3
(2.30)
Example 2.28 i) Find the direction of the line of intersection of the two planes −x + 2y + z = 3
and x + y − 3z = 1.
Since the intersection of the two planes must lie in both planes (by definition), then the line
we are looking for must be orthogonal/perpendicular to the normal vector for each plane
ii) Find the cosine of the angle between the two planes.
This is equivalent to finding the cosine of the angle between the normal vectors. Using the
definition of the scalar product
n1 · n2 = |n1 ||n2 | cos(θ )
√ √
(−1, 2, 1) · (1, 1, −3) = 6 11 cos(θ )
−2
√ = cos(θ ).
66
Can a 2 × 3 matrix equal a 3 × 2 matrix? No! the dimensions must be the same!
Recall Section 3.3, and consider how the determinant is effected by scalar multiplication.
1 2
Example 2.30 Let A = , which has determinant det(A) = 1(4) − 2(3) = 4 − 6 = −2.
3 4
Let c = 2 and find the determinant of cA.
2 4
Solution: First, compute cA = , then det(cA) = 2(8) − 4(6) = 16 − 24 = −8. It turns out
6 8
in general det(cA) = cn det(A) where n is the size of the square matrix, A is n × n.
Also, observe that 2A = A + A. In order for addition and subtraction to make sense the
dimensions of the matrices must be the same.
The (i, j)th entry of the resulting matrix C is the scalar product of the ith row of A with the jth
column of B.
1 0 0 −1
Example 2.32 Given two matrices A = and B = , then the product
2 3 2 1
1(0) + 0(2) 1(−1) + 0(1) 0 −1
AB = = . (2.33)
2(0) + 3(2) 2(−1) + 3(1) 6 1
R Key Observation: In order for matrix multiplication to work, the number of columns of
matrix A must be equal to the number of rows in matrix B (for the scalar products to be
well-defined). Thus, if A is m × n, then B must be n × d for multiplication to work! In addition,
the resulting matrix will have dimension m × d.
So the inner dimensions of AB must be equal (e.g., n) and the outer dimensions give the size
of the resulting matrix (m × d).
Step 1: Check that the dimensions are valid for matrix multiplication.
Matrix A is 3 × 2 and matrix B is 2 × 2. The inner dimensions agree (e.g., 2) so we can mul-
tiply and the resulting matrix should be 3 × 2.
64 Chapter 2. Fundamentals of Linear Algebra
Thinking Question: What if we wanted to multiply BA? No! We cannot because the inner
dimensions do not agree in this case (e.g., 3 6= 2).
Ax = 0.
Example 2.34 Solve the following linear system with row reduction
x1 + 10x2 = 0
2x1 + 20x2 = 0
A homogeneous equation always has the zero or trivial solution x = [0, 0]. A non-zero solution is
called a non-trivial solution.
R A homogeneous equation Ax = 0 has nontrivial solutions if and only if the system of equations
has at least one free variable.
Example 2.35 Determine if the following homogeneous system has nontrivial solutions and then
We can also use the determinant in an alternate method for determining the existence of
nontrivial solutions.
Theorem 2.6.1 A system of n homogeneous linear equations in n unknowns has a nontrivial
solution if and only if the determinant of the coefficient matrix, det(A) = 0.
We see from the first example (which is 2 × 2) that det(A) = 1(20) − 2(10) = 0 and it had
non-trivial solutions.
Example 2.36 For what values of λ do we have non-trivial solutions for the following linear
system
(
(1 − λ )x − 3y = 0
3x + (1 − λ )y = 0
1−λ −3
To solve this problem consider the coefficient matrix A = and compute its
31 − λ
determinant
0 = det(A) = (1 − λ )(1 − λ ) − 3(3) = λ 2 − 2λ − 8 = (λ + 2)(λ − 4).
So the system has non-trivial solutions when λ = −2, 4. We will see problems like this again in
future sections when talking about eigenvalues, eigenvectors, and diagonalization of matrices!
66 Chapter 2. Fundamentals of Linear Algebra
Now that we understand how to solve homogeneous linear system what about non-homogeneous
or inhomogeneous matrix equations?
Example 2.37 Determine the solution set of
So the solution set of the inhomogeneous equation is the homogeneous solution xc = x2 [−2, 1, 0]
added to a particular solution x p = [6, 0, 2]. If we change the righthand side in the original problem
the only thing that will change is the particular solution x p .
Summary: The solution to a matrix equation Ax = b is the sum of the homogeneous solution
xc (to Ax = 0) and a particular solution x p . One can think of the solution to the inhomogeneous
equation as a translation of the solution set to the homogeneous equation by x p .
Theorem 2.6.2 Suppose the equation Ax = b is consistent for some given b, and let p be a
solution. Then the solution set of Ax = b is the set of all vectors of the form x = p + xc where xc
is a solution to the homogeneous equation Ax = 0.
This is just one equation in three unknowns so there is no row reduction to be done. In both cases
we can solve for x1 in terms of the free variables x2 , x3 . For the first equation
2 2
x = x2 1 + x3 0 ,
0 1
and for the first equation
3 2 2
x = 0 + x2 1 + x3 0 ,
0 0 1
So the inhomogeneous equation has a solution set composed of the homogeneous solution added to
a particular solution x p = [3, 0, 0]. Solving another inhomogeneous system
we find
2 2 2
x = 0 + x2 1 + x3 0 ,
0 0 1
which has the same homogeneous part, but the particular solution is now x p = [2, 0, 0].
This formula works great for 2 × 2 matrices, but as soon as the dimension becomes n × n where
n ≥ 3 the corresponding formula becomes unmanageable. Thus, we need to come up with a general
method for computing the inverse of a matrix.
Case II: n × n Given a matrix A we can setup the augmented matrix
In |A−1 .
[A|In ] Row reduce A to I
As we apply the row operations to In the righthand side will transform into the inverse.
68 Chapter 2. Fundamentals of Linear Algebra
−7 3
Example 2.40 Let A = and check that we get the same answer as the formula.
5 −2
Solution: In class!
Solution: In class!
This is a common example of a linear transformation. More on the definition and use of linear
transformations soon!
a1nk
k
a11 ···
Ak = AA...A 6= ... .. . (2.39)
.
akn1 · · · aknn
We cannot just raise each element to the kth power, the matrix multiplication must be performed.
1 0
Example 2.43 Let A = . Find A2 .
−1 2
12 02
2 1 0 1 0 1 0
A = = 6= (2.40)
−1 2 −1 2 −3 4 (−1) 22
2
2.7 Linear Combinations, Functions, and Operators 69
What about an arbitrary function of a matrix, f (A). To get an idea of how these work we can
expand the function in a Taylor series.
k2 A2
ekA = 1 + kA + + ... (2.41)
2!
Observe that both sides of this equation are matrices. So the exponential function of a matrix has a
meaning.
1. (A + B)2 = A2 + AB + BA + B2 . The middle terms may not be the same since matrix mul-
tiplications is not commutative! (In general AB 6= BA).
2. eA+B 6= eA eB .
au + bv.
R Any position vector r = (x, y, z) = xî + yĵ + zk̂ is a linear combination of the three unit basis
vectors î, ĵ, k̂.
Example 2.45 Determine if w = [−4, 1] is a linear combination of u = [2, 1] and v = [−2, 2].
Using back substitution we find that b = 1 and then 2a − 2b = −4 → a = −1. Therefore, [−4, 1] =
−u + v.
Definition 2.7.2 (Span) Given a set of vectors {v1 , · · · , v p } in Rn , then the span denoted,
span{v1 , · · · , v p } is the set of all linear combinations of the vectors or equivalently it is all
vectors that can be written as
u = a1 v1 + · · · + a p v p .
Solution: The span is any scalar multiple of this vector, u = c[1, 2]. Visually this is a line in
two dimensions through the point (1, 2) with slope m = y/x = 2/1 = 2.
The span is all vectors of the form av1 + bv2 . In two-dimensions this is the entire plane. Two
vectors will always span the two-dimensional plane if they are not scalar multiples of each other,
v1 = cv2 . If this is the case, then we return to the i) where we have only a line.
i) f (v1 +v2 ) = (x1 +x2 )+2(y1 +y2 )+3(z1 +z2 ) = x1 +2y1 +3z1 +x2 +2y2 +3z2 = f (v1 )+ f (v2 ).
b. Is f (v) = v · v = x2 + y2 + z2 linear?
i) f (v1 + v2 ) = (x1 + x2 )2 + (y1 + y2 )2 + (z1 + z2 )3 = x12 + y21 + z21 + x22 + y22 + z22 + 2(x1 x2 + y1 y2 +
z1 z2 ) = f (v1 ) + f (v2 ) + 2(x1 x2 + y1 y2 + z1 z2 ) So no it is not linear.
b. Is F(x) = 3x linear?
Example
a rotationby θ = π/2 in two dimensions.
2.49 Consider Recall
the
rotation
matrix
cos θ − sin θ 0 −1 0 −1 x −y
R= = . Is F(x) = Rπ/2 x = = linear?
sin θ cos θ 1 0 1 0 y x
Check the properties:
Example 2.50 Important for Math Methods II, is differentiation d/dx a linear operator?
df
i) d
dx [ f (x) + g(x)] = dx + dg
dx .
ii) d
dx [c f (x)] = c ddxf . Yes, derivatives are linear operators!
Example 2.51 Is f (x) = x1/n a linear operator? If so, when (for what values of n)?
√ √ √
Solution: In general, n x + y 6= n x + n y unless n = 1. In this case f (x) = x for all other powers
this function is NOT a linear operator.
72 Chapter 2. Fundamentals of Linear Algebra
Every point x = [x, y] is moved to a new point [e, f ] (mapping/transformation). All the necessary
information is built into the matrix A. Observe that:
i) A(x1 + x2 ) = Ax1 + Ax2
ii) A(cx) = cAx.
Both hold by general matrix properties, so all matrices are linear transformations.
1 1
Example 2.52 Let A = and x = [1, 0]. Then Ax = x0 = [1, 1]. So |x| = 1, but
1 −1
√
|x0 | = 2. So lengths and distances are not preserved by this matrix, but it is still a linear
transformation.
R If a linear transformation does preserve lengths and distance then it is called orthogonal. A
classic example of this is a rotation matrix, which clearly does not change the length of a
vector. A matrix of an orthogonal transformation is an orthogonal matrix and has the property
that M −1 = M T .
0 −1
Example 2.53 i) Let Rπ/2 = then one can check that R−1 T
π/2 = Rπ/2 .
1 0
−1 0
ii) This also holds for reflections S = .
0 1
Observe also that if a matrix M is orthogonal, then I = M −1 M = M T M and thus, 1 = det(I) =
det(M T M) = det(M)2 . This implies that det(M) = ±1. If the determinant is positive it is a pure
rotation and if it is negative then the transformation involves some form of reflection.
R In 3D if you want to rotate an object you have to pick an axis to rotate about. The rotation
matrices about the x-axis, y-axis, and z-axis respectively are
1 0 0 cos θ 0 − sin θ cos θ − sin θ 0
Rx = 0 cos θ − sin θ Ry = 0 1 0 Rz = sin θ cos θ 0 .
0 sin θ cosθ sin θ 0 cosθ 0 0 1
Are the 3D rotation matrices orthogonal? Yes! you can check by finding RTi = R−1
i .
One of the most useful techniques in linear algebra is to take a mapping or transformation and
express it as a matrix in order to analyze it. A mapping T (x) : Rn 7→ Rm can be written as an m × n
matrix A where each column of A is the output of the set of unit basis vectors (e.g., î, ĵ, k̂)
A = T (î)T (ĵ)T (k̂) . (2.43)
2.9 Linear Dependence and Independence 73
x+y
Example 2.55 Find the matrix associated to the transformation T (x) = 3y .
z
Step 1: First check that the transformation is indeed linear!
Step 2: Since we are in three dimensions, compute how it acts on the three basis vectors î, ĵ, k̂:
i) T (î) = [1, 0, 0]
ii) T (ĵ) = [1, 3, 0]
iii) T (k̂) = [0, 0, 1].
Observe that if we want to know what point maps to b = [2, 3, 1] is equivalent to finding a point
x = A−1 b. We can check that x = [1, 1, 1].
In a future section we can define one-to-one and onto linear transformations by looking at their
corresponding matrices.
This equation has the trivial solution (x1 = 0, x2 = 0, x3 = 0), but is this the only solution?
Definition 2.9.1 A set of vectors {v1 , v2 , ..., v p } in Rn is said to be linearly independent if the
vector equation
x1 v1 + · · · + x p v p = 0, (2.44)
has only the trivial solution. The set {v1 , v2 , ..., v p } is said to be linearly dependent if there
exists weights c1 , ..., c p not all zero such that
c1 v1 + · · · + c p v p = 0. (2.45)
1 2 −3
Example 2.56 Let v1 = 3 , v2 = 5 , v3 = 9 .
5 9 3
a. Determine if {v1 , v2 , v3 } is linearly independent.
74 Chapter 2. Fundamentals of Linear Algebra
Step 3: See if there are any free variables. If there are then the vectors are linearly dependent
and the dependence relation has coefficients c1 = x1 = −33x3 , c2 = x2 = 18x3 , c3 = x3 for any real
number x3 . One possible dependence relation is −33v1 + 18v2 + v3 = 0 by choosing x3 = 1.
R The linear dependence relation among the columns of a matrix A corresponds to a nontrivial
solution to Ax = 0.
2u1 + (−1)u2 = 0.
Since v2 is not a multiple of v1 a similar relationship cannot be found and the set {v1 , v2 } must be
linearly independent.
R A set of two vectors is linearly dependent if one of the vectors is a scalar multiple of the other.
A set of two vectors is linearly independent if and only if neither of the vectors is a multiple
of the other.
3. Consider a set of vectors containing the zero vector, {v1 , v2 , ..., v p−1 , 0}. Then
Thus, any set of vectors containing the zero vector, 0, must be linearly dependent.
Theorem 2.9.1 If a set contains more vectors than there are entries in each vector, then the set
is linearly dependent (e.g.,any set {v1 , ..., v p } in Rn where p > n).
Consider a set of functions { f1 (x), f2 (x), ..., fn (x)}. This set is linearly dependent if there exists
constants k1 , ..., kn such that
k1 f1 + ... + kn fn = 0.
then the functions are linearly independent. This determinant, W , is called the Wronskian of the
functions (we will see this again when solving differential equations!).
Recall the definition of the span of a set of vectors {v1 , v2 , ..., v p } is the set of all linear combinations.
While to be linearly independent, the set of vectors must not contain any vector that can be made as
a linear combination of the others.
Definition 2.9.3 A set of vectors {v1 , v2 , ..., v p } is called a basis for Rn if the set is linearly
independent and the linear combinations of the vectors span all of Rn .
R The method just used to find eigenvectors cannot be used to find eigenvalues. We must come
up with a procedure for finding each eigenvalue and then implement the above strategy for
finding the corresponding eigenvalues.
A2 x = A(λ x)
A2 x = λ Ax
A2 x = λ 2 x.
In general, λ n is an eigenvalue of An .
Theorem 2.11.1 The eigenvalues of a triangular matrix are the entries on the diagonal.
Theorem 2.11.2 If v1 , ..., vr are eigenvectors that correspond to distinct eigenvalues λ1 , ..., λr of
an n × n matrix A, then v1 , ..., vr are linearly independent.
1. (A−λ I)x = 0 must have nontrivial solutions. Then (A−λ I) is not invertible. Thus det(A−λ I) =
0.
2. For there to be nontrivial solutions of (A − λ I)x = 0, Cramer’s rule must fail. It fails when the
det(A − λ I) = 0.
Definition 2.11.2 (Characteristic Equations) To find the eigenvalues of a matrix one must solve
the characteristic equation
det(A − λ I) = 0. (2.49)
0 1
Example 2.62 Find the eigenvalues of A = .
−6 5
Solution: Since
0 1 λ 0 −λ 1
A−λI = − = ,
−6 5 0 λ −6 5 − λ
78 Chapter 2. Fundamentals of Linear Algebra
−λ (5 − λ ) + 6 = 0
λ 2 − 5λ + 6 = 0
(λ − 2)(λ − 3) = 0.
R For a 3 × 3 matrix or larger, recall that the determinant can be computed by cofactor expansion.
1 2 1
Example 2.63 Find the eigenvalues of A = 0 −5 0 .
1 8 1
Solution: Since
1−λ 2 1
A−λI = 0 −5 − λ 0 .
1 8 1−λ
Then
1−λ 1
det(A − λ I) = (−5 − λ ) .
1 1−λ
(−5 − λ )[(1 − λ 2 ) − 1] = 0
(−5 − λ )[λ 2 − 2λ ] = 0
(−5 − λ )λ (λ − 2) = 0.
Then
2.11.2 Similarity
Definition 2.11.3 For n × n matrices A and B, we say A is similar to B if there is an invertible
matrix P such that
P−1 AP = B or A = PBP−1 .
2.12 Diagonalization 79
Theorem 2.11.3 If n × n matrices A and B are similar, then they have the same characteristic
polynomial and hence the same eigenvalues!
2.12 Diagonalization
One of the goals of the section is to develop a useful factorization A = PDP−1 , when A is n × n.
We can use this to quickly find Ak quickly for large k. The matrix D is diagonal, and DK is trivial
to compute (each element is raised to the kth power). Thus, Ak = (PDP−1 )k = PDk P−1 , which is
easier to compute. But how do we find the matrix P.
2 0 0
Example 2.65 Diagonalize the following matrix (if possible). A = 1 2 1
−1 0 1
Step 1: Find the eigenvalues of A. Use the characteristic equation!
2−λ 0 0
1 = (2 − λ )2 (1 − λ ).
0 = det(A − λ I) = 1
2−λ
−1 0 1−λ
Thus, the eigenvalues are λ = 1 and λ = 2. Even though we do not have three unique eigenvalues,
we hopefully will find three linearly independent eigenvectors.
Step 2: Find three linearly independent eigenvectors of A. To find the eigenvectors we must
solve (A − λ I)x = 0, for each value of λ .
Thus, from back substitution, we see x1 + x3 = 0 or x1 = −x3 with x2 , x3 free. So the eigenvectors
−1
corresponding to λ = 2 are v2 = x3 0 and we must pick another linearly independent eigen-
1
0
vector, since x2 is free just change its value and pick x3 = 0, v3 = 1 .
0
Step 3: Construct P from the vectors in Step 2.
0 0 −1
P = −1 1 0
1 0 1
Note that the eigenvector in the first column of P must be associated to the eigenvalue in the first
column of D.
Step 5: Check your work by verifying AP = PD. It is easier to check this then computing
P−1 .
2 4 6
Example 2.66 Diagonalize the following matrix (if possible). A = 0 2 2
0 0 4
Step 1: Find the eigenvalues of A. Use the characteristic equation!
2−λ 4 6
2 = (2 − λ )2 (4 − λ ).
0 = det(A − λ I) = 0
2−λ
0 0 4−λ
Thus, the eigenvalues are λ = 4 and λ = 2. Even though we do not have three unique eigenvalues,
we hopefully will find three linearly independent eigenvectors.
Step 2: Find three linearly independent eigenvectors of A. To find the eigenvectors we must
solve (A − λ I)x = 0, for each value of λ .
Thus, from back substitution, we see −2x2 + 2x3 = 0 or x2 = x3 with x3 free. Also from the first
row, −2x1 + 4x2 + 6x3 = 0 or x1 = 2x2 + 3x3 = 5x3 . So the eigenvector corresponding to λ = 4 has
5
the form v1 = x3 1 .
1
Case 2 (λ = 2): Solve (A − 2I)x = 0, by writing the augmented matrix a row-reducing
0 4 6 0 0 4 6 0
0 0 2 0 → 0 0 2 0 .
0 0 2 0 0 0 0 0
Thus, from back substitution, we see x3 = 0. From the first equation
4x2 + 6x3 = 0 or x2 = 0 with
1
x1 free. So the eigenvector corresponding to λ = 2 is v2 = x1 0 and we cannot find another
0
linearly independent eigenvector. Thus, A is not diagonalizable.
2 0 0
Example 2.67 Why is A = 2 6 0 diagonalizable?
3 2 1
First, find the eigenvalues with the characteristic equation
2−λ 0 0
0 = det(A − λ I) = 2 6−λ 0 = (2 − λ )(6 − λ )(4 − λ ).
3 2 1−λ
Thus, the eigenvalues are λ = 4, λ = 6, and λ = 2. Since the eigenvalues are distinct, then they will
each have at least one linearly independent eigenvector. Thus, we are guaranteed to have enough
eigenvectors to build the matrices P and D.
R In the special case that the matrix A is real and symmetric, then it can always be diagonalized
and the eigenvectors have an additional property. They are no longer just linearly independent,
they are also orthogonal (e.g., v1 · v2 = 0).
5 0 2
Example 2.68 Diagonalize the following matrix (if possible). A = 0 3 0
2 0 5
Step 1: Find the eigenvalues of A. Use the characteristic equation!
5−λ 0 2
5−λ 2
0 = det(A−λ I) = 0
3−λ 0 = (3−λ )
= (3−λ )(3−λ )(7−λ ).
2 5 − λ
2 0 5−λ
Thus, the eigenvalues are λ = 3 and λ = 7. Even though we do not have three unique eigenvalues,
we hopefully will find three linearly independent eigenvectors.
Step 2: Find three linearly independent eigenvectors of A. To find the eigenvectors we must
solve (A − λ I)x = 0, for each value of λ .
Thus, from back substitution, we see −4x2 = 0 or x2 = 0. Also from the first row, −2x1 +
2x3= 0
1
or x1 = x3 with x3 free. So the eigenvector corresponding to λ = 7 has the form v1 = x3 0 .
1
Case 2 (λ = 3): Solve (A − 3I)x = 0, by writing the augmented matrix a row-reducing
2 0 2 0 2 0 2 0
0 0 0 0 → 0 0 0 0 .
2 0 2 0 0 0 0 0
Thus, from back substitution, we see 2x1+ 2x3 = 0 or x1 = −x3 with x2 , x3 free. So the eigenvec-
−1
tors corresponding to λ = 3 are v2 = x3 0 and we must pick another linearly independent
1
0
eigenvector, since x2 is free just change its value and pick x3 = 0, v3 = 1 .
0
Step 3: Construct P from the vectors in Step 2.
1 −1 0
P= 0 0 1
1 1 0
Step 4: Construct D from the corresponding eigenvalues.
7 0 0
D= 0 3 0
0 0 3
Note that the eigenvector in the first column of P must be associated to the eigenvalue in the first
column of D.
Observe that since the matrix was real an symmetric the eigenvalues are all orthogonal!
2 1 1
Example 2.69 Diagonalize the following matrix (if possible). A = 1 2 1
1 1 2
Step 1: Find the eigenvalues of A. Use the characteristic equation!
2−λ 1 1
0 = det(A − λ I) = 1
2−λ 1 = · · · = (1 − λ )(1 − λ )(4 − λ ).
1 1 2−λ
Thus, the eigenvalues are λ = 1 and λ = 4. Even though we do not have three unique eigenvalues,
we hopefully will find three linearly independent eigenvectors.
Step 2: Find three linearly independent eigenvectors of A. To find the eigenvectors we must
solve (A − λ I)x = 0, for each value of λ .
Thus, from back substitution, we see −3x2 + 3x3 = 0 or x2 = x3 with x3 free. Also from the first
row,
1
x1 −2x2 +x3 = 0 or x1 = x3 . So the eigenvector corresponding to λ = 4 has the form v1 = x3 1 .
1
Case 2 (λ = 1): Solve (A − I)x = 0, by writing the augmented matrix a row-reducing
1 1 1 0 1 1 1 0
1 1 1 0 → 0 0 0 0 .
1 1 1 0 0 0 0 0
Thus, from back we see x1 + x2 + x3 = 0 or x1 = −x2 − x3 with x2 ,x3 free.
substitution,
So
−1 −1 −1
x = x2 1 + x3 0 . So the eigenvectors corresponding to λ = 3 are v2 = 1 and
0 1 0
−1
v3 = 0 .
1
Step 3: Construct P from the vectors in Step 2.
1 −1 −1
P= 1 1 0
1 0 1
Step 4: Construct D from the corresponding eigenvalues.
4 0 0
D= 0 1 0
0 0 1
Note that the eigenvector in the first column of P must be associated to the eigenvalue in the first
column of D.
Observe that since the matrix was real an symmetric the eigenvalues are all orthogonal!
or in matrix notation
0 cos(θ ) − sin(θ )
r = Pr , where P = .
sin(θ ) cos(θ )
Recall that M is the matrix that described the deformation in the (x, y)-plane. Then R = Mr shows
that the vector r becomes the vector R after the deformation.
Thinking Question: How can we describe the deformation in the (x0 , y0 ) system? In other words,
what matrix takes r0 to R0 ?
R = Mr
PR0 = MPr0
R0 = P−1 MPr0 .
Thus, D = P−1 MP is the matrix which describes in the (x0 , y0 ) system the same deformation that M
describes in the (x, y) system.
Thinking Question: What happens in the case that P is chosen to make D a diagonal matrix?
If this is the case then then new axes (x0 , y0 ) are along the directions of the eigenvectors of M. If the
eigenvectors are orthogonal, then the new axes will be orthogonal as well. In principle if P is not an
orthogonal matrix (composed of orthogonal eigenvectors), then the new axes will not be orthogonal.
The only case where we are guaranteed orthogonal eigenvectors is if the original deformation M is
real and symmetric.
When D is diagonal, in the (x0 , y0 ) coordinate system the system is either stretched or shrunk
along the axes no matter how complicated the original deformation M was.
Definition 2.12.1 If two or more eigenvalues are the same, then this eigenvalue is called
degenerate. Degeneracy means that two independent eigenvectors correspond the to same
eigenvalue.
III
Part Three: Multivariable
Calculus
3 Partial Differentiation . . . . . . . . . . . . . . . . . 87
3.1 Introduction and Notation
3.2 Power Series in Two Variables
3.3 Total Differentials
3.4 Approximations Using Differentials
3.5 Chain Rule or Differentiating a Function of a Func-
tion
3.6 Implicit Differentiation
3.7 More Chain Rule
3.8 Maximum and Minimum Problems with Constraints
3.9 Lagrange Multipliers
Example 3.2 Suppose z = f (x, y), but x = 5, then z = f (x, y) = f (y) is a 2D curve in a 3D area
made up of the intersection of the plane x = 5 with the function f (x, y).
Definition 3.1.1 (Level Curves) A level curve is made up of points (x, y) where f (x, y) = const.
Example 3.3 Let z = f (x, y) = x2 + y2 , then the level curves have the form x2 + y2 = const and
are circles!
dy
In two dimensions the derivatives are simple. If y = f (x) = x2 , then dx = y0 = 2x and
d2y
dx2
= y00 = 2. Is there an analogue in three dimensions? z = f (x, y) = x2 y
• Take the derivative with respect to x holding y constant (fixed), denoted ∂∂ xf = 2xy
• Take the derivative with respect to y holding x constant, denoted ∂∂ yf = x2 .
• Take the gradient, a vector in the direction
" of
# themaximal change in both x and y composed
∂f
2xy
of the previous two examples, ∇ f = ∂∂ xf = .
∂y
x2
88 Chapter 3. Partial Differentiation
R Notice that the partial derivative of f with respect to x is not the same as the total derivative,
∂f df
∂ x 6= dx . More on this later!
• Take the derivative with respect to x a second time holding y constant (fixed), denoted
∂2 f
∂ x2
= 2y
∂2 f
• Take the derivative with respect to y a second time holding x constant, denoted ∂ y2
= 0.
∂2 f ∂2 f
• Take one derivative of each (while holding the other fixed), denoted = = 2x. This
∂ x∂ y ∂ y∂ x
is called the “Mixed Derivative". Observe that we can switch the order and get the same
result for “nice functions" (e.g., continuous, differentiable, etc. Clairaut’s Theorem)
R There are additional notation for partial derivatives. The partial derivative of z = f (x, y) with
respect to x can be denoted, zx , fx , ∂∂ xf , f1 among others.
d
[ f (x)g(x)] = f 0 (x)g(x) + g0 (x) f (x).
dx
Definition 3.1.3 (Quotient Rule) Given two differentiable functions f (x) and g(x), the derivative
of the quotient
Definition 3.1.4 (Chain Rule) Given two differentiable functions f (x) and g(x), the derivative
of the composition g ◦ f is
d
[g( f (x))] = g0 ( f (x)) f 0 (x).
dx
Definition 3.1.5 (Derivatives with Log or Exp) Given a differentiable function f (x),
d f (x)
e = f 0 (x)e f (x)
dx
d f 0 (x)
ln( f (x)) =
dx f (x)
d y
x = xy ln(x)
dx
2
Example 3.4 Let z = f (x, y) = −x2 y3 + e−x y . Find fx , fy , fxx , fyy , fxy = fyx .
3.1 Introduction and Notation 89
Solution:
2y
fx = −2xy3 − 2xye−x
2y
fy = −3x2 y2 − x2 e−x
2 2y
fxx = −2y3 − 2ye−x y + 4x2 y2 e−x
2y
fyy = −6x2 y + x4 e−x
2 2y
fxy = −6xy2 − 2xe−x y + 2x3 ye−x
2x2 y
Example 3.5 Let z = f (x, y) = 3x+1 and find fx , fy , fxy .
Solution:
4xy(3x + 1) − 6x2 y
fx =
(3x + 1)2
2x2
fy =
3x + 1
4x(3x + 1) − 6x2 6x2 + 4x
fxy = = .
(3x + 1)2 (3x + 1)2
Solution:
3
fx = .
3x + 1
x
Example 3.7 If f (x, y) = sin
1+y , find f x and f y .
Solution: Compute
∂f x 1
fx = = cos
∂x 1+y 1+y
∂f x −x
fy = = cos .
∂y 1 + y (1 + y)2
Solution: Compute
∂ f 2 3
fx = = 3x + 2xy = 3(4) + 2(2)(1) = 16
∂ x (x,y)=(2,1)
(x,y)=(2,1)
∂ f 2 2
fy = = 3x y − 4y = 3(4)(1) + 4(1) = 8.
∂y
(x,y)=(2,1) (x,y)=(2,1)
90 Chapter 3. Partial Differentiation
Solution: Compute
∂ f
fx = = −2x = −2
∂ x (x,y)=(1,1)
(x,y)=(1,1)
∂ f
fy = = −4y = −4.
∂y
(x,y)=(1,1) (x,y)=(1,1)
Solution: Compute
∂f
fx = = yexy ln(z)
∂x
∂f
fy = = xexy ln(z)
∂y
∂f exy
fz = = .
∂z z
Solution: Compute
fr = 2r 3 cos2 (θ ) − sin2 (θ )
There are several physical scalar quantities that are functions of more then one variables. For
example the temperature in a material depends on space and time T = T (x, y, z,t). In Physics,
these quantities have physicalmeaning.
One way physicists denote taking derivative while other
∂T
parameters are left constant is ∂ p . This indicates that we take the derivative of the temperature,
V
T , with respect to the pressure, p, leaving the volume V a fixed constant.
Case I: Separable A function of two variables, f (x, y), is separable if it can be written as a
product of a function of x and a function of y, f (x, y) = g(x)h(y). In this case you can expand each
function in a power series in one variable and multiple to get the power series of f .
3.2 Power Series in Two Variables 91
x2 y3
x
f (x, y) = e sin(y) = 1 + x + + ... y − + ... .
2 3!
Step 2:
x2 y y3 xy3 x3 y
f (x, y) = ex sin(y) = y + xy + − + + + ...
2 3! 3! 6
x2 y2
f (x, y) = cos(x) cos(y) = 1 − + ... 1 − + ... .
2! 2!
Step 2:
x2 y2 x2 y2
f (x, y) = cos(x) cos(y) = 1 − − + + ...
2 2 4
Definition 3.2.1 The Taylor Series Expansion of f (x, y) about the point (a, b) uses powers of
(x − a) and (y − b) in the form
f (x, y) = a00 + a10 (x − a) + a01 (y − b) + a20 (x − a)2 + a11 (x − a)(y − b) + a02 (y − b)2 + ...
Therefore.
fxx (a, b) fyy (a, b)
f (x, y) = f (a, b)+ fx (a, b)(x−a)+ fy (a, b)(y−b)+ f (x−a)2 + fxy (a, b)(x−a)(y−b)+ (y−b)2 +.
2! 2!
If we let h = (x − a) and k = (y − b), then the second order terms have the form
∂ 2
1 2 2
1 ∂
fx x(a, b)h + 2 fxy (a, b)hk + fyy (a, b)k = h +k f (a, b).
2! 2! ∂ x ∂y
92 Chapter 3. Partial Differentiation
The Taylor Series Expansion can then be written in the general form
∂ n
∞
1 ∂
f (x, y) = ∑ h +k f (a, b), (3.1)
n=0 n! ∂x ∂y
h in
where h ∂∂x + k ∂∂y are the binomial coefficients (see Pascal’s Triangle!).
R This is a Maclaurin Series if a = b = 0. This procedure works on all functions (not just
separable functions).
R Compare the series representation for the 2D series with that of the 1D series for a function
of one real variable
∂ n
∞
1
f (x) = ∑ h f (a). (3.2)
n=0 n! ∂x
1 2
ex+y = 1 + x + y + x + 2xy + y2 + ...
2
Example 3.16 Find the Taylor Series Expansion of f (x, y) = sin(x − y):
sin(x − y) = x − y + ...
dy ∆y
R Of course, if dx is small, then ∆y ≈ dy and dx = lim∆x→0 ∆x . This follows from the fact that
dy
y0 = dx ⇒ dy = y0 dx ⇒ dy = ∂∂ xy dx.
This is called the total differential of the function. Also, ∂∂ xz and ∂∂ yz are the slops of the tangent
lines in each direction. The total derivative is different from the partial derivative in that we longer
3.4 Approximations Using Differentials 93
assume the one of the variables is constant (fixed). Observe that if y is held constant then the dy = 0
and the total differential reduces to dz = ∂∂ xz dx ⇒ dx ∂z
dx = ∂ x .
The total differential can always be taken no matter how many variables are present. Let
u = f (x1 , x2 , x3 , x4 , ..., xn ). Then the total differential is
∂f ∂f ∂f ∂f
du = dx1 + dx2 + dx3 + ... dxn .
∂ x1 ∂ x2 ∂ x3 ∂ xn
Example 3.17 Recall the concept of Implicit Differentiation from Calculus I. If we are given a
function f (x, y) = x4 + 2y2 = 8 it is hard to solve for y0 , so we use the idea of implicit differentiation
dy dy −4x3 −x3
4x3 + 4y =0 ⇒ = = . (3.3)
dx dx 4y y
The term inside the square brackets is the total differential of f . So even back in Calculus 1 we
were using this concept without knowing it.
Solution:
∂f ∂f
d = 30x2 − 16xy dx + −8x2 + 12y2 dy.
df = dx +
∂x ∂y
√ √
Example 3.19 Find the approximate value of .5 + 10−19 = .5 using total differentials.
Solution: Let f (x) = x1/2 , the ∆ f = f (.5 + 10−19 ) − f (.5) ≈ d f . Here x = .5 and dx = 10−19 .
Thus,
∂f 1 1
df = dx = (.5)−1/2 (10−19 ) = (1.41)(10−19 ) = 7 × 10−20 .
∂x 2 2
1 1
Example 3.20 Find the approximate value of (n+1)2 − (n−1)2 using total differentials.
1
Solution: Let f (x) = (x+1)2
, the ∆ f = f (n) − f (n − 2) ≈ d f . Here x = n and dx = −2. Thus,
∂f −2 4
df = dx = 3
(−2) = .
∂x (x + 1) (n + 1)3
This has physical meaning. Two forces with decay n−2 can sum to produce something with extra
decay n−3 .
94 Chapter 3. Partial Differentiation
p
Example 3.21 Let z = f (x, y) = 2 x 2 + y2 .
a) Use the total differential to approximate ∆z when x changes from 3 → 2.98 and y changes from
4 → 4.01.
b) Calculate the actual change ∆z.
R Observe that
f (x + ∆x, y + ∆y) − f (x, y) = f (x + ∆x, y + ∆y) − f (x + ∆x, y) + f (x + ∆x, y) − f (x, y)
∂f ∂f
≈ dy + dx.
∂y ∂x
Example 3.22 Find the approximate value of (1.922 + 2.12 )1/3 using total differentials.
p
Solution: Let z = f (x, y) = 3
x2 + y2 = (x2 + y2 )1/3 . Here x = 2, y = 2, dx = −.08, and dy = .1.
Thus,
∂f ∂f
df = dx + dy
∂x ∂y
2x 2y
= dx + dy
3(x2 + y2 )2/3 3(x2 + y2 )2/3
2(2) 2(2)
= 2/3
(−.08) + (.1) = .0067
2
3(2 + 2 ) 2 3(2 + 22 )2/3
2
Example 3.23 Approximate the change in volume of a beverage can in the shape of a right
circular cylinder as the radius changes from 3 to 2.5 and the height changes from 14 to 14.2.
Solution: Let V = f (r, h) = πr2 h. Here r = 3, h = 14, dr = −.5, and dh = .2. Thus,
∂f ∂f
dV = dr + dh
∂r ∂ h
= [2πrh] dr + πr2 dh
= 2π(3)(14)(−.5) + π(32 )(.2) = −126.2920
Thus, decreasing the radius by .5 and increasing the height by .2 results in a decrease in the volume
by 126.29units2 .
3.5 Chain Rule or Differentiating a Function of a Function 95
Example 3.24 Making a profit depends on the level of inventory x and the floor space y in the
following way (in thousands)
Currently, we have 4, 000, 000 in inventory and 150, 000 sq. feet. So x = 4000 and y = 150000.
Find the expected change in profit if management decides to increase the inventory by 500, 000 and
decrease the floor space by 10000 sq. feet.
Thus, management will have made a good decision that results in an increase in the profits!
m1 m2
Example 3.25 The reduced mass µ of a system of two bodies is µ −1 = 1
m1 + 1
m2 ⇒µ= m1 +m2 .
From Newton’s 2nd Law: F21 = m1 a1 and F12 = m2 a2 . From Newton’s 3rd Law: F21 = −F12 ⇒
m1 a1 = −m2 a2 ⇒ a2 = −m 1
m2 a1 .
m2 +m1
The relative acceleration arel = a1 − a2 = 1 + m F12
m2 a1 = m1 m2 m1 a1 = mrel . Thus, mrel arel = F12 .
1
If m1 increases by 2% then what is the % change on m2 so that the relative mass µ remains
unchanged.
dz ∂ f dx ∂ f dy
= + (Chain Rule) (3.4)
dt ∂ x dt ∂ y dt
dz ∂ f dx ∂ f dy
= 2xy + 3y4 [2 cos(2t)] + x2 + 12xy3 [− sin(t)] .
= +
dt ∂ x dt ∂ y dt
dz ∂ f dx ∂ f dy
= [2x + y] [cos(t)]+[2y + x] et = 2 sin(t) cos(t)+et cos(t)+2e2t +et sin(t).
= +
dt ∂ x dt ∂ y dt
p
Example 3.29 Let w = ln x2 + y2 + z2 = 21 ln(x2 + y2 + z2 ) where x = sin(t), y = cos(t), and
dw
z = tan(t). Find dt .
dw ∂ w dx ∂ w dy ∂ w dz
= + +
dt ∂ x dt ∂ y dt ∂ z dt
2x y z 2
= 2 2 2
[cos(t)] + 2 2 2
[− sin(t)] + 2 2 2
sec (t)
x +y +z x +y +z x +y +z
cos(t) sin(t) − cos(t) sin(t) + tan(t) sec2 (t) tan(t) sec2 (t)
= = = tan(t).
1 + tan2 (t) sec2 (t)
Example 3.30 (Application) The pressure (kPa), volume V (L), and temperature (K) of a mole
of ideal gas are related by the equation PV = 8.31T (Ideal Gas Law). Find the rate at which the
pressure is changing when the temperature is 300K increasing at a rate of .1K/s and V = 100L
increasing at a rate of .2L/s.
dT dV
Solution: Here T = 300, dt = .1, V = 100, dt = .2, and P = 8.31 VT . By the Chain Rule:
dP ∂ P dT ∂ P dV 8.31 dT 8.31T dV
= + = −
dt ∂ T dt ∂V dt V dt V 2 dt
8.31 8.31(300)
= (.1) − (.2) = −0.04155
100 1002
3.6 Implicit Differentiation 97
Question: What if x(t) and y(t) were functions of two variables x = x(t, s) and y = y(t, s)?
∂z ∂ f ∂x ∂ f ∂y
= +
∂s ∂x ∂s ∂y ∂s
∂z ∂ f ∂x ∂ f ∂y
= + .
∂t ∂ x ∂t ∂ y ∂t
Solution: Thus,
∂z ∂ f ∂x ∂ f ∂y 2 2
= + = [ex sin y][t 2 ] + [ex cos y][2st] = t 2 est sin(s2t) + 2stest cos(s2t)
∂s ∂x ∂s ∂y ∂s
∂z ∂ f ∂x ∂ f ∂y 2 2
= + = [ex sin y][2st] + [ex cos y][s2 ] = 2stest sin(s2t) + s2 est cos(s2t).
∂t ∂ x ∂t ∂ y ∂t
Solution: Thus,
∂z ∂ f ∂x ∂ f ∂y x+2y 1 x+2y −t s 2t
+ 1 2t
= + = [e ][ ] + [2e ][− 2 ] = e t s −
∂s ∂x ∂s ∂y ∂s t s t s2
∂z ∂ f ∂x ∂ f ∂y x+2y −s x+2y 1 s 2t
−s s 2
= + = [e ][ 2 ] + [2e ][ ] = e t − 2− .
∂t ∂ x ∂t ∂ y ∂t t s t s
Implicit Differentiation lets one find the derivative of y WITHOUT writing y explicitly as a function
of x. Take the derivative of each side with respect to x
dy
2x + 2y =0
dx
dy
2y = −2x
dx
dy −2x −x −x
= = = √ .
dx 2y y ± 25 − x2
This method is usually used when we want to know the value of the derivative at a point (x0 , y0 ).
98 Chapter 3. Partial Differentiation
Solution: This can be solved using total differentiation or implicit differentiation. First with
TD we rewrite 0 = x2 + sin(x) − t = f (x, y).
∂ f dx ∂ f dt dx dx 1
0= + = [2x + cos(x)] − 1 ⇒ = .
∂ x dt ∂t dt dt dt 2x + cos(x)
To use implicit differentiation we think of x as a function of t, then by Chain Rule
dx dx dx 1
2x + cos(x) = 1 ⇒ = .
dt dt dt 2x + cos(x)
For higher derivatives we do not use differentials! We only use implicit differentiation.
2
Example 3.35 x2 + sin(x) = t. Find ddt 2x .
Suppose we want the value of the derivative at a point. In the previous two examples, if we
1
want th values at x = π and t = 0, then from the implicit differentiation we find dx
dt = 2π−1 and
d2x −2
dt 2
= (2π−1) 3.
The most prevalent application for Implicit Differentiation is to find the equation of a tangent
lien to a curve, which also gives the slope at a point.
Example 3.36 Find the equation of the tangent line to the curve x2 y3 + x3 y2 − y = 0 at the point
(1, 1).
1 dy
−1 + (x2 + y2 )(2x + 2y ) = 0
2 dx
dy
x(x2 + y2 ) + y(x2 + y2 ) = 1
dx
dy 1 − x(x2 + y2 )
=
dx y(x2 + y2 )
dy 1
Plug in (0, 2) = .
dx 8
y−y0 y−2
Thus, the equation for the tangent line has the form y = mx + b where m = x−x0 = x−0 = 18 . Thus,
y = 18 x + 2.
∂z ∂z ∂x ∂z ∂y
= + = [y][cos(s + t)] + [x](−1) = y cos(s + t) − x
∂t ∂ x ∂t ∂ y ∂t
∂z ∂z ∂x ∂z ∂y
= + = [y][cos(s + t)] + [x](1) = y cos(s + t) + x
∂s ∂x ∂s ∂y ∂s
Example 3.39 Let u = x2 + 2xy − y ln(z) where x = s + t 2 , y = s − t 2 , and z = 2t. Find ∂∂ us , ∂∂tu .
∂u ∂u ∂x ∂u ∂y ∂u ∂z
= + + = [2x + 2y](1) + [2x − ln(z)](1) + [−y/z](0) = 4x + 2y − ln(z)
∂s ∂x ∂s ∂y ∂s ∂z ∂s
∂u ∂u ∂x ∂u ∂y ∂u ∂z 2y
= + + = [2x + 2y][2t] + [2x − ln(z)](−2t) + [−y/z](2) = 4yt + 2t ln(z) − .
∂t ∂ x ∂t ∂ y ∂t ∂ z ∂t t
Notation: Sometime it is useful to write the Chain Rule formulas in matrix form. If u = f (x, y, z)
where x = x(s,t), y = y(s,t), and z = z(s,t). Recall from linear algebra
∂x ∂x
∂u ∂u ∂u ∂u ∂u ∂s ∂t
∂y ∂y
= . (3.5)
∂ s ∂t ∂x ∂y ∂z
∂s ∂t
∂z ∂z
∂s ∂t
Solution: Here we cannot solve for x and y in terms of t explicitly! Instead find dx and dy
first, then use the Chain Rule to get the desired derivative. From Total Differentiation we have
This is just a linear system of the form Ax = b. Recall from Cramer’s Rule that as long as the
x) det(Ay )
determinant of A is not zero, det(A) 6= 0, the the solution to Ax = b is x = det(A
det(A) and y = det(A)
where Ax is A with the first column replaced by the righthand side b. Thus,
x y = −x(y + 1)ey − y sin(t)
det(A) = y
sin(t) −(y + 1)e
tdt y = −tdt(y + 1)ey + xy cos(t)dt
det(Ax ) = y
−x cos(t)dt −(y + 1)e
x tdt = −x2 cos(t)dt − tdt sin(t).
det(Ay ) =
sin(t) −x cos(t)dt
Definition 3.8.2 (Global Extrema) A function of two variables, z = f (x, y), has a global max-
imum at (a, b) if f (x, y) ≤ f (a, b) for every point (x, y). If f (x, y) ≥ f (a, b) for all (x, y), then
f (a, b) is a global minimum.
Theorem 3.8.1 If a function f (x, y) has a local minimum/maximum at a point (a, b), then
the first order partial derivatives ∂∂ xf (a, b) = fx (a, b) = 0 and ∂f
∂ y (a, b) = fy (a, b) = 0 . This is
analogous to the 1D case where f 0 (x) = 0 at all extrema.
Definition 3.8.3 Any location (x, y) where fx (x, y) = fy (x, y) = 0 is called a critical point.
Solution: All that must be done is take the first order partial derivatives fx , fy , set them equal to
zero and solve for x, y.
0 = fx = 2x − 2 ⇒ x=1
0 = fy = 2y − 6 ⇒ y = 3.
Thus, the only critical point is (1, 3).
Solution: All that must be done is take the first order partial derivatives fx , fy , set them equal to
zero and solve for x, y.
0 = fx = −2x ⇒ x=0
0 = fy = 2y ⇒ y = 0.
Thus, the only critical point is (0, 0).
Finding the critical points only gives us candidates for extrema. Being a critical point is
necessary for being a maximum or minimum, but it is not sufficient. Recall the three relevant cases
from 1D and how we determine if we have a maximum, minimum, or point of inflection (all of
which are critical points with f 0 (x) = 0).
Theorem 3.8.2 (Second Derivative Test) Suppose that the first order partial derivatives are zero,
∂f ∂f
∂ x (a, b) = 0 and ∂ y (a, b) = 0 (critical point at (a, b)). In addition, fxx , fxy , fyy exist. Define
Then:
a) If D > 0 and fxx > 0, then f (a, b) is a local minimum.
b) If D > 0 and fxx < 0, then f (a, b) is a local maximum.
c) If D < 0, then f (a, b) is a saddle point.
d) If D = 0, then the second derivative test is inconclusive.
Is there a nice way to remember the formula for D? Yes! With determinants
fx x fxy 2
D= = fxx fyy − fxy .
fyx fyy
Example 3.43 Find the local maximum, minimum, and saddle points of f (x, y) = x4 + y4 − 4xy +
1.
Solution:
Step 1: Find all possible critical points.
0 = fx = 4x3 − 4y ⇒ y = x3
0 = fy = 4y3 − 4x
Thus, the real roots are x = 0, 1, −1. Using the relation that y = x3 , then the three critical points are
(0, 0), (1, 1), (−1, −1).
fxx = 12x2
fyy = 12y2
fxy = fyx = −4.
For the critical point (0, 0), D(0, 0) = −16 < 0, so it is a saddle point. For the critical point
(1, 1), D(1, 1) = 144 − 16 > 0 and fxx (1, 1) = 12 > 0, so it is a local minimum. Finally, for the
critical point (−1, −1), D(−1, −1) = 144 − 16 > 0 and Fyy (−1, −1) = 12 > 0, so it is also a local
minimum.
Example 3.44 Find the shortest distance from the point (1, 0, −2) to the plane x + 2y + z = 4.
Solution: Recall that the distance between a point (x, y, z) and (1, 0, −2) is
q
d = (x − 1)2 + y2 + (z + 2)2 .
3.8 Maximum and Minimum Problems with Constraints 103
d 2 = (x − 1)2 + y2 + (6 − x − 2y)2 .
By solving this system we find that x = 11/6 and y = 5/3. Thus, the critical point as (11/6, 5/3).
fxx = 4
fyy = 10
fxy = fyx = 4.
Since D > 0 and fxx > 0, then√(11/6, 5/3) is a local minimum. Plugging this point back into the
distance formula gives d = 56 6.
Example 3.45 A cardboard box without a lid is to be made from 12m2 of cardboard. Find the
maximum volume of such a box.
V = xyz
Step 0: Express the desired function as a function of only two variables using another relation such
as the surface area A = xy + 2xz + 2yz = 12. Solving for z
12 − xy 12xy − x2 y2
z= , V = xyz = .
2x + 2y 2x + 2y
Step 1: Find all possible critical points.
y2 (12 − 2xy − x2 )
0 = Vx = ⇒ 0 = y2 (12 − 2xy − x2 )
2(x + y)2
x2 (12 − 2xy − y2 )
0 = Vy = ⇒ 0 = x2 (12 − 2xy − y2 )
2(x + y)2
Observe that if either x or y is zero, then we get the minimum volume, V = 0. Ignoring these cases
we find that either x = y or x = −y. In the real world, side lengths cannot be negative, so x = y. By
substitution we find x = 2 and y = 2. Thus, the critical point as (2, 2).
Step 2: Find the 2nd order partial derivatives. In this case there is only one critical point left which
is not the minimum, so it must be a maximum. Therefore, Vmax = xyz = 2(2)(1) = 4.
104 Chapter 3. Partial Differentiation
Example 3.46 A cardboard box without a lid has a volume of 5m3 . Find the minimum surface
area of such a box.
Step 0: Express the desired function as a function of only two variables using another relation.
Solving for z
5 10 10
z= , A = xy + 2xz + 2yz = xy + + .
xy y z
Step 1: Find all possible critical points.
10 10
0 = Ax = y − ⇒ y=
x2 x2
10
0 = Ay = x − 2
y
4
By substituting the first equation into the second we find 0 = x − 10x 1 3
100 = x 1 − 10 x . Thus,
x = 101/3 and then y = 101/3 .
5
Step 2: Find the 2nd order partial derivatives. Recall z = xy = 1052/3 = 12 101/3 . Thus the sur-
face area is minimized when the height is half the length x and width y.
Example 3.47 A trapezoidal gutter has an opening of 24cm. Find the angle of the sides θ so that
the cross-sectional area is maximized.
Solution: Recall the area of a trapezoid (if x is the base and y is the side
x + x + 2y cos(θ )
A= y cos(θ ) = (x + y cos(θ ))y sin(θ ).
2
We also know that the width is 24 = x + 2y.
Step 0: Express the desired function as a function of only two variables using another relation.
Solving for x
x = 24 − 2y, A = (24y − 2y2 + y2 cos(θ )) sin(θ ).
Step 1: Find all possible critical points.
0 = Ax = −y2 sin2 (θ ) + 24y cos(θ ) − 2y2 cos(θ ) + y2 cos2 (θ )
= −y2 sin2 (θ ) + 24y cos(θ ) − 2y2 cos(θ ) + 2y2 cos2 (θ ) − y2
0 = Ay = (24 − 4y + 2y cos(θ )) sin(θ )
Now: Solve a max/min problem with a constraint simultaneously using Lagrange Multipliers.
This method was developed long ago to solve a classical problem the so-called Milkmaid
Problem. Imagine you are on a farm and it is time to get milk. The maid has to get the day’s
milk from the cow. The sun is setting and she has a date with a handsome shepherd and wants to
complete the task as quickly as possible. Before she can get the milk she must rinse her bucket in
the nearby river. She wants to take the shortest possible path from her location, M, to the river to
the cow C.
Thinking Question: What point P along the river should she rinse her bucket?
This question can be restated as finding a point P for which the distance from M to P and from P to
C is minimum. If she only needed to go to the cow the obvious solution is a straight line, but the
problem is not as simple with 3 points. We need to satisfy the constraint that P is on the river bank.
Suppose the shape of the river is described as a curve, g(x, y) = 0 where g(x, y) = y − x2
(parabola) or g(x, y) = x2 + y2 − r2 (circle). We want to minimize the function
Graphically: For every point P on an ellipse the distance from a focus to P to the other focus is
constant. Take M,C as the foci of an ellipse, any point on increasing ellipses has the same distance
from both. To find the point P, find the smallest ellipse that intersects the curve defining the river.
This occurs when the smallest ellipse and river are tangent.
Algebraically: Usually to find a maximum or minimum we need to set derivatives equal to zero,
∂f ∂f
∂ x = ∂ y = 0 or ∇ f = 0, but we must pair this with our constraint. How to do this? Add a new
variable and define a new function!
To find the critical points we set all first derivatives equal to zero, ∇F = 0 ⇔ ∇ f = λ ∇g
∂f ∂g
0= (P) − λ
∂x ∂x
∂f ∂g
0= (P) − λ
∂y ∂y
0 = g(P).
The first two equations are used to find the critical point and the last equation enforces the constraint.
106 Chapter 3. Partial Differentiation
The variable λ is a dummy variable used to get a system of equations, we really only care about
x, y, z. Once you have found all the critical points where f you plug them into f to see which are
maxima and which are minima. Solving this system of equation can be hard! Some tricks:
1. Since we do not care what λ is, you can solve first for λ in terms of x, y, z to remove λ
from the equations.
3. Remember when taking the square root to consider both the positive and negative root.
4. Remember when dividing an equation by some expression, you must be sure that the ex-
pression is not zero. Often it is helpful to consider two cases: first solve the equations assuming
that a variable is 0, and then solve the equations assuming that it is not zero.
In physics, the Lagrange multiplier is te relative weight of the constraint on the problem. In
economics, it represents the fact that the maximum profit is subject to limited resources where λ is
the marginal value. This can also represent the rate at which the optimal value of f (P) changes if
you change the constraint.
Example 3.48 Parabolic River. Assume the maid is at (0, 5), the cow is at (8, 0) and the river
curve is g(x, y) = (y − 2) − (x − 4)2 .
We can make the problem easier by replacing each distance (square root) with its square (if the
square of the distance is minimized, then so is the distance).
∂F
Step 2: Plug this value into ∂x =0
∂F
0= = 4x − 16 + 2(4y − 10)(x − 4)
∂x
= 4(x − 4)(8y − 16)
= 32(x − 4)(y − 2)Using the constraint: = 32(x − 4)3
Thus, the critical point is x = 4. This implies (from the constraint) that y = 2 and √ λ = −2.
Plugging this back into the original distance equation (6.202) gives F(4, 2, −2) = 5 + 8 = 7.828.
Just to check that√this is the minimal path try another point on the river (e.g., (2, 6) ⇒ λ = 14).
F(2, 6, 14) = 6 + 5 = 8.2366 is a larger distance to travel.
3.9 Lagrange Multipliers 107
Definition 3.9.1 (Method of Lagrange Multipliers) to find the maximum or minimum values of
a function f (x, y, z) subject to the constraint g(x, y, z) = k.
a) Find all values of x, y, z, λ such that
b) Evaluate f at all critical points from (a). The largest value is the maximum of f and the
smallest value is the minimum of f .
Example 3.50 Find the extremal values of the function f (x, y) = x2 + 2y2 on the circle x 2 + y2 =
1.
∂F
0= = 2x − λ [2x]
∂x
∂F
0= = 4y − λ [2y]
∂y
∂F
0= = x2 + y2 − 1.
∂λ
From the first equation we see that either x = 0 or λ = 1. If x = 0, then y = ±1. If λ = 1, then y = 0
and x = ±1. So there are four critical points (0, 1), (0, −1), (1, 0), (−1, 0). To find the extrema
(maximum or minimum) plug in the critical points to f (x, y):
f (0, 1) = 2
f (0, −1) = 2
f (1, 0) = 1
f (−1, 0) = 1.
Therefore, the max value is 2 occurring at (0, 1) and (0, −1). The minimum value is 1 occurring at
(1, 0) and (−1, 0).
Example 3.51 Find the points on the sphere x2 + y2 + z2 = 4 that are the closest and furthest
from (3, 1, −1).
Solution: Solve using Lagrange Multipliers. If the distance is minimized so is the distance
squared.
Step 1: Define F(x, y, z, λ ) := f (x, y, z) − λ g(x, y, z)
∂F 3
0= = 2(x − 3) − λ [2x] ⇒ x=
∂x 1−λ
∂F 1
0= = 2(y − 1) − λ [2y] ⇒ y=
∂y 1−λ
∂F −1
0= = 2(z + 1) − λ [2z] ⇒ z=
∂z 1−λ
∂F
0= = x2 + y2 + z2 − 4.
∂λ
√
Plugging the values of x, y, z into the constraint gives λ = 1 ± 211 . So there are two critical points
( √611 , √211 , √−2
11
) (max distance) and ( √−6
11
, √−2
11
, √211 ) (min distance).
What happens if we have more than one constraint? Then we add all constraints on as different
Lagrange Multipliers.
Definition 3.9.2 To maximize or minimize a function f (x, y, z) with two constraints g(x, y, z) =
C1 and h(x, y, z) = C2 we set up the functional to minimize as
Example 3.52 Find the maximum value of the function f (x, y, z) = x + 2y + 3z on the curve of
intersection of the plane x − y + z = 1 and the cylinder x2 + y2 = 1.
F(x, y, z, λ , µ) := x + 2y + 3z − λ [x − y + z − 1] − µ x2 + y2 − 1 .
∂F
0= = 1 − λ − 2µx
∂x
∂F
0= = 2 + λ − 2µy
∂y
∂F
0= = 3−λ ⇒ λ =3
∂z
∂F
0= = x−y+z−1
∂λ
∂F
0= = x2 + y2 − 1.
∂µ
−1 5
Since λ = 3, the first equation gives that x = µ and the second equation gives that y = 2µ . Using
√
these relations and the µ constraint we see that µ = ± 229 resulting in x = ∓ √229 , y = ± √529 . From
the constraint g we find that z = 1 ± √729 .
Step 3: Plug the critical points into f to determine the maximum and minimum, ∓ √229 +2 ± √529 +
√
3 1 ± √729 = 3 ± 29 (max with +).
4. Multivariable Integration and Applications
4.1 Introduction
Recall how integration works in one dimension. Given a function f (x) defined in the interval
a ≤ x ≤ b, we can approximate the integral value via an Riemann sum. Divide the interval [a, b] into
n sub-intervals [xi−1 , xi ] of equal width ∆x = b−a
n . Then we can multiply the width of the interval
∗
by the height, f (x ) to form the Riemann sum:
n Z b
∑ f (xi∗ )∆x → f (x)dx as ∆x → 0,
i=1 a
where xi−1 ≤ xi∗ ≤ xi is a point in the ith interval. The integral is obtained by taking the limit as
n → ∞ (∆x → 0). Thus, the integral represents the “area under the curve" (see Fig. 4.1).
We can use a similar procedure to define integration in two dimensions. Instead of intervals
[xi−1 , xi ] we have little rectangles, R = [a, b] × [c, d], with area ∆A = ∆x∆y. Approximate the volume
under the surface by a sum of these boxes.
Figure 4.1: The typical way to envision integration is the sum of a bunch of tiny rectangles under
the desired curve.
112 Chapter 4. Multivariable Integration and Applications
Definition 4.1.1 (Double Integral) The volume under the curve f (x, y) is defined as
m n ZZ
∑∑ f (xi∗j , y∗i j )∆A → f (x, y)dA as ∆A → 0.
i=1 j=1 R
Figure 4.2: As in 1D we can approximate a curve by rectangles, only here. in 2D, we use rectangular
prisms.
V is referred to as an iterated integral. The iterated integral implies that we integrate with respect
to y treating x as a constant, then integrate the resulting function with respect to x.
R The fact that we can integrate in either variable first is the result of Fubini’s Theorem. Once
can find many references online if interested.
4.1 Introduction 113
R3R2
Example 4.1 Evaluate: 0 1 x2 ydydx.
9 2 2 36 9 27
Z 2
= 9ydy = y = − = .
1 2 1 2 2 2
2 )dA
RR
Example 4.2 Evaluate: R (x − 3y where R = [0, 2] × [1, 2].
Example 4.4 Find the volume of the solid S that is bounded by the elliptic parabloid x2 + 2y2 +
z = 16 and the planes x = 2, y = 2 as well as x = 0, y = 0, z = 0.
Solution: Set up the volume integral by finding the appropriate bounds. Also, we need to in-
tegrate z as a function of x and y, z = 16 − x2 − y2 :
Z 2Z 2 Z 2
" 2 # Z 2
1 8
(16 − x2 − y2 )dxdy = 16x − x3 − 2y2 x dy = 32 − − 4y2 dy
V=
0 0 0 3 0 0 3
88 4 3 2 144
Z 2
88
= − 4y2 dy = − y = = 48.
0 3 3 3 0 3
114 Chapter 4. Multivariable Integration and Applications
The double integral simplifies in the special case that the function z = f (x, y) is separable (e.g.,
f (x, y) = g(x)h(y)).
Z bZ d Z bZ d Z b Z d
Z b Z d
f (x, y)dydx = g(x)h(y)dydx = g(x) h(y)dy dx = g(x)dx h(y)dy.
a c a c a c a c
(4.2)
RR
Example 4.5 Evaluate: R sin(x) cos(y)dA where R = [0, π/2] × [0, π/2].
R1R1√
Example 4.6 Evaluate: 0 0 s + tdsdt.
1 1 3
Z 1
3y
3 1 3y 3 2
= e e − 1 dy = e e − 1 = e − 1 .
0 3 0 3
Solution:
Step 1: Determine the bounds of D by graphing the two given curves and finding the points of
intersection.
To find the points of intersection set the two curves equal to each other and solve for x
2x2 = 1 + x2 ⇒ x2 − 1 = 0 ⇒ x = ±1.
Step 2: Set up the integral, then solve. Observe that it is very important to figure out which
curve is on top!!
ZZ Z 1 Z 1+x2 Z 1
" 1+x2 #
xy + y2
(x + 2y)dA = (x + 2y)dydx = dx
D −1 2x2 −1 2x2
Z 1 Z 1
= x(1 + x2 ) + (1 + x2 )2 − 2x3 − 4x4 dx =
x + x3 + 1 + 2x2 + x4 − 2x3 − 4x4 dx
−1 −1
Z 1 1
4 3 2 3 5 1 4 2 3 1 2 32
= −3x − x + 2x + x + 1dx = − x − x + x + x + x = .
−1 5 4 3 2 −1 15
R You must draw a diagram to find the bound correctly! Question: What if you accidentally
switch g1 (x) and g2 (x)? The magnitude of the answer will be the same, but with the wrong
sign, (−) correct answer.
Example 4.9 Find the volume of the solid S that is bounded by the parabloid z = x2 + y2 and
above the region D bounded by y = 2x and y = x2 .
Solution:
Step 1: Determine the bounds of D by graphing the two given curves and finding the points of
intersection.
To find the points of intersection set the two curves equal to each other and solve for x
2x = x2 ⇒ x2 − 2x = 0 ⇒ x = 0, x = 2.
116 Chapter 4. Multivariable Integration and Applications
Step 2: Set up the integral, then solve. Observe that it is very important to figure out which curve
is on top!!
Z 2 Z 2x Z 2
" 2x #
1
ZZ
x2 + y2 dA = x2 + y2 dydx = x2 y + y3 dx
D 0 x2 0 3 x2
Z 2 Z 2
8 1 14 3 1
= 2x3 + x3 − x4 − x6 dx = x − x4 − x6 dx
0 3 3 0 3 3
2
14 1 1 216
= x4 − x5 − x7 =
.
12 5 21 0 35
R In the previous
√ example, we could also write the domain D in terms of functions of y, x = y/2
and x = y. Then the points of intersection are (0, 0) and (2, 4) with integral
Z 4 Z y/2
216
√ x2 + y2 dxdy = .
0 y 35
Solution:
Step 1: Determine the bounds of D by graphing the two given curves and finding the points of
intersection.
To find the points of intersection set the two curves equal to each other and solve for x
1
x = y + 1 = y2 − 3 ⇒ y2 − 2y − 8 = (y − 4)(y + 2) = 0 ⇒ y = 4, y = −2.
2
Step 2: Set up the integral, then solve. Observe that it is very important to figure out which curve
is on top!!
" #
1 2 y+1
ZZ Z 4 Z y+1 Z 4
xydA = xydxdy = x y dy
D −2 12 y2 −3 −2 2 1 2
y −3 2
Z 4 Z 4
1 1 1 1
= − ( y2 − 3)2 y + (y + 1)2 ydy = − y5 + 2y3 + y2 − 4ydy
−2 2 2 2 −2 8
4
1 6 1 4 1 3 2
= − y + y + y − 2y = 36.
48 2 3 −2
R If we wanted to integrate the previous example in y and define the domain between two
functions of x, first we would need to break the integral into two parts:
ZZ Z −1 Z √2x+6 Z 5 Z √2x+6
xydA = √ xydxdy + xydxdy.
D −3 − 2x+6 −1 x−1
Example 4.11 Find the volume of a tetrahedron that is bounded by the planes x + 2y + z = 2,
x = 2y, x = 0, and z = 0.
4.2 Double Integrals Over General Regions 117
Solution:
Step 1: Determine the bounds of D by graphing the two given curves and finding the points of
intersection.
To find the points of intersection set the two curves equal to each other and solve for x
x x
y = 1− = ⇒ x = 1.
2 2
Step 2: Set up the integral, then solve. Observe that it is very important to figure out which curve
is on top!!
ZZ Z 1 Z 1−x/2 Z 1
" 1−x/2 #
2y − xy − y2
zdA = (2 − x − 2y)dydx = dx
D 0 x/2 0 x/2
Z 1
= x2 − 2x + 1dx
0
1
1 3 2
1 1
= x − x + x = − 1 + 1 = .
3 0 3 3
R1R1
Example 4.12 Evaluate: 0 x sin(y2 )dydx.
Solution: This would be too hard to evaluate as written. Instead, it may be easier to integrate as a
function of x first.
Step 1: Determine the bounds of D by graphing the two given curves and finding the points
of intersection.
To find the points of intersection set the two curves equal to each other and solve for x
x=y=1 ⇒ x = 1.
Step 2: Set up the integral, then solve. Observe that it is very important to figure out which curve
is on top!!
Z 1Z 1 Z 1Z y Z 1 y
2 2 2
sin(y )dydx = sin(y )dxdy = sin(y )x dy
0 x 0 0 0 0
Z 1 1
2 1 2
1
= sin(y )ydy = − cos(y ) = [cos(1) + 1] .
0 2 0 2
1 2 2 1
Z 3Z 2 Z 1 Z 3Z 2 Z 3Z 2
2 1 2
xyz dxdydz = x yz dydz = yz dydz
0 −1 0 0 −1 2 0 0 −1 2
1 2 2 2 1 3 3 27
Z 3 Z 3 Z 3
2 1 2 3 2
= y z dz = z − z dz = z dz = z = .
0 4 −1 0 4 0 4 4 0 4
R The Fubini Theorem still holds so we can take the three integrals in any order we see fit!
4.3 Triple Integrals 119
Definition 4.3.1 (Iterated Integrals) Suppose a region is bounded between two surfaces. Then
we can compute the three-dimensional iterated integrals
Z b Z g2 (x) Z u2 (x,y) Z d Z h2 (y) Z u2 (x,y)
f (x, y, z)dzdydx or f (x, y, z)dzdxdy. (4.6)
a g1 (x) u1 (x,y) c h1 (y) u1 (x,y)
RRRR
Example 4.15 Evaluate: E zdV where E is a solid tetrahedron bounded by x = 0, y = 0,
z = 0, x + y + z = 1.
Solution:
Step 1: Draw Two Diagrams! One for the 3D surfaces and one for the two-dimensional area
D we will integrate over. These will be helpful in finding the curves and points of intersection. The
points of intersection in the plane z = 0 are the lines y = 0 and y = 1 − x.
1 2 1−x−y
Z 1 Z 1−x Z 1−x−y Z 1 Z 1−x
zdzdydx = z dydx
0 0 0 0 0 2 0
Z 1 Z 1−x
1
= (1 − x − y)2 dydx
0 0 2
Z 1 1−x
1 3
= − (1 − x − y) dx
0 6 0
Z 1
1
= (1 − x)3 dx
0 6
1
1 4
1
= − (1 − x) = .
24 0 24
RRRR
Example 4.16 Evaluate: 6xydV where E is a solid tetrahedron bounded by the plane
√ E
z = 1 + x + y, the curve y = x, y = 0, x = 1.
Solution:
Step 1: Draw Two Diagrams! One for the 3D surfaces and one for the two-dimensional area
D we will integrate over. These will be helpful in finding the curves and points of intersection. The
√
points of intersection in the plane z = 0 are the lines y = 0 and y = x where x is from 0 to 1.
120 Chapter 4. Multivariable Integration and Applications
4.4.1 Mass
Suppose a plate occupies a region D in the xy-plane with variable density ρ(x, y).
Definition 4.4.1 (Mass) In physics, the density is defined as the mass per unit of volume, ρ = Vm .
We can define the pass even when the density is non-uniform ρ = ρ(x, y),
ZZ
m= ρ(x, y)dxdy. (4.8)
D
Similarly, if an electric charge is distributed over a region D with a charge density (charge/area)
given by σ (x, y), then the total charge is
ZZ
Q := σ (x, y)dA.
D
4.4 Applications of Integration 121
Example 4.17 Suppose the charge is distributed over a triangular region D between x = 1, y = 1,
y = 1 − x so that the charge density at (x, y) is σ (x, y) = xy (C/m2 ). Find the charge Q.
Solution: As in the last section we need to find the points of intersection before defining the
bounds of the integral. Here, the lines intersect at (1, 0), (0, 1), and (1, 1).
In physics, the center of mass for a distribution of mass in space is the unique point where the
weighted relative position of the distributed mass sums to zero. In other words, it is the point where
if a force is applied the object will move in direction of force without rotation.
Definition 4.4.3 (Centers of Mass) The center of mass of an object
1 My 1 Mx
ZZ ZZ
x̄ := xρ(x, y)dxdy = , ȳ := yρ(x, y)dxdy = , (4.10)
m D m m D m
RR
where the mass is m = D ρ(x, y)dydx.
In mathematics and physics, the centroid or geometric center of a two-dimensional region (area)
is the arithmetic mean ("average") position of all the points in the shape.
Definition 4.4.4 (Centroid) The centroid of an object is the point where it would balance on the
end of the rod if the density were uniform.
RR RR
xρ(x, y)dxdy 1 yρ(x, y)dxdy 1
ZZ ZZ
xcent := RRD =ρ=const. xdA, ycent := RRD =ρ=const. ydA.
D ρ(x, y)dydx A D D ρ(x, y)dydx A D
(4.11)
Example 4.18 Find the mass and the center of mass of a triangular plate with vertices (0, 0), (1, 0), (0, 2)
and density ρ(x, y) = 1 + 3x + y.
Solution: First we need to find the boundary curves, in particular the line L forming the hy-
2−0
potenuse of the triangular plate. Using point slope form: (y − 2) = 0−1 (x − 0) ⇒ y = −2x + 2.
122 Chapter 4. Multivariable Integration and Applications
1 −2x+2
ZZ Z 1 Z −2x+2 Z 1
m= ρ(x, y)dA = 1 + 3x + ydydx = y + 3xy + y2 dx
D 0 0 0 2 0
Z 1 1
2 4 3 8
= −4x + 4dx = − x + 4x = .
0 3 0 3
1 2 −2x+2
Z 1 Z −2x+2
1 3 1
Z
2
x̄ = x(1 + 3x + y)dydx = xy + 3x y + xy dx
m 0 0 8 0 2 0
" 1 #
3 1 3 3
Z
3 4 2
= −4x + 4xdx = −x + 2x = ,
8 0 8 0 8
and
3 2 1 3 −2x+2
Z 1 Z −2x+2
Z 1
1 3 1 2
ȳ = y + xy + y
y(1 + 3x + y)dydx = dx
m 0 0 0 2 8
2 3 0
" 1 #
3 1 1 3 3 10 1
Z
−6x3 − 10x2 + 2x + 2 + (−2x + 2)3 dx = x4 − x3 + x2 + 2x − (−2x + 2)4
=
8 0 3 8 2 3 24 0
11
= .
16
In addition, let’s compute the centroid to show how it differs from the center of mass. First we must
compute the area
Z 1 Z −2x+2 Z 1 1
2
A := 1dydx = −2x + 2dx = −x + 2x = 1.
0 0 0 0
Example 4.19 Find the moments of inertia Ix , Iy , Iz of a homogeneous rectangular plate with
corners (0, 0), (0, 1), (2, 1), (2, 0) and constant density ρ(x, y) = ρ.
ρ 3 2 8
Z 2Z 1 Z 2
2 2
Ix = x ρdydx = x ρdx = x = ρ,
0 0 0 3 0 3
ρ 2 2
Z 2Z 1 Z 2
2 ρ
Iy = y ρdydx = dx = x = ρ,
0 0 0 3 3 0 3
1 3 1 ρ 3 ρ 2 10
Z 2Z 1 Z 2 Z 2
2 2 2 2 ρ
Iz = (x + y )ρdydx = (x y + y )ρ dx = ρx + dx = x + x = ρ.
0 0 0 3 0 0 3 3 3 0 3
Notice along the way we proved the Perpendicular Axis Theorem giving a relation between the
moments, Ix + Iy + Iz .
In one dimension, the probability of finding a value in the interval [a, b] given a probability
density f is
Z b
P(a ≤ x ≤ b) = f (x)dx.
a
The analogous calculation in two-dimension refers to a joint probability density, f (x, y), in two
variables
Z bZ d Z ∞Z ∞
P(a ≤ x ≤ b, c ≤ y ≤ d) = f (x, y)dydx, f (x, y)dydx = 1.
a c −∞ −∞
Example 4.20 The joint density function for X and Y is given by:
(
C(x + 2y), if 0 ≤ x ≤ 10, 0 ≤ yleq10
f (x, y) := .
0m otherwise
1
Thus, C = 1500 .
Another widely used concept from probability is the concept of an expected value. This is the
value of x and y one should expect to see on average if many trials are run.
Definition 4.4.7 (Expected Value) Given a joint probability density f (x, y), the expected values,
µx , µy , can be computed as
ZZ ZZ
µx := x f (x, y)dA = mx̄, µy := y f (x, y)dA = mȳ. (4.14)
Observe the relationship between the expected values and the centers of mass defined earlier.
1 2 1 3 1 1 1 1
= x − x = − = .
2 3 0 2 3 6
1 6 1 5 1 4 1
Z 1
1 5 4 1 3 1
= x − x + x dx = x − x + x = .
0 2 2 12 5 8 0 120
4.5 Change of Variables in Integrals 125
Z 1 Z x−x2 Z 1 x−x2
1 1
ZZ
2 3
ȳ = yρ(x, y)dA = 120
xy dydx = 120 xy dx
m D 0 0 3 0 0
" #
1 8 1 7 1 6 1 5 1
Z 1
1 7 6 5 1 4 1
= 120 − x + x − x + x dx = 120 − x + x − x + x = .
0 3 3 24 7 6 15 0 7
d) Find the volume of revolution. Recall volume of a cylinder is πr2 , but here the curve y(x) is
the radius and the x interval [0, 1] is the height
Z 1 Z 1 Z 1
2 2 2
V= π(x − x ) dx = π
πy dx = x4 − 2x3 + x2 dx
0 0 0
" #
1 5 1 4 1 3 1 π
=π x − x + x = .
5 2 3 0 30
Example 4.22 Find the moments of inertia for the same density, but under the curve f (x) = x2
(see Book).
Definition 4.5.1 (Polar Coordinates) Recall the relationship between (x, y) and (r, θ ):
r2 = x2 + y2 , θ = tan−1 (y/x)
x = r cos(θ ), y = r sin(θ ).
For normal integration in Cartesian coordinates, we divide the region into rectangles of area
A = dxdy, not so in polar coordinates! Instead we have a “polar rectangle" whose ares is not drdθ ,
but A = rdrdθ since
1 1 1
Area: = r22 ∆θ − r12 ∆θ = (r12 − r22 )∆θ
2 2 2
1
= (r2 − r1 )(r2 + r1 )∆θ = r∗ ∆r∆θ → rdrdθ
2
as ∆r → 0, ∆θ → 0.
2
RR
Example 4.23 Evaluate R2 (3x + 4y )dA where R2 = {1 ≤ r ≤ 2, 0 ≤ θ ≤ π}.
Solution: Compute
ZZ Z πZ 2 Z πZ 2
(3x + 4y2 )dA = [3r cos(θ ) + 4r2 sin2 (θ )]rdrdθ = 3r2 cos(θ ) + 4r3 sin2 (θ )drdθ
R2 0 1 0 1
Z π 2 Z π
3 4 2
7 cos(θ ) + 15 sin2 (θ )dθ
= r cos(θ ) + r sin (θ ) dθ =
0 1 0
π
15 15 15 15 15π
Z π
= 7 cos(θ ) + − cos(2θ )dθ = 7 sin(θ ) + θ − sin(2θ ) = .
0 2 2 2 4 0 2
Example 4.24 Find the volume of the solid bounded by the plane z = 0 and the parabloid
z = 1 − x 2 − y2 .
Solution: Compute
1 2 1 4 1
ZZ Z 2π Z 1 Z 2π
2 2 2
V= (1 − x − y )dydx = (1 − r )rdrdθ = r − r dθ
D 0 0 0 2 4 0
θ 2π π
Z 2π
1
= dθ = = .
0 4 4 0 2
Example 4.25 Given a semicircular sheet of material of radius a, θ ∈ [−π/2.π/2], and constant
density ρ find (a) the center of mass, (b) Moments.
4.5 Change of Variables in Integrals 127
ZZ Z π/2 Z a Z π/2 Z a
x̄ = xρdA = r cos(θ )ρrdrdθ = r2 cos(θ )ρdrdθ
−π/2 0 −π/2 0
a
1 a3
Z π/2 Z π/2
ρr3 cos(θ ) dθ =
= ρ cos(θ )dθ
−π/2 3 0 −π/2 3
a3
π/2
2a3
= ρ sin(θ ) = ρ.
3 −π/2 3
1 2 a
Z π/2 2
πa2
a
ZZ Z π/2 Z Z π/2
m= ρdA = ρrdrdθ = r dθ = dθ = .
−π/2 0 −π/2 2 0 −π/2 2 2
Then
ρ π/2 a 2 2 ρ π/2 a 3 2
ZZ Z Z Z Z
ρ
Iy = x2 dA = r cos (θ )rdrdθ = r cos (θ )drdθ
m m −π/2 0 m −π/2 0
ρ π/2 1 4 2 a ρ π/2 a4
Z Z
= r cos (θ ) drdθ = (1 − sin(2θ ))dθ
m −π/2 4 0 m −π/2 8
ρ a4
π/2
1 ρ πa4 a2
= ( (θ + cos(2θ ))) = =ρ .
m 8 2 −π/2 m 8 4
We can also compute double integrals for arbitrarily polar regions bounded by continuous
curves
ZZ Z β Z h2 (θ )
f (x, y)dA = f (r cos(θ ), r sin(θ ))rdrdθ . (4.16)
R α h1 (θ )
Example 4.26 Use the double integral to find the area of 1 loop of the 4 leaved rose r = cos(2θ ).
1 2 cos(2θ )
ZZ Z π/4 Z cos(2θ ) Z π/4
A(D) = dA = rdrdθ = r dθ
D −π/4 0 −π/4 2 0
" π/4 #
1 1 π/4 1 1
Z π/4 Z
π
cos2 (2θ )dθ =
= 1 + cos(4θ )dθ = θ + sin(4θ ) = .
−π/4 2 4 −π/4 4 4 −π/4 8
Example 4.27 Find the value of a solid that lies under the parabloid z = x2 + y2 , above the
xy-plane and inside the cylinder x2 + y2 = 2x ⇔ (x − 1)2 + y2 = 1.
is
1 4 2 cos(θ )
ZZ Z π/2 Z 2 cos(θ ) Z π/2 Z π/2
2 2 3
V= (x + y )dA = r drdθ = r dθ − 4 cos4 (θ )dθ
D −π/2 0 −π/2 4 0 −π/2
1 + cos(2θ ) 2
Z π/2
=4 dθ
−π/2 2
π/2 1 1
Z Z π/2
= 1 + 2 cos(2θ ) + cos2 (2θ )dθ = 1 + 2 cos(2θ ) + + cos(4θ )dθ
−π/2 −π/2 2 2
π/2
θ 1 3π
= θ + sin(2θ ) + + sin(4θ ) = .
2 8 −π/2 2
A typical volume element is dV = rdrdθ dz and arc length ds2 = dr2 + r2 dθ 2 + dz2 .
2π
x = r cos(θ ) = 2 cos( ) = 2(−1/2) = −1
3
2π √ √
y = r sin(θ ) = 2 sin( ) = 2( 3/2) = 3
3
z = 1.
(b) Find the cylindrical coordinates of the point (3, −3, −7).
p √ √
r= x2 + y2 = 9 + 9 = 3 2
y −3 7π
tan(θ ) = = = −1 ⇒ θ = + 2nπ
x 3 4
z = −7.
4.7 Cylindrical Coordinates 129
R Cylindrical coordinates are most useful in problems with symmetry about some axis (e.g., a
cylinder). In Cartesian coordinates a cylinder is x2 + y2 = c2 and in Cylindrical coordinates
r = c.
Solution: Solve:
Z 2 Z √4−x2 Z 2 Z 2π Z 2 Z 2 2 Z 2π Z 2
2 2 2 3
√ √ (x + y )dzdydx = r rdzdrdθ = r z drdθ
−2 − 4−x2 x2 +y2 0 0 r 0 0 r
1 5 1 4 2
Z 2π Z 2 Z 2π
4 3
= −r + 2r drdθ = − r + r dθ
0 0 0 5 2 0
Z 2π Z 2π
32 8 16π
= − + 8dθ = dθ = .
0 5 0 5 5
There are many domains which are easier to describe in spherical coordinates such as (i) a
sphere ρ = const, (ii) the half-plane φ = c, the upper half cone θ = c for c < π2 and lower half cone
θ = c for c > π2 .
130 Chapter 4. Multivariable Integration and Applications
ZZZ Z dZ βZ b
f (x, y, z)dV = f (ρ sin(θ ) cos(φ ), ρ cos(θ ) sin(φ ), ρ cos(θ ))ρ 2 sin(θ )dρdφ dθ .
E c α a
(4.18)
Solution: first we observe that the equation for the sphere can be written as ρ 2 = ρ cos(θ ) ⇒ ρ =
cos(θ ) and the equation of the cone becomes ρ cos(θ ) = ρ 2 sin2 (θ ) cos2 (φ ) + ρ 2 sin2 (θ ) sin2 (φ ) =
ρ sin(θ ). Thus, θ = π/4.
Z π/4 Z 2π Z cos(θ ) Z π/4 Z 2π cos(θ )
1 3
ZZZ
2
V (E) = dV = ρ sin(θ )dρdφ dθ = ρ sin(θ ) dφ dθ
E 0 0 0 0 0 3 0
Z π/4 Z 2π
1 1
Z π/4
= cos3 (θ ) sin(θ )dφ dθ = 2π cos3 (θ ) sin(θ )dθ
0 0 3 0 3
" π/4 #
2π 1 4
2π 1 1 2π 3 π
= − cos (θ ) = − + = = .
3 4 0 3 16 4 3 16 8
4.7 Cylindrical Coordinates 131
4.7.1 Jacobians
Jacobians describe how a basic area element is scaled when changing coordinates. Consider a
transformation T from the xy-plane to the uv-plane, T (x, y) = (u, v). The rectangular area element
in (x, y), dA = dxdy will becomes distorted in the uv-plane and have a new area. The scaling of
one are to another after a transformation is the Jacobian.
Definition 4.7.3 (2D Jacobian) In 2D, when we go from (x, y) to some new coordinates (s,t)
we compute the Jacobian using partial derivatives and determinants
x, y ∂ (x, y) ∂x ∂x
∂ s ∂t
J=J = := ∂ y ∂ y . (4.19)
s,t ∂ (s,t) ∂ s ∂t
The area element dA = dydx is replaced buy |J|dsdt. Notice the absolute value.
Definition 4.7.4 (3D Jacobian) In 3D, when we go from (x, y, z) to some new coordinates (r, s,t)
we compute the Jacobian using partial derivatives and determinants
∂x ∂x ∂x
x, y, z ∂ (x, y, z) ∂∂ yr ∂∂ ys ∂∂ty
J=J = := ∂ r ∂ s ∂t . (4.20)
r, s,t ∂ (r, s,t) ∂z ∂z ∂z
∂ r ∂ s ∂t
RRR
The
RRR
area element dA = dzdydx is replaced buy |J|drdsdt. So f (x, y, z)dxdydz =
f (r, s,t)|J|drdsdt.
ds 2 dr 2
2
Express the velocity of a particle in spherical coordinates v2 = + r2 dθ
R dt = dt dt +
2
r2 sin2 (θ ) dφ
dt .
132 Chapter 4. Multivariable Integration and Applications
Area ∆Ai j = |a × b|
a = ∆xî + fx (xi , y j )∆xk̂
b = ∆yĵ + fy (xi , y j )∆yk̂
where the partial derivatives are the slopes of the tangent lines through the point Pi j . Thus,
î ĵ k̂
a × b = ∆x 0 fx ∆x
= − fx ∆x∆yî − fy ∆x∆yĵ + ∆x∆yk̂.
(4.21)
0 ∆y fy ∆y
Definition 4.8.1 (Area of Surface) The area of the surface with equation z = f (x, y) for (x, y) ∈ D
where fx , fy are continuous is
s 2 2
∂z ∂z
ZZ q ZZ
A= [ fx (x, y)]2 + [ f y (x, y)]2 + 1dA = 1+ + dA . (4.23)
D D ∂x ∂y
R The formula
r for the area of a surface is the 3d analogue of the formula for arclength
Rb 2
dy
s = a 1 + dx dx.
Example 4.38 Find the surface area of the part of the surface z = x2 + 2y that lies above the
triangular region in the xy-plane with vertices (0, 0), (1, 0), (1, 1).
Solution: Find the necessary partial derivatives and use the formula for the area:
ZZ q Z 1Z xq Z 1Z xp
A= fx2 + fy2 + 1dA = (2x)2 + (2)2 + 1dydx = 4x2 + 5dydx
D 0 0 0 0
1p
x Z 1 p Z 9
1 1/2
Z
u du for u = 4x2 + 5 and du = 8xdx
= 2
4x + 5y dx = x 4x2 + 5dx =
0
0 0 5 8
√
1 3/2 9 27 5 5 √
1
= u = − = 27 − 5 5 .
12 5 12 12 12
Example 4.39 Find the area of the part of the paraboloid z = x2 + y2 from z = 0 to z = 9 (this
surface is above the disk D with center (0, 0) and radius 3.
4.8 Surface Integrals 133
Solution: Find the necessary partial derivatives and use the formula for the area:
ZZ q ZZ q ZZ p
A= 2 2
fx + fy + 1dA = 2 2
(2x) + (2y) + 1dA = 4x2 + 4y2 + 1dA
D D D
Z 2π Z 3 p Z 2π Z 3
1
= 4r2 + 1rdrdθ = dθ (4r2 + 1)1/2 8rdr
0 0 0 0 8
" 3 #
π √
1 2 3/2
1 3/2 1
= 2π (4r + 1) = 2π (37) − = 37 37 − 1 .
12 0 12 12 6
Example 4.40 Find the area of the part of the plane z = 2 + 3x + 4y that lies above the rectangle
[0, 5] × [1, 4].
Solution: Find the necessary partial derivatives and use the formula for the area:
ZZ q ZZ p Z 4Z 5
A= fx2 + fy2 + 1dA = 32 + 42 + 1dA = dxdy
D D 1 0
Z 4√ 5 Z 4 √
√
= 26x dy = 5 26dy = 20 26.
1 0 1
2
x3/2 + y 3/2
Example 4.41 Find the area of the part of the surface z = 3 that lies above the
rectangle [0, 1] × [0, 1].
Solution: Find the necessary partial derivatives and use the formula for the area:
ZZ q ZZ q Z 1Z 1p
A= (x1/2 )2 + (y1/2 )2 + 1dA =
fx2 + fy2 + 1dA = x + y + 1dydx
D D 0 0
Z 1Z 1 Z 1 1 Z 1
2 3/2 2 2
1/2
(x + 2)3/2 − (x + 1)3/2 dx
= (x + y + 1) dydx = (x + y + 1) dx =
0 0 0 3 0 0 3 3
1
4 4 4 4 4 4 4 √ √
= (x + 2)5/2 − (x + 1)5/2 = 35/2 − 25/2 − 25/2 +
= 9 3−8 2+1 .
15 15 15 0 15 15 15 15
Example 4.42 Find the area of the part of the paraboloid z = 4 − x2 − y2 above the xy-plane.
Solution: Find the necessary partial derivatives and use the formula for the area:
ZZ q ZZ q ZZ p
A= fx2 + fy2 + 1dA = (−2x)2 + (−2y)2 + 1dA = 4x2 + 4y2 + 1dA
D D D
Z 2π Z 2 p Z 2π Z 2 Z 2π 2
2
1 2 1/2 1 2 3/2
= 4r + 1rdrdθ = (4r + 1) 8rdrdθ = (4r + 1) dθ
0 0 0 0 8 0 12 0
Z 2π √
1 π
= (173/2 − 1) dθ = 17 17 − 1 .
0 12 6
5. Vector Analysis
Solution: The rocket (ignoring gravity and air resistance) will follow a straight line
x(t) = 1 + t
x(t) = x0 + vt = y(t) = 1 + 2t . (5.1)
z(t) = 1 + 3t
5.2 Triple Products 137
We now want to minimize the distance d = |x − x0 | from the observer at x0 = (2, 1, 3) from the
current position of the rocket at time t, x(t). Equivalently we can minimize the square of the
distance (x − x0 )2 . To minimize we differentiate the equation of motion with respect to t:
d
(x − x0 )2 = 2(x − x0 ) · ẋ = 2[x1 − x0 + tv] · v = 0, v = ẋ. (5.2)
dt
Since ẋ = v is the tangent vector of the line, geometrically we say that the shortest distance vector
through a point x0 is perpendicular to the line. Now solving for the time t when the rocket is closest
we find
(x1 − x0 ) · v 1
t =− = .
v2 2
Now substituting t back into (6.202) yields x(1/2) = (3/2, 2, 5/2) as the point
p the rocket is closest.
So the shortest distance is d = |x0 − (3/2, 2, 5/2)| = |(−1/2, 1, −1/2)| = 3/2.
Law of Cosines
Let vector C = A + B and take a dot product with itself
C2 = C · C = (A + B) · (A · B) = A · A + B · B + 2A · B = A2 + B2 + 2|A||B| cos(θ ). (5.3)
This is exactly the Law of Cosines!
R Observe that the other possible quantities do not make sense: 1. (A · B) ×C (number × vector)
and 2. (A · B) ·C (number · vector).
Since the cross product changes sign when the order is reversed, we can only rotate the three
quantities A, B,C together clockwise or counter clockwise.
138 Chapter 5. Vector Analysis
Figure 5.2: Image from Weber et al. Essential Math Methods for Physicists
Example 5.1 A parallelepiped has sides A = î + 2ĵ − k̂, B = ĵ + k̂, C = î − ĵ. Find the volume.
There is an alternate definition of the Triple Scalar Product one can use involving determinants
(cf. Linear Algebra Ch. 3)
Ax Ay Az
A · (B ×C) = Bx By Bz = Ax (ByCz − BxCy ) + Ay (BzCx − BxCz ) + Az (BxCy − ByCx ). (5.5)
Cx Cy Cz
Example 5.2 Apply the alternate definition of the triple scalar product to the last example.
Example 5.3 Find the volume of a parallelepiped defined by A = (0, 1, 2), B = (1, 2, 3), C =
(−1, −1, −1).
Solution: Compute
0 1 2
= 0+1(−1)1+2 1 3 +2(−1)1+3 1 2
A·(B×C) = 1
2 3 = −2+2 = 0.
−1 −1 −1 −1
−1 −1 −1
Wait! There is no volume? It turns out that A − B = C forming a linear combination. Thus, we do
not have a basis and the three vectors A, B,C lie in the same plane giving a volume of zero.
5.2 Triple Products 139
Figure 5.3: Image from Weber et al. Essential Math Methods for Physicists
Solution: Thus,
î ĵ k̂ î ĵ k̂
A × (B ×C) = A × 0 1 1 = A × (1, 1, −1) = 1 2 −1 = (−1, 0, −1).
1 −1 0 1 1 −1
We want to find the torque produced by the force F about any axis L (line). Let r be the vec-
tor from a point on line L to the force F. For simplicity let the line L = k̂ (z-axis). Then the torque
about the line L is:
τ L := n̂ · (r × F) (5.7)
140 Chapter 5. Vector Analysis
where n̂ is the unit normal in the direction of L. We can think of this as the projection of the torque
in the direction of L.
Can this be simplified further? Break the vectors r and F into components parallel to L and
perpendicular to L. Then
r × F = (rk + r⊥ ) × (Fk + F⊥ )
= rk × Fk + r⊥ × Fk + rk × F⊥ + r⊥ × F⊥
= 0 + r⊥ × Fk + rk × F⊥ + r⊥ × F⊥
Then we compute
The last line follows from the fact that rk , Fk are parallel to n̂ so that n̂ · (rk × ·) = 0 and n̂ · (Fk × ·) =
0. Thus, the torque about the line L is the torque based on the components perpendicular to L.
Example 5.5 If a force F = î + 2ĵ − k̂ acts at the point P = (1, 2, 3), find the torque of F about
the line x = 2î + ĵ + (î + 2ĵ + 3k̂)t.
Solution: First, find the vector torque about a point on the line (observe x0 = (2, 1, 0), v = (1, 2, 3)).
This is τ = r × F where r = P − x0 = (1, 2, 3) − (2, 1, 0) = (−1, 1, 3) and thus the torque is
î ĵ k̂
τ = r × F = −1 1 3 = (−7, 2, −3).
1 2 −1
√
Now we can compute the torque about the line L using the unit normal n̂ = v/|v| = (1, 2, 3)/ 12 + 22 + 32 =
√1 (1, 2, 3),
14
1 1 −12
τ L = n̂ · (r × F) = √ (1, 2, 3) · (−7, 2, −3) = √ (−7 + 4 − 9) = √ .
14 14 14
Observe that the negative sign indicated that the torque acts in the direction −n̂.
L := r × (mv) = mr × v, (5.8)
where the linear velocity v = ω × r for angular velocity ω. Thus, the angular momentum becomes
L = mr × (ω × r) . (5.9)
5.3 Fields
A vector field is a physical quantity, which has a different value at each point in space. Common
examples are temperature T or the gravitational force of a satellite on Earth |F| = Gmr12m2 .
In each example, there is a physical quantity in some region
5.3 Fields 141
i) If the physical quantity is a scalar, then we have a scalar field, e.g., Temperature T .
ii) If the physical quantity is a vector, then we have a vector field, e.g., Electric Field E,
Magnetic Field B, Force F, velocity v.
Definition 5.3.1 Let D be a region in 2D. A vector field is a function F that assigns to each
point (x, y) in D a two-dimensional vector F(x, y) or in 3D F(x, y, z). To draw a vector field,
place an arrow at equally spaced points (x, y) representing the force F(x, y).
F(x, y) = P(x, y)î + Q(x, y)ĵ = (P(x, y), Q(x, y)) (5.10)
where P, Q are scalar functions of two variables, scalar fields. In 3D it can be written as
F(x, y, z) = P(x, y, z)î + Q(x, y, z)ĵ + R(x, y, z)k̂ = (P(x, y, z), Q(x, y, z), R(x, y, z)). (5.11)
Example 5.9 Fluid flows along a pipe. Let V(x, y, z) be the velocity vector at a point. Then the
velocity field V assigns a vector to each point in a certain domain (interior of the pipe). Observe
that the velocity spreads out and has a smaller magnitude when the pipe diameter is larger.
142 Chapter 5. Vector Analysis
Example 5.11 Assume there is an electric charge, Q, at the origin. By Coulomb’s Law, the
electric force exerted by this charge on a charge q located at (x, y, z) is
εqQ
F(x, y, z) = x (5.13)
|x|3
5.4 Differentiation of Vectors 143
where ε is a constant. For like charges qQ > 0 (repulsive) and for unlike charges qQ < 0 (attractive).
v = vx î + vy ĵ + vz k̂ = (vx , vy , vz ) (5.14)
The derivative of the vector v is a vector whose components are the derivatives of the components
of v.
Example 5.12 Let (x, y, z) be the coordinates of a particle at time t.
Displacement r = (x, y, z)
dr dx dy dz
Velocity v= = , ,
dt dt dt dt
d 2 r dv
2
d x d2y d2z
Acceleration z= 2 = = , , .
dt dt dt 2 dt 2 dt 2
One can also show the following relations for a vector u = (ux , uy , uz ) by working with compo-
nents
d da du
i) dt (au) = dt u + a dt
d du
ii) dt (u · v) = dt · v + dv
dt · u
d du
iii) dt (u × v) = dt × v + u × dv
dt
Solutions: 1. To find the time the particle passes through the point (1, −1, 5) we set each of
these values equal to the corresponding component of r(t) and solve for t. Thus,
4 + 3t = 1
t 3 = −1
−5t = 5.
dr
2. The velocity is v = dt = (3, 3t 2 , −5). At time t = −1, the velocity is (3, 3, −5).
3. The line tangent has equation x = x0 + vt where x0 = (1, −1, 5) and v = (3, 3, −5). The
144 Chapter 5. Vector Analysis
plane normal has equation ax + by + cz + d = 0 where (a, b, c) is the normal to the plane (parallel
to the velocity v. Thus,
Example 5.14 The position of a particle is r(t) = (cos(t), sin(t),t). Show that the speed |v| and
the acceleration |a| are constant.
dr
q √
v= = (− sin(t), cos(t), 1) ⇒ |v| = (−sin(t))2 + (cos(t))2 + 1 = 2
dt
dr2
q
a = 2 = (− cos(t), − sin(t), 0) ⇒ |a| = (− cos(t))2 + (− sin(t))2 + 0 = 1.
dt
der dθ dθ dθ
= (− sin θ , cos(θ ) ) = eθ
dt dt dt dt
deθ dθ dθ dθ
= (− cos(θ ) , − sin(θ ) ) = −er
dt dt dt dt
Solution: Take the time derivative and use the relationships above
du dur der duθ deθ dur dθ dθ duθ
= er + ur + eθ + uθ = er − uθ + eθ ur + . (5.18)
dt dt dt dt dt dt dt dt dt
dr dr dθ
v= = er + eθ r
dt dt" dt
2 2
2 # 2
d r d r dθ d θ dr dθ
a = 2 = er −r + eθ r 2 + 2 .
dt dt 2 dt dt dt dt
5.5 Directional Derivative and Gradient 145
Since heat flows from hot to cold, the heat would follow the direction of the maximal rate of
decrease.
Problem: Consider a scalar function φ (x, y, z) (e.g. Temperature). We want to find the derivative
in the direction s, dφ
dt , at a given point (x0 , y0 , z0 ) in a given direction.
Suppose u = (a, b, c) is a unit vector in the s direction. Move a distance s in the direction of
u: (x, y, z) = (x0 , y0 , z0 ) + s(a, b, c) = x0 + su. Along this line, one can think of x, y, z as functions
of only a single variable s. Thus, using the chain rule we find
dφ ∂ φ dx ∂ φ dy ∂ φ dz
= + +
ds ∂ x ds ∂ y ds ∂ z ds
∂φ ∂φ ∂φ
= a+ b+ c
∂x ∂y ∂z
∂φ ∂φ ∂φ
= , , · (a, b, c)
∂x ∂y ∂z
= ∇φ · u
∂φ ∂φ ∂φ
Definition 5.5.1 The vector ∇φ = ∂x , ∂y , ∂z is called the gradient of φ and may also be
denoted grad(φ ).
∂φ ∂φ ∂φ
∇φ := î + ĵ + k̂ (5.19)
∂x ∂y ∂z
dφ
= ∇φ · u = au · u = a|u|2 = a.
ds
If the gradient is not in this direction (instead in direction of unit vector v), then
dφ
= ∇φ · u = av · u = a|v||u| cos(θ ) = a cos(θ ) < a.
ds
146 Chapter 5. Vector Analysis
Example 5.17 Find the directional derivative of φ = xy2 + 3yz at (1, 0, 2) in the direction
v = (1, 2, 2).
Solution:
Step 1: Obtain the unit vector u in the direction of v
v 1 1
u= =√ (1, 2, 2) = (1, 2, 2)
|v| 12 + 22 + 22 3
dφ 1
= ∇φ · u = (0, 6, 0) · (1, 2, 2) = 0 + 6(2/3) + 0 = 4. (5.21)
ds 3
Solution: First, the greatest temperature change is in the direction of the gradient
2 2
∇T = (−3x + yz, xz, 3z + xy) = (−1, −2, 11).
(−1,1,2)
∆φ
Suppose u is tangent to the surface φ = const at the point P = (x0 , y0 , z0 ). Consider ∆s for
PA, PB, PC approaching u. Since φ = const, P, A, B,C are on the surface, ∆φ = 0. Thus,
∆φ dφ
= 0 →∆s=0 =0 ⇒ ∇φ · u = 0 ⇒ ∇φ ⊥ u. (5.22)
∆s ds
Since |∇φ | is the value of the directional derivative normal to the surface, then the normal
derivative dφ
dn = |∇φ |. In temperature problems, the direction of largest change in temperature is
normal to the isothermal lines (constant temperature).
5.5 Directional Derivative and Gradient 147
Example 5.19 Given the surface xyz2 = 4, find the equation of the tangent plane and normal line
at the point (2, 2, −1).
Solution: The level surface is w = xyz2 , so the normal direction is in the direction of the gra-
dient
2 2
∇w = (yz , xz , 2xyz) = (2, 2, −8).
(2,2,−1)
The tangent plane has the following equation (since the gradient is normal to the surface)
∂w ∂w ∂w
x+ y+ z+d = 0 ⇒ 2x + 2y − 8z + d = 0 ⇒ x + y − 4z = 8.
∂x ∂y ∂z
Found d by plugging in the point (x, y, z) = (2, 2, −1). The normal line has equation
x−2 y−2 z+1 x = 2 + 2t
= = , y = 2 + 2t
2 2 −8
z = −1 − 8t
R Since the force is the directional derivative of U, we can find U by integrating the force along
a path. The work of the force F along the dr is
Z Z Z Z r2
W= dU = ∇U · dr = −F · dr = dU = U(r2 ) −U(r1 ).
r1
Definition 5.5.4 Such forces that behave in this way are call conservative. (More on this in the
coming sections).
p
Example 5.20 Find the gradient for a function of position r (Central Forces) r = x 2 + y2 + z2 .
∂r x
Solution: Then ∂x =√ = xr . Then
x2 +y2 +z2
∂f ∂f ∂f
∇ f (r) = î + ĵ + k̂
∂x ∂y ∂z
∂ f ∂r ∂ f ∂r ∂ f ∂r
= î + ĵ + k̂
∂r ∂x ∂r ∂y ∂r ∂z
∂ f hx y z i r ∂f
= î + ĵ + k̂ = ,
∂r r r r |r| ∂ r
148 Chapter 5. Vector Analysis
which is made up of the unit vector in the radial direction multiplied by the directional derivative in
the radial direction.
If a vector function depends on space (x, y, z) and time t, the from the total differential we see
∂F ∂F ∂F ∂F ∂F
dF = dx + dy + dz + dt = (dr · ∇)F + dt. (5.23)
∂x ∂y ∂z ∂t ∂t
Divide the result by dt to get the so-called material derivative
dF dr ∂F
= ·∇ F + . (5.24)
dt dt ∂t
This expression comes up a lot in physics, but most famously in the Navier-Stokes equations for
fluid flow
du ∂ u
= + (v · ∇)u (5.25)
dt ∂t
dr
where u is the fluid velocity and v = dt is the velocity of an individual fluid particle.
∂ ∂ ∂
∇ = î + ĵ + k̂ . (5.26)
∂x ∂y ∂z
d
This can be compared and contrasted with the scalar differential operator dx .
So far we have considered the gradient of a scalar function, ∇φ . Here an operation is performed
on the scalar φ resulting in a vector. Can the gradient operator, ∇, be applied to a vector?
Given a vector function V(x, y, z) = (Vx ,Vy ,Vz ). Question: How can we now compute the vector
operator ∇ applied to the vector V in different ways?
5.6.1 Divergence, ∇ · V
Definition 5.6.2 The divergence of a vector is defined as the scalar quantity
Special Case: The divergence of a central force field. Let r be the position vector and φ a
scalar function. Then
∂ ∂ ∂
∇ · (rφ ) = [xφ ] + [yφ ] + [zφ ]
∂x ∂y ∂z
∂φ ∂φ ∂φ
Product Rule = φ +x +φ + +φ +
∂x ∂y ∂z
= 3φ + r · (∇φ )
5.6 Some Other Expressions Involving ∇ 149
Definition 5.6.3 In general, we have the following “Product Rule for Divergence"
∇ · (φ v) = ∇φ · v + φ (∇ · v). (5.28)
which is the tangential component of the force while ρvy , ρvz contribute nothing. The flow out the
opposite face ABCD is
∂
ρvx dydz = ρvx + (ρvx )dx dydz.
x=dx ∂x x=0
Thus, the net rate of flow in the x-direction is the flow in minus the flow out
∂ ∂
ρvx dydz − ρvx + (ρvx )dx dydz = − (ρvx )dxdydz
x=0 ∂ x x=0 ∂ x
Similarly we can find the net rate of flow in the y and z directions:
∂
y-direction − (ρvy )dxdydz
∂y
∂
z-direction − (ρvz )dxdydz.
∂z
Therefore, the net flow per unit time is:
∂ ∂ ∂
− (ρvx ) + (ρvy ) + (ρvz ) dxdydz = −∇ · (ρv)dxdydz.
∂x ∂y ∂z
∂ρ
+ ∇ · (ρv) = 0. (5.29)
∂t
This equation says that the net flow out of a volume results in a decreased density inside that
volume.
Example 5.21 If F = (xz, xyz, −y2 ). Find ∇ · F = div(F).
Solution: Compute
∂ ∂ ∂
div(F) = (xz) + (xyz) + (−y2 )
∂x ∂y ∂z
= z + xz + 0 = z + xz.
5.6.3 Curl ∇ × V
150 Chapter 5. Vector Analysis
Definition 5.6.4 The curl of a vector field is defined as
î ĵ k̂
∂Vz ∂Vy ∂Vx ∂Vz ∂Vy ∂Vx
∇ ×V = curl(V) = î − + ĵ − + k̂ − = ∂∂x ∂
∂y
∂
∂z ,
∂y ∂z ∂z ∂x ∂x ∂y V
x Vy V
z
(5.30)
resulting in a vector.
The physical significance can be seen by considering the circulation of a fluid around a rectangle in
the xy-plane with corners (x0 , y0 ), (x0 + dx, y0 ), (x0 + dx, y0 + dy), (x0 , y0 + dy).
∂ vy ∂ vx
Circ1234 = vx (x0 , y0 )dx + vy (x0 , y0 ) + dx dy + vx (x0 , y0 ) + dy (−dx) + vy (x0 , y0 )(−dy)
∂x ∂y
∂ vy ∂ vx
= − dxdy.
∂x ∂y
Circ
Divide by the area dxdy to find area = ∇ × v .
z−component
Special Case: When the curl is zero ∇ × v = 0 the flow is called irrotational or conservative.
Physically this means that the fluid velocity only moves in the radial direction with no rotation.
r
Examples of this include gravitational and electrostatic forces: v = C |r| where C = −Gm1 m2 for
q1 q2
gravitational forces and C = 4πε0 for electrostatic Coulomb forces.
Consider the quantity ∇ × (φ v), then
î ĵ k̂
∂ ∂ ∂
∇ × (φ v) = ∂ x ∂y ∂z
φv φv φv
x y z
∂φ ∂ vz ∂ φ ∂ vy ∂φ ∂ vx ∂ φ ∂ vz
= î vz + f − vy − φ + ĵ vx + f − vz − φ
∂y ∂y ∂z ∂z ∂z ∂z ∂x ∂x
∂φ ∂ vy ∂ φ ∂ vx
+ k̂ vy + f − vx − φ
∂x ∂x ∂y ∂y
= φ (∇ × v) + (∇φ ) × v.
The other interesting observation is that the BAC −CAB Rule still holds when using the gradient
operator, ∇.
Example 5.25 Evaluate
∂2 ∂2 ∂2
∆ = ∇2 = ( + + ). (5.32)
∂ x2 ∂ y2 ∂ z2
2 2 2
The Laplacian of a scalar is ∆φ = ∂∂ xφ2 + ∂∂ yφ2 + ∂∂ zφ2 resulting in a scalar. If we apply the Laplacian
to a vector
∂ Vx ∂ 2Vx ∂ 2Vx ∂ 2Vy ∂ 2Vy ∂ 2Vy ∂ 2Vz ∂ 2Vz ∂ 2Vz
2
2
∆V = ∇ V = + + , + + , + + 2 ,
∂ x2 ∂ y2 ∂ z2 ∂ x 2 ∂ y2 ∂ z2 ∂ x2 ∂ y2 ∂z
the result is a vector with each component the Laplacian applied to each scalar component.
There are famous equations involving the Laplacian we will study in detail in Chapter 13:
1. Laplace’s Equation ∆φ = 0 (Elasticity)
2. Heat Equation ∆φ = a12 ∂∂tφ (Temperature Distribution, Diffusion, Schrödinger)
1 ∂ 2φ
3. Wave Equation ∆φ = a2 ∂t 2
(Vibration, Waves).
1 ∂ 1 ∂ ∂
∇·v = (rvr ) + (vθ ) + vz
r ∂r r ∂θ ∂z
1 ∂ ∂f 1 ∂2 f ∂2 f
∆f = (r ) + 2 + .
r ∂r ∂r r ∂ θ 2 ∂ z2
In Spherical (rho, θ , φ ) coordinates we have
1 ∂ 1 ∂ 1 ∂ vφ
∇·v = 2
(ρ 2 vρ ) + (vθ sin θ ) +
ρ ∂ρ ρ sin θ ∂ θ ρ sin θ ∂ φ
1 ∂ ∂f 1 ∂ ∂f 1 ∂2 f
∆f = 2 (ρ 2 )+ 2 (sin θ ) + 2 sin2 θ 2 .
ρ ∂ρ ∂ρ ρ sin θ ∂ θ ∂θ ρ ∂φ
Definition 5.7.1 (Line Integral) The line integral (in this case for work) can be expressed as
Z
W= F · dr, (5.33)
C
for any curve C moving counterclockwise. If moving clockwise, then a − appears in front of
the integral.
Example 5.26 Given the force F = (x2 , −xy) find the work done by F along the paths between
(0, 0) and (2, 1): 1. Line, 2. parabola, 3. broken line (vertical up then right), and 4. x = 2t 3 and
y = t 2.
Solution: Since r = (x, y) and dr = (dx, dy), then F · dr = x2 dx − xydy and the total work is
Z
W= x2 dx − xydy.
1 3 2
Z 2 Z2
2 1 2 3 2
W1 = x dx − x dx = x dx = x = 2.
0 4 0 4 4 0
1 3 1 5 2 8 32 28
Z 2
2 1 4
W2 = x dx − x dx = x − x = − = .
0 8 3 40 0 3 40 15
Thus, the work along path 3 (the broken line, up: dx = 0, x = 0, right: dy = 0, y = 1) gives
1 3 2 8
Z 1 Z 2
2
W3 = 0 − 0dy + x dx + 0 = x = .
0 0 3 0 3
24 9 4 6 1 43
Z 1 Z 1
3 2 2 5 8 6
W4 = (2t ) (6t dt) − 2t (2tdt) = 24t − 4t dt = t − t = .
0 0 9 7 0 21
Observe that the most work is required to move the object is along the broken path and the least
work is along the parabola path 2 favoring x.
Example 5.27 (Path Dependent Work) The force exerted on a body F = (−y, x). Find the work
required to move an object from (0, 0) to (1, 1) moving along the broken line right then up.
Z (1,1) Z (1,1) Z 1 Z 1 Z 1 1
W= F · dr = (−ydx + xdy) = − ydx + xdy = 0 + dy = y = 1,
(0,0) (0,0) 0 0 0 0
Now using the same force compute the integral around the square from (1, 0) → (1, −1) →
(−1, −1) → (−1, 0).
Z Z −1
Z −1
Z 0
W = − F · dr = − Fy dy − Fx dx − Fy dy
0 1 x=1 −1 y=−1 x=−1
Z −1 −1 0
1 1 −1
Z Z
=− 2
dy − 2 2
dx − 2 2
dy
0 1+y 1 x + (−1) −1 (−1) + y
Z 1 Z 0
0 1 1 1
= −int−1 2
dy + 2
dx + 2
dy
1+y −1 x + 1 −1 1 + y
0 1 0
π
= tan (y) + tan (x) + tan (y) = tan−1 (1) + tan−1 (1) − tan−1 (−1) − tan−1 (−1) = 4 = π.
−1 −1 −1
−1 −1 −1 4
This is the same result as the circular path!!
Question: What is special about this force field F that allows the work to be the same regardless
of path?
Solution: Conservative vector fields!! In example 1 the answer depended on the path and
in the second example it was independent of the path. For example 1 consider a lady with a box
on a truck. She performed two paths: 1. Drag the box right then lift to desired point. 2. Lift
immediately then carry to desired point. The only work done on the second path is lifting.
In physics, if there is friction, then the work depends on the path. This is “non-conservative"
where energy is dissipated by friction. In the second example the only work was lifting, this is
“conservative" where no energy is dissipated due to friction.
Solution: Compute
î ĵ k̂
x2 + y2 − x(2x) −(x2 + y2 ) + 2y2
∂ ∂ ∂
curl(E) = ∂ x ∂ z = 0, 0, − = (0, 0, 0).
∂y
y x (x2 + y2 )2 (x2 + y2 )2
− x2 +y 0
2 x2 +y2
Consider another case. Suppose that there exists a function W (x, y, z) such that F = ∇W . This
implies that
∂ Fx ∂ Fy ∂ Fx ∂ Fz ∂ Fy ∂ Fz
= , = , =
∂y ∂x ∂z ∂x ∂z ∂y
5.7 Line Integrals 155
and
∂ Fz ∂ Fy ∂ Fx ∂ Fz ∂ Fy ∂ Fx
curl(F) = − , − , − = 0.
∂y ∂z ∂z ∂x ∂x ∂y
In words this says that when a vector field is conservative, then the total work done is the work at
the end point minus the work at the starting point independent of the path. This is referred to as
The Fundamental Theorem of Line Integrals.
R In two-dimensions we only need that ∂∂W
x∂ y = ∂W
∂ y∂ x . So if F = ∂W ∂W
,
∂x ∂y , 0 , then F is an exact
x x
differential. For example F = (e sin(y), e cos(y)) is conservative.
5.7.1 Potentials
In mechanics, if F = ∇W (conservative), then W is the work done by the force F. If a mass falls a
distance z, then the work done is W = mgz. If a mass is lifted a distance z, then the work done is
W = −mgz (direction opposite the force of gravity). The total increase in potential energy when
lifting the object is φ = mgz implying that φ = −W . Thus, the force F = −∇φ where φ is the
potential energy or scalar potential function.
R In general, if curl(v) = 0, then there exists a scalar function φ such that v = −∇φ . One
special case where the sign is opposite is hydrodynamics where v = ∇φ , but we ignore this
case for now.
Now, suppose that the curl(F) = 0 ⇒ F = ∇W . Questions: How can we find the function W ?
Solution: We calculate the line integral from A to B along a convenient path (since the integral is
path independent).
Example 5.31 Show that the force F = (3 + 2xy, x2 − 3y2 , 0) is conservative, then find the scalar
potential φ such that F = −∇φ .
156 Chapter 5. Vector Analysis
Solution: First, show the force field is conservative by computing the curl
î ĵ k̂
∂ ∂ ∂
0 = ∇ × F = ∂x ∂y ∂ z = î(0 − 0) + ĵ(0 − 0) + k̂(2x − 2x) = 0.
3 + 2xy x2 − 3y2 0
Now consider the path in 3D from (0, 0, 0) → (x, 0, 0) → (x, y, 0) → (x, y, z) and compute the
work
Z B Z B
W= F · dr = (3 + 2xy)dx + (x2 − 3y2 )dy + 0dz
A A
= Integral of Path 1 + Path 2 + Path 3
Z x Z y Z z
2 2
= 3dx + (x − 3y )dy + dz
0 0 0
= 3x + x2 y − y3 + 0.
Figure 5.8: Positively oriented (counter-clockwise) curve around boundary. Figure from Stewart
Calculus.
yl describe the lower curve between a and b. We want to show that the integral over the area is
equivalent to the line integral around the boundary
∂P
ZZ I
dA = Pds. (5.36)
A ∂y C
RR ∂ q H
Repeating the calculation, but using functions of y instead of x gives: A ∂ x dxdy = C Qdy.
Theorem 5.8.1 (Green’s Theorem in the Plane (2D)) Let P(x, y) and Q(x, y) be continuous
functions with continuous first derivatives defined on the area A, then
ZZ
∂Q ∂P
I
− dxdy = (Pdx + Qdy), (5.37)
A ∂x ∂y ∂A
Example 5.33 Evaluate x4 dx+xydy where C is a triangle from with vertices (0, 0), (1, 0), (0, 1).
H
Solution: First note the region under consideration can be written as a Type I or Type II re-
gion (see Chapter on Multiple Integration). Also, given the vertices the triangle is bounded from
above by the line y = 1 − x and below by y = 0 between x = 0 and x = 1. From the initial function
we see that P(x, y) = x4 and Q(x, y) = xy. Thus, using Green’s Theorem
ZZ Z 1 Z 1−x
∂Q ∂P
I
4
x dx + xydy = − dxdy = (y − 0)dydx
A ∂x ∂y 0 0
1 2 1−x
Z 1 Z 1 1
1 2 1 3
1
= y dx = (1 − x) dx = − (1 − x) = .
0 2 0 0 2 6 0 6
158 Chapter 5. Vector Analysis
p
Example 5.34 Evaluate (3y − esin(x) )dx + (7x + y4 + 1)dy where C is the ellipse defined by
H
x2 + y2 = 9.
p
Solution: From the initial function we see that P(x, y) = 3y − esin(x) and Q(x, y) = 7x + y4 + 1.
Thus, using Green’s Theorem
ZZ
∂Q ∂P
I p ZZ
sin(x) 4
(3y − e )dx + (7x + y + 1)dy = − dxdy = (7 − 3)dxdy
A ∂x ∂y A
ZZ Z 2π Z 3 Z 2π 3
2
= 4dA =Polar 4rdrdθ = 2r dθ
D 0 0 0 0
Z 2π
= 18dθ = 36π.
0
R In the prior two examples it is easier to do the double integral than the line integral. Sometimes
the line integral is easier, so remember to use the theorem both ways!
RR
This theorem can be used to find the area A of some objects. Consider A = A 1dA. Then
one can choose P, Q such that ∂∂Qx − ∂∂Py = 1. For example, a) P = 0, Q = x, b) P = −y, Q = 0, c)
P = − 12 y, Q = 12 x. Then using Green’s Theorem we derive Green’s Theorem for Areas:
1
I I I
A = xdy = − ydx = xdy − ydx. (5.38)
C C 2 C
2 y2
Example 5.35 Find the area enclosed by the ellipse ax2 + b2 = 1.
Solution: Using Green’s Theorem for Areas: (Let x = a cos(t), y = b sin(t), dx = −a sin(t)dt, dy =
b cos(t)dt)
Z 2π
1 1
I
A= xdy − ydx = ab cos2 (t)dt + ab sin2 (t)dt
2 C 2 0
Z 2π
ab
= dt = πab.
2 0
Example 5.36 Let F = (x2 , −xy) and consider the area bounded from above by y = 1 and below
by y = 14 x2 . Find the work done in moving around this curve. (From last section it is W2 −W3 = −4
5 ).
The work required to move an object around any closed path for a conservative force is zero! This
results from the fact that the work in moving an object from one point to another is independent of
the path.
with Vz = 0.
p infinitesimal tangent at any point is dr = (dx, dy) and the normal is nds = (dy, −dx) with
The
ds = dx2 + dy2 . Thus, Pdx + Qdy = −Vy dx +Vx dy = (Vx ,Vy ) · (dy, −dx) = V · nds. Therefore,
ZZ I
2D Divergence Theorem div(V)dA = V · nds (5.39)
A ∂A
with Vz = 0.
Thus, Pdx + Qdy = Vx dx +Vy dy = (Vx ,Vy ) · (dx, dy) = V · dr. Therefore,
ZZ I
2D Stokes Theorem corl(V) · k̂dA = V · dr (5.40)
A ∂A
Solution: Compute
I ZZ ZZ Z πZ 2
2 ∂ ∂ 2
y dx + 3xydy = (3xy) − (y ) = ydA = r sin(θ )rdrdθ
C A ∂x ∂y A 0 1
2 π
1 3 7 7 14
Z π Z π
= r sin(θ ) dθ =
sin(θ )dθ = − cos(θ ) = .
0 3 0 3 1 3 3 0
R What if the region under consideration has a hole? Consider the outer boundary curve C1 and
the inner hole has boundary C2 . Then the total line integral around the boundary
I I I I
Pdx + Qdy + Pdx + Qdy = Pdx + Qdy − Pdx + Qdy. (5.41)
C1 −C2 C1 C2
Here we just subtract the area inside the hole from the total!
Example 5.41 Let F = (y2 , 3xy) be the force and compute the work done around two circles
x 2 + y2 = 1 and x2 + y2 = 4.
160 Chapter 5. Vector Analysis
Solution: Compute
I I Z 2π Z 2 Z 2π Z 1
y2 dx + 3xydy − y2 dx + 3xydy = r2 sin(θ )drdθ − r2 sin(θ )drdθ
C1 C2 0 0 0 0
Z 2π Z 2 Z 2π Z 2
= r2 sin(θ )drdθ = sin(θ )dθ r2 dr
0 1 0 1
2π
1 3 2
= − cos(θ )
r = 0.
0 3 1
Figure 5.9: Depiction of fluid flow in and out of a region. Image from Weber Essential Math
Methods for Physicists.
∑ v · dA = ∇ · vdV.
six f aces
Adding up this quantity for all parallelepipeds results in just the divergence at the boundary (the
amount flowing in/out of interior boundaries cancels due to same magnitude in opposite directions)
∑ v · dA = ∑ V · dA = ∑ ∇ · vdV.
all parallelepipeds exteriorsur f ace Volumes
Theorem 5.9.1 (Gauss (Divergence) Theorem) Given a vector field v we have the following
relation between the volume and surface integrals
ZZ ZZZ ZZ ZZZ
v · dA = ∇ · vdV, v · ndA + ∇ · vdV. (5.42)
A V A V
5.9 The Divergence (Gauss) Theorem 161
Here V is the volume, A is the associated surface area, and n is the unit normal to the surface.
This holds for simple solid regions with no holes.
RR
Example 5.42 Let B = ∇ × A. Show that S B · dA = 0.
Solution: Compute
ZZ Z Z
∇ × A =Div.T hm ∇ · (∇ × A)dV = 0dV = 0.
S V V
Example 5.43 Over a volume V , let ψ solve Laplace’s equation (∆ψ = 0). Show that the integral
over the closed surface in V of the normal derivative of ψ ( ∂∂ψn = ∇ψ · n) is zero
Z Z Z Z
∂ψ
dA = ∇ψ · ndA =Div.T hm = ∇ · (∇ψ)dV = ∆ψdV = 0.
S ∂n S V V
Definition 5.9.1 The flux of a vector field through the surface an object is described by the
divergence
ZZ ZZZ
F · dA = ∇ · FdV. (5.43)
S V
Example 5.44 Find the flux of the vector field F(x, y, z) = (z, y, x) over the unit sphere x2 + y2 +
z2 = 1.
Definition 5.9.2 Gauss Law: The total charge inside a closed surface
I ZZZ
D · ndA = ρdV
V
where the total charge over the region S is the sum of the isolated charges. Using the divergence
theorem we find
ZZ Z
∇ · DdV = ρdV, (5.45)
S
rq
Example 5.46 Let D = 4πr2 er where er = |r| . Show that the electric flux through any closed
surface surrounding the origin is
ZZ
D · dA = q.
S
For a rigid body we have seen that the translational velocity v = ω × r where ω is the angular
velocity. Then
Figure 5.10: Depiction of local cells from Weber Essential Math Methods.
Thus, the angular velocity ω = 12 (∇ × v) (sometimes curl(v) is denoted rot(v). Also, recall that if a
vector field is conservative, then it is curl free and called irrotational.
Consider four basic flow patterns: a) Vortex, b) Parallel, c) Parallel with variable velocity
(shear), d) flow around a corner. Then we can determine the degree to which the fluid is rotating by
computing the circulation.
Definition 5.10.1 (Circulation) The circulation of a fluid with fluid velocity V through the
surface S is
I
v · dr (5.46)
S
∑ v · dr = ∑ v · dr = ∑ ∇ × v · dA.
4sideso f cell exterior rectangles
Theorem 5.10.1 (Stokes (Curl) Theorem) For a vector field v the following relation holds for a
surface S with boundary C
I ZZ
v · dr = (∇ × v) · ndA. (5.47)
C S
Example 5.47 Evaluate C F · dr where F = (−y2 , x, z2 ) and C is the intersection of the plane
H
Solution: Compute
I ZZ ZZ
F · dr =Stokes curl(F) · dS = (1 + 2y)dA
C S S
Z 2π Z 1 Z 2π 1
1 2 2 3
= (12 r sin(θ ))rdrdθ = r + r sin(θ ) dθ
0 0 3 0 2 0
Z 2π 2π
1 2 θ 2
= + sin(θ )dθ = − cos(θ ) = π.
0 2 3 2 3 0
Solution: Compute
I ZZ Z 1 Z 1−x
F · dr =Stokes curl(F) · n = −2ydydx
C S 0 0
Z 1 1−x Z 1 1
2
21 3
1
= −y dx = −(1 − x) dx = (1 − x) = − .
0 0 0 3 0 3
B
where I is the current, H = µ0 , B is the magnetic field, and µ0 is the constant permeability. Using
Ampere’s Law we find
Z 2π
I
I
I= H · dr = |H|rdθ = |H|r2π ⇒ |H| = .
C 0 2πr
RR
Using the current density J we can find the total current: I = S J · ndA. Combining this with
Ampere’s Law gives
ZZ I ZZ
J · ndA = H · dr =Stokes (∇ × H) · ndA.
S C S
Theorem 5.10.2 Let the vector field F be continuous with continuous first partial derivatives in
a simply connected region S. Then all the following statements are true or false:
To briefly review:
1. Irrotational ⇒ ∇ × v = 0 ⇒ there exists a scalar field φ such that v = −∇φ .
2. Solenoidal ⇒ ∇ · v = 0 ⇒ there exists a vector field A such that v = ∇ × A.
Example 5.49 Given a vector field v = (x2 − yz, −2yz, z2 − 2xz). Find A such that v = ∇ × A.
Knowing the curl of A must be v we have infinitely many choices of A, we need to find one.
∂A
Start by assuming Ax = 0. Then −2yz == ∂∂Axz and z2 − 2xz = ∂ xy . Integrating each with respect to
x gives
Ay = z2 x − x2 z + f1 (y, z)
Az = 2xyz + f2 (y, z).
∂ Az ∂ Ay ∂ f2 ∂ f1
x2 − yz = − = 2xz + − 2xz + x2 − .
∂y ∂z ∂y ∂z
R If we have one A, then all others have the form A + ∇u for any scalar function u. This is true
since ∇ × (A + ∇u) = ∇ × A + ∇ × (∇u) = ∇ × A.
IV
Part Four: Ordinary
Differential Equations
Definition 6.1.2 A differential equation that describes some physical process is often called a
mathematical model
γv
(+)
mg
Consider an object falling from the sky. From Newton’s Second Law we have
dv
F = ma = m (6.1)
dt
When we consider the forces from the free body diagram we also have
F = mg − γv (6.2)
170 Chapter 6. Ordinary Differential Equations
It looks like the direction field tends towards v = 49m/s. We plot the direction field by plugging
in the values for v and t and letting dv/dt be the slope of a line at that point.
Direction Fields are valuable tools in studying the solutions of differential equations of the
form
dy
= f (t, y) (6.5)
dt
where f is a given function of the two variables t and y, sometimes referred to as a rate function.
At each point on the grid, a short line is drawn whose slope is the value of f at the point. This
technique provides a good picture of the overall behavior of a solution.
2. This method is useful if one has access to a computer because a computer can generate
the plots well.
Example 6.2 (Population Growth) Consider a population of field mice, assuming there is nothing
to eat the field mice, the population will grow at a constant rate. Denote time by t (in months) and
the mouse population by p(t), then we can express the model as
dp
= rp (6.6)
dt
where the proportionality factor r is called the rate constant or growth constant. Now suppose
owls are killing mice (15 per day), the model becomes
dp
= 0.5p − 450 (6.7)
dt
6.1 Introduction to ODEs 171
note that we subtract 450 rather than 15 because time was measured in months. In general
dp
= rp − k (6.8)
dt
where the growth rate is r and the predation rate k is unspecified. Note the equilibrium solution
would be k/r.
Definition 6.1.3 The equilibrium solution is the value of p(t) where the system no longer
dp
changes, dt = 0.
In this example solutions above equilibrium will increase, while solutions below will decrease.
y0 = 2y + 3 (6.9)
Ans: For y > −1.5 the slopes are positive, and hence the solutions increase. For y < −1.5 the
slopes are negative, and hence the solutions decrease. All solutions appear to diverge away from
the equilibrium solution y(t) = −1.5.
Example 6.4 Write down a DE of the form dy/dt = ay + b whose solutions have the required
behavior as t → ∞. It must approach 23 .
Answer: For solutions to approach the equilibrium solution y(t) = 2/3, we must have y0 < 0 for
y > 2/3, and y0 > 0 for y < 2/3. The required rates are satisfied by the DE y0 = 2 − 3y.
dv
m = mg − γv (Falling Bodies) (6.10)
dt
dp
= rp − k (Population Growth) (6.11)
dt
Both equations have the form:
dy
= ay − b (6.12)
dt
Example 6.6 (Field Mice / Predator-Prey Model)
Consider
dp
= 0.5p − 450 (6.13)
dt
we want to now solve this equation. Rewrite equation (6.13) as
dp p − 900
= . (6.14)
dt 2
Note p = 900 is an equilbrium solution and the system does not change. If p 6= 900
d p/dt 1
= (6.15)
p − 900 2
Therefore,
Thus we have infinitely many solutions where a different arbitrary constant C produces a different
solution. What if the initial population of mice was 850. How do we account for this?
Definition 6.1.4 The additional condition, p(0) = 850, that is used to determine C is an example
of an initial condition.
Definition 6.1.5 The differential equation together with the initial condition form the initial
value problem
when a 6= 0 this contains all possible solutions to the general equation and is thus called the general
solution The geometric representation of the general solution is an infinite family of curves called
integral curves.
Example 6.7 (Dropping a ball) System under consideration:
dv v
= 9.8 − (6.22)
dt 5
v(0) = 0 (6.23)
v = 49 +Ce−t/5 (6.25)
y0 (x) = xy (6.26)
174 Chapter 6. Ordinary Differential Equations
Definition 6.1.7 If the unknown function depends on several variables, and the derivatives are
partial derivatives it is said to be a partial differential equation.
Definition 6.1.8 The order of a differential equation is the order of the highest derivative that
appears in the equation.
Definition 6.1.9 A differential equation is said to be linear if F(t, y, y0 , y00 , ..., y(n) ) = 0 is a
linear function in the variables y, y0 , y00 , ..., y(n) . i.e. none of the terms are raised to a power or
inside a sin or cos.
Example 6.8 a) y0 + y = 2
b) y00 = 4y − 6
c) y(4) + 3y0 + sin(t)y
Example 6.9 a) y0 + t 4 y2 = 0
b) y00 + sin(y) = 0
c) y(4) − tan(y) + (y000 )3 = 0
2 g
Example 6.10 ddtθ2 + L sin(θ ) = 0.
The above equation can be approximated by a linear equation if we let sin(θ ) = θ . This pro-
cess is called linearization.
Definition 6.1.11 A solution of the ODE on the interval α < t < β is a function φ that satisfies
Common Questions:
1. (Existence) Does a solution exist? Not all Initial Value Problems (IVP) have solutions.
2. (Uniqueness) If a solution exists how many are there? There can be none, one or infinitely many
solutions to an IVP.
3. How can we find the solution(s) if they exist? This is the key question in this course. We
will develop many methods for solving differential equations the key will be to identify which
method to use in which situation.
6.2 Separable Equations 175
dy
= f (t, y). (6.30)
dt
We begin with equations that have a special form referred to as separable equations of the form
dy
= f (y)g(x) (6.31)
dx
1
Step 1: (Separate) dy = g(x)dx (6.32)
f (y)
1
Z Z
Step 2: (Integrate) dy = g(x)dx (6.33)
f (y)
Step 3: (Solve for y) F(y) = G(x) + c (6.34)
Note only need a constant of integration of one side, could just combine the constants we get on
each side. Also, we only solve for y if it is possible, if not leave in implicit form.
Definition 6.2.1 An equilibrium solution is the value of y which makes dy/dx = 0, y remains
this constant forever.
Example 6.11 (Newton’s Law of Cooling) Consider the ODE, where E is a constant:
dB
= κ(E − B) (6.35)
dt
dB
Z Z
= κdt (6.36)
E −B
− ln |E − B| = κt + c (6.37)
−κt+c −κt
E −B = e = Ae (6.38)
−κt
B(t) = E − Ae (6.39)
B(0) = E − A (6.40)
A = E − B0 (6.41)
E − B0
B(t) = E − κt (6.42)
e
Example 6.12
dy 1
= 6y2 x, y(1) = . (6.43)
dt 3
176 Chapter 6. Ordinary Differential Equations
dy
Z Z
= 6xdx (6.44)
y2
1
− = 3x2 + c (6.45)
y
y(1) = 1/3 (6.46)
−3 = 3(1) + c ⇒ c = −6 (6.47)
1
− = 3x2 − 6 (6.48)
y
1
y(x) = (6.49)
6 − 3x2
2
√
What is the interval of validity for this solution?
√ √Problem
√ when √ 6 − 3x = 0 or when x = ± 2.
So possible intervals of validity: (−∞, − 2), (− 2, 2), ( 2, ∞). We want to √ choose
√ the one
containing the initial value for x, which is x = 1, so the interval of validity is (− 2, 2).
Example 6.13
3x2 + 2x − 4
y0 = , y(1) = 3 (6.50)
2y − 2
Z Z
2y − 2dy = 3x2 + 2x − 4dx (6.51)
y2 − 2y = x3 + x2 − 4x + c (6.52)
y(1) = 3 ⇒ c = 5 (6.53)
2 3 2
y − 2y + 1 = x + x − 4x + 6 (Complete the Square) (6.54)
(y − 1)2 = x3 + x2 − 4x + 6 (6.55)
p
y(x) = 1 ± x3 + x2 − 4x + 6 (6.56)
There are two solutions we must choose the appropriate one. Use the IC to determine only the
positive solution is correct.
p
y(x) = 1 + x3 + x2 − 4x + 6 (6.57)
We need the terms under the square root to be positive, so the interval of validity is values of x
where x3 + x2 − 4x + 6 ≥ 0. Note x = 1 is in here so IC is in interval of validity.
Example 6.14
dy xy3
= , y(0) = 1 (6.58)
dx 1 + x2
6.2 Separable Equations 177
One equilibrium solution, y(x) = 0, which is not our case (since it does not meet the IC). So
separate:
dy x
Z Z
= dx (6.59)
y3 1 + x2
1 1
− 2 = ln(1 + x2 ) + c (6.60)
2y 2
1
y(0) = 1 ⇒ c = − (6.61)
2
1
y2 = (6.62)
1 − ln(1 + x2 )
1
y(x) = p (6.63)
1 − ln(1 + x2 )
Determine the interval of validity. Need
ln(1 + x2 ) < 1 ⇒ x2 < e − 1 (6.64)
√ √
So the interval of validity is − e − 1 < x < e − 1.
Example 6.15
dy y−1
= 2 (6.65)
dx x + 1
The equilibrium solution is y(x) = 1 and our IC is y(0) = 1, so in this case the solution is the
constant function y(s) = 1.
Example 6.16
dy
(Review IBP) = ey−t sec(y)(1 + t 2 ), y(0) = 0 (6.66)
dt
Separate by rewriting, and using Integration By Parts (IBP)
dy ey e−t
= (1 + t 2 ) (6.67)
dt cos(y)
Z Z
e−y cos(y)dy = e−t (1 + t 2 )dt (6.68)
e−y 5
(sin(y) − cos(y)) = −e−t (t 2 + 2t + 3) + (6.69)
2 2
Won’t be able to find an explicit solution so leave in implicit form. In the implicit form it is difficult
to find the interval of validity so we will stop here.
Thus, we have a family of solution y = ax − 1. One curve for each value of the constant a. This is
more commonly referred to as the general solution. Finding a particular solution means choosing
a value of a so that one curve remains.
Summary of Method:
1. Rewrite the equation as (MUST BE IN THIS FORM)
y0 + ay = f (6.71)
4. Rewrite as a derivative
(µy)0 = µ f (6.74)
and thus
1 C
Z
y(t) = µ(t) f (t)dt + (6.76)
µ(t) µ(t)
Now lets see some examples:
Example 6.18 Find the general solution of
y0 = y + e−t (6.77)
Step 1:
y0 − y = et (6.78)
Step 2:
R
µ(t) = e− 1dt
= e−t (6.79)
6.3 Linear First-Order Equations, Method of Integrating Factors 179
Step 3:
Step 4:
Step 5:
1
Z
e−t y = e−2t dt = − e−2t +C (6.82)
2
Solve for y
1
y(t) = − e−t +Cet (6.83)
2
and y(0) = 1.
Step 1:
Step 2:
R
µ(t) = e− sintdt
= ecost (6.86)
Step 3:
Step 4:
Step 5:
ecost y = t 2 +C (6.89)
With IC
180 Chapter 6. Ordinary Differential Equations
Final Answer
cost 5
y(t) = − + (6.94)
2 2 cost
2y0 + ty = 2 (6.95)
Final Answer
Z t
2 /4 2 /4 2 /4
y(t) = e−t es ds + e−t . (6.97)
0
Practicing this many times will be helpful on the homework. Consider two examples.
R9
Example 6.22 Find the integral 1 ln(t)dt. First define u, du, dv, and v.
u = ln(t) dv = dt (6.101)
1
du = dt v=t (6.102)
t
6.3 Linear First-Order Equations, Method of Integrating Factors 181
Thus
Z 9 9 Z 9
ln(t)dt = t ln(t) − 1dt (6.103)
1 1 1
9
= 9 ln(9) − t (6.104)
1
= 9 ln(9) − 9 + 1 (6.105)
= 9 ln(9) − 8 (6.106)
R x
Example 6.23 Find the integral e cos(x)dx. First define u, du, dv, and v.
u = cos(x) dv = ex dx (6.107)
x
du = − sin(x)dx v=e (6.108)
Thus
Z Z
ex cos(x)dx = ex cos(x) − ex sin(x)dx (6.109)
u = sin(x) dv = ex dx (6.110)
x
du = cos(x)dx v=e (6.111)
So
Z Z
ex cos(x)dx = ex cos(x) − ex sin(x)dx (6.112)
Z
= ex cos(x) + ex sin(x) − ex cos(x)dx (6.113)
Z
ex cos(x)dx = ex cos(x) + sin(x)
2 (6.114)
1
Z
ex cos(x)dx = ex cos(x) + sin(x) +C
(6.115)
2
Notice when we do not have limits of integration we need to include the arbitrary constant of
integration C.
There are two key questions to keep in mind throughout this section:
1. How do we write a differential equation to model a given situation?
2. What can the solution tell us about that situation?
dN
= −λ N(t), (6.116)
dt
182 Chapter 6. Ordinary Differential Equations
where N(t) is the number of atoms of a radioactive isotope and λ > 0 is the decay constant. The
equation is separable, and if the initial data is N(0) = N0 , the solution is
dB
= κ(E − B), (6.118)
dt
where κ > 0 is a constant related to the material of the body and how it conducts heat. This equation
is separable. We solved it before with the initial condition B(0) = B0 to get
E − B0
B(t) = E − . (6.119)
eκt
2. There are also cases where we are not explicitly given the formula for the rate of change.
But we may be able to use the physical description to define the rate of change and then set the
derivative equal to that. Note: The derivative = increase - decrease. This type of thinking is only
applicable to first order equations since higher order equations are not formulated as rate of change
equals something.
3. We may just be adapting a known differential equation to a particular situation, i.e. New-
ton’s Second Law F = ma. It is either a first or second order equation depending on if you define
it for position for velocity. Combine all forces and plug in value for F to yield the differential
equation. Used for falling bodies, harmonic motion, and pendulums.
4. The last possibility is to determine two different expressions for the same quantity and set
the equal to derive a differential equation. Useful when discussing PDEs later in the course.
The first thing one must do when approaching a modeling problem is determining which of
the four situations we are in. It is crucial to practice this identification now it will be useful on
exams and later sections. Secondly, your differential equation should not depend on the initial
condition. The IC only tells the starting position and should not effect how a system evolves.
Type I: (Interest)
Suppose there is a bank account that gives r% interest per year. If I withdraw a constant w
dollars per month, what is the differential equation modeling this?
Ans: Let t be time in years, and denote the balance after t years as B(t). B0 (t) is the rate of
change of my account balance from year to year, so it will be the difference between the amount
6.3 Linear First-Order Equations, Method of Integrating Factors 183
added and the amount withdrawn. The amount added is interest and the amount withdrawn is 12w.
Thus
r
B0 (t) = B(t) − 12w (6.120)
100
This is a linear equation, so we can solve by integrating factor. Note: UNITS ARE IMPORTANT,
w is withdrawn each month, but 12w is withdrawn per year.
Example 6.26 Bill wants to take out a 25 year loan to buy a house. He knows that he can afford
maximum monthly payments of $400. If the going interest rate on housing loans is 4%, what is the
largest loan Bill can take out so that he will be able to pay it off in time?
Ans: Measure time t in years. The amount Bill owes will be B(t). We want B(25) = 0. The
4% interest rate will take the form of .04B added. He can make payments of 12 × 400 = 4800 each
year. So the IVP will be
We want the size of the loan, which is the amount Bill begins with B(0):
In
Out
We have a mixing tank containing some liquid inside. Contaminant is being added to the tank at
some constant rate and the mixed solution is drained out at a (possibly different) rate. We will want
to find the amount of contaminant in the tank at a given time.
How do we write the DE to model this process? Let P(t) be the amount of pollutant (Note: Amount
184 Chapter 6. Ordinary Differential Equations
of pollutant, not the concentration) in the tank at time t. We know the amount of pollutant that is
entering and leaving the tank each unit of time. So we can use the second approach
Rate of Change ofP(t) = Rate of entry of contaminant − Rate of exit of contaminant (6.130)
The rate of entry can be defined in different ways. 1. Directly adding contaminant i.e. pipe adding
food coloring to water. 2. We might be adding solution with a known concentration of contaminant
to the tank (amount = concentration x volume).
What is the rate of exit? Suppose that we are draining the tank at a rate of rout . The amount of
contaminant leaving the tank will be the amount contained in the drained solution, that is given
by rate x concentration. We know the rate, and we need the concentration. This will just be the
concentration of the solution in the tank, which is in turn given by the amount of contaminant in
the tank divided by the volume.
Amount of Contaminant
Rate of exit of contaminant = Rate of drained solution × (6.131)
Volume of Tank
or
P(t)
Rate of exit of contaminant = rout . (6.132)
V (t)
What is V (t)? The Volume is decreasing by rout at each t. Is there anything being added to the
volume? That depends if we are adding some solution to the tank at a certain rate rin , that will
add to the in-tank volume. If we directly add contaminant not in solution, nothing is added. So
determine which situation by reading the problem. In the first case if the initial volume is V0 , we’ll
get V (t) = V0 + t(rin − rout ), and in the second, V (t) = V0 − trout .
Example 6.27 Suppose a 120 gallon well-mixed tank initially contains 90 lbs. of salt mixed
with 90 gal. of water. Salt water (with a concentration of 2 lb/gal) comes into the tank at a rate of
4 gal/min. The solution flows out of the tank at a rate of 3 gal/min. How much salt is in the tank
when it is full?
Ans: We can immediately write down the expression for volume V (t). How much liquid is
entering each minute? 4 gallons. How much is leaving the tank in the same minute? 3 gallons. So
each minute the Volume increases by 1 gallon, and we have V (t) = 90 + (4 − 3)t = 90 + t. This
tells us the tank will be full at t = 30.
We let P(t) be the amount of salt (in pounds) in the tank at time t. Ultimately, we want to determine
P(30), since this is when the tank will be full. We need to determine the rates at which salt is
entering and leaving the tank. How much salt is entering? 4 gallons of salt water enter the tank
each minute, and each of those gallons has 2lb. of salt dissolved in it. Hence we are adding 8 lbs.
of salt to the tank each minute. How much is exiting the tank? 3 gallons leave each minute, and the
concentration in each of those gallons is P(t)/V (t). Recall
This is the ODE for the salt in the tank, what is the IC? P(0) = 90 as given by the problem. Now we
have an IVP so solve (since linear) using integrating factor
dP 3
+ P(t) = 8 (6.136)
dt 90 + t
R 3
µ(t) = e 90+t dt = e3 ln(90+t) = (90 + t)3 (6.137)
3 0 3
((90 + t) P(t)) = 8(90 + t) (6.138)
Z
(90 + t)3 P(t) = 8(90 + t)3 dt = 2(90 + t)4 + c (6.139)
c
P(t) = 2(90 + t) + (6.140)
(90 + t)3
c
P(0) = 90 = 2(90) + 3 ⇒ c = −(90)4 (6.141)
90
904
P(t) = 2(90 + t) − (6.142)
(90 + t)3
Remember we wanted P(30) which is the amount of salt when the tank is full. So
904 3 27
P(30) = 240 − 3
= 240 − 90( )3 = 240 − 90( ). (6.143)
120 4 64
We could ask for amount of salt at anytime before overflow and all would be the same besides last
step where we replace 30 with the time wanted.
Exercise: What is the concentration of the tank when the tank is full?
Example 6.28 A full 20 liter tank has 30 grams of yellow food coloring dissolved in it. If a
yellow food coloring solution (with concentration of 2 grams/liter) is piped into the tank at a rate of
3 liters/minute while the well mixed solution is drained out of the tank at a rate of 3 liters/minute,
what is the limiting concentration of yellow food coloring solution in the tank?
So the limiting concentration is 2g/L. Why does this make physical sense? After a period of time
the concentration of the mixture will be exactly the same as the concentration of the incoming
solution. It turns out that the same process will work if the concentration of the incoming solution
is variable.
Example 6.29 A 150 gallon tank has 60 gallons of water with 5 pounds of salt dissolved in it.
Water with a concentration of 2 + cos(t) lbs/gal comes into the tank at a rate of 9 gal/hr. If the well
mixed solution leaves the tank at a rate of 6 gal/hour, how much salt is in the tank when it overflows?
Ans: The only difference is the incoming concentration is variable. Given the Volume starts
at 600 gal and increases at a rate of 3 gal/min
dP 6P
= 9(2 + cos(t)) − (6.152)
dt 60 + 3t
Our IC is P(0) = 5 and use the method of integrating factor
R 6
µ(t) = e 60+3t dt = e2 ln(20+t) = (20 + t)2 . (6.153)
2 0 2
((20 + t) P(t)) = 9(2 + cos(t))(20 + t) (6.154)
Z
(20 + t)2 P(t) = 9(2 + cos(t))(20 + t)2 dt (6.155)
2
= 9( (20 + t)3 + (20 + t)2 sin(t) + 2(20 + t) cos(t) − 2 sin(t)) +(6.156)
c
3
2 2 cos(t) 2 sin(t) c
P(t) = 9( (20 + t) + sin(t) + − 2
)+ (6.157)
3 20 + t (20 + t) (20 + t)2
2 2 c 9 c
P(0) = 5 = 9( (20) + ) + = 120 + + (6.158)
3 20 400 10 400
c = −46360 (6.159)
We want to know how much salt is in the tank when it overflows. This happens when the volume
hits 150, or at t = 30.
18 cos(30) 18 sin(30) 46360
P(30) = 300 + 9 sin(30) + − − (6.160)
50 2500 2500
So P(t) ≈ 272.63 pounds.
We could make the problem more complicated by assuming that there will be a change in the
situation if the solution ever reached a critical concentration. The process would still be the same,
we would just need to solve two different but limited IVPs.
dv
m = F(t, v) (6.161)
dt
where m is the object’s mass and F is the net force acting on the body. We will look at the situation
where the only forces are air resistance and gravity. It is crucial to be careful with the signs.
Throughout this course downward displacements and forces are positive. Hence the force due
to gravity is given by FG = mg, where g ≈ 10m/s2 is the gravitational constant.
Air Resistance acts against velocity. If the object is moving up air resistance works downward,
always in opposite direction. We will assume air resistance is linearly dependant on velocity (ie
6.4 Existence and Uniqueness 187
FA = αv, where FA is the force due to air resistance). This is not realistic, but it simplifies the
problem. So F(t, v) = FG + FA = 10 − αv, and our ODE is
dv
m = 10m − αv (6.162)
dt
Example 6.30 A 50 kg object is shot from a cannon straight up with an initial velocity of 10 m/s
off the very tip of a bridge. If the air resistance is given by 5v, determine the velocity of the mass at
any time t and compute the rock’s terminal velocity.
Ans: Two parts: 1. When the object is moving upwards and 2. When the object is moving
downwards. If we look at the forces it turns out we get the same DE
The IC is v(0) = −10, since we shot the object upwards. Our DE is linear and we can use integrating
factor
1
v0 + v = 10 (6.164)
10
t
µ(t) = e 10 (6.165)
t t
0
(e v(t))
10 = 10e 10 (6.166)
Z
t t t
e 10 v(t) = 10e 10 dt = 100e 10 + c (6.167)
c
v(t) = 100 + t (6.168)
e 10
v(0) = −10 = 100 + c ⇒ c = −110 (6.169)
110
v(t) = 100 − t . (6.170)
e 10
What is the terminal velocity of the rock? The terminal velocity is given by the limit of the velocity
as t → ∞, which is 100. We could also have computed the velocity of the rock when it hit the
ground if we knew the height of the bridge (integrate to get position).
Example 6.31 A 60kg skydiver jumps out of a plane with no initial velocity. Assuming the
magnitude of air resistance is given by 0.8|v|, what is the appropriate initial value problem modeling
his velocity?
Ans: Air Resistance is an upward force, while gravity is acting downward. So our force should be
In Section 1.3 we noted three common questions we would be concerned with this semester.
188 Chapter 6. Ordinary Differential Equations
We have spent a lot of time on developing methods, now we will spend time on the first two
questions. Without Solving an IVP, what information can we derive about the existence and
uniqueness of solutions? Also we will note strong differences between linear and nonlinear
equations.
Theorem 6.4.1 (Fundamental Theorem of Existence and Uniqueness for Linear Equations)
Consider the IVP
If p(t) and q(t) are continuous functions on an open interval α < t0 < β , then there exists a
unique solution to the IVP defined on the interval (α, β ).
R The same result holds for general IVPs. If we have the IVP
(n−1)
y(n) + an−1 (t)y(n−1) + ... + a1 (t)y0 + a0 (t)y = g(t), y(t0 ) = y0 , ..., y(n−1) (t0 ) = y0
(6.174)
then if ai (t) (for i = 0, ..., n − 1) and g(t) are continuous on an open interval α < t0 < β , there
exists a unique solution to the IVP defined on the interval (α, β ).
Example 6.32 Without solving, determine the interval of validity for the solution to the following
IVP
Ans: If we look at Theorem 1, we need to write our equation in the form given in Theorem 1 (i.e.
coefficient of y0 is 1). So rewrite as
2 ln |20 − 4t|
y0 + = (6.176)
t2 − 9 t2 − 9
Next we identify where either of the two other coefficients are discontinuous. By removing those
points we find all intervals of validity. Then the last step is to identify which interval of validity
contains t0 .
6.4 Existence and Uniqueness 189
Using the notation in Theorem 1, p(t) is discontinuous when t = ±3, since at those points we
are dividing by zero. q(t) is discontinuous at t = 5, since the natural log of 0 does not exists (only
defined on (0, ∞)). This yields four intervals of validity where both p(t) and q(t) are continuous
Notice the endpoints are where p(t) and q(t) are discontinuous, guaranteeing within each interval
both are continuous. Now all that is left is to identify which interval contains t0 = 4. Thus our
interval of validity is (3, 5).
R The other intervals of validity we found are intervals of validity for the same differential
equation, but for different initial conditions. For example, if our IC was y(2) = 5 then the
interval of validity must contain 2, so the answer would be (−3, 3).
What happens if our IC is at one of the bad points where p(t) and q(t) are discontinu-
ous? Unfortunately we are unable to conclude anything, since the theorem does not apply.
On the other hand we cannot say that a solution does not exist just because the hypothesis are
not met, so the bottom line is that we cannot conclude anything.
So we have the following revision of Theorem 1 that applies to nonlinear equations as well.
Since this is applied to a broader class the conclusions are expected to be weaker.
If f and ∂∂ yf are continuous functions on some rectangle α < t0 < β , γ < y0 < δ containing the
point (t0 , y0 ), then there is a unique solution to the IVP defined on some interval (a, b) satisfying
α < a < t0 < b ≤ β .
OBSERVATION:
(1) Unlike Theorem 1, Theorem 2 does not tell us the interval of a unique solution guaranteed by
it. Instead, it tells us the largest possible interval that the solution will exist in, we would need to
actually solve the IVP to get the interval of validity.
(2) For nonlinear differential equations, the value of y0 may affect the interval of validity, as we
will see in a later example. We want our IC to NOT lie on the boundary of a region where f or its
partial derivative are discontinuous. Then we find the largest t-interval on the line y = y0 containing
t0 where everything is continuous.
R Theorem 2 refers to partial derivative ∂∂ yf of the function of two variables f (t, y). We will
talk extensively about this later, but for now we treat t as a constant and take a normal
190 Chapter 6. Ordinary Differential Equations
∂f
f (t, y) = t 2 − 2y3t, then = −6y2t. (6.180)
∂y
Example 6.33 Determine the largest possible interval of validity for the IVP
R Note that this basically told us nothing, and nonlinear problems are quite harder to deal with
than linear. What can happen if the conditions of Theorem 2 are NOT met?
First note this does not satisfy the conditions of the theorem, since fy = 3y12/3 is not continuous at
y0 = y = 0. Now solve the equation it is separable. Notice the equilibrium solution is y = 0. This
satisfies the IC, but let’s solve the equation.
Z Z
y−1/3 dy = dt (6.183)
3 2/3
y = t +c (6.184)
2
y(0) = 0 (6.185)
2 3
y(t) = ±( t) 2 (6.186)
3
(6.187)
The IC does not rule out either of these possibilities, so we end up with three possible solutions
(these two and the equilibrium solution y(t) ≡ 0).
y0 = f (y) (6.188)
What we need to know to study the equation qualitatively is which values of y make y0 zero,
positive, or negative. The values of y making y0 = 0 are the equilibrium solutions. They are
constant solutions and are indicated on the ty-plane by horizontal lines.
After we establish the equilibrium solutions we can study the positivity of f (y) on the interme-
diate intervals, which will tell us whether the equilibrium solutions attract nearby initial conditions
(in which case they are called asymptotically stable), repel them (unstable), or some combination
of them (semi-stable).
Example 6.35 Consider
y0 = y2 − y − 2 (6.189)
Start by finding the equilibrium solutions, values of y such that y0 = 0. In this case we need to
solve y2 − y − 2 = (y − 2)(y + 1) = 0. So the equilibrium solutions are y = −1 and y = 2. There
are constant solutions and indicated by horizontal lines. We want to understand their stability. If
we plot y2 − y − 2 versus y, we can see that on the interval (−∞, −1), f (y) > 0. On the interval
(−1, 2), f (y) < 0 and on (2, ∞), f (y) > 0. Now consider the initial condition.
(1) If the IC y(t0 ) = y0 < −1, y0 = f (y) > 0 and y(t) will increase towards -1.
(2) If the IC −1 < y0 < 2, y0 = f (y) < 0, so the solution will decrease towards -1. Since the solutions
below -1 go to -1 and the solutions above -1 go to -1, we conclude y(t) = −1 is an asymptotically
stable equilibrium.
(3) If y0 > 2, y0 = f (y) > 0, so the solution increases away from 2. So at y(t) = 2 above and below
solutions move away so this is an unstable equilibrium.
The equilibrium solutions are y = −1 and y = 4. To classify them, we graph f (y) = (y − 4)(y + 1)2 .
(1) If y < −1, we can see that f (y) < 0, so solutions starting below -1 will tend towards −∞.
(2) If −1 < y0 < 4, f (y) < 0, so solutions starting here tend downwards to -1. So y(t) = 1 is
semistable.
(3) If y > 4, f (y) > 0, solutions starting above 4 will asymptotically increase to ∞, so y(t) = 4 is
unstable since no nearby solutions converge to it.
Populations
The best examples of autonomous equations come from population dynamics. The most naive
model is the "Population Bomb" since it grows without any deaths
with r > 0. The solution to this differential equation is P(t) = P0 ert , which indicates that the
population would increase exponentially to ∞. This is not realistic at all.
A better and more accurate model is the "Logistic Model"
P r
P0 (t) = rP(1 − ) = rP − P2 (6.192)
N N
where N > 0 is some constant. With this model we have a birth rate of rP and a mortality rate of
192 Chapter 6. Ordinary Differential Equations
r 2
NP . The equation is separable so let’s solve it.
dP
= rdt (6.193)
P(1 − NP )
1 1/N
Z Z
( + )dP = rdt (6.194)
P 1 − P/N
P
ln |P| − ln |1 − | = rt + c (6.195)
N
P
= Aert (6.196)
1 − NP
1 rt
P = Aert = Ae P (6.197)
N
Aert AN
P(t) = A rt
= −rt + A
(6.198)
1+ Ne Ne
P0 N
if P(0) = P0 , then A = N−P0 to yield
P0 N
P(t) = (6.199)
(N − P0 )e−rt + P0
In its present form its hard to analyze what is going on so let’s apply the methods from the first
section to analyze the stability.
Looking at the logistic equation, we can see that our equilibrium solutions are P = 0 and P = N.
Graphing f (P) = rP(1 − NP ), we see that
(1) If P < 0, f (P) < 0
(2) If 0 < P < N, f (P) > 0
(3) If P > N, f (P) < 0
Thus 0 is unstable while while N is asymptotically stable, so we can conclude for initial population
P0 > 0
So what is N? It is the carrying capacity for the environment. If the population exists, it will grow
towards N, but the closer it gets to N the slower the population will grow. If the population starts
off greater then the carrying capacity for the environment P0 > N, then the population will die off
until it reaches that stable equilibrium position. And if the population starts off at N, the births and
deaths will balance out perfectly and the population will remain exactly at P0 = N.
Note: It is possible to construct similar models that have unstable equilibria above 0.
Exercise 6.1 Show that the equilibrium population P(t) = N is unstable for the autonomous
equation
P
P0 (t) = rP( − 1). (6.201)
N
6.5 Other Methods for First-Order Equations 193
y0 + Py = Qyn , (6.202)
where P, Q are functions of x. Even though the equation is not linear, we can reduce it to a linear
equation with the following transformation: z = y1−n where by Chain Rule z0 = (1 − n)y−n y0 . Now
multiply (6.202) by (1 − n)y−n to find
We now have a first order linear equation that could be solved using the method of integrating
factor.
We also need the crucial tool of the multivariable chain rule. If we have a function Φ(x, y(x))
depending on some variable x and a function y depending on x, then
dΦ ∂ Φ ∂ Φ dy
= + = Φx + Φy y0 (6.209)
dx ∂x ∂ y dx
194 Chapter 6. Ordinary Differential Equations
dy
2xy − 9x2 + (2y + x2 + 1) =0 (6.210)
dx
The first step in solving an exact equation is to find a certain function Φ(x, y). Finding Φ(x, y) is
most of the work. For this example it turns out
dy
Φx + Φy = 0. (6.214)
dx
Thinking back to the chain rule we can express as
dΦ
=0 (6.215)
dx
Thus if we integrate, Φ = c, where c is a constant. So the general solution is
for some constant c. If we had an initial condition, we could use it to find the particular solution to
the initial value problem.
Let’s investigate the last example further. An exact equation has the form
dy
M(x, y) + N(x, y) =0 (6.217)
dx
with My (x, y) = Nx (x, y). The key is to construct Φ(x, y) such that the DE turns into
dΦ
=0 (6.218)
dx
by using the multivariable chain rule. Thus we require Φ(x, y) satisfy
R A standard fact from multivariable calculus is that mixed partial derivatives commute. That
is why we want My = Nx , so My = Φxy and Nx = Φyx , and so these should be equal for Φ to
exist. Make sure you check the function is exact before wasting time on the wrong solution
process.
6.5 Other Methods for First-Order Equations 195
dΦ
Once we have found Φ, then dx = 0, and so
Φ(x, y) = c (6.221)
dy
2xy − 9x2 + (2y + x2 + 1) = 0, y(0) = 2 (6.222)
dx
Let’s begin by checking the equation is in fact exact.
In general it does not usually matter which you choose, one may be easier to integrate than the
other. In this case
Z
Φ(x, y) = 2xy − 9x2 dx = x2 y − 3x3 + h(y). (6.227)
Notice since we only integrate with respect to x we can have an arbitrary function only depending
on y. If we differentiate h(y) with respect to x we still get 0 like an arbitrary constant c. So in order
to have the highest accuracy we take on an arbitrary function of y. Note if we integrated N with
respect to y we would get an arbitrary function of x. DO NOT FORGET THIS!
Now all we need is to find h(y). We know if we differentiate Φ with respect to x, then h(y) will
vanish which is unhelpful. So instead differentiate with respect to y, since Φy = N in order to be
exact. so any terms in N that aren’t in Φy must be h0 (y).
So Φy = x2 + h0 (y) and N = x2 + 2y + 1. Since these are equal we have h0 (y) = 2y + 1, an so
Z
h(y) = h0 (y)dy = y2 + y (6.228)
R We will drop the constant of integration we get from integrating h since it will combine with
the constant c that we get in the solution process.
Thus, we have
and thus Φ(x, y) = y2 + (x2 + 1)y − 3x3 = c for some constant c. To compute c, we’ll use our initial
condition y(0) = 2
22 + 2 = c ⇒ c = 6 (6.231)
This is a quadratic equation in y, so we can complete the square or use quadratic formula to get an
explicit solution, which is the goal when possible.
Now, M(x, y) = 2xy2 + 2 and N(x, y) = −2(3 − x2 y). So My = 4xy = Nx and the equation is exact.
The next step is to compute Φ(x, y). We choose to integrate N this time
Z Z
Φ(x, y) = Ndy = 2x2 y − 6dy = x2 y2 − 6y + h(x). (6.241)
To find h(x), we compute Φx = 2xy2 + h0 (x) and notice that for this to be equal to M, h0 (x) = 2.
Hence h(x) = 2x and we have an implicit solution of
x2 y2 − 6y + 2x = c. (6.242)
1 − 6 − 2 = c ⇒ c = −7 (6.243)
6.5 Other Methods for First-Order Equations 197
x2 y2 − 6y + 2x + 7 = 0. (6.244)
2ty
− 2t − (4 − ln(t 2 + 1))y0 = 0, y(2) = 0 (6.248)
t2 + 1
and find the solution’s interval of validity.
This is already in the right form. Check if it is exact, M(t, y) = t 22ty
+1
− 2t and N(t, y) =
2 2t
ln(t + 1) − 4, so My = t 2 +1 = Nt . Thus the equation is exact. Now compute Φ(x, y). Integrate M
2ty
Z Z
Φ= Mdt = dt = y ln(t 2 + 1) − t 2 + h(y). (6.249)
t2 + 1
Φy = ln(t 2 + 1) + h0 (y) = ln(t 2 + 1) − 4 = N (6.250)
so we conclude h0 (y) = −4 and thus h(y) = −4y. So our implicit solution is then
y ln(t 2 + 1) − t 2 − 4y = c (6.251)
y ln(t 2 + 1) − t 2 − 4y = −4 (6.252)
t2 − 4
y(x) = . (6.253)
ln(t 2 + 1) − 4
Now let’s find the interval of validity. We do not have to worry about the natural log since
t2 + 1> 0 for all t. Thus we want to avoid division by 0.
ln(t 2 + 1) − 4 = 0 (6.254)
2
ln(t + 1) = 4 (6.255)
2 4
t = e −1 (6.256)
p
t = ± e4 − 1 (6.257)
√ √
So there are three possible intervals of validity, we want the one containing t = 2, so (− e4 − 1, e4 − 1).
198 Chapter 6. Ordinary Differential Equations
and
Φy = 2ye3xy + 3xy2 e3xy + h0 (y) (6.261)
Comparing Φy to N, we see that they are already identical, so h0 (y) = 0 and h(y) = 0. So
y2 e3xy − x = c (6.262)
and using the IC gives c = 4e6 − 1. Thus our implicit particular solution is
y2 e3xy − x = 4e6 − 1, (6.263)
and we are done because we will not be able to solve this explicitly.
6.6 Second-Order Linear Equations with Constant Coefficients and Zero Right-
Hand Side
6.6.1 Basic Concepts
The example of a second order equation which we have seen many times before is Newton’s Second
Law when expressed in terms of position s(t) is
d2s
m = F(t, s0 , s) (6.266)
dt 2
One of the most basic 2nd order equations is y00 = −y. By inspection, we might notice
that this has two obvious nonzero solutions: y1 (t) = cos(t) and y2 (t) = sin(t). But consider
9 cos(t) − 2 sin(t)? This is also a solution. Anything of the form y(t) = c1 cos(t) + c2 sin(t), where
c1 and c2 are arbitrary constants. Every solution if no conditions are present has this form.
6.6 Second-Order Linear Equations with Constant Coefficients and Zero
Right-Hand Side 199
00
Example 6.44 Find all of the solutions to y = 9y
We need a function whose second derivative is 9 times the original function. What function
comes back to itself without a sign change after two derivatives? Always think of the exponential
function when situations like this arise. Two possible solutions are y1 (t) = e3t and y2 (t) = e−3t .
In fact so are any combination of the two. This is the principal of linear superposition. So
y(t) = c1 e3t + c2 e−3t are infinitely many solutions.
EXERCISE: Check that y1 (t) = e3t and y2 (t) = e−3t are solutions to y00 = 9y.
Theorem 6.6.1 (Principle of Superposition) If y1 (t) and y2 (t) are solutions to a second order
linear homogeneous differential equation, then so is any linear combination
This follows from the homogeneity and the fact that a derivative is a linear operator. So given
any two solutions to a homogeneous equation we can find infinitely more by combining them. The
main goal is to be able to write down a general solution to a differential equation, so that with
some initial conditions we could uniquely solve an IVP. We want to find y1 (t) and y2 (t) so that
the general solution to the differential equation is y(t) = c1 y1 (t) + c2 y2 (t). By different we mean
solutions which are not constant multiples of each other.
Now reconsider y00 = −y. We found two different solutions y1 (t) = cos(t) and y2 (t) = sin(t)
and any solution to this equation can be written as a linear combination of these two solutions,
y(t) = c1 cos(t) + c2 sin(t). Since we have two constants and a 2nd order equation we need two
initial conditions to find a particular solution. We are generally given these conditions in the form
of y and y0 defined at a particular t0 . So a typical problem might look like
p(t)y00 + q(t)y0 + r(t)y = 0, y0 (t0 ) = y00 , y(t0 ) = y0 (6.269)
Example 6.45 Find a particular solution to the initial value problem
Sometimes when applying initial conditions we will have to solve a system of equations, other
times it is as easy as the previous example.
200 Chapter 6. Ordinary Differential Equations
How do we find solutions to this equation? From calculus we can find a function that is linked to
its derivatives by a multiplicative constant, y(t) = ert . Now that we have a candidate plug it into the
differential equation. First calculate the derivatives y0 (t) = rert and y00 (t) = r2 ert .
What can we conclude? If y(t) = ert is a solution to the differential equation, then ert (ar2 +br +c) =
0. Since ert 6= 0, then y(t) = ert will solve the differential equation as long as r is a solution to
ar2 + br + c = 0. (6.279)
Of course, it is also possible these are the same, since we might have a repeated root. We will see
in a future section how to handle these. In fact, we have three cases.
Example 6.46 Find two solutions to the differential equation y00 − 9y = 0 (Example 1). The
characteristic equation is r2 − 9 = 0, and this has roots r = ±3. So we have two solutions y1 (t) = e3t
and y2 (t) = e−3t , which agree with what we found earlier.
The three cases are the same as the three possibilities for types of roots of quadratic equations:
(1) Real, distinct roots r1 6= r2 .
(2) Complex roots r1 , r2 = α ± β i.
(3) A repeated real root r1 = r2 = r.
We’ll look at each case more closely in the lectures to come.
ar2 + br + c = 0 (6.282)
6.7 Complex Roots of the Characteristic Equation 201
So when there are two distinct roots r1 6= r2 , we get two solutions y1 (t) = er1t and y2 (t) = er2t .
Since they are distinct we can immediately conclude the general solution is
This is a problem since y1 (t) and y2 (t) are complex-valued. Since our original equation was both
simple and had real coefficients, it would be ideal to find two real-valued "different" enough
solutions so that we can form a real-valued general solution. There is a way to do this.
In other words, we can write an imaginary exponential as a sum of sin and cos. How do we establish
this fact? There are two ways:
(1) Differential Equations: First we want to write eiθ = f (θ ) + ig(θ ). We also have
d iθ
f 0 + ig0 = [e ] = ieiθ = i f − g. (6.286)
dθ
Thus f 0 = −g and g0 = f , so f 00 = − f and g00 = −g. Since e0 = 1, we know that f (0) = 1 and
g(0) = 0. We conclude that f (θ ) = cos(θ ) and g(θ ) = sin(θ ), so
where the minus sign pops out of the sign in the second equation since sin is odd and cos is even.
Notice our new expression is still complex-valued. However, by the Principle of Superposition, we
can obtain the following solutions
1 αt 1
y1 (t) = (e (cos(βt) + i sin(βt))) + (eαt (cos(βt) − i sin(βt))) = eαt cos(βt) (6.299)
2 2
1 αt 1
y2 (t) = (e (cos(βt) + i sin(βt))) − (eαt (cos(βt) − i sin(βt))) = eαt sin(βt)(6.300)
2i 2i
EXERCISE: Check that y1 (t) = eαt cos(βt) and y2 (t) = eαt sin(βt) are in fact solutions to the
beginning differential equation when the roots are α ± iβ .
So now we have two real-valued solutions y1 (t) and y2 (t). It turns out they are linearly
independent, so if the roots of the characteristic equation are r1,2 = α ± iβ , we have the general
solution
r2 − 4r + 9 = 0 (6.303)
6.7 Complex Roots of the Characteristic Equation 203
√
which has roots r1,2 = 2 ± i 5. Thus the general solution and its derivatives are
√ √
y(t) = c1 e2t cos( 5t) + c2 e2t sin( 5t) (6.304)
0 2t
√ √ 2t
√ 2t
√ √ 2t
√
y (t) = 2c1 e cos( 5t) − 5c1 e sin( 5t) + 2c2 e sin( 5t) + 5c2 e cos( 5t). (6.305)
0 = c1 (6.306)
√
−2 = 2c1 + 5c2 (6.307)
2 √
y(t) = − √ e2t sin( 5t). (6.308)
5
r2 − 8r + 17 = 0 (6.310)
which has roots r1,2 = 4 ± i. Hence the general solution and its derivatives are
2 = c1 (6.313)
5 = 4c1 + c2 (6.314)
which has roots r1,2 = − 32 ± 12 i. So the general solution and its derivative are
3 t 3 t
y(t) = c1 e 2 t cos( ) + c2 e 2 t sin( ) (6.318)
2 2
3 3 t 1 3 t 3 3 t 1 3 t
y0 (t) = c1 e 2 t cos( ) − c1 e 2 t sin( ) + c2 e 2 t sin( ) + c2 e 2 t cos( ) (6.319)
2 2 2 2 2 2 2 2
204 Chapter 6. Ordinary Differential Equations
r2 + 4 = 0 (6.324)
which has roots r1,2 = ±2i. The general solution and its derivatives are
y(t) = c1 cos(2t) + c2 sin(2t) (6.325)
0
y (t) = −2c1 sin(2t) + 2c2 cos(2t). (6.326)
The initial conditions give the system
−10 = c2 (6.327)
4 = −2c1 (6.328)
so we conclude that c1 = −2 and c2 = −10 and the particular solution is
But these are the same and are not linearly independent. So we will need to find a second solution
which is "different" from y1 (t) = ert . What should we do?
Start by recalling that if the quadratic equation ar2 + br + c = 0 has a repeated root r, it must
b
b
be r = − 2a . Thus our solution is y1 (t) = e− 2a . We know any constant multiple of y1 (t) is also a
solution. These will still be linearly dependent to y1 (t). Can we find a solution of the form
b
y2 (t) = v(t)y1 (t) = v(t)e− 2a t (6.331)
6.8 Repeated Roots of the Characteristic Equation and Reduction of Order 205
R Here’s another way of looking at the choice of constants. Suppose we do not make a choice.
Then we have the general solution
b b
y(t) = c1 e− 2a t + c2 (ct + k)e− 2a t (6.342)
b t
− 2a b t
− 2a b t
− 2a
= c1 e + c2 cte + c2 ke (6.343)
b t
− 2a b t
− 2a
= (c1 + c2 k)e + c2 cte (6.344)
since they are all constants we just get
b b
y(t) = c1 e− 2a t + c2te− 2a t (6.345)
To summarize: if the characteristic equation has repeated roots r1 = r2 = r, the general solution
is
y(t) = c1 ert + c2tert (6.346)
Now for examples:
206 Chapter 6. Ordinary Differential Equations
r2 − 4r + 4 = 0 (6.348)
2
(r − 2) = 0 (6.349)
so we see that we have a repeated root r = 2. The general solution and its derivative are
−1 = c1 (6.352)
6 = 2c1 + c2 (6.353)
and so we conclude that we have a repeated root r = − 54 and the general solution and its derivative
are
5 5
y(t) = c1 e− 4 t + c2te− 4 t (6.358)
5 5 5 5 5
y0 (t) = − c1 e− 4 t + c2 e− 4 t − c2te− 4 t (6.359)
4 4
Plugging in the initial conditions yields
−1 = c1 (6.360)
5
2 = − c1 + c2 (6.361)
4
5 3 5
y(t) = −e− 4 t + te− 4 t (6.362)
4
6.8 Repeated Roots of the Characteristic Equation and Reduction of Order 207
Let’s now consider the case when the coefficients are not constants
In general this is not easy, but if we can guess a solution, we can use the techniques developed
in the repeated roots section to find another solution. This method will be called Reduction Of
Order. Consider a few examples
Example 6.53 Find the general solution to
y2 = vt −1 (6.366)
y02 = vt 0 −1
− vt −2
(6.367)
y002 = v t 00 −1
−v t 0 −2
+ 2vt −3
=v t 00 −1 0 −2
− 2v t + 2vt −3
(6.368)
The next step is to plug into the original equation so we can solve for v:
Notice that the only terms left involve v00 and v0 , not v. This also happened in the repeated root case.
The v term should always disappear at this point, so we have a check on our work. If there is a v
term left we have done something wrong.
Now we know that if y2 is a solution, the function v must satisfy
But this is a second order linear homogeneous equation with nonconstant coefficients. Let w(t) =
v0 (t). By changing variables our equation becomes
3
w0 − w = 0. (6.373)
2t
So by Integrating Factor
− 2t3 dt 3 3
R
µ(t) = e = e− 2 ln(t) = t − 2 (6.374)
− 32 0
(t w) = 0 (6.375)
− 32
t w = c (6.376)
3
w(t) = ct 2 (6.377)
208 Chapter 6. Ordinary Differential Equations
So we know what w(t) must solve the equation. But to solve our original differential equation, we
do not need w(t), we need v(t). Since v0 (t) = w(t), integrating w will give our v
Z
v(t) = w(t)dt (6.378)
Z
3
= ct 2 t dt (6.379)
2 5
= ct 2 + k (6.380)
5
5
Now this is the general form of v(t). Pick c = 5/2 and k = 0. Then v(t) = t 2 , so y2 (t) = v(t)y1 (t) =
3
t 2 , and the general solution is
3
y(t) = c1t −1 + c2t 2 (6.381)
Reduction of Order is a powerful method for finding a second solution to a differential equation
when we do not have any other method, but we need to have a solution to begin with. Sometimes
even finding the first solution is difficult.
We have to be careful with these problems sometimes the algebra is tedious and one can make
sloppy mistakes. Make sure the v terms disappears when we plug in the derivatives for y2 and check
the solution we obtain in the end in case there was an algebra mistake made in the solution process.
Example 6.54 Find the general solution to
given that
y1 (t) = t (6.383)
is a solution.
Start by setting y2 (t) = v(t)y1 (t). So we have
y2 = tv (6.384)
y02 0
= tv + v (6.385)
y002 00 0
= tv + v + v = tv + 2v . 0 00 0
(6.386)
Notice the v drops out as desired. We make the change of variables w(t) = v0 (t) to obtain
t 3 w0 + 4t 2 w = 0 (6.390)
(t 4 w)0 = 0 (6.391)
4
t w = c (6.392)
−4
w(t) = ct (6.393)
6.9 Second-Order Linear Equations with Constant Coefficients and Non-zero
Right-Hand Side 209
So we have
Z
v(t) = w(t)dt (6.394)
Z
= ct −4 dt (6.395)
c
= − t −3 + k. (6.396)
3
A nice choice for the constants is c = −3 and k = 0, so v(t) = t −3 , which gives a second solution
of y2 (t) = v(t)y1 (t) = t −2 . So our general solution is
Theorem 6.9.1 Suppose that Y1 (t) and Y2 (t) are two solutions to equation (6.398) and that
y1 (t) and y2 (t) are a fundamental set of solutions to (6.399). Then Y1 (t) −Y2 (t) is a solution to
Equation (6.399) and has the form
Notice the notation used, it will be standard. Uppercase letters are solutions to the nonhomoge-
neous equation and lower case letters to denote solutions to the homogeneous equation.
Let’s verify the theorem by plugging in Y1 −Y2 to (6.399)
So we have that Y1 (t) −Y2 (t) solves equation (6.399). We know that y1 (t) and y2 (t) are a fundamen-
tal set of solutions to equation (6.399) and so any solution can be written as a linear combination of
them. Thus for constants c1 and c2
So the difference of any two solutions of (6.398) is a solution to (6.399). Suppose we have a
solution to (6.398), which we denote by Yp (t). Let Y (t) denote the general solution. We have seen
or
the complimentary solution and Yp (t) a particular solution. So, the general solution can be
expressed as
Thus, to find the general solution of (6.398), we’ll need to find the general solution to (6.399) and
then find some solution to (6.398). Adding these two pieces together give the general solution to
(6.398).
If we vary a solution to (6.398) by just adding in some solution to Equation (6.399), it will still
solve Equation (6.398). Now the goal of this section is to find some particular solution Yp (t) to
Equation (6.398). We have two methods. The first is the method of Undetermined Coefficients,
which reduces the problem to an algebraic problem, but only works in a few situations. The other
called Variation of Parameters is a much more general method that always works but requires
integration which may or may not be tedious.
for g(t) 6= 0. The other disadvantage is it only works for a small class of g(t)’s.
Recall that we are trying to find some particular solution Yp (t) to Equation (6.410). The idea
behind the method is that for certain classes of nonhomogeneous terms, we’re able to make a good
educated guess as to how Yp (t) should look, up to some unknown coefficients. Then we plug our
guess into the differential equation and try to solve for the coefficients. If we can, our guess was
correct and we have determined Yp (t). If we cannot solve for the coefficients, then we guessed
incorrectly and we will need to try again.
How can we guess the form of Yp (t)? When we plug Yp (t) into the equation, we should get
g(t) = 2e4t . We know that exponentials never appear or disappear during differentiation, so try
for some coefficient A. Differentiate, plug in, and see if we can determine A. Plugging in we get
16Ae4t − 4(4Ae4t ) − 12Ae4t = 2e4t (6.413)
4t 4t
−12Ae = 2e (6.414)
For these to be equal we need A to satisfy
1
−12A = 2 ⇒ A = − . (6.415)
6
So with this choice of A, our guess works, and the particular solution is
1
Yp (t) = − e4t . (6.416)
6
where the complimentary solution yc (t) is the general solution to the associated homogeneous
equation
and Yp (t) is the particular solution to the original differential equation. From the previous example
we know
1
Yp (t) = − e4t . (6.420)
6
What is the complimentary solution? Our associated homogeneous equation has constant coeffi-
cients, so we need to find roots of the characteristic equation.
r2 − 4r − 12 = 0 (6.421)
(r − 6)(r + 2) = 0 (6.422)
So we conclude that r1 = 6 and r2 = −2. These are distinct roots, so the complimentary solution
will be
We must be careful to remember the initial conditions are for the non homogeneous equation, not
the associated homogeneous equation. Do not apply them at this stage to yc , since that is not a
solution to the original equation.
So our general solution is the sum of yc (t) and Yp (t). We’ll need it and its derivative to apply
the initial conditions
1
y(t) = c1 e6t + c2 e−2t − e4t (6.424)
6
2
y0 (t) = 6c1 e6t − 2c2 e2t − e4t (6.425)
3
Now apply the initial conditions
13 1
− = y(0) = c1 + c2 − (6.426)
6 6
7 2
= y0 (0) = 6c1 − 2c2 − (6.427)
3 3
This system is solved by c1 = − 18 and c2 = − 158 , so our solution is
1 15 1
y(t) = − e6t − e−2t − e4t . (6.428)
8 8 6
Trig Functions
The second class of nonhomogeneous terms for which we can use this method are trig functions,
specifically sin and cos.
Example 6.57 Find a particular solution for the following IVP
y00 − 4y0 − 12y = 6 cos(4t). (6.429)
In the first example the nonhomogeneous term was exponential, and we know when we
differentiate exponentials they persist. In this case, we’ve got a cosine function. When we
differentiate a cosine, we get sine. So we expect an initial guess to require a sine term in addition to
cosine. Try
Yp (t) = A cos(4t) + B sin(4t). (6.430)
Now differentiate and plug in
−16A cos(4t) − 16B sin(4t) − 4 −4A sin(4t) + 4B cos(4t)) − 12(A cos(4t) + B sin(4t) = 13 cos(4t)
(6.431)
(−16A − 16B − 12A) cos(4t) + (−16B + 16A − 12B) sin(4t) = 13 cos(4t)
(6.432)
(−28A − 16B) cos(4t) + (16A − 28B) sin(4t) = 13 cos(4t)
(6.433)
To solve for A and B set the coefficients equal. Note that the coefficient for sin(4t) on the right
hand side is 0. So we get the system of equations
cos(4t) : −28A − 16B = 13 (6.434)
sin(4t) : 16A − 28B = 0. (6.435)
7
This system is solved by A = − 20 and B = − 15 . So a particular solution is
7 1
Yp (t) = − cos(4t) − sin(4t) (6.436)
20 5
Note that the guess would have been the same if g(t) had been sine instead of cosine.
6.9 Second-Order Linear Equations with Constant Coefficients and Non-zero
Right-Hand Side 213
Polynomials
The third and final class of nonhomogeneous term we can use with this method are polynomials.
Example 6.58 Find a particular solution to
In this case, g(t) is a cubic polynomial. When differentiating polynomials the order decreases. So
if our initial guess is a cubic, we should capture all terms that will arise. Our guess
Note that we have a t 2 term in our equation even though one does not appear in g(t)! Now
differentiate and plug in
6At + 2B − 4(3At 2 + 2Bt +C) − 12(At 3 + Bt 2 +Ct + D) = 3t 2 − 5t + 2 (6.439)
−12At 3 + (12A − 12B)t 2 + (6A − 8B − 12C)t + (2B − 4C − 12D) = 3t 2 − 5t + 2 (6.440)
We obtain a system of equations by setting coefficients equal
1
t 3 : −12A = 3 ⇒ A = − (6.441)
4
1
t 2 : −12A − 12B = 0 ⇒ B = (6.442)
4
1
t : 6A − 8B − 12C = −5 ⇒ C = (6.443)
8
1
1 : 2B − 4C − 12D = 2 ⇒ D = − (6.444)
6
So a particular solution is
1 1 1 1
Yp (t) = − t 3 + t 2 + t − (6.445)
4 4 8 6
Summary
Given each of the basic types, we make the following guess
aeαt ⇒ Aeαt (6.446)
a cos(αt) ⇒ A cos(αt) + B sin(αt) (6.447)
a sin(αt) ⇒ A cos(αt) + B sin(αt) (6.448)
n n−1 n n−1
ant + an−1t + ... + a1t + a0 ⇒ Ant + An−1t + ... + A1t + A0 (6.449)
6.9.4 Products
The idea for products is to take products of our forms above.
Example 6.59 Find a particular solution to
Start by writing the guess for the individual pieces. g(t) is the product of a polynomial and an
exponential. Thus guess for the polynomial is At + B while the guess for the exponential is Ce4t .
So the guess for the product should be
Basic Rule: If we have a product with an exponential write down the guess for the other piece
and multiply by an exponential without any leading coefficient.
Example 6.60 Find a particular solution to
9 4 e5t
Yp (t) = e5t − t− = − (9t + 8). (6.466)
10 5 10
6.9 Second-Order Linear Equations with Constant Coefficients and Non-zero
Right-Hand Side 215
Example 6.61 Write down the form of the particular solution to
Here we have a product of a quadratic and a cosine. The guess for the quadratic is
At 2 + Bt +C (6.468)
Each of the coefficients is a product of two constants, which is another constant. Simply to get our
final guess
This is indicative of the general rule for a product of a polynomial and a trig function. Write
down the guess for the polynomial, multiply by cosine, then add to that the guess for the polynomial
multiplied by a sine.
This homogeneous term has all three types of special functions. So combining the two general
rules above, we get
6.9.5 Sums
We have the following important fact. If Y1 satisfies
and Y2 satisfies
This means that if our nonhomogeneous term g(t) is a sum of terms we can write down the
guesses for each of those terms and add them together for our guess.
216 Chapter 6. Ordinary Differential Equations
Our nonhomogeneous term g(t) = e7t + 12 is the sum of an exponential g1 (t) = e7t and a 0 degree
polynomial g2 (t) = 12. The guess is
1
Yp (t) = e7t − 1. (6.481)
9
But A +C and B + D are just some constants, so we can replace them with the guess
Since they have the same argument, the previous example showed we can combine the guesses for
cos(14t) and sin(14t) into
NOTE: If this situation arises when the complimentary solution has a repeated root and has the
form
yc (t) = c1 ert + c2tert (6.502)
then our guess for the particular solution should be
Yp (t) = At 2 ert . (6.503)
218 Chapter 6. Ordinary Differential Equations
(4) For the ith subproblem assume a particular solution of the appropriate functions (exponential,
sine, cosine, polynomial). If there is a duplication in Yi (t) with a solution to the homogeneous
problem then multiply Yi (t) by t (or if necessary t 2 ).
(5) Find the particular solution Yi (t) for each subproblem. Then the sum of the Yi is a particular
solution for the full nonhomogeneous problem.
(6) Form the general solution by summing all the complimentary solutions from the homogeneous
equation and the n particular solutions.
(7) Use the initial conditions to determine the values of the arbitrary constants remaining in the
general solution.
Now for more examples, write down the guess for the particular solution:
(1) y00 − 3y0 − 28y = 6t + e−4t − 2
First we find the complimentary solution using the characteristic equation
Now look at the nonhomogeneous term which is a polynomial and exponential, 6t − 2 + e−4t . So
our initial guess should be
At + B +Ce−4t (6.506)
The first two terms are fine, but the last term is in the complimentary solution. Since Cte−4t does
not show up in the complimentary solution our guess should be
Again we have a Ce8t term which is also in the complimentary solution. So we need to multiply the
entire first term by t, so our final guess is
We notice the second and third terms contain parts of the complimentary solution so we need to
multiply by t, so we have a our final guess
Yp (t) = e−t (A cos(2t) + B sin(2t)) + (Ct 2 + Dt) cos(2t) + (Et 2 + Ft) sin(2t). (6.513)
So our initial guess for the particular solution is the same as the last example
This time the first term causes the problem, so multiply the first term by t to get the final guess
So even though the nonhomogeneous parts are the same the guess also depends critically on the
complimentary solution and the differential equation itself.
(5) y00 + 4y0 + 4y = t 2 e−2t + 2e−2t
The complimentary solution is
Notice that we can factor out a e−2t from out nonhomogeneous term, which becomes (t 2 + 2)e−2t .
This is the product of a polynomial and an exponential, so our initial guess is
But the Ce−2t term is in yc (t). Also, Cte−2t is in yc (t). So we must multiply by t 2 to get our final
guess
6.10.1 Applications
The first application is mechanical vibrations. Consider an object of a given mass m hanging from
a spring of natural length l, but there are a number of applications in engineering with the same
general setup as this.
We will establish the convention that always the downward displacement and forces are
positive, while upward displacements and forces are negative. BE CONSISTENT. We also measure
all displacements from the equilibrium position. Thus if our displacement is u(y), u = 0 corresponds
to the center of gravity as it hangs at rest from a spring.
220 Chapter 6. Ordinary Differential Equations
We need to develop a differential equation to model the displacement u of the object. Recall
Newton’s Second Law
F = ma (6.520)
where m is the mass of the object. We want our equation to be for displacement, so we’ll replace a
by u00 , and Newton’s Second Law becomes
What are the various forces acting on the object? We will consider four different forces, some of
which may or may not be present in a given situation.
(1) Gravity, Fg
The gravitational force always acts on an object. It is given by
Fg = mg (6.522)
where g is the acceleration due to gravity. For simpler computations, you may take g = 10 m/s.
Notice gravity is always positive since it acts downward.
(2) Spring, Fs
We attach an object to a spring, and the spring will exert a force on the object. Hooke’s Law
governs this force. The spring force is proportional to the displacement of the spring from its
natural length. What is the displacement of the spring? When we attach an object to a spring, the
spring gets stretched. The length of the stretched spring is L. Then the displacement from its natural
length is L + u.
So the spring force is
Fs = −k(L + u) (6.523)
where k > 0 is the spring constant. Why is it negative? It is to make sure the force is in the correct
direction. If u > −L, i.e. the spring has been stretched beyond its natural length, then u + L > 0
and so Fs < 0, which is what we expect because the spring would pull upward on the object in this
situation. If u < −L, so the spring is compressed, then the spring force would push the object back
downwards and we expect to find Fs > 0.
(3) Damping, Fd
We will consider some situations where the system experiences damping. This will not always
be present, but always notice if damping is involved. Dampers work to counteract motion (example:
shocks on a car), so this will oppose the direction of the object’s velocity.
In other words, if the object has downward velocity u0 > 0, we would want the damping force
to be acting in the upwards direction, so that Fd < 0. Similarly, if u0 < 0, we want Fd > 0. Assume
all damping is linear.
Fd = −γu0 (6.524)
The most important part of any problem is identifying all the forces involved in the problem.
Some may not be present. The forces will change depending on the particular situation. Let’s
consider the general form of our differential equation modeling a spring system. We have
What happens when the object is at rest. Equilibrium is u = 0, there are only two forces acting on
the object: gravity and the spring force. Since the object is at rest, these two forces must balance to
0. So Fg + Fs = 0. In other words,
mg = kL. (6.528)
and this is the most general form of our equation, with all forces present. We have the corresponding
initial conditions
Before we discuss individual examples, we need to touch on how we might figure out the
constants k and γ if they are not explicitly given. Consider the spring constant k. We know if the
spring is attached to some object with mass m, the object stretches the spring by some length L
when it is at rest. We know at equilibrium mg = kL. Thus, if we know how much some object with
a known mass stretches the spring when it is at rest, we can compute
mg
k= . (6.532)
L
How do we compute γ? If we do not know the damping coefficient from the beginning, we may
know how much force a damper exerts to oppose motion of a given speed. Then set |Fd | = γ|u0 |,
where |Fd | is the magnitude of the damping force and |u0 | is the speed of motion. So we have γ = Fud0 .
We will see how to compute in examples on damped motion. Let’s consider specific spring mass
systems.
mu00 + ku = 0, (6.533)
mr2 + k = 0, (6.534)
222 Chapter 6. Ordinary Differential Equations
This is why we called ω0 the natural frequency of the system: it is the frequency of motion when
the spring-mass system has no interference from dampers or external forces.
Given initial conditions we can solve for c1 and c2 . This is not the ideal form of the solution
though since it is not easy to read off critical information. After we solve for the constants rewrite
as
where R > 0 is the amplitude of displacement and δ is the phase angle of displacement, some-
times called the phase shift.
Before determining how to rewrite the general solution in this desired form lets compare the
two forms. When we keep it as the general solution is it easier to find the constants c1 and c2 . But
the new form is easier to work with since we can immediately see the amplitude making it much
easier to graph. So ideally we will find the general solution, solve for c1 and c2 , and then convert to
the final form.
Assume we have c1 and c2 how do we find R and δ ? Consider Equation (6.539) we can use a
trig identity to write it as
Notice
Also,
c2 sin(δ )
= = tan(δ ). (6.544)
c1 cos(δ )
to find δ .
6.10 Mechanical and Electrical Vibrations 223
Example 6.65 A 2kg object is attached to a spring, which it stretches by 58 m. The object is
given an initial displacement of 1m upwards and given an initial downwards velocity of 4m/sec.
Assuming there are no other forces acting on the spring-mass system, find the displacement of the
object at time t and express it as a single cosine.
The first step is to write down the initial value problem for this setup. We’ll need to find an m
and k. m is easy since we know the mass of the object is 2kg. How about k? We know
mg (2)(10)
k= = 5
= 32. (6.545)
L 8
So our differential equation is
2u00 + 32u = 0. (6.546)
The initial conditions are given by
u(0) = −1, u0 (0) = 4. (6.547)
The characteristic equation is
2r2 + 32 = 0, (6.548)
q p
k
and this has roots r1,2 = ±4i. Hence ω0 = 4. Check: ω0 = m = 32/2 = 4. So our general
solution is
u(t) = c1 cos(4t) + c2 sin(4t). (6.549)
Using our initial conditions, we see
−1 = u(0) = c1 (6.550)
0
4 = u (0) = 4c2 ⇒ c2 = 1. (6.551)
So the solution is
u(t) = − cos(4t) + sin(4t). (6.552)
We want to write this as a single cosine. Compute R
q √
R = c21 + c22 = 2. (6.553)
Now consider δ
c2
tan(δ ) = = −1. (6.554)
c1
So δ is in Quadrants II or IV. To decide which look at the values of cos(δ ) and sin(δ ). We have
sin(δ ) = c2 > 0 (6.555)
cos(δ ) = c1 < 0. (6.556)
So δ must be in Quadrant II, since there sin > 0 and cos < 0. If we take arctan(−1) = − π4 , this
has a value in Quadrant IV. Since tan is π-periodic, however, − π4 + π = 3π
4 is in Quadrant II and
also has a tangent of −1 Thus our desired phase angle is
c2 3π
δ = arctan( ) + π = arctan(−1) + π = (6.557)
c1 4
and our solution has the final form
√ 3π
u(t) = 2 cos(4t − ). (6.558)
4
224 Chapter 6. Ordinary Differential Equations
mr2 + γr + k = 0, (6.560)
(1) γ 2 − 4mk = 0
γ
This case gives a double root of r = − 2m , and so the general solution to our equation is
γ γ
u(t) = c1 e 2m + c2te− 2m (6.562)
Notice that limt→∞ u(t) = 0, which is good, since this signifies damping. This is called critical
damping and occurs when
γ 2 − 4mk = 0 (6.563)
√ √
γ = 4mk = 2 mk (6.564)
√
This value of γ − 2 mk is denoted by γCR and is called the critical damping coefficient. Since
this case separates the other two it is generally useful to be able to calculate this coefficient for a
given spring-mass system, which we can do using this formula. Critically damped systems may
cross u = 0 once but will never cross more than that. No oscillation
But what is the behavior of this solution? The solution should die out since we have damping. We
need to check limt→∞ u(t) = 0. Rewrite the roots
p
−γ ± γ 2 − 4mk
r1,2 = (6.566)
2m
q
−γ ± γ( 1 − 4mk
γ2
)
= (6.567)
2ms
γ 4mk
= − (1 ± 1− ) (6.568)
2m γ2
and so
s
4mk
1− < 1. (6.570)
γ2
so the quantity in parenthesis above is guaranteed to be positive, which means both of our roots are
negative.
Thus the damping in this case has the desired effect, and the vibration will die out in the limit.
This case, which occurs when γ > γCR , is called overdamping. The solution won’t oscillate around
equilibrium, but settles back into place. The overdamping kills all oscillation
Before we solve it, see which case we’re in. To do so, let’s calculate the critical damping coefficient.
√ √
γCR = 2 mk = 2 64 = 16. (6.577)
So we are critically damped, since γ = γCR . This means we will get a double root. Solving the
characteristic equation we get r1 = r2 = −4 and the general solution is
Example 6.67 For the same spring-mass system as in the previous example, attach a damper
that exerts a force of 40N when the speed is 2m/s. Find the displacement at any time t.
the only difference from the previous example is the damping force. Lets compute γ
|Fd | 40
γ= = = 20. (6.580)
|u0 | 2
Since we computed γCR = 16, this means we are overdamped and the characteristic equation should
give us distinct real roots. The IVP is
The characteristic equation has roots r1 = −8 and r2 = −2. So the general solution is
Notice here we do not actually have a "vibration" as we normally think of them. The damper is
strong enough to force the vibrations to die out so quickly that we do not notice much if any of
them.
Example 6.68 For the same spring-mass system as in the previous two examples, add a damper
that exerts a force of 16N when the speed is 2m/s.
In this case, the damping coefficient is
16
γ= = 8, (6.584)
2
which tells us that this case is underdamped as γ < γCR = 16. We should expect complex roots of
the characteristic equation. The IVP is
√ 1 √
u(t) = −e−2t cos( 12t) + √ e2t sin( 12t). (6.588)
12
Let’s write this as a single cosine
s r
1 13
R = (−1)2 + ( √ )2 = (6.589)
12 12
1
tan(δ ) = − √ (6.590)
12
As in the undamped case, we look at the signs of c1 and c2 to figure out what quadrant δ is in. By
doing so, we see that δ has negative cosine and positive sine, so it is in Quadrant II. Hence we need
to take the arctangent and add π to it
1
δ = arctan(− √ ) + π. (6.591)
12
Thus our displacement is
√
r
13 −2t 1
u(t) = e cos( 12t − arctan(− √ − π). (6.592)
12 12
In this case, we actually get a vibration, even√though its amplitude steadily decreases until it is
negligible. The vibration has quasi-frequency 12.
This is a nonhomogeneous equation, so we will need to find both the complimentary and particular
solution.
Recall that uc (t) is the solution to the associated homogeneous equation. We will use undetermined
coefficients to find the particular solution Up (t) (if F(t) has an appropriate form) or variation of
parameters.
228 Chapter 6. Ordinary Differential Equations
The force we are applying to our spring-mass system is a simple periodic function with frequency
ω. For now we assume F(t) = F0 cos(ωt), but everything is analogous if it is a sine function. So
consider
We need to be careful, note that we are okay since ω0 6= ω, but if the frequency of the forcing
function is the same as the natural frequency, then this guess is the complimentary solution uc (t).
Thus, if ω0 = ω, we need to multiply by a factor of t. So there are two cases.
(1) ω 6= ω0
In this case, our initial guess is not the complimentary solution, so the particular solution will
be
Notice that the amplitude of the particular solution is dependent on the amplitude of the forcing
function F0 and the difference between the natural frequency and the forcing frequency.
6.10 Mechanical and Electrical Vibrations 229
We can write our displacement function in two forms, depending on which form we use for
complimentary solution.
F0
u(t) = c1 cos(ω0t) + c2 sin(ω0t) + 2
cos(ωt) (6.607)
m(ω0 − ω 2 )
F0
u(t) = R cos(ω0t − δ ) + 2
cos(ωt) (6.608)
m(ω0 − ω 2 )
Again, we get an analagous solution if the forcing function were F(t) = F0 sin(ωt).
The key feature of this case can be seen in the second form. We have two cosine functions
with different frequencies. These will interfere with each other causing the net oscillation to vary
between great and small amplitude. This phenomena has a name "beats" derived from musical
terminology. Thing of hitting a tuning fork after it has already been struck, the volume will increase
and decrease randomly. One hears the waves created here in the exact form of our solution.
(2) ω = ω0
If the frequency of the forcing function is the same as the natural frequency, so the guess for
the particular solution is
To begin simplification recall that ω02 = mk , so mω02 = k. this means the first two terms will vanish
(expected since no analogous terms on right side), and we get
such that the system will experience resonance. If the object is initially displaced 20cm downward
and given an initial upward velocity of 10cm/s, find the displacement at any time t.
We need to be aware of the units, convert all lengths to meters. Find k
mg (3)(10)
k= = = 75 (6.618)
L .4
Next, we are told the system experiences resonance. Thus the forcing frequency ω must be the
natural frequency ω0 .
r r
k 75
ω = ω0 = = =5 (6.619)
m 3
Thus our initial value problem is
The complimentary solution is the general solution of the associated free, undamped case. Since
we have computed the natural frequency already, the complimentary solution is just
1 1 1
u(t) = cos(5t) − sin(5t) + t sin(5t) (6.624)
5 50 3
6.11 Two-Point Boundary Value Problems and Eigenfunctions 231
Example 6.71 Consider y00 + y = 0 with boundary conditions y(0) = y(6) = 0. this seems similar
to the previous problem, the solutions still have the general form
y(x) = A cos(x) + B sin(x) (6.631)
and the first condition still tells us A = 0. The second condition tells us that 0 = y(6) = B sin(6).
Now since sin(6) 6= 0, so we must have B = 0 and the entire solution is y(x) = 0.
232 Chapter 6. Ordinary Differential Equations
Boundary value problems occur in nature all the time. Examine the examples physically. We
know from previous chapters y00 + y = 0 models an oscillator such as a rock hanging from a spring.
1
The rock will oscillate with frequency 2π . The condition y(0) = 0 just means that when we start
observing, we want the rock to be at the equilibrium spot. If we specify y(2π) = 0, this will
automatically happen, since the motion is 2π periodic. On the other hand, it is impossible for the
rock to return to the equilibrium point after 6 seconds. It will come back in 2π seconds, which is
more than 6. So the only possible way the rock can be at equilibrium after 6 seconds is if it does
not leave, which is why the only solution is the zero solution.
The previous examples are homogeneous boundary value problems. We say that a boundary
problem is homogeneous if the equation is homogeneous and the two boundary conditions involve
zero. That is, homogeneous boundary conditions might be one of these types
y(x1 ) = 0 y(x2 ) = 0 (6.632)
0
y (x1 ) = 0 y(x2 ) = 0 (6.633)
0
y(x1 ) = 0 y (x2 ) = 0 (6.634)
0 0
y (x1 ) = 0 y (x2 ) = 0. (6.635)
On the other hand, if the equation is nonhomogeneous or any of the boundary conditions do not
equal zero, then the boundary value problem is nonhomogenous or inhomogeneous. Let’s look at
some examples of nonhomogeneous boundary value problems.
Example 6.72 Take y00 + 9y = 0 with boundary conditions y(0) = 2 and y( π6 ) = 1. The general
solution to the differential equation is
Example 6.73 Take y00 + 9y = 0 with boundary conditions y(0) = 2 and y(2π) = 2. The general
solution to the differential equation is
6.11 Two-Point Boundary Value Problems and Eigenfunctions 233
Example 6.74 Take y00 + 9y = 0 with boundary conditions y(0) = 2 and y(2π) = 4. The general
solution to the differential equation is
2 = y(0) = A (6.645)
4 = y(2π) = A. (6.646)
On one hand, A = 2 and by the second equation A = 4. This is impossible and this boundary value
problem has no solutions.
These examples illustrate that a small change to the boundary conditions can dramatically
change the problem, unlike small changes in the initial data for initial value problems.
Ax = λ x (6.647)
where for certain values of λ , called eigenvalues, there are nonzero solutions called eigenvectors.
We have a similar situation with boundary value problems.
Consider the problem
y00 + λ y = 0 (6.648)
with boundary conditions y(0) = 0 and y(π) = 0. The values of λ where we get nontrivial (nonzero)
solutions will be eigenvalues. The nontrivial solutions themselves are called eigenfunctions.
We need to consider three cases separately.
(1) If λ > 0, then it is convenient to let λ = µ 2 and rewrite the equation as
y00 + µ 2 y = 0 (6.649)
Note that µ 6= 0 since λ > 0. Recall the boundary conditions are y(0) = 0 and y(π) = 0. So the
first boundary condition gives A = 0. The second boundary condition reduces to
B sin(µπ) = 0 (6.651)
For nontrivial solutions B 6= 0. So sin(µπ) = 0. Thus µ = 1, 2, 3, ... and thus the eigenvalues λn
are 1, 4, 9, ..., n2 . The eigenfunctions are only determined up to arbitrary constant, so convention is
to choose the arbitrary constant to be 1. Thus the eigenfunctions are
y00 − µ 2 y = 0 (6.653)
234 Chapter 6. Ordinary Differential Equations
The characteristic equation is r2 − µ 2 = 0 with roots r = ±µ, so its general solution can be written
as
y(x) = A cosh(µx) + B sinh(µx) = Ceµx + De−µx (6.654)
The first boundary condition, if considering the first form, gives A = 0. The second boundary
condition gives B sinh(µπ) = 0. Since µ 6= 0, then sinh(µπ) 6= 0, and therefore B = 0. So for
λ < 0 the only solution is y = 0, there are no nontrivial solutions and thus no eigenvalues.
(3) If λ = 0, then the equation above becomes
y00 = 0 (6.655)
and the general solution if we integrate twice is
y(x) = Ax + B (6.656)
The boundary conditions are only satisfied when A = 0 and B = 0. So there is only the trivial
solution y = 0 and λ = 0 is not an eigenvalue.
To summarize we only get real eigenvalues and eigenvectors when λ > 0. There may be
complex eigenvalues. A basic problem studied later in the chapter is
y00 + λ y = 0, y(0) = 0, y(L) = 0 (6.657)
Hence the eigenvalues and eigenvectors are
n2 π 2 nπx
λn = 2
, yn (x) = sin( ) for n = 1, 2, 3, ... (6.658)
L L
This is the classical Euler Buckling Problem.
Review Euler’s Equations:
Example 6.75 Consider equation of the form
We call a system like this coupled because we need to know what x1 is to know what x2 is and vice
versa. It is important to note that there will be a lot of similarities between our discussion and the
previous sections on second and higher order linear equations. This is because any higher order
linear equation can be written as a system of first order linear differential equations.
Example 6.76 Write the following second order differential equation as a system of first order
linear differential equations
All that is required to rewrite this equation as a first order system is a very simple change of
variables. In fact, this is ALWAYS the change of variables to use for a problem like this. We set
Then we have
x10 = y0 = x2 (6.673)
x20 00 0
= y = y − 4y = x1 − 4x2 (6.674)
Notice how we used the original differential equation to obtain the second equation. The first
equation, x10 = x2 , is always something you should expect to see when doing this. All we have left
to do is to convert the initial conditions.
Thus our original initial value problem has been transformed into the system
We want to use a similar change of variables as the previous example. The only difference is
that since our equation in this example is fourth order we will need four new variables instead of
two.
x1 = y (6.680)
0
x2 = y (6.681)
00
x3 = y (6.682)
000
x4 = y (6.683)
Then we have
x10 = y0 = x2 (6.684)
x20 00
= y = x3 (6.685)
x30 000
= y = x4 (6.686)
x40 = y (4) 0 00 000
= y + 3y + 2y − ty = x1 + 3x2 + 2x3 − tx4 (6.687)
as our system of equations. To be able to solve these, we need to review some facts about systems
of equations and linear algebra.
x0 = Ax (6.690)
How do we solve this equation? If A were a 1 × 1 matrix, i.e. a constant, and x were a vector with 1
component, the differential equation would be the separable equation
x0 = ax (6.691)
One might guess, then, that in the n × n case, instead of a we have some other constant in the
exponential, and instead of the constant of integration c we have some constant vector η. So our
guess for the solution will be
(A − rI)η = 0 (6.697)
6.13 Homogeneous Linear Systems with Constant Coefficients 237
This should seem familiar, it is the condition for η to be an eigenvector of A with eigenvalue r.
Thus, we conclude that for (6.693) to be a solution of the original differential equation, we must
have η an eigenvalue of A with eigenvalue r.
That tells us how to get some solutions to systems of differential equations, we find the
eigenvalues and vectors of the coefficient matrix A, then form solutions using (6.693). But how
will we form the general solution?
Thinking back to the second/higher order linear case, we need enough linearly independent
solutions to form a fundamental set. As we noticed last lecture, if we have all simple eigenvalues,
then all the eigenvectors are linearly independent, and so the solutions formed will be as well. We
will handle the case of repeated eigenvalues later.
So we will find the fundamental solutions of the form (6.693), then take their linear combina-
tions to get our general solution.
x0 = Ax = 0 (6.698)
and is a constant solution. We will assume our coefficient matrix A is nonsingular (det(A) 6= 0),
thus x = 0 is the only equilibrium solution.
The question we want to ask is whether other solutions move towards or away from this constant
solution as t → ±∞, so that we can understand the long term behavior of the system. This is no
different than what we did when we classified equilibrium solutions for first order autonomous
equations, we will generalize the ideas to systems of equations.
When we drew solution spaces then, we did so on the ty-plane. To do something analogous we
would require three dimensions, since we would have to sketch both x1 and x2 vs. t. Instead, what
we do is ignore t and think of our solutions as trajectories on the x1 x2 -plane. Then our equilibrium
solution is the origin. The x1 x2 -plane is called the phase plane. We will see examples where we
sketch solutions, called phase portraits.
So if we have real, distinct eigenvalues, all that we have to do is find the eigenvectors, form the
general solution as above, and use any initial conditions that may exist.
Example 6.78 Solve the following initial value problem
0 −2 2 5
x = x x(0) = (6.700)
2 1 0
238 Chapter 6. Ordinary Differential Equations
The first thing we need to do is to find the eigenvalues of the coefficient matrix.
−2 − λ 2
0 = det(A − λ I) = (6.701)
2 1−λ
= λ2 +λ −6 (6.702)
= (λ − 2)(λ + 3) (6.703)
(1) λ1 = 2
(A − 2I)η = 0 (6.704)
−4 2 η1 0
= (6.705)
2 −1 η2 0
Using either equation we find η2 = 2η1 , and so any eigenvector has the form
η1 η1
η= = (6.708)
η2 2η1
(2) λ2 = −3
(A + 3I)η = 0 (6.710)
1 2 η1 0
= (6.711)
2 4 η2 0
η1 + 2η2 = 0 (6.712)
2η1 + 4η2 = 0. (6.713)
Using either equation we find η1 = −2η2 , and so any eigenvector has the form
η1 −2η2
η= = . (6.714)
η2 η2
Now let’s use the initial condition to solve for c1 and c2 . The condition says
5 1 −2
= x(0) = c1 + c2 . (6.717)
0 2 1
All that’s left is to write out is the matrix equation as a system of equations and then solve.
c1 − 2c2 = 5 (6.718)
2c1 + c2 = 0 ⇒ c1 = 1, c2 = −2 (6.719)
Example 6.79 Sketch the phase portrait of the system from Example 1.
In the last example we saw that the eigenvalue/eigenvector pairs for the coefficient matrix were
(1) 1
λ1 = 2 η = (6.721)
2
(2) −2
λ2 = −3 η = . (6.722)
1
The starting point for the phase portrait involves sketching solutions corresponding to the eigenvec-
tors (i.e. with c1 or c2 = 0). We know that if x(t) is one of these solutions
This is just, for any t, a constant times the eigenvector, which indicates that lines in the direction of
the eigenvector are these solutions to the system. There are called eigensolutions of the system.
Next, we need to consider the direction that these solutions move in. Let’s start with the first
eigensolution, which corresponds to the solution with c2 = 0. The first eigenvalue is λ1 = 2 > 0.
This indicates that this eigensolution will grow exponentially, as the exponential in the solution has
a positive exponent. The second eigensolution corresponds to λ2 = −3 < 0, so the exponential in
the appropriate solution is negative. Hence this solution will decay and move towards the origin.
What does the typical trajectory do (i.e. a trajectory where both c1 , c2 6= 0)? The general
solution is
Thus as t → ∞, this solution will approach the positive eigensolution, as the component correspond-
ing to the negative eigensolution will decay away. On the other hand, as t → −∞, the trajectory
will asymptotically reach the negative eigensolution, as the positive eigensolution component will
be tiny. The end result is the phase portrait as in Figure 1. When the phase portrait looks like this
(which happens in all cases with eigenvalues of mixed signs), the equilibrium solution at the origin
is classified as a saddle point and is unstable.
240 Chapter 6. Ordinary Differential Equations
(A − I)η = 0 (6.731)
3 1 η1 0
= (6.732)
3 1 η2 0
So we will want to find solutions to the system
3η1 + η2 = 0 (6.733)
3η1 + η2 = 0. (6.734)
Using either equation we find η2 = −3η1 , and so any eigenvector has the form
η1 η1
η= = (6.735)
η2 −3η1
6.13 Homogeneous Linear Systems with Constant Coefficients 241
(2) λ2 = 5
(A − 5I)η = 0 (6.737)
−1 1 η1 0
= (6.738)
3 −3 η2 0
−η1 + η2 = 0 (6.739)
3η1 − 3η2 = 0. (6.740)
Using either equation we find η1 = η2 , and so any eigenvector has the form
η1 η2
η= = . (6.741)
η2 η2
Now using our initial conditions we solve for c1 and c2 . The condition gives
6 1 1
= x(0) = c1 + c2 . (6.744)
2 −3 1
All that is left is to write out this matrix equation as a system of equations and then solve
c1 + c2 = 6 (6.745)
−3c1 + c2 = 2 ⇒ c1 = 1, c2 = 5 (6.746)
Example 6.81 Sketch the phase portrait of the system from Example 3.
In the last example, we saw that the eigenvalue/eigenvector pairs for the coefficient matrix were
(1) 1
λ1 = 1 η = . (6.748)
−3
(2) 1
λ2 = 5 η = . (6.749)
1
242 Chapter 6. Ordinary Differential Equations
We begin by sketching the eigensolutions (these are straight lines in the directions of the eigenvec-
tors). Both of these trajectories move away from the origin, though, as the eigenvalues are both
positive.
Since |λ2 | > |λ1 |, we call the second eigensolution the fast eigensolution and the first one
the slow eigensolution. The term comes from the fact that the eigensolution corresponds to the
eigenvalue with larger magnitude will either grow or decay more quickly than the other one.
As both grow in forward time, asymptotically, as t → ∞, the fast eigensolution will dominate
the typical trajectory, as it gets larger much more quickly than the slow eigensolution does. So in
forward time, other trajectories will get closer and closer to the eigensolution corresponding to η (2) .
On the other hand, as t → −∞, the fast eigensolution will decay more quickly than the slow one,
and so the eigensolution corresponding to η (1) will dominate in backwards time.
Thus the phase portrait will look like Figure 2. Whenever we have two positive eigenvalues,
every solution moves away from the origin. We call the equilibrium solution at the origin, in this
case, a node and classify it as being unstable.
To solve, the first thing we need to do is to find the eigenvalues of the coefficient matrix.
−5 − λ 1
0 = det(A − λ I) = (6.753)
2 −4 − λ
= λ 2 + 9λ + 18 (6.754)
= (λ + 3)(λ + 6) (6.755)
6.13 Homogeneous Linear Systems with Constant Coefficients 243
(A + 3I)η = 0 (6.756)
−2 1 η1 0
= (6.757)
2 −1 η2 0
−2η1 + η2 = 0 (6.758)
2η1 − η2 = 0. (6.759)
Using either equation we find η2 = 2η1 , and so any eigenvector has the form
η1 η1
η= = (6.760)
η2 2η1
(2) λ2 = −6
(A + 6I)η = 0 (6.762)
1 1 η1 0
= (6.763)
2 2 η2 0
η1 + η2 = 0 (6.764)
2η1 + 2η2 = 0. (6.765)
Using either equation we find η1 = −η2 , and so any eigenvector has the form
η1 −η2
η= = . (6.766)
η2 η2
Now using our initial conditions we solve for c1 and c2 . The condition gives
2 1 −1
= x(0) = c1 + c2 . (6.769)
−1 2 1
244 Chapter 6. Ordinary Differential Equations
All that is left is to write out this matrix equation as a system of equations and then solve
c1 − c2 = 2 (6.770)
1 5
2c1 + c2 = −1 ⇒ c1 = , c2 = − (6.771)
3 3
Thus the particular solution is
1 −3t 1 5 −6t −1
x(t) = e − e . (6.772)
3 2 3 1
Example 6.83 Sketch the phase portrait of the system from Example 5.
In the last example, we saw that the eigenvalue/eigenvector pairs for the coefficient matrix were
(1) 1
λ1 = −3 η = (6.773)
2
(2) −1
λ2 = −6 η = . (6.774)
1
We begin by sketching the eigensolutions. Both of these trajectories decay towards the ori-
gin, since both eigenvalues are negative. Since |λ2 | > |λ1 |, the second eigensolution is the fast
eigensolution and the first one the slow eigensolution. In the general solution, both exponentials
are negative and so every solution will decay and move towards the origin. Asymptotically, as
t → ∞ the trajectory gets closer and closer to the origin, the slow eigensolution will dominate the
typical trajectory, as it dies out less quickly than the fast eigensolution. So in forward time, other
trajectories will get closer and closer to the eigensolution corresponding to η (1) . On the other hand,
as t → −∞, the fast solution will grow more quickly than the slow one, and so the eigensolution
corresponding to η (2) will dominate in backwards time.
Thus the phase portrait will look like Figure 3. Whenever we have two negative eigenvalues,
every solution moves toward the origin. We call the equilibrium solution at the origin, in this case,
a node and classify it as being asymptotically stable.
V
Part Five: PDEs and Fourier
Series
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
7. Fourier Series and Transforms
This does remarkably well at approximating functions. Notice though that the resulting function is
periodic. Fourier series are also a key tool in solving PDEs (more later).
where ω is the angular velocity and φ is the phase (horizontal displacement). Traditional
examples include a hanging mass from a spring a pendulum, and a tuning fork.
The location of the point p = (A cos(ωt), A sin(ωt)) = Aeiωt if P = x + iy. Here A is the
amplitude or the maximum displacement of the object. We also can write down the equation for the
motion of the point c
dy d
= (A sin(ωt)) = Aω cos(ωt) = B cos(ωt),
dt dt
248 Chapter 7. Fourier Series and Transforms
Figure 7.1: Convergence of Fourier Series to a step function (square wave). K is the number of
terms.
a)
b)
Figure 7.2: Depiction of simple harmonic motion using a point rotating around the unit circle or a
spring mass system.
where B = Aω is the maximum velocity achieved by the object. In physics we can define the kinetic
energy:
2
1 2 1 dy 1 1
KE = mv = m = mB2 cos2 (ωt) ≤ mB2 .
2 2 dt 2 2
Therefore, the maximum energy of the system, 12 mB2 , is proportional to the maximum velocity B
(and therefore the amplitude A).
Since sine/cosine are periodic, one we know the value on the interval [0, 2π) (or [0, L)), then
we know the value everywhere.
7.2 Fourier Coefficients 249
Example 7.1 Consider the general function representing simple harmonic motion
h x i 2π
y(x,t) := A cos 2π − f t = A cos (x − vt) . (7.3)
λ λ
ω 1 2π
Here A is the amplitude, λ is the wavelength, f = 2π is the frequency, T = f = ω is the period,
and v = f λ is the velocity.
From an ODE perspective (think last chapter) we have an equation for simple harmonic motion:
d2x k
Fnet = m = −kx (Hooke’s Law) ⇒ x00 + x = 0. (7.4)
dt 2 m
Solving this equation with the characteristic polynomial gives r2 + mk = 0, which implies that
q
r = mk i. Thus, the general solution is
Many common periodic functions are not continuous or differentiable such as the square wave,
the sawtooth, or the rectified half wave (semi-circle wave). Problem: Given a function f (x) how
an we expand it into a series of sines and cosines.
f (x + p) = f (x) (7.6)
for all x. The graph of such a function is obtained from periodic repetition of its graph over any
interval of length p.
Examples of periodic functions are f (x) = sin(x), cos(x) and examples that are not periodic are
f (x) = xn , ex , cosh(x), ln(x).
R If f (x) has a period p, then it also has a period of 2p (and np for any integer n > 0). Since
f (x + 2p) = f ([x + p] + p) = f (x + p) = f (x), ⇒ f (x + np) = f (x).
Furthermore, if functions f (x) and g(x) have period p, then a f (x) + bg(x) with any constants
a and b also has period p.
250 Chapter 7. Fourier Series and Transforms
Figure 7.3: Periodic Function. Image from Kreyzig Adv. Engineering Math
which are all 2π-periodic (see Figure!7.4). The associated series made up of these terms is called a
trigonometric series and has the form
∞
a0 +a1 cos(x)+b1 sin(x)+a2 cos(2x)+b2 sin(2x)+... = a0 + ∑ [an cos(nx) + bn sin(nx)] . (7.8)
n=1
where a0 , a1 , b1 , a2 , b2 , ... are all constants called the coefficients of the series. Since each term
has a period of 2π, then if the series converges the result must also have a period of 2π! Given a
function f (x) of period 2π and such that it can be represented by a series of this form, that series
converges, and has the sum f (x), then we can use equality to write
∞
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)] . (7.9)
n=1
Figure 7.4: Periodic Trig Function. Image from Kreyzig Adv. Engineering Math
Solution: These constants are the so-called Fourier coefficients of f (x), given by Euler for-
mulas
7.3 Fourier Coefficients 251
1 π
Z
a0 = f (x)dx
2π −π
1
Z π
an = f (x) cos(nx)dx n = 1, 2, ...
π −π
1
Z π
bn = f (x) sin(nx)dx n = 1, 2, ...
π −π
R The Fourier coefficient a0 is actually the average value of the function over its period! In other
words, if we only take the first term in the Fourier series the function f (x) is approximated by
its average value over its period. We can think of this as a “First Approximation".
Example 7.2 (Periodic Rectangular Wave) Find the Fourier coefficients of the periodic function
(
−k if −π < x < 0
f (x) = .
k if 0<x<π
This is a typical function representing an external force acting on a mechanical system or electric
circuit (see Fig. 7.5).
Figure 7.5: Square wave periodic function. Image from Kreyzig Adv. Engineering Math
252 Chapter 7. Fourier Series and Transforms
1 1 0 1 π
Z π Z Z
a0 = f (x)dx = −kdx + kdx
2π 2π −π 2π 0
"−π #
0
π
1 1
= −kx + kx =
[−kπ + kπ] = 0
2π −π 0 2π
Z 0
1 1 1 π
Z π Z
an = −k cos(nx)dx +
f (x) cos(nx)dx = k cos(nx)dx
π π π 0
"−π 0
−π
π #
1 k k 1
= − sin(nx) + sin(nx) = [0 + 0] = 0
π n −π n 0 π
Z 0
1 1 1 π
Z π Z
bn = −k sin(nx)dx +
f (x) sin(nx)dx = k sin(nx)dx
π
−π −π π π 0
" 0 π #
1 k k k 2k
= cos(nx) − cos(nx) = [1 − cos(−nπ) − cos(nπ) + 1] = (1 − cos(nπ)).
π n −π n 0 nπ nπ
4k
Hence, the Fourier sine coefficients are b2n = 0 and b2n+1 = (2n+1)π . Thus, the Fourier series is
∞
4k 1 1
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)] = sin(x) + sin(3x) + sin(5x) + . . . .
n=1 π 3 5
A picture depicting the approximation with the partial sums is shown in Fig. 7.6.
In order to derive the formulas for the Fourier coefficients we heavily rely on the following result
about the orthogonality of trigonometric functions.
This is proved by transforming each product into a single trig function using the sum/difference
formulas.
7.3 Fourier Coefficients 253
Figure 7.6: Convergence of Fourier series to a periodic function. Image from Kreyzig Adv.
Engineering Math
∞
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)]
n=1
!
Z π Z π ∞
Integrate both sides f (x)dx = a0 + ∑ [an cos(nx) + bn sin(nx)] dx
−π −π n=1
Z π Z π ∞ Z π Z π
f (x)dx = a0 dx + ∑ an cos(nx)dx + bn sin(nx) dx
−π −π n=1 −π −π
Z π
f (x)dx = 2πa0 + 0.
−π
1 Rπ
This gives the formula for a0 = 2π −π f (x)dx since all the integrals in the sum are zero.
254 Chapter 7. Fourier Series and Transforms
Now to get the formula for an we repeat this process, but multiply both sides of the expression
for a Fourier series by cos(mx) before integrating.
∞
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)]
n=1
!
Z π Z π ∞
f (x) cos(mx)dx = a0 + ∑ [an cos(nx) + bn sin(nx)] cos(mx)dx
−π −π n=1
Z π Z π Z∞ π Z π
f (x) cos(mx)dx = a0 cos(mx)dx + ∑ an cos(nx) cos(mx)dx + bn sin(nx) cos(mx) dx
−π −π n=1 −π −π
Z π Z π
f (x) cos(nx)dx = an cos2 (nx)dx = an π.
−π −π
1 Rπ
This gives the formula for bn = π −π f (x) sin(nx)dx.
Example 7.3 The fundamental period is the smallest positive period. Find it for: cos(x), cos(2x),
sin(πx), sin(2πx).
Solution: For cos(x) we know the period is 2π. To find the fundamental period for cos(kx)
we need to find when kx = 2π or x = 2π 2π
k . So the fundamental period for cos(2x) is k = π. The
2π 2π
fundamental period for cos(πx) is π = 2 and for cos(2πx) is 2π = 1.
Example 7.4 Sketch three periods of the 2π-periodic function defined on the interval −π ≤ x ≤ π
as
(
1 −π < x < 0
a) f (x) = x, b) f (x) = π − |x|, c) .
cos( 12 x) 0 < x < π
1 π 1 0 1 π
Z Z Z
a0 = f (x)dx = 0dx + 1dx
2π −π 2π −π 2π 0
π
1 1 1
= x = [π] =
2π 0 2π 2
1 1 0 1 π
Z π Z Z
an = f (x) cos(nx)dx = 0dx + cos(nx)dx
π −π π −π π 0
π
1 1 1
= sin(nx) = [0 + 0] = 0
π n 0 π
1 1 0 1 π
Z π Z Z
bn = f (x) sin(nx)dx = 0dx + sin(nx)dx
π −π π −π π 0
π
1 1 1 2
= − cos(nx) = [− cos(−nπ)] = − cos(nπ).
π n 0 nπ nπ
2 2
Hence, the Fourier sine coefficients are b2n = − 2nπ and b2n+1 = (2n+1)π . Thus, the Fourier series is
∞
1 2 1 2 1
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)] = + sin(x)− sin(2x)+ sin(3x)− sin(4x)+. . . .
n=1 2 3π 2π 5π 4π
Solution: Start by using the formulas for the Fourier coefficients: (In class with IBP)
Theorem 7.5.1 (Representation by Fourier series) Let f (x) be a periodic function with period
2π and piecewise continuous on the interval −π ≤ x ≤ π. Furthermore, let f (x) have a left-hand
and right-hand derivative at each point of that interval. Then the Fourier series
∞
f (x) = a0 + ∑ [an cos(nx) + bn sin(nx)] (7.13)
n=1
converges. It’s sum is f (x) except at points x0 where f (x) is discontinuous. There the sum of the
series is the average of the left and right hand limits of f (x) at x0 .
(
1 −3 ≤ x ≤ 0
Example 7.7 What does the Fourier Series of f (x) = will converge to at
2x 0 < x ≤ 3
x = −2, 0, 3, 5, 6?
Solution: The first two points are inside the original interval of definition of f (x), so we can
256 Chapter 7. Fourier Series and Transforms
Figure 7.7: Illustration of sum of the first few terms of a Fourier series for a function with a jump
discontinuity.
just read the function value directly. The only discontinuity of f (x) occurs at x = 0. So at x = −2,
f (x) is nice and continuous. The Fourier Series will converge to f (−2) = 1. On the other hand,
at x = 0 we have a jump discontinuity, so the Fourier Series will converge to the average of the
one-sided limits. f (0+ ) = limx→0+ f (x) = 0 and f (0− ) = limx→0− f (x) = 1, so the Fourier Series
will converge to 12 [ f (0+ ) + f (0− )] = 21 .
What happens at the other points? Here we consider where f (x) or its periodic extension,
f per (x), have jump discontinuities. These can only occur either at x = x0 + 2Lm where −L < x0 < L
is a jump discontinuity of f (x) or at endpoints x = ±L + 2Lm, since the periodic extension might
not "sync up" at these points, producing a jump discontinuity.
At x = 3, we are at one of these "boundary points" and the left-sided limit is 6 while the
right-sided limit is 1. Thus the Fourier Series will converge here to 6+1 7
2 = 2 . x = 5 is a point of
continuity for f per (x) and so the Fourier Series will converge to f per (5) = f (−1) = 1. x = 6, is a
jump discontinuity (corresponding to x = 0), so the Fourier Series will converge to 12 .
(
2 − 2 ≤ x < −1
Example 7.8 Where does the Fourier Series for f (x) = converge at
1−x −1 ≤ x ≤ 2
x = −7, −1, 6?
Solution: None of the points are inside (−2, 2) where f (x) is discontinuous. The only points where
the periodic extension might be discontinuous are the "boundary points" x = ±2 + 4k. In fact, since
f (−2) 6= f (2), these will be points of discontinuity. So f per (x) is continuous at x = −7, since it
is not a boundary point and we have f per (−7) = f (1) = 0, which is what the Fourier Series will
converge to. The same for x = −1, the Fourier Series will converge to f (−1) = 2+2 2 = 2.
For x = 6 we are at an endpoint. The left-sided limit is -1, while the right-sided limit is 2, so
the Fourier Series will converge to their average 12 .
Example 7.9 Plot the function the Fourier series will converge to for each of the following
7.6 Complex Form of Fourier Series 257
Figure 7.8: Illustration of Gibbs Phenomenon showing an “overshoot" near the jump discontinuities.
Definition 7.7.1 (Euler Identity) eiθ = cos(θ ) + i sin(θ ) and similarly e−iθ = cos(θ ) − i sin(θ ).
258 Chapter 7. Fourier Series and Transforms
Also, recall by adding and subtracting these functions we get the complex form of the sine and
cosine functions
1 1
cos(t) = (eit + e−it ), sin(t) = (eit − e−it ). (7.14)
2 2i
Recall 1/i = −i and let t = nx to find
1 1
an cos(nx) + bn sin(nx) = an (einx + e−inx ) + bn (einx − e−inx )
2 2i
1 1
= (an − ibn )einx + (an + ibn )e−inx .
2 2
Inputting this expression into the Fourier series while writing a0 = c0 , 12 (an − ibn ) = cn , 21 (an +
ibn ) = kn to find
∞
f (x) = a0 + ∑ cn einx + kn e−inx .
(7.15)
n=1
This is the complex form of the Fourier series of the Complex Fourier series of f (x). The cn are
the complex Fourier coefficients of f (x).
Example 7.10 Find the complex Fourier series of f (x) = ex if −π < x < π and f (x + 2π) = f (x)
and then from it obtain the usual Fourier series as a check.
Figure 7.9: Plot of the partial sum for the Fourier series of ex .
Example 7.11 Find the complex Fourier series of f (x) = sin(x) if −π < x < π and f (x + 2π) =
f (x).
1 einπ − e−inπ
1
Z π
−inx
cn = sin(x)e dx = .
2π −π 2π n2 − 1
The coefficients are zero unless n = ±1 (since e±inπ = cos(nπ) ± i sin(nπ) = cos(nπ) = (−1)n .
Using L’Hospital rule twice gives c1 = 2i1 and c−1 = − 2i1 . Thus, the complex Fourier series is
∞
eix − e−ix
f (x) = ∑ cn einx = ,
n=−∞ 2i
Example 7.12 Find the complex Fourier series of f (x) = 1 if 0 < x < T , f (x) = 0 otherwise,
i −inx T
Z T
1 1 i inT
Z π
−inx −inx
cn = f (x)e dx = e dx = e = e −1 ,
2π −π 2π 0 2πn
0 2πn
1 RT T
when n 6= 0. Also, c0 = 2π 0 dx = 2π . Thus, the complex Fourier series is
" #
∞ ∞
inx 1 i −inT inx
f (x) = ∑ cn e = T+ ∑ e −1 e .
n=−∞ 2π n=−∞,n6=0 n
2π
The fraction L is often written as ω0 and called the fundamental angular frequency.
260 Chapter 7. Fourier Series and Transforms
Example 7.13 Find the complex Fourier series of f (x) = 1 if 0 < x < L/2, f (x) = −1 if
L/2 < x < L, and f (x + 2π) = f (x).
1 L −inx 2π
Z L/2 Z L
1 i −2inπ
Z
2π 2π
−inx −inx
+ 1 − 2−inπ ,
cn = e L f (x)dx = e L dx − e L dx = e
L 0 L 0 L/2 2πin
when n 6= 0. Also, c0 = 0 since the mean of the function is zero. Thus, the complex Fourier series is
∞ ∞
[1 − e−inπ ] inx 2π
f (x) = ∑ cn einx = ∑ e L.
n=−∞ n=−∞,n6=0 inπ
Example 7.14 Find the complex Fourier series for the following functions a) f (x) = 1 for
Solution: For a)
1 −inx π
1 1 −inπ
Z π
−inx
− einπ ,
cn = e dx = − e =− e
2π −π 2πin
−π 2πin
For b)
1 −x −inx π
1 −1 −inx
Z π Z π
−inx
cn =
2π −π
xe dx =
2π in
e − −π in e dx
−π
1 −inx π
1 −π inπ
= [2e ] + 2 e
2π in n
−π
1 −π inπ 1 −inπ −inπ
= [2e ] + 2 [e −e ]
2π in n
1 1 Rπ
If n 6= 0, then cn = − 2in 2einπ = ni einπ . If n = 0, then c0 = 2π −π xdx = 0. Thus, the complex
Fourier series is
∞ ∞ ∞
i inπ inx i in(π+x)
f (x) = ∑ cn einx = ∑ e e = ∑ e .
n=−∞ n=−∞,n6=0 n n=−∞,n6=0 n
Key Idea: Find and use a change of scale that transforms a 2π periodic function into a func-
tion of period 2L. Recall, the form of the for a function of period 2π
∞
g(v) = a0 + ∑ [an cos(nv) + bn sin(nv)] (7.19)
n=1
with coefficients
1 π
Z
a0 = g(v)dv (7.20)
2π −π
1
Z π
an = g(v) cos(nv)dv n = 1, 2, 3, ... (7.21)
π −π
1
Z π
bn = g(v) sin(nv)dv n = 1, 2, 3, .... (7.22)
π −π
Using a change of scale, let v = kx with k such that the old period v = 2π and gives a new period
where x = 2L. Thus, 2π = k2L ⇒ k = π/L. Therefore, v = kx = πx/L and dv = πL dx. Now writing
g(v) = f (x), the Fourier series and coefficients become
∞ h
a0 nπ nπ i
f (x) = + ∑ an cos x + bn sin x (7.23)
2 n=1 L L
with coefficients
1 L
Z
a0 = f (x)dx (7.24)
2L −L
1 L nπx
Z
an = f (x) cos dx n = 1, 2, 3, ... (7.25)
L −L L
1 L nπx
Z
bn = f (x) sin dx n = 1, 2, 3, .... (7.26)
L −L L
Also, the complex Fourier series can be expressed for arbitrary intervals
∞ Z L
nπx 1 inπ
f (x) = ∑ cn e− L , cn = f (x)e− x dx. (7.27)
n=−∞ 2L −L
Example 7.15 (Periodic Rectangular Wave) Find the Fourier series of the function
0
if − 2 < x < −1
f (x) = k if − 1 < x < 1 ,
0 if 1 < x < 2
where p = 2L = 4 and L = 2.
Solution: Using the formulas just derived we can find the Fourier coefficients
k 1
1 L 1 1 k
Z Z
a0 = f (x)dx = kdx = x =
2L −L 4 −1 4 −1 2
Z L Z 1
1 nπx 1 nπx
an = f (x) cos dx = k cos dx
L −L L 2 −1 2
nπx 1
k = 2k sin nπ
= sin
nπ 2 −1 nπ 2
Z L Z 1
1 nπx 1 nπx
bn = f (x) sin dx = k sin dx
L −L L 2 −1 2
nπx 1
k
= − cos = − k cos nπ − cos −nπ =0
nπ 2 −1 nπ 2 2
262 Chapter 7. Fourier Series and Transforms
Example 7.16 (Periodic Rectangular Wave) Find the Fourier series of the function
(
−k if − 2 < x < 0
f (x) = ,
k if 0 < x < 2
where p = 2L = 4 and L = 2.
Solution: Using the formulas just derived we can find the Fourier coefficients
k 0 k 2
Z 0 Z 2
1 L
1
Z
a0 = f (x)dx = −kdx + kdx = x + x = 0
2L −L 4 −2 0 4 −2 4 0
Z L Z 0 Z 2 nπx
1 nπx 1 nπx
an = f (x) cos dx = −k cos dx + k cos dx
L −L L 2 −2 2 0 2
" #
1 2k nxπ 0 2k nπx 2
= − sin + sin =0
2 nπ 2 −2 nπ 2 0
Z 0 Z 2
1 L nπx 1 nπx nπx
Z
bn = f (x) sin dx = −k sin dx + k sin dx
L −L L 2 −2 2 0 2
" #
1 2k nxπ 0 2k nπx 2
= cos − cos
2 nπ 2 −2 nπ 2 0
(
k 4k/nπ if n is odd
= [1 − cos(nπ) − cos(nπ) + 1] = .
nπ 0 if n is even
Example 7.17 (Half-wave Rectifier) Find the Fourier series of the function
(
0 if − L < t < 0
f (x) = ,
E sin(ωt) if 0 < x < L
7.8 General Fourier Series for Functions of Any Period p = 2L 263
2π π
where p = 2L = ω and L = ω.
Solution: Using the formulas just derived we can find the Fourier coefficients
1 L ω π/ω E
Z Z
a0 = f (t)dt = E sin(ωt)dt =
2L −L 2π 0 π
1 L nπt ω π/ω
Z Z
an = f (t) cos dt = E sin(ωt) cos(nωt)dt
L −L L π 0
ωE π/ω
Z
= [sin((1 + n)ωt) + sin((1 − n)ωt)]dt
2π 0
cos((1 + n)ωt) cos((1 − n)ωt) π/ω
ωE E − cos((1 + n)π) + 1 − cos((1 − n)π) + 1
= − − = +
2π (1 + n)ω (1 − n)ω 0 2π 1+n 1−n
Z L
1 nπt
Z π/ω
ω
bn = f (t) sin dt = E sin(ωt) sin(nωt)dt.
L −L L π 0
E 2 2 2E
Observe that a1 = 0 and an = 0 is n is odd. For n even, an = 2π 1+n + 1−n = − (n−1)(n+1)π . Also,
b1 = E/2 and all other bn = 0. Hence the Fourier series is
E E 2E 1 1
f (t) = + sin(ωt) − cos(2ωt) + cos(4ωt) + ... .
π 2 π 1·3 3·5
Example 7.18 Compute the Fourier Series of f (x) = 1 + x on the interval (−L, L).
264 Chapter 7. Fourier Series and Transforms
Solution: We start by using the Euler-Fourier Formulas. For the Cosine terms we find
1 2
Z
a0 = f (x)dx
4 −2
Z −1 Z 2
1
= 2dx + 1 − xdx
4 −2 −1
1 3 7
= (2 + ) =
4 2 8
and
1 2 nπx
Z
an = f (x) cos( )dx
2 −2 2
Z −1 Z 2
1 nπx nπx
= 2 cos( )dx + (1 − x) cos( )dx
2 −2 2 −1 2
1 4 nπx −1 2(1 − x) nπx 2 4 nπx 2
= sin( )|−2 + sin( )|−1 − 2 2 cos( )|−1
2 nπ 2 nπ 2 n π 2
1 4 nπ 4 nπ 4 nπ
= − sin( ) + sin( ) − 2 2 (cos(nπ) − cos( ))
2 nπ 2 nπ 2 n π 2
2
n2 π 2 n odd
= 0 n = 4m .
4
− n2 π 2 n = 4m + 2
7.9 Even and Odd Functions 265
So we have
∞
7 2 (4m + 1)πx 3 2 (4m + 1)πx
f (x) = + ∑ 2 2
cos + − − sin
8 m=1 (4m + 1) π 2 (4m + 1)π (4m + 1)2 π 2 2
4 (4m + 2)πx 3 (4m + 2)πx
− 2 2
cos + sin
(4m + 2) π 2 (4m + 2)π 2
2 (4m + 3)πx 3 2 (4m + 3)πx
+ cos + − + sin
(4m + 3)2 π 2 2 (4m + 3)π (4m + 3)2 π 2 2
3 4mπx
+ sin .
4mπ 2
This example represents a worst case scenario. There are a lot of Fourier coefficients to keep
track of. Notice that for each value of m, the summand specifies four different Fourier terms (for
4m, 4m + 1, 4m + 2, 4m + 3). This can often happen and depending on L, even more terms maybe
required.
This means that the graph y = g(x) is symmetric with respect to the y-axis. An odd function
satisfies
meaning that its graph y = g(x) is symmetric with respect to the origin.
Example 7.20 A monomial xn is even if n is even and odd if n is odd. cos(x) is even and sin(x)
is odd. Note tan(x) is odd.
There are some general rules for how products and sums behave:
(1) If g(x) is odd and h(x) is even, their product g(x)h(x) is odd.
(2) If g(x) and h(x) are either both even or both odd, g(x)h(x) is even.
266 Chapter 7. Fourier Series and Transforms
(3) The sum of two even functions or two odd functions is even or odd, respectively.
To remember the rules consider how many negative signs come out of the arguments.
(4) The sum of an even and an odd function can be anything. In fact, any function on (−L, L) can
be written as a sum of an even function, called the even part, and an odd function, called the odd
part.
(5)
Rx
Differentiation and Integration can change the parity of a function. If f (x) is even, ddxf and
0 f (s)ds are both odd, and vice versa.
The graph of an odd function g(x) must pass through the origin by definition. This also tells us
that if g(x) is even, as long as g0 (0) exists, then g0 (0) = 0.
Theorem 7.10.1 Definite Integrals on symmetric intervals of odd and even functions have useful
properties
Z L Z L Z L
(odd)dx = 0 and (even)dx = 2 (even)dx (7.32)
−L −L 0
Given a function f (x) defined on (0, L), there is only one way to extend it to (−L, L) to an even
or odd function. The even extension of f (x) is
(
f (x) for 0 < x < L
feven (x) = (7.33)
f (−x) for − L < x < 0.
This is just its reflection across the y-axis. Notice that the even extension is not necessarily defined
at the origin.
The odd extension of f (x) is
f (x) for 0 < x < L
fodd (x) = − f (−x) for − L < x < 0 . (7.34)
0 for x = 0
R Since the cosine terms in a Fourier series are even and the sine terms are odd, then it should
not be surprising that an even function is given by a series of cosine terms and an odd function
by a series of sine terms.
7.10 Even and Odd Functions, Half-Range Expansions 267
Theorem 7.10.2 (Fourier Cosine Series, Fourier Sine Series) The Fourier series of an even
function of period 2L is a Fourier Cosine Series
∞ nπ
f (x) = a0 + ∑ an cos x (7.35)
n=1 L
with coefficients (NOTE: Integration only on the half-interval (0, L)!)
1 L
Z
a0 = f (x)dx
L 0
2 L nπx
Z
an = f (x) cos dx, n = 1, 2, 3, ...
L 0 L
The Fourier series of an odd function of period 2L is a Fourier Sine Series
∞ nπx
f (x) = ∑ bn sin (7.36)
n=1 L
with coefficients
Z L
2 nπx
bn = f (x) sin dx.
L 0 L
Theorem 7.10.3 (Sum and Scalar Multiple) The Fourier coefficients of a sum f1 + f2 are the
sums of the corresponding Fourier coefficients of f1 and f2 . The Fourier coefficients of c f are c
times the Fourier coefficients of f .
Example 7.21 (Sawtooth Wave) Find the Fourier series of the function f (x) = x + π if −π <
x < π and f (x + 2π) = f (x).
2 π 2 π
Z Z
bn = f1 (x) sin(nx)dx = x sin(nx)dx
π 0 π 0
2 −x cos(nx) π 1 π
2
Z
=
π n + n 0 cos(nx)dx = − n cos(nπ).
0
268 Chapter 7. Fourier Series and Transforms
Thus, b1 = 2, b2 = −2/2 = −1, b3 = 2/3, b4 = −2/4 = −1/2, ... and the Fourier series of f (x) is
1 1
f (x) = π + 2 sin(x) − sin(2x) + sin(3x) − ... .
2 3
Definition 7.10.1 An even periodic extension is a function of period 2L which is even, but
coincides with the given function f (x) on the interval (0, L) (see f1 in figure).
An odd periodic extension is a function of period 2L which is odd, but coincides with
the given function f (x) on the interval (0, L) (see f2 in figure).
R Both extensions have period 2L. This is where the term half-range expansion comes from:
f is given on half the range (0, L) giving only half the periodicity of the length 2L.
Example 7.22 Find the two half-range expansions for the function
(
2k
Lx if 0 < x < L2
f (x) = 2k
.
L (L − x) if L2 < xL
Solution: a) Even Periodic Extension: Find the Fourier Cosine series, which converges to the even
7.10 Even and Odd Functions, Half-Range Expansions 269
Figure 7.16: Extensions to even and odd functions. f1 (x) is the even periodic extension and f2 (x)
is the odd periodic extension.
1 2k L/2 2k L
Z
k
Z
a0 = xdx + (L − x)dx =
L L 0 L L/2 2
Z L/2 Z L nπ
2 2k nπ 2k
an = x cos x dx + (L − x) cos x dx
L L 0 L L L/2 L
L2 L2 L L2
nπ
nπ L nπ nπ
=IBP sin + 2 2 cos −1 − L− sin − 2 2 cos(nπ) − cos .
2nπ 2 n π 2 nπ 2 2 n π 2
One can show that the full Fourier Series of fodd is the same as the Fourier Sine Series of f (x).
Let
∞
nπx nπx
a0 + ∑ an cos( ) + bn sin( ) (7.37)
n=1 L L
be the Fourier Series for fodd (x), with coefficients given in Section 10.3
Z L
1 nπx
an = fodd (x) cos( )dx = 0 (7.38)
L −L L
But fodd is odd and cos is even, so their product is again odd.
Z L
1 nπx
bn = fodd (x) sin( )dx (7.39)
L −L L
But both fodd and sin are odd, so their product is even.
2 L nπx
Z
bn = fodd (x) sin( )dx (7.40)
L 0 L
2 L nπx
Z
= f (x) sin( )dx, (7.41)
L 0 L
which are just the Fourier Sine coefficients of f (x). Thus, as the Fourier Sine Series of f (x) is the
full Fourier Series of fodd (x), the 2L-periodic odd function that the Fourier Sine Series expands is
just the periodic extension fodd .
This goes both ways. If we want to compute a Fourier Series for an odd function on (−L, L) we
can just compute the Fourier Sine Series of the function restricted to (0, L). It will almost converge
to the original function on (−L, L) with the only issues occurring at any jump discontinuities. The
only works for odd functions. Do not use the formula for the coefficients of the Sine Series,
unless you are working with an odd function.
Example 7.23 Write down the odd extension of f (x) = L − x on (0, L) and compute its Fourier
Series.
Solution: To get the odd extension of f (x) we will need to see how to reflect f across the
origin. What we end up with is the function
(
L−x 0 < x < L
fodd (x) = . (7.42)
−L − x − L < x < 0
7.10 Even and Odd Functions, Half-Range Expansions 271
Now, what is the Fourier Series of fodd (x)? By the previous discussion, we know that is will be
identical to the Fourier Sine Series of f (x), as this will converge on (−L, 0) to fodd . So we have
∞
nπx
fodd (x) = ∑ bn sin( ), (7.43)
n=1 L
where
2 L nπx
Z
bn = (L − x) sin( )dx (7.44)
L 0 L
2 L(L − x) nπx L2 nπx L
= [− cos( ) − 2 2 sin( )] (7.45)
L nπ L n π L 0
2L
= . (7.46)
nπ
Thus the desired Fourier Series is
2L ∞ 1 nπx
fodd (x) = ∑ sin( ). (7.47)
π n=1 n L
Can we compute the Fourier Sine Series of a constant function like f (x) = 1 which is even? It
is important to remember that if we are computing the Fourier Sine Series for f (x), it only needs to
converge to f (x) on (0, L), where issues of evenness and oddness do not occur. The Fourier Sine
Series will converge to the odd extension of f (x) on (−L, L).
Example 7.24 Find the Fourier Series for the odd extension of
(
3
0 < x < 32
2
f (x) = (7.48)
x − 23 32 < x < 3.
on (−3, 3).
Solution: The Fourier Series for fodd (x) on (−3, 3) will just be the Fourier Sine Series for f (x) on
(0, 3). The Fourier Sine coefficients for f (x) are
2 3 nπx
Z
bn = f (x) sin( )dx (7.49)
3 0 3
Z 3 Z 3
2 2 3 nπx 3 nπx
= sin( )dx + 3 (x − ) sin( ) (7.50)
3 0 2 3 2
2 3
nπx 23 3(x − 32 )
2 9 nπx 3 9 nπx 3
= − cos( )| + cos( )| 3 + sin( )| 3 (7.51)
3 2nπ 3 0 nπ 3 2 n2 π 2 3 2
2 9 nπ 9 9 nπx
= − (cos( ) − 1) − cos(nπ) − 2 2 sin( ) (7.52)
3 2nπ 2 2nπ n π 2
2 9 nπ n+1 9 nπ
= ( (1 − cos( ) + (−1) ) − 2 2 sin( ) (7.53)
3 2nπ 2 n π 2
3 nπ 2 nπ
= 1 − cos( ) + (−1)n+1 − sin( ) (7.54)
nπ 2 nπ 2
and the Fourier Series is
3 ∞ 1 nπ 2 nπ nπx
fodd (x) = ∑ [1 − cos( ) + (−1)n+1 − sin( )] sin( ). (7.55)
π n=1 n 2 nπ 2 3
272 Chapter 7. Fourier Series and Transforms
Notice that this definition does not specify the value of the function at zero, the only restriction on
an even function at zero is that, if it exists, the derivative should be zero.
It is straight forward enough to show that the Fourier coefficients of feven (x) coincide with the
Fourier Cosine coefficients of f (x). The Euler-Fourier formulas give
1 L nπx
Z
an = feven (x) cos( )dx (7.58)
L −L L
Z L
2 nπx nπx
= feven (x) cos( )dx since feven (x) cos( ) is even (7.59)
L 0 L L
2 l nπx
Z
= feven (x) cos( )dx (7.60)
L 0 L
Its Fourier Series is the same as the Fourier Cosine Series of f (x), by the previous discussion. So
we can just compute the coefficients. Thus we have
∞
nπx
feven (x) = a0 + ∑ an cos( ), (7.63)
n=1 L
7.10 Even and Odd Functions, Half-Range Expansions 273
where
1 L 1 L L
Z Z
a0 = f (x)dx = (L − x)dx = (7.64)
L 0 L 0 2
2 L nπx
Z
an = f (x) cos( )dx (7.65)
L 0 L
2 L nπx
Z
= (L − x) cos( )dx (7.66)
L 0 L
2 L(L − x) nπx L2 nπx L
= [ sin( ) − 2 2 cos( )] (7.67)
L nπ L n π L 0
2 L2
= (− cos(nπ) + cos(0)) (7.68)
L n2 π 2
2L
= ((−1)n+1 + 1). (7.69)
n2 π 2
So we have
∞
L 2L
feven (x) = + ∑ 2 2 ((−1)n+1 + 1). (7.70)
2 n=1 n π
(
3
0 ≤ x < 32
2
f (x) = (7.71)
x − 23 32 ≤ x ≤ 3
3 3
x − 2 2 < x < 3
3 0 ≤ x < 3
feven (x) = 32 3
2 . (7.72)
2 − 2 < x <0
−x − 3 − 3 ≤ x ≤ − 3
2 2
274 Chapter 7. Fourier Series and Transforms
We just need to compute the Fourier Cosine coefficients of the original f (x) on (0, 3).
1 3
Z
a0 = f (x)dx (7.73)
3 0
Z 3/2 Z 3
1 3 3
= dx + x − dx (7.74)
3 0 2 3/2 2
1 9 9 9
= ( + )= (7.75)
3 4 8 8
2 3 nπx
Z
an = f (x) cos( )dx (7.76)
3 0 3
Z 3/2 Z 3
2 3 nπx 3 nπx
= cos( )dx + (x − ) cos( )dx (7.77)
3 0 2 3 3/2 2 3
nπx 3/2 3(x − 32 )
2 9 nπx 3 9 nπx 3
= sin( )| + sin( )| + cos( )| (7.78)
3 2nπ 3 0 nπ 3 3/2 n2 π 2 3 3/2
2 9 nπ 9 nπ
= sin( ) + 2 2 cos(nπ) − cos( ) (7.79)
3 2nπ 2 n π 2
6 1 nπ 1 nπ
= sin( ) + (−1)n − cos( ) (7.80)
nπ 2 2 nπ 2
6 1 n nπ 1 nπ
= ((−1) − cos( )) + sin( ) . (7.81)
nπ nπ 2 2 2
So the Fourier Series is
9 6 ∞ 1 1 n nπ 1 nπ nπx
feven = + ∑ (−1) − cos( ) + sin( ) cos( ). (7.82)
8 π n=1 n nπ 2 2 2 3
8. Partial Differential Equations
Definition 8.2.2 The order of a PDE is the order of the highest derivative.
Definition 8.2.3 A PDE is linear if it is of the first degree in the unknown function and its
partial derivatives, otherwise we call it nonlinear.
R The remainder of the course focuses on second order linear PDEs, which have a surprisingly
wide range of applications.
276 Chapter 8. Partial Differential Equations
Example 8.1 Determine if the following PDEs are linear and what their order is:
• ux x + 2uux = 3
• uxxx + sin(u) = 0
• ux + 3u = 5 sin(x)
• (ux )3 + ux x = x3
Definition 8.2.4 We call a linear PDE homogeneous if each of its terms contains either u or
one of its partial derivatives, otherwise we call the equation nonhomogeneous.
Example 8.2 In the previous example determine which of the equations is homogeneous.
R Solutions to the same equation can look very different. Consider the PDE
∂ 2u ∂ 2u
+ = 0.
∂ x 2 ∂ y2
Definition 8.2.6 If there is a condition prescribing the values of the unknown function u on the
boundary of domain R, we call these conditions boundary conditions. When t is one of the
variables we can describe the unknown function u or its derivatives at time t = 0, we call these
conditions initial conditions.
u = c1 u1 + c2 u2 (8.7)
Example 8.3 (Similar to ODE) Find solutions u of the PDE uxx − u = 0 where u = u(x, y).
Solution: Since there are no y-derivatives, then we can solve this PDE like we would u00 − u = 0.
Using the characteristic equation we find r2 − 1 = 0 ⇒ r = ±1. Thus, this ODE has solution
u(x) = c1 ex + c2 e−x for constants c1 , c2 . To solve the PDE we must remember these constant could
also be functions of y, so the solution of the PDE is
Example 8.4 (Similar to ODE) Find solutions u = u(x, y) of the PDE uxy = ux .
Solution: Let ux = p, then py = uxy = −ux = −p. Solving the equation for p gives p = c(x)e−y ,
then integrate with respect to x to get u:
Z
u(x, y) = f (x)e−y + g(x), f (x) = c(x)dx.
in the rectangle 0 < x < a, 0 < y < b, and satisfying the boundary conditions
u(x, 0) = 0, u(x, b) = 0, 0 < x < a, (8.11)
u(0, y) = 0, u(a, y) = f (y), 0 ≤ y ≤ b. (8.12)
We need four boundary conditions for the four spatial derivatives.
Start by using Separation of Variables and assume u(x, y) = X(x)Y (y). Substitute u into
Equation (8.54). This yields
X 00 Y 00
=− = λ,
X Y
where λ is a constant. We obtain the following system of ODEs
X 00 − λ X = 0 (8.13)
00
Y + λY = 0. (8.14)
From the boundary conditions we find
X(0) = 0 (8.15)
Y (0) = 0,Y (b) = 0. (8.16)
We first solve the ODE for Y , which we have seen numerous times before. Using the BCs we find
there are nontrivial solutions if and only if λ is an eigenvalue
nπ 2
λ= , n = 1, 2, 3, ...
b
and Yn (y) = sin( nπy
b ), the corresponding eigenfunction. Now substituting in for λ we want to solve
the ODE for X. This is another problem we have seen regularly and the solution is
nπx nπx
Xn (x) = c1 cosh + c2 sinh
b b
The BC implies that c1 = 0. So the fundamental solution to the problem is
nπx nπy
un (x, y) = sinh sin .
b b
By linear superposition the general solution is
∞ ∞
nπx nπy
u(x, y) = ∑ cn un (x, y) = ∑ cn sinh sin .
n=1 n=1 b b
Using the last boundary condition u(a, y) = f (y) solve for the coefficients cn .
∞
nπa nπy
u(a, y) = ∑ cn sinh sin = f (y)
n=1 b b
u(a, θ ) = f (θ )
u(r, θ ) = R(r)Θ(θ ),
Since we have no homogeneous boundary conditions we must use instead the fact that the solutions
must be bounded and also periodic in Θ with period 2π. It can be shown that we need λ to be real.
Consider the three cases when λ < 0, λ = 0, λ > 0.
If λ < 0, let λ = −µ 2 , where µ > 0. So we find the equation for Θ becomes Θ00 − µ 2 Θ = 0. So
Θ can only be periodic if c1 = c2 = 0, so λ cannot be negative (Since we do not get any nontrivial
solutions.
If λ = 0, then the equation for Θ becomes Θ00 = 0 and thus
Θ(θ ) = c1 + c2 θ
r2 R00 + rR0 = 0.
R(r) = k1 + k2 ln(r)
Since we also need the solution bounded as r → ∞, then k2 = 0. So u(r, θ ) is a constant, and thus
proportional to the solution u0 (r, θ ) = 1.
If λ > 0, we let λ = µ 2 , where µ > 0. Then the system of equations becomes
R(r) = k1 r µ + k2 r−µ
for 0 ≤ θ ≤ 2π. We compute to coefficients by using our previous Fourier Series equations
1
Z2π
cn = n
f (θ ) cos(nθ )dθ , n = 1, 2, 3, ... (8.22)
πa 0
Z 2π
1
kn = f (θ ) sin(nθ )dθ , n = 1, 2, 3, ... (8.23)
πan 0
Note we need both terms since sine and cosine terms remain throughout the general solution.
Example 8.5 Find the solution u(x, y) of Laplace’s Equation in the rectangle 0 < x < a, 0 < y < b,
that satisfies the boundary conditions
Answer: Using the method of Separation of Variables, write u(x, y) = X(x)Y (y). We get the
following system of ODEs
The coefficients are calculated using the equation from the Fourier Sine Series
Z a
2 nπx
cn = h(x) sin( )dx.
a sinh( nπb
a ) 0 a
Example 8.6 Consider the problem of finding a solution u(x, y) of Laplace’s Equation in the
rectangle 0 < x < a, 0 < y < b, that satisfies the boundary conditions
This is an example of a Neumann Problem. We want to find the fundamental set of solutions.
X 00 − λ X = 0, X 0 (0) = 0 (8.30)
00 0 0
Y + λY = 0, Y (0) = Y (b) = 0. (8.31)
with Y 0 (y) = −c1 λ 1/2 sin(λ 1/2 y) + c2 λ 1/2 cos(λ 1/2 y). Using the boundary conditions we find
2 2
c2 = 0 and the eigenvalues are λn = nbπ2 , for n = 1, 2, 3, .... The corresponding Eigenfunctions are
Y (y) = cos( nπy nπx
b ) for n = 1, 2, 3, ... The solution of the equation for X becomes X(x) = d1 cosh( b )+
nπx
d2 sinh( b ), with
nπ nπx nπ nπx
X 0 (x) = d1 sinh( ) + d2 cosh( ).
b b b b
Using the boundary conditions, X(x) = d1 cosh( nπx
b ).So the fundamental set of solutions is
nπx nπy
un (x, y) = cosh( ) cos( ), n = 1, 2, 3, ...
b b
The general solution is given by
∞
a0 nπx nπy
u(x, y) = + ∑ an cosh( ) cos( )
2 n=1 b b
Figure 8.1: Heat Flux across the boundary of a small slab with length ∆x. The graph is the graph
of temperature at a given time t. In accordance with Fourier’s Law, the heat leaves or enters the
boundary by flowing from hot to cold; hence at x the flux is opposing the sign of ux , while at x + ∆x
it is agreeing.
The first partial differential equation to consider is the famous heat equation which models the
temperature distribution in some object. We will focus on the one-dimensional heat equation, where
we want to find the temperature distributions in a one-dimensional bar of length l. In particular we
will assume that our bar corresponds to the interval (0, l) on the real line.
The assumption is made purely for simplicity. If we assume we have a real bar, the one-
dimensional assumption is equivalent to assuming at every lateral cross-section and every instant of
time, the temperature is constant. While this is unrealistic it is not a terrible assumption. Also, if
the length is much larger than the width in advanced mathematics one can assume the width is 0
since it is such a small fraction of the length. We are also assuming the bar is perfectly insulated,
so the only way heat can enter or leave the bar is through the ends x = 0 and x = l. So any heat
transfer will be one-dimensional.
On the other hand, within the slab, heat will flow from hot to cold (this is Fourier’s Law). The
only way heat can leave is by leaving through the boundaries, which are at x and x + ∆x (This is
the Law of Conservation of Energy). So the change of heat energy of the slab is equal to the heat
flux across the boundary. If κ is the conductivity of the bar’s material
dH
= κux (x + ∆x,t) − κux (x,t)
dt
This is illustrated in Figure 8.4.1. Setting the derivative of H(t) from above equal to the previous
equations we find
or
κux (x + ∆x,t) − κux (x,t)
cρut (x,t) = .
∆x
8.5 Separation of Variables and Heat Equation IVPs 283
Figure 8.2: Temperature versus position on a bar. The arrows show time dependence in accordance
with the heat equation. The temperature graph is concave up, so the left side of the bar is warming
up. While on the right the temperature is concave down and so th right side is cooling down..
If we take the limit as ∆x → 0, the right hand side is just the x-derivative of κux (x,t) or
ut = kuxx .
Notice that the heat equation is a linear PDE, since all of the derivatives of u are only multiplied
by constants. What is the constant k? It is called the Thermal Diffusivity of the bar and is a
measure of how quickly heat spreads through a given material.
How do we interpret the heat equation? Graph the temperature of the bar at a fixed time.
Suppose it looks like Figure 2. On the left side the bar is concave up. If the graph is concave up,
that means that the second derivative of the temperature (with respect to position x) is positive. The
heat equation tells us that the time derivative of the temperature at any of the points on the left
side of the bar will be increasing. The left side of the bar will be warming up. Similarly, on the
right side of the bar, the graph is concave down. Thus the second x-derivative of the temperature is
negative, and so will be the first t-derivative, and we can conclude that the right side of the bar is
cooling down.
u(x, 0) = f (x)
This is the only condition required because the heat equation is first order with respect to time.
The wave equation, considered in a future section is second order in time and needs two initial
conditions.
PDEs are only valid on a given domain. Boundary conditions specify how the solution behaves
on the boundaries of the given domain. These need to be specified, because the solution does not
exist on one side of the boundary, we might have problems with differentiability there.
Our heat equation was derived for a one-dimensional bar of length l, so the relevant domain in
question can be taken to be the interval 0 < x < l and the boundary consists of the two points x = 0
284 Chapter 8. Partial Differential Equations
and x = l. We could have derived a two-dimensional heat equation, for example, in which case the
domain would be some region in the xy-plane with the boundary being some closed curve.
It will be clear from the physical description of the problem what the appropriate boundary
conditions are. We might know at the endpoints x = 0 and x = l, the temperature u(0,t) and u(l,t)
are fixed. Boundary conditions that give the value of the solution are called Dirichlet Boundary
Conditions. Or we might insulate the ends of the bar, meaning there should be no heat flow
out of the boundary. This would yield the boundary conditions ux (0,t) = ux (l,t) = 0. If the
boundary conditions specify the derivative at the boundary, they are called Neumann Conditions.
If the boundary conditions specify that we have one insulated end and at the other we control the
temperature. This is an example of a Mixed Boundary Condition.
As we have seen, changing boundary conditions can significantly change the solution. Initially,
we will work with homogeneous Dirichlet conditions u(0,t) = u(l,t) = 0, giving us the following
initial value problem
(DE) : ut = kuxx (8.33)
(BC) : u(0,t) = u(l,t) = 0 (8.34)
(IC) : u(x, 0) = f (x) (8.35)
After we have seen the general method, we will see what happens with homogeneous Neumann
conditions. We will discuss nonhomogeneous equations later.
Our solution is the product of a function that depends only on x and a function that depends only on
t. We can then try to write down an equation depending only on x and another solution depending
only on t before using our knowledge of ODEs to try and solve them.
It should be noted that this is a very special situation and will not occur in general. Even when
we can use it sometimes it is hard to move beyond the first step. However, it works for all equations
we will be considering in this class, and is a good starting point.
How does this method work? Plug the separated solution into the heat equation.
∂ ∂2
[X(x)T (t)] = k 2 [X(x)T (t)] (8.36)
∂t ∂x
X(x)T 0 (t) = kX 00 (x)T (t) (8.37)
Now notice that we can move everything depending on x to one side and everything depending on t
to the other.
T 0 (t) X 00 (x)
=
kT (t) X(x)
This equation should says that both sides are equal for any x or t we choose. Thus they both must
be equal to a constant. Since if what they equal depended on x or t both sides would not be equal
for all x and t. So
T 0 (t) X 00 (x)
= = −λ
kT (t) X(x)
8.5 Separation of Variables and Heat Equation IVPs 285
We have written the minus sign for convenience. It will turn out that λ > 0.
The equation above contains a pair of separate ordinary differential equations
X 00 + λ X = 0 (8.38)
0
T + λ kT = 0. (8.39)
Notice that our boundary conditions becomes X(0) = 0 and X(l) = 0. Now the second equation
can easily be solved, since we have T 0 = −λ kT , so that
T (t) = Ae−λ kt .
X 00 + λ X = 0 X(0) = 0 X(l) = 0
This should look familiar. The is the basic eigenfunction problem studied in section 10.1. As in
that example, it turns out our eigenvalues have to be positive. Let λ = µ 2 for µ > 0, our general
solution is
The first boundary condition says B = 0. The second condition says that X(l) = C sin(µl) = 0. To
avoid only having the trivial solution, we must have µl = nπ. In other words,
nπ 2 nπx
λn = and Xn (x) = sin
l l
for n = 1, 2, 3, ...
So we end up having found infinitely many solutions to our boundary value problem, one for
each positive integer n. They are
nπ 2 nπx
un (x,t) = An e−( l ) kt sin( ).
l
The heat equation is linear and homogeneous. As such, the Principle of Superposition still holds.
So a linear combination of solutions is again a solution. So any function of the form
N
nπ 2 nπx
u(x,t) = ∑ An e−( l ) kt sin(
l
) (8.40)
n=0
So if our initial condition has this form, the result of superposition Equation (8.40) is in a good
form to use the IC. The coefficients An just being the associated coefficients from f (x).
Example 8.7 Find the solutions to the following heat equation problem on a rod of length 2.
ut = uxx (8.41)
u(0,t) = u(2,t) = 0 (8.42)
3πx
u(x, 0) = sin( ) − 5 sin(3πx) (8.43)
2
286 Chapter 8. Partial Differential Equations
In this problem, we have k = 1. Now we know that our solution will have the form like
Equation (8.40), since our initial condition is just the difference of two sine functions. We just need
to figure out which terms are represented and what the coefficients An are.
Our initial condition is
3πx
f (x) = sin( ) − 5 sin(3πx)
2
Looking at (8.40) with l = 2, we can see that the first term corresponds to n = 3 and the second
n = 6, and there are no other terms. Thus we have A3 = 1 and A6 = −5, and all other An = 0. Our
solution is then
9π 2 3πx 2
u(x,t) = e−( 4 )t sin( ) − 5e(−9π )t sin(3πx).
2
There is no reason to suppose that our initial distribution is a finite sum of sine functions.
Physically, such situations are special. What do we do if we have a more general initial temperature
distribution?
Let’s consider what happens if we take an infinite sum of our separated solutions. Then our
solution is
∞
nπ 2 nπx
u(x,t) = ∑ An e−( l ) kt sin(
l
).
n=0
This idea is due to the French Mathematician Joseph Fourier and is called the Fourier Sine Series
for f (x).
There are several important questions that arise. Why should we believe that our initial condition
f (x) ought to be able to be written as an infinite sum of sines? why should we believe that such a
sum would converge to anything?
We will start by again supposing that our solution to Equation (8.44) is separable, so we have
u(x,t) = X(x)T (t) and we obtain a pair of ODEs, which are the same as before
X 00 + λ X = 0 (8.47)
0
T + λ kT = 0. (8.48)
T (t) = Ae−λ kt
8.6 Heat Equation Problems 287
Now we need to determine the boundary conditions for the second equation. Our boundary
conditions are ux (0,t) and ux (l,t). Thus they are conditions for X 0 (0) and X 0 (l), since the t-
derivative is not controlled at all. So we have the boundary value problem
X 00 + λ X = 0 X 0 (0) = 0 X 0 (l) = 0.
Along the lines of the analogous computation last lecture, this has eigenvalues and eigenfunctions
nπ 2
λn = (8.49)
l
nπx
yn (x) = cos (8.50)
l
for n = 0, 1, 2, ... So the individual solutions to Equation (8.44) have the form
nπ 2 nπx
u( x,t) = An e( l ) kt cos .
l
Taking finite linear combinations of these work similarly to the Dirichlet case (and is the solution
to Equation (8.44) when f (x) is a finite linear combination of constants and cosines, but in general
we are interested in knowing when we can take infinite sums, i.e.
∞
1 nπ 2 nπx
u(x,t) = A0 + ∑ An e−( l ) kt cos( )
2 n=1 l
Notice how we wrote the n = 0 case, as 12 A0 . The reason will be clear when talking about Fourier
Series. The initial conditions means we need
∞
1 nπx
f (x) = A0 + ∑ An cos( ).
2 n=1 l
An expression of the form above is called the Fourier Cosine Series of f (x).
but in most cases we will work with Dirichlet or Neumann conditions. However, in the process of
learning about Fourier sine and cosine series, we will also learn how to compute the full Fourier
series of a function.
Taking linear combinations of these (over each n) gives a general solution to the above problem.
∞
nπ nπx
u(x,t) = ∑ Bn e−( l )kt sin
l
(8.54)
n=1
In other words, the coefficients in the general solution for the given initial condition are the Fourier
Sine coefficients of f (x) on (0, l), which are given by
Z l
2 nπx
Bn = f (x) sin dx.
l 0 l
We also, saw that if we instead have a problem with homogeneous Neumann boundary condi-
tions
and so the coefficients for a particular initial condition are the Fourier Cosine coefficients of f (x),
given by
Z l
2 nπx
An = f (x) cos dx.
l 0 l
One way to think about this difference is that given the initial data u(x, 0) = f (x), the Dirichlet
conditions specify the odd extension of f (x) as the desired periodic solution, while the Neumann
conditions specify the even extension. This should make sense since odd functions must have
f (0) = 0, while even functions must have f 0 (0) = 0.
So to solve a homogeneous heat equation problem, we begin by identifying the type of boundary
conditions we have. If we have Dirichlet conditions, we know our solution will have the form of
Equation (8.54). All we then have to do is compute the Fourier Sine coefficients of f (x). Similarly,
if we have Neumann conditions, we know the solution has the form of Equation (8.114) and we
have to compute the Fourier Cosine coefficients of f (x).
8.6 Heat Equation Problems 289
R Observe that for any homogeneous Dirichlet problem, the temperature distribution (8.54)
will go to 0 as t → ∞. This should make sense because these boundary conditions have a
physical interpretation where we keep the ends of our rod at freezing temperature without
regulating the heat flow in and out of the endpoints. As a result, if the interior of the rod is
initially above freezing, that heat will radiate towards the endpoints and into our reservoirs at
the endpoints. On the other hand, if the interior of the rod is below freezing, heat will come
from the reservoirs at the endpoints and warm it up until the temperature is uniform.
For the Neumann problem, the temperature distribution (8.114) will converge to 12 A0 . Again,
this should make sense because these boundary conditions correspond to a situation where
we have insulated ends, since we are preventing any heat from escaping the bar. Thus all heat
energy will move around inside the rod until the temperature is uniform.
8.6.1 Examples
Example 8.8 Solve the initial value problem
This problem has homogeneous Dirichlet conditions, so by (8.54) our general solution is
∞
nπ 2 nπx
u(x,t) = ∑ Bn e−3( 2 ) t sin(
2
).
n=1
The coefficients for the particular solution are the Fourier Sine coefficients of u(x, 0) = 20, so we
have
Z 2
2 nπx
Bn = )dx
20 sin( (8.62)
02 2
40 nπx 2
= [− cos( )] (8.63)
nπ 2 0
40
= − (cos(nπ) − cos(0)) (8.64)
nπ
40
= (1 + (−1)n+1 ) (8.65)
nπ
and the solution to the problem is
This problem has homogeneous Neumann conditions, so by (8.114) our general solution is
∞
1 nπ 2 nπx
u(x,t) = A0 + ∑ An e−3( 2 ) t cos( ).
2 n=1 2
290 Chapter 8. Partial Differential Equations
The coefficients for the particular solution are the Fourier Cosine coefficients of u(x, 0) = 3x, so we
have
2 2
Z
A0 = 3xdx = 6 (8.69)
2 0
Z 2
2 nπx
An = 3x cos( )dx (8.70)
2 0 2
6x nπx 12 nπx 2
= [− cos( ) + 2 2 sin( )] (8.71)
nπ 2 n π 2 0
12
= − cos(nπ) (8.72)
nπ
12
= (−1)n+1 (8.73)
nπ
and the solution to the problem is
The coefficients for the particular solution are the Fourier Sine coefficients of u(x, 0), so we have
Z π Z 2π
2 nx nx
Bn = sin( )dx + x sin( )dx (8.77)
2π 0 2 π 2
2 nx 2x nx 4 nx 2π
= − cos( )|π0 − cos( )|2π π + 2 sin( )| (8.78)
nπ 2 nπ 2 n π 2 π
2 nx 4 2 nπ 4 nπ
= − (cos( ) − cos(0)) − cos(nπ) + cos( ) − 2 sin( ) (8.79)
nπ 2 n n 2 n π 2
2 nπ 4 2 nπ 4 nπ
= − (cos( ) − 1) + (−1)n+1 + cos( ) − 2 sin( ) (8.80)
nπ
2 n n 2 n π 2
2 1 nπ nπ 2 nπ
= − (cos( ) − 1) + 2(−1)n+1 cos( ) − sin( ) (8.81)
n π 2 2 nπ 2
8.7 Other Boundary Conditions 291
ut = kuxx
on 0 < x < l with either homogeneous Dirichlet boundary conditions [u(0,t) = u(l,t) = 0] or
homogeneous Neumann boundary conditions [ux (0,t) = ux (l,t) = 0]. What about for some other
physically relevant boundary conditions?
u(0,t) = ux (l,t) = 0
Physically, this might correspond to keeping the end of the rod where x = 0 in a bowl of ice water,
while the other end is insulated.
Use Separation of Variables. Let u(x,t) = X(x)T (t), and we get the pair of ODEs
T 0 = −kλ T (8.82)
00
X = −λ X. (8.83)
Thus
T (t) = Be−kλt .
We now have a boundary value problem for X to deal with, where the boundary conditions are
X(0) = X 0 (l) = 0. There are only positive eigenvalues, which are given by
(2n − 1)π 2
λn =
2l
and their associated eigenfunctions are
(2n − 1)πx
Xn (x) = sin( ).
2l
The separated solutions are then given by
(2n−1)π 2 (2n − 1)πx
un (x,t) = Bn e−( 2l ) kt
sin
2l
and the general solution is
∞ (2n−1)π 2 (2n − 1)πx
u(x,t) = ∑ Bn e−( 2l ) kt
sin
2l
. (8.84)
n=1
R The convergence for a series like the one above is different than that of our standard Fourier
Sine or Cosine series, which converge to the periodic extension of the odd or even extensions
of the original function, respectively. Notice that the terms in the sum above are periodic with
period 4l (as opposed to the 2l-periodic series we have seen before). In this case, we need to
first extend our function f (x), given on (0, l), to a function on (0, 2l) symmetric around x = l.
Then, as our terms are all sines, the convergence on (−2l, 2l) will be to the odd extension of
this extended function, and the periodic extension of this will be what the series converges to
on the entire real line.
ut = 25uxx (8.85)
u(0,t) = 0 ux (10,t) = 0 (8.86)
u(x, 0) = 5. (8.87)
By (8.84) our general solution is
∞ (2n−1)π 2 (2n − 1)πx
u(x,t) = ∑ Bn e−25( 20 ) t
sin
20
.
n=1
u(0,t) = T1 , u(l,t) = T2
This problem is slightly more difficult than the homogeneous Dirichlet condition problem we
have studied. Recall that for separation of variables to work, the differential equations and the
boundary conditions must be homogeneous. When we have nonhomogeneous conditions we need
to try to split the problem into one involving homogeneous conditions, which we know how to
solve, and another dealing with the nonhomogeneity.
How can we separate the core homogeneous problem from what is causing the inhomogeneity?
Consider what happens as t → ∞. We should expect that, since we fix the temperatures at the
endpoints and allow free heat flux at the boundary, at some point the temperature will stabilize and
we will be at equilibrium. Such a temperature distribution would clearly not depend on time, and
we can write
Notice that v(x) must still satisfy the boundary conditions and the heat equation, but we should
not expect it to satisfy the initial conditions (since for large t we are far from where we initially
started). A solution such as v(x) which does not depend on t is called a steady-state or equilibrium
solution.
For a steady-state solution the boundary value problem becomes
It is easy to see that solutions to this second order differential equation are
v(x) = c1 x + c2
so that
This function w(x,t) represents the transient part of u(x,t) (since v(x) is the equilibrium part).
Taking derivatives we have
Here we use the fact that v(x) is independent of t and must satisfy the differential equation. Also,
using the equilibrium equation v00 = vxx = 0.
Thus w(x,t) must satisfy the heat equation, as the relevant derivatives of it are identical to those
of u(x,t), which is known to satisfy the equation. What are the boundary and initial conditions?
w(0,t) = u(0,t) − v(0) = T1 − T1 = 0 (8.92)
w(l,t) = u(l,t) − v(l) = T2 − T2 = 0 (8.93)
w(x, 0) = u(x, 0) − v(x) = f (x) − v(x) (8.94)
where f (x) = u(x, 0) is the given initial condition for the nonhomogeneous problem. Now, even
though our initial condition is slightly messier, we now have homogeneous boundary conditions,
since w(x,t) must solve the problem
wt = kwxx (8.95)
w(0,t) = w(l,t) = 0 (8.96)
w(x, 0) = f (x) − v(x) (8.97)
294 Chapter 8. Partial Differential Equations
ut = kuxx (8.98)
u(0,t) = T1 , u(l,t) = T2 (8.99)
u(x, 0) = f (x) (8.100)
with coefficients
Z l
2 T2 − T1 nπx
Bn = ( f (x) − T1 − x) sin dx.
l 0 l l
R Do not memorize the formulas but remember what problem w(x,t) has to solve and that the
final solution is u(x,t) = v(x) + w(x,t). For v(x), it is not a hard formula, but if one is not
sure of it, remember vxx = 0 and it has the same boundary conditions as u(x,t). This will
recover it.
ut = 3uxx (8.101)
u(0,t) = 20, u(40,t) = 100 (8.102)
u(x, 0) = 40 − 3x (8.103)
We start by writing
wt = 3wxx (8.104)
w(0,t) = w(40,t) = 0 (8.105)
w(x, 0) = 40 − 3x − (20 + 2x) = 20 − x (8.106)
This is a homogeneous Dirichlet problem, so the general solution for w(x,t) will be
∞
nπ 2 nπx
w(x,t) = ∑ e−3( 40 ) t sin(
40
).
n=1
8.8 The Schrödinger Equation 295
say that the heat flux at the end points should be proportional to the temperature. We could also
have had nonhomogeneous Neumann conditions
ux (0,t) = F1 ux (l,t) = F2
which would specify allowing a certain heat flux at the boundaries. These conditions are not
necessarily well suited for the method of separation of variables though and are left for future
classes.
the Schrödinger equation with V = 0 on (0, `) and Ψ = 0 at the endpoints x = 0, ` for all t. The
Dirichlet BCs require only the solutions with sine. The basis functions for this problem are the
eigenfunctions
nπx
Ψn = sin r−iEnt/h̄
`
and the general solution is a linear combination of these solutions
∞ nπx
Ψ(x,t) = ∑ bn sin r−iEnt/h̄
n=1 `
We have not used the horizontal component of Newton’s Law yet. Since we assume there are only
vertical vibrations, our tiny piece of string can only move vertically. Thus the net horizontal force
is zero.
where c2 = Tρ .
This is the same boundary value problem that we saw for the heat equation and thus the eigenvalues
and eigenfunctions are
nπ 2
λn = (8.128)
l
nπx
Xn (x) = sin (8.129)
l
for n = 1, 2, ... The first ODE (8.124) is then
cnπ 2
T 00 + T = 0, (8.130)
l
and since the coefficient of T is clearly positive this has a general solution
nπct nπct
Tn (t) = An cos + Bn sin . (8.131)
l l
There is no reason to think either of these are zero, so we end up with separated solutions
nπct nπct nπx
un (x,t) = An cos( ) + Bn sin( ) sin( ) (8.132)
l l l
We can directly apply our first initial condition, but to apply the second we will need to differentiate
with respect to t. This gives us
∞
nπc nπct nπc nπct nπx
ut (x,t) = ∑ − An sin( )+ Bn cos( ) sin( ) (8.134)
n=1 l l l l l
These are both Fourier Sine series. The first is directly the Fourier Since series for f (x) on (0, l).
The second equation is the Fourier Sine series for g(x) on (0, l) with a slightly messy coefficient.
The Euler-Fourier formulas then tell us that
2 l nπx
Z
An = f (x) sin( )dx (8.137)
l 0 l
Z l
nπc 2 nπx
Bn = g(x) sin( )dx (8.138)
l l 0 l
2 l nπx
Z
An = f (x) sin( )dx (8.139)
l 0 l
Z l
2 nπx
Bn = g(x) sin( )dx. (8.140)
nπc 0 l
8.9 Wave Equations and the Vibrating String 299
8.9.3 Examples
Example 8.14 Find the solution (displacement u(x,t)) for the problem of an elastic string of
length L whose ends are held fixed. The string has no initial velocity (ut (x, 0) = 0) from an initial
position
4x L
L 0≤x≤ 4
u(x, 0) = f (x) = 1 L4 < x < 3L4
(8.141)
4(L−x) 3L
L 4 ≤x≤L
By the formulas above we see if we separate variables we have the following equation for T
cnπ 2
T 00 + ( ) T =0 (8.142)
L
with the general solution
nπct nπct
Tn (t) = An cos( ) + Bn sin( ). (8.143)
L L
since the initial speed is zero, we find T 0 (0) = 0 and thus Bn = 0. Therefore the general solution is
∞
nπct nπx
u(x,t) = ∑ An cos( ) sin( ). (8.144)
n=1 L L
Example 8.15 Find the solution (displacement u(x,t)) for the problem of an elastic string of
length L whose ends are held fixed. The string has no initial velocity (ut (x, 0) = 0) from an initial
position
8x(L − x)2
u(x, 0) = f (x) = (8.149)
L3
By the formulas above we see if we separate variables we have the following equation for T
cnπ 2
T 00 + ( ) T =0 (8.150)
L
with the general solution
nπct nπct
Tn (t) = An cos( ) + Bn sin( ). (8.151)
L L
300 Chapter 8. Partial Differential Equations
since the initial speed is zero, we find T 0 (0) = 0 and thus Bn = 0. Therefore the general solution is
∞
nπct nπx
u(x,t) = ∑ An cos( ) sin( ). (8.152)
n=1 L L
v = x + ct, w = x − ct (8.158)
We can now think of u as a function of v, w instead of x,t. Now compute the appropriate partial
derivatives of u using the chain rule
∂u ∂u ∂v ∂u ∂w
= + = uv + u + w.
∂x ∂v ∂x ∂w ∂x
∂ 2u
= (uv + uw )x = (uv + uw )v vx + (uv + uw )w wx = uvv + 2uvw + uww
∂ x2
∂ 2u
= c2 (uvv − 2uvw + uww ).
∂t 2
Inserting these into the wave equation gives uvw = 0. Solve using two successive integrations, first
with respect to w and then with respect to v giving
∂u
Z
= h(v), u(v, w) = h(v)dv + ψ(w) = φ (v) + ψ(w).
∂v
Thus, replacing v and w by their definitions
This is known as d’Alembert’s solution. In general given initial conditions u(x, 0) = f (x) and
ut (x, 0) = g(x), d’Alembert’s solution becomes
Z x+ct
1 1
u(x,t) = [ f (x + ct) + f (x − ct)] + g(s)ds. (8.160)
2 2c x−ct
8.9 Wave Equations and the Vibrating String 301
R The idea of d’Alembert’s solution is just a special case of the method of characteristics.
This concerns PDEs of the form
PDEs have three general types defined by the coefficients A, B,C and the discriminant AC − B2
Figure 8.3: Three general types of PDEs, (from Kreysig Adv. Engineering Math).
Index
complex plane, 9
complex variables, 9
imaginary part, 9
real part, 9