Solution (source code)

= Solution

Take the divergence of the elastic equation. With $\theta=\nabla\cdot\mathbf u$,
$$
\rho\theta_{tt}=(\lambda+2\mu)\nabla^2\theta.
$$
Thus dilatational P-waves have speed
$$
\boxed{c_P=\sqrt{\frac{\lambda+2\mu}{\rho}}.}
$$

Taking the curl and writing $\boldsymbol\omega=\nabla\times\mathbf u$ eliminates the gradient term and gives
$$
\rho\boldsymbol\omega_{tt}=\mu\nabla^2\boldsymbol\omega.
$$
Thus rotational S-waves have speed
$$
\boxed{c_S=\sqrt{\frac\mu\rho}.}
$$