Evaluate $\int _0^{\infty }\frac{x^6}{\left(x^4+a^4\right)^2}dx$ The function 
$$f\left(z\right)=\frac{z^6}{\left(z^4+a^4\right)^2}$$
Has the following poles of order 2:
$$ z(k)=a \exp\left( \frac{\left(2k+1\right)}4 i\pi \right)$$
$f$ is even, therefore: $$\int _0^{+\infty }\frac{x^6}{\left(x^4+a^4\right)^2}dx =\frac{1}{2}\int _{-\infty }^{+\infty \:}\frac{x^6}{\left(x^4+a^4\right)^2}dx$$
$$\int _0^{+\infty }\frac{x^6}{\left(x^4+a^4\right)^2}dx=i\pi \sum _k\:Res\left(f,\:z\left(k\right)\right)$$
$$Res\left(f,\:z\left(k\right)\right)=\lim _{z\to z\left(k\right)}\left(\frac{1}{\left(2-1\right)!}\left(\frac{d}{dz}\right)^{2-1}\frac{z^6\left(z-z\left(k\right)\right)^2}{\left(z^4+a^4\right)^2}\right)$$
$$z^4+a^4=z^4-z_k^4\implies\dfrac{z^6(z-z_k)^2}{(z^4+a^4)^2}=\dfrac{z^6}{(z^3+z_k z^2+z_k^2 z+z_k^3)^2}$$
$$Res\left(f,\:z_k\right)=\lim _{z\to \:z_k}\left(\frac{d}{dz}\left(\frac{z^6}{\left(z^3+z_kz^2+z_k^2z+z_k^3\right)^2}\right)\right)$$
$$Res\left(f,\:z_k\right)=\frac{2z_kz^5\left(z^2+2z_kz+3z_k^2\right)}{\left(z^3+z_kz^2+z_k^2z+z_k^3\right)^3}=\frac{2z_k^6\cdot 6z_k^2}{\left(4z_k^3\right)^3}$$
$$Res\left(f,\:z_k\right)=\frac{12z_k^8}{64z_k^9}=\frac{3}{16z_k}$$
$$\int _0^{+\infty }\frac{x^6}{\left(x^4+a^4\right)^2}dx=\frac{3i\pi }{16a}\sum _{k=0}^n\:e^{-\frac{\left(2k+1\right)}{4}i\pi }$$
We consider only the residues within the upper half plane, that is to say those corresponding to $k=0$ and $k=1$.
$$\int _0^{+\infty \:}\frac{x^6}{\left(x^4+a^4\right)^2}dx=\frac{3i\pi \:}{16a}\left(e^{-\frac{i\pi }{4}\:\:}+e^{-\frac{3i\pi \:}{4}\:\:}\right)$$
$$\int _0^{+\infty \:}\frac{x^6}{\left(x^4+a^4\right)^2}dx=\frac{3i\pi \:}{16a}\left(\frac{\sqrt{2}}{2}\:-i\frac{\sqrt{2}}{2}-\frac{\sqrt{2}}{2}-i\frac{\sqrt{2}}{2}\right)$$
$$\int _0^{+\infty \:}\frac{x^6}{\left(x^4+a^4\right)^2}dx=\frac{3\pi \sqrt{2}\:}{16a}$$
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{x^{6} \over
\pars{x^{4} + a^{4}}^{2}}\,\dd x}
\\[5mm] \stackrel{x/\verts{a}\ \mapsto\ x}{=}\,\,\,&
{1 \over \verts{a}}\int_{0}^{\infty}{x^{6} \over
\pars{x^{4} + 1}^{2}}\,\dd x
\\[5mm] \stackrel{\mrm{I.B.P.}}{=}\,\,\,&\
-\,{1 \over 4\verts{a}}\int_{x\ =\ 0}^{x\ \to\ \infty}x^{3}
\,\dd\pars{1 \over x^{4} + 1}
\\[5mm] = &\
{1 \over 4\verts{a}}\int_{0}^{\infty}
{1 \over x^{4} + 1}\,\pars{3x^{2}}\,\dd x
\\[5mm] = &\
{3 \over 4\verts{a}}\int_{0}^{\infty}
{\dd x \over x^{2} + 1/x^{2}}\,\dd x
\\[5mm] = &\
{3 \over 4\verts{a}}\int_{0}^{\infty}
{\dd x \over \pars{x - 1/x}^{2} + 2}
\\[5mm] = &\
{3 \over 8\verts{a}}\left[\int_{0}^{\infty}
{\dd x \over \pars{x - 1/x}^{2} + 2}\right.
\\[2mm] & \phantom{{3 \over 8\verts{a}}\,\,}
\left. + \int_{\infty}^{0}
{-\dd x/x^{2} \over \pars{1/x - x}^{2} + 2}
\right]
\end{align}

