Integrate $\int \frac{1}{x^4+4}dx$ 
Integrate $\displaystyle \int \dfrac{1}{x^4+4}dx$. 

I could try breaking this up into two quadratic trinomials, but that seems like it would be a lot of work. If that is the best way here how do I do it most efficiently?

Notice
$$\frac{1}{x^4+4} = \frac{1}{(x^2+2)^2 - 4x^2}
= \frac{1}{(x^2+2x+2)(x^2-2x+2)}$$
Since 
$$\begin{align}
\frac{1}{x^2-2x+2} - \frac{1}{x^2+2x+2} &= \frac{4x}{(x^2+2x+2)(x^2-2x+2)}\\
\frac{1}{x^2-2x+2} + \frac{1}{x^2+2x+2} &= \frac{2x^2+4}{(x^2+2x+2)(x^2-2x+2)}
\end{align}$$
We have
$$\frac{1}{(x^2+2x+2)(x^2-2x+2)}
= \frac14\left[\frac{1-\frac{x}{2}}{x^2-2x+2} + \frac{1+\frac{x}{2}}{x^2+2x+2}\right]\\
= \frac18\left[\frac{x+2}{x^2+2x+2} - \frac{x-2}{x^2-2x+2}\right]
= \frac18\left[\frac{(x+1)+1}{(x+1)^2+1} - \frac{(x-1)-1}{(x-1)^2+1}\right]
$$
Up to an integration constant, this give us
$$\begin{align}
\int\frac{dx}{x^4+1}
&= \frac{1}{16}\log\left(\frac{(x+1)^2+1}{(x-1)^2+1}\right)
+ \frac18 \left[\tan^{-1}(x+1)+\tan^{-1}(x-1)\right]\\
&= \frac{1}{16}\log\left(\frac{(x+1)^2+1}{(x-1)^2+1}\right)
+ \frac18 \left[\tan^{-1}(x+1)+\tan^{-1}(x-1)\right]\\
&=\frac{1}{16}\log\left(\frac{(x+1)^2+1}{(x-1)^2+1}\right)
+ \frac18 \tan^{-1}\left(\frac{2x}{2-x^2}\right)
\end{align}
$$
