Solution (source code)

= Solution

For a twice continuously differentiable <stream function>, equality of mixed derivatives gives
$$
\nabla\cdot\mathbf u=u_x+v_y=\psi_{yx}-\psi_{xy}=0.
$$
This is the <incompressible flow> condition in two dimensions. A <streamline> is a curve whose tangent at each regular point is parallel to the instantaneous velocity field. Parameterize it by $\gamma'(s)=c(s)(u,v)$. The <chain rule> yields
$$
\frac d{ds}\psi(\gamma(s))=c(s)(\psi_x\psi_y-\psi_y\psi_x)=0.
$$
Therefore \b[the <stream function> is constant on each <streamline>]. This proof includes arbitrary regular parametrizations; at a stagnation point the velocity vanishes and the usual tangent direction is not determined.