# Different methods give different answers to the compression of spring [duplicate]

At first, I have to write down the scenario to represent my doubt properly.

Scenario: An ideal massless spring with a force constant of $$k$$ is kept vertically on the floor. Then a mass $$m$$ is kept on top of the spring. As a result, the spring compresses by $$x$$.

I want to write the value of $$x$$ with respect to $$k$$ and $$m$$.

Using the equation $$F=-kx$$ gives $$x=\frac{mg}{k}$$, whereas using the law of conservation of energy [$$mgx=\frac{1}{2}kx^{2}$$] gives a different answer, which is $$x=\frac{2mg}{k}$$. Why are they different?

• Simpler answer to think about: If you put a mass on a spring and let go, when it reaches the new equilibrium position it will still have kinetic energy. So your conservation of energy problem is incomplete. Should be $mgx = \frac{mv^2}{2} + \frac{kx^2}{2}$ Mar 18 at 18:02

Both values of $$x$$ are correct, but correspond to two different situations.

Suppose first that the mass is at rest. The acceleration $$a$$ is then zero. The sum of the forces on the mass is $$F = -kx_1 - mg$$. From $$F = ma = 0$$ one has $$-kx_1 - mg = 0$$, giving $$x_1=-mg/k$$ for the displacement of the mass from the equilibrium position of end of the spring. (Equilibrium meaning no force on the spring.)

Now suppose that the mass is released from rest at the equilibrium position of the end of the spring, which we will take to be the zero of our coordinate system. The initial potential energy of the spring is zero, the initial kinetic energy of the mass is zero, and from our definition of the origin, the initial gravitational potential energy of the mass is zero. The total energy of the system $$E$$ is then zero, and will remain so as the system evolves in time. After its release, the mass will fall, compressing the spring. At some point, call it $$x_2$$, the compression of the spring will be maximal, and the mass will stop falling. At this instant, its velocity will be zero, and so too the kinetic energy. The potential energy of the spring is $$kx_2^2/2$$, and the gravitational potential energy is $$mgx_2$$. The total energy is zero, so $$E = kx_2^2/2 + mgx_2 = 0$$. Solving for the maximal displacement, one obtains $$x_2=-2mg/k$$.

In both cases $$x$$ is negative, meaning that the spring is compressed. The compression is greater when the mass is allowed to fall.

• So the equation $F=−kx$ gives the new equilibrium position, whereas the energy conservation equation gives the maximum compression of the spring from its initial state. That's why they give different values - have I got it right? Mar 20 at 1:41
• The equation $F_s=-kx$ gives the force on the mass due to the spring. $F_g = - mg$ gives the force on the mass due to gravity. $F = F_s + F_g$ gives the total force on the mass. If the mass is at rest, the acceleration $a=0$, so $F=0$. The equilibrium position is given by $-kx-mg = 0$. If the mass is not at rest, $F = F_s + F_g$ still applies, but now $a = \ddot{x} \neq 0$, and one must solve the differential equation $m \ddot{x} = -kx - mg$ to find $x$ as a function of time. Conservation of energy is used as a kind of "trick" to find the maximum compression of the spring. Mar 21 at 8:37

This is happening because you are converting whole amount of gravitational potential energy into the potential energy of spring which will further start oscillating as it will compress more than usual. So the extra amount of spring potential energy you are getting will be stored in the system as the energy for SHM (i.e simple harmonic motion).

But in the first case the compression is less because you kept that block slowly on the top of the spring. Now this is not giving us excess compression in spring because 'we' as an external agent doing some amount of negative work here which will finally lead to absorb the excess amount of energy which is responsible for our simple harmonic motion.

Or in other way, case when spring is just released then it can be thought as, at the mean position it will have potential energy as well as kinetic energy but in the case in which you are bringing the block down the spring slowly It will just have the potential energy.

When you lower a mass a distance of x, the force of gravity is the same all the way down. When you lower a mass and compress a spring, the force of the spring gets bigger as the spring is compressed.

Divide x up into n small intervals $$\Delta x$$, so that the spring force is approximately constant over each interval.

For gravity

$$E = \sum_{i=1}^n F_i \Delta x = n \space mg \space \frac x n = mgx$$

For a spring

$$E = \sum_{i=1}^n F_i \Delta x = \sum_{i=1}^n kx_i \Delta x = \sum_{i=1}^n k \frac{ix}{n} \frac{x}{n} = \frac{kx^2}{n^2} \sum_{i=1}^n i = \frac{kx^2}{n^2} \frac{n(n+1)}{2}$$

For large n, this is

$$E = \frac{1}{2}kx^2$$

If you put a mass on a spring and let go, when it reaches the new equilibrium position it will still have kinetic energy.

So your conservation of energy problem is incomplete. Should be $$mgx = \frac{mv^2}{2} + \frac{kx^2}{2}$$

For your energy conservation equation to be correct you cannot simply release the mass on the spring but have to slowly lower it and bring it to rest at the displacement $$x$$. That requires, in addition to the negative work done by the restoring force of the spring, negative work of $$W_{ext}$$ by the force of an external agent (e.g.,you) that slowly lowers the mass and brings it to rest at the displacement $$x$$. If the mass is simply released, there will be the combination of kinetic and elastic potential energy associated with simple harmonic motion (SHM), not just elastic potential energy.

The force exerted by the external agent opposing the direction of the force of gravity to gradually lower the mass and doing negative work varies from initially $$-mg$$ to zero, or an average force of $$-mg/2$$. That, times the displacement $$x$$ makes the external work $$-\frac{1}{2}mgx$$, taking away half of the initial potential energy that would have been converted to kinetic energy at the mean position of SHM had the mass been simply released.

Overall the net work done is zero since the change in kinetic energy is zero. Thus

$$+mgx-\frac{1}{2}kx^2-\frac{1}{2}mgx=0$$

Giving you the magnitude of displacement of $$x=\frac{mg}{k}$$ instead of $$x=\frac{2mg}{k}$$, consistent with $$F=-kx$$

Hope this helps.