Evaluating $\frac{1}{2 \pi i} \int_{|z|=3} \frac{e^{\pi z}}{z^2(z^2+2z+2)}dz$ I need some help with Complex Analysis:
To evaluate the integral
$$\frac{1}{2 \pi i} \int_{|z|=3} \frac{e^{\pi z}}{z^2(z^2+2z+2)}dz$$
Here is what I tried:
So, $f(z)=\frac{e^{\pi z}}{z^2(z^2+2z+2)}$ has 3 singularities, $z_0 = 0$, $z_0= -1+i $ and $z_0=-1-i$.
And all of them are interior to the contour.
$\Rightarrow$ We need to find the residues at all the 3 points.
$$Res_{z_0=0}(f(z)) = Res_{z_0=0} \left (\frac{e^{\pi z}}{z^2(z^2+2z+2)} \right)\\=\frac{1}{2}(\pi-1)$$
$$Res_{z_0=-1+i}(f(z)) = Res_{z_0=-1+i} \left (\frac{e^{\pi z}}{z^2(z^2+2z+2)} \right)\\=-\frac{e^{-\pi}}{4}$$
$$Res_{z_0=-1-i}(f(z)) = Res_{z_0=-1-i} \left (\frac{e^{\pi z}}{z^2(z^2+2z+2)} \right)\\=-\frac{e^{-\pi}}{4}$$
$$\Rightarrow \frac{1}{2\pi i}\int_{|z|=3} \frac{e^{\pi z}}{z^2(z^2+2z+2)}dz = \frac{1}{2 \pi i} \times \left[ 2\pi i \left(\frac{1}{2}(\pi -1) - \frac{e^{-\pi}}{4} - \frac{e^{-\pi}}{4}\right)\right]\\ = \left( \frac{1}{2}(\pi-1)-\frac{e^{-\pi}}{2}\right)\\ = \frac{\pi-1-e^{-\pi}}{2}$$
But I was told that this was wrong. I couldn't find any mistakes for my work. Can any of you check to see if my work is valid? Or, if it is wrong, how else can I evaluate this? Any helps or comments would be appreciated.   Can someone provide a valid solution (or a different approach)to evaluate this integral? Because some comments say it is wrong. But, some say it is correct. I am confused.... 
 A: So checking the residues...
The pole at $z=0$ is double, so (in my opinion) it's easier to find the residue via the series expansion than with the explicit formula. Factoring the denominator, the integrand is $\frac{e^{\pi z}}{z^2(z+1-i)(z+1+i)}$. The series for $e^{\pi z}$ is just $1 + \pi z + \frac{\pi^2 z^2}{2!} + ...$ The other factors except for $\frac{1}{z^2}$ are of the form $\frac{1}{a + z}$, which has the series representation $\frac{1}{a} - \frac{z}{a^2}+...$ So the integrand, as a product of series, is $\frac{1}{z^2}(1 + \pi z + ...)(\frac{1}{1-i} - \frac{z}{(1-i)^2} + ...)(\frac{1}{1+i} - \frac{z}{(1+i)^2} + ...)$ Since we're looking for the residue, the only term we care about is $z^{-1}$. Since $\frac{1}{z^2}$ is the only factor with negative exponents, we only need the first two terms of each series. Finding the terms that would have order $-1$, we find the coefficient to be $\frac{\pi}{(1+i)(1-i)} - \frac{1}{(1-i)^2(1+i)} - \frac{1}{(1+i)^2(1-i)}$. The first term is $\frac{\pi}{2}$, and the second and third terms combine to $-\frac{1}{2(1+i)} - \frac{1}{2(1-i)} = -\frac{1-i}{4} - \frac{1+i}{4} = -\frac{1}{2}$. So the first residue is (unless I've also made a horrible mistake) $\frac{\pi - 1}{2}$, as you found. 
Now for the next two residues: since these are both simple poles, they can be evaluated easily with the explicit formula. The second residue should be $\frac{e^{\pi z}}{z^2(z+1-i)}$ evaluated at $z = -1 - i$, and the third is similar. Plugging in, the second residue is $\frac{e^{\pi (-1 - i)}}{(-1-i)^2(-1-i+1-i)} = \frac{e^{-\pi}e^{-i\pi}}{(2i)(-2i)}$ which is $-\frac{e^{-\pi}}{4}$. The third is similar, and I also found it also matches what you have. 
Maybe we both made the same mistakes, but your evaluation looks right to me.  
A: I do not see anything wrong with your calculation.  
But Maple gets
$$
\frac{\pi}{2} - \frac{1}{2} - \frac{1}{4e^{\pi}}
$$
so the last term disagrees with yours.  But numerically in Maple, the same integral agrees with your answer, not Maple's symbolic answer.  Some sort of bug in Maple, I guess.  (Maple 2015 build 1097895)
