[Go to the Notes on Diffy Qs home page] [PDF version]
[next] [prev] [prev-tail] [tail] [up]
Note: less than 1 lecture, first part of §3.1 in EP
Let us consider the general second order linear differential equation
![]() |
We usually divide through by
to get
![]() | (2.1) |
where
,
, and
. The word linear means that the equation
contains no powers nor functions of
,
, and
.
In the special case when
we have a so-called homogeneous equation
![]() | (2.2) |
We have already seen some second order linear homogeneous equations.

If we know two solutions of a linear homogeneous equation, we know a lot more of them.
Theorem 2.1.1 (Superposition). Suppose
and
are two solutions of the homogeneous equation
(2.2). Then
![]() |
also solves (2.2) for arbitrary constants
and
.
That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We will prove this theorem because the proof is very enlightening and illustrates how linear equations work.
Proof: Let
. Then
![]() |
The proof becomes even simpler to state if we use the operator notation. An operator is an object that
eats functions and spits out functions (kind of like what a function is, but a function eats numbers and spits
out numbers). Define the operator
by
![]() |
The differential equation now becomes
. The operator (and the equation)
being linear means
that
. The proof above becomes
![]() |
Two different solutions to the second equation
are
and
.
Let us remind ourselves of the definition,
and
. Therefore,
these are solutions by superposition as they are linear combinations of the two exponential
solutions.
The functions
and
are sometimes more convenient to use than the exponential. Let us
review some of their properties.

Linear equations have nice and simple answers to the existence and uniqueness question.
Theorem 2.1.2 (Existence and uniqueness). Suppose
are continuous functions and
are
constants. The equation
![]() |
has exactly one solution
satisfying the initial conditions
![]() |
For example, the equation
with
and
has the solution
![]() |
The equation
with
and
has the solution
![]() |
Using
and
in this solution allows us to solve for the initial conditions in a cleaner way than if
we have used the exponentials.
The initial conditions for a second order ODE consist of two equations. Common sense tells us that if we have two arbitrary constants and two equations, then we should be able to solve for the constants and find a solution to the differential equation satisfying the initial conditions.
Question: Suppose we find two different solutions
and
to the homogeneous equation (2.2). Can
every solution be written (using superposition) in the form
?
Answer is affirmative! Provided that
and
are different enough in the following
sense. We will say
and
are linearly independent if one is not a constant multiple of the
other.
Theorem 2.1.3. Let
be continuous functions and take the homogeneous equation (2.2). Let
and
be two linearly independent solutions to (2.2). Then every other solution is of the
form
![]() |
That is,
is the general solution.
For example, we found the solutions
and
for the equation
. It is
obvious that sine and cosine are not multiples of each other. If
for some constant
, we
let
and this would imply
, which is preposterous. So
and
are linearly
independent. Hence
![]() |
is the general solution to
.
We will study the solution of nonhomogeneous equations in § 2.5. We will first focus on finding general solutions to homogeneous equations.
Exercise 2.1.4: Prove the superposition principle for nonhomogeneous equations. Suppose that
is a solution to
and
is a solution to
(same linear operator
).
Show that
solves
.
Exercise 2.1.5: For the equation
, find two solutions, show that they are linearly
independent and find the general solution. Hint: Try
.
Note that equations of the form
are called Euler’s equations or Cauchy-Euler
equations. They are solved by trying
and solving for
(we can assume that
for
simplicity).
Exercise 2.1.6: Suppose that
. a) Find a formula for the general solution
of
. Hint: Try
and find a formula for
. b) What happens when
or
?
We will revisit the case when
later.
Exercise 2.1.7: Same equation as in Exercise 2.1.6. Suppose
. Find a formula
for the general solution of
. Hint: Try
for the second solution.
If you have one solution to a second order linear homogeneous equation you can find another one. This is the reduction of order method.
If you wish to come up with the formula for reduction of order yourself, start by trying
. Then plug
into the equation, use the fact that
is a solution, substitute
,
and you have a first order linear equation in
. Solve for
and then for
. When solving for
,
make sure to include a constant of integration. Let us solve some famous equations using the
method.
Exercise 2.1.9 (Chebychev’s equation of order 1): Take
. a) Show that
is a solution. b) Use reduction of order to find a second linearly independent solution. c)
Write down the general solution.
Exercise 2.1.10 (Hermite’s equation of order 2):
Take
. a) Show that
is a solution. b) Use reduction of order to find
a second linearly independent solution. c) Write down the general solution.
Note: more than 1 lecture, second part of §3.1 in EP
Suppose we have the problem
![]() |
This is a second order linear homogeneous equation with constant coefficients. Constant coefficients
means that the functions in front of
,
, and
are constants, not depending on
.
To guess a solution, think of a function that you know stays essentially the same when we differentiate it, so that we can take the function and its derivatives, add some multiples of these together, and end up with zero.
Let us try a solution of the form
. Then
and
. Plug in to get

or
, then
is a solution. So let
and
.
The functions
and
are linearly independent. If they were not we could write
,
which would imply that
, which is clearly not possible. Hence, we can write the general solution
as
![]() |
We need to solve for
and
. To apply the initial conditions we first find
. We
plug in
and solve.

