# How do you integrate int 1/ (x^4 +1) using partial fractions?

Oct 3, 2017

Key points are factorization, finding coefficients of an identity, integration of $\frac{f ' \left(x\right)}{f \left(x\right)}$ and $\frac{1}{{\left(x + p\right)}^{2} + q}$.

#### Explanation:

${x}^{4} + 1$ is not able to be factorized in rationals.
However, like ${x}^{4} + 4 = {\left({x}^{2} + 2\right)}^{2} - {\left(2 x\right)}^{2} = \left({x}^{2} + 2 x + 2\right) \left({x}^{2} - 2 x + 2\right)$, you can factorize ${x}^{4} + 1$ in reals:
${x}^{4} + 1 = {\left({x}^{2} + 1\right)}^{2} - {\left(\sqrt{2} x\right)}^{2} = \left({x}^{2} + \sqrt{2} x + 1\right) \left({x}^{2} - \sqrt{2} x + 1\right)$
Note that ${x}^{2} \pm \sqrt{2} x + 1 = {\left(x \pm \frac{\sqrt{2}}{2}\right)}^{2} + \frac{1}{2}$ ・・(A) cannot be factorized in reals anymore.

Thus, $\frac{1}{{x}^{4} + 1}$ can be rewritten in partial fractions form:
$\frac{1}{{x}^{4} + 1} = \frac{a x + b}{{x}^{2} + \sqrt{2} x + 1} + \frac{c x + d}{{x}^{2} - \sqrt{2} x + 1}$・・(B)
($a , b , c , \mathrm{di} n \mathbb{R}$)

What we want to do is to find $a , b , c , d$ so that (B) is an identity.
Multyply both sides by ${x}^{4} + 1$ and you find
$1 = \left(a x + b\right) \left({x}^{2} - \sqrt{2} x + 1\right) + \left(c x + d\right) \left({x}^{2} + \sqrt{2} x + 1\right)$
$1 = \left(a + c\right) {x}^{3} + \left(- \sqrt{2} a + b + \sqrt{2} c + d\right) {x}^{2} + \left(a - \sqrt{2} b + c + \sqrt{2} d\right) x + \left(b + d\right)$

Make a comparison of coefficients and you will see:
$a + c = 0$ (i)
$- \sqrt{2} a + b + \sqrt{2} c + d = 0$ (ii)
$a - \sqrt{2} b + c + \sqrt{2} d = 0$ (iii)
$b + d = 1$ (iv)

By (i) and (iv) you can easily see:
$c = - a$, $d = 1 - b$
Substitute these in (ii) and (iii):
$- 2 \sqrt{2} a + 1 = 0$, $- 2 \sqrt{2} b + \sqrt{2} = 0$
$a = \frac{\sqrt{2}}{4} , b = \frac{1}{2} , c = - \frac{\sqrt{2}}{4} , d = \frac{1}{2}$

We have completed to simplify (B) and got to the start line.

$\textcolor{b l u e}{\frac{1}{{x}^{4} + 1} = \frac{\frac{\sqrt{2}}{4} x + \frac{1}{2}}{{x}^{2} + \sqrt{2} x + 1} + \frac{- \frac{\sqrt{2}}{4} x + \frac{1}{2}}{{x}^{2} - \sqrt{2} x + 1}}$

Now let's go to the next stage: integration.
Since $\frac{d}{\mathrm{dx}} \left({x}^{2} + \sqrt{2} x + 1\right) = 2 x + \sqrt{2}$ and $\frac{\sqrt{2}}{4} x + \frac{1}{2} = \frac{\sqrt{2}}{8} \left(2 x + \sqrt{2}\right) + \frac{1}{4}$,
$\int \left(\frac{\frac{\sqrt{2}}{4} x + \frac{1}{2}}{{x}^{2} + \sqrt{2} x + 1}\right) \mathrm{dx}$
$= \frac{\sqrt{2}}{8} \int \frac{2 x + \sqrt{2}}{{x}^{2} + \sqrt{2} x + 1} \mathrm{dx} + \frac{1}{4} \int \frac{1}{{x}^{2} + \sqrt{2} x + 1} \mathrm{dx}$
$= \frac{\sqrt{2}}{8} \ln \left({x}^{2} + \sqrt{2} x + 1\right) + \frac{\sqrt{2}}{4} \arctan \left(\sqrt{2} x + 1\right) + C$.

Note that $\textcolor{g r e e n}{\int \frac{1}{{\left(x + p\right)}^{2} + {q}^{2}} \mathrm{dx} = \arctan \frac{\frac{x + p}{q}}{q}}$ for $q > 0$. Here, $p = q = \frac{\sqrt{2}}{2}$ (See (A)).

In similar ways (this will be a good excercise to show this^^),
$\int \left(\frac{- \frac{\sqrt{2}}{4} x + \frac{1}{2}}{{x}^{2} - \sqrt{2} x + 1}\right) \mathrm{dx}$
$= - \frac{\sqrt{2}}{8} \ln \left({x}^{2} - \sqrt{2} x + 1\right) - \frac{\sqrt{2}}{4} \arctan \left(- \sqrt{2} x + 1\right) + C$.

Sum up the two integration and you will finally acheived the goal:
$\textcolor{red}{\int \frac{1}{{x}^{4} + 1} \mathrm{dx} = \frac{\sqrt{2}}{8} \ln \left(\frac{{x}^{2} + \sqrt{2} x + 1}{{x}^{2} - \sqrt{2} x + 1}\right) + \frac{\sqrt{2}}{4} \left(\arctan \left(\sqrt{2} x + 1\right) - \arctan \left(- \sqrt{2} x + 1\right)\right) + C}$.