# Maximum velocity by compressing spring

## Homework Statement

I'm new to physics. I'm a programmer, so I'm having trouble finding this solution. when spring is compressed against wall until the body attached to it touches the wall, whats the maximum velocity obtained?

## The Attempt at a Solution

I thought it happens when the kinetic energy is high. Of the original kinetic energy of the body, some goes into potential energy in the spring and the remainder is left as kinetic energy of the now slowed object. So I did the remainder of energy is equal to force(-kx) over time, which means
$\frac{1}{2}$(mv^2-kX^2)=-kXt

x is the distance obtained, t is time

Last edited:

Simon Bridge
Homework Helper
Welcome to PF;
This is homework?

You seem to have written you problem two ways - the title, and initial comments, appear to want to set an object moving by launching it from a compressed spring... but your working suggests you are slowing an object by running it against a spring.

In the first case, the energy stored in the compressed spring turns into kinetic energy in the object (under ideal conditions - in real life, some of it goes into kinetic energy in the spring - because a real spring has mass.)

In the second - it is the reverse, only you may have some kinetic energy left over (in which case the object slams into the wall as well.)

If the speed is such that the object comes to rest after compressing the spring a distance x, then all the initial kinetic energy gets stored in the spring (well - ideally - IRL there will be some losses) ... nothing left over.

sorry about that. I'm working on the first case. So my equation should be 1/2(mv^2)=-kxt?

sorry about that. I'm working on the first case. So my equation should be 1/2(mv^2)=-kxt?

Simon Bridge
Homework Helper
Energy stored in a spring compressed by distance x is: ##P=\frac{1}{2}kx^2## ... you can look these things up :)

Ok, got it. 1/2(mv^2)=1/2(kx^2). which gives v=$\sqrt{\frac{k}{m}}$x. But how to find the maximum velocity. Derivative over velocity?

Simon Bridge