# How do you integrate this? ∫ dx(x²-x+1) I'm stuck on this part (image uploaded)

## Apr 2, 2018

$\implies \frac{2 \sqrt{3}}{3} {\tan}^{- 1} \left(\frac{2 x - 1}{\sqrt{3}}\right) + c$

#### Explanation:

Carrying on...

Let $\frac{3}{4} {u}^{2} = {\left(x - \frac{1}{2}\right)}^{2}$

$\implies \frac{\sqrt{3}}{2} u = x - \frac{1}{2}$

$\implies \frac{\sqrt{3}}{2} \mathrm{du} = \mathrm{dx}$

$\implies \int \frac{1}{\frac{3}{4} {u}^{2} + \frac{3}{4}} \cdot \frac{\sqrt{3}}{2} \mathrm{du}$

$\implies \frac{\sqrt{3}}{2} \int \frac{1}{\frac{3}{4} \left({u}^{2} + 1\right)} \mathrm{du}$

$\implies \frac{2 \sqrt{3}}{3} \int \frac{1}{{u}^{2} + 1} \mathrm{du}$

Using an antiderivative what should be committed to memory...

$\implies \frac{2 \sqrt{3}}{3} {\tan}^{- 1} u + c$

$\implies u = \frac{2 x - 1}{\sqrt{3}}$

$\implies \frac{2 \sqrt{3}}{3} {\tan}^{- 1} \left(\frac{2 x - 1}{\sqrt{3}}\right) + c$

Apr 2, 2018

This is a tricky little integral, and the solution will not appear obvious at first. Since this is a fraction, we might try to consider using the partial fractions technique, but a quick analysis reveals that this is not possible since ${x}^{2} - x + 1$ is not factorable.

We will try to get this integral to a form that we can actually integrate. Notice the similarity between $\int \frac{1}{{x}^{2} - x + 1} \mathrm{dx}$ and $\int \frac{1}{{x}^{2} + 1} \mathrm{dx}$; we know that the latter integral evaluates to $\arctan x + C$. We will therefore try to get ${x}^{2} - x + 1$ in the form $k {\left(x - a\right)}^{2} + 1$, and then apply the $\arctan x$ rule.

We will need to complete the square on ${x}^{2} - x + 1$:
${x}^{2} - x + 1$
$= {x}^{2} - x + \frac{1}{4} + 1 - \frac{1}{4}$
$= {\left(x - \frac{1}{2}\right)}^{2} + \frac{3}{4}$
$= {\left(x - \frac{1}{2}\right)}^{2} + {\left(\frac{\sqrt{3}}{2}\right)}^{2}$
$= {\left(\frac{\sqrt{3}}{2}\right)}^{2} \left({\left(x - \frac{1}{2}\right)}^{2} / {\left(\frac{\sqrt{3}}{2}\right)}^{2} + 1\right)$
$= {\left(\frac{\sqrt{3}}{2}\right)}^{2} \left({\left(\frac{x - \frac{1}{2}}{\frac{\sqrt{3}}{2}}\right)}^{2} + 1\right)$
(very messy, I know)

Now that we have it in our desired form, we may proceed as follows:
$\int \frac{1}{{x}^{2} - x + 1} \mathrm{dx} = \int \frac{1}{{\left(\frac{\sqrt{3}}{2}\right)}^{2} \left({\left(\frac{x - \frac{1}{2}}{\frac{\sqrt{3}}{2}}\right)}^{2} + 1\right)} \mathrm{dx}$
$= \frac{4}{3} \int \frac{1}{{\left(\frac{x - \frac{1}{2}}{\frac{\sqrt{3}}{2}}\right)}^{2} + 1} \mathrm{dx}$
$= \frac{4}{3} \int \frac{1}{{\left(\frac{2 x - 1}{\sqrt{3}}\right)}^{2} + 1} \mathrm{dx}$
$= \frac{4}{3} \cdot \left(\frac{\sqrt{3}}{2} \arctan \left(\frac{2 x - 1}{\sqrt{3}}\right)\right) + C$
$= \frac{2 \arctan \left(\frac{2 x - 1}{\sqrt{3}}\right)}{\sqrt{3}} + C$