So far, we have described the motion of a point mass basically particle located at a singular point
in space on a rotational or on a circular trajectory.
And in the end, we have calculated the rotational energy, which is the same as the kinetic energy.
And we have found out that its m half times omega squared times are square.
So far, we have considered only a single point or a single mass.
So now in the following, we will discuss the motion of real objects that have a spatial extent, but
we could also see that this is the motion of multiple point masses.
So the idea that we are using here is that we are combining several of these point masses to form a
whole object.
And if we assume that all of these point passes belong to the same object, then the only thing that
we have to make sure is true is that all of these point masses will have the same angular velocity omega.
And the radius, for example, can differ in principle.
Also, the mass can differ if we have some density distribution in the sample.
But here in this lecture, we are not going to consider this.
So here also the mass will be uniform, and so only the radius will differ here.
And so what we can do then is we can write down the rotational energy basically as being m half times
square times the sum over all of the position.
So all of the the the distances, the radii square and typically in physics, this is written down with
this eye constant here, which is the moment of his or typo moment of inertia.
So the moment of inertia, as you can see by these equations, will be m times the sum over all the
radii squared.
So just one second, and please really try to understand what the RBI means here.
This is really the distance of the point in space that we are considering at the moment with respect
to the rotational axis.
So it doesn't necessarily have to be some type of radius, but you will see this in a second, I think.
So our first example will be a rotating stick.
So you basically have a stick and you rotated around one of its ends and we try to calculate the moment
of inertia.
And you see the analytical result that you can take from a textbook will be one third of the mass times
the length squared.
So first of all, we must define the length and for simplicity, I will define that it's equal to one.
And here you see already the analytical result that I have derived, but we will come back to this in
a second.
First of all, I want to plot this motion so we can, for example, take this plot and copy it and then
just slightly modify what's what's going on here.
So what we're going to have here is the X coordinate, the Y coordinate, and then we must create some
list of points that belong to the stick, basically.
So I would call this our list.
So the R list is a num pi in space starting from zero and going to S, which is the total length.
And now we must decide a numbers of points that we want to use.
So I don't know.
I would say, let's use 100 for the beginning.
We can increase the number later on.
So like this
now I have to change this one here.
So I write our list and then for the Y coordinate for the beginning, I just want to plot here two starting
points.
I want to say, let's assume that our stick is pointing along to along the X direction, so the Y coordinate
will be zero.
So we just have to generate here a list of zeros.
And this you can do pretty easily.
You could also do it by alien space, but it's even easier to just write NP zeros and then you just
have to provide the number of points that you want to have.
And of course, this must be the same number of points that you have in our list.
So I think now I can run this, so we have the stick and I just want to change here.
The limits of the plots x limb from minus one to one and the same goes for Y limits.
So it will be like this.
And here I did a mistake.
Yeah, this is, of course, a thought, not an underscore.
And you see, maybe we make this a bit larger.
Yes.
So you have to make it really precise, we should probably right, 1.2 times has.
And then here as well, but in our case, it wouldn't matter because as this one.
So you see, this is the stick, and over time, the stick will be rotated around the center coordinate.
And now we have a way to really visualize this.
So I want to make this new sound just so that it looks nicer.
So, yeah, this will be the points and this will be the actual plot.
All right.
So before we use our numerical methods to calculate the moment of inertia, I I want to show you how
you how you do it, when you want to do it analytically.
So of course, a physicist would say doing it, doing it analytically is always the best thing because
then you really understand what's going on and you get really the precise results.
But you can see already here that it can be a bit difficult.
So I will just briefly go over this because this is not a course about theoretical or mathematical physics,
it's about Python and using Python for physics.
But still, I think here it's quite nice if you understand what is happening.
So you see the rotational energy we have to find before this was i of a two times I'll make a square.
Let's go up here just to make sure here it is.
But then we have also seen that the kinetic energy or the rotational energy for a single point mass
was Imhoff times omega squared times our square.
So what's happening here is we have to now integrate or add up all the points to describe the whole
object that is rotating here.
So it's basically one-half omega squared times to sum over all these points.
And then, of course, over the radius square.
So why do we want to write this as an integral?
We have to write integral over the M, which is the integration of all infinitesimal elements of the
mass and then the corresponding radius square of this element.
So the item at the moment of inertia is then just the integral D.M. our square.
So now you have to think of it, and this is maybe always a bit difficult because, yeah, you have
to just think what is happening and how can you transform your variables to be able to solve this whole
problem?
And of course, the mass element will be equal to some kind of length density.
So the sigma here is called a length.
Density is just like the real density, which is mass divided by volume.
But here, since we basically have a one dimensional problem and not three dimensional, it is mass
divided by the length.
So therefore, we call it only a length density, but it's a similar property to an actual density.
So the dam will be just signaler times R and the Zygmunt itself, as I said, will be the mass, the
total mass divided by the total length.
So now we can just substitute this one in here, so we get integral Sigma Deora, our square and sigma
is m over s and since M and S to not depend on our, we can just pull it out of the integral.
So we have amassed times this integral D, our times are square.
So this is a pretty easy integral to solve.
You just have to think, OK, which function do I have to drive to end up with our square?
And this is, of course, one third.
Times are two to three.
Then use set out and you plug in the limits so you go from R2 zero to our equal to s.
So this term will be zero and you just substitute R with S and you get finally the result m of S times
one third times as to the power of three.
And then this s and this three cancels, or we just end up with one third and times as square.
So this is one of the easiest analytical derivations of the moments of inertia for almost all other
problems.
It will be way more difficult.
And I have to say, even here, it can be a bit difficult if you're doing this for the first time.
And maybe if you're not so good with solving integrals and doing these transformations here, it can
be quite tricky to yeah, to get the result.
So what we are going to do here is we are just solving this numerically.
And first of all, so that we can check if we did it correctly.
Let me add here a cell and let me just calculate the value from the analytical results.
Parametres, so this will basically just be one third times.
Times, mass, Times Square.
This will just be the value for AI.
And then we could also calculate the value for the rotational energy, which is maybe better to compare
it.
So basically, we have to then divide by two and have to multiply by omega squared.
OK, so this will be the value.
And in case you don't know, this is equal to one over six.
OK, so now let's finally come to the numerical results, so we have already generated a list of points
that represent our stake.
So let's work with this list and maybe just to make it look better.
I just right here our list so that we see what's going on.
So we have these 100 points describing our stick and an equidistant manner from zero where it starts
to one word ends.
And now what we have to do is we have to basically calculate the expression for the kinetic energy.
So we have to calculate em so.
So, so basically, we have to say em half times omega squared times.
Our square, this was our equation from the beginning, let me scroll up.
This was this one here that we have derived.
But now, of course, every point in this list has a different radius, so we have to add up all the
points, all the contribution from these points.
And furthermore, since we are adding up, we have to.
He have to consider here not the total mass, but the mass of every of these elements.
So this will be the mass divided by the number of points.
So there's all the and divided by no points.
Yes.
And here we have to say this will be the Sun and the Comanche will be and taught some.
And now we have to take every element after this, our list and square it.
And since this one here is not actually a list, as I just said, but it's an array we have seen in
our crash course that when we apply some mathematical operation like squaring it, this will be applied
to every individual element.
And this is exactly what we want.
So this year, our list square will be the list.
Ah, but every element is squared.
And now we just have to calculate the sum of all of these elements.
So I think this expression here is already correct.
And you see, the result is quite close to the numerical sorry to the analytical result.
And this really didn't take much effort.
It was just a single line of code.
So now we can check what happens if we increase the number of points, so we could say 1000 that we
rerun all the cells.
And finally, this one and you see it gets even closer.
So now there's only a very small difference, and you can further improve the results by increasing
the number here.
Or we could also be a bit more clever about the choice here because it's not so clever to start from
zero to go to S.
It would be better to shift all the points by one half.
So, yeah, but I think it's not really necessary here because our result is already pretty good.
So you see at this example that it can be very helpful to use NUMÉRIQUES to calculate such things.
So of course, you could just look up this result in a textbook or you could derive it yourself analytically,
as we have done.
But you could also just tried a single line of code and then it calculates you the moment of inertia.