Given a cube centered at the origin, with side length $2a$, determine the length of the semi-axes of the ellipsoid inscribed in the cube, touching all its $6$ faces, such that the semi-axes lengths are of the form $ b , b , \dfrac{b}{2} $. Determine $b$ in terms of $a$.
My attempt:
The ellipsoid can be oriented, with its shortest semi-axis along one of the four major diagonals of the cube. Let pick one such diagonal to be the diagonal extending from $(-a, -a, -a)$ to $(a,a,a)$. Then the rotation matrix giving the orientation of the ellipsoid, is found by attaching a reference frame to the ellipsoid, with its $z'$ axis along the shortest semi-axis (although other choices are possible), and then the rotation matrix can be chosen as
$ R = [ r_1, r_2, r_3 ] $
where
$ r_3 = [ \sin \theta \cos \phi , \sin \theta \sin \phi, \cos \theta ] $
with $\theta = \cos^{-1} \left( \dfrac{1}{\sqrt{3}} \right) = \tan^{-1}( \sqrt{2} ) $
And $ \phi = \dfrac{\pi}{4} $
And we can then choose $r_1, r_2$ to be
$ r_1 = [ \cos \theta \cos \phi , \cos \theta \sin \phi, - \sin \theta ]^T $
$ r_2 = [- \sin \phi, \cos \phi , 0 ]^T $
The equation of the ellipsoid will be
$ r^T R D R^T r = 1 $
where $ r = [x,y,z]^T$, and $R$ is the rotation matrix given above, and
$ D = \begin{bmatrix} \dfrac{1}{b^2} && 0 && 0 \\ 0 && \dfrac{1}{b^2} && 0 \\ 0 && 0 && \dfrac{4}{b^2} \end{bmatrix} $
Let $A$ be the tangency point, between the ellipsoid and the cube, at the plane $x = -a$, then we can write using the expression for the gradient of the ellipsoid,
$ R D R^T A = - k \mathbf{e_1} $
where $\mathbf{e_1}$ is the unit vector along the positive $x$ axis, i.e. $ \mathbf{e_1} = [1, 0, 0]^T $
This implies that
$ A = - k R D^{-1} R^T \mathbf{e_1} $ where $ k \gt 0 $
Since $A$ is on the ellipsoid, then substituting this expression into the equation of the ellipsoid, gives us
$ k = \dfrac{1}{\sqrt{ \mathbf{e_1}^T R D^{-1} R^T \mathbf{e_1} } } $
Furthermore, if we now pre-multiply the above equation by $\mathbf{e_1}^T $, we get
$ \mathbf{e_1}^T A = - a = -\sqrt{ \mathbf{e_1}^T R D^{-1} R^T \mathbf{e_1} } $
So that
$ \mathbf{e_1}^T R D^{-1} R^T \mathbf{e_1} = a^2 $
To evaluate the left hand side, first note that
$ R^T \mathbf{e_1} = \begin{bmatrix} \cos \theta \cos \phi \\ - \sin \phi \\ \sin \theta \cos \phi \end{bmatrix} = \begin{bmatrix} \dfrac{1}{\sqrt{6}} \\ - \dfrac{1}{\sqrt{2}} \\ \dfrac{1}{\sqrt{3}} \end{bmatrix} $
Therefore,
$ \mathbf{e_1}^T R D^{-1} R^T \mathbf{e_1} = \dfrac{b^2}{6} + \dfrac{b^2}{2} + \dfrac{b^2}{12} = \dfrac{3}{4} b^2 $
Hence, finally, we have
$ \dfrac{3}{4} b^2 = a^2 $
Giving,
$ b = \dfrac{2}{\sqrt{3}} a $
And my question now, is this analysis sound? and is the final result correct?
Your verification of my attempt, comments, and alternative answers are appreciated.

