# How do i solve this integral? $\int$ $\frac{dx}{x^2+x+1}$? [closed]

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

• you can use \mathop{dx} instead of the weird \,dx – zwim Nov 9 '19 at 20:38
• @zwim If you adopt that as general practice, any punctuation placed to the right of the differential is spaced incorrectly. – 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$$?

• how did you get (√3/2)^2? – ELZP Nov 10 '19 at 9:18
• 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$. – Luke Collins Nov 10 '19 at 9:21
• ahh i see, thank you! – ELZP Nov 10 '19 at 9:32

Hint:

$$\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}$$.