# Evaluate the following integral:

Question:

Evaluate the following integral:

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

Solution:

re-writing the given equation as

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

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

$\frac{1}{2}\left[\int \frac{1+\frac{1}{x^{2}}}{x^{2}+1+\frac{1}{x^{2}}} d x+\int \frac{-1+\frac{1}{x^{2}}}{x^{2}+1+\frac{1}{x^{2}}} d x\right]$

$\frac{1}{2}\left[\int \frac{1+\frac{1}{x^{2}}}{\left(x-\frac{1}{x}\right)^{2}+3} d x+\int \frac{-1+\frac{1}{x^{2}}}{\left(x+\frac{1}{x}\right)^{2}-1} d x\right]$

Let $x-\frac{1}{x}=t$ and $x+\frac{1}{x}=z$

$\left(1+\frac{1}{x^{2}}\right) d x=d t$ and $\left(1-\frac{1}{x^{2}}\right) d x=d z$

$\frac{1}{2}\left[\int \frac{d t}{(t)^{2}+3}-\int \frac{d z}{(z)^{2}-1}\right]$

Using identity $\int \frac{1}{\mathrm{x}^{2}+1} \mathrm{dx}=\arctan (\mathrm{x})$ and $\int \frac{\mathrm{dz}}{(\mathrm{z})^{2}-1}=\frac{1}{2} \log \left|\frac{\mathrm{z}-1}{\mathrm{z}+1}\right|+\mathrm{c}$

$\frac{1}{2}\left[\frac{1}{\sqrt{3}}\left(\arctan \left(\frac{\mathrm{t}}{\sqrt{3}}\right)-\frac{1}{2} \log \left|\frac{\mathrm{z}-1}{\mathrm{z}+1}\right|\right]\right.$

Substituting $t$ as $x-\frac{1}{x}$ and $z$ as $x+\frac{1}{x}$

$\frac{1}{2}\left[\frac{1}{\sqrt{3}}\left(\arctan \left(\frac{\mathrm{x}-\frac{1}{\mathrm{x}}}{\sqrt{3}}\right)-\frac{1}{2} \log \left|\frac{\mathrm{x}+\frac{1}{\mathrm{x}}-1}{\mathrm{x}+\frac{1}{\mathrm{x}}+1}\right|\right]\right.$