Given is a mechanical multiple degree of freedom system described by the following matrices and equation:
mass matrix ${\bf{m}} = \left[\begin{matrix} m & 0 & 0 \\ 0 & m & 0 \\ 0 & 0 & m/2 \end{matrix}\right]$,
stiffness matrix ${\bf{k}} = \left[\begin{matrix} 2k & -k & 0 \\ -k & 2k & -k \\ 0 & -k & k \end{matrix}\right]$,
displacements ${\bf{u}} = \left[\begin{matrix}u_1(t) \\ u_2(t) \\ u_3(t)\end{matrix}\right]$,
external force ${\bf{p}} = \left[\begin{matrix}0\\0\\p_0\sin(\omega t)\end{matrix}\right]$, and
equation of motion ${\bf{m\ddot{u}}}+{\bf{ku}} = \bf{p}$.
The natural frequencies $\omega_i$ have been derived from the eigenvalue problem $\det({\bf{k}}-\omega_i^2{\bf{m}})=0$ which led to:
$\omega_1^2=(2-\sqrt{3})\frac{k}{m}\,,\,\omega_2^2=2\frac{k}{m}\,,\,\omega_3^2=(2+\sqrt{3})\frac{k}{m}$.
I know that the steady-state solution for $\bf{u}$ is
${\bf{u}}=\frac{1}{\det({\bf{k}}-\omega^2{\bf{m}})}\rm{adj}({\bf{k}}-\omega^2{\bf{m}})\,\bf{p}$,
so I have to calculate the determinant and adjugate. I actually have no problem doing that, but the textbook solution looks much more elegant than mine and I don't know how to get there.
My solution:
$\det({\bf{k}}-\omega^2{\bf{m}}) = \frac{1}{2}(2k-\omega^2m)^3-3k^3$,
${\rm{adj}}({\bf{k}}-\omega^2{\bf{m}}) = \left[\begin{matrix} \dots & \dots & k^2 \\ \dots & \dots & k(2k-\omega^2m) \\ \dots & \dots & (2k-\omega^2m)^2-k^2 \end{matrix}\right]$ (only the third column is relevant to the solution)
Textbook solution:
$\det({\bf{k}}-\omega^2{\bf{m}}) = \frac{1}{2}m^3(\omega_1^2-\omega^2)(\omega_2^2-\omega^2)(\omega_3^2-\omega^2)=k^3(1-\frac{\omega^2}{\omega_1^2})(1-\frac{\omega^2}{\omega_2^2})(1-\frac{\omega^2}{\omega_3^2})$,
${\rm{adj}}({\bf{k}}-\omega^2{\bf{m}}) = \left[\begin{matrix} \dots & \dots & 1 \\ \dots & \dots & 2(1-\omega^2/\omega_2^2) \\ \dots & \dots & 4(1-\omega^2/\omega_2^2)^2-1 \end{matrix}\right]k^2$
My question is: How can I get the textbook solution which is written in terms of the natural frequencies? It seems to me like there is some way to express ${\bf{k}}-\omega^2{\bf{m}}$ mostly in terms of the natural frequencies and then I could go from there, but I don't know how I should do that.