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.
- Rewrite $x^2$ in terms of $1+x+x^2$.
- Split into two integrals.
- 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
| Piece | Antiderivative |
|---|---|
| $\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
- Correction: the source's Step 3 contained an algebra slip, writing "$1+x=\tfrac12+x$" (these are not equal — they differ by $\tfrac12$) before correctly factoring out $\tfrac12(1+2x)$. This dropped a constant term and produced a logarithm coefficient of $+\tfrac38$ in the final answer instead of the correct $-\tfrac18$. Differentiating the source's answer at $x=0$ gives $1.25$, while the true integrand there is $0$, confirming the error.
- The domain is all real $x$, since $1+x+x^2>0$ everywhere.
- The result was verified by differentiation: combining $\tfrac{d}{dx}\left[\tfrac{2x-3}4\sqrt{1+x+x^2}\right]$ and $\tfrac{d}{dx}\left[-\tfrac18\ln|x+\tfrac12+\sqrt{1+x+x^2}|\right]$ over the common denominator $2\sqrt{1+x+x^2}$ gives numerator $x^2$, matching the integrand.
Result
The solution to the integral is: