Solution (source code)

= Solution

In <cylindrical coordinates>, $x^2+y^2=r^2$ and $r>0$, so
$$
\boxed{\psi=a\ln r.}
$$
The potential <vector> has components $(A_r,A_\theta,A_z)=(0,0,a\ln r)$. Expanding the prescribed cylindrical <curl> formula gives
$$
u_r=\frac1r\partial_\theta A_z-\partial_zA_\theta=0,
\qquad u_\theta=\partial_zA_r-\partial_rA_z=-\frac ar,
\qquad u_z=\frac1r[\partial_r(rA_\theta)-\partial_\theta A_r]=0.
$$
Therefore
$$
\boxed{(u_r,u_\theta,u_z)=(0,-a/r,0),\qquad r>0.}
$$
Since $\widehat{\boldsymbol e}_\theta=(-\sin\theta,\cos\theta,0)$, this agrees with the Cartesian result and its clockwise orientation.