How to solve this integral $\displaystyle \int \frac{\,dx}{x^2+x+1}$?

  • $\begingroup$ you can use \mathop{dx} instead of the weird \,dx $\endgroup$ – zwim Nov 9 '19 at 20:38
  • $\begingroup$ @zwim If you adopt that as general practice, any punctuation placed to the right of the differential is spaced incorrectly. $\endgroup$ – Luke Collins Nov 21 '19 at 0:31

Hint: By completing the square we have $x^2+x+1=(x+\frac12)^2+(\frac{\sqrt3}{2})^2$, and $$\int\frac{1}{u^2+a^2}\,du=\tfrac{1}{a}\,\tan^{-1}\big(\tfrac{u}{a}\big)+c.$$

So what should you take $u=\dots$?

  • $\begingroup$ how did you get (√3/2)^2? $\endgroup$ – ELZP Nov 10 '19 at 9:18
  • $\begingroup$ Well, I got $\frac34$, but since I want something which looks like $u^2+a^2$, I thought "what, when squared, becomes $\frac34$?", the answer to which is $\sqrt{\frac34}=\frac{\sqrt3}{\sqrt4}=\frac{\sqrt3}2$. $\endgroup$ – Luke Collins Nov 10 '19 at 9:21
  • $\begingroup$ ahh i see, thank you! $\endgroup$ – ELZP Nov 10 '19 at 9:32


$\displaystyle\int\frac{1}{u^2+a^2}\mathop{du}=\frac{\arctan\left(\frac{u}{a}\right)}{a}+C, a\in\mathbb{R}$

$\displaystyle x^2+x+1=\left(x+\frac{1}{2}\right)^2+\frac{3}{4}$

Now substitute in $u=x+\frac{1}{2}$ and $a^2=\frac{3}{4}$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.