How do you go about integrating the reciprocal of a quadratic when it cannot be factorised (ruling out the use of partial fractions)?
E.g.
$\int \frac{1}{x^2-x+1} dx$
How do you go about integrating the reciprocal of a quadratic when it cannot be factorised (ruling out the use of partial fractions)?
E.g.
$\int \frac{1}{x^2-x+1} dx$
Complete the square. We get $\left(x-\dfrac{1}{2}\right)^2 +\dfrac{3}{4}$. Then make the substitution $x-\dfrac{1}{2}=\dfrac{u\sqrt{3}}{2}$.
Remark: Completing the square is often a good idea, but not always. If the quadratic factorizes nicely, factorize it and use partial fractions. Here after completing the square we got something that kind of looks like $\dfrac{1}{1+t^2}$. The substitution is meant to bring out the resemblance.
To finish the integration, we need to carry out the substitution correctly, by first observing that $dx=\dfrac{\sqrt{3}}{2}\,du$. And we need to remember that $\displaystyle\int\frac{du}{1+u^2}=\arctan u+C$.