# The antiderivative of 1/(x^4+1): Part 10

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”: $\displaystyle \int \frac{1}{x^4 + 1} dx$

As we’ve seen in this series, the answer is $\displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} ( x\sqrt{2} - 1 ) + \frac{\sqrt{2}}{4} \tan^{-1}( x \sqrt{2} + 1) + C$

Also, as long as $x \ne 1$ and $x \ne -1$, there is an alternative answer: $\displaystyle \int \frac{1}{x^4 + 1} dx = \displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + C$.

In this concluding post of this series, I’d like to talk about the practical implications of the assumptions that $x \ne 1$ and $x \ne -1$.

For the sake of simplicity for the rest of this post, let $F(x) = \displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} ( x\sqrt{2} - 1 ) + \frac{\sqrt{2}}{4} \tan^{-1}( x \sqrt{2} + 1)$

and $G(x) = \displaystyle \int \frac{1}{x^4 + 1} dx = \displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right)$.

If I evaluate a definite integral of $\displaystyle \frac{1}{x^4+1}$ over an interval that contains neither $x = 1$ or $x = -1$, then either $F$ or $G$ can be used. Courtesy of Mathematica:  However, if the region of integration contains either $x = -1$ or $x =1$ (or both), then only using $F$ returns the correct answer. So this should be a cautionary tale about solving for angles, as the innocent-looking $+n\pi$ that appeared several posts ago ultimately makes a big difference in the final answers that are obtained.