, and subtract the two equations to get
. Then
as
. Hence, the solution we are looking for is
![]() |
Let us generalize this example into a method. Suppose that we have an equation
![]() | (2.3) |
where
are constants. Try the solution
to obtain

is called the characteristic equation of the ODE. Solve for the
by using the
quadratic formula.
![]() |
Therefore, we have
and
as solutions. There is still a difficulty if
, but it is not hard to
overcome.
For another example of the first case, take the equation
. Here the characteristic equation
is
or
. Consequently,
and
are the two linearly independent
solutions.
Example 2.2.1: Find the general solution of
![]() |
The characteristic equation is
. The equation has a double root
. The general solution is, therefore,
![]() |
That
solves the equation is clear. If
solves the equation then we know we are done. Let us
compute
and
. Plug in
![]() |
We should note that in practice, doubled root rarely happens. If coefficients are picked truly randomly we are very unlikely to get a doubled root.
Let us give a short “proof” for why the solution
works when the root is doubled. This case is
really a limiting case of when the two roots are distinct and very close. Note that
is a solution
when the roots are distinct. When
goes to
in the limit this is like taking derivative of
using
as a variable. This limit is
, and hence this is a solution in the doubled root
case.
It may happen that a polynomial has some complex roots. For example, the equation
has no
real roots, but it does have two complex roots. Here we review some properties of complex
numbers.
Complex numbers may seem a strange concept especially because of the terminology. There is nothing
imaginary or really complicated about complex numbers. A complex number is simply a pair of real
numbers,
. We can think of a complex number as a point in the plane. We add complex
numbers in the straightforward way,
. We define a multiplication
by
![]() |
It turns out that with this multiplication rule, all the standard properties of arithmetic hold. Further, and
most importantly
.
Generally we just write
as
, and we treat
as if it were an unknown. You can just do
arithmetic with complex numbers just as you would do with polynomials. The property we just mentioned
becomes
. So whenever you see
you can replace it by
. The numbers
and
are
roots of
.
Note that engineers often use the letter
instead of
for the square root of
. We will use the
mathematicians convention and use
.
Exercise 2.2.3: Make sure you understand (that you can justify) the following identities:
,
,
,
,
,
,
. We can also define the exponential
of a complex number. We can do this by just writing down
the Taylor series and plugging in the complex number. Because most properties of the exponential
can be proved by looking at the Taylor series, we note that many properties still hold for the
complex exponential. For example,
. This means that
and hence if
we can compute
easily, we can compute
. Here we will use the so-called Euler’s
formula.
We also will need some notation. For a complex number
we call
the real part and
the
imaginary part of the number. Often the following notation is used,
![]() |
Now suppose that the equation
has a characteristic equation
which
has complex roots. By quadratic formula the roots are
. These are complex if
. In
this case we can see that the roots are
![]() |
As you can see, you will always get a pair of roots of the form
. In this case we can still write the
solution as
![]() |
However, the exponential is now complex valued. We would need to choose
and
to be complex
numbers to obtain a real valued solution (which is what we are after). While there is nothing particularly
wrong with this approach, it can make calculations harder and it is generally preferred to find two real
valued solutions.
Here we can use Euler’s formula. First let
![]() |
Then note that

We note that linear combinations of solutions are also solutions. Hence,

