Solution (source code)

= Solution

Before the river disturbance reaches the divide, use the <similarity solution>
$$
h=\frac{Rt}{n}H(\eta),
\qquad
\eta=\frac{nx}{t\sqrt{KR}}.
$$
Substitution gives the nonlinear boundary-value problem
$$
\boxed{(HH')'+\eta H'+1-H=0,
\qquad H(0)=0,
\qquad H(\eta)\to1\quad(\eta\to\infty).}
$$
It can be solved numerically. If $C=\lim_{\eta\downarrow0}HH'>0$, then the riverward flux and near-river profile are
$$
\boxed{q(0,t)=-\frac{R\sqrt{KR}}nCt,}
$$
$$
\boxed{H\sim(2C\eta)^{1/2},
\qquad
h\sim\frac Rn\left(\frac{2Cntx}{\sqrt{KR}}\right)^{1/2}.}
$$
The negative sign means flow toward decreasing $x$; the discharge into the river is $-q(0,t)$.