# Harmonic Motion Equation

1. Nov 4, 2012

### danielu13

I'm trying to work out the differential equation for simple harmonic motion without damping,
$x''+\frac{k}{m}x = 0$

I can solve it to
$x = c_1cos(\sqrt{\frac{k}{m}}) + c_2sin(\sqrt{\frac{k}{m}})$

But the generalized solution is
$x = Acos(\omega*t + \delta)$

where
$A = \sqrt{c_1^2 + c_2^2}$

I can understand the change of variables, but I don't really understand what happens to the sine term. Can anyone help me with this?

Last edited: Nov 5, 2012
2. Nov 5, 2012

### haruspex

Try expanding the cos(wt+d) using cos(A+B) rule.
(Btw, you left out the t's on the RHS of the cos-and-sine solution.)

3. Nov 5, 2012

### JJacquelin

Let c1 = A cos(D) and c2= -A sin(D)
Bring them back into x = c1 cos(K) + c2 sin(K) where K = sqrt(k/m)
cos(D)cos(K)-sin(D)sin(K) = cos (K+D)
x = A cos(K+D)
and note that c1²+c2² = A²cos²(D)+A²sin²(D) = A²
A = sqrt (c1²+c2²)

4. Nov 5, 2012

### danielu13

So the cos(D) and -sin(D) represent the phase shift, and that's where the delta term comes from in the generalized solution?

5. Nov 5, 2012

Yes.

6. Nov 6, 2012

### JJacquelin

delta = D = -arctan(c2/c1)

7. Nov 22, 2012

### Erbil

I was also trouble with that.But now I have an idea.
We know that mass-spring system or simple harmonic motion is one dimensional.
From our coordinate system Y is vertical and X is horizontal.And also we know that mass-spring can be on vertical or horizontal.That's look what we found from differential equation :
A = sin(wt+teta)

So we are working for mass-spring system on vertical.We can add 90 degress to teta for change the dimension.So we get cos.