Damped oscillators: The math (technical)

Prerequisites

Putting a viscous damping term into Newton's 2nd law for a harmonic oscillator led to a more complex equation for the position as a function of time:

$$ma = -kx -bv$$

$$\frac{d^2x}{dt^2} + \gamma \frac{dx}{dt} + \omega_0^2 x = 0 \quad \quad \omega_0^2 = \frac{k}{m} \quad \gamma = \frac{b}{m}$$

This relates the second derivative of $x$ to the value of $x$ and its first derivative ($v$). There are general tools to solve this in courses on differential equations, but we can get to the solution by using some physical intuition and the product rule. This specifies that if we take the derivative of a product of two functions, $f(t)$ and $g(t)$, the derivative of their product is given by the following:

$$\frac{d}{dt}(f(t)g(t)) = \frac{df}{dt}g + f\frac{dg}{dt} $$

Now let's apply some physical intuition. When we had no damping, the result was simply a cosine oscillation (possible shifted though that isn't shown here because we are focusing on the time dependence):

$$x(t) = A_0 \cos{(\omega_0 t)}.$$

From our observations we see that the amplitude doesn't stay constant but keeps getting smaller. So let's hypothesize that it still oscillates (though possibly with a slightly different frequency) times a time-dependent amplitude:

$$x(t) = A(t) \cos{(\omega_1 t)}.$$

Now we have a solution that is a product of two time dependent functions: the amplitude and the cosine term. What we now need to do is differentiate this to get the velocity and then differentiate that to get the acceleration, put the results into our $F = ma$ equation and see what happens. This only uses the produc2\omega_1 t rule, but it's messy (but straightforward if we are careful).

When we differentiate this once, using the product rule we get this result for the velocity:

$$\frac{dx}{dt} = \frac{dA}{dt}\cos{(\omega_1t)} + A \frac{d}{dt}\cos{(\omega_1t)}$$

Differentiating again to get the acceleration, and using the product rule on each of our two terms gives four terms, two of which are the same. Collecting these together gives

$$\frac{d^2x}{dt^2} = \frac{d^2A}{dt^2} \cos{(\omega_1t)} - 2 \omega_1\frac{dA}{dt} \sin{(\omega_1t)} - \omega_1^2 \cos{(\omega_1t)}$$

Now if we put our acceleration expression and our velocity expression into our $F = ma$ equation (Eq. (2)) we get a mess:

$$ \bigg[\frac{d^2A}{dt^2} \cos{(\omega_1t)} - 2 \omega_1\frac{dA}{dt} \sin{(\omega_1t)}+ \omega_1^2 \cos{(\omega_1t)}\bigg] + \gamma \bigg[\frac{dA}{dt}\cos{(\omega_1t)} + A \frac{d}{dt}\cos{(\omega_1t)}\bigg] + \omega_0^2 \bigg[A\cos{(\omega_1t)}\bigg]  = 0$$

This looks awful, but we notice that there are cosine terms and sine terms. If we put all the cosine terms together on one side and all the sine terms together on the other side we get:

$$\cos{(\omega_1t)}\bigg[ \frac{d^2A}{dt^2} + \gamma \frac{dA}{dt} - (\omega_1^2 - \omega_0^2)A\bigg] = \sin{(\omega_1t)} \bigg[2 \omega_1\frac{dA}{dt} + \gamma \omega_1 A\bigg]$$

This still looks an intractable mess. How can we possibly solve it?

Since sine and cosine keep changing their values with time, the easiest way (the only way) to get this to work is to see if we can make both of the square bracket terms vanish — set the sine and cosine coefficients independently equal to zero. Then both sides would be equal to 0 and therefore equal to each other. The right side looks simpler so let's try it first:

$$2 \omega_1\frac{dA}{dt} + \gamma \omega_1 A = 0$$

$$2 \frac{dA}{dt} + \gamma  A = 0$$

$$\frac{dA}{dt} = -  \frac{1}{2}\gamma   A$$

In the first equation the constant $ω_1$ was in both terms so it canceled. We then solved for $dA/dt$ and found that it is proportional to $A$ times a constant. The function whose derivative is proportional to itself is the exponential. The result is:

$$A(t) = A_0 e^{-\gamma t/2} $$

where $A_0$ is an arbitrary constant (but turns out to be the amplitude at $t = 0$). Now, since we have decided we know $A$ we can deal with the left side (the cosine side) of our messy $F=ma$ equation

$$\frac{d^2A}{dt^2} + \gamma \frac{dA}{dt} - (\omega_1^2 - \omega_0^2)A = 0 $$

$$\big(-\frac{\gamma}{2}\big)^2 A + \gamma (-\frac{\gamma}{2})A  - (\omega_1^2 - \omega_0^2)A = 0 $$

where we have just put in that we know taking the derivative of $A$ just brings down a factor of $-γ/2$. Each term has a factor of $A$ so we can cancel that giving

