HomeBlogNotesFood

home/notes/laplace-harmonic-oscillator

Solving the harmonic oscillator problem the cooler way


Consider the textbook harmonic oscillator problem,

Here, we want to find the solution without making any explicit ansätze regarding the spectrum of the solution.

Look first at the undriven case, and start by taking the Laplace transform of both sides. Under the transform, we have

where is the complex frequency-space variable. Then the problem becomes

To search for non-trivial solutions, we want to find the roots of :

Then since for all , we have

To transform back to the time domain, we apply the inverse Laplace transform:

Considering functions to be singularities with

we choose arbitrary to satisfy the requirement of the inverse transform that be greater than the real part of all ‘s singularities. Note that is also zero everywhere except for , so we can readily apply the residue theorem in the typical way, where the path is a semi-circle over the left half-plane with radius . Thus the transformation back to the time domain gives

Then we can apply initial conditions

which yield

and that’s that.

Fun fact: normally we’d also take the “actual” solution to be , but if is real, then is also all real!

Now look at the driven case. It will become apparent later on that the solution found by this method cannot be fit to initial conditions in the same way as the previous one (so it must only apply to the steady state), but that’s okay because you’ll always still find the particular solution by taking a linear combination with the homogeneous solution.

Here, since there’s no decaying exponential component to the expected solution, we can use the regular Fourier transform, under which

Then we have

which easily gives

Now looking at this Fourier component, we can derive the usual amplitude and phase of the response to the drive: