a 7.0kg block and a 12kg block sit on a frictionless table. Between and touching, but not attached to, the blocks is a spring that is compressed by 13.5 cm. the spring has a spring constant of 1200 N/m. if the spring were released at what speed would each block move away.

The energy in the spring results in KE in the blocks.

1/2 k x^2=1/2 m1*v1^2 + 1/2 m2*v2^2
and conservation of momentum applies, so
0=m1*V1 + m2*V2 or
v1=-m2/m1 * v2

put that into the first energy equation, and solve. x=.135m

So I got a little confused. I got stuck on this equation at:

1/2kx^2=1/2 m1* (m2/m1*v^2)+1/2 m2v2^2

Then:

kx^2=m2*v2+1/2(m2v2^2)

Then what?

To find the speed at which each block moves away when the spring is released, we need to use the principle of conservation of mechanical energy.

Step 1: Calculate the potential energy stored in the spring when it is compressed.
First, convert the displacement of the spring into meters:
13.5 cm = 0.135 m

Next, use the formula for potential energy stored in a spring:
Potential energy (U) = (1/2) k x^2
where U is the potential energy, k is the spring constant, and x is the displacement.

Given:
k = 1200 N/m
x = 0.135 m

Substituting these values into the formula:
Potential energy (U) = (1/2) * 1200 * (0.135)^2

Step 2: Calculate the total mechanical energy stored in the system
The total mechanical energy is the sum of the potential energy stored in the spring and the initial kinetic energy of the blocks, assuming no external forces are acting on the system.

Initial kinetic energy = 0 (as the blocks are initially at rest)

Total mechanical energy (E) = Potential energy (U) + Initial kinetic energy

Step 3: Find the velocity of each block when the spring is released
By applying the conservation of mechanical energy, we can equate the potential energy stored in the spring to the kinetic energy of the blocks when the spring is released.

Total mechanical energy (E) = Kinetic energy

Kinetic energy (K) = (1/2) m v^2
where m is the mass of the block and v is its velocity.

Let's assume the 7.0 kg block moves with velocity v1, and the 12 kg block moves with velocity v2.

For the 7.0 kg block:
E = (1/2) m1 v1^2

For the 12 kg block:
E = (1/2) m2 v2^2

Since both blocks move away with the same speed (but in opposite directions), the magnitude of the velocities will be the same.

Step 4: Solve for the velocities
Here's how we can proceed:

Equation 1: E = (1/2) m1 v1^2
Equation 2: E = (1/2) m2 v2^2

Substitute the values:
Equation 1: (1/2) * 7.0 * v1^2
Equation 2: (1/2) * 12 * v2^2

Since the total mechanical energy (E) is the sum of the potential energy and initial kinetic energy:
E = (1/2) * 1200 * (0.135)^2 + 0

Simplify and solve the equations:
(1/2) * 7.0 * v1^2 = (1/2) * 1200 * (0.135)^2
(1/2) * 12 * v2^2 = (1/2) * 1200 * (0.135)^2

Isolating v1 and v2 by solving for them will give you the speed at which each block moves away when the spring is released.