# Compressed spring and Hooke's law

Gashouse
A compressed spring that obeys Hooke's law has a potential energy of 18 J . If the spring constant of the spring is 400 N/m, find the distance by which the sping is compressed.

Please correct me if I am wrong, I'm not sure how find the distace.
My work: k 400 N/m x=18J = 400 N/m/18 J = 0.045

But I think my answer has to be in cm, or m. please help.

## Answers and Replies

Homework Helper
For a constant force, work is force times distance. For a variable force, such as the spring force, here 400x where x is the distance compressed, work is the integral of force times distance: $$\int 400x dx$$= 200x2. Solve the equation
200x2= 18.
(Since the spring constant is given as 400 N/m, your answer will be in meters.)

Staff Emeritus
Gold Member
If you are at a pre-calc level, then what you need to know is the expression for the elastic potential energy stored in a spring that is extended/compressed through a distance 'x' from equilibrium. This is given by, $PE = 0.5~ kx^2$ , where 'k' is the spring constant.

Gashouse
It is not pre-cal, the spring is compressed that obeys Hooke's law. Thanks for the quick responses. Goku I understand what you are saying. But Halls so Ivy I did not understand how you got 200x*2= 18

$$\frac{d}{dx}200x^2 = 2 * 200x^{2-1} = 400x$$
The integral, or anti-derivative, of 400x = $$200x^2$$