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

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$

It turns out that this can be simplified somewhat as long as $x \ne 1$ and $x \ne -1$. I’ll use the trig identity

$\tan(\alpha + \beta) = \displaystyle \frac{\tan \alpha + \tan \beta}{1 - \tan \alpha \tan \beta}$

When I apply this trig identity for $\alpha = \tan^{-1} ( x\sqrt{2} - 1 )$ and $\beta = \tan^{-1} ( x\sqrt{2} + 1 )$, I obtain

$\tan \left[ \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) \right] = \displaystyle \frac{x \sqrt{2} - 1 + x \sqrt{2} + 1}{1 - (x\sqrt{2} - 1)(x\sqrt{2} + 1)}$

$= \displaystyle \frac{2x \sqrt{2}}{1 - (2x^2 - 1)}$

$= \displaystyle \frac{2x \sqrt{2}}{2 - 2x^2}$

$= \displaystyle \frac{x \sqrt{2}}{1 - x^2}$.

So we can conclude that

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + n\pi$

for some integer $n$ that depends on $x$. The $+n\pi$ is important, as a cursory look reveals that $y = \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1)$ and $y = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right)$ have different graphs. (The vertical lines in the orange graph indicate where the right-hand side is undefined when $x = 1$ or $x = -1$.

The two graphs coincide when $-1 < x < 1$ but differ otherwise. However, it appears that the two graphs differ by a constant. Indeed, if I subtract $\pi$ from the orange graph if $x < -1$ and add $\pi$ to the orange graph if $x > 1$, then they match:

So, evidently

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) -\pi$ if $x < -1$,

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right)$ if $-1 < x < 1$,

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + \pi$ if $x> 1$.

So as long as $x \ne 1$ and $x \ne -1$, this constant $-\pi$, $0$, or $\pi$ can be absorbed into the constant $C$:

$\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$.

However, a picture may be persuasive but is not a proof, and there are some subtle issues with this simplification. I’ll discuss these further details in tomorrow’s post.

## One thought on “The antiderivative of 1/(x^4+1): Part 7”

This site uses Akismet to reduce spam. Learn how your comment data is processed.