The real integral I am trying to compute with residues/contour integration is $\int_{-\infty}^{\infty}\frac{x^2}{(x^2+a^2)^3} \,dx$ For $a$ positive and by using the complex integral
$$\int_{C_R}\frac{z^2}{(z^2+a^2)^3} \,dz$$
For some arc bounding only the positive pole, $a i$. I am not sure how to evaluate this pole of order 3.
In class we have discussed how we can write a function $f(z)$ with a pole of order $n$ at $z_0$ multiplicatively as $$f(z)=\frac{g(z)}{(z-z_0)^n}$$ or additively as $$f(z)=\frac{a_{-n}}{(z-z_0)^n}+\cdots+\frac{a_{-1}}{z-z_0}+h(z)$$
For holomorphic functions on a disc around the pole $h,g$, which I think is equivalent to finding a Laurent series
This yields the formula for the residue $$\text{Res}(f,z_0)=\lim_{z\rightarrow z_0}\frac{1}{(n-1)!}\frac{d^{n-1}}{dz^{n-1}}[ (z-z_0)^nf(z)]$$
Which gets messy. Is there a more elegant way?
Your calculation of the derivative is unnecessarily complicated. The reason we're multiplying by $(z-z_0)^n$ is that this is a factor in the denominator; so you can cancel it from the denominator:
\begin{align} \operatorname{Res}(f,z_0)&=\lim_{z\to z_0}\frac1{(n-1)!}\frac{\mathrm d^{n-1}}{\mathrm dz^{n-1}}\left[ (z-z_0)^nf(z)\right] \\ &=\lim_{z\to a\mathrm i}\frac12\frac{\mathrm d^2}{\mathrm dz^2}\left[ (z-a\mathrm i)^3\frac{z^2}{\left(z^2+a^2\right)^3}\right] \\ &= \lim_{z\to a\mathrm i}\frac12\frac{\mathrm d^2}{\mathrm dz^2}\frac{z^2}{(z+a\mathrm i)^3} \\ &=\lim_{z\to a\mathrm i}\frac12\left(\frac2{(z+a\mathrm i)^3}-2\cdot\frac{6z}{(z+a\mathrm i)^4}+\frac{12z^2}{(z+a\mathrm i)^5}\right) \\ &=\frac{\mathrm i}{2a^3}\left(\frac14-\frac34+\frac38\right) \\ &=-\frac{\mathrm i}{16a^3}\;. \end{align}