Evaluating $\int_{C}\left({{e^{2z}\over z^2(z^2+2z+2)}+\ln(z-6)+{1\over (z-4)^2 }}\right) dz$. Question : Evaluate
$$\int_{C}\left({{e^{2z}\over z^2(z^2+2z+2)}+\log(z-6)+{1\over (z-4)^2 }}\right) dz$$
where C is the circle $|z|=3$. State the theorems your have used to evaluate the integral
My Attempt : Integral of the third term becomes $0$ as 4 lies outside the given circle so is analytic everywhere and so by cauchy's theorem it must be 0
The first integral has pole of order 2 at 0 and another complex pole of order 1 for $z^2+2z+2$ which can be solved using cauchy's formula for residues. 
My problem is with the middle integral $\log(z-6)$  as we know that $\log(z-6)$ will not be analytic in the circle $|z|=3$ as it attains negative values which is not defined. so how to go about this integral.
Please help
 A: Recall that a function logarithm can be defined on each domain of the complex plane with no loop around zero. For example, the usual (natural) logarithm $\ln$ is often first defined on $\mathbb R_+^*$ and it can be extended to $\mathbb C\setminus \{z\in\mathbb C\mid\Re(z)\leqslant0,\Im(z)=0\}$ in the way you know. But a logarithm function $\mathrm{Log}$ also exists on $\mathbb C\setminus D$ where $D=\{z\in\mathbb C\mid\Re(z)\geqslant0,\Im(z)=0\}$, which may be defined as follows: each $z$ in $\mathbb C\setminus D$ can be written uniquely as $z=r\mathrm e^{\mathrm it}$ with $r$ and $t$ real, $r\gt0$, $t$ in $(0,2\pi)$, then $\mathrm{Log}(z)=\ln(r)+\mathrm it$ (other, more intrinsic, definitions exist but this one will do).
This $\mathrm{Log}$ function (or one of its close analogs) seems to be what is meant in your question. Then $z\mapsto\mathrm{Log}(z-6)$ is holomorphic on $|z|\lt6$ and the circle $C=\{z\in\mathbb C\mid|z|=3\}$ is included in this domain hence
$$
\oint_C\mathrm{Log}(z-6)\mathrm dz=0.
$$
A: Hint: You have three poles within your contour, namely $z=0$ with order $2$, $z=-1-i$, and $z=-1+i$. Now, all you need to do is to find the residues at every pole and add them. See here for a formula for evaluating residues
