# Two answers for Integral of $\int_0^\infty \frac{\tan^{-1}ax - \tan^{-1}x}{x}\mathrm dx$

$$I= \int_0^\infty \frac{\tan^{-1}ax - \tan^{-1}x}{x}\mathrm dx$$ Now by using Leibnitz Rule by differentiating w.r.t. to $$a$$ we get, $$\frac{\mathrm dI}{\mathrm da}=\frac{\pi}{2a}$$ $$I=\frac{\pi}{2}\ln a$$ But consider , $$I_1= \int_0^\infty \frac{\tan^{-1}ax}{x}\mathrm dx$$ $$I_2= \int_0^\infty \frac{\tan^{-1}x}{x}\mathrm dx$$ So Substituting $$ax=t$$ in $$I_1$$ $$I_1= \int_0^\infty \frac{\tan^{-1}t}{t}\mathrm dt$$ So $$I=I_1-I_2=0$$ So where am I wrong here? I know there is some mistake In second method as the function is always positive integral can't be $$0$$. But i am not able to figure out where am I wrong.

Note: $$a$$ is a positive number

• $I_1$ diverges at its upper limit due to a $O(1/x)$ integrand. Incidentally, your first, correct strategy is common. – J.G. Mar 15 at 12:31

You are wrong when you split the original integral into two integrals. This can be done only when both the splitted integrals converge to some finite value, which is not the case here. So your second method fails. The correct answer hence is $$I(a)=\frac {\pi}{2}\ln a$$
• In other words, the integrals $I_1, I_2$ both diverge. This is one of many examples where divergent integrals may not be treated with the rules for convergent integrals. – GEdgar Mar 13 at 10:42