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

Jan 27, 2017

$\int \frac{\mathrm{dx}}{{x}^{2} + x + 1} = \frac{2}{\sqrt{3}} \arctan \left(\frac{2 x + 1}{\sqrt{3}}\right) + C$

#### Explanation:

As the denominator does not have real roots, we can proceed in a different way than using partial fractions.

Start by completing the square in the denominator of the integrand functions:

$\frac{1}{{x}^{2} + x + 1} = \frac{1}{{\left(x + \frac{1}{2}\right)}^{2} + \frac{3}{4}} = \frac{4}{{\left(2 x + 1\right)}^{2} + 3} = \frac{4}{3} \frac{1}{{\left(\frac{2 x + 1}{\sqrt{3}}\right)}^{2} + 1}$

Now substitute:

$t = \frac{2 x + 1}{\sqrt{3}}$

$\mathrm{dt} = \frac{2}{\sqrt{3}} \mathrm{dx}$

$\int \frac{\mathrm{dx}}{{x}^{2} + x + 1} = \frac{2}{\sqrt{3}} \int \frac{\mathrm{dt}}{{t}^{2} + 1} = \frac{2}{\sqrt{3}} \arctan t + C$

and substituting back $x$:

$\int \frac{\mathrm{dx}}{{x}^{2} + x + 1} = \frac{2}{\sqrt{3}} \arctan \left(\frac{2 x + 1}{\sqrt{3}}\right) + C$