$$\int_{-\infty}^{\infty}\frac{dx}{(x^2+ax+a^2)(x^2+bx+b^2)}$$ a and b are real constants
How should I solve the above integral? Is there a nice, interesting method? or is partial fractions the only way to do it?
I did solve it using partial fractions, but it got really lengthy and cumbersome - wondering if there's a nicer way to do it.
Thanks a lot!
Wolfy’s answer is over-complicated, because it doesn’t know residue theorem:).
This integral is what exactly residue theorem can deal with easily.
The denominator can be factorized to $$(x-p|a|)(x-\overline p|a|)(x-q|b|)(x-\overline q|b|)$$
where $$p=\frac{-\text{sgn}(a)+i\sqrt 3}2$$ $$q=\frac{-\text{sgn}(b)+i\sqrt 3}2$$
Now, take a contour $C$ which is an infinitely large semicircle centered at the origin on the upper half of the complex plane.
By residue theorem, $$\oint_C\frac1{(x-p|a|)(x-\overline p|a|)(x-q|b|)(x-\overline q|b|)}dx=2\pi i\sum \text{residue included}$$
Also note that $$\oint_C=\underbrace{\int_{\text{arc}}}_{\to0}+\int^\infty_{-\infty}$$
The only residue included are at $A=p|a|$ and $B=q|b|$, and the residues at these two points are respectively $$\text{Res}_{p|a|}=\frac1{(p|a|-\overline p|a|)(p|a|-q|b|)(p|a|-\overline q|b|)}=\frac1{i\sqrt3|a| (p|a|-q|b|)(p|a|-\overline q|b|) }$$ $$\text{Res}_{q|b|}=\frac1{(q|b|-p|a|)(q|b|-\overline p|a|)(q|b|-\overline q|b|)}=\frac1{i\sqrt3|b| (q|b|-p|a|)(q|b|-\overline p|a|) }$$
The residues can be compactly written as
$$\text{Res}_{A}=\frac1{i\sqrt3|a| (A-B)(A-\overline B) }$$
$$\text{Res}_{B}=\frac1{i\sqrt3|b| (B-A)(B-\overline A) }$$
The computation is then complete:
$$\color{red}{\int^\infty_{-\infty}\frac1{(x^2+ax+a^2)(x^2+bx+b^2)}dx=\frac{2\pi}{\sqrt3(A-B)}\left(\frac1{|a|(A-\overline B)}+\frac1{|b|(\overline A-B)}\right)}$$
The residues might look complicated but do not be afraid to do some tedious algebra to add them up. There are surely some good simplifications/effective cancellations.
**Can you observe the hidden symmetry between $a$ and $b$ in the result? :)