$$\frac{\gamma^2}{4} - \frac{\gamma^2}{2}  - (\omega_1^2 - \omega_0^2) = 0$$

Our values of $γ$ and $ω_0$ are given in terms of the physical parameters and therefore known, but $ω_1$ we just put in to give us some freedom at the beginning, so it is an unknown. We can solve for it:

$$\omega_1^2 = \omega_0^2 - \frac{\gamma^2}{4}$$

This gives the full solution to the damped oscillator (as long as $γ/2 > ω_0$). Given the initial amplitude, $A_0$, and the physical parameters $γ/2$ and $ω_0$, the solution is the one we guessed at the beginning

$$x(t) = A(t) \cos{(\omega_1 t)}.$$

with

$$A(t) = A_0 e^{-\gamma t/2} $$

$$\omega_1^2 = \omega_0^2 - \frac{\gamma^2}{4}.$$

Of course our most general solution might not start at a maximum when t = 0. So in general we have to add a phase shift giving a general solution for our damped oscillator model:

$$x(t) = A_0 e^{-\gamma t/2} \cos{(\omega_1 t +\phi)}.$$

$$\omega_1 = \sqrt{\omega_0^2 - \frac{\gamma^2}{4}}.$$

This expresses our solution in terms of the physical parameters of our system, $ω_0$ and $γ$ (which, you should recall, are combinations of our physical parameters $k$, $b$, and $m$) and two arbitrary constants — $A_0$ and $\phi$. These arbitrary constants allow us to describe a range of physical behaviors with different starting amplitudes and different starting points (initial velocities).

Afterthoughts: So what just happened?

Well that was strange. It didn't really look like anything you might have done in an introductory biology or chemistry class, and it didn't even look like what you might have done in a math class — even, if we are honest about it, what you might do in a math course in ordinary differential equations where these kinds of problems are traditionally solved.

We've used a process that blends scientific modeling with mathematical structures, very much in the way we discussed it in our overview page Modeling with Mathematics. The idea there was that in mathematical modeling in science one starts with some knowledge of the physical world from experience, then maps it into a mathematical model where there are a lot of structures available to guide our reasoning about relationships. Then, the equations we generate are solved by doing math, but constrained and assisted by physical knowledge and interpretations. [Note that when we say "physical" here, we are referring to "the world of matter and energy" and this includes not only physics, but chemistry and biology as well.]

In the case of the damped oscillator, we began with physical principles — the Newtonian framework that in the particular example we were considering led us to create a physical model (through Newton's 2nd law) that produced a (second-order linear) differential equation: an equation that related an unknown function $x(t)$ to its derivatives, $dx/dt$ and $d^2x/dt^2$. Now in math classes such as Ordinary Differential Equations, there are algorithms taught for solving these kind of equations. They involve exponentials and complex arithmetic, and they are guaranteed to give all possible solutions. We didn't use these methods. Instead, we did something blended.

We had observed the phenomenon — the damping of a physical oscillation — and we had an idealized (toy model) solution: the undamped oscillator. Physically, the more realistic case looked like it was just losing amplitude but still oscillating. So we conjectured a time-dependent amplitude and tried to see what it would imply. We wound up using a lot of math — the product rule in calculus and a lot of equation manipulations.

Our blend of physics and math led us to a relationship that had a function of our unknown amplitude times a cosine equal to a different function of our unknown amplitude times a sine. Now we could have been stuck here. There is a function that when multiplied by a cosine gives a sine: the tangent (since tan(θ) = sin(θ)/cos(θ)). But that would be weird. The tangent would oscillate and go to infinity (whenever cos was 0). We don't expect an amplitude to go to infinity or look anything like this. So we rejected the possibility that our unknown multipliers transformed a cos into a sin (by not even mentioning this possibility). Instead, we tried making each side 0. This worked nicely giving us a result that made physical sense.

But can we trust this? Couldn't we have done something different and come up with another answer? Here, we go back to the math structure that is supporting our analysis.

We can find theorems that tell us that if we have a second order linear differential equation, the general solution will have two arbitrary constants that can be set freely. The fact that we have such a solution means that we have the general solution. There is only one (though it may be expressed in a number of different looking but equivalent ways).

The theorem from math tells us that our physically motivated procedure worked mathematically — in addition to making good physical sense! Knowing that this sort of theorem holds is what gives us the license to play — to guess physical solutions on the basis of our physical intuitions and see whether the result does the math for us. It often works! Of course we still have to check with experiment and see how well the mathematical hypothesis we started with describes real physical systems. (Sometimes, they work very well, sometimes not.)

This "blending" procedure, that makes use of physical and mathematical arguments intertwined, is quite typical of the way mathematics is used to model systems in science.

Joe Redish 3/23/12

Article 670
Last Modified: May 27, 2019