2
$\begingroup$

Working through Spivak's Calculus and using old assignments from the course offered at my school I'm working on the following problem, asking me to find the integral $$\int \frac{1}{x^{2}+x+1} dx$$

Looking through Spivak and previous exercises I worked on, I thought using a partial fraction decomposition would be the technique, but even in Spivak the only exercises I've seen which are similar involve:

$$\int \frac{1}{(x^{2}+x+1)^{n}} dx\ ,\text{where}\ n> 1$$

In which case it is pretty straightforward to solve. So there must be a reason why the exercise isn't presented unless it is so straightforward.

Integration by parts and substitution (at least for now) have proven fruitless as well. So I come here to ask if I'm missing any special trick to compute this integral ?

$\endgroup$
2
  • 4
    $\begingroup$ Using $x^2+x+1 = (x+\frac12)^2+\frac34$ and use trigonometric substitution. $\endgroup$
    – player3236
    Sep 17 '20 at 18:43
  • $\begingroup$ Yoo could split the fraction into partial fractions, although I agree that the constants involved will be very messy. $\endgroup$ Sep 17 '20 at 19:11
4
$\begingroup$

It's actually very simple to identify this integral as this:

$$\int \frac{1}{x^2+x+1} dx = \int \frac{1}{\left(x+\frac{1}{2} \right)^2+ \frac{3}{4}} dx.$$

Now you can see that you can use the following rule for integration: $$\int \frac{1}{x^2+a^2}dx=\frac{1}{a} \arctan \left(\frac{x}{a} \right)+ C.$$

And now you get $$\int \frac{1}{\left(x+\frac{1}{2} \right)^2+ \frac{3}{4}} dx = \frac{2}{\sqrt{3}} \arctan \left(\frac{2x+1}{\sqrt{3}} \right) + C.$$

$\endgroup$
1
  • $\begingroup$ Post in same timing $\endgroup$
    – jasmine
    Sep 17 '20 at 18:53
3
$\begingroup$

I'll take a different approach from the answers so far. For this approach, you'll have to be at least a bit comfortable working with complex numbers.

We can factor $x^2 + x + 1$ as $\left(x - \frac{1 + \sqrt{3}i}{2}\right)\left(x - \frac{1 - \sqrt{3}i}{2}\right)$.

That means we can rewrite the integral using partial fractions: $\int \frac{dx}{x^2+x+1} = \int \frac{A dx}{x - \frac{1 +\sqrt{3}i}{2}} + \int \frac{B dx}{x - \frac{1 -\sqrt{3}i}{2}}$ for some $A, B \in \mathbb{C}$. We can find $A$ and $B$ easily: $Ax - A \frac{1 +\sqrt{3}i}{2} + Bx - B \frac{1 -\sqrt{3}i}{2} = 1$. This gives us that $A = -B$, and $A = -\frac{\sqrt{3}i}{3}$.

These integrals are of the form $\int \frac{Kdx}{x-L}$, and are easy enough to solve: just use the substitution $u = x - \frac{1 +\sqrt{3}i}{2}$ for the first one, and $u =x - \frac{1 -\sqrt{3}i}{2}$ for the second one.

$\endgroup$
3
$\begingroup$

Though the efficient way has been given several times, decomposition in simple fractions remains your good friend.

The polynomial $x^2+x+1$ has complex roots, let $\omega$ and $\omega^*$, which, incidentally, are cube roots of unity. Now,

$$\frac1{x^2+x+1}=\frac1{(x-\omega)(x-\omega^*)}=\frac1{2i\Im(\omega)}\left(\frac1{x-\omega}-\frac1{x-\omega^*}\right)$$ and after integration,

$$\frac1{2i\Im(\omega)}\log\frac{x-\omega}{x-\omega^*}.$$

As $|x-\omega|=|x-\omega^*|$, the logarithm reduces to the difference of the arguments,

$$-\frac1{\Im(\omega)}\arctan\frac{\Im(\omega)}{x-\Re(\omega)}=-\frac2{\sqrt3}\arctan\frac{\sqrt3}{2x+1}.$$


There is even a faster way, noticing that

$$\frac1{x-\omega}=\frac{x-\omega^*}{(x-\omega)(x-\omega^*)}=\frac{x-\Re(\omega)}{x^2+x+1}+i\frac{\Im(\omega)}{x^2+x+1}.$$

Hence, taking the imaginary part,

$$\int\frac{dx}{x^2+x+1}=\frac{\Im(\log(x-\omega))}{\Im(\omega)}=-\frac1{\Im(\omega)}\arctan\frac{\Im(\omega)}{x-\Re(\omega)}.$$

As a byproduct,

$$\int\frac{{x-\Re(\omega)}}{x^2+x+1}dx=\frac{\Re(\log(x-\omega))}{\Im(\omega)}=\frac1{\Im(\omega)}\log\sqrt{(x-\Re(\omega))^2+\Im^2(\omega)}.$$

$\endgroup$
1
$\begingroup$

Hint : $x^2+x+1 = (x+\frac{1}{2})^{2}+\frac{3}{4}$

$\endgroup$
1
  • $\begingroup$ going to give this a try. Will report back with progress....Thanks. $\endgroup$
    – dc3rd
    Sep 17 '20 at 18:44
1
$\begingroup$

$\int \frac{1}{(x+1/2)^2 + 3/4} dx= \frac{2}{\sqrt3}\tan^{-1}\frac{2x+1}{\sqrt3} +c$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.