Differential Equations With Linear Algeb PDF
Differential Equations With Linear Algeb PDF
Ben Woodruff1
1
Mathematics Faculty at Brigham Young University–Idaho, [email protected]
c 2013 Ben Woodruff. Some Rights Reserved.
or send a letter to Creative Commons, 171 Second Street, Suite 300, San
Francisco, California, 94105, USA.
Contents
1 Review 1
1.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Laplace Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Ordinary Differential Equations . . . . . . . . . . . . . . . . . . . 4
1.4 General Functions and Derivatives . . . . . . . . . . . . . . . . . 5
1.4.1 The General Chain Rule . . . . . . . . . . . . . . . . . . . 6
1.5 Potentials of Vector Fields and Differential Forms . . . . . . . . . 8
1.6 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
ii
CONTENTS iii
5 Homogeneous ODEs 66
5.1 Some Physical Models . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2 Notation, Vocabulary, and Solutions . . . . . . . . . . . . . . . . 69
5.3 Mass-Spring Systems . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4 Higher Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.5 Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . . . 78
5.6 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7 Laplace Transforms 94
7.1 Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2 Piecewise Defined Functions . . . . . . . . . . . . . . . . . . . . . 96
7.2.1 The Heaviside function u(t − a) . . . . . . . . . . . . . . . 97
7.2.2 The Dirac-Delta distribution δ(t − a) and impulses. . . . 101
7.3 Convolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7.4 Extra Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
7.5 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Review
1.1 Basics
We need to review our ability to graph functions with multiple inputs and/or
outputs. The next few problems ask you to practice some skills that will be
crucial as the course progresses.
1
CHAPTER 1. REVIEW 2
ex + e−x ex − e−x
cosh x = and sinh x = .
2 2
These functions are the hyperbolic trig functions, and we say the hyperbolic
sine of x when we write sinh x. These functions are very similar to sine and
cosine functions, and have very similarly properties.
d
Problem 1.3 Three useful facts about the trig functions are (1) dx sin x =
d 2 2
cos x, (2) dx cos x = − sin x, and (3) cos x + sin x = 1. Use the definitions
above to show the following:
d
1. dx sinh x = cosh x,
d
2. dx cosh x = sinh x, and
3. cosh2 x − sinh2 x = 1.
[Hint: Start by replacing the hyperbolic function with its definition in terms of
exponentials. Then perform the computations.]
Problem 1.4 The three facts from the previous problem are crucial tools
d
need to prove that dx tan x = sec2 x.
d
1. Use the quotient rule to give a formula for dx tanh x in terms of hyperbolic
trig functions.
1
2. Similarly obtain a formula for the derivative of sech x = cosh x .
d
3. What is dx csch x?
You might ask why these function are called the hyperbolic trig functions.
What does a hyperbola have to do with anything?
Problem 1.5 Each pair of parametric equations traces out a curve in the
xy plane. Given a Cartesian equation of the curve by eliminating the parameter
t, and then graph the curve.
1. x = cos t, y = sin t, −2π < t < 2π.
2. x = cosh t, y = sinh t, −∞ < t < ∞.
Give a reason as to why do we call cosh the hyperbolic cosine.
The problems above asked you to review your differentiation skills. You’ll
want to make sure you can use the basic rules of differentiation (such as the
power, product, quotient, and chain rules). The next few problems will help you
review your integration techniques, and you will apply them to two new ideas.
Z
1
Problem 1.9 Compute tanh−1 xdx. The derivative of tanh−1 x is .
1 − x2
We will use the Laplace transform throughout the semester to help us solve
many problems related to mechanical systems, electrical networks, and more.
The mechanical and electrical engineers in this course will use Laplace transforms
in many future courses. Our goal in the problems that follow is to practice
integration-by-parts. As an extra bonus, we’ll learn the Laplace transforms of
some basic functions.
Z ∞
Problem 1.10 Compute the integral e−st dt, and state for which s the
0
integral converges. What is the Laplace transform of f (t) = 1? (If the last
question seems redundant, then horray.)
Problem 1.11 Compute the Laplace transform of f (t) = e2t , and state
the domain. Then compute the Laplace transform of f (t) = e3t and state the
domain. Finally, compute the Laplace transform of f (t) = eat for any a, and
state the domain.
CHAPTER 1. REVIEW 4
tn
lim = 0.
t→∞ est
1 2
L {t0 } = and L {t2 } = .
s1 s3
1
Show that the Laplace transform of t is L {t1 } = . Then compute the Laplace
s2
3 4
transforms of t , t , and so on until you see a pattern. Use this pattern to state
the Laplace transform of t1 0 and tn , provided n is a positive integer. [Hint: Try
the tabular method of integration-by-parts. After evaluating at 0 and ∞, all
terms but 1 will be zero.]
Theorem 1.2. Since integration can be done term-by-term, and constants can
be pulled out of the integral, we have the crucial fact that
Problem 1.14 Without integrating, rather using the results above, compute
the Laplace transform L(3 + 5t2 − 6e8t ), and state the domain.
et + e−t et − e−t
Problem 1.15 Recall that cosh t = and sinh t = . Use
2 2
this to prove that
s a
L {cosh at} = and L {sinh at} = .
s2 − a2 s2 − a2
Example 1.3. The first order ODE y 0 (x) = 2x, or just y 0 = 2x, has unknown
function y with independent variable x. A solution on (−∞, ∞) is the function
y = x2 + C for any constant C. We obtain this solution by simply integrating
both sides. Notice that there are infinitely many solutions to this ODE.
Typically a solution to an ODE involves an arbitrary constant C. There is
often an entire family of curves which satisfy a differential equation, and the
constant C just tells us which curve to pick. A general solution of an ODE is
an infinite class of solutions of the ODE. A particular solution is one of the
infinitely many solutions of an ODE.
Often an ODE comes with an initial condition y(x0 ) = y0 for some values
x0 and y0 . We can use these initial conditions to find a particular solution of the
ODE. An ODE, together with an initial condition, is called an initial value
problem (IVP).
Example 1.4. The IVP y 0 = 2x, y(2) = 1, has the general solution y = x2 + C
from the previous problem. Since y = 1 when x = 2, we have 1 = 22 + C which
means C = −3. Hence the solution to our IVP is y = x2 − 3.
Problem 1.16 Consider the ordinary differential equation y 00 + 9y = 0. By
computing derivatives, show that y(t) = A cos(3t)+B sin(3t) is a general solution
to the ODE, where A and B are arbitrary constants. If we know that y(0) = 1
and y 0 (0) = 2, determine the values of A and B.
dy
Problem 1.17 Consider the ordinary differential equation y = x2 . Find
dx
a general solution to this ODE by integrating both sides with respect to x. State
an interval on which your solution is valid.
x2 − 1
Problem 1.19 Solve the IVP given by y 0 = , where y(0) = 1.
y4 + 1
Function Derivative
Table 1.1: The table above shows the (matrix) derivative of various functions.
Each column of the matrix corresponds a partial derivative of the function.
When the output of a function is a vector, partial derivatives are vectors which
are placed in columns of the matrix. The order of the columns matches the
order in which you list the variables.
Problem 1.20 Let ~r(t) = t2 − 1, 2t + 3 . Construct a graph of ~r(t), and
compute the derivative D~r(t).
Problem 1.22 Let ~r(t) = h3 cos t, 2 sin t, ti. Construct a 3D graph of ~r(t),
and compute the derivative D~r(t).
Problem 1.23 Let F~ (x, y) = (y, −2x). Construct a 2D graph of this vector
field, and compute the derivative DF~ (x, y).
You may remember this as “the derivative of the outside function times the
derivative of the inside function.” In multivariable calculus, most textbooks use
a tree rule to develop the formula
df
= fx xt + fy yt
dt
for a function f (x, y), where x and y depend on t (so that ~r(t) = (x(t), y(t)) is
a curve in the xy plane). Written in matrix form, the chain rule is simply
df xt
= fx fy = Df · Dr,
dt yt
which is the (matrix) product of the derivatives, just as it was in first semester
calculus. You are welcome to tackle the following problems by using the tree
rule or matrix product.
dx
Problem 1.25 Suppose that f (x, y) = x + 3y and that = cos t and
dt
dy
= et . Compute df
dt .
dt
∂f ∂f
Problem 1.26 Suppose that z = f (x, y) and that = 3x2 y and =
√ ∂x ∂y
3 y df
x y − e . Also suppose that x = t and y = ln t. Compute dt .
df d~r
2. Why does dt = ∇f (x, y) · ?
dt
3. Why is the gradient of f normal to level curves? Recall that the word normal
means there is a 90 degree angle
between the gradient and the level
Before proceeding, let’s practice with an examples to visually remind us that curve.
the gradient is normal to level curves. This key fact will help us solve most of
the differential equations we encounter in the course.
By taking derivatives, there is a test that tells you if a function will have a
potential. Some textbooks call it the test for a conservative field.
Problem 1.30: Test for a conservative vector field. Let’s prove the test The test for a conservative vector
for a conservative vector field in both 2 and 3 dimensions. field states states more than what
you showed in this problem. It
~ is a continuously
1. Suppose that F~ (x, y) = (M, N ) is a continuously differentiable vector states that if F
differentiable vector field on a
field on the entire plane. Suppose further that F~ has a potential f . The simply connected domain, then (1)
derivative of F~ is ~ has potential, then certain
if F
~ Mx My pairs of partials must be equal,
DF (x, y) = .
Nx Ny and (2) if those pairs of partial
derivatives are equal, then the F ~
Some of the entries in this matrix must be equal? Which ones? Explain. has a potential. We will not prove
[If you’re not sure, try taking the derivative of the problem above.] part (2).
Problem 1.31 For each vector field below, either give a potential, or explain
why no potential exists.
1. F~ = (4x + 5y, 5x + 6y)
2. F~ = (2x − y, x + 3y)
~ 2y
3. F = 4x + , arctan(2x)
1 + 4x2
• If a differential form is the differential of a function f , then the differential A differential form is exact
form is said to be exact (just as we say a vector field is a gradient field). precisely when the corresponding
vector field is a gradient field.
Again, the function f is called a potential for the differential form.
Notice that M dx + N dy + P dz is exact if and only if F~ = (M, N, P ) is a
gradient field. The language of differential forms is practically the same as
the language of conservative vector fields. Why do we have different sets of
words for the same idea? That happens all the time when different groups of
people work on seeming different problems, only to discover years later that
they have been working on the same problem. If both sets of vocabulary stick,
it’s often because both have advantages. We have many different notations for
dy
the derivative (such as y 0 , dx , and Df ), and each notation has advantages. The
language of differential forms is best suited when studying differential equations.
Problem 1.32 For each differential form below, state if the differential form
is exact. If it is exact, give a potential.
1. (2x + 3y)dx + (4x + 5y)dy
1.6 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 2
The next unit will focus on applications of these ideas. The main goal of
this unit is to familiarize yourself with the arithmetic involved in linear algebra.
10
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 11
normally write matrices using capital letters, and use the notation
a11 · · · a1n
a21 · · · a2n
A= . .. = [ajk ],
. . .
. . .
am1 · · · amn
where ajk is the entry in the jth row, kth column.
• We say two matrices A and B are equal if ajk = bjk for all j and k.
• We add and subtract matrices of the same size entry wise. So we write
A + B = C where cjk = ajk + bjk . If matrices do not have the same size,
then we cannot add them.
• We can multiply a matrix A by a scalar C to obtain a new matrix cA. We
do this multiplying every entry in the matrix A by the scalar c.
• If the number of rows and columns are equal, then we say the matrix is
square.
• The main diagonal of a square (n × n) matrix consists of the entries
a11 , a22 , . . . , ann .
• The
P trace of a square matrix is the sum of the entries on the main diagonal
( ajj ).
• The transpose of a matrix A = [ajk ] is a new matrix B = AT formed by
interchanging the rows and columns of A, so that bjk = akj . If AT = A,
then we say that A is symmetric.
1 3 3 −1
Problem 2.1 Let A = and B = . Compute 2A − 3B, and
0 2 0 4
find the trace of both A and B.
Definition
p 2.2. The magnitude (or length) of the vector ~u = (u1 , u2 ) is |~u| =
u21 + u22 . In higher dimensions we extend this as
v
q u n
uX
2 2 2 2
|~u| = u1 + u2 + u3 + · · · un = t u2i .
i=1
A unit vector is a vector with length 1. In many books unit vectors are written A unit vector û has length |~u| = 1
with a hat above them, as û.
We will need to be able to find vectors of any length that point in a given
direction.
Problem 2.3 Find a vector of length 12 that points in the same direction
as the vector ~v = (1, 2, 3, 4). Then give a general formula for finding a vector of
length c that points in the direction of ~u.
We call these the standard basis vectors in 2D. In 3D we include the vector
k = ~j = h0, 0, 1i as well as add a zero to both ~i and ~j to obtain the standard
basis vectors. The word basis suggests that we can base other vectors on these The standard basis vectors in 3D
basis vectors, and we typically write other vectors in terms of these standard i = ~i = h1, 0, 0i = (1, 0, 0)
basis vectors. Using only scalar multiplication and vector addition, we can j = ~j = h0, 1, 0i = (0, 1, 0)
k = ~k = h0, 0, 1i = (0, 0, 1)
obtain the other vectors in 2D from the standard basis vectors.
Problem 2.4 Write the vector (2, 3) in the form (2, 3) = c1~i + c2~j.
If instead we use the non-standard basis vectors ~u1 = (1, 2) and ~u2 = (−1, 4),
then write the vector (2, 3) in the form (2, 3) = c1 ~u1 + c2 ~u2 .
Problem 2.6 Write the vector (2, 3, 1) as a linear combination of the stan-
dard basis vectors in R3 . Then write (2, 3, 1) as a linear combination of the
vectors (1, 0, 0), (1, 1, 0), and (1, 1, 1).
Definition 2.5: A matrix times a vector. We define the matrix product A~x
(a matrix times a vector) to be the linear combination of columns of A where
the components of ~x are the scalars in the linear combination. For this to make
sense, notice that the vector ~x must have the same number of entries as there
are columns in A. We can make this definition more precise as follows. Let
x1
x2
~vi be the ith column of A so that A = ~a1 ~a2 · · · ~an , and let ~x = . . ..
xn
Then the matrix product is the linear combination The product A~x gives us linear
combinations of the columns of A.
x1
x2
A~x = ~a1 ~a2 · · · ~an . . . = ~a1 x1 + ~a2 x2 + · · · + ~an xn .
xn
The definition above should look like the dot product. If you think of A as a
vector of vectors, then A~x is just the dot product of A and ~x.
Problem 2.7 Write down a 2 by 4 nonzero matrix, and call it A (fill the
matrix with some integers of your choice). Then write down a vector ~x such
that the matrix product A~x makes sense (again, fill the vector with integers of
your choice). Then use the definition above to obtain the product A~x.
Definition 2.6:h A matrix times i a matrix. Let ~bj represent the jth column
of B (so B = ~b1 ~b2 · · · ~bn ). The product AB of two matrices Am×n and
Bn×p is a new matrix Cm×p = [cij ] where the jth column of C is the product
A~bj . To summarize, the matrix product AB is a new matrix whose jth column
is a linear combinations of the columns of A using the entries of the jth column
of B to perform the linear combinations.
1 2
0 1 4
Problem 2.8 Let A = 3 4 and B =
. Use the definition
−1 2 −3
5 6
given above to compute both AB and BA. Be prepared to show the class how
you used linear combinations to get the matrix product. (If you are used to
using the row dotted by column approach, then this problem asks you to do the
matrix product differently.)
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 14
2x + 3y − 4z = 4
3x + 4y − 3z = 8
7x + 12y − 12z = 19.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 15
Use elimination to find your solution. Eliminate x from the 2nd and 3rd
equations (which will give you two equations that do not involve x). Then
use one of these simplified equations to eliminate y from the other simplified
equation. At this point you should have an equation that only involves z. Then
use back substitution to give y and x.
we eliminate the 2x1 in the 2nd row by adding -2 times the first row to the
second row.
x1 − 3x2 = 4 1 −3 4
x2 = −7 0 1 −7
The matrix at the right is said to be in row echelon form. row echelon form
Definition 2.9: Row Echelon Form. We say a matrix is in row echelon form
(ref) if
• each nonzero row begins with a 1 (called a leading 1),
• the leading 1 in a row occurs further right than a leading 1 in the row
above, and
The matrix on the right is said to be in reduced row echelon form (or just
rref). We can easily read solutions to systems of equations directly from a
matrix which is in reduced row echelon form.
Definition 2.10: Reduced Row Echelon Form. We say that a matrix is reduced row echelon form - rref
in reduced row echelon form (rref) if
• the matrix is in row echelon form, and
• each pivot column contains all zeros except for the pivot (leading one).
Example 2.11. Let’s now solve a nonhomogeneous (meaning the right side is
not zero) system with 3 equations and 3 unknowns:
2x1 + x2 − x3 = 2 2 1 −1 2
x1 − 2x2 = 3 1 −2 0 3 .
4x2 + 2x3 = 1 0 4 2 1
We’ll encounter some homogeneous systems later on. To simplify the writing,
we’ll just use matrices this time. To keep track of each step, I will write the
row operation next to the row I will replace. Remember that the 3 operations
are (1)multiply a row by a nonzero constant, (2)add a multiple of one row to
another, (3) interchange any two rows. If I write R2 + 3R1 next to R2 , then
this means I will add 3 times row 1 to row 2. If I write 2R2 − R1 next to R2 ,
then I have done two row operations, namely I multiplied R2 by 2, and then
added (-1) times R1 to the result (replacing R2 with the sum). The steps below
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 17
read left to right, top to bottom. In order to avoid fractions, I wait to divide
until the last step, only putting a 1 in each pivot at the very end.
2 1 −1 2 2 1 −1 2
⇒(1) 1 −2 0 3 2R2 − R1 ⇒(2) 0 −5 1 4
0 4 2 1 0 4 2 1 5R3 + 4R2
2 1 −1 2 2 1 −1 2 2R1 + R3
⇒(3) 0 −5 1 4 ⇒(4) 0 −10 2 8 R2 − R3
0 0 14 21 R3 /7 0 0 2 3
4 2 0 7 4 2 0 7 R1 + R2
⇒(5) 0 −10 0 5 R2 /5 ⇒(6) 0 −2 0 1
0 0 2 3 0 0 2 3
4 0 0 8 R1 /4 1 0 0 2
⇒(7) 0 −2 0 1 R2 / − 2 ⇒(8) 0 1 0 −1/2
0 0 2 3 R3 /2 0 0 1 3/2
(a) Consider the first column of your matrix. Start by interchanging Computer algorithms place the
rows (if needed) to place a nonzero entry in the first row. If all the largest (in absolute value) nonzero
entry in the first row. This
elements in the first column are zero, then ignore that column in reduces potential errors due to
future computations (mentally erase the column) and begin again rounding that can occur in later
with the smaller matrix which is missing this column. If you erase steps.
the last column, then stop.
(b) Divide the first row (of your possibly smaller matrix) row by its
leading entry so that you have a leading 1. This entry is a pivot, and
the column is a pivot column. [When doing this by hand, it is often
convenient to skip this step and do it at the very end so that you
avoid fractional arithmetic. If you can find a common multiple of all
the terms in this row, then divide by it to reduce the size of your
computations. ]
(c) Use the pivot to eliminate each nonzero entry below the pivot, by
adding a multiple of the top row (of your smaller matrix) to the
nonzero lower row.
(d) Ignore the row and column containing your new pivot and return Ignoring rows and columns is
to the first step (mentally cover up or erase the row and column equivalent to incrementing row
and column counters in a
containing your pivot). If you erase the last row, then stop. computer program.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 18
(3) Eliminate
entries in 2nd column
(4) Make
a leading 1 in 4th column
1 3 5 1 6 1 3 5 1 6
0 1 1 −2 7 0 1 1 −2 7
⇒ 0 −6 −6
⇒
1 −20 R3 + 6R2 0 0 0 −11 22 R3 /(−11)
0 7 7 2 17 R4 − 7R2 0 0 0 16 −32 R4 /16
(5) Eliminate
entries in 4th
column (6) Row
Echelon Form
1 3 5 1 6 1 3 5 1 6
0 1 1 −2 7 0 1 1 −2 7
⇒ ⇒
0 0 0 1 −2 0 0 0 1 −2
0 0 0 1 −2 R4 − R3 0 0 0 0 0
At this stage we have found a row echelon form of the matrix. Notice that we
eliminated nonzero terms in the lower left of the matrix by starting with the
first column and working our way over column by column. Columns 1, 2, and 4
are the pivot columns of this matrix. We now use the pivots to eliminate the
other nonzero entries in each pivot column (working right to left). Recall that a matrix is in reduced
row echelon (rref) if:
(7) Eliminate
entries in 4th column (8) Eliminate
entries in 2nd column 1. Nonzero rows begin with a
1 3 5 1 6 R1 − R3 1 3 5 0 8 R1 − 3R2 leading 1.
0 1 1 − 2 7 R2 + 2R3 0 1 1 0 3
⇒ ⇒ 2. Leadings 1’s on subsequent
0 0 0 1 −2 0 0 0 1 −2 rows appear further right
0 0 0 0 0 0 0 0 0 0 than previous rows.
3. Rows of zeros are at the
(9) Reduced
Row Echelon
Form (10) Switch to system form bottom.
1 0 2 0 −1 x1 + 2x3 = −1 4. Zeros are above and below
0 1 1 0 3 x2 + x3 = 3 each pivot.
⇒ ⇒
0 0 0 1 −2 x4 = −2
0 0 0 0 0 0 =0
We have obtained the reduced row echelon form. When we write this matrix
in the corresponding system form, notice that there is not a unique solution to
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 19
the system. Because the third column did not contain a pivot column, we can
write every variable in terms of x3 (the redundant equation x3 = x3 allows us
to write x3 in terms of x3 ). We are free to pick any value we want for x3 and
still obtain a solution. For this reason, we call x3 a free variable, and write our Free variables correspond to non
infinitely many solutions in terms of x3 as pivot columns. Solutions can be
written in terms of free variables.
x1 = −1 − 2x3 x1 = −1 − 2t
x2 = 3 − x3 x2 =3−t
or by letting x3 = t .
x3 = x3 x3 =t
x4 = −2 x4 = −2
By choosing a value (such as t) for x3 , we can write our solution in so called parametric form
parametric form. We have now given a parametrization of the solution set,
where t is an arbitrary real number.
Problem 2.13 Each of the following augmented matrices requires one row
operation to be in reduced row echelon form. Perform the required row operation,
and then write the solution to the corresponding system of equations in terms
of the free variables.
1 0 0 3 1 0 2 4
1. 0 0 1 1 3. 0 1 −3 0
0 1 0 −2 0 0 0 1
0 1 0 7 0 3
1 2 0 −4 0 0 1 5 −3 −10
4.
2. 0 0 1 3 0 0 0 0 1 2
−3 −6 0 12 0 0 0 0 0 0
Problem 2.17 Are the vectors ~v1 = (1, 3, 5), ~v2 = (−1, 0, 1), and ~v3 =
(0, 3, 1) linearly independent? Solve the system c1~v1 + c2~v2 + c3~v3 = ~0 to answer
this question. If they are dependent, then write one of the vectors as a linear
combination of the others.
Problem 2.18 Are the vectors ~v1 = (1, 2, 0), ~v2 = (2, 0, 3), and ~v3 =
(3, −2, 6) linearly independent? Solve the system c1~v1 + c2~v2 + c3~v3 = ~0 to
answer this question. If they are dependent, then write one of the vectors as a
linear combination of the others.
Problem 2.21 Find the reduced row echelon form of the matrix
2 −1 1 0 2 0 2
B= .
1 1 0 1 0 3 3
1. Write both (1, 0) and (0, 1) as linear combinations of (2, 1) and (−1, 1).
2 2 −1 8
2. Write as a linear combination of and . Then write
0 1 1 0
2 −1
as a linear combination of and .
1 1
2 −1 1 0
3. Let A = . Find vectors ~x and ~y so that A~x = and A~y = .
1 1 0 1
1 0
4. Find a matrix B so that AB = .
0 1
2. Write (1, 0) as a linear combination of (2, 1) and (−1, 1). Remember, that
when writing c1 (2, 1) + c2 (−1, 1) = (1, 0), you must solve for
the unknown
2 −1 1
constants. Feel free to row reduce the augmented matrix .
1 1 0
3. Write (0, 1) as a linear combination of (2, 1) and (−1, 1). Remember, that
when writing c1 (2, 1) + c2 (−1, 1) = (0, 1), you must solve for
the unknown
2 −1 0
constants. Feel free to row reduce the augmented matrix .
1 1 1
2 0 2
4. Continue to write each of , , and as a linear combina-
0 3 3
2 −1
tion of and . [Hint:At some point, rather than row reducing
1 1
2 −1
~v , ask yourself how you could use part 1 to answer this.]
1 1
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 22
Use this to write both (4, 2, 0) and (5, −1, 2) as a linear combination of
the first three columns.
1 3
Problem Let A = . We now develop an algorithm for computing the
3 4
−1
inverse A . If an inverse
matrix exists, then we know it’s the same size as A,
so we could let A−1 = ~v1 ~v2 be the inverse matrix, where ~v1 and ~v2 are the
columns of A−1 .
1 0 1 0
1. We know that AA−1 = . Explain why A~v1 = and A~v2 = .
0 1 0 1
1 0
2. Solve the matrix equations A~v1 = and A~v2 = . (This involves
0 1
1 3 1 1 3 0
row reducing and ).
3 4 0 3 4 1
1 3 1 0
3. What is the reduced row echelon form of . How is this
3 4 0 1
related to your previous work.
4. State the inverse of A.
Problem 2.22 Use the algorithm describe immediately before this problem
to compute the inverse of
3 0 3
A = 0 −1 1 .
0 3 −4
Then use your work to write each of the standard basis vectors (1, 0, 0), (0, 1, 0),
and (0, 0, 1) as a linear combination of the columns of A.
a b
Problem 2.23 Let A = . Use Gaussian elimination to show that the
c d
inverse of A is
1 d −b
A−1 = .
ad − bc −c a
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 23
We use vertical bars next to a matrix to state we want the determinant. Notice
the negative sign on the middle term of the 3 × 3 determinant. Also, notice that
we had to compute three determinants of 2 by 2 matrices in order to find the
determinant of a 3 by 3.
• You can pick ANY row or ANY column you want, and then compute
the determinant by multiplying each entry of that row or column by its
cofactor, and then summing the results. (The fact that this works would
+ − + ···
require proof. That proof will be left to a course in linear algebra.) −
+ − · · ·
• A sign matrix keeps track of the (−1)j+k term in the cofactor. All you
+ − + · · ·
.. .. .. . .
have to do is determine if the first entry of your expansion has a plus or . . . .
minus, and then alternate the sign as you expand. sign matrix
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 24
2 3 −1
Problem 2.24 Compute the determinant of the matrix 1 0 0 in 3
4 2 5
different ways. First, use a cofactor expansion using the first row (Definition
2.15). Then use a cofactor expansion using the 2nd row. Then finally use a
cofactor expansion using column 3. Which of the was the quickest, and why?
You can make these problems really fast if you use a cofactor expansion along a
row or column that contains a lot of zeros.
1 0 −2 1
Then find the inverse of A (or explain why it does not exist). Are the columns
of A linearly independent or linearly dependent?
2 1 0
Problem 2.27 Compute the determinant of A = 0 2 1 . Does A have
1 0 2
an inverse? Are the columns of A linearly independent or linearly dependent?
Answer both of the previous
questions without
doing any row reduction. Then
2 1 0 1 0 0
row reduce A I = 0 2 1 0 1 0 to confirm your answer.
1 0 2 0 0 1
After completing the previous two problems, you should see that there is a
connection between the determinant, inverse, and linear independence. Make
a conjecture about what this connection is. We’ll learn a little more about
determinants and inverses, and then you’ll have a chance to state your conjecture,
as well as prove it.
as a matrix product A~x = ~b. (What are A, ~x and ~b?) Then find the inverse of
A, and use this inverse to find ~x. [Hint: If we just have numbesr, then to solve
ax = b, we multiply both sides by a1 to obtain a1 ax = a1 b or just x = a1 b.]
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 25
Problem 2.29 To find the area of the parallelogram with vertexes O = (0, 0),
U = (a, c), V = (b, d), and P = (a + b, c + d), we would find the length of OU
(the base b), and multiply it by the distance from V to OU . Complete the
following:
~ onto OU
1. Find the projection of OV ~ . (You may have to look up a formula
from math 215.)
~ − proj ~ OU
2. The vector OV ~ is called the component of OV ~ that is or-
OV
~
thogonal to OU . The length of this vector is precisely the distance from
V to OU , which we’ll call h. Find the length of this vector.
3. We now have the base b = |OU | and height
h of a parallelogram. Compute
a b
the product, and prove it equals = |ad − bc|.
c d
2 1 −1
Problem 2.32 Consider the matrix A = 1 2 0 . Compute the de-
0 4 3
terminant of A. Then create a matrix B so that the ijth entry of B is the
cofactor Cij (remove row i and column j, compute the determinant, and then
times by an appropriate sign). This will require that you compute nine 2 by 2
determinants. Finally, compute the inverse of A (feel free to use a computer on
this part). Make a conjecture about the connection between the determinant of
A, this matrix B, and the inverse of A. We’ll verify your conjecture is true on a
4 by 4 matrix in class.
det(A − λI) = 0.
6 4
Problem 2.36 Consider the matrix A = . Find the characteristic
3 2
polynomial and eigenvalues of A. Then for each eigenvalue, find all corresponding
eigenvectors. (Check your work by computing the trace and determinant of A.)
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 28
3 0 0
Problem 2.37 Consider the matrix A = 0 2 1. Find the characteristic
0 1 2
polynomial and eigenvalues of A. Then for each eigenvalue, find all corresponding
eigenvectors. (Check your work by computing the trace and determinant of A.)
1 2 1 0
0 2 1 1
Problem 2.38 Consider the matrix A = 0 0 2 0. Find the charac-
0 0 0 5
teristic polynomial and eigenvalues of A. Then for each eigenvalue, find all
corresponding eigenvectors. (Check your work by computing the trace and
determinant of A.)
2.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 3
Linear Algebra
Applications
29
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 30
The problem above had two positive eigenvalues. In the next problem, your
goal is to determine what a vector field looks like when you have both a positive
and negative eigenvalue.
1. For the vector field F~ = (x, 2x − y), compute the eigenvalues and eigen-
vectors of DF~ (x, y).
2. For the vector field F~ = (x − 4y, −6x − y), compute the eigenvalues and
eigenvectors of DF~ (x, y).
3. With each vector field, use a computer to construct a vector field plot. In
the plot, please show us how to see the eigenvectors, together with which
eigenvector corresponds to a positive eigenvalues, and which corresponds to
a negative eigenvalue. You can construct vector fields in Wolfram—Alpha
by typing “vector field plot” in the input box, or just follow the link http:
//www.wolframalpha.com/input/?i=vector+field+plot&lk=4&num=2.
4. Add to your plots several trajectories, i.e. a path that a particle would
follow if F~ represents the tangent vectors of the path. Think, “If I dropped
a really light particle in this field, representing water current, where would
the particle go?
Problem 3.3 The following three vector fields have imaginary eigenvalues.
Compute the eigenvalues for each, construct a vector field plot, and on the plot
add several trajectories (the path followed by a particle that is dropped into
this field).
1. F~ = (−2y, x).
2. F~ = (−x + y, −x − y).
3. F~ = (x − y, x)
Make a conjecture as to why one spirals in, one spirals out, and one just wraps
around in ellipses. We’ll address this conjecture in class.
The next problem requires that you are on a computer that can use Math-
ematica. These computers are available in the Ricks, Austin, Romney, and
library. Alternately, you can download VMWare that will allow you to use
Mathematica for free from your computer, provided you head to https://
vdiview.byui.edu/. You can download step-by-step instructions from http:
//www.byui.edu/help-desk/categories/vdivmware. Please take a moment
and make sure you can access Mathematica.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 31
4. If the vector field involves swirling motion, what do you know about
the eigenvalues? What makes the difference between spiraling inwards,
outwards, or just spinning in circles?
5. What happens when you have a repeated eigenvalue? This one has lots of
correct answers, and it a topic for much further discussion in chapter 10.
See if you can get an example of a repeated eigenvalue with a behavior
that’s different from the above. If you have the first 4, you can present in
class. We’ll have you come up to the computer and show us what you did.
4. Recall that the gradient points in the direction of greatest increase. Using
this information alone, does the function have a maximum, minimum, or
saddle point at (x, y) = (0, 0)
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 32
-1
-2
-2 -1 0 1 2
Figure 3.1: A plot of several level curves of f (x, y) = x2 + 4xy + y 2 and the
gradient. In one direction the gradient is pulling things towards the origin. In
another direction, the gradient is pushing things away from the origin.
-1
-1 0 1 2 3
Figure 3.2: A plot of several level curves of f (x, y) = x3 − 3x2 − y 2 + 2y and the
gradient. There are two critical points. The vector field plot provides enough
information to determine if the sign of the eigenvectors of the second derivative
at each critical point.
4. Now compute the eigenvalues of the Hessian at each critical value. This
should confirm your answer to part 3. (The matrix is diagonal, so com-
puting eigenvalues should be quick.)
The following example adds a little more information to this discussion. I’ve
included it to give you one additional piece of information, namely how the
eigenvalues connect to the concavity of the function.
2 2
Example
3.2. For
the function f (x, y) = x + xy + y , the gradient is Df =
2x + y x + 2y , which is zero only at x = 0, y = 0 (solve the system of
2 1
equations 2x + y = 0, x + 2y = 0). The Hessian is D2 f = . The
1 2
2−λ 1
eigenvalues are found by solving 0 = det = (2 − λ)2 − 1 =
1 2−λ
4 − 4λ + λ2 − 1 = (λ − 3)(λ − 1), so λ = 3, 1 are the eigenvalues. Since both
eigenvalues are positive, the gradient pushes things away from the origin in
all direction, which means in every direction you move from the critical point,
you’ll increase in height. There is a minimum at (0, 0).
The eigenvectors of the Hessian help us understand more about the graph of
the function. An eigenvector corresponding to 3 is (1, 1), and corresponding to
1 is (−1, 1). These vectors are drawn in figure 3.3, together with two parabolas
whose 2nd derivatives are precisely 3 and 1. The parabola which opens upwards
the most quickly has a 2nd derivative of 3. The other parabola has a second
derivative of 1. In every other direction, the 2nd derivative would be between 1
and 3.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 34
Figure 3.3: The eigenvectors of the second derivative tell you the directions
in which the 2nd derivative is largest and smallest. At each critical point,
two eigenvectors are drawn as well as a parabola whose second derivative (the
eigenvalue) matches the second derivative of the surface in the corresponding
eigenvector direction.
3.2.1 Stoichiometry
Chemical reaction stoichiometry is the study balancing chemical equations.
A chemical reaction will often transform reactants into by-products. The by
products are generally different compounds, together with either an increase
or decrease in heat. One key rule in stoichiometry is that a chemical process
neither creates nor destroys matter, rather it only changes the way the matter
is organized. For simple reactions (with no radioactive decay), this conservation
law forces the number of atoms entering a reaction to be the same as the number
leaving. The next problem asks you to use this conservation law to create a
balanced chemical reaction equation.
x1 C12 H26 +x2 O2 = x3 CO2 +x4 H2 O or x1 C12 H26 −x2 O2 = x3 CO2 −x4 H2 O = 0,
i1 i3 i1 i3 R3 i5
i2 i2 i4
E R2 R3 E R2 R4 R5
R1 R1 R6 i 6
2. Kirchoff’s voltage law states that on any loop in the system, the directed
sum of voltages supplied equals the directed sum of voltage drops (in loops,
voltage in = voltage out). To use this law, pick a spot in the system. Then
move around the system following a path that eventually gets you back to
where you began (a closed curve). If you encounter a battery (a voltage
source), then it counts as voltage in. If you encounter a resistor as you
move with the current, then the voltage drop is Ri. If you encounter a
resistor while moving opposite the current, then times by a negative to
get a voltage drop of −Ri .
Let’s use Kirchoff’s laws to generate a system of equations for the two loop
system. Remember that every time a current encounters a resistor, the voltage
drop is V = RI, the product of the resistance and the current.
Problem 3.8 Consider the two loop system in figure 3.4. Assume that the
voltage supplied from the battery E, as well as the ohms R1 , R2 , and R3 , on
the resistors are known. The currents i1 , i2 , and i3 are unknown.
1. Use Kirchoff’s laws to explain how to obtain each of the equations below:
i1 − i2 − i3 =0
−i1 + i2 + i3 =0
R1 i1 + R2 i2 =E
−R2 i2 + R3 i3 = 0.
R1 i1 + R3 i3 = E.
[Hint: If you encounter a resistor while moving backwards along a loop,
then times the voltage drop becomes a voltage gain (times by a negative).]
2. Some of the equations above are linear combinations of the other equations.
How could you obtain the 2nd and 5th as a linear combination of the
others?
3. If E = 12, R1 = 2, R2 = 3, and R3 = 6, then solve the system of equations
above by row reducing an appropriate matrix.
Problem 3.9 Consider the three loop system in figure 3.4. Assume that the
voltage supplied from the battery E and that the ohms Rj on the resistors are
known. The currents are unknown.
1. There are 4 nodes in this system. Write the 4 equations we obtain by
remember that the flow in at a node must equal the flow out.
2. There are three inner loops in the system above. Write the equations
formed by going around each inner loop. [To get an inner loop, pick any
point in the system. Then move in a clockwise fashion around the loop
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 37
3. Some of the equations above are linear combinations of the other equations.
How could you obtain the 2nd and 5th as a linear combination of the
others?
4. Why will row reducing the following matrix give you the unknown currents?
1 −1 −1 0 0 0 0
0
0 1 −1 −1 0 0
0
0 0 1 1 −1 0.
R1 R2 0 0 0 0 E
0 −R2 R3 R4 0 R6 0
0 0 0 −R4 R5 0 0
[Don’t row reduce this matrix.]
Problem 3.10 Consider the three loop system in figure 3.4. If E = 12,
R1 = 1, R2 = 1, R3 = 1, R4 = 1, R5 = 1, R6 = 1 then find the unknown
currents by row reducing the matrix in part 4 above. Use a computer to check
your answer. The row reduction is quite short, because the matrix is sparse (has
lots of zeros).]
4. In the long run, what proportion of the cars will end up in Rexburg?
R R
5. Because the system A = had a nonzero solution, we know
I I
something about the eigenvalues of the matrix A. What is an eigenvalue
of A?
(We’ll answer 4 and 5 in class if you are unable. The key parts are 1-3.)
The matrix A found above is called a transition matrix. It’s the matrix
which tells you how to move from the current state ~xn to the next state ~xn+1 .
This means we have
~x1 = A~x0
~x2 = A~x1 = A(A~x0 ) = A2 ~x0
~x3 = A~x2 = A(A~x1 ) = · · · = A3 ~x0
~x4 = A~x3 = A(A~x2 ) = · · · = A4 ~x0
..
.
You can find the nth state by computing ~xn = An ~x0 , just raise the matrix to a
power, and times by the initial state. Let’s use this idea once more.
Problem 3.12 In a certain town, there are 3 types of land zones: residential,
commercial, and industrial. The city has been undergoing growth recently, and
the city has noticed the following 5 year trends.
• Every 5 years, they’ve notice that 10% of the residential land gets rezoned
as commercial land, while 5% of the residential land gets rezoned as
industrial. The other 85% of residential land remains residential.
• For commercial land, 70% remains commercial, while 10% becomes resi-
dential and 20% becomes industrial.
• For industrial land, 60% remains industrial, while 25% becomes commercial
and 15% becomes residential.
• Currently the percent of land in each zone is 40% residential, 30% com-
mercial, and 30% industrial.
Let’s assume that these trends continue over an extended period of time.
1. The current state is ~x0 = (40, 30, 30). After 5 years, what percentage of
land will be zoned residential? Commercial? Industrial? Answering this
question should give you the transition matrix A so that ~x1 = A~x0 .
2. Use software to find ~x2 , ~x3 , and ~x4 (the land use percentages after 10, 15,
and 20 years).
3. Find the steady state solution to this Markov Process by solving A~x = 1~x
(i.e., the eigenvector corresponding to the eigenvalue λ = 1.)
• The farming community keeps 1/2 of their goods, giving 1/4 to manufac-
turing and 1/4 to clothing.
• The manufacturing community keeps 1/3 of their goods, giving 1/3 to
farming and 1/3 to clothing.
• The clothing community keeps 1/4 of their goods, giving 1/2 to farming
and 1/4 to manufacturing.
Answer the following questions.
1. Suppose that all the commodities have the exact same value. If each
group starts out with 12 units of their commodity, then after 1 round
of bartering, how many units will each group have?
Along the way you
12
should produce a transition matrix A so that A 12 gives the answer.
12
2. Let x1 be the value of the goods produced by farming. Let x2 be the value
of the goods produced by manufacturing. Let x3 be the value of the goods
produced by clothing. We would like to assign a value to each commodity
so that each group gets a fair deal when they barter. To do this, we need
to have the value of goods obtained after bartering to match the value of
the goods obtained before. Explain why we can obtain this by solving the
equations 1 1 1
2 3 2 x1 x1
1 1 1 x2 = x2 .
4 3 4
1 1 1 x3 x3
4 3 4
Then solve this equation.
3. (We’ll answer this one in class. Try to come up with an answer yourself.)
If the value of commodities from each group is the same, who is getting the
better deal? To make sure bartering results in a fair deal for all, should
farming commodities be more expensive, or less expensive than the others?
In the next problem, you’ll provide a proof of Cramer’s rule in 2D. Your
proof will contain the key idea needed to prove the theorem in all dimensions.
The key idea is to connect determinants to areas of parallelograms.
Problem 3.15: Proof of Cramer’s Rule Let ~v1 = (2, −2) and ~v2 = (1, 2).
Let x1 = −3 and x2 = −2, which means that ~b = x1~v1 + x2~v2 = (−8, 2). In the
picture below, the solid red vector is ~v1 , the solid blue vector is ~v2 , and the solid
black vector is ~b. Use the picture below, to answer the following questions.
10
-10 -5 5 10
-5
-10
[Hint: Each question can be answered by thinking about determinants as areas.]
1. Explain why x1 v~1 ~v2 = x1 v~1 ~v2 . Then explain why x1 v~1 ~v2 =
~
b1 ~v2 . Finally, solve for x1 to show
b1 a12
D1 b2 a22
x1 = = .
D a11 a12
a21 a22
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 41
Cramer’s rule is most useful when the coefficients in the linear system are
variables, rather than numbers. Let’s apply our knowledge to study the arms race
(the building of armies - tanks, bombs, soldiers, etc. - between two countries).
Consider two countries, country A and country B. As country B builds up
their military, country A looks on and says “Hmm, we better build up our
military.” Similarly, as country A builds up their military, country B looks and
says, “Hmm, we better build up our military.” If country A has a grudge against
country B, they will probably build up their military regardless of what country
B does. Similarly, any past grievances and grudges that country B has against
country A will increase the rate at which country B builds up their military.
Building up a military costs money, so hopefully both countries have economic
limitations that restrict the growth of their military. The real question behind
the arms race is, “Will the two countries eventually decide they are spending
enough on their military, or will their spending continue to grow without bound.”
We now develop a system of differential equations that describes the above.
The key principle is a general law of conservation:
The change in a quantity equals the flow in of the quantity minus
the flow out of the quantity, or more simply
Change = (Flow in) - (Flow out)
Change = (Increase) - (Decrease)
• Let x represent the dollar amount per year that country A spends on
arms. Let y represent the dollar amount per year that country B spends
on arms.
• When y is large, country A will respond by increasing their spending. We’ll
assume this change is proportional to y, so we see that x increases by an
amount ay. Similarly, when x is large, country B responds by increasing
their spending. Let’s assume that y increases by an amount mx.
• The economy of each country tries to slow down the growth rate. The
more money country A spends, the larger the effect of the economy. We’ll
assume that x decreases by an amount bx. Similarly, we’ll assume y
decrease by an amount ny.
• If the countries hold grudges against each other for past grievances, then
they are inclined to increase their spending regardless of economic factors
and the growth of the other country’s army. Let c represent the amount
that country A will increase their spending by, and let p represent the
amount that country B will increase their spending by. These values might
be zero (for example the US and Canada do not hold such grudges), but
might not be zero at all (as was the cases during the cold war, between
the US and USSR).
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 42
Problem 3.17 Read the arms race information above, and then answer the
following questions.
1. There are three things causing x to change. The flow in (parts causing an
increase) are ay and c, the response to the other country, and any grudges.
The flow out (parts causing a decrease) is only bx, the economic restriction.
We can write this as a differential equation
dx
= ay − bx + c.
dt
dy
Obtain a similar equation for (using the coefficients m, n, and p). Then
dt
write your system of ODEs in the form
0
x −b a x c
= + .
y0 ? ? y ?
Problem 3.20 Solve the following. [Hint: Because the problem involves
variable points, Cramer’s rule will be much faster than row reduction.]
1. Find the intercept a0 and slope a1 of a line y = a0 + a1 x that passes
through the points (x1 , y1 ) and (x2 , y2 ).
2. Find the coefficients a0 , a1 , and a2 of a parabola y = a0 + a1 x1 + a2 x2
that passes through the points (x1 , y1 ), (x2 , y2 ), and (x3 , y3 ).
Under what conditions will your solutions above not be valid?
Problem 3.21 Suppose that we collect the 6 data points (1, 1), (2, 3), (−1, 2),
(0, −1), (−2, 0), (3, 1). We would like to find a polynomial that passes through
all 6 points. State the degree n of this polynomial. Then find the coefficients
a0 , a1 , . . . , an of this polynomial. Please use technology to do your row reduction.
When you present in class, show us the matrix you entered into a computer,
and then show us the reduced row echelon form together with the polynomial.
increased, the price dropped). Using this data I was able to create a line to
predict the price of a car. I then used this data to talk the dealer into dropping
the price of their car by over $1000. Finding an equation of this line, called
the least squares regression line, is the content of this section. In other words,
if you have 3 or more points, how do you find a line that is closest to passing
through these points? The least squares regression line is used to find trends in
many branches of science, in addition to haggling for lower prices when buying
a car. Statistics builds upon this idea to provide powerful tools for predicting
the future.
Problem 3.22 Consider the three points (2, 4), (0, 1), and (3, 5). We wish
to find a line y = a0 + a1 x that fits this data.
1. What 3 equations do the points and line give. Write the linear system as
a matrix equation by filling in A and ~b below:
1 2 4
A~x = ~b or ? ? a0 = ? .
a1
? ? ?
The previous problem suggests the following theorem. One proof of this
theorem involves projecting ~b onto the plane spanned by the columns of A.
This proof leads to the ideas behind inner product spaces, the Graham Schmidt
orthogonalization process, and more, something you would study near the end
of math 341 (Linear Algebra).
Theorem 3.4 (Least Squares Regression). When we collect n data points
and notice the points follow a linear trend, the coefficients of the least square
regression line y = a0 + a1 x are the solutions to the equation AT A~x = AT ~b,
where we have
1 x1 y1
1 x2 y2
a ~ 1 1 ··· 1
~x = 0 , A = . , b = . , and AT = .
. x1 x2 · · · xn
a1 .. .. ..
1 xn yn
Problem 3.23 Suppose you collect the n data points (x1 , y1 ), (x2 , y2 ), . . .,
(xn , yn ), and you wish to find the least squares regression line y = a0 + a1 x. Set
up the matrices A, ~x, ~b, and AT P. Multiply
P together and AT ~b (your result
AT AP
x2i ). Then solve the
P
should involve sums of the form xi , yi , xi yi , and
T T~
equation A A~x = A b and state the coefficients a0 and a1 . leas[Hint: Since the
system involves variable coefficients, try using Cramer’s rule. It will kick out
the solution almost instantly.]
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 45
Problem 3.24 Consider the 5 points (−2, 3), (−1, 1), (0, −1), (1, 2), (2, 4),
and . We would like to find an equation of a parabola y = a0 + a1 x + a2 x2 that
approximates the trend in the data, using the least square regression model.
1. The 5 data points produce 5 equations in the three unknowns a0 , a1 , a2 .
Write the linear system as a matrix equation by filling in A and ~b below:
1 −2 4 3
? ? ? a0 ?
A~x = ~b
or ? ? ? a1 = ? .
? ? ? a2 ?
? ? ? ?
The next problem has the exact same solution as Problem 3.23, but does
not require you to use a matrix transpose, nor matrix multiplication. Instead,
it focuses on setting partial derivative equal to zero, which is the first step in
locating minimums. You then just have to solve a system of linear equations.
Problem 3.25 Suppose you collect the n data points (x1 , y1 ), (x2 , y2 ), . . .,
(xn , yn ), and you wish to find the least squares regression line y = a0 + a1 x.
Each point (xi , yi ) produces an error y − yi = (a0 + a1 xi ) − yi . The least squares
regression line is the line that minimized the sum of the squares of these errors,
which means we need to minimize
n
X 2
f (a0 , a1 ) = ((a0 + a1 xi ) − yi ) .
i=1
∂f ∂f
1. Compute and .
∂a0 ∂a1
∂f ∂f
2. Since we seek the minimum of f , solve the system = 0 and =0
∂a0 ∂a1
for a0 and a1 .
[Hint: Once you get each equation written in the form (?)a0 + (?)a1 =?, use
Cramer’s rule to kick out the answer almost instantly.]
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 46
for unknown constants A and B. Multiply both sides of the above equation
by the denominator (x − 2)(x − 5). Then solve for the constants A and B (try
plugging in some numbers to get a system of equations). Then compute
Z Z Z
2x + 1 A B
dx = dx + dx.
(x − 2)(x − 5) x−2 x−5
[Hint: Two lines are the same if and only if they have the same slope an
intercept. You should have an equation that says two lines are equal, so equate
the coefficients. Alternately, just pick two x values, plug them in, and you
should get two different equations relating A and B.]
2x − 3 Ax + B C A B C
f (x) = = + = + 2+ .
x2 (x− 3) x 2 x−3 x x x−3
Multiply both sides by the denominator x2 (x − 3), and then solve for the
constants A, B, and C (show us the matrix you row reduced, and the rref).
Then compute the integral of f (x). [Hint: To get three equations, you can (1)
equate the coefficients, or (2) pick 3 x values and plug them into the equation.]
x2 − 2 Ax + B C
f (x) = = 2 + .
(x2 + 4)(x + 1) x +4 x+1
Multiply both sides by (x2 + 4)(x + 1) and then solve for the constants A, B,
and C (show us the matrix you row reduced, and the rref). Then compute the
integral of f (x) (you’ll need a u-sub for one of the integrals). You’ll probably
want to split the numerator up, and then integrate three parts, instead two, as
we can write
Ax B C
f (x) = 2 + + .
x + 4 x2 + 4 x + 1
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 47
1 3 4
Problem 3.32 Suppose that A = −2 0 −2, and consider the function
0 1 1
f~x = A~x.
1. What are f (1, 0, 0), f (0, 1, 0), f (0, 0, 1), and f (2, 3, 0)? What is f (x, y, z)?
Make sure you ask me in class to visually show you a representation of the
linear functions above. There’s a ton more that we could study about linear
functions, and I’d like to introduce to you some of those ideas.
Matrices provide us with the key examples to understanding linear trans-
formations. However, a matrix by nature requires that we look at functions
between finite dimensional spaces. The key linear transformations we will study
throughout the semester will involve infinite dimensional spaces (like the space
of all differentiable functions). Most of the ideas we have learned will still
be useful to us as we explore functions between infinite dimensional vector
spaces. Near the end of the semester, we’ll even start discussing eigenvalues and
eigenfunctions of linear transformations. You’ll then explore these concepts in
greater detail in many of your future classes.
We now make one final definition as we wrap up this chapter. We want
a word that quickly tells us which vectors are mapped to zero. We’ll be
using this vocabulary often as we solve differential equations. In each of the
previous two problems, the last portion asked you to find the kernel of the linear
transformation.
Definition 3.6: Kernel. The kernel of a linear function f is the collection of
vectors that are mapped to zero, i.e. f (~x) = ~0.
Once you have a collection of vectors in the kernel of a linear function, you
can use those vectors to obtain lots of other vectors. Any linear combination of
vectors in the kernel will remain in the kernel. The next problem asks you to
show why.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 49
Problem 3.33 Suppose that ~x and ~y are both in the kernel of a linear
function f . Show that any linear combination of ~x and ~y are also in the kernel of
f . [Hint: What is f (~x), f (~y ), and then what is f (a~x + b~y )? Be able to explain
every step in your work, by telling us what definition you are using.]
The previous problem shows us that the kernel is closed under linear com-
binations. You can’t get out of the kernel by performing linear combinations
of things that are in the kernel. We now end this chapter with an example
to illustrate how we will use the words “linear” and “kernel” throughout the
semester. Most of the remainder of this course deals with finding the kernel of a
linear function.
Problem 3.34 Consider the differential equation y 0 − 3y = 0. Let L be
the operator L(y) = y 0 − 3y. With the operator notation, we can rewrite the
differential equation as L(y) = 0 (so we need to find the kernel of L).
1. What is the domain of L?
2. Show that L is a linear operator by computing L(y1 + y2 ) and L(cy).
3. Solve the differential equation y 0 − 3y = 0 by using separation of variables.
4. Obtain a single solution (no unknown constants) to the ODE.
5. Using the single solution, can you obtain all solutions as a linear combina-
tion of the single solution?
3.7 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 4
50
CHAPTER 4. FIRST ORDER ODES 51
This next problem has you practice with the vocabulary above. You’ll want
to use separation of variables to solve this problem.
One of the key uses of differential equations is their ability to model the
world around us. If something is changing, then we can often use y 0 to represent
that change. If we know a force is acting on an object, then F = ma = my 00
allows us to build a differential equation that models the motion of the object.
As the semester progresses, we’ll be making these connections in each chapter,
and showing how to use differential equations to model the world. We’ll also see
that eigenvalues and eigenvectors are the connecting piece that allows us to see,
and obtain, the solution to differential equations. Many of the models we build
will depend on observing that a change is proportional to something, or that a
force is proportional to something. If you’ve forgotten what proportional means,
here’s a definition.
Definition 4.3: Proportional. We say that y is proportional to x if y = kx
for some constant k. We call the constant k the proportionality constant. When
two quantities are proportional, then doubling one will double the other, tripling
one will triple the other, and so on. A percentage change to one is matched by
the other.
The next problem has us build our first model. Suppose you go to the
doctor’s office to get a strep test done. They swab the back of your throat and
then put a sample of tissue from your body in a petri dish. If you have strep,
then the bacteria will grow inside the petri dish, and they’ll be able to see the
rapid growth of the strep bacteria in a fairly short amount of time.
Problem 4.3: Exponential Growth Suppose that you place some bacte-
ria in a petri dish. Initially, there are P mg of the bacteria in the dish, and
then the bacteria starts to reproduce, so the amount of the bacteria is changing.
Let y(t) represent the mg of bacteria in the dish after t days. Then y 0 would
represent the rate at which y is changing. The rate at which y grows depends on
how large y is. If you were to double y, then the growth rate y 0 should double
as well. Similarly, if you tripled y, then the growth rate y 0 would triple as well.
It seems reasonable to assume that y 0 is proportional to y.
1. Express the statement “y 0 is proportional to y” as a differential equation.
What are the initial values (if any)?
2. Solve the differential equation above, obtaining a general and particular
solution.
3. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large?
4. If after 10 minutes you measure 5 mg of the bacteria, and then after 20
minutes you measure 8 mg of the bacteria, how much bacteria was present
initially? [If you apply the natural logarithm to both sides of your solution,
then you can solve a linear system of equations to obtain the unknowns
ln P and k. You can then use Cramer’s rule or RREF.]
The next problem is very similar to the previous, we’ll just change the setting
from growth of a bacterial culture, to growth of an investment.
Problem 4.4 Suppose you invest P = $10, 000 dollars in an account, and
that the money accumulates interest at a constant rate. Let A(t) represent the
CHAPTER 4. FIRST ORDER ODES 53
accumulated worth of your investment after the investment has had t years to
grow. No new deposits are made, rather the interest is just left in the account
to accumulate more interest.
1. Why is is reasonable to assume that A0 is proportional to A?
2. Express the connection between A and it’s growth as a differential equation.
What are the initial values (if any)?
3. Solve the differential equation, obtaining a general and particular solution.
4. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large?
5. Suppose after 5 years that the value of the investment has reached $18,000.
How long will it take for the investment to reach $100,000.
Problem 4.5: Newton’s Law of Cooling Suppose that you place an ob-
ject in an oven. The oven temperature is set to A (you can use Fahrenheit, Celsius,
or Kelvin). I’m using A as the temperature of the surrounding “a”tmosphere.
The object’s initial temperature is T0 . Let T (t) represent the temperature of the
object t minutes after we place the object in the oven. If T (t) is really close to
A, then the rate at which T increases should be pretty small, as the temperature
of the object is almost the same as the temperature of the atmosphere. If T is
really far from A, then the rate of temperature change should be a lot larger.
Hence, it appears that T 0 depends on the difference A − T . Newton conjectured
that the rate at which the temperature changes is proportional to the difference
A − T.
1. Express the statement “the rate at which the temperature changes is
proportional to the difference A − T ” as a differential equation. What are
the initial values (if any)?
2. Solve the differential equation above, obtaining a general and particular
solution.
3. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large? Does this seem reasonable.
CHAPTER 4. FIRST ORDER ODES 54
Problem 4.6 You should have obtained the solution to Newton’s law of
Cooling as
T (t) = A + (T0 − A)e−kt ,
where k is the proportionality constant. Suppose that T0 = 45◦ F and A = 350◦ F.
1. After 5 minutes, you check the temperature and observe T (5) = 80◦ F.
What is k, and how long will it take for the object to reach 165◦ F.
2. After 5 minutes, you check the temperature and observe T (5) = 120◦ F.
What is k, and how long will it take for the object to reach 165◦ F.
3. The number k depends on the material you are trying to heat. If k is
large, what does that mean about the material? Think of some examples
where k would be large, and where k would be small.
You’ve now seen a few examples of how differential equations are used to
model the world around us. You will most likely find that in your future
courses, you’ll be taking real world phenomenon and expressing the relationships
you see as differential equations. Solving those differential equations gives us
mathematical models we can use to interpret the world around us. There are
three parts to this process.
• Express real world phenomenon in terms of a differential equation.
• Solve the differential equation.
• Interpret the solution in the context of the problem, which often involves
using the results to predict behavior.
A main focus in this class will be the second portion, “Solve.” As we all come
from a different background, we won’t have time to develop the background
material that you’ll explore in your respective majors, so the “Express” portion
will often come in your major courses. You may find in some future courses that
they focus on the “Express” and “Interpret” portions, and then refer you to
some standard reference for the “Solve” part. The goal of our course is to help
you develop the key solution techniques. Along the way, we’ll occasionally add
some simpler problems that we can “Express” and “Interpret” without needing
a lot of background.
• If a differential form is the differential of a function f , then we say the A differential form is exact
differential form is exact (just as we say a vector field is a gradient field). precisely when the corresponding
The function f is called a potential for the differential form. Let me vector field is a gradient field.
reiterate. We say a differential form M dx + N dy is exact if and only if
there exists a function f such that
df = M dx + N dy.
The next problem provides the key idea need to solve almost every differential
equation we’ll encounter in this course. If you can rewrite the differential equation
in differential form, and the differential is exact, then solving the ODE requires
that you find a potential.
M dx + N dy = 0.
What’s the angle between the vectors (M, N ) and (dx, dy)?
I’m trying to decide on a good name for the next theorem. We’ll see that
this theorem is crucial to solving just about EVERY differential equation we
encounter from here on out, and it also solves all the ones before now. The name
below might change, but something along the lines of “the sledgehammer,” or
“one tool to rule them all” would work. The theorem has no official name, so we
can make one up as we go. Basically, we’ll show that we can reduce almost every
ODE that we solve to a form which allows us to apply the following theorem.
Theorem 4.5 (The sledgehammer for ODEs - one tool to rule them all).
Suppose that M dx + N dy is an exact differential form with potential f (x, y).
If we can write an ordinary differential equation in the form M dx + N dy = 0,
then an implicit general solution to the ODE is f (x, y) = c. The level curves of
a potential are precisely the solutions to the ODE. Let me repeat that. The level
curves of a potential are precisely the solutions to the ODE.
Let’s use the previous theorem now to solve a couple of ODEs.
Problem 4.8 Give a general solution to each of the following ODEs. You
may give your solution implicitly, so don’t worry about solving for y. [Hint: Use
the previous theorem.]
1. (4x + 2y)dx + (2x + y)dy = 0
Problem 4.9 Consider the ODE y 0 = −3y which we can write in differential
as 3ydx + 1dy = 0.
1. Show that 3ydx + 1dy is not exact. Then use separation of variables to
solve the ODE.
Problem 4.10 Let M (x, y)dx + N (x, y)dy be a differential form. For sim-
plicity, we just write M dx + N dy. Suppose F (x, y) is an integrating factor.
1. To be exact, explain why we must have
∂F ∂M ∂F ∂N
M +F = N +F
∂y ∂y ∂x ∂x
[In class, you may omit the last part in your presentation, as it’s almost an
exact replica of the 2nd part.]
CHAPTER 4. FIRST ORDER ODES 57
The problem above gives us a way of finding integrating factors for many
differential equations. It will not give an integrating factor for EVERY differential
equation, but it will provide an integrating factor for almost all the ODEs we
tackle in this course. Let’s now try using this technique on a problem we’ve
already solved.
3. Multiply both sides by the integrating factor, and then solve the ODE by
applying the sledgehammer theorem.
2. (Solve) Obtain a general solution to the ODE, and then use the initial
value to obtain a particular solution.
3. (Interpret) Construct a graph of your solution. As t increases, what
happens to the salt content? Does your answer seem reasonable?
CHAPTER 4. FIRST ORDER ODES 58
The mixing model problem above, as well as the exponential model and
Newton’s law of cooling, all belong to a special class of ODEs which we call
linear ODEs.
Definition 4.7: Linear ODE. If we can write an ODE in the form y 0 +p(x)y =
q(x), then we say that the ODE is linear. This is precisely because the operator
L(y) = y 0 + a(x)y is a linear operator. If q(x) = 0, then we say the linear ODE
is homogeneous. Otherwise, we say the linear ODE is non homogeneous.
The next problem provides a way to obtain a solution to EVERY linear ODE.
Practice until you can develop this formula quickly, and then you’ll have the
key concepts needed for solving just about every ODE we encounter throughout
the semester.
Problem 4.14: A Linear ODE Solution Consider the linear ODE y 0 +
p(x)y = q(x), where p and q are differentiable functions of x on some interval.
Find an appropriate integrating factor, and then find a potential. Finish by
solving for y to show that on this interval, a general solution is
R R
Z R
y(x) = e− p(x)dx C + e− p(x)dx e p(x)dx q(x) dx,
Let’s tackle a couple more application problems. As you solve them, rather
than use the formula above, practice finding an appropriate integrating factor,
and then find a potential.
Problem 4.15 Suppose a 50 gallon tank contains a solution of fertilizer
which initially contains 10 lbs of fertilizer. We start pumping in 4 gallons per
minute, where the concentration of fertilizer is 1/3 lb per gallon. Assume that
the mixture is evenly spread throughout the entire tank by constant stirring.
The extra At the same time, 4 gallons of the evenly stirred mixture flow through
the outflow valve each minute. Let y(t) represent the lbs of fertilizer in the tank
after t minutes.
1. Express the mixing model as an IVP (give the ODE and the IV).
2. Solve the IVP.
3. Construct a rough graph of your solution. As t increases, what happens
to the salt content? Does your answer seem reasonable?from the
The next problem applies Newton’s law of cooling to examine what happens if
the temperature of the surrounding environment changes. Recall that Newton’s
law of cooling suggests that the rate of change of temperature of an object
is proportional to the difference between the current temperature and the
surrounding atmosphere, which we wrote earlier as
T 0 = k(A − T ).
CHAPTER 4. FIRST ORDER ODES 59
Problem 4.16 Suppose that during a summer day, the temperature outdoors
fluctuates between 70◦ F and 110◦ F. We’ll approximate this with a sine wave. If
we let t = 0 be noon, then we could obtain the temperature A outdoors after t
hours using the formula
2π
A(t) = 20 sin( t) + 90.
24
Suppose that your air conditioner breaks at noon (your house was at 70◦ F at
noon), and then by 6pm in the evening, the temperature had risen to 90◦ F.
1. Express this heating problem as an IVP.
2. Show that the ODE is linear, and then use technology to solve the ODE.
You’ll need to use T (6) = 90 to obtain the proportionality constant k.
3. Graph your solution for 3 days. In the late evenings, which is hotter, the
house or the outdoors?
Problem 4.17 Consider the ODE y 0 = sin(x + y). There is no way that
you’ll get an integrating factor out of this by using our formulas for F (x) and
F (y). The problem is the x + y. We now do a substitution.
1. Write the ODE in the differential form
dx
M N = 0.
dy
3. Show that the ODE can be written in the form (− sin u − 1)dx + du = 0.
Then use either separation of variables (or the sledgehammer) to solve the
ODE. Don’t forget to substitute back in when you’re done.
The last problem introduced the key idea. If you have an ODE in the form
dx
M N = 0,
dy
exact, then we can use the sledge hammer to solve the ODE. The hard part here
is finding the correct transformation. If you can find the correct transformation,
then you can solve the ODE. This is not easy, and in general it can be really
tough.
Problem 4.18 Consider the ODE xyy 0 = 4x2 + 2y 2 . In this situation, if Notice that the coefficients xy,
you let u = y/x (so y = xu), show that you can rewrite the ODE as 4x2 , and 2y 2 , all are basically
second order monomial terms.
u 1 When the coefficients of the ODE
du = dx. are monomials with the same
4 + u2 x degree, the substitution u = y/x
will convert the ODE into a
This is a separable ODE, which we can solve. Solve the ODE. separable ODE. I’ll leave this to
you to prove. You do have the
tools to prove it.
Problem 4.19 Consider the ODE (x + 2y)dx + (3x + 4y)dy = 0. Use the
substitution u = y/x to convert this into a separable ODE and give a general
solution.
We’ll come back to Bernoulli ODEs and see some applications of them after
we review Laplace transforms.
• We call the function y(t) the inverse Laplace transform of F (s), and we
write y(t) = L −1 {Y (s)}.
• As a notational convenience, we describe original functions y(t) using a
lower case y and input variable t or x. We describe transformed functions
Y (s) using the same capital letter and input variable s.
CHAPTER 4. FIRST ORDER ODES 61
We’ve computed quite a few Laplace transforms already. For convenience, I’ve
placed the Laplace transforms we’ll use most often in Table 4.1. Feel free to use
this table as you find Laplace transforms and their inverses. With practice, you
will memorize this table.
We can use this table, and the linearity of the Laplace transform, to quickly
compute both forward transforms and inverse transforms. The next problem
asks you to do this.
2s + 1
Problem 4.22 Find the inverse Laplace transform of F (s) = .
s2 + 5s + 4
[Hint: Use a partial fraction decomposition. Start by factoring the denominator.]
2s + 1 5s + 7
Problem 4.23 Find the inverse Laplace transform of F (s) = + .
s2 + 9 s2 − 9
[Hint: This can all be done using trig and hyperbolic trig functions.]
The real power behind the Laplace transform comes from the last formula
in the table.
Theorem 4.8 (The Laplace Transform of a Derivative). Suppose that y(t) is
y(t)
a differentiable function defined on [0, ∞) such that lim st = 0 for some s.
t→∞ e
We say that y(t) does not grow faster than some exponential, as the function est
CHAPTER 4. FIRST ORDER ODES 62
grows faster that y(t) (otherwise the limit would not be zero). If this is the case,
then the Laplace transform of y 0 is
L {y 0 (t)} = sL {y(t)} − y(0) = sY − y(0).
Problem 4.24 Prove the previous theorem. In other words, show that
L {y 0 (t)} = sL {y(t)} − y(0) = sY − y(0). [Hint, use integration by parts once,
and don’t forget to use the bounds.]
Before illustrating the key value of this theorem, let’s fill in the only remaining
rules in our Laplace transform table that we have not yet developed.
Problem 4.25 In the table of Laplace transforms it also states that the
s ω
transform of cos(wt) is 2 , and that the transform of sin(wt) is 2 .
s + ω2 s + ω2
Pick one of these rules, and then use the definition of the Laplace transform to
explain why it is true. [Hint: You’ll want to use integration by parts twice. See
the online text if you want more hints.]
We’ll now use Theorem 4.8 to solve some ODEs. You’ll see the power behind
this method.
Problem 4.26 Consider the IVP y 0 = 7y, y(0) = A.
1. Apply the Laplace transform to both sides of this ODE. You should have
an equation involving Y (s).
2. Solve for Y .
3. Now find the inverse transform of Y . This is y(t), the solution to the
ODE.
4. We already know how to solve this ODE using either separation of variables,
or by finding an integrating factor. Pick one of these methods and obtain
a general solution.
Did you see the process above? Rather than integrate, we just (1) computed
the Laplace transform of both sides, (2) solved an algebraic equation for Y , and
then (3) obtained the inverse Laplace transform to get Y .
Here’s a parable to compare to using Laplace transforms. You are inside a
house that has a single door leading to the downstairs. You are on the main
floor, and need to get downstairs. The door is locked and you don’t know where
the key is (you can’t figure out how to solve the ODE). You (1) decide to walk
out the front door (you apply the Laplace transform). Then you (2) walk around
the house and find the back door entrance to the basement (you solve for Y , and
maybe apply a partial fraction decomposition). Then (3) you walk up to the
locked door and unlock it from the other side (you find the inverse transform).
The Laplace transform replaces the problem of integrating with an algebraic
problem (often easier to solve). We’ll be using it throughout the semester to
help us see patterns, and unlock difficult problems. It works best when the ODE
is linear.
Problem 4.27 Consider the IVP y 0 + 3y = 5, y(0) = 7. (1) Apply the
Laplace transform to both sides of this ODE to obtain an equation involving
Y = L {y}. (2) Solve for the transformed function Y . You will need to use
A B
a partial fraction decomposition to write Y = + . (3) Use an inverse
s+3 s
transform to obtain the solution y(t).
CHAPTER 4. FIRST ORDER ODES 63
You’ll find that with most Laplace transform problems, we’ll need a partial
fraction decomposition before we can compute an inverse transform. The next
problem has you practice the Laplace transform inversion process to solve
multiple problems that you know the answer to using simple integration.
Problem 4.28 For each problem below, use a Laplace transform to solve
the ODE. Each problem could be solved with simple integration instead. The
point to this problem is to help you see how the Laplace transform gives you, in
a different way, information you already know how to obtain.
1. y 0 = 5t2 + 7t + 3, y(0) = C.
2. y 0 = eat , y(0) = C.
3. y 0 = cosh(3t), y(0) = 2.
4. y 0 = sin(3t), y(0) = 2.
s A
[Hint: You’ll need a partial fraction decomposition to write = +
s(s2 + 9) s
Bx + C
on part 4. You’ll need a similar idea on 2 and 3.]
s2 + 9
Let’s end this section with two more Laplace transform problems, where the
initial conditions are not given.
Problem 4.30 Solve the ODE y 0 +3y = sin(2t) by using a Laplace transform.
See the previous problem for help about what to do when no initial condition is
given.
The Laplace transform works nicely on linear ODEs with constant coefficients. If
we’re missing an initial condition, the algebra gets a little uglier, but still doable.
We’ll be using the Laplace transform to discover solutions to higher order ODEs
as the semester progresses. However, we could have solved every one of the
problems we tackled with Laplace transforms by instead using our sledge hammer
tool (make the ODE exact, through substitutions and/or integrating factors,
and then find a potential). The sledgehammer tool will solve a much larger I’m working on writing a paper to
range of ODEs than the Laplace transform, and near the end of the semester extend the sledgehammer
approach to solve just about every
we’ll see it’s true power in terms of matrices, eigenvalues, and eigenvectors. ODE undergraduates tackle, and
So which method should you use? That depends on how much work you provide a uniform approach to
want to do. The sledgehammer tool will solve EVERY problem we see. If an working with ODEs. I’m just
ODE is separable, it’s generally much faster to just use separation of variables waiting for an interested student
to come and complete the project
(which is really just using an integrating factor). If the ODE is linear, with with me.
constant coefficients, and you have an initial condition, then a Laplace transform
might be faster. If all else fails, make the ODE exact and find a potential.
Problem 4.31 Which method would you use to solve each ODE below? If
you opt for separation of variables, then show us how to separate. If the ODE is
exact, show us how you know. If you decide to find an integrating factor, show
us the integrating factor. If you will use a substitution, what substitution will
you use? If you decide to use Laplace transforms, take the Laplace transform of
both sides. In all cases, don’t solve the ODE, rather just show us the first step
in the solution process.
1. x2 y 0 = 4xy 2 , y(2) = 1.
2. xy 0 = 3y + x, y(2) = 1.
3. y 0 + 8y = ex , y(0) = 1.
4. y 0 + 8y = y 2 , y(0) = 1.
Problem 4.32 Suppose that bacteria grow in a petri dish (if you don’t like
bacteria, then pick something else to put in here that interests you). From
Problem 4.3, we used the model y 0 = ky to express that the rate of growth y 0 is
directly proportional to the size y of the population. We assumed that k was
constant. Here’s where we now make a change. Instead of assuming that k is
constant, let’s assume that as the population gets larger, that the constant k
decreases. In fact, if we let M represent a theoretical maximum population, let’s
assume that k is proportional to the difference between the current population
and this theoretical maximum.
3. (Interpret) Pick some constants for a, M , and the initial size of the
population. Then graph your solution. You should obtain a logistics curve
(please use a computer to check your work).
4.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 5
Homogeneous ODEs
66
CHAPTER 5. HOMOGENEOUS ODES 67
• The second part comes from air resistance. He assumes that the faster the
pebble goes, the greater this force will be. If the pebble’s speed were to
double, then this force should double. So he assumes that the force due to
air resistance FR is proportional to the pebble’s velocity.
Let y(t) represent the height, above ground, of the pebble after t seconds. Use
Joe’s assumptions to answer the following:
CHAPTER 5. HOMOGENEOUS ODES 68
Problem 5.2 Read the preceding paragraph. Then answer the following:
• Draw a picture of a horizontal track. On the left end of the track, put a
wall. Put a on object, like a square block, in the center of your track and
draw a spring that connects the wall to the block.
• Explain why mx00 (t) = −kx(t). We generally just write mx00 = −kx (the
t is assumed).
Hooke’s law is not a perfect model for all springs, but it does a good job for
most, provided the displacement is not too large. If the displacements are too
large, then the spring may deform, which changes the properties of the spring in
all future computations. If you take your car out onto extremely bumpy roads,
and purposefully hit some nasty bumps, you could permanently damage the
shocks. In this case, you would want to replace your springs.
Every linear spring has a spring constant k. This constant has many names,
such as the spring modulus, Young’s modulus, Young’s constant, and more. The
next problem shows you how to obtain the spring constant k.
Problem 5.3 You attach a spring to the ceiling. You attach a mass of 10
kg on the end, and the spring elongates 3 cm.
1. You now attach a mass of 20 kg. How long will the spring elongate?
3. We attach a different spring, and hang the same 10 kg on the end, but this
time the spring elongates 2 cm. Is the spring constant larger or smaller?
4. If a spring has really large modulus, will it be easy or hard to elongate it?
We need one more model before we start solving some ODEs. We’ll use the
exact same spring model as before. Place a horizontal spring whose modulus is
k on a frictionless track. Attach an object whose mass is m to the end of the
spring. We now place the entire mass-spring system underwater. When it was We don’t have to place the spring
exposed to air, we neglected air resistance. Now we’ll have to take resistance underwater to get the same affect.
We could use a dashpot to resist
into account. the motion. One type of dashpot
is a cylindrical tube placed around
Problem 5.4 When we have no resistance, the mass-spring system ODE is a cylindrical object, so that as the
FT = FS , or mx00 = −km. Assume that the liquid applies a resistive force that object moves, it’s sides come in
is proportional to the velocity of the object. If the object is resting, the liquid contact with the dashpot,
doesn’t apply a force. If you double the speed, then the resistive force doubles. resulting in friction that resists
motion. See Wikipedia for more
If you triple the speed, the resistive force triples. Modify the ODE mx00 = −km info.
to account for the resistive force of water.
If we divide each ODE by m, then we can write each ODE in the general form
• Let L(y) = y 00 + 7y 0 + 6y. Show that L is a linear operator. (See the end
of chapter 3 if you need to reread the definition).
• The solutions to the ODE are the solutions to L(y) = 0. In the language of
linear operators, what do we call the set of functions y such that L(y) = 0?
It was another key word near the end of chapter 3. Please look it up. The
set of solutions y is the of L.
To solve second order linear homogeneous ODE, we’ll use the Laplace trans-
form. In the previous chapter, we showed that
Problem 5.6 Show that under suitable conditions, we can compute the
Laplace transform of the second derivative of y by using the formula
We are now ready to solve a second order ODE with Laplace transforms.
4. Find the solution y to this IVP by computing the inverse Laplace transform
of Y .
5. How are solutions to s2 + 3s + 2 = 0 connected to your solution?
2. Compute the Laplace transform of both sides and solve for L (y) = Y .
CHAPTER 5. HOMOGENEOUS ODES 71
In the previous two problems, we had initial conditions. When the initial
conditions are numbers, it made the partial fraction decomposition rather simple.
When the initial conditions are variables, finding the constants in the partial
fraction decomposition was a little trickier. The next problem has you work
through a problem when we have no initial conditions.
y10 = y2
y20 = −20y1 − 9y2 .
0
y1 y
Write the system above in the matrix form = A 1 . Then find the
y2 y2
eigenvalues of A, and use them to obtain a solution to the ODE.
Let’s now tackle a problem where the characteristic equation does not have
real zeros.
Problem 5.12 Consider the ODE y 00 + 16y = 0.
1. Compute the Laplace transform of both sides of the ODE and solve for
L (y) = Y . You’ll have y(0) and y 0 (0) in the numerator of your solution.
2. Compute the inverse Laplace transform of Y . Your answer will involve
y(0) and y 0 (0).
3. What is the characteristic polynomial, and what are its roots?
4. If a mass of 1 kg is attached to spring with modulus 16 kg/s2 on a
frictionless track, then graph the position x(t) at any time t. [What’s the
corresponding ODE? Didn’t you already solve this ODE?]
The previous problem showed us how to tackle a problem where the roots of
the characteristic polynomial are purely imaginary. What do we do if the roots
repeat, or if they are complex of the form a ± bi? The next problem addresses
this.
Problem 5.13 Consider the ODE y 00 + 6y 0 + 9y = 0.
1. What are the zeros of the characteristic equation? From these zeros, guess
a general solution. (It’s OK if you’re wrong.)
2. Compute the Laplace transform of both sides of ODE. Then solve for Y
and show that
A(s + 3) + B A B
Y = 2
= + .
(s + 3) (s + 3) (s + 3)2
3. Compute the inverse Laplace transform of each part that you are able to
compute, and explain why we can’t perform the inverse Laplace transform
of the other parts.
4. Use a computer to complete the inverse Laplace transform, and state the
solution.
CHAPTER 5. HOMOGENEOUS ODES 73
A(s + 2) + B A(s + 2) B
Y = 2 2
= 2 2
+ .
(s + 2) + 3 (s + 2) + 3 (s + 2)2 + 32
s−a
3. Use the fact that L {eat cos(bt)} = and that L {eat sin(bt)} =
(s − a)2 + b2
b
to finish solving. [The next problem will show you where
(s − a)2 + b2
these came from.]
2
sin(2t). If we know the transform is , then the inverse transform is
(s + 3)2 + 4
e−3t sin(2t). However, we would normally have a characteristic polynomial in
the form s2 + 6s + 13, rather than the form (s + 3)2 + 4. Once we complete the
square, we can apply the s-shifting theorem.
Before we get to far, let’s practice the s shifting theorem for Laplace trans-
forms.
Problem: 5.16 and 1/2 Complete the following:
Problem: 5.19 Improved Suppose that we have a second order ODE, and
we have already computed the roots of the characteristic polynomial to be λ1
and λ2 .
1. If λ1 = −3 and λ2 = −5, then y(t) = .
If the roots are real and λ1 6= λ2 , then y(t) = .
2. If λ1 = −3 and λ2 = −3, then y(t) =
If the roots are real and λ1 = λ2 , then y(t) = .
3. If λ1 = −2 + 3i and λ2 = −2 − 3i, then y(t) = .
If the roots are complex where λ = a ± bi, then y(t) = .
4. If λ1 = 5i and λ2 = −5i, then y(t) = .
If the roots are purely imaginary so that λ = bi, then y(t) = .
Have you noticed that every general solution above is a linear combination of
two independent solutions? Recall that we say a differential operator is linear if
L(y1 + y2 ) = L(y1 ) + L(y2 ) and L(cy1 ) = cL(y1 ) for functions y1 and coefficients
c.
CHAPTER 5. HOMOGENEOUS ODES 76
Now that we have a general solution, let’s show how to quickly obtain the
solution to an IVP. The key principle, is to first obtain a general solution.
Differentiate your general solution, and then use your initial conditions to find
the unknown constants.
Make sure you ask me in class to show you how the solution above graphically
changes, if we alter the initial position and initial velocity.
Each of the problems above dealt with undamped motion, there was no
friction to slow down the motion. The remaining problems include a dashpot,
something placed around the mass-spring system that adds friction to the system.
Wikipedia has some excellent pictures of what a dashpot could look like. I like
to think of an old screen door, and the cylindrical tube at the bottom of the
door that helps close the door and prevent it from smashing closed on little
fingers. Ask me in class to show you a dashpot on our classroom door.
Problem 5.27 Recall from the introductory examples that we can model
the position of a spring using the ODE mx00 + cx0 + kx = 0. We now attach a
mass of 1 kg to a spring. The spring is placed inside a dashpot, to add friction
to the system, and the dashpot has a coefficient of friction equal to c = 8 kg/s.
The spring is rather large, so we extend it 1 m and then release it with no initial
velocity.
1. If the spring modulus is k = 15 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.
2. If the spring modulus is k = 16 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.
3. If the spring modulus is k = 17 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.
Problem 5.29 You have a 6th order homogeneous ODE, and the charac-
teristic equation factors as (s2 + 4)(s2 + 9)2 = 0. What is the original ODE
(expand the polynomial)? The roots are ±2i, ±3i, ±3i (so ±3i are repeated
roots). Guess the general solution. Then use a computer to check if your guess
was correct.
5.6 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 6
80
CHAPTER 6. NON HOMOGENEOUS ODES 81
I highly suggest you complete this review problem, and check your answer,
to make sure you are comfortable with how to express infinitely many solutions
in vector form.
Review You want to solve the system A~x = ~b. You row reduced the
augmented matrix and obtain
1 0 −3 4 0 5
0 1 2 1 0 −2
h i rref
A ~b −−−→ 0
.
0 0 0 1 3
0 0 0 0 0 0
1
What is the solution ~x? See for an answer.
If the vector ~b above had been ~b = 0, what would the right most column have
been after row reduction? If you said, “A column of all zeros,” then congrats.
In this case, how would it have affected the solution? If you want a confirmation
that your answer is correct, ask me in class.
x + 2y − 3z = 0
Problem 6.1 Consider the homogeneous linear system 2x + 4y − 6z = 0 .
−x − 2y + 3z = 0
1. Solve this homogeneous system. Show us your rref, and then your solution
(in vector form). For matrix reduction problem, show the rref.
x + 2y − 3z = 4
2. Solve the non homogeneous system 2x + 4y − 6z = 8 .
−x − 2y + 3z = −4
x
−2 1
1 0 1 0
x2
Problem 6.2 Consider the matrix equation −1 3 5 5
x3 = 0 .
2 1 4 −3 0
x4
1. Solve this homogeneous matrix equation. Your answer will involve free
variables.
x
1 0 1 −2 1
−1
x2
2. Now solve −1 3 5 5 x3 = 10 .
2 1 4 −3 1
x4
3. Compare and contrast the two solutions.
1 The free variables are x and x (as these columns don’t have a pivot). The three nonzero
3 4
rows of our matrix are the equations x1 − 3x3 + 4x4 = 5, x2 + 2x3 + x4 = −2, and x5 = 3.
We solve for each variable in terms of the free variable to obtain
x1 = 3x3 − 4x4 + 5 x1 3 −4 5
x2 = −2x3 − 4x4 − 2 x
2 −2
−1 −2
x3 = x3 or in vector form x3 = x3 1 + x4 0 + 0 .
x4 = x4 x
4
0 1 0
x5 = x3 x5 0 0 3
CHAPTER 6. NON HOMOGENEOUS ODES 82
1 0 1
Problem 6.3 Let A = −1 3 5. Consider the linear function defined by
2 1 4
L(~x) = A~x. Let ~b = (−1, 10, 1). We wish to solve the linear equation L(~x) = ~b.
1. Find the kernel (L(~x) = 0) of this linear function. Your answer should
involve a free variable.
2. One solution to L(~x) = ~b is ~x1 = (−1, 3, 0). Give another solution, which
we’ll call ~x2 .
3. One solution to L(~x) = ~b is ~x1 = (−1, 3, 0). Give all solutions. How does
part 1 help?
Problem 6.4 Consider the matrix equation A~x = ~b. Suppose that ~x1 and
~x2 are both solutions to this non homogeneous equation.
1. Why is ~x1 − ~x2 a solution to the homogeneous equation A~x = 0?
2. If ~xp is a single particular solution to A~x = ~b, and we know that all
solutions to A~x = ~0 are given by ~xh , then give all solutions to A~x = b.
3. If we replace A~x with any linear function L(y), does this result still hold?
Look back at the last 4 problems. Do you notice how we solve a few problems
using matrices and noticed a pattern, namely that the solution to A~x = ~b is
simply ~xh + ~xp , where ~xh is the general solution to the homogeneous equation
A~x = ~0, and ~xp is a single solution to the original equation. The last problem
showed that this pattern continued for ANY linear function. So if we can show
something is linear, then the solution follows the same technique.
The next few problems have you practice finding the kernel of a linear
function, by asking you to find eigenvectors. You’ll also see how to use the
eigenvalues and eigenvectors of a matrix to get a solution to a homogeneous
ODE.
Problem 6.5 Consider the ODE L(y) = y 00 + 5y 0 + 6y = 0.
1. Find a general solution yh to the ODE. Is yp = 0 a solution to L(y) = 0?
Problem 6.6 This problem requires you have completed the previous. Con-
sider a horizontal mass-spring system with m = 2, c = 12, and k = 10 (the units
agree). Suppose the spring has been extended 4 units and released from rest.
1. State the IVP that corresponds to this system.
2. Write the second order ODE as a system of first order ODEs (let y1 = y
and y2 = y 0 ). Write the system in the matrix form
0
y1 ? ? y1 y1
= = A .
y20 ? ? y2 y2
3. Find the eigenvalues and eigenvectors of A, and use them to state a general
solution for y and y 0 . Check your answer with this link
to Sage. You can use this link to
4. Use the initial conditions to find c1 and c2 . check your answers for ANY
matrix.
Problem 6.7 Consider the third order ODE y 000 + 7y 00 + 14y 0 + 8y = 0. The
characteristic polynomial factors as (λ + 1)(λ + 2)(λ + 4).
1. If we let y1 = y, y2 = y 0 , and y3 = y 00 , then show how to rewrite this third
order ODE as the linear system
0
y1 0 1 0 y1 y1
y20 = 0 0 1 y2 = A y2 .
y30 −8 −14 −7 y3 y3
2. Compute the eigenvalues (how does the polynomial factor ... look above).
3. For each eigenvalue, give all the eigenvectors (what matrix did you rref,
what is the rref, and how did you obtain the solution). As there are
infinitely many eigenvectors, you’ll probably find the vectors are easiest to
work with if you scale them to get rid of all fractions. Check your answer with this link
to Sage. You can use this link to
4. Use the eigenvalues and eigenvectors to state a general solution for y, y 0 , check your answers for ANY
and y 00 . matrix.
Problem 6.8 Consider the ODE my 00 = −ky 0 − mg from Problem 5.1. This Please use dsolve with
ODE models the position of a pebble (or any other object) as it falls through WolframAlpha to check EVERY
problem you do in this chapter.
the air. With this problem, we assumed that gravity pulls the object down (the Class will go much better if you
−mg term), and that air resistance is proportional to velocity (the −ky 0 terms). do.
1. For the homogeneous ODE my 00 + ky 0 = 0, what are the zeros of the
characteristic polynomial. Give a general solution yh to this homogeneous
ODE.
2. For simplicity, let’s have m = 1, k = 5, and g = −32. Use Laplace See WolframAlpha
transforms to solve the ODE y 00 + 5y 0 = −32 if y(0) = 0 and y 0 (0) = 0.
What part of your solution is not a term in yh ?
3. Now use Laplace transforms to solve the ODE y 00 + 5y 0 = −32 if y(0) = h See WolframAlpha
and y 0 (0) = v. Again what part of your solution is not a term in yh ?
For our mass spring systems in the last chapter, we assumed they were placed
the system horizontally so that we could ignore the force due to gravity. Let’s
now hang the mass-spring system vertically.
Problem 6.9 Consider a vertical mass-spring system inside a dashpot. The
object’s mass is m kg. The dashpot applied a frictional force proportional to
the velocity and has a coefficient of friction equal to c kg/s. The spring constant
is k kg/s2 .
1. Use Newton’s second law of motion to explain why my 00 = −cy 0 − ky − mg,
or my 00 + cy 0 + ky = −mg.
2. For simplicity, suppose m = 1 kg, c = 5 kg/s, and k = 4 kg/s2 . Give the
solution yh to the homogeneous ODE y 00 + 5y 0 + 4y = 0.
3. Using the same conditions, use Laplace transforms to solve the non homo- See WolframAlpha
geneous ODE y 00 + 5y 0 + 4y = −32. [You might want to use y(0) = h and
y 0 (0) = v, but remember they are arbitrary.]
4. As t → ∞, what happens to y(t)?
1
Review Find the inverse Laplace transform of . See 3 for an answer.
s(s2 + 9)
y = c1 e−4t + c2 e−t + At + B,
3. Since c1 and c2 are arbitrary constants, let them be zero. This means
a particular solution to our ODE is yp = At + B. Substitute yp =
At + B, yp0 = A and yp00 = 0 into the ODE y 00 + 5y 0 + 4y = 3t to get
0 + 5(A) + 4(At + B) = 3t + 0. Use this to find A and B.
4. We now have yh and yp . State a general solution to the ODE. See WolframAlpha
5. If r(t) = 7t3 − 4t, make a guess as to what form yp would take. Use dsolve See WolframAlpha
to check if you are correct.
Did you notice that if the external force is a polynomial, then a particular
solution yp is a polynomial of the same degree?
CHAPTER 6. NON HOMOGENEOUS ODES 86
4. If r(t) = sin(7t), make a guess as to what form yp would take. Use dsolve
to check if you are correct.
Did you notice that if the external force is a trig function, then a particular
solution will be a linear combination of trig functions?
Let’s look at one more, but this time let’s have r(t) involve exponentials.
Something different happens when r(t) is actually part of the kernel of L.
4. If r(t) = e−2t , make a guess as to what form yp would take. Use dsolve to
check if you are correct.
5. If r(t) = e−4t , make a guess as to what form yp would take. Use dsolve to
check if you are correct. You should notice that this answer is different
than the others. What makes it different? Why do you think this difference
occurred?
CHAPTER 6. NON HOMOGENEOUS ODES 87
Did you notice that when the external force is an exponential, then a
particular solution is an exponential. Also, did you notice that if the external
force matched the solutions to the homogeneous solution, then our particular
solution was multiplied by t?
The previous three problems developed some key ideas we need to expand.
Whenever we need to solve an ODE of the form L(y) = r(t), we have a few
things to consider.
• First, we need to get the solution yh to the homogeneous ODE L(y) = 0.
This is just the kernel of the linear function L.
• Then we need to find a particular solution yp to L(y) = r(t). The previous
3 problems suggested that we can guess a form for yp (based off r), and
then use our guess to determine the value of any coefficients.
• The last problem suggested that if r(t) is actually part of the homogeneous
solution, then we have to modify our guess slightly (multiply by t) to get
yp .
We need to make sure this pattern works on more problems. Here’s where
software comes in handy. We can use dsolve with WolframAlpha to kick out
solutions to ODEs really fast. What we need is to practice guessing a particular
solution with lots of ODEs, and make sure we build up the right patterns. Then,
we can start tackling every non homogeneous ODE in a consistent, fast, clean,
way. The next problem asks you to do this. Here’s a pattern of what I expect.
• For the ODE y 00 + 5y 0 + 6y = t + e−7t , the characteristic equation is
λ2 + 5y + 6 = (λ + 2)(λ + 3) = 0. This gives yh = c1 e−2t + c2 e−3t . Since
r(t) = t + e−7t , I’m going to guess yp = (At + B) + (Ce−7t ). I’m guessing
this because the Laplace transforms of t and e−7t would put s12 and s+7 1
Problem 6.15 For each problem below, (1) state yh , (2) make a guess for
yp (your guess will involve undetermined coefficients), and then (3) check your
answer using software (giving the value of any coefficients in your guess). If
your guess was wrong, please tell us your original guess, and why it was wrong.
CHAPTER 6. NON HOMOGENEOUS ODES 88
Problem 6.16 Suppose that L(y) = r(t) is a 2nd order constant coefficient
ODE.
1. If r(t) is in the table below, what would you guess for yp ?
keat
ktn
k cos(ωt)
k sin(ωt)
keat cos(ωt)
keat sin(ωt)
2. If r(t) involves a sum of terms in the table above, what do you guess for
yp ? (So if r(t) = 7 cos(2t) − 3 sin(2t) + 8e3t cos(2t), then yp =?)
3. If part of your guess is in the kernel of L, how should you modify your
guess? (So if yh involves c1 e−3t , and r(t) = 7e−3t + t3 , then yp =?)
The ideas above work with higher order ODEs as well. Let’s try this on a
5th order ODE.
Problem 6.17 Suppose we have a constant coefficient linear differential
equation of the form L(y) = r(t). It’s a 5th order ODE, and the characteristic
equation has zeros 2, −3, −3, −4 + 5i, −4 − 5i.
1. What do you guess for yp if r(t) = 3e−2t − 7e2t + 5e−3t + cos(5t) −
12e−4t sin(5t).
2. Use software to expand (λ − 2)(λ + 3)2 (λ − (−4 + 5i))(λ − (−4 − 5i)), and
then state a 5th order ODE that would have this characteristic polynomial.
3. Use software to check if your guess is correct. WolframAlpha won’t solve
this one, so please use Mathematica or Maple to solve it, and check if your
guess is correct. We’ll open up Mathematica in class and solve this.
At this point, we’ve got the basic idea to solve L(y) = r(t), provided L is
a constant coefficient linear operator. We find yh , and then guess a particular
solution yp , with undetermined coefficients. We then take a couple derivatives to
figure out the unknown constants. This is called “The Method of Undetermined
Coefficients.” Here’s a few observations:
CHAPTER 6. NON HOMOGENEOUS ODES 89
• We could just solve all the ODEs using Laplace transforms. The problem
is that if we need a general solution, the solution might get ugly really
fast. Laplace transforms work best when we have initial conditions.
• If we have initial conditions, maybe we should just do a Laplace transform
flat out. No guessing is needed. We’ll have to decide which is faster.
• These ideas work on higher order ODEs, in the exact same way they work
on second order ODEs.
6.3 Applications
At this point, we need to practice the method of undetermined coefficients.
Rather than just solve a bunch of ODEs with no application, let’s connect each
one to a physical problem.
Problem 6.18 Consider a vertical mass spring system with m = 1 kg, c = 5
kg/s, and k = 6 kg/s2 . Let’s assume g = −10 m/s2 (it makes the arithmetic
simpler). The 1 kg object is a magnetic brick. We turn on an electromagnet
underneath the brick, and then slowly ramp up the force of the magnet be 2t N.
When the magnet was turned on, the brick was motionless. How far has the
bricked dropped after t seconds.
1. Solve the ODE y 00 + 5y 0 + 6y = −10. Use this to state how much the brick
gets elongated by the magnet. See WolframAlpha
2. Solve the IVP y 00 + 5y 0 + 6y = −10 − 2t, where y(0) is the position from
the first part, and y 0 (0) = 0. See WolframAlpha
Problem 6.19 Solve the following IVPs. (This problem originally had some
other stuff at the beginning, but it all got changed - this is where my migraine
hit from dehydration.)
1. Assume r(t) = 20e−t . Solve the IVP y 00 + 5y 0 + 6y = 20e−t , y(0) = 0,
y 0 (0) = 0.
2. Assume r(t) = 20e−2t . Solve the IVP y 00 + 5y 0 + 6y = 20e−2t , y(0) = 0,
y 0 (0) = 0.
3. Check both your answers with Wolfram Alpha. You may have to expand
WolframAlpha’s solution to get it to match yours. See WolframAlpha
Problem 6.20 We build a rocket and attach an engine. In free fall, we Most rocket engines have a three
already know the ODE which models the motion is my 00 + ky 0 = −mg. The part thrust. The engine first
ramps up (linearly) to some
engine adds an external force r(t) to this system. Because the engine burns constant thrust, stays at that
fuel as it propels upwards, the mass m(t) now depends on time. This gives us constant thrust for a time, and
the ODE m(t)y 00 + ky 0 = −m(t)g + r(t). If we fire the rocket in space, then we then ramps down linearly. We’ll
could neglect the −m(t)g part (but then k would probably also be zero). We revisit this again in the next
chapter, when we have some
need a good model for engine thrust. powerful tools for working with
Let’s fire a toy rocket from the earth’s surface. Suppose m = .2 kg and piecewise defined functions.
k = .6 kg/s. For simplicity, use g = 10m/s2 . Let’s assume the rocket thrust
starts out fast, and drops to zero exponentially. We’ll also assume that the fuel
is extremely light, so that we can assume m(t) is just the constant .2 kg. This
gives us an external force f (t) = aebt for some known constants a and b.
CHAPTER 6. NON HOMOGENEOUS ODES 90
For the next problem, let’s imagine attaching the left end of a spring to a
wheel, and then rotate the wheel. We’ll keep the mass-spring system horizontal,
so we can neglect gravity. Please look at the links to
• LearnersTV or 15
10
to see a picture of such a system. This rotating wheel applies a periodic external 20 40 60 80 100 120 140
-5
force to the mass-spring system. This force is often called a driving force. -10
and k = 4 (with no dashpot). The driving force, r(t), is periodic. Notice the beats. In this example,
1.1, c ≈ 0, and k = 4.
ω = 2, m =p
1. Assume the driving force is r(t) = 7 sin(5t). Solve the IVP y 00 + 4y = Since ω0 = 4/1.1 ≈ 2 = ω, the
solution results in large periodic
7 sin(5t), where y(0) = 0 and y 0 (0) = 0. oscillations. If the oscillations are
too large, they will destroy the
2. Assume m and k are now some p known constant, and the driving force is system.
r(t) = A sin(ωt), where ω =6 k/m. Solve the IVP my 00 + ky = F sin(ωt), 100
where y(0) = 0 and y 0 (0) = 0. [Because the coefficients are variables, you
might want to use Cramer’s rule when solving for any unknown constants.]
50
-50
Problem 6.22 Again, let’s attach a mass-spring system to a wheel. Suppose -100
When friction enters a mass spring system, the homogeneous solution will
always die out over time. The particular solution yp is called “the steady-state”
solution, or “steady periodic solution.” As time moves on, friction will damp
out all oscillation except for the steady-state solution, yp .
4. What would it take to get a really large amplitude for the steady-state
solution (thus destroying the mechanical system)?
L i L
i
E R E R E R
C C
i
An RLC-circuit An RC-circuit An RL-circuit
0
LI + RI + C1 I(t)dt = E(t) RI + C1 I(t)dt = E(t) LI 0 + RI = E(t)
R R
Table 6.1: Typical diagrams of RCL, RC, and RL circuits, and their corre-
sponding ODEs. The first row is an integro-differential equation for the current
I(t). The second row is the ODE for the charge Q on the capacitor. The third
row is the derivative of the first row.
The
R charge Q on a capacitor is related to the current by I(t) = dQ dt , or Q =
I(t)dt.
We’ll be studying RC, RLC, and RL circuits in the next few chapters. Table
6.1 shows the differential equations corresponding to each type of circuit.
In a circuit with one resistor, one inductor, and one capacitor (an RLC
circuit), if the electromotive force is E(t), then Kirchoff’s Voltage law gives the
integro-differential equation
Z
1 1
LI 0 + RI + Q(t) = E(t) or LI 0 + RI + I(t)dt = E(t).
C C
Differentiating both sides removes the integral and gives
1
LI 00 + RI 0 +I(t) = E 0 (t),
C
which is a 2nd order non homogeneous linear differential equation with constant
coefficients. However, the initial conditions are in terms of initial charge Q(0)
and initial current I(0). To solve the differential equation for I, we need I 0 (0,
which you can get from the equation LI 0 (t) + RI(t) + C1 Q(t) = E(t). Problem
14.13 in Schaum’s provides an excellent example that summarizes the solution
technique.
Problem 6.25 Consider an RLC circuit with L = 1/2, R = 2, and C = 2/3.
Let’s plug the circuit into an alternating current power source (like a wall outlet),
which means we might have something like E(t) = 2 cos(3t). Initially, assume
that the current is zero and the charge on the capacitor is zero. We’d like to
find the current at any time t in the circuit.
1. Explain why the current satisfies I 00 + 4I 0 + 3I = −12 sin(3t). Find a
general solution to this ODE. See WolframAlpha
2. We know that I(0) = 0 and Q(0) = 0. Use the equation LI 0 (t) + RI(t) +
1 0
C Q(t) = E(t) to find I (0).
3. Find the current in the wire at any time t by solving the corresponding
IVP. Use the initial conditions you found in the previous part.. See WolframAlpha
4. What is the steady-state current? (Which part of your solution above does
not vanish after sufficient time has passed? This would be the current
flowing through the circuit after the initial conditions have died out.)
CHAPTER 6. NON HOMOGENEOUS ODES 93
1
Problem 6.26 Consider an RLC circuit with L = 1, R = 8, and C = 25 .
Let’s plug the circuit into a 12 V battery, so we have E(t) = 12. Initially, assume
that the current is zero and the charge on the capacitor is zero. We’d like to
find the current at any time t in the circuit.
1. State the IVP whose solution would give the current at any time t. (What’s
the ODE, and what are the initial conditions I(0) and I 0 (0)). [Hint: Use
the equation LI 0 (t) + RI(t) + C1 Q(t) = E(t) to find I 0 (0).]
2. Find the current in the wire at any time t. Check your answer with
WolframAlpha (you’ll want to use y instead of I).
6.4 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 7
Laplace Transforms
s
1 cosh(wt) s > |ω|
eat s>a s2 − ω 2
s−a
ω
y0 sY − y(0) sinh(wt) s > |ω|
s − ω2
2
Table 7.1: Table of Laplace Transforms. Note that the s shifting theorem
L (eat f (t)) = F (s − a) has a positive a in the exponent, while the t shifting
theorem L (f (t − a)u(t − a)) = L (f (t))e−as has a negative a in the exponent.
94
CHAPTER 7. LAPLACE TRANSFORMS 95
You must practice lots of problems to gain a feel for patterns. Many of the
problems in 21-23 are fast. Please take a few minutes every day to just flat out
practice with the basics (kind of like when you were learning the times tables -
they get really fast if you just practice them). When you feel like you have the
basics down, see if you can complete chapters 21 and 22 in less than an hour. If
one stumps you, skip it and come back later.
Once you feel confident, chapters 23 (on convolutions and the heaviside
function) and 24 (solving IVPS) will help you use the Laplace transforms to
solve ODEs. At the end of this chapter are some additional problems to help
you cement your understanding. Table 7.1 summarizes the transforms we use
most often.
7.1 Review
Our real goal in this chapter is to learn how to handle non differentiable changes
in an ODE. We’ll find that Laplace transforms provide us with extremely nice
tools to solve problems of this type. Before we jump in, let’s review how to solve
a couple ODEs with Laplace transforms, and perhaps make some connections
that we haven’t yet made.
3s+8
Review Compute the inverse Laplace transform of Y = (s+1)2 +16 . See 1 .
Problem 7.1 Compute the inverse Laplace transform of We’ve solve inverse transforms
such as this one multiple times. If
5 2s + 3 3s + 1 you need to refresh, please head to
Y = + + . chapters 21 and 22 in Schaum’s,
(s + 3)3 (s + 4)2 + 9 (s + 2)2 − 49 and just practice the problems
where answers are provided.
Use the rules for cosh and sinh to tackle the last terms, rather than doing a
partial fraction decomposition. The goal of this problem is to make sure you
have the s-shifting theorem mastered.
1. Use Laplace transforms to solve the IVP. Write your answer as a linear
combination of e−2t and e−4t .
2. Use Laplace transforms to solve the IVP. Note that we could complete the
square to write s2 + 6s + 8 = (s + 3)2 − 1. Write your answer as a linear
combination of e−3t cosh(t) and e−3t sinh(t).
et + e−t et − e−t
3. Remember that cosh(t) = and sinh(t) = . Use this to
2 2
show how your second solution is really the same as your first.
1 We can rewrite Y as
3(s + 1) − 3 + 8 3(s + 1) 5 4
Y = = + .
(s + 1)2 − 16 (s + 1)2 − 16 (s + 1)2 − 16 4
The inverse Laplace transform is then
5 −t
y(t) = 3e−t cosh(4t) + e sinh(4t).
4
CHAPTER 7. LAPLACE TRANSFORMS 96
The last two problems should have reviewed the main ideas used in solving
Laplace transforms. In addition, I hope you see how useful it is to know the
transforms for cosh ωt and sinh ωt. They can greatly simplify some computations.
In the previous problem, we found the current using the initial conditions
I(0) = 0, I(2) = 0, and I(4) =?. Another way to tackle this problem is to move
our reference frame, letting t = 0 correspond to the beginning of each change.
The computations are often simpler, and we then just have to shift the reference
frame back when we finish the problem.
Problem 7.5 Consider again the same RL circuit with R = 1 ohms and
L = 1 Henry. At time zero, there is no battery in the system. After 2 seconds,
we connect a battery E = 12V to the circuit. Two seconds after connecting
the battery, we disconnect it. Our goal is to determine the current in the wire
exactly 2 second after we disconnect the battery. We’ll solve this problem by
always making t = 0 the start of each IVP.
CHAPTER 7. LAPLACE TRANSFORMS 97
1. During the first two seconds, we need to solve the IVP I 0 + I = 0 where
I(0) = 0. Solve this IVP and use your solution to show that the current
after 2 seconds is I(2) = 0.
2. Between 2 and 4 seconds, we know E = 12. Letting t = 0 correspond to 2
seconds, solve the IVP I 0 + I = 12, I(0) = 0. What is I(2), the current
right when the battery gets removed?
3. When we remove the battery, the ODE is I 0 + I = 0. Let t = 0 correspond
to 4 seconds, and then we know the initial condition I(0) from the last
part. Solve the IVP, and state the current I(2) after 6 seconds.
4. Use piecewise function notation to state the current at any time t. Re-
member to shift your solutions from the 2nd and 3rd part. Your answer
will look like
0
0≤t<2
I(t) = 12 − 12e−(t−2) 2 ≤ t < 4 .
? 4≤t
and we could graph the function E(t) using the figure to the right. We need a
nice clean way to work with piecewise defined external forces. We also need to
become comfortable graphing and working with these kinds of forces.
Definition 7.1: Heaviside or Unit Step Function. We define the Heaviside, In our work, it won’t matter what
or unit step function, to be the function we define u(0) to equal. Here, we
define u(0) = 1, but we could have
( just as easily define u(0) = 0 or
0 t<0 u(0) = 1/2. This last option, the
u(t) = .
1 0≤t 1/2, comes in handy when
working with Fourier series.
We’ll most often shift this function right a units (so we replace t with t − a,
which means we could write
( (
0 t−a<0 0 t<a
u(t − a) = = .
1 0≤t−a 1 a≤t
Why does this function matter. It’s like an on/off function. If you multiply
f (t) by u(t − a), then the function f (t)u(t − a) is zero to the left of a, and is
equal to f (t) after a. If a = 3, then look below for the graph of y = u(t − 3). Mathematica uses the name
“HeavisideTheta” for the Heaviside
function. You’ll see the symbol θ
y = u(t − 3) show up as the name of a function.
Make sure you check your solution by following the link to Sage.
2. Write this function using Heaviside notation. You’ll want to use the idea
that u(t − a) − u(t − b) turns a function on at a and off at b.
CHAPTER 7. LAPLACE TRANSFORMS 99
3. When you think you have the function, use this Sage link to check if you
are correct (you’ll have to type in your function).
Feel free to use Mathematica instead, if you have downloaded and installed
it. Remember that BYU-I students can now install Mathematica on their
personal machines for free. Please head to I-Learn for instructions. You
can then download the Mathematica Technology Introduction, and you’ll
see how to code HeavisideTheta functions in Mathematica.
Did you notice in your work above that it was a lot easier to graph a piecewise
defined function when everything was shifted to the starting point. It’s much
easier to graph f (t − a)u(t − a) than it is to graph f (t)u(t − a). We’ll find that
this remains true as well, when we start applying Laplace transforms.
It’s time to look at the Laplace transform of the Heaviside function. The
next problem is the key to why Laplace transforms work so nicely with piecewise
defined functions. We’ll compute the Laplace transform of both f (t − a)u(t − a)
and f (t)u(t − a). Then we’ll practice on a few problems.
In particular, this means that L {1u(t − a)} = 1s e−as . Then show that
[Hint: Just write down the definition of the Laplace transform. You’ll have to
do a u substitution, but you’ll probably want to use a different variable, like
w. Remember that u(t − a) = 0 if you are below a, which should allow you to
remove u(t − a) from any integral, after updating the bounds.]
Problem 7.11 Compute the inverse Laplace transform of each of the follow-
ing functions.
4 −2s 4 2s + 1 −πs/6 3s + 4
1. e 2. e−2s 3. e 4. e−5s
s3 (s + 5)3 s2 + 9 (s + 2)2 + 16
We are now ready to solve Laplace transform problems with the Heaviside
function. The simplest example is an RL circuit. To get to RC and RLC
circuits, we’ll need to discuss the derivative of the Heaviside function (which
technically doesn’t exist).
CHAPTER 7. LAPLACE TRANSFORMS 100
Use Laplace transforms to predict the current I(t) at any time t. You’ll want to
ignore the e−as terms when you perform any needed partial fraction decomposi-
tions.
1. Solve the IVP if the magnet pulls down with a force of 10 N for 1 second You can solve all of the IVPs in
so that r(t) = −10 + 10u(t − 1)). this problem all at once, if you are
willing to work with symbols. You
2. Solve the IVP if the magnet pulls down with a force of 20 N for 1/2 seconds just have to solve
so that r(t) = −20 + 20u(t − 1/2)). y 00 + 3y 0 + 2y = −
10 10
+ u(t − h).
h h
3. Solve the IVP if the magnet pulls down with a force of 40 N for 1/4 seconds because all the forces are constant,
so that r(t) = −40 + 40u(t − 1/4)). the forward transforms are quite
quick. Let s = 0, 1, 2 to get the
4. Use a computer to graph y(t) for each problem above for 0 ≤ t ≤ 10. On coefficients of any partial fraction
each graph, estimate how far down the spring moves before bouncing back decompositions.
up and coming to rest.
[Hint: If you use the Mathematica introduction, then you can quickly check all
your answers, and see the graphs instantly. Just open the Laplace transform
section, expand the “Springs” section, and then type in your IVP. You’ll see
all the steps involved in solving this by hand, as well as the plot of y(t). The
by-hand solution is not bad at all, but graphing by hand could be.]
(
1
0≤t<h
h
Problem 7.17 Consider the function fh (t) = . This function
0 otherwise
represents a pulse of strength 1/h for h seconds. We would like to examine what
happens to this function as h → 0 (so that we have a really strong pulse held
for almost no time).
CHAPTER 7. LAPLACE TRANSFORMS 102
R∞
1. For h = 1, draw the function f1 (t) for 0 ≤ t ≤ 2 and compute 0
f1 (t)dt.
2. Repeat the previous part if h = 1/2, h = 1/4, and h = 1/10.
u(h) − 0
3. If u(t) is the Heaviside function, then compute both and u(h) at
h
h = 1, 1/2, 1/4, 1/10.
4. What patterns
R ∞do you see? If someone asked you to compute limh→0 fh (t)
and limh→0 0 fh (t)dt, what would you give as answers?
It’s not really a function, because the output is ∞ at a single point. We’ll
require that the Dirac Delta distribution satisfies the integral sifting properties
Z ∞ Z ∞
δ(t − a)dt = 1 and g(t)δ(t − a)dt = g(a).
0 0
When you time a function by the dirac delta and integrate, you eliminate
everything except the function at that single point.
Problem 7.18: L {δ(t − a)} = e−as Prove that the Laplace transform of
the Dirac delta distribution is L {δ(t − a)} = e−as (look at the definition above).
Then consider the IVP y 0 = δ(t − 5), y(0) = 0. Use L {δ(t − a)} = e−as
to solve this IVP and find the function whose derivative is δ(t − 5). Use your
solution to give a function whose derivative is 5δ(t − 3).
From the previous problem, you should have observed that the derivative of
the Heaviside function is the Dirac delta function.
Theorem 7.3. If u(t − a) is the Heaviside function, and δ(t − a) is the Dirac
delta function, then
d
u(t − a) = δ(t − a).
dt
The derivative of a Heaviside is a Dirac delta.
We now have all the tools we need to solve some pretty cool electricity and
mass-spring problems. We couldn’t tackle any capacitors in our problem before
now, because we need have to compute E 0 (t). Now that we have derivatives of
Heavisides, we can compute Laplace transforms.
Problem If you have a beam, and you know there is a distributed load If you have had strength of
on the beam, with a point force applied at another spot on the beam, can you materials, then this problem
connects how you use use
compute the shear stress and the moment at any point in the beam? This is Heaviside and Dirac delta to
exactly the same question as finding the Velocity and position of an object, tackle all the problems in
provided you know the acceleration on the rocket (some external driving force strengths. You can also use this to
turned on/off based on time) and the rocket is hit by hammers, or meteors solve problems in Statics. You can
use it to solve any problem where
(dirac delta) at various points along its path. you have a distributed load (use
Come see me if you’ld like to see this application. We won’t have time to Heavisides to turn it on and off),
discuss this (we lost a day last Friday because so many of you were busy with and a point force (Dirac delta).
other exams).
7.3 Convolutions
We’ve already seen that the Laplace transform of the product f ·g of two functions
is not the product of the Laplace transform of each (L(f g) 6= L(f )L(g)). Is there
some kind of product rule for transforms? This question lead mathematicians to
invent what we now call a convolution. They discovered that the R t Laplace inverse
of H(s) = L(f )L(g) is equal to the quantity h(t) = f ∗ g(t) = 0 f (p)g(t − p)dp.
We call this the convolution of f and g. The last problem of this chapter has
you prove why. The variable p is a dummy variable of integration, and we could
call it anything else (some books use τ , but I find it really hard to distinguish
between t and τ when I’m writing on paper, so I use p instead).
Definition 7.4: Convolutions. If f (t) and g(t) are function, then we define
the convolution of f and g to be
Z t
(f ∗ g)(t) = f (p)g(t − p)dp.
0
Theorem 7.5 (The Convolution Theorem). If f (t) and g(t) have Laplace
transforms F (s) and G(s), then the inverse Laplace transform of F (s)G(s) is
the convolution
L {F (s)G(s)} = (f ∗ g)(t).
This is as close as we get to an inverse product rule for Laplace transforms.
CHAPTER 7. LAPLACE TRANSFORMS 104
4. Compute sin(t) ∗ t.
Problem 7.23 Compute t ∗ e−3t and e−3t ∗ t. Which is easier? What is the
1 1
Laplace inverse of 2 ?
s s+3
Problem 7.25 We’ve been using the modification rule when we have double
complex roots. Use convolutions to find the Laplace inverse of
1 1 1
= 2 .
(s2 + 9)2 s + 9 s2 + 9
1. Laplace both sides, and then use a convolution (no partial fraction decom-
position) to obtain a solution.
2. Laplace both sides, but use a partial fraction decomposition.
3. Obtain the homogeneous solution using the characteristic equation, and
then use the initial conditions to obtain the constants.
We’ll compare your three solutions in class, and discuss why someone would care
about the convolution approach (if you don’t see why it’s so cool as you use it).
If you’d like to know WHY the convolution theorem works, please complete
the next problem. It requires that you can swap the order of integration on a
double integral.
CHAPTER 7. LAPLACE TRANSFORMS 105
Problem 7.27 Prove the convolution theorem (Theorem 7.5). Here are
some hints.
R∞ R∞
• Let F (s) = 0 f (t)e−st dt and then use G(s) = 0 g(w)e−sw dw. (Why
can I use w instead of t?)
• Explain why
Z ∞ Z ∞
F (s)G(s) = f (t)g(w)e−s(t+w) dw dt.
0 0
• Swap the order of integration so that t is inside and p is outside. This will
require that you draw the region of integration in the tp plane.
• Show that
Z ∞ Z p
F (s)G(s) = f (t)g(t − p) dt e−sp dp.
0 0
I Find the Laplace transform of each of the following, and use Mathematica
to check your answer.
1. f (x) = 8e−3x cos 2x − 4e4x sin 5x + 3e7x x5
2s + 1
8. e−7s
(s − 1)2 (s + 1)
1
9. e−4s
(s − 1)(s + 2)(s − 3)
III Use Laplace transforms to find the position y(t) of an object or current
current I(t) in each of the following scenarios. I will give you the constants
m, c, k and the driving force r(t), or I will give you the inductance L,
resistance R, capacitance C, and voltage source E(t), as well as any
relevant initial conditions. Your job is to use Laplace transforms to find
the solution. Use Mathematica to check your solution, and draw the graph
of y(t) or I(t) and the steady-state (steady periodic) solution to see how
the Heaviside and Dirac delta functions affect the graph. The point here
is to see these two new functions affect solutions. I suggest that you do all
of these problems with the computer, so you can quickly see the effects of
a Heaviside function or Dirac delta distribution.
10. m = 1, c = 0, k = 4, r(t) = u(t − 1), y(0) = 1, y 0 (0) = 0
11. m = 1, c = 0, k = 4, r(t) = δ(t − 3), y(0) = 1, y 0 (0) = 0
7.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 8
Power Series
This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.
3. Explain how to use the ratio test to find the radius of convergence of a
power series.
4. Explain the Frobenius method and use it to solve ODEs where x = 0 is a
regular singular point.
5. Be able to classify x = 0 as an ordinary, singular, and/or regular singular
point of an ODE.
6. Define the Gamma function and show how it generalizes the factorial. Be
able to compute the Gamma function at any multiple of 21 .
You’ll find extra practice problems at the end of this chapter. You can use
these to gain practice with the ideas. Handwritten solutions are available online.
Click for solutions.
108
CHAPTER 8. POWER SERIES 109
1. Let’s approximate f (x) using a 4th degree polynomial. Write the polyno-
mial as
P4 (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 ,
where the coefficients a0 , a1 , . . . , a4 are unknown (we’ll discover them in a
bit). Compute the first 4 derivatives of P4 (x) and the first 4 derivatives of
f (x). As there are 5 unknowns, we need 5 equations. Let’s require that f
and P4 , together with their derivatives, match at x = 0. This gives us the
5 equations
f (0) = P4 (0),
f 0 (0) = P40 (0),
f 00 (0) = P400 (0),
f 000 (0) = P4000 (0), and
f 0000 (0) = P40000 (0).
In this chapter, our goal is to solve ODEs where the coefficients are no
longer constant. We’ll learn how to solve a mass-spring problem where the mass
is changing, the spring constant errodes over time, or the friction coefficient
increases as we tighten a dashpot. We’ll also gain the key ideas need to deal
with rocket problems where the mass decreases because fuel burns up. To solve
these problems, we’re going to start approximating functions with polynomials.
We’ll be using really large polynomials. We’ll then solving the problems using
these polynomials. The only catch is that we’ll start using polynomials that are
arbitrarily large. These polynomials are called Taylor polynomials. When we
consider an infinitely long polynomial, we call it a Taylor series, or MacLaurin
series. We’ll get a formal definition in a bit.
Problem 8.2 We already know the solution to the ODE y 0 − y = 0 (see part
1). Let’s find this solution using a series approach. Suppose we write
y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · ,
where the polynomial continues on for as long as we want (why not forever).
We’ll use this polynomial to find a solution.
1. Solve the ODE y 0 −y = 0 by any method you would like. The characteristic
equation might make this really fast.
2. Now consider the series (infinitely long polynomial) above. Compute y 0
by computing the derivative (so y 0 = 0 + a1 + 2a2 x + · · · ). Write out the
first 7 terms or so.
3. Now subtract y from y 0 . You can combine the two infinite sums by adding
coefficients that are multiplied by collecting the coefficients on the same
powers of x. You’ll get an infinitely long sum of the form
The last two problems dealt with the function ex . Let’s now turn our
attention to cos x and sin x.
Problem 8.3 Let f (x) = cos x.
1. Find a 6th degree polynomial to approximate cosine. So let
P (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + a6 x6 .
Now require that f and P have the same values at x = 0, and that the
first 6 derivatives of both f and P have the same values at x = 0. You
might want to organize your work in table (keep track of f , its first 6
derivatives, and their values at x = 0, as well as P , its first 6 derivatives,
and their values at x = 0). What pattern do you see?
2. Guess what the 20th degree polynomial would be.
3. If x = 2, use a calculator to compute cos(2) as well as P (2) for your 6th
degree polynomial. We’ll compute P (2) for your 20th degree polynomial
in class.
y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
y 00 = 2 · 1a2 + 3 · 2a3 x + · · · .
4. Write a2 , a3 , a4 , and so on, in terms of c and d. Can you guess the Taylor
series for sin x?
f (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
CHAPTER 8. POWER SERIES 111
sin x = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
Carry out your sum until you hit x9 . If you continue forever, we call this
infinite polynomial the MacLaurin series of sin(x).
f (n) (0)
where an = . We use the notation f (n) (x) to denote the nth derivative.
n!
Note that 0! = 1, and that f (0) (x) is the 0th derivative (so original function).
With this notation, we could write the MacLaurin series as
∞
f 00 (0) 2 f 0000 (0) 3 f (4) (0) 4 f (5) (0) 5 X f (n) (0) n
f (0)+f 0 (0)x1 + x + x + x + x +· · · = x .
2! 3! 4! 5! n=0
n!
where an is any real number. It’s a power series because we create an infinite
series using powers of x.
A MacLaurin series is a power series. We’ll often start with a power series,
and then look for the function f (x) whose MacLaurin series is the power series
we started with.
The MacLaurin series of a function depends on the value of the function and
its derivatives at x = 0. Sometimes, you would rather compute the function and
its derivatives at another spot. We won’t have much use for doing this in our
course, but for completeness, you should see the full definition of a Taylor series
centered at x = c.
Definition 8.3: Taylor Series centered at x = c. Let f (x) be a function.
We define the Taylor series of f (x) centered at x = c to be the infinite series
∞
X
a0 + a1 (x − c)1 + a2 (x − c)2 + a3 (x − c)3 + a( x − c)x4 + · · · = an (x − c)n
n=0
f (n) (c)
where an = . The MacLaurin series is the Taylor series centered at x = 0.
n!
CHAPTER 8. POWER SERIES 112
The next problem shows you how to obtain the MacLaurin series for cosh x
and sinh x in a different way.
Problem 8.7 Consider the IVP given by y 00 − y = 0, with y(0) = A and
y 0 (0) = B.
1. Show, using Laplace transforms, that the solution to this IVP is y(x) =
A cosh x + B sinh x.
2. We’ll now obtain the solution using power series. Suppose
y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
Compute y 0 and y 00 . Substitute y and y 00 into the ODE y 00 − y = 0, and
group together terms that are multiplied by the same power of x. You
should have something of the form
(2a2 − a0 ) + (3 · 2a3 − a1 )x + (?)x2 + · · · = 0 + 0x + 0x2 .
and that
cosh(ix) = cos x.
Then use the first fact to compute eiπ . What does sinh(ix) equal, if written in
terms of sin x?
CHAPTER 8. POWER SERIES 113
We’ve now turned multiple functions into power series. Polynomials are
extremely easy to differentiate and integrate. What happens if we differentiate
or integrate a power series. Do we get the power series of the derivative of the
function?
Problem 8.11 For each function below, compute the derivative of the func-
tion, and the derivative of the power series. Write your solution in summation
notation. Then answer the question at the end.
∞
1 2 1 1 1 X 1 n
1. ex = 1 + x + x + x3 + x4 + x5 + · · · = x
2! 3! 4! 5! n=0
n!
∞
1 3 1 1 X (−1)n 2n+1
2. sin x = x − x + x5 − x7 + · · · = x
3! 5! 7! n=0
(2n + 1)!
∞
1 1 1 1 X (−1)n n
3. ln(x + 1) = x − x2 + x3 − x4 + x5 + · · · = x .
2 3 4 5 n=1
n
1
Problem 8.12 In the last problem you showed that = 1 − x + x2 −
1+x
x3 + x4 − x5 + · · · . Let’s obtain the MacLaurin series for arctan x.
1. Compute the first 3 derivatives of f (x) = arctan x. Use this to obtain the
third degree Taylor polynomial of arctan x, centered at x = 0.
1 1
= arctan x. Replace each x with x2 in
R
2. We know that 1+x2 dx =
1+x
2 3 4 5
1 − x + x − x + x − x + · · · , and then integrate to obtain a power series
for arctan x. Write your answer with summation notation. Does it match
your first answer?
CHAPTER 8. POWER SERIES 114
Problem 8.13 Let’s solve the IVP (x2 + 1)y 0 = 1, y(0) = 0 in two ways.
∞
X
1. Use the power series method. Let y = an xn , compute y 0 , plug these
n=0
into the ODE, collect coefficients of the same powers of x, and then solve
for the unknowns an .
2. Use separation of variables.
Compare your solution here with the previous problem.
Problem 8.14 Solve the ODE y 0 + 2xy = 0 by using power series. Your
initial condition will just be y(0) = a0 . After you have a solution, look at the
table of known power series and try to match the solution you got to one of our
known power series (you might have to replace x with something). Then use
separation of variables to solve the ODE, and check if you are correct.
In the previous problem, the power series solution results in a series that we
can match with a series we already recognize. We might have to replace x with
x2 , but the power series is still quite manageable. Things won’t always be this
nice.
Problem 8.15 Solve the ODE y 00 + 2xy 0 + y = 0 by using power series. Your
initial conditions are y(0) = a0 and y 0 (0) = a1 . When you’re done, write your
solution as You won’t find either y1 or y2 on
y(x) = a0 (y1 (x)) + a1 (y2 (x)) the list of power series we
recognize.
where y1 and y2 are power series. Just give the first 4 terms of y1 and y2 ,
together with a rule that would allow us to compute more terms if needed (so
how could I find a10 if I knew a8 and a9 , or better yet, how could I find an+2 if
I knew an and an+1 ).
The next problem suggests a sigma notation way to solve all the power
series problems. Some of you will immediately recognize the value of using this
approach, and start using it exclusively. Some of you would rather not use this
approach. I’m fine either way, though by the end of the chapter you’ll see the
need for this approach.
Problem 8.16 Complete each of the following:
6
X 3
X
2
1. Compute both (n − 3) and s2 . Which is easier?
n=4 s=1
10
X
2. Consider the sum xn−2 . If we let s = n − 2, then rewrite the sum as
n=3
?
X
xs (find the ?). Check your answer by writing out the first few terms,
s=?
and the last term, of both series. We call this index shifting.
CHAPTER 8. POWER SERIES 115
∞
X
3. Rewrite the sum n(n − 1)xn−2 so that xn−2 is replaced with xs (i.e.
n=2
let n − 2 = s and then shift the index). Check you are correct by writing
out the first few terms of both.
Let’s introduce this method with a problem you’ve already solved using
power series.
1. Compute both y 0 and y 00 using summation notation. Show that the second
derivative is
∞
X ∞
X ∞
X
00 n−2 n−2
y = n(n − 1)an x = n(n − 1)an x = n(n − 1)an xn−2 .
n=0 n=1 n=2
Why can we allow the sum to start at 0, 1, or 2? We’ll most often have it
start at 2.
2. Plugging our sums into the ODE y 00 + 4y = 0 gives the equation
∞
X ∞
X
n(n − 1)an xn−2 + 4 an xn = 0.
n=2 n=0
If all the powers of x in this equation were the same, we could easily collect
the coefficients of like powers of x. So let s = n − 2 for the first sum, and
let s = n for the second sum. Rewrite your summation formula now in
terms of s, giving
∞
X ∞
X
?a? xs + 4as xs = 0 + 0x + 0x2 + · · · .
s=? s=0
Problem 8.18 Consider the ODE y 00 + 2xy = 0. Solve this ODE using a
X∞
power series. We start by assuming y = an xn .
n=0
1. Compute y 0 and y 00 as you did in the previous problem. Plug them into
your ODE and obtain an equation with sigma notation. Your powers of x
will not match, so we index shift.
CHAPTER 8. POWER SERIES 116
2. Your left sum should have an n − 2 as a power of x. Your right sum should
have an n + 1. Let’s shift n − 2 to become s + 1. So in the left sum, let
n − 2 = s + 1, and then write your equation in the form
∞
X ∞
X
?a? xs+1 + 2as xs+1 = 0 + 0x + 0x2 + · · · .
s=? n=0
3. When s = −1, the left sum should contribute a term, but the right sum
does not. Use this to find a2 .
4. When s ≥ 0, both sums contribute a term. Give a formula for as+3 in
terms of as (called a recurrence relation). Use this formula to compute a3 ,
a4 , a5 , a6 , a7 , a8 .
5. Write out the first 6 nonzero terms of your series solution.
Did you notice the pattern in the previous two problems? We assume y is
a power series. We then differentiate the series and plug in the derivatives to
our ODE. We then index shift so that each sum has the same power above x.
Often, it’s easiest if you index shift so that the lowest ones all match the largest.
Once the powers all match, we can start finding coefficients. If one series starts
at a different spot than another, we take care of those cases first. Once we start
getting a term from each series, we obtain a recurrence relation and use it to
get an for as many n as we want. Then we can write out as many terms of the
solution as requested.
Problem 8.19 Consider the ODE y 00 + 3xy 0 + 2y = 0. Solve this ODE using
power series methods. Write your answer by give the first 8 nonzero terms of
the series, and make sure you state a recurrence relation that will give more
coefficients of the series. [Hint: You’ll probably need to use s = n − 2 for one
series, and s = n for the others.]
Our goal on this problem is to determine for which a and r we can compute the
limit as k → ∞ of the partial sums, and obtain a value.
k
1. Show that Sk = a(1−r )
1−r . [Hint: Consider the difference sk − rsk . Just
write out each. Lots should cancel.]
2. Compute lim Sk . For which a and r does this limit exist, and for which
k→∞
does it not exist. Explain.
3. We have seen the power series given by
1 + x + x2 + x3 + x4 + · · · .
We now have a way to determine the sum of an infinite series. We just look
at the partial sums, and then compute their limit (provided it exists). This
means we can go back to all the power series we created and ask, “Which of
these power series actually have sum that matches the function we started with.”
Let’s make some definitions.
Definition 8.4: Converges and Diverges. Consider the infinite series
∞
X
b0 + b1 + b2 + b3 + b4 + · · · = bn .
n=0
• The kth partial sum of this series is the sum of the first k terms. So we
have S1 = b0 , S2 = b0 + b1 , S3 = b0 + b1 + b2 , etcetera.
• We say the series converges if lim Sk exists. In this case, we say the series
k→∞
converges to this limit.
• We say the series diverges if lim Sk does not exist.
k→∞
This next problem helps you discover the Ratio test, which is one of the
most powerful tests for determining if a power series converges or diverges.
We’ll generalize the problem above into a powerful test used to determine
when a power series converges or diverges.
1. The polynomials have the same degree, so you just have to divide their leading
coefficients. This gives the limit as 32 .
2. We compute
(1/2)2(n+1) (2)2n (2)2n (2)2n 1
2n
= = 2n+2
= = .
(1/2) (2)2(n+1) (2) (2)2n 22 4
Computing a limit gives 1/4.
3. We write
1/(n + 1)! (n)! n(n − 1) · · · 3 · 2 · 1 1
= = = .
1/n! (n + 1)! (n + 1)n(n − 1) · · · 3 · 2 · 1 n+1
The limit is 0.
CHAPTER 8. POWER SERIES 119
The ratio test basically says that as long as the ratio of consecutive terms
eventually stays below 1, then the series will converge. So if we have a power
∞
X
series of the form an xn , then all we need to do is find for which x we have
n=0
an+1 xn+1
lim < 1.
n→∞ an xn
Problem 8.23 For each power series below, use the ratio test to determine
for which x the series with converge.
∞ ∞ ∞ ∞
X n2n n X (−1)n n X 3n 2n X n! n
1. x 2. x 3. x 4. x
n=0
3n+1 n=0
n! n=1
n2 4n n=0
10n
• The values of x for which the series converges is called the interval of
convergence. This interval may be the single point x = c, or it will be an
interval of real numbers whose center is at x = c, or it may be all real
numbers.
• The radius of convergence is half the width of the interval of convergence.
• We say that a function is analytic at x = c if it has a power series
representation centered at x = c with a nonzero radius of convergence. If
a function is not analytic at x = c, then we say the function is singular at
x = c.
Problem 8.24 Find the interval and radius of convergence for each power Make sure you read the definition
series below. Is the function analytic or singular at x = c. above. This problem has the exact
same instructions as the the
∞ ∞ previous, rather it just uses the
X n2 + 1 x 2n X n new vocabulary from the
1. ,c=0 3. (2n)! (x − 1) , c = 0 definition above.
n=0
n+2 3 n=0
∞ ∞
X 1 n
X 4n
2. (x − 2) , c = 2 4. n (2x − 3) , c = 3/2
n=0
n n=0
Problem 8.25 Find the radius of convergence of the MacLaurin series for
each of the following functions.
CHAPTER 8. POWER SERIES 120
As in the problem above, sometimes the power series method gives you a
polynomial, because the series stops. In the next problem, the power series
method will fail, but you should find that with a slight modification (multiply
the power series by xλ ), you quickly get two solutions that each have only one
term. The entire solution should then be a linear combination of these two
solutions.
Review Suppose that a 2nd order homogeneous ODE has a solution y1 (x) =
e−3x . Suppose that another solution is y2 (x) = e−2x . State a general solution
to this ODE. See 2 .
Problem 8.27: Euler-Cauchy Equation Consider the ODE Any ODE of the form
ax2 y 00 + bxy 0 + cy = 0, where
a, b, c are constants, is called an
2x2 y 00 + 5xy 0 + y = 0. Euler-Cauchy ODE.
∞
X
1. Let’s first try the power series, so suppose y = a0 xn . Compute both
n=0
derivatives and plug them into the ODE. Use this to explain why the only
solution that the power series method will get you is y = 0.
2. Earlier in the semester we noticed that sometimes to get a solution, we Frobenius suggested that we
multiply a power series by xλ to
2 If the ODE is homogeneous, then the solution is a linear combination of two linearly get a solution. He also gave
independent solutions, namely conditions on the ODE that state
y(x) = c1 e−3x + c2 e−2x . when this method is needed, and
when it will succeed.
The solutions y1 and y2 are linearly independent, because the only solution to c1 e−3x +
c2 e−2x = 0 is c1 = c2 = 0. This is because it is impossible to write one of the functions
as a multiple of the other. We obtain solutions by summing together linearly independent
solutions.
CHAPTER 8. POWER SERIES 121
had to multiply by a power of x. Let’s see if this works with power series
as well. Suppose instead that
∞
X ∞
X
y = xλ a 0 xn = a0 xn+λ .
n=0 n=0
Compute both derivatives and plug them into the ODE. Make sure you
explain why you cannot change your sum so that it starts at n = 1, as we
did in the power series method. With each derivative, your sums will still
start at 0.
3. If n = 0, you should get that either a0 = 0, or that a polynomial equals
zero. If we set this polynomial equal to zero, we call the corresponding
equation the indicial equation. Find the values of λ that solve the indicial
equation. You should get two values for λ. Let’s call the largest value λ1 ,
and the smallest value λ2 .
4. If you replace each λ with λ1 , show that an = 0 for every n ≥ 1. Then
repeat with λ = λ2 and show that an = 0 for n ≥ 1.
5. You should now have two solutions to this ODE. Use the superposition See Problem 5.20 if you forgot the
principle to state a solution to the ODE. Make sure you check your work superposition principle. You can
check your work with
with the link to WolframAlpha, or use Mathematica. Mathematica, or here’s a link to
WolframAlpha.
Why did the power series method fail in the previous problem? The answer
lies in a quick computation. If we take the ODE 2x2 y 00 + 5xy 0 + y = 0 and divide
by the leading coefficient of y 00 , we obtain
5 0 1
y 00 + y + 2 y = 0.
2x 2x
5 1
The coefficients of the ODE, namely and are now not defined at x = 0,
2x 2x2
hence not analytic at x = 0. To guaranteed that the power series method will
succeed and give the entire general solution, these coefficients must be analytic
at x = 0. Let’s try one more, and then introduce some vocabulary.
Problem 8.28: Bessel Equation Consider the ODE
x2 y 00 + xy 0 + (x2 − 9)y = 0.
1. Rewrite the ODE so that the coefficient in front of y 00 is a one. Then state
the other coefficients, and show that they are not analytic at x = 0. [Hint:
See the previous paragraph.]
2. Since the power series method may not give both solutions, let’s multiply
the series by xλ (Frobenius’s idea) and suppose that
∞
X ∞
X
y = xλ a 0 xn = a0 xn+λ .
n=0 n=0
Compute both derivatives and plug them into the ODE. Multiply the
coefficients x2 , x, and x2 − 9 into the sums, splitting the x2 − 9 product
into two sums. You’ll want to index shift one sum, as you’ll have an
xn+λ+2 in one spot.
3. When n = 0, the equation (with coefficients a0 ) gives you the indicial
equation. Show that λ = ±3. We’ll let λ1 = 3 and λ2 = −3. Frobenius
always chose λ1 to be the larger of these roots.
CHAPTER 8. POWER SERIES 122
In the previous problem, we were only able to obtain one solution y1 to the
ODE. Frobenius showed how to obtain another linearly independent solution,
and gave an algorithm for obtaining that solution. If the roots of the indicial
equation have a difference that is not an integer, then our current method will
give the second solution. However with Bessel’s equation above, we got the
roots to be ±3, which differ by the integer 6. This is why we did not find a
second solution. You are welcome to study this topic more on your own, if and
when you need it.
Let’s now focus on when we should use the power series method, and when
we should use the Frobenius method. Let’s introduce some vocabulary, and
state some facts without proof.
Definition 8.7: Ordinary, Singular, Regular Singular. Consider the ODE
y 00 + b(x)y 0 + c(x)y = 0.
Notice that the coefficient in front of y 00 is one. Some people call this form of an
ODE the standard form.
• As a reminder, we say that a function is analytic at x = c if it has a power
series solution centered at x = c with a positive radius of convergence.
Polynomials, exponentials, trig function, and rational functions whose
denominator is not zero at x = c are all analytic.
• If b(x) and c(x) are both analytic at x = 0, then the solution y to the
ODE is analytic. We say that x = 0 is an ordinary point of the ODE. The
power series method will yield a complete solution.
• If either b(x) or c(x) are not analytic at x = 0, then we say that x = 0 is
a singular point of the ODE. The power series method is not guaranteed
to work. You can try it, and you might get lucky.
• If x = 0 is a singular point, and both xb(x) and x2 c(x) are analytic, then
we say x = 0 is a regular singular point of the ODE. We can use the
Frobenius method to solve ODEs at regular singular points. The big idea
X∞
is to guess a solution of the form y = xλ an xn and then solve for λ
n=0
and the remaining coefficients as in the power series method.
• The indicial equation is the first equation resulting from matching coeffi-
cients in the Frobenius method. It’s roots λ1 and λ2 are sometimes called
the exponents of the ODE.
We could also define ordinary, singular, and regular singular points at x = c by
considering power series representations centered at x = c instead of x = 0.
The next problem asks you to use the vocabulary above to determine which
method you should use to solve the ODE.
Problem 8.29 For each ODE, write the ODE in standard form. Then
determine if the point x = 0 is an ordinary point or a singular point. If it is an
ordinary point of the ODE, determine if it is a regular singular point. To solve
the ODE, should you use the power series method, the Frobenius method, or
neither?
CHAPTER 8. POWER SERIES 123
Let’s end this section with one final problem. In this problem, the difference
between the roots of the indicial equation will
2. State the indicial equation, and obtain the zeros. You should have λ1 = 1/4.
What is λ2 ?
3. When λ = λ1 , obtain the first 3 nonzero terms of the solution, which we’ll The Mathematica technology
call y1 . introduction will help you check
your work. Just look in the
4. When λ = λ2 , obtain the first 3 nonzero terms of the solution, which we’ll Special Functions section.
call y2 .
5. State the general solution to this ODE.
There are a lot of special functions that we have not even touched on. You
could spend years studying all the special functions that have already been
discovered and classified. This section gave you an introduction to the techniques
needed to solve these ODEs.
Γ(n + 1)
L {tn } = .
sn+1
Definition 8.8: The Gamma Function Γ(t). We define the Gamma function
to be Z ∞
Γ(t) = xt−1 e−x dx.
0
R∞
As x is a dummy variable, we could have also written Γ(t) = 0
pt−1 e−p dp or
R∞
Γ(x) = 0 px−1 e−p dp.
√
Problem 8.33 We know that Γ(1/2) = π, and we know that Γ(n + 1) =
nΓ(n). Use this to compute Γ(3/2), Γ(5/2), and Γ(11/2). Then state the
Laplace transform of t9/2 . [Hint: You may have to repeatedly apply the rule
Γ(n + 1) = nΓ(n), as we have 3/2 = 1/2 + 1, and 5/2 = 3/2 + 1, and so on.]
CHAPTER 8. POWER SERIES 125
(I) For each of the following, find a Taylor poly- 17. f (x) = ex 1
21. f (x) =
nomial of degree n centered at x = c of the 1+x
18. f (x) = cos x
function f (x).
19. f (x) = sin x 22. f (x) = cosh x
1
1. e4x , n = 3, c = 0 5. x, n = 3, c = 1 1
20. f (x) = 23. f (x) = sinh x
1−x
2. cos(x), n = 4, c = π 6. ln x, n = 3, c = 1
(IV) Prove the following formulas are true by consid-
3. cos(2x), n = 4, c = 0 7. ln(1 − x), n = 4, c = 0
ering power series. These formulas will allow us
4. sin( 21 x), n = 5, c = 0 8. ln(1 + x), n = 4, c = 0 to eliminate complex numbers in future sections.
34. f (x) = 1
1+x2 43. y 0 = 3y
35. f (x) = arctan x [hint, integrate the previous] 44. y 0 = 2xy
36. f (x) = arctan(3x)
45. y 00 + 4y = 0
(VI) Shift the indices on each sum so that it begins
at n = 0. 46. y 00 − 9y = 0, y(0) = 2, y 0 (0) = 3
6 ∞
X 47. y 00 + 4y 0 + 3y = 0, y(0) = 1, y 0 (0) = −1
n
X
37. n+2 40. x
n=3 n=2 (VII) Determine whether the given values of x are
ordinary points or singular points of the given
8 ∞
X ODE.
nan xn
X
38. n2 41.
n=2 n=1 48. Chapter 27, problems 26-34 (these are really
∞
X ∞
X quick).
39. 2n 42. n(n − 1)an xn−2
n=4 n=2
(VIII) Solve the following ODEs by the power series
method. State the recurrence relation used to
(VII) Solve the following ODEs by the power series generate the terms of your solution, and write
method. With some, initial conditions are given out the first 5 nonzero terms of your solution.
(meaning you know y(0) = a0 and y 0 (0) = a1 ).
Identify the function whose MacLaurin series 49. Chapter 27, problems 35-47 (or from the worked
equals the power series you obtain. problems).
Click here for some handwritten solutions to many of the problems above.
CHAPTER 8. POWER SERIES 127
8.7 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 9
Systems of ODEs
This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.
1. Explain the basic theory of systems of linear ODEs and the Wronskian for
systems.
2. Convert higher order ODEs to first order linear systems.
3. Explain how to use eigenvalues and eigenvectors to diagonalize matrices.
When not possible, use generalized eigenvectors to find Jordan canonical
form.
4. Find the matrix exponential of a square matrix, and use it to solve linear
homogeneous and nonhomogeneous ODEs.
5. Give applications of systems of ODEs. In particular be able to setup
systems of ODE related to dilution, electricity, and springs (use the
computer to solve complex systems).
128
CHAPTER 9. SYSTEMS OF ODES 129
What is the connection between the solution to the ODE and eigenval-
ues/eigenvectors?
5. Suppose you needed to find a general solution to the system of ODEs
0
y y
= A ,
v0 v
6. Change the initial conditions to y(0) = 5 and v(0) = −5. On top of your
vector field plot, draw what you think the solution should look like in the
velocity-position plot. Explain why the solution must follow a straight
line in the velocity-position plane? [Hint: What are the eigenvalues,
eigenvectors?] Then state another set of initial conditions where the
solution will be a straight line towards the origin.
We’ll revisit the last two problems as part of every other solution find. Let’s
introduce a new type of application that shows us the need for linear systems of
ODEs.
Problem 9.3 Imagine for a moment that you have two tanks. The first tank
contains 6 lbs of salt in 10 gallons of water. The second tank contains no salt
in 20 gallons of water. Each tank has an inlet valve, and an outlet value. We
attach hoses to the tanks, and have a pump transfer 2 gallon/minute of solution
from tank 1 to tank 2, and vice versa from tank 2 to tank 1. So as time elapses,
there are always 10 gallons in tank 1 and 20 gallons in tank 2. Our goal is to
find the amount of salt in each tank at any time t.
1. We know there are initially 6 lbs of salt in tank 1, and no salt in tank 2. If
we allow the pumps to transfer salt for enough time, explain why the salt
content in tank 1 will drop to 2 lb, and the salt content in tank 2 should
increase to 4 lbs.
2. Let y1 (t) and y2 (t) be the lbs of salt in tanks 1 and 2, respectively. Explain
why
2 2
y10 = − y1 + y2 .
10 20
3. Obtain a similar equation for y20 . Write your ODEs in the matrix form
0
y1 −2/10 2/20 y1
=
y20 ? ? y2
4. Draw the vector field represented by the coefficient matrix. Sketch the
solution (y1 (t), y2 (t)) to your IVP (start at the point (6, 0) and follow the
field until the vectors no longer tell you to move). Show that you should
stop at (2, 4).
5. Compute the eigenvalues and eigenvectors of the matrix A, and draw two Don’t forget that you can check
lines through the origin to represent the eigenvector directions. your work with technology. Please
following this link
Problem 9.4 Again consider the mixing tank problem from before, with
the system of ODEs
0
y1 −2/10 2/20 y1
= .
y20 ? ? y2
Our goal is to determine the amount of salt in each tank at any time t.
1. Compute the eigenvalues and eigenvectors of this matrix. Use them to
write a general solution to this system of ODEs. Your solution should
involve arbitrary constants c1 and c2 .
2. Use the initial conditions y1 (0) = 6 and y2 (0) = 0 to solve for c1 and c2 .
CHAPTER 9. SYSTEMS OF ODES 131
3. Construct a graph that contains the the vector field representing the Don’t forget that you can check
coefficient matrix and the parametric plot (y1 (t), y2 (t)) of your solution. your work with technology. Please
following this link
Problem 9.5 Two tanks are connected with hoses and pumps so that 3
gallons/second flows back and forth between the tanks. The first tank is a 60
gallon tank, with 2 lbs of salt inside. The second tank is a 90 gallon tank with
23 lbs of salt in it. Please find the amount of salt in each tank at any time t.
1. Write a linear system of ODEs in the form
0
y1 y
=A 1 .
y20 y2
whose solution will give the amount of salt in each tank at any time t.
2. Compute the eigenvalues and eigenvectors of A, and then write a general
solution to this system of ODEs. Your solution should involve arbitrary
constants c1 and c2 .
3. Use the initial conditions to solve for c1 and c2 .
4. Construct a graph that contains the the vector field representing the Don’t forget that you can check
coefficient matrix and the parametric plot ~y (t) = (y1 (t), y2 (t)) of your your work with technology. Please
following this link
solution.
Problem 9.6 Consider the linear system of ODEs given by y10 = 2y1 + y2
and y20 = 3y1 + 4y2 . Let ~y = (y1 , y2 ). We can write this ODE in the form
~y 0 = A~y , where ~y = (y1 , y2 ).
1. Find the eigenvalues and eigenvectors of the coefficient matrix A.
2. We know that we can write a general solution to this system of ODEs as
~y = QDQ−1 ~y (0).
You have found Q, D, and Q−1 . If we let y1 (0) = a and y2 (0) = b which
means ~y (0) = (a, b), then multiply out the matrix product QDQ−1 ~y (0)
and state the solution to this IVP.
CHAPTER 9. SYSTEMS OF ODES 132
Do you notice that in the problem above, we solved the linear system of
ODEs in the form ~y 0 = A~y with initial conditions ~y (0) by just writing
~y = QDQ−1 ~y (0).
The columns of Q were the eigenvectors. The nonzero entries of the diagonal
matrix D contain eλt where λ is an eigenvalue. Does this pattern work in other
places?
6 2
Problem 9.7 Solve the system of ODEs ~y 0 = A~y where A = . Do
2 3
so by stating Q, D, and Q−1 , and then perform the matrix product QDQ−1 .
Finally, if we assume ~y (0) = (a, b), then give the solution to this system of
IVPs by stating what y1 (t) equals, and what y2 (t) equals (hint, multiply out
QDQ−1 ~y (0) ). Please use technology to perform as much of the computations
as you want. Just be prepared to tell us how you got each part.
Does the pattern above continue to work if we increase the size of the matrix?
2 1 1
Problem 9.8 Solve the system of ODEs ~y 0 = A~y where A = 1 2 0.
0 0 4
Do so by stating Q, D, and Q−1 , and then perform the matrix product QDQ−1 .
Finally, if we assume ~y (0) = (a, b, c), then give the solution to this system of
IVPs by stating what y1 (t) equals, what y2 (t) equals, and what y3 (t) equals.
Please use technology to perform as much of the computations as you want.
Just be prepared to tell us how you got each part.
Problem 9.12: Nilpotent Matrices Use the definition of the matrix ex-
ponential to compute the following. We say that a matrix A is
nilpotent if An is the zero matrix
0 t for some n. It’s easy to compute
1. Let At = and then compute (At)2 and (At)3 . Use this to state the the matrix exponential of a
0 0
nilpotent matrix, because the
matrix exponential of At. infinite series stops, and then we
just have to add up finitely many
0 t 0 terms.
2. Let At = 0 0 t and then compute (At)2 and (At)3 . Use this to state
0 0 0
the matrix exponential of At.
CHAPTER 9. SYSTEMS OF ODES 134
0 t 0 0
0 0 t 0
3. Let At = . Give the matrix exponential of At. You are
0 0 0 t
0 0 0 0
welcome to guess your answer by following any pattern you saw above.
0 t 0 0 0
0 0 t 0 0
0 0
4. Let At = 0 t 0 . Guess the matrix exponential of At. You can check your answer with
0 0 0 0 t technology. Follow this link.
0 0 0 0 0
0 0 0 3t
2t t 0 0 0
0 2t 0 0 0
Problem 9.14 Consider the matrix At = 0 0 2t t 0 . There is
0 0 0 2t t
0 0 0 0 2t
supposed to be a zero instead of a t in the second row. That was done on
purpose.
1. Write At as the sum At = Bt + Ct, where Bt is a diagonal matrix, and
Ct contains nonzero terms above the diagonal.
2. Compute the matrix exponential of both Bt and Ct. Then compute their
product to get eAt . Check your answer with software.
3t t 0 0 0 0 0 0 0 0
0 3t t 0 0 0 0 0 0 0
0 0 3t t 0 0 0 0 0 0
0 0 0 3t 0 0 0 0 0 0
0 0 0 0 3t t 0 0 0 0
3. Guess the matrix exponential of
0 0 0 0 0 3t 0 0 0 0 Check your answer with software.
0 0 0 0 0 0 4t 0 0 0
0 0 0 0 0 0 0 4t t 0
0 0 0 0 0 0 0 0 4t t
0 0 0 0 0 0 0 0 0 4t
CHAPTER 9. SYSTEMS OF ODES 135
We can now compute the matrix exponential of any matrix that is either
diagonal, or has nonzero entries above the diagonal. We’ll soon see that this
means we can compute the matrix exponential of every matrix. The key is to
first find the correct form.
2 4
Problem 9.15 Consider the matrix A = .
4 2
1. Find the eigenvalues of A. For each eigenvalue, find a corresponding
eigenvector.
2. Let Q be a matrix whose columns are the eigenvectors from the previous
part. Compute AQ by hand.
3. If ~x is an eigenvector, then by definition we must have A~x = λx. Use this If you’re struggling with guessing
to write AQ = QJ where J is a diagonal matrix. What is the matrix J? what J should be, then compute
Q−1 AQ. Then try to explain why
Show that Q−1 AQ = J, and that QJQ−1 = A. J should be what you see from the
equation AQ = QJ.
4. Now suppose that A is a matrix with eigenvalues 2 and 3 and corresponding
Did you notice on this last part
eigenvectors (1, 3) and (−1, 2). Use this to state Q, J, and A. that you could construct A solely
from knowledge about eigenvalues
and eigenvectors.
exp(At) = Q exp(Jt)Q−1 .
1. For the coefficient matrix above, state Q and J. You should have a
repeated eigenvalue, but you should also find two linearly independent
eigenvectors corresponding to this eigenvalue.
2. Compute eAt , and state a general solution ~y (t).
CHAPTER 9. SYSTEMS OF ODES 136
3. If y1 (0) = 1, y2 (0) = −2, y3 (0) = 2, then state y1 (t), y2 (t), and y3 (t).
Problem 9.18 Consider the system of ODEs y10 = y2 and y20 = −9y1 − 6y2 .
d~y
1. Write this system in the form = A~y . Find the eigenvalues of A. State
dt
all the eigenvectors of A.
2. Why are there not enough eigenvectors to form an invertible matrix Q?
3. The system of ODEs above is equivalent to the ODE y 00 + 6y 0 + 9y = 0.
Explain why.
4. State a general solution to this ODEs using methods from before.
We’ve now seen two examples with repeated eigenvalues. Sometimes when
we see a repeated eigenvalue, we’ll be able to get enough linearly independent
eigenvectors to form an invertible matrix Q. In this case, we’ll be able to write
A = QJQ−1 where J is diagonal. If we can’t get enough linearly independent
eigenvectors, then we’ll have to do something else. We’ll show that we can
always write A = QJQ−1 , where the only nonzero terms off the diagonal are
perhaps a few 1’s directly above the diagonal. Luckily, we know how to compute
the matrix exponential of this kind of matrix. The matrices Q and J are called
a Jordan decomposition for A.
Problem 9.19 Consider again the system of ODEs y10 = y2 and y20 =
−9y1 − 6y2 .
1. We already know the only eigenvalue of the coefficient matrix is λ = −3.
To find the eigenvectors corresponding to λ = −3, we solve (A + 3I)~x = ~0.
Solve this system, and state the solution.
2. Because the eigenvalue λ = −3 was repeated, we were hoping to find
two linearly independent eigenvalues, but we did not. Instead of solving
(A − λI)~x = ~0, let’s solve (A − λI)2 ~x = ~0.
Find the solutions to (A − λI)2 ~x = ~0. Show by hand how to solve this
system, and state the solution as linear combination of two independent
vectors.
3. Pick a nonzero vector from the previous part that is not an eigenvector, and
call it ~v2 . Compute ~v1 = (A − λI)~v2 , and show that ~v1 is an eigenvector.
4. Let Q = ~v1 ~v2 . Compute
by hand AQ and show that it equals QJ
−3 1
where J = .
0 −3
5. Now that we have Q and J, compute eAt . The solution to the ODE is
~y = eAt~c, which you can now compare with your previous problem.
Have you noticed the pattern for finding Jordan form? Find the eigenvalues.
Then find the eigenvectors. If you don’t have enough linearly independent eigen-
vectors, then you look for generalized eigenvectors of order 2. Continue finding
generalized eigenvectors as needed until you get enough linearly independent
vectors. When you select a higher order generalized eigenvector ~v , make sure
you compute (A − λI)k~v for k = 1, 2, ... and use those as your lower order vectors.
This will get you Jordan form. I’ll demo some of this in class.
We’ve shown that you can start with A, and from it determine Q and J. We
know AQ = QJ, which means if we had Q and J, we could obtain A. The next
problem starts with a Q and J. You’ll then obtain A. After obtaining A, we’ll
find another Q and J so that AQ = QJ. The Q and J are not unique.
2 1 0 0 1 0 2 −1
0 2 0 0
and Q = 1 0 0 2 .
Problem 9.22 Let J = 0 0 3 0 0 1 1 −1 Use software to help you complete
this problem.
0 0 0 2 0 −1 0 0
1. Compute A = QJQ−1 (make sure you use software). Why are the eigen-
values of A equal to 2 and 3? What’s the multiplicity of each eigenvalue?
For each eigenvalue, give all possible eigenvectors. (Show the appropriate
matrices you would rref, state the rref, and then state the eigenvectors.)
2. The eigenvalue 2 shows up three times, but only contributes two linearly
independent eigenvectors. Find a generalized eigenvector, which we’ll call
~v2 , of degree 2 for this eigenvalue (remember to solve (A − λI)2 ~x = ~0).
Then compute ~v1 = (A − 2I)~v2 , which should be an eigenvector. This
gives you two vectors corresponding to λ = 2. For ~v3 , pick an eigenvector
corresponding to λ = 2 that is not a multiple of ~v1 . Let ~v4 be an eigenvector
corresponding to the other eigenvalue.
3. You now have enough information to state Q. It will mostly likely be
different than the one you started with. State Q and then compute Q−1 AQ
(with a computer) to get J. You should have an almost diagonal matrix
with a single 1 above the diagonal.
4. State eAt (feel free to use a computer to perform any needed matrix
multiplications). Check your answer with a computer.
The solutions above provides a theoretical way to solve every first order
linear constant coefficient ODE. If we replace y, c, and f with vectors, and we
d~y
replace a with a matrix, then the solution to = A~y (t) + f~(t) is simply
dt
Z t
~y (t) = eAt~c + eAt e−At f~(t)dt.
0
This equation solves just about every ODE we’ve encountered all semester, and It’s possible to rework through the
more. To use this solution, the system must have constant coefficients, but the details of the problem above to
show this is the solution. I’ll leave
function f only has to be integrable after multiplying by e−At . This greatly those details to you. Solving that
extends our ability to solve non homogeneous ODEs. problem was one of my most
exciting discoveries in the last 10
Problem 9.24 Consider the linear system of ODEs given by years of teaching. It’s amazing.
Rt
4. We know the general solution is ~y (t) = eAt~c + eAt 0 e−At f~(t)dt. Use the
initial conditions to find ~c. Show us what matrix you are row reducing.
5. You should have y2 (t) = 2 − 2e−3t . What is y1 (t)?
1. Use a computer to give the eigenvalues and an eigenvector for each eigen-
value. State Q and J so that AQ = QJ where J is a Jordan form for
A.
2. State eJt . What matrix product would you compute to get eAt ? State the
matrices you would multiply, and then state both eAt and e−At . Please
use a computer to do all this.
Rt
3. Compute, by hand, 0 e−At f~(t)dt, and then with a computer give the
Rt
product eAt 0 e−At f~(t)dt.
Rt
4. Show how to use the initial conditions to find ~c in ~y (t) = eAt~c+eAt 0 e−At f~(t)dt.
CHAPTER 9. SYSTEMS OF ODES 140
4. If you let ~c = ~0, then what are y1 and y2 . This is what we called yp in the
non homogeneous ODE section.
You’ve now seen the key ideas needed to solve any kind of system. The
computations can get quite intense, but we can program a computer to take
care of all the computations.
9.4 Applications
Let’s finish this chapter with some application problems. You don’t have to be
able to compute the matrix exponential problems to solve these problems, so if
you got stuck above, please do these.
Problem 9.27 Suppose we have three large tanks containing various amounts
of salt. The tanks have volumes V1 = 30 gal, V2 = 20 gal, and V3 = 50 gal. We don’t have to use salt. This
could represent 3 different
• An inlet valve pumps 5 gallons of water into tank 1 each minute. The countries and products they wish
water coming in contains 3 lbs of salt per gallon. This water is being to import/export. It could be
sewage at a waste transfer station.
added to the system from some external source. We might consider three countries
and the spreading of a virus. We
• Tank 1 has an outlet value that pumps 9 gallons per minute out to tank 2. could look at three cities and the
Tank 1 has an inlet value that receives 3 gallons per minute from tank 2, flow of traffic. The applications
and 1 gallon per minute from tank 3. In all, this mean that tank 1 has 9 are endless.
gallons coming in per minute, and 9 gallons going out per minute.
• Tank 2 receives 9 gallons per minute from tank 1. Of those 9 gallons, it
sends 3 gallons per minute to tank 1 and 4 gallons per minute to tank 2.
The other 2 gallons per minute leak out the top (through a crack).
• Tank 3 receives 4 gallons per minute from tank 2. It sends 1 gallon per
minute back to tank 1, and then the remaining 3 gallons per minute are
sent out a hose to some external spot.
Assume the initial salt content is zero in each tank. As time moves on, the salt
that is added to tank 1 will eventually reach the other tanks. After some time
has elapsed, how much salt will be in each tank?
1. Let y1 , y2 , and y3 be the lbs of salt in each tank after t minutes. Write this
tank mixing problem as a linear system of ODEs in the form d~ y
dt −A~y = f~(t).
2. Use software to completely solve the system. State y1 (t), y2 (t), and y3 (t).
3. Let t → ∞. What will be the salt content in each tank in the long run.
CHAPTER 9. SYSTEMS OF ODES 141
2. Let v1 = y10 and v2 = y20 . This allows us to replace y100 with v10 , and y200
with v20 , and then we have a system of first order linear ODEs. Write this
system in the matrix form
0
y1 ? ? ? ? y1
y2
= ? ? ? ? y2 .
v1 ? ? ? ? v1
v2 ? ? ? ? v2
3. Now assume that c1 and c2 are not zero. How does this change the ODEs
from part 1? What’s the corresponding 4 by 4 matrix in part 2?
You’ll need to differentiate the first and last equation to get an I10 and I30 . Once
you’ve got the system set up, a computer will give the currents almost instantly.
This algorithm is coded into any electrical network software package.
CHAPTER 9. SYSTEMS OF ODES 142
9.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
CHAPTER 9. SYSTEMS OF ODES 143
9.6 Problems
The accompanying problems will serve as practice problems for this chapter. Handwritten solutions to
most of these problems are available online (click for solutions). You can use the Mathematica technology
introduction to check any answer, as well as give a step-by-step solution to any of the problems. However, on
problems where the system is not diagonalizable, the matrix Q used to obtain Jordan form is not unique (so
your answer may differ a little, until you actually compute the matrix exponential QeJt Q−1 = eAt ).
1. Solve the linear ODE y 0 = ay(t) + f (t), where 0 1 0 0 0
a is a constant and f (t) is any function of t. 0 0 1 0 0
You will need an integrating factor, and your 0 0 0 0 0t
(i)
solution will involve the integral of a function. 0 0 0 0 1
0 0 0 0 0
2. For each system of ODEs, solve the system using
the eigenvalue approach. Find the Wronskian 3 1 0 0 0
0 3 1 0 0
and compute its determinant to show that your
(j) 0 0 3 0 0
solutions are linearly independent. t
0 0 0 −2 1
(a) y10 = 2y1 + 4y2 , y20 = 4y1 + 2y2 , y1 (0) = 0 0 0 0 −2
1, y2 (0) = 4
5. For each of the following matrices, find the ma-
(b) y10 = y1 + 2y2 , y20 = 3y1 , y1 (0) = 6, y2 (0) = trix exponential. You will have to find the Jor-
0 dan form.
(c) y10 = y1 + 4y2 , y20 = 3y1 + 2y2 , y1 (0) =
0, y2 (0) = 1 0 1 0 1
(a) (e)
(d) y10 = y2 , y20 = −3y1 − 4y2 , y1 (0) = −3 4 −1 0
1, y2 (0) = 2
0 1 0 1
(b) (f)
−6 −5 −4 0
3. (Jordan Form) For each matrix A, find matrices
−1 −1 0 1 0 1
Q, Q , and J so that Q AQ = J is a Jordan
(c) (g)
canonical form of A. −1 −2 0 3
1 2
1 2 2
0 1 2 4
(a) (d) (h)
0 3 −4 −4 4 2
(d) 0 1 0
0 1
0 0 1 6. Set up an initial value problem in matrix for-
(b) mat for each of the following scenarios (mixing
−1 −2
0 1
(e) tank, dilution problems). Solve each one with
−1 0
1 2 2
(c) 0 1 2
the computer.
0 0 1 (a) Tank 1 contains 30 gal, tank 2 contains 40.
4. For each of the following matrices A which are Pumps allow 5 gal per minute to flow in
already in Jordan form, find the matrix expo- each direction between the two tanks. If
nential. Note that if t follows a matrix, that tank 1 initially contains 20lbs of salt, and
means you should multiply each entry by t. tank 2 initially contains 120 lbs of salt, how
much salt will be in each tank at any given
time t. Remember, you are just supposed
2 0 0 1
(a) (e) t to set up the IVP, not actually solve it (the
0 3 0 0
eigenvalues are not very pretty).
2 0 4 1
(b) t (f) t (b) Three tanks each contain 100 gallons of wa-
0 3 0 4
ter. Tank 1 contains 400lbs of salt mixed
2 0 0 0 1 0 in. Pumps allow 5 gal/min to circulate in
(c) 0 3 0 (g) 0 0 1t each direction between tank 1 and tank 2.
0 0 4 0 0 0 Another pump allows 4 gallons of water to
2 0 0 5 1 0 circulate each direction between tanks 2
(d) 0 3 0t (h) 0 5 1t and 3. How much salt is in each tank at
0 0 4 0 0 5 any time t?
CHAPTER 9. SYSTEMS OF ODES 144
(c) Four tanks each contain 30 gallons. Be- 8. Solve the following homogeneous systems of
tween each pair of tanks, a set of pumps ODEs, or higher order ODEs, with the given
allows 1 gallon per minute to circulate in initial conditions.
each direction (so that each tank has a
total of 3 gallons leaving and 3 gallons en- (a) y10 = 2y1 , y20 = 4y2 , y1 (0) = 5, y2 (0) = 6
tering). Tank 1 contains 50lbs of salt, tank (b) y10 = 2y1 + y2 , y20 = 2y2 , y1 (0) =
2 contains 80 lbs of salt, tank 3 contains 10 −1, y2 (0) = 3
lbs of salt, and tank 4 is pure water. How (c) y 00 + 4y 0 + 3y = 0, y(0) = 0, y 0 (0) = 1
much salt is in each tank at time t?
(d) y 00 + 2y 0 + y = 0, y(0) = 2, y 0 (0) = 0
(d) Tank 1 contains 80 gallons of pure water,
(e) y10 = 2y1 + y2 , y20 = y1 + 2y2 , y1 (0) =
and tank 2 contains 50 gallons of pure wa-
2, y2 (0) = 1
ter. Each minute 4 gallons of water con-
taining 3lbs of salt per gallon are added to (f) y10 = y2 , y20 = −y1 , y1 (0) = 1, y2 (0) = 2
tank 1. Pumps allow 6 gallons per minute
9. Solve the following nonhomogeneous systems of
of water to flow from tank 1 to tank 2, and
ODEs, or higher order ODEs, with the given ini-
2 gallons of water to flow from tank 2 to
tial conditions. Use the computer to solve each
tank 1. A drainage pipe removes 4 gallons
of these problems, by first finding the matrix
per minute of liquid from tank 2. How
exponential and R then using using the formula
much salt is in each tank at any time t?
~y = eAt~c + eAt e−At f~(t)dt. You’ll have to find
7. Convert each of the following high order ODEs the matrix A and function f .
(or systems of ODEs) to a first order linear sys- (a) y10 = 2y1 + t, y20 = 4y2 , y1 (0) = 5, y2 (0) = 6
tem of ODEs. Which are homogeneous, and
which are nonhomogeneous? (b) y10 = 2y1 + y2 , y20 = 2y2 − 4, y1 (0) =
−1, y2 (0) = 3
(a) y 00 + 4y 0 + 3y = 0 (c) y 00 + 4y 0 + 3y = cos 2t, y(0) = 0, y 0 (0) = 1
(b) y 00 + 4y 0 + 3y = 4t (d) y 00 + 2y 0 + y = sin t, y(0) = 2, y 0 (0) = 0
(c) y 00 + ty 0 − 2y = 0 (e) y10 = 2y1 + y2 − 2, y20 = y1 + 2y2 + 3, y1 (0) =
2, y2 (0) = 1
(d) y 00 + ty 0 − 2y = cos t
(f) y10 = y2 , y20 = −y1 + t, y1 (0) = 1, y2 (0) = 2
(e) y 000 + 3y 00 + 3y 0 + y = 0
10. Mass-Spring Problems - To be added in the
(f) y 0000 − 4y 000 + 6y 00 − 4y 0 + y = t
future.
(g) y100 = 4y10 + 3y2 , y20 = 5y1 − 4y2 .
11. Electrical Network Problems - To be added in
(h) Chapter 17, problems 1-20, in Schaum’s the future.
Chapter 10
This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.
3. Give conditions as to when a Fourier series will exist, and explain the
difference between a Fourier series and a function at points of discontinuity.
4. Give examples of even and odd functions, and correspondingly develop
Fourier cosine and sine series. Use these ideas to discuss even and odd
half-range expansions.
145
CHAPTER 10. FOURIER SERIES AND PDES 146
This integral equation is a generalization of the dot product. In the dot product,
we multiply corresponding components together and then sum. That’s precisely
what the integral above does. Let’s make a definition.
Definition 10.1: Inner Product. Let f (x) and g(x) be bounded functions
over some interval [a, b]. The inner product of f and g over [a, b] is the integral
Z b
hf, gi = f (x)g(x)dx.
a
This inner product is a generalization of the dot product. We say that two
functions are orthogonal over [a, b] if their inner product over [a, b] is equal to
zero.
Problem 10.1 Consider the function f (x) = x and g(x) = x2 .
1. Compute the inner products hf, f i, hg, gi, and hf, gi. [For the first, you
R1
just need to compute the integral 0 x · xdx. ]
2. Recall that ~u · ~u = |u|2 . So the length of a vector is the square root of the
dot product of the vector with itself. We’ll define the length of a function
to be the square
p root of the inner product of a function with itself, and
write ||f || = hf, f i. What is the length of f and the length of g over the
interval [0, 1]. [Hint, you already did the inner products in part 1.
3. Recall that ~u · ~v = |~u||~v | cos θ, where θ is the angle between the vectors
~u and ~v . Use this idea to invent a definition for the angle between two
functions, and then use your definition to compute the angle between f
and g.
With the word inner product, we can now talk about the “dot product”
of functions. We can use the words Length and angle when talking about
functions. We obtained the Legendre series coefficients because the inner
product of any two different Legendre polynomials, over the interval [−1, 1],
is zero. The Legendre polynomials form an infinite collection of orthogonal
vectors. We’ve got a 90 degree angle between any two functions. We can
use these polynomials to approximate any other function by considering linear
combinations of these orthogonal functions. This is one of the big ideas in modern
science. Rather than working with complicated functions f , we can approximate
them with linear combinations of simpler functions. What constitutes a “simple”
function depends on the problem. Legendre polynomials show up when studying
spherically symmetric problems. Bessel functions shows up when studying
radially symmetric problems. Sometimes the hardest part about solving a
problem is trying to determine which “simple” collection of functions to use.
Fourier was one of the first to use something other than power series to
approximate a function. He did it while trying to understand how heat flowed in
a cannon. Napoleon asked Fourier to study this problem, because cannons were
exploding on his soldiers because the cannon balls would not leave a cannon
after heat had caused the barrel to expand. Fourier discovered that you can use
sine and cosine series to approximate a function. That’s what we’ll study in this
chapter. In the work below, the variable L will stand for the length of a cannon.
CHAPTER 10. FOURIER SERIES AND PDES 147
nπx
Problem 10.2 Let fn (x) = cos for n = 0, 1, 2, . . .. So we have
L
0πx πx 2πx 3πx
f0 (x) = cos , f1 (x) = cos , f2 (x) = cos , f3 (x) = cos ,
L L L L
etc. This is an infinite collection of functions. Our goal is to show that on the
interval [0, L], the functions fn and fm are orthogonal, provided n 6= m. To do
this, you’ll need to prove that any pair has an inner product of 0.
0πx πx
1. Draw the functions f0 (x) = cos , f1 (x) = cos , and f2 (x) =
L L
2πx
cos over the interval [0, L].
L
RL
2. Compute the integral 0 f0 (x)fn (x)dx for n 6= 0. What is hf0 , fn i?
RL
3. Now show 0 fn (x)fm (x)dx = 0 for n 6= m, with n, m > 0. As a hint,
you’ll want to look up a product-to-sum trig identity, after which this
integral is quickly doable.
nπx
We now know that the set of functions fn (x) = cos forms an orthog-
L
onal set of functions over the interval [0, L]. Let’s now make a Fourier cosine
series for a function.
Problem 10.3 Suppose that f (x) is defined on [0, L]. If we assume that
∞
X nπx
f (x) = An cos ,
n=0
L
2 L
Z nπx
An = f (x) cos dx,
L 0 L
and if n = 0 then we have
Z L
1
A0 = f (x)dx.
L 0
mπx
[Hint: Multiply both sides by cos and then integrate from 0 to L. You
L
can use the orthogonality of cosines to solve for the coefficients. The integral of
the bottom will involve a cosine half angle formula.]
We could have repeated the previous two problems with the sine function,
and would have gotten very similar results. Based of the previous two problems,
let’s make a formal definition.
Definition 10.2: Fourier Sine and Cosine Series. Let f (x) be a function
defined on [0, L]. We define the Fourier sine series and Fourier cosine series of f
(on [−L, L]) to be the series
∞
X nπx ∞
X nπx
Bn sin and An cos ,
n=1
L n=0
L
CHAPTER 10. FOURIER SERIES AND PDES 148
1 L
Z
Z L A0 = f (x)dx,
2 nπx
L 0
Bn = f (x) sin dx and Z L
L 0 L 2 nπx
An = f (x) cos dx.
L 0 L
Problem 10.4 Let f (x) = x over the interval [0, L]. Draw the function f .
Then compute the Fourier sine series of f (x) by computing the integrals
Z L
2 nπx
Bn = f (x) sin dx.
L 0 L
Write out the first 4 nonzero terms of the series by writing
∞ nπx πx
X 2πx 3πx
Bn sin = B1 sin + B2 sin + B3 sin + ··· .
n=1
L L L L
Be prepared to explain how you use integration by parts to compute the integrals.
Problem 10.5 Let f (x) = x over the interval [0, L]. Draw the function f .
Then compute the Fourier cosine series of f (x) by computing the integrals
Z L Z L
1 2 nπx
A0 = f (x)dx and An = f (x) cos dx.
L 0 L 0 L
Write out the first 4 nonzero terms of the series by writing
∞ nπx πx
X 2πx 3πx
An cos = A0 + A1 cos + A2 cos + A3 cos +··· .
n=0
L L L L
Be prepared to explain how you use integration by parts to compute the integrals.
Problem 10.6 In the previous two problems, you computed the Fourier
cosine and Fourier sine series of f (x) = x over the interval [0, L]. This problem
will repeat the above with technology, and then you’ll graph your results. To
allow software to create graphs, you’ll have to pick a length L that’s an actual
number (maybe try L = 7).
1. Use software to obtain the first 4 nonzero terms of the Fourier sine and
Fourier cosine series of f (x) = x over [0, L].
2. Use software to graph both f (x) = x and the first four nonzero terms of
the Fourier sine series. Have the bounds of your graph be over the interval
[−3L, 3L].
3. Use software to graph both f (x) = x and the first four nonzero terms
of the Fourier cosine series. Have the bounds of your graph be over the
interval [−3L, 3L].
4. Make some conjectures about what you see in your graphs.
To present this in class, you should come to class with your graphs already
printed out.
CHAPTER 10. FOURIER SERIES AND PDES 149
exist. We define the Fourier series of f over the interval [−L, L] to be the formal
infinite series
∞
X nπx ∞
X nπx
a0 + an cos + bn sin .
n=1
L n=1
L
Remark 10.5. In the definition above, we do not require the Fourier series to
actually converge to f . The following theorem, which we will give without proof,
provides the needed conditions for the series to converge. We will use this proof
(which requires some real analysis) to prove other facts about Fourier series
throughout this chapter.
Theorem 10.6 (Fourier’s Theorem). Suppose f (x) is piecewise smooth on the
interval −L ≤ x ≤ L. Then the Fourier series of f (x) converges to the period
extension of f at the points where f is continuous. If the periodic extension of f
is not continuous at a point x, then the Fourier series converges to the average
f (x+) + (f (x−)
of the left and right limits at x, namely .
2
Problem 10.7 Let f (x) = x over the interval [−L, L]. Compute the Fourier
series of f (x) by computing the integrals for a0 , an , and bn . Show your integration
steps.
Problem 10.8 Let f (x) = x2 over the interval [−L, L]. Compute the Fourier
series of f (x) by computing the integrals for a0 , an , and bn Show your integration
steps.
CHAPTER 10. FOURIER SERIES AND PDES 150
Problem 10.9 Let f (x) = ex , g(x) = cosh(x) and h(x) = sinh(x) over
the interval [−L, L]. Use software to compute the Fourier coefficients for each
function. What patterns do you see? You are welcome to just state the Fourier
coefficients for each (you don’t have to show your integration steps).
Notice that there are other kinds of series. In class, I showed you how
to obtain a function as an infinite sum of Legendre polynomials. We also
introduced the concept of orthogonality of functions, and showed that the
Legendre polynomials formed an infinite collection of orthogonal functions. We
also showed how to write a function f as a series of Legendre polynomials.
We can do the exact same thing with trig functions. We’ll develop the cosine
series, the sine series, and then the Fourier series. We’ll compute these series for
a few functions. After that let’s look at how these were developed by Fourier,
as he studied the heat equation.
Maybe we should start with why we care about something that has length L.
Then get to the reason why we look at nπ/L. Let’s definitely do that.
Then prove orthogonality of the functions on these intervals.
Show that if we write a function as a series, and the functions are orthogonal,
then we know the coefficients through an integral formula.
Obtain a formula for the cosine series coefficients and the sine series coeffi-
cients.
Find the Fourier coefficients of a cosine series. Draw the function and several
terms of the series.
Find the Fourier coefficients of a sine series. Draw the function, and several
terms of the series.
What are the coefficients of a Fourier series. Find the coefficients for a
function.
If a function is odd or even, what can be said.
I can grab a lot of these problems from my PDE course notes.
10.2 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
CHAPTER 10. FOURIER SERIES AND PDES 151
10.3 Problems
The accompanying problems will serve as practice problems for this chapter. Handwritten solutions to
most of these problems are available online (click for solutions). You can use the Mathematica technology
introduction to check all your answers. I will create a solutions guide as time permits.
4. Compute the Fourier series of each function below (assume the function is p-periodic). Write your
solution using summation notation. Then graph at least 3 periods of the function and compare the
graph of the function with a graph of a truncated Fourier series.
(
−1 −2 < x < 0 (h) f (x) = 1 − x2 for −1 < x < 1, p = 2
(a) f (x) = ,p=4
1 0<x<2 (i) f (x) = x3 for −1 < x < 1, p = 2
(
0 −2 < x < 0 (j) f (x) = sin(πx) for 0 < x < 1, p = 1
(b) f (x) = ,p=4
2 0<x<2 (k) f (x) = cos(πx) for − 12 < x < 21 , p = 1
(
(c) f (x) = x for −1 < x < 1, p = 2 0 −1 < x < 0
(l) f (x) = ,p=2
(d) f (x) = |x| for −1 < x < 1, p = 2 x 0<x<1
(e) f (x) = 1 − |x| for −1 < x < 1, p = 2
0 −2 < x < 0
(f) f (x) = x2 for −1 < x < 1, p = 2 (m) f (x) = 1 0 < x < 1 , p = 4
(g) f (x) = x2 for −2 < x < 2, p = 4
0 1<x<2
(c) If f is even and g is odd, f 2 , g 2 , f 3 , g 3 , f g, f + g, 3f, xf, xg, f n g m (where n and m are integers).
6. Rewrite each function f as the sum of an even fe and an odd fo function, so that f = fe + f0 . Make
sure you show that fe (−x) = fe (x) and fo (−x) = −fo (x). Then plot f , fe , and fo on the same axes.
(a) f (x) = ex (your answer should involve hyperbolic functions).
(b) f (x) = x2 + 3x + 2
1
(c) f (x) = (since f (1) is undefined, the even and odd functions are not defined at x = −1).
x−1
7. For each function defined on [0, L], find the Fourier cosine series of the even periodic extension to
[−L, L]. Write your solution using summation notation. Then graph at least 3 periods of the function
and compare the graph of the function with a graph of a truncated series.
(
(a) f (x) = 1 for 0 < x < 1 0 0<x<1
(j) f (x) =
(b) f (x) = 1 for 0 < x < π 1 1<x<2
(c) f (x) = x for 0 < x < 1 (
1 0<x<1
(d) f (x) = x for 0 < x < π (k) f (x) =
2 1<x<2
(e) f (x) = 1 − x for 0 < x < 1 (
(f) f (x) = 2 − x for 0 < x < 2 1−x 0<x<1
(l) f (x) =
0 1<x<2
(g) f (x) = π − x for 0 < x < π
(
(h) f (x) = x2 for 0 < x < 1 x 0<x<1
(m) (Sawtooth Wave) f (x) =
(i) f (x) = x3 for 0 < x < 1 2−x 1<x<2
8. For each function from 7, find the Fourier sine series of the odd periodic extension to [−L, L]. Write
your solution using summation notation. Then graph at least 3 periods of the function and compare
the graph of the function with a graph of a truncated series.
9. For a function f (x) defined on [0, L], a half wave rectifier extends f to be 0 on [−L, 0), and then
periodically extends the function to all real numbers. If fe and fo represent the even and odd periodic
fe + fo
extentsions, then g = represents the half wave rectifier. For each function from 7, find the
2
Fourier series of the half wave rectifier of f . Write your solution using summation notation. Then graph
at least 3 periods of the half wave rectifier and compare it to a graph of a truncated series.
10. Compute the following integrals, where n and m are positive integers. You will need the product to
sum trig identitites.
Z π
(a) cos(nx) sin(mx)dx.
−π
Z π
(b) sin(nx) sin(mx)dx.
−π
Z π
(c) cos(nx) cos(mx)dx.
−π
1 1 1 1
(a) sin2 x = − cos(2x) (d) cos2 x = + cos(2x)
2 2 2 2
3 1 3 1
(b) sin3 x = sin x − sin(3x) (e) cos3 x = cos x + cos(3x)
4 4 4 4
4 3 1 1 4 3 1 1
(c) sin x = − cos(2x) + cos(4x) (f) cos x = + cos(2x) + cos(4x)
8 2 8 8 2 8
CHAPTER 10. FOURIER SERIES AND PDES 153
12. (Gibb’s Phenomenon) Pick a discontinuous function from any of the previous exercises. Use a computer
to graph the partial sums
k
X nπx nπx
fk (x) = a0 + an cos + bn cos
n=1
L L
for k = 5, 10, 50, 100. What do you notice happening near the point where f is discontinuous? Does
increasing k make this “bump” disappear? Try letting k be 1000 (it may take little while for the
computer to construct your solution).