Angles of rotation I am haunted by a problem of angles of rotation. Here's my nightmare. At the origin of an inertial frame $R_0(XYZ)$, there is a ball. Another reference frame $R(xyz)$ is fixed to the center of this ball. At the beginning, the origin of $R_0$ coincides the origin of $R$, and $x\parallel X$,  $y\parallel Y$, $z\parallel Z$ and in the same orientation. Then the ball begins to roll. Firstly, it rotates by an angle of $\psi$ around the axe $Z$ in $R_0$; secondly, it rotates by an angle of $\theta$ around the 'new' axe $x$ in $R$; finally, it rotates by an angle of $\phi$ around the 'final' axe $y$ in $R$. My question is, after these three rotations, could we express the angles of rotation ($\theta_X$,$\theta_Y$,$\theta_Z$)of the ball with respect to the 3 axes $X$,$Y$ and $Z$ of inertial frame $R_0$? I tried different ways, but it seems to be too complexe to express them without using integration. Is there any existing mathematical formulation to deal this problem? Thank you for taking a look!
 A: Hint:
You can solve this problem representing the rotations by means of quaternions. (see here and, more briefly: Representing rotations using quaternions ).
Let $\mathbf{i},\mathbf{j},\mathbf{k}$ the three versors of the axis $X,Y,Z$ in $R_0$. The first rotation of the $x,y,z$ axis around $Z$ of angle $\psi$, is given, in exponential notation, by:
$$
\mathbf{x_1}=e^{\mathbf{k}\psi/2}\mathbf{i}e^{\mathbf{k}\psi/2}=\mathbf{i}\cos \psi+\mathbf{j} \sin \psi 
$$
$$
\mathbf{y_1}=e^{\mathbf{k}\psi/2}\mathbf{j}e^{\mathbf{k}\psi/2}=-\mathbf{i}\sin \psi+\mathbf{j} \cos \psi 
$$
$$
\mathbf{z_1}=\mathbf{z}=\mathbf{k}
$$
where $\mathbf{x_1},\mathbf{y_1},\mathbf{z_1}$ are the rotated versors of the moving frame $R$(note that this is a simple rotation in the $XY$ plane and the quaternion representation seems a unnecessary complication).  
Now the second rotation is about the versor $\mathbf{x_1}$ of an angle $\theta$ so , with obvious notation, the rotated versors are given by:
$$
\mathbf{x_2}=\mathbf{x_1}
$$
$$
\mathbf{y_2}=e^{\mathbf{x_1}\theta/2}\mathbf{y_1}e^{-\mathbf{x_1}\theta/2}
$$
$$
\mathbf{z_2}=e^{\mathbf{x_1}\theta/2}\mathbf{k}e^{-\mathbf{x_1}\theta/2}
$$
Here the calculus becomes more complex and the use of quaternions is well justified. And, in the same way we can represent the other rotation around $\mathbf{y_2}$:
$$
\mathbf{x_3}=e^{\mathbf{y_2}\phi/2}\mathbf{x_2}e^{-\mathbf{y_2}\phi/2}
$$
$$
\mathbf{y_3}=\mathbf{y_2}
$$
$$
\mathbf{z_3}=e^{\mathbf{y_2}\phi/2}\mathbf{z_2}e^{-\mathbf{y_2}\phi/2}
$$
From these you can easily found the angles between the rotated versors $ \mathbf{x_3},\mathbf{y_3},\mathbf{z_3}$, and the axis of the fixed reference system using the scalar product.
Clearly the explicit calculation of the components of $\mathbf{x_3},\mathbf{y_3},\mathbf{z_3}$ requires a bit of algebraic work. And, if you prefer, you can find the same result also using the matrix representation of the rotations, obviously in the correct order.
