# Solving differential equation for simple harmonic motion. Finding k?

A 1 lb weight is suspended from a spring. Let y give the deﬂection (in inches) of the weight from its static deﬂection position, where “up” is the positive direction for y. If the static deﬂection is 24 in, ﬁnd a differential equation for y. Solve, and determine the period and frequency of the SHM of the weight if it is set in motion.

To my understanding, the initial condition is y(0) = 24. I have a differential equation of the form $my'' + ky = 0$, and I know that m = 1, but how do I find k?

-
The static deflection of 24 inches is not your initial condition. Use this deflection to calculate the spring constant by drawing a force diagram for the mass: gravity pulling the weight down has to balance the spring force pulling it up. –  in_wolframAlpha_we_trust Oct 25 '12 at 7:28
We have kx = mg, so k = mg/x, correct? Do i just use m = 1 and g = 9.8? Do we express k in terms of x? –  user1038665 Oct 25 '12 at 7:36
That's the idea, but you need to think about your units. g = 9.8 uses meters and kilograms. The extension you have is in inches and the mass you have is in pounds. –  in_wolframAlpha_we_trust Oct 25 '12 at 7:41
So can I do $k = \frac{mg}{x}$ => $k = \frac{0.4536 kg * 386 in}{x *kg}$ so that $k = 175$ in? –  user1038665 Oct 25 '12 at 7:45
So the differential equation will become: $y(x) = \alpha_1 \cos (\sqrt{175}x) + \alpha_2 \sin(\sqrt{175}x)$ But how do I solve for a1 and a2? –  user1038665 Oct 25 '12 at 7:45

Hint: the characteristic equation for your differential equation is: $$m\lambda^2 + k = 0$$ which is equivalent to $\lambda^2 + \frac{k}{m} = 0$. Therefore, $\lambda = +- \sqrt{\frac{k}{m}}$. And hence the solutions for the differential equation is: $$y(x) = \alpha_1\cos(\sqrt{\frac{k}{m}}x) + \alpha_2\sin(\sqrt{\frac{k}{m}}x)$$ where $\alpha_i \in \mathbb{R}$
You know $m =1$, so $y$ becomes a simpler equation. Now use the data you have to find $k$! –  ILoveMath Oct 25 '12 at 7:34