<s>[INST] Compute $\int_0^\infty\frac{x^a-x^b}{(1+x^a)(1+x^b)}\,dx$ 
Compute the definite integral
$$
\int_0^\infty\frac{x^a-x^b}{(1+x^a)(1+x^b)}\,dx
$$
where $a,b\in\mathbb{R}$.

My Attempt:
Let $x=\frac{1}{t}$ so that $dx=-\frac{1}{t^2}\,dt$. Substituting into the integral and changing the limits of integration gives
$$
\begin{align}
\int_0^\infty\frac{x^a-x^b}{(1+x^a)(1+x^b)}\,dx&=\int_\infty^0\frac{t^b-t^a}{(t^a+1)(t^b+1)}\cdot\frac{-1}{t^2}\,dt\\
&=-\int_0^\infty\frac{t^a-t^b}{(1+t^a)(1+t^b)}\cdot\frac{1}{t^2}\,dt\\
&=-\int_0^\infty\frac{x^a-x^b}{(1+x^a)(1+x^b)}\cdot\frac{1}{x^2}\,dx
\end{align}
$$
I'm not sure how to compute the integral from here.
 [/INST] If you use partial fractions, you will see that the integrand is $$\frac{1}{1+x^b} - \frac{1}{1+x^a}$$ Neither summand can be indefinitely integrated in elementary terms, but the residue theorem is your friend.
</s>