Verify that the green function for the ball $B_1(0)$ in $\mathbb{R}^2$ is given by $$G(x,y) = \frac{1}{2\pi}\{\log|x-y|-\log[|x|^2|y|^2+1-2(x\cdot y)]^{1/2}\}$$
I know that the solution is given by
$$G(x,y) = \frac{1}{2\pi}\{\log|x-y|-\log||x|(y-\overline{x})|\}$$
where $\overline{x} = \frac{x}{|x|^2}$
but how to arrive at that relation? I tried simply multiplying things but how could $|y|$ even appear on there?