= Solution
For the lower semicircle
$$
z(x)=-\sqrt{a^2-x^2},
\qquad
\sqrt{1+z'^2}=\frac{a}{-z}.
$$
For a general potential, the Beltrami first integral is
$$
\frac{\rho\Phi(z)+\lambda}{\sqrt{1+z'^2}}=C.
$$
Substitution of the semicircle therefore requires
$$
-\frac{z}{a}\bigl(\rho\Phi(z)+\lambda\bigr)=C.
$$
Thus, up to an arbitrary additive constant and a multiplicative strength,
$$
\boxed{\Phi(z)=\Phi_0+\frac{A}{z}}.
$$
The additive constant is absorbed by the length multiplier. The semicircle has length $\pi a$, as required.
Back to article page