Question:
Evaluate the following integral:
$\int \frac{x^{2}+1}{x^{4}+x^{2}+1} d x$
Solution:
re-writing the given equation as
$\int \frac{1+\frac{1}{x^{2}}}{x^{2}+1+\frac{1}{x^{2}}} d x$
$\int \frac{1+\frac{1}{x^{2}}}{\left(x-\frac{1}{x}\right)^{2}+3} d x$
Let $\mathrm{x}-\frac{1}{\mathrm{x}}$ as $\mathrm{t}$
$\left(1+\frac{1}{x^{2}}\right)=d t$
$\int \frac{1}{t^{2}+3} d t$
Using identity $\int \frac{1}{x^{2}+1} d x=\arctan (x)$
$\frac{1}{\sqrt{3}} \arctan \left(\frac{t}{\sqrt{3}}\right)+c$
Substituting $\mathrm{t}$ as $\mathrm{x}-\frac{1}{\mathrm{x}}$
$\frac{1}{\sqrt{3}} \arctan \left(\frac{\left(x-\frac{1}{x}\right)}{\sqrt{3}}\right)+c$