Professional Documents
Culture Documents
This set of notes reviews complex numbers and their properties. We then examine
the use of complex numbers to solve second-order ordinary differential equations, using the
mass-spring system as our example.
Introduction
Complex numbers generalizes the idea of a real number to include an imaginary component.
Imaginary numbers contain a factor of i, where
(1)
i 1.
No real number follows this definition, so we invent the imaginary number. A complex
number, z, is a number of the form
z = x + iy,
(2)
where x and y are both real. So, for example
z = 2 + 2i
z = 4
z = 6i
are all complex numbers. In the first case z has both a real and imaginary part, while z is
purely real in the second case, and purely imaginary in the third. With this in mind, we can
define x in Eq. (2) to be the real part of the complex number z; in other words,
x Re [z] ,
(3)
(4)
So, in our earlier examples of complex numbers, when z = 2 + 2i, then Re [z] = 2, while
Im [z] = 2, and when z = 6i, then Re [z] = 0, and Im [z] = 6.
We can define another quantity, called the complex conjugate of z, denoted z , which
is obtained from z simply by changing the sign of the imaginary part; i.e., by letting i i.
Then, if z is given by Eq. (2), then
z x iy.
(5)
(6)
Im[z]
(x,y)
r
T
Re[z]
Looking at the graph, we see that the vector describing the complex number has a
magnitude, and also makes an angle with the real axis. Treating these values like ordinary
polar coordinates we see that we can define
Re [z] = x = r cos
Im [z] = y = r sin .
(7)
p
x2 + y 2 = |z|2 = zz ,
= tan
(8)
y
,
(9)
x
and so complex numbers really do mimic (two-dimensional) vectors. Now, based on the
graph we can write our complex number in another way. Using Eqs. (7) we can write
z = x + iy = r (cos + i sin ) .
(10)
"
X
2n
2n+1
X
r (cos + i sin ) = r
(1)n
+i
(1)n
.
(2n)!
(2n
+
1)!
n=0
n=0
,
2!
3!
4!
2
which we can recognize as the Taylor series for ei . Thus, we find the extremely useful Eulers
Law (or relation),
ei = cos + i sin ,
(11)
which we can use to rewrite our complex number as
z = x + iy = rei = r (cos + i sin ) .
(12)
ei +ei
2
ei ei
.
2i
cos =
sin =
(14)
i=
1 + i
We can do similar calculations such as 11/4 , which has four roots! So, we see that complex
numbers can be extremely useful. We now turn to another application, which is just as
useful.
3
3.1
We begin with the simple case of an undamped, unforced mass on a spring. The mass obeys
Hookes law, which says that F = kx = m
x, and so the acceleration,
x =
k
x 02 x,
m
p
where we have defined the harmonic frequency, 0
k/m. Hookes law is a secondorder (two derivatives), ordinary (no partial derivatives), linear (no terms like x 2 , etc.),
differential equation with constant coefficients (there are no terms like x
x, and so on), and
is homogeneous (the differential equation is equal to zero). While its easy enough to guess
the solutions (sines and cosines) lets approach this equation from another direction, using
complex numbers. Suppose that we have the following differential equation,
x = 02 x,
subject to the initial conditions, x (0) = x0 and x (0) = 0; in other words, the system starts
from rest at x = x0 . Heres how we approach the problem (which always works for these
types of problems): we guess a solution of the form
x (t) = Aet ,
where A and are constants to be determined (from our two initial conditions). In order
to see if this is a solution we simply plug it in to our differential equation. Two derivatives
gives x = 2 Aet = 2 x, which is a solution only if 02 = 2 , meaning that = i0 .
Notice what we have done - weve changed a differential equation into an algebraic equation.
Since our differential equation is second-order, this means that we will have two solutions,
one involving +i0 , and the other i0 . Thus,
x (t) = Aei0 t + Bei0 t ,
where A and B are constants. Now, since x (0) = x0 then
x (0) = x0 = A + B,
4
x0 i0 t
e
+ ei0 t = x0 cos (0 t) ,
2
where we have used Eq. (14). Solving differential equations (of this form) always proceeds
in the same way, as well see in more complicated examples.
3.2
2 02 .
Again, lets take the case that x (0) = x0 and x (0) = 0, giving
x (0) = x0 = A + B,
while
x (0) = 0 = ( i) A ( + i) B,
which is solved by
A =
B =
and so
x0
2i
x0
,
2i
x0
0
0
+ x
eit + x20 hx
eiti
2i i
2i
h2 it
it
it
it
x0 et e +e
+ x0 et e e
2
2i
x0 et cos (t) + x0 et sin (t) .
x (t) = et
=
=
x0
2
x0
2
This is our solution, but it can be put into another form, as follows: First, multiply
and divide by a factor of
r
1p 2
2
0
1+ 2 =
+ 2 = ,
to find
0
cos (t) + sin (t) =
cos (t) +
sin (t)
0
0
Z
,
0
cos =
sin =
Z
Then we have
0
0
0
cos (t) +
sin (t) =
[cos (t) cos + sin (t) sin ] =
cos (t ) .
0
0
x0 0 t
e cos (t ) ,
3.3
Now we will include a forcing function, which we take to be F (t) = F0 cos (t), where F0 is
a constant, and is the driving frequency. We will take the damping term to be zero for
now, b 0. Then, our differential equation is (after dividing by m) gives
x + 02 x =
F0
cos (t) .
m
Again, this is not too tough a solution to guess, but well solve it using our complex methods.
Now, since the cosine is the real part of the complex exponential,
cos (t) = Re eit ,
we can imagine solving a different differential equation,
z + 02 z =
F0 it
e ,
m
and note that, since the cosine is the real part of our forcing function, then our solution
x (t) = Re [z (t)]. So, in other words, if we can figure out a solution to the differential
equation for z, well get a complex function z = x (t) + iy (t), then we can take the real part
of z (since we have a cosine forcing function) to get our solution for x (t). Notice that, if we
had a sine function, instead, then we would take the imaginary part of z.
So, we proceed as before, taking a solution z = Aet . Plugging in to the differential
equation gives
F0 it
2 Aet + 02 Aet =
e .
m
Comparing tells us that = i, meaning that the spring oscillates at the same frequency as
the forcing term. Canceling off the exponential provides the algebraic equation,
F0
,
2 + 02 A =
m
which tells us A,
A=
and so
z (t) =
F0 /m
,
02 2
F0 /m it
e .
02 2
Now, to get our solution to the x (t) equation, we just take the real part,
x (t) = Re [z (t)] =
F0 /m
cos (t) .
02 2
Notice that we can get resonance when = 0 , with this function blowing up, since we
didnt include any friction.
3.4
Now we consider the most general case, solving it in the same way. The method is the
same, but the algebra is a little messier. Our full differential equation is (making the same
definitions as before)
F0
cos (t) ,
x + 2 x + 02 x =
m
which we transform into
F0 it
z + 2 z + 02 z =
e .
m
Once again, well solve this equation, and then take the real part at the end. Now, we
proceed as before - this time well take for our guess
z (t) = Aeit ,
where we just set = i, since we know we have to cancel off the driving function. Plugging
this into the differential equation, and canceling of the exponentials gives
2 A + 2iA + 02 A =
F0
.
m
02
F0 /m
.
2 + 2i
Now, to make life easier, lets rationalize this expression, multiplying the top and bottom by
02 2 2i,
2
F0 /m
A= 2
0 2 2i .
2
(0 2 ) + 4 2 2
This means that the constant A has a real and imaginary part, which means that we have
to be a little careful. We can play the same games as before, defining our angle by
cos =
sin =
02 2
2
2
0 2 +4 2 2
(02 2 )
+4 2 2
such that
F0 /m
F0 /m
A= q
(cos i sin ) = q
ei
2
2
(02 2 ) + 4 2 2
(02 2 ) + 4 2 2
So, our solution for z is
F0 /m
z (t) = q
ei(t) .
2
(02 2 ) + 4 2 2
This is why we did all the algebra with A: to get a simple form for z (t). Now all we have
to do is to take the real part,
x (t) = q
F0 /m
(02
2
2)
cos (t ) .
4 2 2
Trying to solve this without the complex variables is doable, but its much more of a pain.
The complex variables method is much nicer, once you get the hang of it!