I'm trying to solve the following problem given on a previous exam in my fluid mechanics course:
A stationary flow is given as the following complex velocity potential:
$$ \beta(z) = \ln(z - a) + \ln(z + a) + Uiz $$
Find the real velocity potential and the stream function.
Let's first of all rewrite this as:
$$ \beta(z) = \ln(z^2 - a^2) + Uiz $$
We know that the real velocity potential and the stream function are respectively given as the real and imaginary parts of the complex potential:
$$ \beta = \phi + i\psi $$
We know that a complex logarithm can be rewritten as:
$$ \ln(z) = \ln(r) + i\theta = \frac{1}{2}\ln(x^2 + y^2) + i\arctan2(y,x) $$
With this we can rewrite the complex potential as
$$ \beta (z) = \frac{1}{2}\ln(x^2 - y^2 - a^2 + 4x^2y^2) + i\arctan2(2xy,x^2 - y^2 - a^2) + U(-y +ix) $$
which gives:
$$ \phi = \frac{1}{2}\ln(x^2 - y^2 - a^2 + 4x^2y^2) - Uy, \quad \psi = \arctan2(2xy,x^2 - y^2 - a^2) + Ux $$
Is this correct? I'm having some doubts since I wouldn't expect the somewhat esoteric arctan2 in an answer to an exam problem.