2 blocks of masses m1 and m2 are joined by a light spring on a horizontal table. Obtain the relation of their accelerations a1 and a2 after they separate a bit and get released.

I tried to use the equations V(x)= .5k*x^2 (potential energy) and V = -∫Fdx
I set -∫Fdx = .5k*x^2, but didn't know if that was right or what to do after. Do I divide x^2 over to the dx and integrate, or change F to F=ma?

help!

To obtain the relation between the accelerations of the two blocks, we need to consider Newton's second law for each block separately. Let's assume that m1 is the mass of the block on the left and m2 is the mass of the block on the right.

Considering the block on the left (m1), the only force acting on it is the spring force. According to Hooke's law, the spring force (F1) is given by F1 = -k * x, where k is the spring constant and x is the displacement of the block from its equilibrium position. Since the spring force is in the negative direction, we use a negative sign in the equation.

Using Newton's second law, we have F1 = m1 * a1, where a1 is the acceleration of the block on the left. Substituting the expression for the spring force, we get -k * x = m1 * a1.

Similarly, considering the block on the right (m2), we have F2 = k * x = m2 * a2, where a2 is the acceleration of the block on the right.

Now we have a system of two equations with two unknowns (a1 and a2):

1. -k * x = m1 * a1
2. k * x = m2 * a2

To obtain the relation between a1 and a2, we can divide equation 2 by equation 1:

(m2 * a2) / (m1 * a1) = 1

We can simplify this equation further by rearranging the terms:

a2 / a1 = m1 / m2

Therefore, the relation between the accelerations of the two blocks is a2 / a1 = m1 / m2. This means that the ratio of their accelerations is equal to the ratio of their masses.