# (Full) Solution to $\int \frac{1-x}{x^2+x+1}dx$ with steps.

1. 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$

1. 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.

• Please edit your text. You can use LaTeX/Mathjax to typeset your equation. Look at my edits and you will see how it works. – MrYouMath Feb 28 '18 at 9:11
• It doesn't make sense to have $du$ in just one part of the integral. What does $\int (3/2)/u$ on its own (without $du$) even mean? You should instead complete the square to get $(1-x)/((x+\frac12)^2+\frac34)$ and use the substitution $u=x+\frac12$. – Hans Lundmark Feb 28 '18 at 9:35
• Could you post an answer of the full solution to the question in the title with all the steps? $\int \dfrac{1-x}{x^2+x+1}dx$ . I don't really understand this answer as well – Stallmp Feb 28 '18 at 10:04
• @MrYouMath I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. – GNUSupporter 8964民主女神 地下教會 Mar 15 '18 at 16:46

$\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$.
• $1-x=\frac{3-(2x+1)}{2}$ – CY Aries Feb 28 '18 at 10:58
• $\int\frac{2x+1}{x^2+2x+1}dx$ is easy to integrate. So obtaining $2x+1$ is the target. If $1-x=a+b(2x+1)$, then $a+b=1$ and $2b=-1$. – CY Aries Feb 28 '18 at 11:09