Let $\Omega$ be a domain in $\mathbb{C}$ and $v$ be a function on $\Omega.$ Suppose that $v(z)$ depends only on $|z|$ and not on arg$z.$ Show that $v$ is harmonic if and only if $v(z)=A\log |z|+B$ for some constants $A$ and $B$.
Any hint. Thanks in advance!
Observe we may write
$z = re^{i\theta} = \vert z \vert \exp(i\arg z); \tag 0$
then $\vert z \vert = r$ and $\theta = \arg z$; we see that since $v(z)$ does not depend on $\theta$, $\partial v / \partial \theta = 0$, whence:
The suggested answer our OP Eklavya deleted as owner was on the right track insofar as it suggested looking at the Laplacian of $v$ in polar coordinates, viz.
$\dfrac{\partial^2v}{\partial r^2} + \dfrac{1}{r}\dfrac{\partial v}{\partial r} + \dfrac{1}{r^2}\dfrac{\partial^2v}{\partial \theta^2}= 0; \tag 1$
since $v$ is "rotation invariant"; for convenience with typing $\LaTeX$, I am going to adopt the abbreviation
$v_r = \dfrac{\partial v}{\partial r}, \tag 2$
so that (1) becomes
$v_{rr}+ \dfrac{1}{r} v_r = 0, \tag 3$
which, in a vicinity where $v_r \ne 0$, may be written
$\dfrac{v_{rr}}{v_r} = -\dfrac{1}{r}, \tag 4$
or
$(\ln v_r)_r = -\dfrac{1}{r}, \tag 5$
which may be integrated with respect to $r$ to yield
$\ln v_r(r) - \ln v_r(r_0) = \displaystyle \int_{r_0}^r (\ln v_r(s))ds = -\int_{r_0}^r \dfrac{1}{s} ds = \ln r_0 - \ln r, \tag 6$
or
$\ln(\dfrac{v_r(r)}{v_r(r_0)}) = \ln \dfrac{r_0}{r}; \tag 7$
we exponentiate,
$\dfrac{v_r(r)}{v_r(r_0)} = \dfrac{r_0}{r}; \tag 8$
thus
$v_r(r) = \dfrac{v_r(r_0)r_0}{r}; \tag 9$
we may integrate (9) again,
$v(r) - v(r_0) = \displaystyle \int_{r_0}^r v_r(s) ds = \int_{r_0}^r \dfrac{v_r(r_0)r_0}{s}ds = v_r(r_0)r_0(\ln r -\ln r_0), \tag{10}$
finally,
$v(r) = v_r(r_0)r_0\ln r - v_r(r_0)r_0\ln r_0 + v(r_0), \tag{11}$
thus
$v(z) = v(r) = A\ln \vert z \vert + B, \tag{12}$
where
$A = v_r(r_0)r_0 \tag{13}$
and
$B = -v_r(r_0)r_0\ln r_0 + v(r_0). \tag{14}$
Likewise, if $v(r)$ is as in (12), it is easy to see (3) binds, so $v(r)$ is harmonic.