I'm working through a problem that requests i find the stream function of a complex potential. in which case i know i need to split the complex potential into it's real and imaginary parts.
The potential is $$W(z) = \frac{m}{2\pi} \log\left\{\frac{(z-b)(a^2-bz)}{z}\right\}$$ $$= \frac{m}{2\pi}\left\{ \log(z-b)+log(a^2-bz)-log(z)\right\}$$ my next plan is to throw in $z = x+iy$ and then seperate out the logs but i've now seen two versions of the same identity.
from memory i believe $$Log(x+iy) = ln(r)+i\theta =\frac{1}{2}ln(x^2+y^2)+i \tan^{-1}{\frac{y}{x}}$$ but i've also seen $$Log(a+bi)={{\ln(a^2+b^2)} \over 2}+\left({{\pi ~sign(b)} \over 2}-\tan^{-1}{ a \over b} \right) \cdot i$$
i'm just wondering where the variation is coming from. and which one to use in the above problem.
I see why now. it's stemming from the Reciprocal arguments of arctan
ie Let $\frac{1}{z} = \frac{y}{x}$ then $z = \frac{x}{y}$ and we have $$\tan^{-1}\left(\frac{1}{z}\right) = \frac{\pi}{2}-\tan^{-1}(z),~z>0$$ and $$\tan^{-1}\left(\frac{1}{z}\right) = -\frac{\pi}{2}-\tan^{-1}(z),~z<0$$ which equates to $$\tan^{-1}\left(\frac{1}{z}\right) =\frac{\pi ~sign(z)}{2}-\tan^{-1}(z),~|z| \neq 0$$ as required.
and i'm guessing i'd use this version of the arguement when i'm dealing with the Log function as it's undefined at $z = 0$ anyway.