Problem 312
Easy Substitutions

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

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

Explanation of Method

Writing $x^2=(1+x+x^2)-(1+x)$ splits the integral into a standard radical integral minus a derivative-matching piece.

  1. Rewrite $x^2$ in terms of $1+x+x^2$.
  2. Split into two integrals.
  3. Integrate each piece.

Step 1 · Rewrite and split

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

Step 2 · Evaluate the second piece

Writing $1+x=\tfrac12(1+2x)+\tfrac12$:

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

Step 3 · Evaluate the first piece

Completing the square, $1+x+x^2=(x+\tfrac12)^2+\tfrac34$:

$$ \int\sqrt{1+x+x^2}\,dx = \frac{2x+1}4\sqrt{1+x+x^2} + \frac38\ln\left|x+\frac12+\sqrt{1+x+x^2}\right|. $$

Step 4 · Combine

$$ I = \left[\frac{2x+1}4-1\right]\sqrt{1+x+x^2} + \left[\frac38-\frac12\right]\ln\left|x+\frac12+\sqrt{1+x+x^2}\right| + C. $$


Summary Table

PieceAntiderivative
$\sqrt{1+x+x^2}$$\tfrac{2x+1}4\sqrt{1+x+x^2}+\tfrac38\ln|\ldots|$
$-(1+x)/\sqrt{1+x+x^2}$$-\sqrt{1+x+x^2}-\tfrac12\ln|\ldots|$

Additional Notes

Result

The solution to the integral is:

$$ I = \frac{(2x-3)\sqrt{1+x+x^2}}4 - \frac18\ln\left|x+\frac12+\sqrt{1+x+x^2}\right| + C. $$