Theorem 2.2.3. Take the equation
![]() |
If the characteristic equation has the roots
(when
), then the general solution
is
![]() |
Example 2.2.2: Find the general solution of
, for a constant
.
The characteristic equation is
. Therefore, the roots are
and by the theorem we
have the general solution
![]() |
Example 2.2.3: Find the solution of
,
,
.
The characteristic equation is
. By completing the square we get
and hence the roots are
. By the theorem we have the general solution
![]() |
To find the solution satisfying the initial conditions, we first plug in zero to get
![]() |
Hence
and
. We differentiate
![]() |
We again plug in the initial condition and obtain
, or
. Hence the solution we are
seeking is
![]() |
Exercise 2.2.13: The method of this section applies to equations of other orders than two. We will
see higher orders later. Try to solve the first order equation
using the methods of this
section.
Exercise 2.2.14: Let us revisit Euler’s equations of Exercise 2.1.6. Suppose now that
. Find a formula for the general solution of
. Hint: Note
that
.
Note: somewhat more than 1 lecture, §3.2 and §3.3 in EP
After reading this lecture, it may be good to first try Project III from the IODE website: http://www.math.uiuc.edu/iode/.
Most equations that appear in applications tend to be second order. Higher order equations do appear from time to time, but it is a general assumption of modern physics that the world is “second order.”
The basic results about linear ODEs of higher order are essentially exactly the same as for second
order equations with 2 replaced by
. The important concept of linear independence is somewhat more
complicated when more than two functions are involved.
For higher order constant coefficient ODEs, the methods are also slightly harder, but we will not dwell on these. You can always use the methods for systems of linear equations from Chapter 3 to solve higher order constant coefficient equations.
So let us start with a general homogeneous linear equation
![]() | (2.4) |
Theorem 2.3.1 (Superposition). Suppose
,
, …,
are solutions of the homogeneous equation
(2.4). Then
![]() |
also solves (2.4) for arbitrary constants
, …,
.
We also have the existence and uniqueness theorem for nonhomogeneous linear equations.
Theorem 2.3.2 (Existence and uniqueness). Suppose
through
, and
are continuous functions
and
are constants. The equation
![]() |
has exactly one solution
satisfying the initial conditions
![]() |
When we had two functions
and
we said they were linearly independent if one was not the
multiple of the other. Same idea holds for
functions. In this case it is easier to state as follows. The
functions
,
, …,
are linearly independent if
![]() |
has only the trivial solution
. If we can write the equation with a nonzero constant,
say
, then we can solve for
as a linear combination of the others. If the functions are not
linearly independent, we say they are linearly dependent.
Example 2.3.1: Show
are linearly independent.
Let us give several ways to show this fact. Many textbooks (including [EP] and [F]) introduce Wronskians, but that is really not necessary here.
Let us write down
![]() |
We use rules of exponentials and write
. Then we have
![]() |
The left hand side is a third degree polynomial in
. It can either be identically zero, or it can have at
most 3 zeros. Therefore, it is identically zero and
and the functions are linearly
independent.
Let us try another way. As before we write
![]() |
This equation has to hold for all
. What we could do is divide through by
to get
![]() |
As the equation is true for all
, let
. After taking the limit we see that
. Hence our
equation becomes
![]() |
Rinse, repeat!
How about yet another way. We again write
![]() |
We can evaluate the equation and its derivatives at different values of
to obtain equations for
,
,
and
. Let us first divide by
for simplicity.
![]() |
We set
to get the equation
. Now differentiate both sides
![]() |
We set
to get
. We divide by
again and differentiate to get
. It is
clear that
is zero. Then
must be zero as
, and
must be zero because
.
There is no one best way to do it. All of these methods are perfectly valid.
Example 2.3.2: On the other hand, the functions
,
, and
are linearly dependent. Simply
apply definition of the hyperbolic cosine:
![]() |
When we have a higher order constant coefficient homogeneous linear equation. The song and
dance is exactly the same as it was for second order. We just need to find more solutions. If the
equation is
order we need to find
linearly independent solutions. It is best seen by
example.
Example 2.3.3: Find the general solution to
![]() | (2.5) |
Try:
. We plug in and get
![]() |
We divide through by
. Then
![]() |
The trick now is to find the roots. There is a formula for the roots of degree 3 and 4 polynomials but it is
very complicated. There is no formula for higher degree polynomials. That does not mean that the roots
do not exist. There are always
roots for an
degree polynomial. They might be repeated and they
might be complex. Computers are pretty good at finding roots approximately for reasonable size
polynomials.
Best place to start is to plot the polynomial and check where it is zero. Or you can try plugging in.
Sometimes it is a good idea to just start plugging in numbers
and see if you get
a hit. There are some signs that you might have missed a root. For example, if you plug in
into our
polynomial you get
. If you plug in 0 you get 3. That means there is a root between
and 0
because the sign changed.
A good strategy at first is to look for roots
, 1, or 0, these are easy to see. Our polynomial happens
to have two roots
and
. There must be 3 roots and the last root is reasonably easy to find.
The constant term in a polynomial is the multiple of the negations of all the roots because
. In our case we see that
![]() |
You should check that
really is a root. Hence we know that
,
and
are solutions to
(2.5). They are linearly independent as can easily be checked, and there are 3 of them, which happens to
be exactly the number we need. Hence the general solution is
![]() |
Suppose we were given some initial conditions
,
, and
.
Then

,
and
. The specific solution to the ODE
is
![]() |
Next, suppose that we have real roots, but they are repeated. Let us say we have a root
repeated
times. In the spirit of the second order solution, and for the same reasons, we have the
solutions
![]() |
We take a linear combination of these solutions to find the general solution.
![]() |
We note that the characteristic equation is
![]() |
By inspection we note that
. Hence the roots given with multiplicity are
. Thus the general solution is
![]() |
Similarly to the second order case we can handle complex roots. Complex roots always come in pairs
. Suppose we have two such complex roots, each repeated
times. The corresponding
solution is
![]() |
where
, …,
,
, …,
are arbitrary constants.
![]() |
The characteristic equation is

