# int (x^2-1)/(x^4+x^2+1) dx?

Mar 25, 2018

$\frac{1}{2} L n \left(\frac{{x}^{2} - x + 1}{{x}^{2} + x + 1}\right) + C$

#### Explanation:

$\int \frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1} \cdot \mathrm{dx}$

=$\int \frac{1 - \frac{1}{x} ^ 2}{{x}^{2} + 1 + \frac{1}{x} ^ 2} \cdot \mathrm{dx}$

=$\int \frac{\left(1 - \frac{1}{x} ^ 2\right) \cdot \mathrm{dx}}{{\left(x + \frac{1}{x}\right)}^{2} - 1}$

After using $y = x + \frac{1}{x}$ and $\mathrm{dy} = \left(1 - \frac{1}{x} ^ 2\right) \cdot \mathrm{dx}$ transforms, this integral became

$\int \frac{\mathrm{dy}}{{y}^{2} - 1}$

=$\frac{1}{2} \int \frac{2 \mathrm{dy}}{\left(y + 1\right) \cdot \left(y - 1\right)}$

=$\frac{1}{2} \int \frac{\mathrm{dy}}{y - 1} - \frac{1}{2} \int \frac{\mathrm{dy}}{y + 1}$

=$\frac{1}{2} L n \left(y - 1\right) - \frac{1}{2} L n \left(y + 1\right) + C$

=$\frac{1}{2} L n \left(\frac{y - 1}{y + 1}\right) + C$

=$\frac{1}{2} L n \left(\frac{x + \frac{1}{x} - 1}{x + \frac{1}{x} + 1}\right) + C$

=$\frac{1}{2} L n \left(\frac{{x}^{2} - x + 1}{{x}^{2} + x + 1}\right) + C$

Mar 25, 2018

$\int \frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1} \mathrm{dx} = \frac{1}{2} \ln \left\mid {x}^{2} - x + 1 \right\mid - \frac{1}{2} \ln \left\mid {x}^{2} + x + 1 \right\mid + C$

#### Explanation:

Note that:

${x}^{4} + {x}^{2} + 1 = \left({x}^{2} - x + 1\right) \left({x}^{2} + x + 1\right)$

We find:

$\frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1} = \frac{x - \frac{1}{2}}{{x}^{2} - x + 1} - \frac{x + \frac{1}{2}}{{x}^{2} + x + 1}$

$\textcolor{w h i t e}{\frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1}} = \frac{1}{2} \left(\frac{2 x - 1}{{x}^{2} - x + 1}\right) - \frac{1}{2} \left(\frac{2 x + 1}{{x}^{2} + x + 1}\right)$

$\textcolor{w h i t e}{\frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1}} = \frac{1}{2} \left(\frac{\frac{d}{\mathrm{dx}} \left({x}^{2} - x + 1\right)}{{x}^{2} - x + 1}\right) - \frac{1}{2} \left(\frac{\frac{d}{\mathrm{dx}} \left({x}^{2} + x + 1\right)}{{x}^{2} + x + 1}\right)$

So:

$\int \frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1} \mathrm{dx} = \int \frac{1}{2} \left(\frac{2 x - 1}{{x}^{2} - x + 1}\right) - \frac{1}{2} \left(\frac{2 x + 1}{{x}^{2} + x + 1}\right) \mathrm{dx}$

$\textcolor{w h i t e}{\int \frac{{x}^{2} - 1}{{x}^{4} + {x}^{2} + 1} \mathrm{dx}} = \frac{1}{2} \ln \left\mid {x}^{2} - x + 1 \right\mid - \frac{1}{2} \ln \left\mid {x}^{2} + x + 1 \right\mid + C$