 In this video, we're going to find out the potential energy of a spring that is compressed. So I have a spring here which initially is not compressed, so we're going to start from position zero, and then we're going to push it in by a certain distance x. Now first, let's think about what we actually know. We do know Hooke's law that gives us the force of a spring. We know the force of a spring is going to be the opposite direction of my displacement x and multiplied by the spring constant. So this is Hooke's law. What else do we know? We know that the work done by any force is the force that product the displacement if the force is the same all the time. But now here in the case of the spring, the more we compress the spring, the higher the force will be. So we will actually have to integrate the force times ds. So now before I lose everyone that didn't take calculus yet, this video is still going to be useful even if you didn't take calculus and you don't know what I'm doing with the integration part. You can still take out of it Hooke's law itself that the force is proportional to the displacement and pointing in opposite direction of displacement. And the final answer that we're going to get which is potential energy. Now what else do we know? Potential energy, the definition of a potential energy of a conservative force is that it is the negative of the work done by the conservative force. So here the conservative force in question is the spring force. Once we compress the spring, it will automatically spring back and actually give us all the energy back. So that means it's conserved. Also it doesn't matter how I compress from here to here. If I go here, here, and move around in between, it doesn't matter. It's path independent. It only depends on the final and the initial position. Now before we go any further, let's do a quick free-body diagram to analyze the situation, what the forces are, that are acting on my object. So I have my object which was the block and I have the spring force which goes backwards, which is what basically Hooke's law described me by putting the minus in there. And there is some other force that I'm using, a push, to push it in. But we're not really interested in what the push is doing. We're going to be interested in what the spring force is doing. Plus we have a displacement that goes in that direction here. So now let's start with the calculations. So the work is equal to the integral of the force times the displacement. So in this situation, my force of the spring is pointing in negative direction. This is also, okay, we sign here, minus kx. And my displacement is going to be the distance x to which we push it. So we're going in that direction dx. So if I integrate that, I get minus one-half kx squared plus my integration constant. And I'm going to evaluate this from my x initial being zero to my x final. What I get is that my work is minus one-half times the spring constant times x final squared minus x initial squared. Now where do we go with this? Well, now we use the potential energy. So we have change in potential energy, is my potential energy final minus my potential energy initial is minus the work done by the spring force. So minus minus gives me one-half times the spring constant times if my x initial was at zero x final squared. And that is the final answer of what is the potential energy of a spring? The potential energy of a spring, starting a spring, depends on the spring constant and how much it is compressed or extended from the initial zero position.