Problem 271
Medium Partial Fractions

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

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

Explanation of Method

Rewriting the numerator as a multiple of the denominator's repeated quadratic factor plus a remainder splits off a simple $1/(x^2+x+1)$ piece, leaving a proper rational function to decompose via partial fractions.

  1. Rewrite $x^3+1$ in terms of $x(x^2+x+1)$.
  2. Split into a simple piece and a partial-fraction piece.
  3. Solve for the partial fraction coefficients.
  4. Integrate each term.

Step 1 · Rewrite the numerator

Since $x(x^2+x+1)=x^3+x^2+x$, we have $x^3+1 = x(x^2+x+1) - (x^2+x-1)$. Dividing through:

$$ \frac{x^3+1}{x(x^2+x+1)^2} = \frac{1}{x^2+x+1} - \frac{x^2+x-1}{x(x^2+x+1)^2}. $$

Step 2 · Partial fractions for the second piece

$$ \frac{x^2+x-1}{x(x^2+x+1)^2} = \frac Ax + \frac{Bx+C}{x^2+x+1} + \frac{Dx+E}{(x^2+x+1)^2}. $$

Multiplying through: $x^2+x-1=A(x^2+x+1)^2+(Bx+C)x(x^2+x+1)+(Dx+E)x$. Setting $x=0$ gives $A=-1$. Matching the remaining coefficients gives $B=1,\ C=1,\ D=2,\ E=2$.

Step 3 · Integrate each term

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

Using $x^2+x+1=(x+\tfrac12)^2+\tfrac34$: $\displaystyle\int\frac{dx}{x^2+x+1}=\frac{2}{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right)$.

Since $x+1=\tfrac12(2x+1)+\tfrac12$: $\displaystyle\int\frac{x+1}{x^2+x+1}\,dx = \frac12\ln\left(x^2+x+1\right) + \frac1{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right)$.

Since $2x+2=(2x+1)+1$: $\displaystyle\int\frac{2x+2}{(x^2+x+1)^2}\,dx = -\frac1{x^2+x+1} + \frac{2x+1}{3(x^2+x+1)} + \frac{4}{3\sqrt3}\arctan\left(\frac{2x+1}{\sqrt3}\right)$, using $\int\frac{2x+1}{(x^2+x+1)^2}dx=-\frac1{x^2+x+1}$ and the reduction formula for $\int\frac{dx}{(x^2+x+1)^2}$.

Step 4 · Combine

Collecting the arctangent coefficients: $\tfrac{2}{\sqrt3}-\tfrac1{\sqrt3}-\tfrac4{3\sqrt3}=-\tfrac1{3\sqrt3}=-\tfrac{\sqrt3}9$. Collecting the rational terms: $\tfrac1{x^2+x+1}-\tfrac{2x+1}{3(x^2+x+1)}=\tfrac{2-2x}{3(x^2+x+1)}$.

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


Summary Table

Coefficient Value
$A$$-1$
$B$$1$
$C$$1$
$D$$2$
$E$$2$

Additional Notes

Result

The solution to the integral is:

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