, both with multiplicity 2. Hence the general solution to the ODE
is
![]() |
The way we solved the characteristic equation above is really by guessing or by inspection. It is not so easy in general. We could also have asked a computer or an advanced calculator for the roots.
Exercise 2.3.4: Suppose that the characteristic equation for a differential equation is
. a) Find such a differential equation. b) Find its general solution.
Exercise 2.3.5: Suppose that a fourth order equation has a solution
. a) Find such
an equation. b) Find the initial conditions which the given solution satisfies.
Exercise 2.3.6: Find the general solution for the equation of Exercise 2.3.5.
Exercise 2.3.7: Let
,
, and
. Are
,
,
and
linearly independent? If so, show it, if not, find a linear combination that works.
Exercise 2.3.8: Let
,
, and
. Are
,
, and
linearly independent? If so, show it, if not, find a linear combination that works.
Exercise 2.3.9: Are
,
, and
linearly independent? If so, show it, if not, find a linear
combination that works.
Exercise 2.3.10: Are
,
, and
linearly independent? If so, show it, if not, find a linear
combination that works.
Note: 2 lectures, §3.4 in EP
Let us look at some applications of linear second order constant coefficient equations.
Our first example is a mass on a spring. Suppose we have a mass
(in kilograms) connected by a
spring with spring constant
(in Newtons per meter) to a fixed wall. There may be some external
force
(in Newtons) acting on the mass. Finally, there is some friction measured by
(in
Newton-seconds per meter) as the mass slides along the floor (or perhaps there is a damper
connected).
Let
be the displacement of the mass (
is the rest position), with
growing to the right
(away from the wall). The force exerted by the spring is proportional to the compression of the
spring by Hooke’s law. Therefore, it is
in the negative direction. Similarly the amount
of force exerted by friction is proportional to the velocity of the mass. By Newton’s second
law we know that force equals mass times acceleration and hence
or
![]() |
This is a linear second order constant coefficient ODE. We set up some terminology about this equation. We say the motion is
(if
is not identically zero),
(if
is identically zero),
, and
.This system is appears in lots of applications even if it does not at first seems like it. Many real world scenarios can be simplified to a mass on a spring. For example, a bungee jump setup is essentially a mass and spring system (you are the mass). It would be good if someone did the math before you jump off the bridge, right? Let us give 2 other examples.
Here is an example for electrical engineers. Suppose that you have the pictured RLC circuit. There is a
resistor with a resistance of
ohms, an inductor with an inductance of
henries, and a
capacitor with a capacitance of
farads. There is also an electric source (such as a battery)
giving a voltage of
volts at time
(measured in seconds). Let
be the charge in
columbs on the capacitor and
be the current in the circuit. The relation between the two is
. By elementary principles we have that
. If we differentiate we
get
![]() |
This is an nonhomogeneous second order constant coefficient linear equation. Further, as
, and
are all positive, this system behaves just like the mass and spring system. The
position of the mass is replaced by the current. Mass is replaced by the inductance, damping is
replaced by resistance and the spring constant is replaced by one over the capacitance. The
change in voltage becomes the forcing function. Hence for constant voltage this is an unforced
motion.
Our next example is going to behave like a mass and spring system only approximately. Suppose
we have a mass
on a pendulum of length
. We wish to find an equation for the angle
. Let
be the force of gravity. Elementary physics mandates that the equation is of the
form
![]() |
This equation can be derived using Newton’s second law; force equals mass times acceleration. The
acceleration is
and mass is
. So
has to be equal to the tangential component of the force
given by the gravity. This is
in the opposite direction. The
curiously cancels from the
equation.
Now we make our approximation. For small
we have that approximately
. This can be
seen by looking at the graph. In Figure 2.1 we can see that for approximately
(in
radians) the graphs of
and
are almost the same.
Therefore, when the swings are small,
is always small and we can model the behavior by the
simpler linear equation
![]() |
Note that the errors that we get from the approximation build up so over a very long time, the behavior might change more substantially. Also we will see that in a mass spring system, the amplitude is independent of the period, this is not true for a pendulum. But for reasonably short periods of time and small swings (for example if the length of the pendulum is very large), the behavior is reasonably close.
In real world problems it is very often necessary to make these types of simplifications. Therefore, it is good to understand both the mathematics and the physics of the situation to see if the simplification is valid in the context of the questions we are trying to answer.
In this section we will only consider free or unforced motion, as we cannot yet solve nonhomogeneous
equations. Let us start with undamped motion where
. We have the equation
![]() |
If we divide by
and let
, then we can write the equation as
![]() |
The general solution to this equation is
![]() |
By a trigonometric identity, we have that for two different constants
and
, we have
![]() |
It is not hard to compute that
and
. Therefore, we can write
, and let
and
be our arbitrary constants.
Exercise 2.4.1: Justify this identity and verify the equations for
and
. Hint: Start with
and multiply by
. Then think what should
and
be.
While it is generally easier to use the first form with
and
to solve for the initial conditions, the
second form is much more natural. The constants
and
have very nice interpretation. We look at the
form of the solution
![]() |
We can see that the amplitude is
,
is the (angular) frequency, and
is the so-called phase shift.
The phase shift just shifts the graph left or right. We call
the natural (angular) frequency. This entire
setup is usually called simple harmonic motion.
Let us pause to explain the word angular before the word frequency. The units of
are radians per
unit time, not cycles per unit time as is the usual measure of frequency. Because we know one cycle is
radians, the usual frequency is given by
. It is simply a matter of where we put the constant
, and
that is a matter of taste.
The period of the motion is one over the frequency (in cycles per unit time) and hence
. That is the
amount of time it takes to complete one full oscillation.
Example 2.4.1: Suppose that
and
. The whole mass and spring setup is sitting
on a truck that was traveling at 1 m/s. The truck crashes and hence stops. The mass was held in
place 0.5 meters forward from the rest position. During the crash the mass gets loose. That is,
the mass is now moving forward at 1 m/s, while the other end of spring is held in place. The
mass therefore starts oscillating. What is the frequency of the resulting oscillation and what is the
amplitude. The units are the mks units (meters-kilograms-seconds).
The setup means that the mass was at half a meter in the positive direction during the crash and relative to the wall the spring is mounted to, the mass was moving forward (in the positive direction) at 1 m/s. This gives us the initial conditions.
So the equation with initial conditions is
![]() |
We can directly compute
. Hence the angular frequency is 2. The usual frequency in
Hertz (cycles per second) is
.
The general solution is
![]() |
Letting
means
. Then
. Letting
we get
. Therefore, the amplitude is
. The solution
is
![]() |
A plot of
is shown in Figure 2.2.
For the free undamped motion, if the solution is of the form
![]() |
this corresponds to the initial conditions
and
.
Therefore, it is easy to figure out
and
first, and compute the amplitude and the phase shift using
and
. In the example, we have already found
. Let us compute the phase shift. We
know that
. We take the arctangent of 1 and get approximately 0.785. As you
may recall, we still need to check if this
is in the right quadrant. Since both
and
are positive, then
should be in the first quadrant, and 0.785 radians really is in the first
quadrant.
Note: Many calculators and computer software do not only have the atan function for arctangent, but
also what is sometimes called atan2. This function takes two arguments,
and
, and returns a
in
the correct quadrant for you.
Let us now focus on damped motion. Let us rewrite the equation
![]() |
as
![]() |
where
![]() |
The characteristic equation is
![]() |
Using the quadratic formula we get that the roots are
![]() |
The form of the solution depends on whether we get complex or real roots. We get real roots if and only if the following number is nonnegative.
![]() |
The sign of
is the same as the sign of
. Thus we get real roots if and only if
is nonnegative.
When
, we say the system is overdamped. In this case, there are two distinct real roots
and
. Notice that both roots are negative. As
is always less than
, then
is negative.
Figure 2.3: Overdamped motion for several different initial
conditions.
The solution is
![]() |
Since
are negative,
as
. Thus the mass will tend towards the rest
position as time goes to infinity. For a few sample plots for different initial conditions see
Figure 2.3.
Do note that no oscillation happens. In fact, the graph will cross the
axis at most once. To see why,
we try to solve
. Therefore,
and using laws of exponents we
obtain
![]() |
This equation has at most one solution
. For some initial conditions the graph will never cross the
axis, as is evident from the sample graphs.
Example 2.4.2: Suppose the mass is released from rest. That is
and
.
Then
![]() |
It is not hard to see that this satisfies the initial conditions.
When
, we say the system is critically damped. In this case, there is one root of multiplicity
2 and this root is
. Therefore, our solution is
![]() |
The behavior of a critically damped system is very similar to an overdamped system. After all a critically damped system is in some sense a limit of overdamped systems. Since these equations are really only an approximation to the real world, in reality we are never critically damped, it is a place you can only reach in theory. You are always a little bit underdamped or a little bit overdamped. It is better not to dwell on critical damping.
Figure 2.4: Underdamped motion with the envelope curves shown.
When
, we say the system is underdamped. In this case, the roots are complex.
![]() |
where
. Our solution is
![]() |
or
![]() |
An example plot is given in Figure 2.4. Note that we still have that
as
.
In the figure we also show the envelope curves
and
. The solution is the oscillating
line between the two envelope curves. The envelope curves give the maximum amplitude of
the oscillation at any given point in time. For example if you are bungee jumping, you are
really interested in computing the envelope curve so that you do not hit the concrete with your
head.
The phase shift
just shifts the graph left or right but within the envelope curves (the envelope curves
do not change if
changes).
Finally note that the angular pseudo-frequency (we do not call it a frequency since the solution is not
really a periodic function)
becomes lower when the damping
(and hence
) becomes larger. This
makes sense. When we change the damping just a little bit, we do not expect the behavior of the
solution to change dramatically. If we keep making
larger, then at some point the solution
should start looking like the solution for critical damping or overdamping, where no oscillation
happens.
On the other hand when
becomes smaller,
approaches
(
is always smaller than
),
and the solution looks more and more like the steady periodic motion of the undamped case. The envelope
curves become flatter and flatter as
goes to 0.
Exercise 2.4.2: Consider a mass and spring system with a mass
, spring constant
,
and damping constant
. a) Set up and find the general solution of the system. b) Is the system
underdamped, overdamped or critically damped? c) If the system is not critically damped, find a
which makes the system critically damped.
Exercise 2.4.3: Do Exercise 2.4.2 for
,
, and
.
Exercise 2.4.4: Using the mks units (meters-kilograms-seconds), suppose you have a spring with
spring constant 4 N/m. You want to use it to weight items. Assume no friction. You place the mass
on the spring and put it in motion. a) You count and find that the frequency is 0.8 Hz (cycles per
second). What is the mass? b) Find a formula for the mass
given the frequency
in Hz.
Exercise 2.4.5: Suppose we add possible friction to Exercise 2.4.4. Further, suppose you do not
know the spring constant, but you have two reference weights 1 kg and 2 kg to calibrate your
setup. You put each in motion on your spring and measure the frequency. For the 1 kg weight you
measured 1.1 Hz, for the 2 kg weight you measured 0.8 Hz. a) Find
(spring constant) and
(damping constant). b) Find a formula for the mass in terms of the frequency in Hz. Note that there
may be more than one possible mass for a given frequency. c) For an unknown object you measured
0.2 Hz, what is the mass of the object? Suppose that you know that the mass of the unknown object
is more than a kilogram.
Exercise 2.4.6: Suppose you wish to measure the friction a mass of 0.1 kg experiences as it slides
along a floor (you wish to find
). You have a spring with spring constant
. You take the
spring, you attach it to the mass and fix it to a wall. Then you pull on the spring and let the mass
go. You find that the mass oscillates with frequency 1 Hz. What is the friction?
Note: 2 lectures, §3.5 in EP
We have solved linear constant coefficient homogeneous equations. What about nonhomogeneous linear ODEs? For example, the equations for forced mechanical vibrations. That is, suppose we have an equation such as
![]() | (2.6) |
We will generally write
instead when the operator is not important. We solve (2.6)
in the following manner. We find the general solution
to the associated homogeneous
equation
![]() | (2.7) |
We call
the complementary solution. We also find a single particular solution
to (2.6) in some way
and then
![]() |
is the general solution to (2.6) (we will see why in a moment).
Note that
can be any solution. Suppose you find a different particular solution
.
Write the difference as
. Then plug
into the left hand side of the equation to
get
![]() |
In other words,
is a complementary solution. Using the operator notation the calculation becomes
simpler. As
is a linear operator and so we could just write
![]() |
So
is a solution to (2.7). Any two solutions of (2.6) differ by a solution to the homogeneous
equation (2.7). The solution
includes all solutions to (2.6), since
is the general solution to
the associated homogeneous equation.
Theorem 2.5.1. Let
be a linear ODE (not necessarily constant coefficient). Let
be the
general solution to the associated homogeneous equation
and let
be any particular solution
to
. Then the general solution to
is
![]() |
The moral of the story is that we can find the particular solution in any old way. If we find a different particular solution (by a different method, or simply by guessing), then we still get the right general solution to the whole problem. The formula may look different and the constants you will have to choose given the initial conditions may be different, but it is the same solution.
The trick is to somehow, in a smart way, guess one particular solution to (2.6). Note that
is a
polynomial, and the left hand side of the equation will be a polynomial if we let
be a polynomial of the
same degree. Let us try
![]() |
We plug in to obtain
![]() |
So
. Therefore,
and
. That means
.
Solving the complementary problem (Exercise!) we get
![]() |
Hence the general solution to (2.6) is
![]() |
Now suppose we are further given some initial conditions. For example,
and
. First
find
. Then
![]() |
We solve to get
and
. The particular solution we want is
![]() |
Exercise 2.5.1: Check that
really solves the equation (2.6) and the given initial conditions.
Note: A common mistake is to solve for constants using the initial conditions with
and only adding
the particular solution
after that. That will not work. You need to first compute
and only
then solve for the constants using the initial conditions.
A right hand side consisting of exponentials, sines, and cosines can be handled similarly. For example,
![]() |
Let us simply find some
. We notice that we may have to also guess
since derivatives of cosine
are sines. We guess
![]() |
We plug
into the equation and we get
![]() |
The left hand side must equal to right hand side. We group terms and we get that
and
. So
and
and hence
and
.
So
![]() |
Similarly, if the right hand side contains exponentials we guess exponentials. For example, if the
equation is (where
is a linear constant coefficient operator)
![]() |
we will guess
. We note also that using the product rule for differentiation gives us a way to
combine these guesses. If we can guess a form for
such that
has all the terms needed to for the
right hand side, that is a good place to start. For example,
![]() |
We will guess
![]() |
We will plug in and then hopefully get equations that we can solve for
. As you can see
this can make for a very long and tedious calculation very quickly. C’est la vie!
There is one hiccup in all this. It could be that our guess actually solves the associated homogeneous equation. That is, suppose we have
![]() |
We would love to guess
, but if we plug this into the left hand side of the equation we
get
![]() |
There is no way we can choose
to make the left hand side be
. The trick in this case is to multiply
our guess by
until we get rid of duplication with the complementary solution. That is first we compute
(solution to
)
![]() |
and we note that the
term is a duplicate with our desired guess. We modify our guess to
and notice there is no duplication anymore. Let us try. Note that
and
. So
![]() |
So
is supposed to equal
. Hence,
and so
. Thus we can now write the general
solution as
![]() |
Now what about the case when multiplying by
does not get rid of duplication. For
example,
![]() |
Note that
. So guessing
would not get us anywhere. In this
case we want to guess
. Basically, we want to multiply our guess by
until all
duplication is gone. But no more! Multiplying too many times will also make the process not
work.
Finally what if the right hand side is several terms, such as
![]() |
In this case we find
that solves
and
that solves
(do each term separately).
Then note that if
, then
. This is because
is linear; we have
.
The method of undetermined coefficients will work for many basic problems that crop up. But it does not
work all the time. It only works when the right hand side of the equation
has only finitely
many linearly independent derivatives, so that we can write a guess that consists of them all. Some
equations are a bit tougher. Consider
![]() |
Note that each new derivative of
looks completely different and cannot be written as a linear
combination of the previous derivatives. We get
,
, etc….
This equation calls for a different method. We present the method of variation of parameters, which
will handle any equation of the form
, provided we can solve certain integrals. For simplicity,
we will restrict ourselves to second order equations, but the method will work for higher order equations
just as well (but the computations will be more tedious).
Let us try to solve the example.
![]() |
First we find the complementary solution
. We get
, where
and
. Now to try to find a solution to the nonhomogeneous equation we try
![]() |
where
and
are functions and not constants. We are trying to satisfy
. That gives us one
condition on the functions
and
. Compute (note the product rule!)
![]() |
We can still impose one more condition at our will to simplify computations (we have two unknown
functions, so we are allowed two conditions). We require that
. This makes computing
the second derivative easier.

