So let's do an example
using this new expression that we have
for potential energy, the potential energy of a spring.
Suppose you have a mass, its 5 kilograms
and it's sliding along and has a velocity of 5 meters per second
and then it hits a spring where as we see here,
sort of a wall connected to a spring
and it compresses the spring.
Eventually, the spring will stop the motion of the box
and the question is how far will the spring compress before the box,
the mass comes to a stop?
So see if you can do this on your own.
We know how many expression for the kinetic energy
that the box has when it's sliding.
We've just introduced an expression for the potential energy
stored in the spring when the spring gets compressed
and see if you can use conservation of energy
to find how compress the spring will get
before the box or this mass stops moving.
If you've given this problem a shot,
it should look something like this.
We have this mass that's 5 kilograms.
It is sliding with the velocity as we said, a 5 meters per second.
So we have lots of 5 in this problem
because we've also introduced a spring constant for our spring,
a 5 and it turns out that the unit for this spring constant
if you looked at them, were kilograms per second squared.
But you don't really need to worry about those units
as long as you have a value of k
and it's in your SI units then this is alright.
So initially we have, again, the initial energy
is equal to the kinetic energy of our object,
1/2 mv squared and then finally this object is going to get compressed.
So I'm just gonna write it like this,
1/2 mv squared and then the spring is compressed by the box
which comes in putting all the kinetic energy
that initially had into the compression of the spring.
So this compression is going to happen over some distance
and this is what we're going to try to find.
What we know is that finally the kinetic energy
is equal to 1/2 times the compression distant squared
and this is just the energy that we introduced
because of the spring, the spring potential energy.
So looking at these two scenarios,
the upper scenario and the lower scenario.
We have an initial kinetic energy of 1/2 mv squared
with no potential energy because our spring is not at all compressed.
In the final scenario, an E2, we have a spring compressed
and so it has kinetic, potential rather energy stored in it
and the value of that stored energy is 1/2 k
times the compression distance, x minus x zero squared.
The ideas that we want to do is equate these energies
by conservation of energy.
So lastly, it's important to say that the kinetic energy of this box
right when it's fully compressed to zero,
the box is not moving
and that's the reason that the final energy expression that we have here
has no kinetic energy in it.
So what we have to do is try to find this compression distance
by equating our energies, saying that E1 equals E2,
we have 1/2 mv squared equals 1/2 k times the distance,
X minus X zero and you can call this whatever you want,
if want to call this distance,
if you just want to call it D, you can do that.
We have this squared
and by the way keep in mind that we have position X here,
a position X zero here.
So anytime we try to find a distance between two positions
you always do final minus initial, so this is X minus X zero.
So for example this is a position of zero meters
and this is a position of 5 meters,
the distance will be 5 minus zero or 5,
so this always works, this don't happen to be our values,
but we can call this d as well if we wanted.
Multiplying both sides by 2 we get rid of our 1/2.
We can divide both sides by k, getting rid of that from the right-hand side
and we find that X minus X zero or our distance, d.
And again you can call this whatever you like
is equal to the square root of mv squared over k.
Now, this is something that we can also simplify a little bit
because we could pull out the velocity.
So we have the square root of m over k.
And again the velocity was 5.
We have the square root of the mass which is also 5 kilograms.
We have our spring constant which one more time is 5
and very poetically, we have an answer of,
a position of 5 meters compression.
So it turns out that this 5 I introduced
was not only the answer but consistent with all the other 5s in this problem
and we found the compression distance for this object
running right into a spring.
The important thing again is to notice
that we simply have expressions for energy.
We have an energy initially.
We have an energy finally or maybe at many different locations
as we saw on a prior example.
We can write the energy at each time
and then say that energy is conserved
and so this energy is always the same
throughout the given problem.