You are on page 1of 6

Simple Harmonic Oscillator Solution!

(for the curious)

Hi guys! Well I see some of you just cant accept a formula given without any proof, so I tried to come with one. Warning: you should know basics on complex numbers and exponential derivatives. So here it is: The differential equation (DE) we want to solve is:

x is the second derivative of x with respect to time, or acceleration. x is just the position. Since we have derivative of x with respect to time, then x must be a function of t (if not, the derivative with respect to time would be zero).

So lets continue! Lets assume our solution has the form (unknown, just for now ;) ). Plug it in our formula. Remember:

, where r is an unknown constant

And so on. You can prove it with basic calculus. So we get:

We factor out the common term:

. ( )

We see either one of both terms in the multiplication has to be 0: or ( Notice )

never equals 0, so you can take it out: you wont get a solution from it. Were left with: ( )

Again, notice no real value of r will satisfy the quadratic equation. We must introduce the concept of complex numbers. For those of you who are not familiar with complex numbers, just to make it simple, believe in me on this: We call the imaginary unit. So now, a number squared can give you a negative number! You dont see that in real numbers. Now you can express the quadratic as the multiplication of two terms: ( ) ( )( )

If you expand it and use the facts I mentioned above on , you can verify theyre equal.

Now we can get the roots: To simplify our expressions: So:

Remember our solution had the form solutions for x:

? Now we have r. Actually, we have 2, so we have 2

What? But we need ONE solution! That cant be right. Which one do we choose? I want you to see this video first: https://www.khanacademy.org/math/differential-equations/second-orderdifferential-equations/linear-homogeneous-2nd-order/v/2nd-order-linear-homogeneousdifferential-equations-1

I assume youve already watched the video. So from the video you see two important facts: Our solutions on x are incomplete. We can actually multiply our solutions on x1 and x2 each by any constant, and each of them separately will also suffice the DE (Differential Equation). Each of our solutions is a partial solution. We obtain the general solution by summing all our partial solutions.

So, our more complete partial solutions are (with the constants):

And our general solution will be the sum of all our partial solutions, x1 and x2:

Now, again for those who dont know much on complex numbers, we have this beautiful equation called the Eulers Formula:

I wont show the proof here, but again, you have to believe me. Notice we have similar expressions on our solution for x. We can expand our terms using Eulers Formula (see, our x would be wt in our case):

Now we need to use

Now use some basic trigonometry. Remember: and Thus:

Collect terms:

See since a and b are constants, their sum or difference will be other constants as well. If we multiply them, we get constants too! Our new constants will be:

Replacing:

By this formula, differentiating with respect to x we have:

Now lets make some initial conditions:

Replacing in our original equation:

Both

and

are constants, so for simplicity:

Well use Eulers Formula again. From Eulers Formula:

See is the real part of , and is the imaginary part of . (The real part is that part without the , and the imaginary part, the one that has the ). In more formal notation, we say:

Lets do some manipulations on Eulers Formula. Multiply both sides by , so we get:

Since

From this we can also say

(Since sinx doesnt have the i).

Lets now return to our original function, x. We can plug these relations up there. ( )

Now youll have to believe me again and treat the Real operator as if it were as other functions, so we can factor it out (thats why I used the second expression of sine, in terms of the Real operator, so we can factor them out!). Its kind of intuitive too, and you can even prove it ;) Factor the common terms: [ ]

For those who dont know complex numbers, a complex number has the form:

And it can be expressed also as:

Which is called the polar form. Theres a relation between a, b, c and d, so complex numbers can be converted from polar to the common numerical form and backwards. However it wont be shown here. Just see if we have two constants (a and b) on the common form, we also have constants on the other form, which will be different. So we use the polar coordinates to convert that term: c-id

The rules from exponentials also follow with complex exponentials (sum of exponents) ( So we want the real part of that expression. )

From Eulers formula, we can transform our solution so that:

We take the real part and were left with:

Or, changing the constants to others more familiar:

And there you have it!