# Integration of a rational function from +/- infinity

I am trying to calculate the integral

$$\int_{-\infty}^{\infty}{\frac{a+x}{b^2 + (a+x)^2}\frac{1}{1+c(a-x)^2}}dx$$

where $\{a, b, c\}\in \mathbb{R}$. I have looked in a table of integrals for rational functions, but with no luck. Is there a smart trick I can utilize?

Hint: Use partial fraction to write the integral as

$${\frac{a+x}{b^2 + (a+x)^2}\frac{1}{1+c(a-x)^2}} = \frac{A+Bx}{b^2 + (a+x)^2} + \frac{C+D x}{1+c(a-x)^2},$$

then you can write it as

$$\frac{A}{b^2 + (a+x)^2} + \frac{C}{1+c(a-x)^2} + \frac{Bx}{b^2 + (a+x)^2} + \frac{D x}{1+c(a-x)^2},$$

and finally make the change of variables $x-a=t$ and $x+a=t$ and things will be easy. See here for similar techniques and read the comments under my answer.

Potential Hint:

$$\int_{-\infty}^{\infty}{\frac{a}{(b^2 + (a+x)^2)(1+c(a-x)^2)}} - {\frac{x}{(b^2 + (a+x)^2)(1+c(a-x)^2)}}dx$$

The first part can be solved using a chain rule like method. The second half can be solved using integration by parts with $u = x$ i.e $u\prime = 1$.

Hope this helps!

Why don't you want to simplify it by putting the term under the integral in the following manner: $$\frac{a+x}{b^2 + (a+x)^2}\frac{1}{1+c(a-x)^2}=\frac{\alpha +x}{\beta (c (x-a)^2+1)}-\frac{\gamma }{\delta +x}$$ with $$\alpha =\frac{4 a^2 c+a b^2 c+1}{b^2 c}$$ $$\beta =\frac{4 a^2 c+4 a b^2 c+b^4 c+1}{b^2 c}$$ $$\gamma =\frac{b^2}{4 a^2 c+4 a b^2 c+b^4 c+1}$$ $$\delta =a+b^2$$ which are just constants. So $$\begin{eqnarray*} \int_{-\infty}^{\infty}{\frac{a+x}{b^2 + (a+x)^2}\frac{1}{1+c(a-x)^2}}dx=\frac{\alpha}{\beta c}\int_{-\infty}^{\infty} \frac{1}{ (x-a)^2+\frac{1}{c}}dx&+&\\+\frac{1}{\beta c}\int_{-\infty}^{\infty} \frac{x}{ (x-a)^2+\frac{1}{c}}dx &-&\\-\gamma\int_{-\infty}^{\infty} \frac{1}{\delta +x}dx \end{eqnarray*}$$