## a solution to an integral

Posted: October 3, 2014 in Mathematics

$\displaystyle\int\frac{1}{x^4+x^2+1}\;\text{d}x, \quad \text{for } x\in\mathbb{R}$

Solution

Realizing that there is no way we can use a normal “U sub” method we learned from highschool, we need to be a bit creative and find a way to tackle this integral by playing around with the polynomial in the denominator.
First divide top and bottom by $x^2$,

$\displaystyle\int\frac{\frac{1}{x^2}}{x^2+1+\frac{1}{x^2}}\text{ d}x$

Since,

$\displaystyle \text{d}\left(x-\frac{1}{x}\right)=1+\frac{1}{x^2}\text{ d}x \quad \text{and} \quad \text{d}\left(x+\frac{1}{x}\right)=1-\frac{1}{x^2}\text{ d}x$

We need to somehow make the derivative of the denominator “appears” in the numerator by completing the square in the denominator and add 1 and subtract 1 in both integrals.

$\displaystyle \frac{1}{2}\int\frac{1+\frac{1}{x^2}}{x^2+1+\frac{1}{x^2}}\text{ d}x - \frac{1}{2}\int\frac{1-\frac{1}{x^2}}{x^2+1+\frac{1}{x^2}}\text{ d}x$

$\displaystyle \frac{1}{2}\int\frac{1+\frac{1}{x^2}}{(x-\frac{1}{x})^2+3}\text{ d}x - \frac{1}{2}\int\frac{1-\frac{1}{x^2}}{(x+\frac{1}{x})^2-1}\text{ d}x$

Let $u=x-\dfrac{1}{x}, \; v=x+\dfrac{1}{x}$, we have

$\displaystyle \frac{1}{2}\int\frac{\text{d}u}{u^2+3} - \frac{1}{2}\int\frac{\text{d}v}{v^2-1}$

Then the rest is routine and easy!

$\displaystyle \frac{1}{6}\int\frac{\text{d}u}{(\frac{u}{\sqrt3})^2+1} - \frac{1}{4}\int\frac{1}{v-1}-\frac{1}{v+1}\text{ d}v$

$\displaystyle \frac{\sqrt3}{6}\tan^{-1}\frac{u}{\sqrt3}-\frac{1}{4}\log\left|\frac{v-1}{v+1}\right|+C$

Sub back the x,

$\displaystyle \frac{\sqrt3}{6}\tan^{-1}\frac{1}{\sqrt3}\left(x-\frac{1}{x}\right) - \frac{1}{4}\log\left|\frac{x+\frac{1}{x}-1}{x+\frac{1}{x}+1}\right|+C$

We can drop the absolute value sign since $x^2-x+1=\left(x-\dfrac{1}{2}\right)^2+\dfrac{3}{4}>0$ and $x^2+x+1=\left(x+\dfrac{1}{2}\right)^2+\dfrac{3}{4}>0$

Therefore,

$\displaystyle \int\frac{1}{x^4+x^2+1}\;\text{d}x = \frac{\sqrt3}{6}\tan^{-1}\left(\frac{x^2-1}{\sqrt3x}\right) - \frac{1}{4}\log\left(\frac{x^2-x+1}{x^2+x+1}\right)+C$