Standing on the shoulders of giants – Reboot

Standing on the shoulders of giants may be good, even very-very good. But at the same time it can be very dangerous. First of all it is a dangerous balancing act. It is easy to fall.

But what if the giant gets a hiccup? Or stumble? You may die. Or someone can die because of aftershocks.

In Standing on the shoulders of giants I quoted two papers that I used in working out my computer simulations of Dzhanibekov’s effect. These were

Ramses van Zon, Jeremy Schofield, “Numerical implementation of the exact dynamics of free rigid bodies“, J. Comput. Phys. 225, 145-164 (2007)
and
Celledoni, Elena; Zanna, Antonella.E Celledoni, F Fassò, N Säfström, A Zanna, The exact computation of the free rigid body motion and its use in splitting methods, SIAM Journal on Scientific Computing 30 (4), 2084-2112 (2008)

The algorithms were working smoothly. But recently I decided to use quaternions instead of rotation matrices. And in recent post Introducing geodesics, I have presented a little animation:

It looks impressive, but if we pay attention to details, we see something strange:

We have a nice curly trajectory, but there are also strange straight line spikes. On animation they are, perhaps, harmless. But if something like this happens with the software controlling the flight of airplanes, space rockets or satellites – people may die. There is a BUG in the algorithm. Yes, I did stay on shoulders of giants, but perhaps they were not the right giants for my aims? And indeed this happens. The method I used is not appropriate for working with quaternions.

That is why I have to do the reboot, and look for another giant. Here is my giant:
Antonella Zanna, professor of Mathematics, University of Bergen, specialty Numerical Analysis/Geometric Integration.

I am going to use the following paper:

The paper is only seven years old. And it has all what we need. As in Standing on the shoulders of giants we will split the attitude matrix into a product: but this time we will do it somewhat smarter. Celledoni and Zanna denote the angular momentum vector in the body frame using letter and they assume that is normalized: They assume, as we do, and use to denote the kinetic energy. Let us first look at the following part of their paper (which is available here):

Though it is not very important, I must say that it is very nice of the two authors that they acknowledge Kosenko. I was trying to study Kosenko’s paper, but I gave up not being able to understand it. Then wen notice that the case considered is that of using the notation in my posts. That means “high energy regime”.
The angular momentum is constant (fixed) in the laboratory frame owing to the conservation of angular momentum. Suppose we orient the laboratory frame so that its z axis is oriented along the angular momentum vector. Then, in the laboratory frame angular momentum has coordinates Suppose we construct a matrix that transforms into . The attitude matrix transforms vector components in the body frame into their components in the laboratory frame. In particular it transforms into . Therefore,if we write the matrix must transform into itself. Therefore must be a rotation about the third axis, that is it is of the form:

(1)

All of that we have discussed already in Standing on the shoulders of giants. But now we are going to choose differently.

So suppose we have vector of unit length. What would be the most natural way of constructing a rotation matrix that rotates into ? Simple. Project vertically onto plane. Draw a line on plane that is perpendicular to the projection. Rotate about this line by the angle between and
Let us now do the calculations. Vector has components Its projection on plane has components Orthogonal vector in plane has components (to check orthogonality calculate scalar product), So the normalized vector has components

where

The cosinus of the angle is Its sinus is
In Spin – we know that we do not know we have derived a general formula for a rotation about an angle about axis defined by a unit vector :

where for any vector

(2)

Applying the formula to our case, simple algebra leads to:

(3)

We can easily check that indeed is an orthogonal matrix with determinant 1, acting on vector gives One can also check that the vector is invariant under – as it should be as it is on the rotation axis. REDUCE program that checks it all is here.

At this point we have to make a break. It is not yet clear what is the relation of my to the paper quoted, what is the difference between this and the old version, and why is this version better?

We will continue climbing on the shoulders of giants in the following notes. But, please, remember, Standing on shoulders of giants (like “Nobel Prize Winner” Obama), is risky:

Mathematics and sex

Nowadays mathematics is almost everywhere. To know some cool mathematics (or mathematician) is nowadays sexy.

Therefore I am helping you here, on this blog, to have better relations in your lives. Just looking at the equations can already make you feel better. When you look for a little at Euler’s equations, you will sleep better. That is why today I recall some of these pretty formulas from the dynamics of spinning bodies.

Repetitio est mater studiorum – repetition is the mother of study/learning, that is what they say. So let us repeat, recollect, before traveling another road. If we climb high enough, then going down will be easy.

It is not that climbing up is difficult. It is not. We can take stairs. But it takeS time. And that is what we are going to do now: take time, do it easy way. Enjoying happy sliding down afterwards.

The two essential ingredients af the asymmetric top spinning in zero gravity are:

1. Euler’s equations
2. Attitude matrix equations

Euler equations, written in terms of the angular momentum vector with components are

(1)

