Problem 209
Medium Roots and Binomials

Evaluate the integral: I = integral (x+1)/(x²+x+1) dx

Evaluate the integral: $$ I = \int \frac{x+1}{x^2+x+1}\,dx. $$

Explanation of Method

Writing the numerator as half the derivative of the denominator plus a constant splits the integral into a logarithm and a standard arctangent integral.

  1. Rewrite $x+1=\tfrac12(2x+1)+\tfrac12$.
  2. Split into a derivative-matching piece and a constant piece.
  3. Integrate each piece.

Step 1 · Rewrite the numerator

Since $\dfrac{d}{dx}(x^2+x+1)=2x+1$, write:

$$ x+1 = \frac12(2x+1) + \frac12. $$

Step 2 · Split the integral

$$ I = \frac12\int \frac{2x+1}{x^2+x+1}\,dx + \frac12\int \frac{dx}{x^2+x+1}. $$

Step 3 · Integrate each piece

The first integral is a direct log-derivative match:

$$ \frac12\int \frac{2x+1}{x^2+x+1}\,dx = \frac12\ln\left(x^2+x+1\right). $$

The second integral is the standard arctangent result (Problem 189):

$$ \int \frac{dx}{x^2+x+1} = \frac{2}{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right), \qquad\text{so}\qquad \frac12\int \frac{dx}{x^2+x+1} = \frac{1}{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right). $$

Step 4 · Combine

$$ I = \frac12\ln\left(x^2+x+1\right) + \frac{1}{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right) + C. $$


Summary Table

Piece Antiderivative
$(2x+1)/(x^2+x+1)$$\ln(x^2+x+1)$
$1/(x^2+x+1)$$\tfrac{2}{\sqrt3}\arctan\!\left(\tfrac{2x+1}{\sqrt3}\right)$

Additional Notes

Result

The solution to the integral is:

$$ I = \frac12\ln\left(x^2+x+1\right) + \frac{1}{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right) + C. $$