Problem 343
Medium Advanced Techniques

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

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

Explanation of Method

Rationalizing by the conjugate $\sqrt{x^2+x+1}-x$ turns the denominator into the simple linear expression $x+1$, splitting the integral into an elementary rational piece and $\int\sqrt{u^2-u+1}/u\,du$ (with $u=x+1$), which reduces via a further split to standard forms.

  1. Rationalize by the conjugate.
  2. Split into two integrals.
  3. Integrate the radical piece via a further split.
  4. Combine and back-substitute.

Step 1 · Rationalize

Multiplying by $\dfrac{\sqrt{x^2+x+1}-x}{\sqrt{x^2+x+1}-x}$, the denominator becomes $(x^2+x+1)-x^2=x+1$:

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

Step 2 · Second piece

Since $\dfrac x{x+1}=1-\dfrac1{x+1}$:

$$ \int\frac x{x+1}\,dx = x - \ln|x+1|. $$

Step 3 · First piece

Let $u=x+1$, so $x^2+x+1=u^2-u+1=Q$. Writing $\sqrt Q/u=Q/(u\sqrt Q)=\left(u/\sqrt Q\right)-\left(1/\sqrt Q\right)+\left(1/(u\sqrt Q)\right)$ and integrating each piece:

$$ \int\frac{\sqrt Q}u\,du = \sqrt Q - \frac12\ln\left|u-\frac12+\sqrt Q\right| - \ln\left|\frac{2-u+2\sqrt Q}u\right| + C_1. $$

Step 4 · Combine and back-substitute

$$ I = \sqrt Q - \frac12\ln\left|u-\frac12+\sqrt Q\right| - \ln\left|\frac{2-u+2\sqrt Q}u\right| - x + \ln|x+1| + C, $$

and with $u=x+1$, $2-u=1-x$, and combining the $\ln|x+1|$ terms:


Summary Table

PieceAntiderivative
$\int x/(x+1)\,dx$$x-\ln|x+1|$
$\int\sqrt Q/u\,du$$\sqrt Q-\tfrac12\ln|u-\tfrac12+\sqrt Q|-\ln|(2-u+2\sqrt Q)/u|$

Additional Notes

Result

The solution to the integral is:

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