Suppose you a have a spring with a certain mass (in the sense that the spring itself has mass, not in the sense that the spring has a mass attached to the movable end) that is compressed some distance and then let go of. One end of it is fixed to a wall.
Suppose for this question that the spring is horizontal, so gravity doesn't do any work, and that the spring isn't subject to friction or air resistance as it moves.
As far as I can tell, the only external force acting on the spring in the direction that it moves is the force from the wall, keeping the fixed end fixed. However, since that force is applied to a point that doesn't move, it doesn't do any work on the spring.
So, by the work-energy theorem, the change in the spring's kinetic energy should be zero, but as it returns to its uncompressed state, it should have some kinetic energy. Where have I gone wrong in my calculation?