The world moves and so do many things that occur naturally or are made by humans. Because of this, when engineers or scientists want to mathematically model a system or process, they frequently need to identify not only the variables of interest (like position), but the rate of change of these variables (like velocity). These mathematical models are equations that relate the variables and their rates of change. Equations like this are called differential equations and how to solve these equations is usually introduced to students after they have studied calculus. And solutions to these equations frequently have complex numbers in them.

What is a complex number? A complex number is defined using the definition of the imaginary unit, *i*:

This may look like a crime against mathematics as through much of our maths education, we were told that you cannot take the square root of a negative number. This is reinforced by trying to take the square root of a negative number on many calculators resulting in an error. But it turned out that this invention had some usefulness in maths.

Numbers like *bi* where *b* is a real number are called imaginary numbers. If you add a real number *a* to this, *a* + *bi*, you get a *complex number*, where *a* is the real part and *b* is the imaginary part. There is a lot of theory surrounding complex numbers, but I will only cover what is necessary for this post.

Complex numbers satisfy many of the properties you are familiar with using real numbers including the rules involving exponents. So using a complex number as an exponent to the natural base *e* (a number, like π, which is frequently used in engineering), the expression can be split into two parts:

You are familiar with *e ^{a}*, but what do we do with

*e*

^{bi}? This is actually a complex number as well and can be put into a standard form using Euler’s formula:

In textbooks, the right side of the above equation is abbreviated as cis *b*. So

So what can imaginary numbers tell us about the real world? Well, the “useless” things you were taught about quadratic equations, are about to become useful.

### The Damped Harmonic Oscillator

There are many things that oscillate, but not forever: electronic circuits, your car when it hits a bump, aircraft when they hit an air pocket. A simple example is a mass on a spring with a damper attached:

There’s a lot of physics happening here. But all you need to know is that there are 3 main forces affecting the motion of the mass. These forces are created by: gravity (which creates an acceleration downward), spring (proportional to the position of the mass), and damper (proportional to the velocity of the mass). What is the position of the mass at any time *t*?

Using Newton’s second law, *F* = *ma*, the following differential equation can be generated. A differential equation is an equation that relates a variable (in this case, the position *x*) with its rates of change (in this case velocity and acceleration):

where *x* is the position of the mass relative to a reference point, *b* is the damping coefficient (how strong is the damper), *k* is the spring constant (how strong is the spring), *x* with one dot above it is the rate of change of *x* with respect to time (commonly known as velocity), and *x* with two dots is the rate of change of velocity with respect to time (commonly known as acceleration).

Solving differential equations is a whole university course, but for this type of equation, the solution will be of the form:

\[x(t)=Ae^{πt}\]where *A* is the initial position of the mass at *t* = 0. So the problem reduces down to finding π. It turns out that π is the solution to the corresponding algebraic equation (called the characteristic equation):

So yes, here is an example where you use the quadratic skills you learned. Using the quadratic formula:

\[\lambda=\frac{-b\pm\sqrt{b^2-4mk}}{2m}\]The discriminant *b*^{2} – 4*mk*, dictates the type of solutions for π. In this post, I am interested in the case where *b*^{2} – 4*mk* < 0, the under damped case which is graphically shown in the animation above.

With a little bit of algebra and using the definition of *i* to factor out the β1 inside the square root (and what remains in the square root is positive):

If we let

\[\alpha=\frac{b}{2m}\text{ and }\omega=\sqrt{\frac{k}{m}-\frac{b^2}{4m^2}}\]then π = -βΊ Β± Ο*i*. So the solution is

Now it looks like we still have an imaginary part in the answer. We need a real solution that fits the real world. As I said before, solving differential equations is a separate subject usually studied at uni. In that subject, you would learn about the superposition principle where any linear combination of two separate solutions of a differential equation will also be a solution. Notice that we do in fact, have two solutions above: one using the + and the other using the β. Using relationships that exist for circular (trig) functions for sine and cosine, we can add these two solutions together and the imaginary part will cancel out, leaving only a real solution:

\[x(t)=Ae^{-\alpha t}\text{cos}(\omega t)\]As *t* grows, the cosine part of the solution just bounces up and down between Β±*A*. But the exponent of *e* gets more negative as *t* grows making *e*^{ββΊt} smaller, starting at 1 when *t* = 0. This generates the following curve:

Notice how the exponential part of the solution is an envelope that the cosine curve must fit into.

Instead of a mass hanging on a spring, the differential equation we started out with could represent your car’s suspension system which has springs and shock absorbers (dampers). Notice that we can change the parameters, the strengths of the springs and shock absorbers, to change the way a car handles bumps. The response in the graph above may be too loose and we may want to change the parameters to make the car settle down more quickly. This is engineering.