# How to do partial fraction decomposition with complex roots?

I want to determine $$\int\frac{1}{x^2+x+1}\, dx$$ which I approached by partial fraction decomposition.

The complex roots of the denominator are $$z_{1}=-0.5+i \frac{\sqrt 3}{2}$$ and $$z_2=-0.5-i\frac{\sqrt 3}{2}$$.

So $$\frac{1}{x^2+x+1}=\frac{Bx+C}{(x-z_1)(x-z_2)}$$ which yields $$B=0$$ and $$C=1$$. However, this would just take me back to me where I started - how do I proceed here?

• Why not $$\frac{1}{x^2+x+1}=\frac{B}{x-z_1}+\frac{C}{x-z_2}?$$ – Angina Seng Jan 22 '19 at 20:10
• Thanks. that's what I did for the exercises where the roots were real. For some reason, I stumbled upon this site that instructed something with $Bx+C$.. – Tesla Jan 22 '19 at 20:13

## 4 Answers

These numbers (the complex cubic roots of unity) are usually denoted $$j$$ and $$\bar j$$ ($$=j^2$$). You decompose into partial fractions as with real roots: $$\frac{1}{x^2+x+1}=\frac{A}{x-j}+\frac{B}{x-\bar j}.$$ To determine $$A$$ and $$B$$, multiply both sides of this equality by $$x^2+x+1$$ and simplify. You'll obtain $$1=A(x-\bar j)+B(x-j).$$ Setting $$x=j$$, this equality becomes $$\;1=A(j-\bar j)=2\operatorname{Im}(j)=i\sqrt 3$$, whence $$A=-\dfrac i{\sqrt 3}$$.

Can you continue?

Effective computation of the integral:

You don't have to decompose this fraction over the complex numbers. Completing the square and a simple substitution reduces it to the basic formula: $$\int\frac{\mathrm dx}{x^2+a^2}=\frac1a\,\arctan\frac xa.$$ Now rewrite the quadratic polynomial as $$x^2+x+1=\Bigl(x+\frac12\Bigr)^2+\frac 34$$ and integrate after you've set $$t=x+\frac12$$.

• Thanks. I think you forgot to put $A$ twice in your last equations? Yes I think I can do the rest. Now I just set $x=\bar j$ to solve for B? – Tesla Jan 22 '19 at 20:29
• So is it correct that I should get $$F(x)=\frac{i}{\sqrt 3} \ln(\vert x-j \vert)-\frac{i}{\sqrt 3} \ln(\vert x-\bar j \vert) +c$$? – Tesla Jan 22 '19 at 20:42
• It is not that simple, because the complex logarithm requires branch cut. I'll add the way to calculate this integral in a moment. – Bernard Jan 22 '19 at 20:53
• @Tesla: I've added hints on how to calculate the integral. – Bernard Jan 22 '19 at 21:03

What you should do is$$\frac1{x^2+x+1}=\frac A{x-z_1}+\frac B{x-z_2}.$$

$$\frac {1}{x^2 + x +1} = \frac {A}{x-z_1} + \frac {B}{x-z_2}$$

Now there are two ways you can go by.

$$A(x-z_2) + B(x-z_1) = 1$$

Multiply it out and solve the system of equations.

$$Ax+Bx = 0x\\ A = -B\\ -Az_2-Bz_1 = 1\\ A = \frac {1}{z_1-z_2}$$

But, this is a nice trick.

$$(x-z_1)\frac {1}{x^2 + x +1} = A + (x-z_1)\frac {B}{x-z_2}\\ \lim_\limits{x\to z_1} \frac {1}{x-z_2} = A$$

Similarly, $$\lim_\limits{x\to z_2} \frac {1}{x-z_1} = B$$

You'd have $$\frac{1}{x^2+x+1}=\frac{A}{(x-z_1)} + \frac{B}{(x-z_2)} = \frac{A}{x-\left(-0.5+i \frac{\sqrt 3}{2}\right)} + \frac{B}{x-\left(-0.5-i\frac{\sqrt 3}{2}\right)}$$

Multiply both sides by $$x^2 +x+1$$ to get:

$$1= A\left(x-\left(-\frac 12-i\frac{\sqrt 3} 2\right)\right) + B\left(x-\left(-\frac 12+i\frac{\sqrt 3}2\right)\right)$$

So, $$A+B=0$$, and

Take it from here.