I'm attempting to show that the following function (which is defined everywhere on $\mathbb{C} $ with the exception of a discrete set) is harmonic,
\begin{align*} \psi(z) &:= \mathfrak{R}[\log\left(1 + \frac{4k^3}{(z+k)^{2}(z-2k)}\right)]\\[10pt] &=\log\left(\left\vert1 + \frac{4k^3}{(z-2k)(z+k)^2}\right\vert\right) \end{align*}
where $z=x+iy$ and $k \in \mathbb{C}$ is some constant. I believe it is enough to show that this function satisfies the Cauchy-Riemann equations, namely, $\frac{\partial \psi}{\partial x} = i\frac{\partial \psi}{\partial y}$.
So this is my attempt so far, first to make the calculations nicer I define $\mathrm{g}(z) := 1 + \frac{4k^3}{(z-2k)(z+k)^2}$. Then we have,
\begin{align*} \frac{\partial g}{\partial x} &= \frac{\partial}{\partial x}\left(1+4k^{3}(x+iy-2k)^{-1}(x+iy+k)^{-2}\right)\\[10pt] &= 4k^{3}\left(\frac{-1}{(x+iy-2k)^{2}(x+iy+k)^2} + \frac{-2}{(x+iy-2k)(x+iy+k)^3}\right).\\[2pt] &= 4k^{3}\left(\frac{-1}{(z-2k)^{2}(z+k)^2} + \frac{-2}{(z-2k)(z+k)^3}\right).\\[5pt] \end{align*} \begin{align*} \frac{\partial g}{\partial y} &= \frac{\partial}{\partial y}\left(1+4k^{3}(x+iy-2k)^{-1}(x+iy+k)^{-2}\right)\\[10pt] &= 4k^{3}\left(\frac{-i}{(x+iy-2k)^{2}(x+iy+k)^2} + \frac{-2i}{(x+iy-2k)(x+iy+k)^3}\right).\\[2pt] &= 4ik^{3}\left(\frac{-1}{(z-2k)^{2}(z+k)^2} + \frac{-2}{(z-2k)(z+k)^3}\right).\\[5pt] &=i\frac{\partial \mathrm{g}}{\partial x} \end{align*}
Then what I did next I believe is incorrect due to the fact that $\frac{\partial |w|}{\partial w} \not= \frac{w}{|w|}$ for complex $w$:
\begin{align*} \frac{\partial \psi_{0}}{\partial x} &=\frac{\partial}{\partial x} \log\left(\left\vert \mathrm{g}\right\vert\right) = \frac{1}{|\mathrm{g}|} \frac{\partial}{\partial x} \left(\left\vert \mathrm{g}\right\vert\right) = \frac{1}{|\mathrm{g}|} \frac{\partial |\mathrm{g}|}{\partial \mathrm{g}} \frac{\partial \mathrm{g}}{\partial x} = \frac{\mathrm{g}}{|\mathrm{g}|^2} \frac{\partial \mathrm{g}}{\partial x}\\[10pt] \end{align*} Similarly, \begin{align*} \frac{\partial \psi_0}{\partial y} = \frac{\mathrm{g}}{|\mathrm{g}|^2} \frac{\partial \mathrm{g}}{\partial y} = i\frac{\mathrm{g}}{|\mathrm{g}|^2} \frac{\partial \mathrm{g}}{\partial x}\\[10pt] \Longrightarrow \frac{\partial \psi_{0}}{\partial x} = i\frac{\partial \psi_0}{\partial y}. \end{align*}.
Given that this last bit is incorrect, I am not sure how to proceed to that this function is harmonic. Any ideas?
for any $w$ for which the denominator is not zero and $f(w) \ne 0$, so $f(w)$ above is finite and non-zero hence analytic near $w$, the function $g_w(z)=\log f(z)$ is defined and analytic locally near $w$ -say on a small disc $D(w, \epsilon)$ where $f(z) \ne 0$ (uniquely by picking a fixed value of $\arg f(w)$), so in particular $\log |f(z)|=\Re g_w(z)$ is harmonic near $w$.
But harmonicity is a local property (Laplacian zero at $w$ depends on a small neighborhood of $w$ only!), so it follows that $\log |f(z)|$ is harmonic everywhere where finite.
This proof works for any analytic function in any open set, namely $\log |f|$ is harmonic everwhere where it is finite and not zero (and subharmonic at the $-\infty$ points which are the discrete zeroes of $f$ assumed not identically zero of course)