are principal moments of inertia. We assume that our spinning body is asymmetric, therefore are all different from each other, and we will order them as Perhaps it is worthwhile to mention that physics of ordinary materials requires that all three numbers are strictly positive, and that   I have my pet rigid body that is essentially flat, with It looks as on the picture below

It is kind of simple but it shows all the nontrivial behavior that a rigid body can have.

Remark: As noted by Bjab in the discussion of this post, the sentence above is incorrect. At the other end of the spectrum of rigid body shapes there are one-dimensional objects. These are flying rods with They deserve a separate study.

But that is not important now.  What is important is that the components are the components of the angular momentum vector with respect to the noninertial frame that rotates with the body. Its components with respect to the inertial laboratory frame are constant in time. This is “conservation of angular momentum”- one of the most fundamental “laws” of classical mechanics. Why such a law holds, or at least approximately holds, in our Universe is not known. Physicists and philosophers are debating about “the origin of inertia”.  Some say that “because of space”, some say “because of distant parallelism”, some other say “because of distant matter”. We will not worry about these problems now. We have our laboratory inertial frame, we have frame rotating with the body, and we have rotation matrix that maps coordinates in the rotating frame to coordinates in the laboratory frame.

Recall from Angular momentum

Let be an orthonormal frame corotating with the body, and aligned with its principal axes, and let be an inertial laboratory frame, both centered at the center of mass of the body. The two frames are related by time-dependent orthogonal matrix

(2)

The inverse of is denoted by

(3)

and it is often called the attitude matrix. For a rotating body, if are coordinates of a fixed point in the body, then its coordinates in the laboratory system change in time:

(4)

Matrix satisfies differential equation that is essentially nothing more than the definition of the angular velocity vector:

(5)

thus

(6)

where for any vector

(7)

We have

(8)

A couple of comments are due at this point. First of all a careful Reader will notice that in Angular momentum we had

(9)

while now we have

(10)

What is going on?
Several things at once. First we have the map that associates a matrix to every vector. In fact it associates an antisymmetric matrix. The association has the property that is easy to verify: for every vector we have

Acting with the matrix is the same as taking cross product with vector That such an association should exist should be not a surprise. Taking cross-product with a fixed vector is a linear operation, and every linear operation on vectors is implemented by a matrix. However many students who learn about cross products,

do not learn about their relation to antisymmetric matrices and bivectors. And many students that are learning about matrices, operations with them, eigenvalues and eigenvectors, do not learn about cross-product of vectors. Perhaps because the cross-product is particular to 3D?
Anyway, we have this association, and this association has a very nice property of “covariance”: for every orthogonal matrix of determinant one we have:

(11)

That is a very important and very useful property. It can be equivalently expressed as the “covariance of the cross-product”

(12)

But equivalent expression does not replace the proof, and to prove it needs a bunch of simple but lengthy algebraic calculations and taking into account the definitions of cross-product and determinant. It can be easily done with any computer algebra software. I skip it now.
The second thing is the difference between that represents the angular momentum vector in the laboratory frame, and that represents the same vector in the body frame. Our matrix by definition, connects the two representations (see Eq. (4) above, but now we skip the time-dependence):

Now, going back to Eq. (9), we have (again we skip the time dependence)

which solves our puzzle.
Remark
: Above we have used and to distinguish between numerical representation of the same vector with respect to two different frames. But when there is no possibility of a confusion, we can denote a vector by any convenient letter whatsoever.
Let us see how the above recollection of facts can be applied. In Towards the road less traveled with spin there was the following statement:

The vertical z-axis is the natural axis to try to spin the thing. Imagine our top is floating in space, in zero gravity. We take the z-axis between our fingers, and spin the device. If our hand is not shaking too much, our top will nicely spin about the z-axis. This is the most stable axis for spinning.

The corresponding solution of Euler’s equations is where is a constant. The solution of the attitude matrix equation is

I promised to answer the question why is it so.

In general, when we have matrix differential equation of the type:

where is a constant (i.e. time independent) matrix, we can verify that is a solution. In fact, it is the unique solution with the initial data To prove it, one would have to expand into power series, take care about the convergence of the infinite series (no care needed, it is absolutely convergent), and then differentiate term by term. Let us take it for granted that is the case. In the quote from the other post above I used the letters instead of “more adequate”, but, as in the remark above, we are supposed to adjust the meaning to the context. For the matrix in the attitude equation we have so the solution with the property is which, because is a linear map, is the same as
In fact here we have the opportunity to make another application of today’s recollections. Suppose that our spinning top is completely symmetric – a perfect ball spinning one of its axes. Perfect ball means If so, the right side of the Euler’s equations is automatically zero. Therefore any constant vector is a solution. Let us choose a unit vector, so that the absolute value of the angular velocity is 1. That means our top makes a complete rotation about the axis along the vector every units of time. As noticed above the solution of the attitude equation is Therefore is the rotation matrix that describes the rotation about the axis in the direction by an angle . We have already used this fact before, but now it was a good place for recollecting.
After all these recollections we are now ready to look again at the roads that are less traveled.

