Let \(a>0\), \(a\ne2\), and let \(C_a\) be the positively oriented circle \(|z|=a\). Evaluate \[ \int_{C_a}\frac{z^2+e^z}{z^2(z-2)}\,dz. \]
Solution
Set \[ F(z)\coloneqq\frac{z^2+e^z}{z^2(z-2)}. \]
1. The residue of \(F\) at the double pole \(z=0\) is\[ \Res_{z=0}F=-\frac34. \]
Since \[ z^2F(z)=\frac{z^2+e^z}{z-2}, \] the double-pole residue formula gives \[ \Res_{z=0}F = \left. \frac{d}{dz} \left(\frac{z^2+e^z}{z-2}\right) \right|_{z=0}. \] The derivative is \[ \frac{(2z+e^z)(z-2)-(z^2+e^z)}{(z-2)^2}, \] whose value at \(z=0\) is \[ \frac{-2-1}{4}=-\frac34. \]
2. The residue of \(F\) at the simple pole \(z=2\) is\[ \Res_{z=2}F = 1+\frac{e^2}{4}. \]
By the simple-pole formula, \[ \Res_{z=2}F = \left. \frac{z^2+e^z}{z^2} \right|_{z=2} = \frac{4+e^2}{4} = 1+\frac{e^2}{4}. \]
3. If \(0<a<2\), then\[ \int_{C_a}F(z)\,dz = -\frac{3\pi i}{2}. \]
In this case the circle contains the pole at \(0\) but not the pole at \(2\). The residue theorem and step 1 give \[ \int_{C_a}F(z)\,dz = 2\pi i\left(-\frac34\right) = -\frac{3\pi i}{2}. \]
4. If \(a>2\), then\[ \int_{C_a}F(z)\,dz = \frac{\pi i}{2}(1+e^2). \]
Now both poles lie inside \(C_a\). By steps <1>1–<1>2, their residue sum is \[ -\frac34+1+\frac{e^2}{4} = \frac{1+e^2}{4}. \] Thus the residue theorem gives \[ \int_{C_a}F(z)\,dz = 2\pi i\frac{1+e^2}{4} = \frac{\pi i}{2}(1+e^2). \]
5. Therefore\[ \boxed{ \int_{C_a}\frac{z^2+e^z}{z^2(z-2)}\,dz = \begin{cases} -\dfrac{3\pi i}{2},&0<a<2,\\[6pt] \dfrac{\pi i}{2}(1+e^2),&a>2. \end{cases} } \]
The two cases in steps <1>3–<1>4 exhaust the hypothesis \(a>0\), \(a\ne2\).
6. Q.E.D.
Step 5 is the requested evaluation.