How to integrate $\int_{C} \frac{z^2}{(z^4 +1)}$ where $C$ is $|z + i| = 1$ I am attempting to do this using  Cauchy's integral theorem and formula. However I am unable to conclude if a singularity exists at all for me to apply any of those two techniques or any other theorem. 
 A: Obviously the function 
$$
f(z)= \frac{z^2}{z^4+1}
$$
is meromorphic, so that the only singularities are the simple poles at the roots of the polynomial $z^4+1$:
$$
z_i=e^{\frac{2k+1}4\pi i},\quad k=0\dots3.
$$
The method of choice for computation of such integrals is the residue theorem. Two poles (with positive imaginary part) are outside the integration contour and two others are inside it. So:
$$
\int_Cf(z)dz=2\pi i\left[\operatorname{Res}\left(f(z),e^\frac{5\pi i}4\right)+\operatorname{Res}\left(f(z),e^\frac{7\pi i}4\right)\right]=-\frac\pi{\sqrt2}.
$$
A: Using partial fraction decomposition
$$\frac{z^2}{z^4+1}=
\frac{1}{2(z^2+i)}+\frac{1}{2(z^2-i)}=\\
\color{red}{\frac{1}{4\cdot\frac{1-i}{\sqrt{2}}\cdot\left(z-\frac{1-i}{\sqrt{2}}\right)}}-
\frac{1}{4\cdot\frac{1-i}{\sqrt{2}}\cdot\left(z+\frac{1-i}{\sqrt{2}}\right)}+
\frac{1}{4\cdot\frac{1+i}{\sqrt{2}}\cdot\left(z-\frac{1+i}{\sqrt{2}}\right)}-
\color{red}{\frac{1}{4\cdot\frac{1+i}{\sqrt{2}}\cdot\left(z+\frac{1+i}{\sqrt{2}}\right)}}$$
Given $\left|\frac{1-i}{\sqrt{2}}+i\right|<1$ and $\left|-\frac{1+i}{\sqrt{2}}+i\right|<1$, only the values in red fall inside $|z+i|=1$ circle.
Using Cauchy's integral formula
$$f(a)=\frac{1}{2\pi i} \int\limits_{\gamma}\frac{f(z)}{(z-a)}dz$$
where $f(z)=1$
$$\int\limits_{|z+i|=1}\frac{z^2}{z^4+1}dz=
\int\limits_{|z+i|=1}\color{red}{\frac{1}{4\cdot\frac{1-i}{\sqrt{2}}\cdot\left(z-\frac{1-i}{\sqrt{2}}\right)}}dz-\int\limits_{|z+i|=1}\color{red}{\frac{1}{4\cdot\frac{1+i}{\sqrt{2}}\cdot\left(z+\frac{1+i}{\sqrt{2}}\right)}}dz=\\
\frac{2\pi i}{4\cdot\frac{1-i}{\sqrt{2}}}-\frac{2\pi i}{4\cdot\frac{1+i}{\sqrt{2}}}=
\frac{\pi i}{\sqrt{2}\cdot(1-i)}-\frac{\pi i}{\sqrt{2}\cdot(1+i)}=\\
\frac{\pi}{\sqrt{2}}\left(\frac{i}{1-i}-\frac{i}{1+i}\right)=-\frac{\pi}{\sqrt{2}}$$