and
are solutions to
, we know that
and
. (Note: If the equation
was instead
we would have
.) So
![]() |
Now note that
![]() |
and hence
![]() |
For
to satisfy
we must have
.
So what we need to solve are the two equations (conditions) we imposed on
and
![]() |
We can now solve for
and
in terms of
,
and
. You will always get these formulas for
any
. There is a general formula for the solution you can just plug into, but it is better to just
repeat what we do below. In our case the two equations become



and
to get
and
.

![]() |
is, therefore,
![]() |
Exercise 2.5.5: Setup the form of the particular solution but do not solve for the coefficients for
.
Exercise 2.5.6: Setup the form of the particular solution but do not solve for the coefficients for
.
Exercise 2.5.7: a) Using variation of parameters find a particular solution of
.
b) Find a particular solution using undetermined coefficients. c) Are the two solutions you found
the same? What is going on?
Exercise 2.5.8: Find a particular solution of
. It is OK to leave the answer
as a definite integral.
Note: 2 lectures, §3.6 in EP
Let us return back to the mass on a spring example. We will now consider the case of forced oscillations. That is, we will consider the equation
![]() |
for some nonzero
. The setup is again:
is mass,
is friction,
is the spring constant and
is an external force acting on the mass.
What we are interested in is some periodic forcing, such as noncentered rotating parts,
or perhaps even loud sounds or other sources of periodic force. Once we will learn about
Fourier series we will see that we will essentially cover every type of periodic function by
considering only
(or sine instead of cosine, the calculations will be essentially the
same).
First let us consider undamped (
) motion for simplicity. We have the equation
![]() |
This equation has the complementary solution (solution to the associated homogeneous equation)
![]() |
where
is the natural frequency (angular). It is the frequency at which the system “wants to
oscillate” without external interference.
Let us suppose that
. Try the solution
and solve for
. Note that we need not
have sine in our trial solution as on the left hand side we will only get cosines anyway. If
you include a sine it is fine; you will find that its coefficient will be zero (I could not find a
rhyme).
We solve using the method of undetermined coefficients. We find that
![]() |
We leave it as an exercise to do the algebra required.
The general solution is
![]() |
or written another way
![]() |
Hence it is a superposition of two cosine waves at different frequencies.
![]() |
Let us compute. First we read off the parameters:
,
,
,
. The
general solution is
![]() |
Solve for
and
using the initial conditions. It is easy to see that
and
.
Hence
![]() |
Figure 2.5: Graph of
.
Notice the “beating” behavior in Figure 2.5. First use the trigonometric identity
![]() |
to get that
![]() |
Notice that
is a high frequency wave modulated by a low frequency wave.
Now suppose that
. Obviously, we cannot try the solution
and then
use the method of undetermined coefficients. We notice that
solves the associated
homogeneous equation. Therefore, we need to try
. This time we do
need the sine term since the second derivative of
does contain sines. We write the
equation
![]() |
Plugging into the left hand side we get
![]() |
Hence
and
. Our particular solution is
and our general solution
is
![]() |
Figure 2.6: Graph of
.
The important term is the last one (the particular solution we found). We can see that this term grows
without bound as
. In fact it oscillates between
and
. The first two terms only oscillate
between
, which becomes smaller and smaller in proportion to the oscillations of the last
term as
gets larger. In Figure 2.6 we see the graph with
,
,
,
.
By forcing the system in just the right frequency we produce very wild oscillations. This kind of behavior is called resonance or sometimes pure resonance. Sometimes resonance is desired. For example, remember when as a kid you could start swinging by just moving back and forth on the swing seat in the correct “frequency”? You were trying to achieve resonance. The force of each one of your moves was small, but after a while it produced large swings.
On the other hand resonance can be destructive. In an earthquake some buildings collapse while others may be relatively undamaged. This is due to different buildings having different resonance frequencies. So figuring out the resonance frequency can be very important.
A common (but wrong) example of destructive force of resonance is the Tacoma
Narrows bridge failure. It turns out there was an altogether different phenomenon at play
there
.
In real life things are not as simple as they were above. There is, of course, some damping. Our equation becomes
![]() | (2.8) |
for some
. We have solved the homogeneous problem before. We let
![]() |
We replace equation (2.8) with
![]() |
We find the roots of the characteristic equation of the associated homogeneous problem are
. The form of the general solution of the associated homogeneous equation
depends on the sign of
, or equivalently on the sign of
, as we have seen before. That
is
![]() |
where
. In any case, we can see that
as
. Furthermore,
there can be no conflicts when trying to solve for the undetermined coefficients by trying
. Let us plug in and solve for
and
. We get (the tedious details are left to
reader)
![]() |
We get that

