<s>[INST] How do I show that $w = \frac{1}{(z-a)^n}$ is an analytic function using the Cauchy Riemann equations,where z = x + iy? I know I need to use the Cauchy Riemann equations, to test for the analyticity, but  how do I break the function  $w = \frac{1}{(z-a)^n}$  into real and imaginary parts?
 [/INST] With
$z = x + iy, \tag 1$
$a = \sigma + i\omega, \tag 2$
$z - a = (x - \sigma) + i(y - \omega); \tag 3$
$\dfrac{1}{z - a} = \dfrac{1}{(x - \sigma) + i(y - \omega)} = \dfrac{(x - \sigma) - i(y - \omega)}{(x - \sigma)^2 + (y - \omega)^2}$
$= \dfrac{x - \sigma}{(x - \sigma)^2 + (y - \omega)^2} - i\dfrac{y - \omega}{(x - \sigma)^2 + (y - \omega)^2} = u(x, y) + iv(x, y); \tag 4$
it follows that
$u(x, y) = \dfrac{x - \sigma}{(x - \sigma)^2 + (y - \omega)^2} \tag 5$
and
$v(x, y) = - \dfrac{y - \omega}{(x - \sigma)^2 + (y - \omega)^2} \tag 6$
are the real and imaginary parts of $(z - a)^{-1}$, respectively.  At this point it is a relatively easy matter to apply the Cauchy-Riemann equations to $u(x, y)$ and $v(x, y)$ directly, though the necessary algebra is a bit tedious:
writing
$u(x, y) = (x - \sigma)((x - \sigma)^2 + (y - \omega)^2)^{-1}, \tag 7$
$v(x, y) = - (y - \omega)((x - \sigma)^2 + (y - \omega)^2)^{-1}, \tag 8$
we have
$u_x(x, y) = ((x - \sigma)^2 + (y - \omega)^2)^{-1} -2(x - \sigma)^2((x - \sigma)^2 + (y - \omega)^2)^{-2}$
$ = \dfrac{1}{(x - \sigma)^2 + (y - \omega)^2} - \dfrac{2(x - \sigma)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}$
$= \dfrac{(x - \sigma)^2 + (y - \omega)^2}{((x - \sigma)^2 + (y - \omega)^2)^2} - \dfrac{2(x - \sigma)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}$
$= \dfrac{(y - \omega)^2 - (x - \sigma)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}; \tag 9$
we also have
$v_y(x, y) = -((x - \sigma)^2 + (y - \omega)^2)^{-1} + 2(y - \omega)^2((x - \sigma)^2 + (y - \omega)^2)^{-2}$
$ = -\dfrac{1}{(x - \sigma)^2 + (y - \omega)^2} + \dfrac{2(y - \omega)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}$
$= -\dfrac{(x - \sigma)^2 + (y - \omega)^2}{((x - \sigma)^2 + (y - \omega)^2)^2} + \dfrac{2(y - \omega)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}$
$= \dfrac{(y - \omega)^2 - (x - \sigma)^2}{((x - \sigma)^2 + (y - \omega)^2)^2}; \tag{10}$
comparing (9) and (10) we see that
$u_x(x, y) = v_y(x, y); \tag{11}$
a similar calculatinon validates
$u_y(x, y) = -v_x(x, y), \tag{12}$
and thus, with of course the proviso that $z \ne a$,
$\dfrac{1}{z - a} = u(x, y) + iv(x, y) \tag{13}$
satisfies the Cauchy-Riemann equations, and hence is holomorphic.
The preceding calculations may be simplified somewhat if we express $(z - a)^{-1}$ in term of a polar coordinate system centered at $a$; that is, we write
$z = a + re^{i\theta}, \tag{14}$
whence
$\dfrac{1}{z - a} = (z - a)^{-1}$
$= (re^{i\theta})^{-1} = r^{-1}e^{-i\theta} = \dfrac{\cos \theta}{r} - i\dfrac{\sin \theta}{r} = u(r, \theta) + iv(r, \theta); \tag{15}$
the Cauchy-Riemann equations in such a polar coordinate system are given by
$u_r = \dfrac{1}{r}v_\theta, \tag{16}$
$v_r = -\dfrac{1}{r}u_\theta; \tag{17}$
now a relatively simple calculation shows that, with $u(r, \theta)$ and $v(r, \theta)$ as in (15), 
$\left ( \dfrac{\cos \theta}{r} \right)_r = -\dfrac{\cos \theta}{r^2} = \dfrac{1}{r} \left ( -\dfrac{\sin \theta}{r} \right)_\theta;$
$\left ( -\dfrac{\sin \theta}{r} \right)_r = \dfrac{\sin \theta}{r^2} = -\dfrac{1}{r} \left ( \dfrac{\cos \theta}{r} \right)_\theta,  \tag{18}$
again establishing that $(z - a)^{-1}$ is holomorphic away from $z = a$, though with much less effort.
Once we have that $(z - 1)^{-1}$ is a holomorphic function, we may simply invoke the well-known fact that the product of holomorphic functions is again holomorphic to affirm that
$\dfrac{1}{(z - a)^2} = \dfrac{1}{z - a} \dfrac{1}{z - a} \tag{19}$ 
is holomorphic, and then use a simple inductive argument, assuming that $(z - a)^{-k}$ is holomorphic for $k \in \Bbb N$, to see that
$\dfrac{1}{(z - a)^{k + 1}} = \dfrac{1}{(z - a)^k}\dfrac{1}{z - a} \tag{20}$
is also holomrphic; we conclude that $(z - a)^{-n}$ is holomorphic for all $n \in \Bbb N$.  $OE\Delta$.
</s>