# Compression of spring

1. Apr 17, 2010

### gaobo9109

1. The problem statement, all variables and given/known data
Two blocks A and B are connected by a spring of spring constant 1000N/m. Block A is 2kg and has a rightward velocity of 5m/s. Block B is 3kg and has a rightward velocity of 10m/s. When block B collides with block A, there is a maximum compressional force on the spring. What is the length of the spring x at the instant of maximum compression?

2. Relevant equations
W = 1/2kx2

3. The attempt at a solution
Initial velocity of Block B = 10m/s
Velocity of Block B at the instant of collision = 0m/s
Change in kinetic energy = 1/2(3)(10)2= 150J
150 = 1/2(1000)(x)2
But my answer is different from the answer provided, can anyone tell me where did i go wrong? Thanks.

2. Apr 17, 2010

### jeppetrost

Well, there is a flaw in assuming only B loses kinetic energy, since when B pushes the spring, the spring pushes A, and hence A gains kinetic energy.
I have to assume (with no figure) that B is to the left.
What I like to do, when dealing with velocities of two things in a system, is to choose a new system in which only one of the things has a velocity. Say one chooses a system that travels with block A at speed 5m/s. So now A is stationary and B travels at 5m/s. And now you have to think of when exactly is the spring the most compressed. And it turns out, that this instant is exactly the same as when A and B travel at exactly the same velocity.
You can find this mutual velocity using conservation of momentum. When you know this velocity, you can calculate how much kinetic energy the two blocks have lost going from "B has v=5m/s" to "both blocks have the same v".
This loss in kinetic energy has only one place to go - potential energy in the spring. From the energy stored in the spring, you can calculate the compression.

3. Apr 17, 2010

### gaobo9109

Sorry, some of the information in the question are wrong. Block B has a mass of 2.0kg, while block A has a mass of 3.0kg. Spring is only attached to A, instead of connected to A and B.

You said that maximum compression will occur at the instant when A and B have the same velocity. But according to conservation of momentum, velocity of A and B after collision are 9m/s and 4m/s respectively.

4. Apr 17, 2010

### Staff: Mentor

Use conservation of momentum to find the speed at the moment of maximum compression, not after they separate again.

5. Apr 17, 2010

### jeppetrost

Yea, sorry. When I'm trying to solve a different situation, usually I'm not right about everything ;)

6. Apr 18, 2010

### gaobo9109

I solved the problem using the method proposed. But I just don't understand why the velocity of block A and B are the same at the instant of maximum compression.

7. Apr 18, 2010

### Staff: Mentor

If the velocities weren't the same, they'd still be approaching each other and thus that couldn't be the instant of maximum compression. You want the relative velocity to be zero.