Find the residue of $\frac{e^{iz}}{(z^2+1)^5}$ at $z = i$ and evaluate $\int_0^{\infty} \cos x/(x^2+1)^5 dx$ I know the evaluation of $\int_0^{\infty} \cos x/(x^2+1)^5 dx$ requires that I solve the first part, but for some reason I'm stumped. I get that I should use $\lim_{z \to i}\frac{1}{24}\frac{d^4}{dz^4}((z-i)^5\frac{e^{iz}}{(z^2+1)^5})$, but I can't seem to evaluate that for the life of me.

When you have such a high order pole, it is likely better to evaluate the residue directly from the Laurent series about the pole.  That is, rewrite
$$\frac{e^{i z}}{(z^2+1)^5} = \frac{1}{e} \frac{e^{i (z-i)}}{(z-i)^5 [(z-i)+2 i]^5} = \frac{1}{i 2^5 e}\frac{e^{i (z-i)}}{(z-i)^5 [1-i(z-i)/2]^5}$$
So we want to find the coefficient of $(z-i)^4$ of the expression
$$\frac{1}{i 2^5 e}\frac{e^{i (z-i)}}{ [1-i(z-i)/2]^5}$$
Note that
$$(1-y/2)^{-5} = 1+(-5)\left (\frac{-y}{2} \right ) + \frac{(-5)(-6)}{2!}\left (\frac{-y}{2} \right )^2 + \frac{(-5)(-6)(-7)}{3!}\left (\frac{-y}{2} \right )^3 + \frac{(-5)(-6)(-7)(-8)}{4!}\left (\frac{-y}{2} \right )^4+\cdots\\ = 1+\frac{5}{2} y+\frac{15}{4} y^2+\frac{35}{8} y^3 + \frac{35}{8} y^4 + \cdots$$
where $y=i(z-i)$.  So we want the coefficent of $y^4$ of
$$\frac{1}{i 2^5 e}\left (1+y+\frac12 y^2+\frac16 y^3+\frac{1}{24} y^4+\cdots \right )\left (1+\frac{5}{2} y+\frac{15}{4} y^2+\frac{35}{8} y^3 + \frac{35}{8} y^4 + \cdots \right )$$
which is
$$\frac{1}{i 32 e} \left (\frac{35}{8}+\frac{35}{8}+\frac{15}{8}+\frac{5}{12}+\frac{1}{24} \right ) = \frac{133}{i 384 e}$$
That is the sought-after residue.  The integral is simply $i \pi$ times this residue, or 
$$\int_0^{\infty} dx \frac{\cos{x}}{(1+x^2)^5} = \frac{133 \pi}{384 e}$$
