Hey guys. So up until now all of the works we've calculated had been done by constant forces like applied forces or tensions or even gravity like MG. But not all forces are gonna be constant. Some will be variable. In fact, one of the most common variable forces you'll see is the spring force which remember is governed by Hook's law. And that's just this equation we've we've seen before. So in this video, I'm gonna show you how to calculate the work that's done by springs. Let's go ahead and check this out. We're gonna come back and fill the rest of this information out. So we'll take a look at the problem here. We're pushing a box attached to a spring. We're gonna push this box to the right with some applied force. And because of that and because of action reaction, there's a spring force that pushes back on us. So we have the spring constant which is K. And we also have the deformation. We're compressing the spring and a distance X. We know that's equal to two m. Now in the first part of the problem, we want to write an expression which means we're just gonna be working with letters here. Not numbers for the work that's done by our applied force. And then the work that's done by the spring force. So how do we do this? Well if we want to calculate work then do we just use FD Cosine theta. So if you want to calculate the work done by applied force, we're just gonna use the applied force times. D. Cosine Theta here. But there's a problem with this F. A. Because remember that this F. A. From hook's law actually is equal to negative K. X. And if you can't tell from this equation what happens is this force is not going to be constant because it depends on your deformation. The more you push on the spring the more the spring force is going to push back against you. So to kind of show you how this works, I'm gonna go ahead and plot sort of a graph of the strength of the applied force versus the deformation. So what happens when you're at the equilibrium position like this? Your force is just equal to zero. And then what happens is the more you push on the spring as you push it to the right your spring force and your applied force has to increase as well. So the way that this graph looks is it kind of just looks like a straight diagonal line like this or eventually at some distance X. From just looking at letters here this F. Is just gonna be equal to K. X. So if this force is constantly changing what is the value that I actually plug into my F. A. And that's the whole point of this video guys when you have works done by constant forces you can always calculate them by using FD cosine theta. But when you have variable forces like the spring force here then we're gonna have to use the average of the force instead. So we're gonna use FD co sign data but we're gonna have to figure out the average of that force. So to figure out the work done by my applied force in a spring I'm just gonna have to figure out the average of my applied force. Then I can use FD Cosine Theta. So how do I figure out an expression for this average force? I can actually go come back and used to use this diagram here. This chart that that I've been working with here. So if my force constantly increases diagonally like this then the average is gonna be actually right in the middle. And so basically the average displacement is gonna be my X. Over two. And therefore the average force. My F. Average. If I'm going from zero to K. X. The halfway point is just gonna be one half K. X. So this is the value that I plug in for my F. A. Average. So really the work done is gonna be one half K. X. Now I have to figure out the distance. Remember the distance and the displacement are the same thing. And really this is just this X. Variable that I already have. Right? So you're pushing up against the spring some compression X. And that's also the distance that you moved this box. Right? So this is my ex as well. And then we have co sign. So what's the angle between this force and the displacement or distance? Well because my force points to the right and the distance or displacement also points to the right. Then our data is just equal to zero. So we have cosine of zero and we know that it's just evaluates to one. So basically what our expression becomes is one half K. X. Squared. So that's the first part of this. Remember that the second part of part A. Is we also want to calculate the work that's done by the spring. So this is W. F. S. And it's the same idea here. Except now we're just gonna calculate the average of the spring force and then use FD cosine Theta. But this actually we don't have to repeat this whole process again because remember that your spring force and your applied force are the same magnitude that just have opposite directions. So what this means is that the average of my spring force is also equal to one half K. X. The distance is still X. And now the cosine of the angle is gonna be different because the angle between my F. S. And my D. Is not gonna be zero degrees because remember my F. S. Points to the left and my distance points to the right. So this angle just ends up being 180. And remember this just evaluates to negative one. So really this just becomes negative one half K. X. Squared. So those are two expressions here. So basically we can see is that the work that's done by the spring when you are compressing is going to be the negative of your applied force in the same way that your hook's law, These two forces are just negative of each other and they have the same value. And so the work that's done by the spring is going to be negative one half K X squared. This is gonna be the formula that you use and your problems. All right. So let's take let's finish off this problem here and now we're actually gonna calculate plug in all the numbers. So the work that's done by our applied force is gonna be one half K X squared, which is one half times 500 times two. And this is gonna be squared. So you end up working out 2000 jewels, this makes sense. You get a positive number, basically you have to do 1000 jewels of work. You actually have to put in 1000 joules of energy in order to compress the spring. Alright. And so the work that's done by the spring force is just gonna be the opposite of this. So this is gonna be negative one half K X squared. And you're just gonna get negative 1000 jewels when you work it all out. So whatever you have for one to answer the other one is just gonna be the negative whatever number you get. Alright, so that's it for this one guys, let me know if you have any questions.