15
$\begingroup$

Mathematica (as of v. 11.1.0) does not recognize that this special case of Frullani's integral converges:

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}]
(* Integrate::idiv: Integral of ArcTan[a x]/x-ArcTan[b x]/x does not converge 
   on {0,\[Infinity]}.
   Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}] *)

This should converge because the integrand is well-defined at zero and is $ O(1/x^2)$ as $ x \to \infty $.

Using the formula given, with $ f(x) = \tan^{-1} (x) $, we should have

$$ \int_0^\infty dx\,\frac{\tan^{-1}(a\,x)-\tan^{-1}(b\,x)}{x} = -\frac{\pi}{2} \ln \left(\frac{b}{a}\right) $$

NIntegrate crunches through just fine for $ a = 1 $ and $ b = 2 $.

NIntegrate[(ArcTan[1*x] - ArcTan[2*x])/x, {x, 0, Infinity}]
(* -1.08879 *)

This matches the exact result:

-(Pi/2)*Log[2/1] // N
(* -1.08879 *)
$\endgroup$
20
$\begingroup$

The integral does not converge if a and b are real and have opposite signs:

Series[(ArcTan[a*x] - ArcTan[b*x])/x, {x, Infinity, 2}]

Mathematica graphics

As @shadowray pointed out, it does converge if a and b are positive and Integrate[] is passed that as an assumption. It also works with

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}, Assumptions -> a < 0 && b < 0]
| improve this answer | |
$\endgroup$
16
$\begingroup$

Although Integrate usually finds the condition in which the integral converges,

Integrate[Exp[-a x], {x, 0, Infinity}]

enter image description here

it's better to provide your own condition in the form of Assumptions.

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}, Assumptions->{Re[a]>0, Re[b]>0}]

enter image description here

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}, Assumptions->{Re[a]<0, Re[b]<0}]

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.