I'm having trouble with determining the potential energy of the mass-spring system depicted below. We assume that the extensions of all 3 springs are zero when $x_1=x_2=0$. The potential energy that I obtained is apparently incorrect. Here is what I've done:
$$U = \frac{1}{2}kx_1^2 + \frac{1}{2}kx_2^2 + \frac{1}{2}k(x_1+x_2)^2 = k(x_1^2+x_1x_2+x_2^2),$$ where I've considered each spring's potential energy separately. The mark scheme's version for $U$ is this:
$k(x_1^2-x_1x_2+x_2^2)$, so I suppose for them, the PE for the middle spring is $U_{mid} = \frac{1}{2}k(x_1-x_2)^2 = \frac{1}{2}k(x_2-x_1)^2$. So my guess is that they've assumed that $x_1$ is negative? Is this the source of the discrepancy?
Best Answer
Consider a slightly different diagram:
The extensions (displacement of end of a spring from non-stretched position) of the three springs are $x_1 \hat x, \, x_2 \hat x_2$ and $(x_2-x_1) \hat x$ where $x_1$ and $x_2$ are the components of the displacements in the $\hat x$ direction.
Note that components $x_1$ and $x_2$ can be either negative or positive.
This gives the total potential energy stored in the three springs as $\frac 12 kx_1^2 + \frac 12 kx_2^2+\frac 12 k (x_2-x_1)^2$
If $x_1 =x_2$ then there is no elastic potential energy stored in the middle spring as one would expect.
If the displacement of the end of the left hand spring is as shown in your diagram then the extension of the middle spring is still $(x_2-x_1) \hat x$ but in this case the component $x_1$ will have a negative value so you will end up with $(x_2-(-|x_1|))= (x_2+|x_1|)$ as the extension of the middle spring.