We seek a solution
x''(t) = -(k/m) x(t)
where
and the initial conditions
x(0) = x0 the position at time zero
x'(0) = v0 the velocity at time zero
For convenience we first define a new constant
c = √(k/m)
so the differential equation becomes
x''(t) = -c2 x(t) (eqn 1)
We classify this differential equation as second order linear. It is second order because there is a second derivative:
x(t) = er t
where
r2er t = -c2 er t
where we took the second derivative of
r2 = -c2
Since
r = ±c i
where
x1(t) = ei c t or x2(t) = e-i c t (eqn 2)
Try plugging either of these solutions into the differential equation (1) and you will see that they work! Remember that
x1'(t) = (i c)ei c t
x1''(t) = (i c)2ei c t = -c2 x1(t)
which matches the original differential equation (equation 1).
You might not know what it means to have an imaginary number as an exponent. If so, read on...
To return from the world of imaginary (complex) numbers we use Euler's formula:
ei z = cos z + i sin z
Applying Euler's formula to our solutions (equations 2) we have
x1(t) = ei c t = cos(c t) + i sin(c t)
x2(t) = e-i c t = cos(-c t) + i sin(-c t)
Using some basic trig identities we can simplify the second solution to be
x2(t) = cos(c t) - i sin(c t)
We still have the imaginary number i in these
solutions. But now we can use a general property of linear
differential equations:
a
linear combination of solutions is also a solution
A linear combination of things is simply the sum of those things
multiplied by constants. For example a linear combination of x,y,z could be
2x - 0.333y + 13z
So we can form the following linear combinations which are also solutions but don't involve
(1/2)x1(t) + (1/2)x2(t) = cos(c t)
-(i/2)x1(t) + (i/2)x2(t) = sin(c t)
(remember that
x(t) = a cos(c t) + b sin (c t) (eqn 3)
where
We still need to satisfy the initial conditions. Using equation (3) above, the first initial condition,
a cos(0) + b sin(0) = x0
a = x0
To evaluate the second initial condition
x'(t) = -a c sin(c t) + b c cos(c t)
Now we can evaluate this at time
-a c sin(0) + b c cos(0) = v0
b c = v0
b = v0/c
Now we've found the
x(t) = x0 cos(c t) + (v0/c)sin(c t) (eqn 4)
We will check that equation (4) is the solution by plugging it in to the differential equation (1).
x''(t) = -c2 x(t) (eqn 1)
First we find the derivatives of equation (4).
x'(t) = -x0 c sin(c t) + v0 cos(c t)
x''(t) = -x0 c2cos(c t) - v0 c sin(c t)
This is the left hand side of equation (1). Now let's calculate the right hand side.
-c2 x(t) = -c2(x0 cos(c t) + (v0/c)sin(c t))
= -c2x0 cos(c t) - v0 c sin(c t)
and so we see that both sides match.
The solution we found,
x(t) = x0 cos(c t) + (v0/c)sin(c t) (eqn 4)
may be puzzling to you, because if you played with the
simulation you will see that no matter what you do to it, it always
exhibits a simple sine motion. Yet the above solution seems to
be more complex than that. The answer to the puzzle is that the
solution can be simplified to just a sine function using a trig identity. You get a sine function whose phase is shifted. Assuming
x(t) = √(x02 + (v0/c)2) sin(c t + tan-1(c x0/v0))
So we can see that the behavior is always a simple sine motion. If the velocity is non-zero at the start, then the sine wave is phase shifted.