Of course it is not Albert Einstein who is the author, but, in the age of fake news, who cares?

More is different

We all know that more is different. Don’t we? But listen to Philip Anderson, who in 1977 was awarded the Nobel Prize in Physics for his investigations into the electronic structure of magnetic and disordered systems, which allowed for the development of electronic switching and memory devices in computers. He ends his paper More is different” in Science journal as follows

The arrogance of the particle physicist and his intensive research may be behind us (the discoverer of the positron said “the rest is chemistry”), but we have yet to recover from that of some molecular biologists, who seem determined to try to reduce everything about the human organism to “only” chemistry, from the common cold and all mental disease to the religious instinct. Surely there are more levels of organization between human ethology and DNA than there are between DNA and quantum electrodynamics, and each level can require a whole new conceptual structure.
In closing, I offer two examples from economics of what I hope to have said. Marx said that quantitative differences become qualitative ones, but a dialogue in Paris in the 1920’s sums it up even more clearly:

FITZGERALD: The rich are different from us.
HEMINGWAY: Yes, they have more money.

Things are not simple, they are complex, sometimes very hard to understand. We need skills and tricks, intelligence and luck, we need to find our creative muse, which is not an easy task, and even with all that, understanding complexity is often a very complex task.

Now, here we are, with our asymmetric spinning top – the hardest concept in all physics – and there are questions that we need to answer. Like for instance the question asked by Bjab in a comment to the last post Crack in the Cosmic egg:

“But another question is interesting?
Can white point move along a curve in the northern hemisphere in the opposite direction?”

To which I replied (without any explanation whatsoever)

“Interesting question. Yes and no. But why yes and why no? Not so trivial.”

We need to answer those questions that can be answered. Then we will see in full light those questions that are still without answers. So, let’s do it. More is different, so now I go for more.

1. Angular velocity vector of our free asymmetric top, in the body frame, satisfies Euler’s equations

(Euler)

From the very structure of Euler’s equations we see that if the three components of , satisfy Euler’s equations, and we change the sign of any two of them, then we will have another solution of Euler’s equations. The same concerns angular momentum components That is because either both of these changed components are on the right, then the product of two minuses cancels out giving plus, or one is on the left and one is on the right, and again the changes cancel out.
Now, changing two components of a vector is equivalent to 180 degrees rotation about the third axis.

2. Let us have a look at the first animation from the previous post:

Here and the code for the solution has these lines:

A1 = Sqrt[I1*(d*I3 – 1)/(I3 – I1)];
A2 = Sqrt[I2*(d*I3 – 1)/(I3 – I2)];
A3 = Sqrt[I3*(1 – d*I1)/(I3 – I1)];
m = ((d*I3 – 1)*(I2 – I1))/((1 – d*I1)*(I3 – I2))
m1[t_] = A1*JacobiCN[B*t, m];
m2[t_] = A2*JacobiSN[B*t, m];
m3[t_] = A3*JacobiDN[B*t, m];

The vertical axis on the animation is the third axis. and the function is always non-negative. That is why the point moves in the northern hemisphere. If we change the signs of the first two components of the angular momentum vector, that is equaivalent to the rotation by 180 degrees around the vertical axis. The motion will be the same, but the point will be on the opposite side of the curve.

3. Euler’s equations concern whose components are functions of time, but the equations do not contain time explicitly. Therefore if is a solution, then is another solution, for any We can move the origin of the time axis to any point in time. Let us have a look at the table from Periods of Jacobi elliptic functions – Part 1:

We see that time translation by is the same as changing the signs of the first two components. And this is the same as shifting the point on the trajectory by half of its period, which is

4. Changing the sign of components (1,3) or (2,3) takes us to the trajectory on the southern hemisphere. The function is non-negative, so is non-positive.
5. Let us look now at the second animation, for

Now the parameter is larger than 1: One has to be careful now, because the definitions of the Jacobi functions for are tricky (see The case of inverted modulus – Treading on Tiger’s tail and Jacobi elliptic cn and dn):

(1)

(2)

(3)

Now it is the first component (that contains , that is ) that is always non-negative. That’s why the trajectory is on the right. If we change the signs of 1 and 2 (or 1 and 3) components, we can move to the trajectory on the left etc.

6. But we never go on the same trajectory in the opposite direction. Why? This morning I received an email from one of the readers. He notices the fact that the angular velocity and angular momentum vectors are, in fact, pseudovectors, and they are “abstract constructs describing reality.” And indeed. Angular momentum, by its very nature is a “bivector”, not a vector. We represent it as vector using a certain convention. And we draw it using certain conventions. In Angular momentum we have seen this piece:

… matrix can be written as

.

Why this way? Why not opposite signs? And then, why to draw in a right-handed coordinate system? We can’t represent a bivector as a vector without using some conventions about what is right and what is left. And in more than 3 dimensions vectors and bivectors belong to completely different species!

I know it is getting complex…. But so is life.