In the last line, the last integral is equivalent to the first one: It just arises from a $\ds{x \mapsto 1/x}$ change of variable.

Then,
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{x^{6} \over
\pars{x^{4} + a^{4}}^{2}}\,\dd x}
\\[5mm] = &\
{3 \over 8\verts{a}}\int_{0}^{\infty}
{1 + 1/x^{2} \over \pars{x - 1/x}^{2} + 2}\,\dd x
\\[5mm] \stackrel{x - 1/x\ \mapsto\ x}{=}\,\,\, &\
{3 \over 8\verts{a}}\int_{-\infty}^{\infty}
{\dd x \over x^{2} + 2}
\\[5mm] = &\
{3 \over 8\verts{a}}\,{1 \over 2}\,\root{2}
\int_{-\infty}^{\infty}{\dd x/\root{2} \over
\pars{x/\root{2}}^{2} + 1}
\\[5mm] \stackrel{x/\root{2}\ \mapsto\ x}{=}\,\,\, &\
{3\root{2} \over 16\verts{a}}\
\underbrace{\int_{-\infty}^{\infty}{\dd x \over x^{2} + 1}}
_{\ds{=\ \pi}}\ =\ 
\bbx{{3\root{2}\pi \over 16}\,{1 \over \verts{a}}}
\end{align}
A: If you want an approach that doesn't require as much differentiation, first use partial fractions to write $\dfrac{z^3}{z^4+a^4}=\sum_{k=0}^3\dfrac{c_k}{z-z(k)}$ so $$\frac{z^6}{(z^4+a^4)^2}=\sum_k\frac{c_k^2}{(z-z(k))^2}+2\sum_{k<l}\frac{c_kc_l}{(z-z(k))(z-z(l))}\\=\sum_k\frac{c_k^2}{(z-z(k))^2}+2\sum_{k<l}\frac{c_kc_l}{z(k)-z(l)}\left(\frac{1}{z-z(k)}-\frac{1}{z-z(l)}\right).$$The first sum doesn't contribute to $\int_{\Bbb R}\dfrac{x^6 dx}{(x^4+a^4)^2}$, but some of the latter sum's terms do, viz. $$\oint\frac{dz}{(z-w)^{n+1}}=2\pi i\delta_{n0}$$for enclosed $w$. Hence$$\int_0^\infty\frac{x^6 dx}{(x^4+a^4)^2}=\pi i\sum_{k<l}\frac{c_kc_l}{z(k)-z(l)}\left([k\in S]-[l\in S]\right),$$where $\{z(k)|k\in S\}$ is the set of residues your contour encloses and $[]$ is the Iverson bracket, i.e. $[k\in S]$ is $1$ if $k\in S$ or $0$ otherwise. If you're experienced with Beta functions, you should try calculating the integral separately with $x=a\tan^{1/2}t$ to double-check you get the same answer twice. (I get $\frac{3\pi}{8a\sqrt{2}}$.)
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\infty}{x^{6}\over \pars{x^{4} + a^{4}}^{2}}\,\dd x}
\\[5mm] \stackrel{x\ =\ \verts{a}t^{1/4}}{=}\,\,\,&\
{1 \over 4\verts{a}}\int_{0}^{\infty}{t^{\color{red}{7/4} - 1} \over \pars{1 + t}^{2}}\,\dd t
\end{align}
Note that
\begin{align}
{1 \over \pars{1 + t}^{2}} & =
\sum_{k = 0}^{\infty}{-2 \choose k}t^{k} =
\sum_{k = 0}^{\infty}{k + 1 \choose k}
\pars{-1}^{k}\,t^{k}
\\[5mm] & =
\sum_{k = 0}^{\infty}\color{red}{\Gamma\pars{2 + k}}
{\pars{-t}^{k} \over k!}
\end{align}
With the
Ramanujan's Master Theorem:
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\infty}{x^{6}\over \pars{x^{4} + a^{4}}^{2}}\,\dd x} =
{1 \over 4\verts{a}}\Gamma\pars{7 \over 4}
\Gamma\pars{2 - {7 \over 4}}
\\[5mm] = &\
{1 \over 4\verts{a}}{3 \over 4}\Gamma\pars{3 \over 4}
\Gamma\pars{1 \over 4} =
{3 \over 16\verts{a}}\,{\pi \over \sin\pars{\pi/4}}
\\[5mm] = &\
\bbx{{3\root{2}\pi \over 16}\,{1 \over \verts{a}}}
\\ &
\end{align}
A: Consider $x=a \tan^{1/2}u$ to obtain$$\frac{1}{2|a|}\int_0^{\pi/2}\cos^{-1/2}u\sin^{5/2}udu.$$ Now recall the Beta fucntion.
