1. The problem statement, all variables and given/known data Find the potential energy function for a spring if the origin is placed at the wall and the unstretched length of the spring is L. Show that with a suitable choice of the constant, this potential function is proportional to the square of the amount that the spring is stretched or compressed. 2. Relevant equations F = d(h(x))/dx (F = force function) U(x) = -h(x) (U(x) is potential energy function) 3. The attempt at a solution Force of the spring F = -kx I integrated F and made the result negative to get the potential energy function kx2/2 + C But the Textbook solution is: kx2/2 - kLx + C How do I get -kLx? Also, I'm not sure about how I should start the second part of the problem.