to be
![]() |
Thus our particular solution is
![]() |
Or in the other notation we have amplitude
and phase shift
where (if
)
![]() |
Hence we have
![]() |
If
we see that
,
, and
.
The exact formula is not as important as the idea. You should not memorize the above formula, you
should remember the ideas involved. For different forcing function
, you will get a different formula for
. So there is no point in memorizing this specific formula. You can always recompute it later or look it
up if you really need it.
For reasons we will explain in a moment, we will call
the transient solution and denote it by
.
We will call the
we found above the steady periodic solution and denote it by
. The general
solution to our problem is
![]() |
Figure 2.7: Solutions with different initial conditions for parameters
,
,
,
, and
.
We note that
goes to zero as
, as all the terms involve an exponential with a negative
exponent. Hence for large
, the effect of
is negligible and we will essentially only see
.
Hence the name transient. Notice that
involves no arbitrary constants, and the initial
conditions will only affect
. This means that the effect of the initial conditions will be negligible
after some period of time. Because of this behavior, we might as well focus on the steady
periodic solution and ignore the transient solution. See Figure 2.7 for a graph of different initial
conditions.
Notice that the speed at which
goes to zero depends on
(and hence
). The bigger
is (the
bigger
is), the “faster”
becomes negligible. So the smaller the damping, the longer the “transient
region.” This agrees with the observation that when
, the initial conditions affect the behavior for all
time (i.e. an infinite “transient region”).
Let us describe what we mean by resonance when damping is present. Since there were no conflicts
when solving with undetermined coefficient, there is no term that goes to infinity. What we will look at
however is the maximum value of the amplitude of the steady periodic solution. Let
be the amplitude
of
. If we plot
as a function of
(with all other parameters fixed) we can find its
maximum. We call the
that achieves this maximum the practical resonance frequency. We
call the maximal amplitude
the practical resonance amplitude. Thus when damping is
present we talk of practical resonance rather than pure resonance. A sample plot for three
different values of
is given in Figure 2.8. As you can see the practical resonance amplitude
grows as damping gets smaller, and any practical resonance can disappear when damping is
large.
showing practical resonance with parameters
,
,
. The top line is with
, the middle line with
, and the bottom line with
.
To find the maximum we need to find the derivative
. Computation shows
![]() |
This is zero either when
or when
. In other words,
when
![]() |
It can be shown that if
is positive then
is the practical resonance frequency
(that is the point where
is maximal, note that in this case
for small
). If
is the maximum, then essentially there is no practical resonance since we assume that
in our system. In this case the amplitude gets larger as the forcing frequency gets
smaller.
If practical resonance occurs, the frequency is smaller than
. As damping
(and hence
)
becomes smaller, the closer the practical resonance frequency goes to
. So when damping is very
small,
is a good estimate of the resonance frequency. This behavior agrees with the observation that
when
, then
is the resonance frequency.
The behavior will be more complicated if the forcing function is not an exact cosine wave, but for example a square wave. It will be good to come back to this section once you have learned about the Fourier series.
Exercise 2.6.3: Take
. Fix
and
. Now think of the
function
. For what values of
(solve in terms of
,
, and
) will there be no practical
resonance (that is, for what values of
is there no maximum of
for
).
Exercise 2.6.4: Take
. Fix
and
. Now think of the
function
. For what values of
(solve in terms of
,
, and
) will there be no practical
resonance (that is, for what values of
is there no maximum of
for
).
Exercise 2.6.5: Suppose a water tower in an earthquake acts as a mass-spring system. Assume
that the container on top is full and the water does not move around. The container then acts as a
mass and the support acts as the spring, where the induced vibrations are horizontal. Suppose that
the container with water has a mass of
10,000 kg. It takes a force of 1000 newtons to displace
the container 1 meter. For simplicity assume no friction.
Suppose that an earthquake induces an external force
.
a) What is the natural frequency of the water tower.
b) If
is not the natural frequency, find a formula for the amplitude of the resulting
oscillations of the water container.
c) Suppose
and an earthquake with frequency 0.5 cycles per second comes. What is the
amplitude of the oscillations. Suppose that if the water tower moves more than 1.5 meter, the tower
collapses. Will the tower collapse?