Solution (source code)

= Solution

Interpret $\rho_2$ as the ambient <density>: the PDF's phrase assigning it a “depth” is a typographical error. Take $0<\rho_1-\rho_2\ll\rho_2$, and use a common reference <density> in inertia while retaining the <density> difference in <buoyancy>. This is the <Boussinesq approximation>, with <reduced gravity> $g'=g(\rho_1-\rho_2)/\rho_{\mathrm{ref}}>0$. For the <shallow water> approximation, the lower-layer depth must be small compared with longitudinal variation scales, vertical accelerations must be negligible and <pressure> hydrostatic. The deep ambient is approximated as a <hydrostatic pressure> reservoir away from the nose; assume a uniform <velocity> over each lower-layer cross-section and neglect drag and entrainment.

Write the prismatic triangular area as $A(h)=kh^2$ with fixed $k>0$, so the width at height $z$ is $2kz$. The excess <hydrostatic pressure> force divided by reference <density> is
$$
P(h)=g'\int_0^h(h-z)2kz\,dz=\frac{g'kh^3}{3}.
$$
The <prismatic-channel shallow water equations> are therefore
$$
\boxed{(kh^2)_t+(kh^2u)_x=0,\qquad
(kh^2u)_t+\left(kh^2u^2+\frac{g'kh^3}{3}\right)_x=0.}
$$
For positive depth, divide the first equation by $2kh$ and use it in the second to obtain
$$
\boxed{h_t+uh_x+\frac h2u_x=0,\qquad
u_t+uu_x+g'h_x=0.}
$$
The coefficient matrix in variables $(h,u)$ is $\begin{pmatrix}u&h/2\\g'&u\end{pmatrix}$. Its two distinct real <characteristic speeds> are
$$
\boxed{\lambda_\pm=u\pm c,\qquad c=\sqrt{g'h/2}.}
$$
Thus the system is strictly hyperbolic for $h>0$ and $g'>0$, though it degenerates at zero depth. Since $dc/dh=c/(2h)$, direct substitution in the two equations gives
$$
\boxed{\left[\partial_t+(u\pm c)\partial_x\right](u\pm4c)=0.}
$$
Hence $R_\pm=u\pm4c$ are the <Riemann invariants> conserved along their respective <characteristic curves>. The factor four, rather than the rectangular-channel factor two, comes from the triangular relation $A\propto h^2$.