7. At the ends of a vertically positioned homogeneous spring, two small loads are fixed. Above is a load with mass $m_{1}$, and below is $-m_{2}$. A person grabbed the middle of the spring and held it vertically in the air. In this case, the upper half of the spring was deformed by $x_{1}=8 \mathrm{~cm}$, and the lower half by $x_{2}=15 \mathrm{cm}$. After that, he flipped the spring, swapping the loads. Then he placed it on a horizontal surface and released it. Determine the magnitude of the spring's deformation in this case. Neglect the size of the person's hand compared to the length of the spring.

## $(15$ points)
Answer: $30 \, \text{cm}$

Solution. If the stiffness of the spring is $k$, then the stiffness of half the spring is $2k$ (4 points). For the situation where the spring is held by a person: $m_{2} g=2 k x_{2}$ (4 points).

For the situation where the spring stands on a surface: $m_{2} g=k x$ (4 points). We obtain that $x=2 x_{2}=30$ cm (3 points).