Solution (source code)

= Solution

For $\mathbf u=\nabla\times(\psi\hat{\mathbf y})$,
$$
\boxed{u=-\psi_z,\qquad w=\psi_x}.
$$
Hence $u_x+w_z=-\psi_{zx}+\psi_{xz}=0$, so <mass conservation> holds identically. Removing the hydrostatic part by writing
$$
p=-\rho gz+p',
$$
and taking the curl of the <Stokes flow> equation gives the biharmonic equation
$$
\boxed{\nabla^4\psi=0}.
$$

For a <Fourier mode> proportional to $e^{ikx}$ with $k>0$, decay as $z\to-\infty$ selects
$$
\psi=(A+Cz)e^{kz}e^{ikx}.
$$
The velocity and pressure fields are therefore
$$
\boxed{
u=-[C+k(A+Cz)]e^{kz}e^{ikx}},
$$
$$
\boxed{
w=ik(A+Cz)e^{kz}e^{ikx}},
$$
$$
\boxed{
p=-\rho gz+2i\mu kC\,e^{kz}e^{ikx}}.
$$
Direct substitution verifies the momentum equation.

Solved by gpt-5.6-sol high.