- If we use substitution, we get:
$u=x^2+x+1$
$du=(2x+1)dx$
$(-1/2)du=(-x-1/2)dx=(-x+1-3/2)dx$
- Then the integral becomes:
$\int ((-du/2)/u) + 3/2\int dx/(x^2+x+1$)
But why isn't it just: $\int ((-1/2du)-3/2)/u$ ?
And why do you use + 3/2 in the original answer and not -3/2, if -1/2du = (-x+1-3/2)dx ? I don't really understand step 2.
Edit: Please post a full solution to the question in the title: $\displaystyle \int \frac{1-x}{x^2+x+1}dx$ with all the steps.
$\displaystyle \int\frac{1-x}{x^2+x+1}dx=\frac{3}{2}\int \frac{dx}{(x+\frac{1}{2})^2+\frac{3}{4}}-\frac{1}{2}\int\frac{2x+1}{x^2+2x+1}dx$.
Let $\displaystyle x+\frac{1}{2}=\frac{\sqrt{3}}{2}\tan\theta$. Then $\displaystyle dx=\frac{\sqrt{3}}{2}\sec^2\theta d\theta$ and $\displaystyle \left(x+\frac{1}{2}\right)^2+\frac{3}{4}=\frac{3}{4}\sec^2\theta$. So,
$\displaystyle \int \frac{dx}{(x+\frac{1}{2})^2+\frac{3}{4}}=\frac{2}{\sqrt{3}}\int d\theta=\theta+C=\frac{2}{\sqrt{3}}\tan^{-1}\left(\frac{2x+1}{\sqrt{3}}\right)+C$.