Solution (source code)

= Solution

Here both the <divergence> and <vorticity> vanish:
$$
\partial_x(-2y)+\partial_y(-2x)=0,\qquad \partial_x(-2x)-\partial_y(-2y)=-2+2=0.
$$
The flow is \b[incompressible and irrotational]. With $\mathbf u=\nabla\phi$ and $(u_x,u_y)=(\psi_y,-\psi_x)$,
$$
\boxed{\phi=-2xy+C,\qquad\psi=x^2-y^2+C'}.
$$
The <streamlines> are the <level sets> $x^2-y^2=\text{constant}$. To determine the arrows, put $r=x+y$ and $s=x-y$. A particle satisfies $\dot r=-2r$, $\dot s=2s$. Thus the <separatrix> $y=x$ approaches the stagnation point at the origin, whereas $y=-x$ leaves it; the other <streamlines> are hyperbolas following those asymptotes. The origin itself is a stationary particle.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/ib/paper-1-streamlines.png]
{title=Streamlines and directions for the incompressible irrotational flow}