0
$\begingroup$

I want to evaluate the following integral in Mathematica.

$$ \int_0^\infty \frac{a^{-t}-b^{-t}}{t} dt = \ln \left(\frac{\ln b}{\ln a} \right)$$

I try to enter this, but Mathematica can't figure it out.

Integrate[ (a^(-t) - b^(-t))/t, {t, 0, Infinity}, Assumptions -> {a > 0, b > 0, b > a}]

It can figure out

Integrate[ (3^(-t) - 5^(-t))/t, {t, 0, Infinity}]

If someone could explain how to do the assumptions better I would appreciate it.

$\endgroup$
3
  • 1
    $\begingroup$ It gives me the answer in V13.0.1, with a condition, a >= 1. Maybe add that to the assumptions in your version (or a > 1). $\endgroup$
    – Michael E2
    Apr 23 at 16:27
  • $\begingroup$ @MichaelE2: If a==1, then the integral diverges. $\endgroup$
    – user64494
    Apr 23 at 16:38
  • 1
    $\begingroup$ I suppose that's why I suggested a > 1, hmm? $\endgroup$
    – Michael E2
    Apr 23 at 19:56

2 Answers 2

2
$\begingroup$

Plot the integrand to see, it explodes for 0<a<1 and a<b<1 as t goes to infinity, means integral does not converge.

Get desired result for 1<a and a<b

Manipulate[
 Plot3D[a^-t/t - b^-t/t, {a, 0, 2}, {b, a, 2}, 
  PlotRange -> {0, 100}], {{t, 1/1000}, 0, 10, 
  Appearance -> "Labeled"}]

Integrate[(a^(-t) - b^(-t))/t, {t, 0, Infinity}, 
 Assumptions -> {a > 1, b > 1, b > a}]

(*   -Log[Log[a]/Log[b]]   *)

Integrate[(a^(-t) - b^(-t))/t, {t, 0, Infinity}, 
 Assumptions -> {0 < a < 1, 0 < b < 1, b > a}]

(*   Integrate::idiv: Integral of a^-t/t-b^-t/t does not converge on {0,\[Infinity]}. >>   *)
$\endgroup$
1
$\begingroup$

The following works in version 13 on Windows 10.

Integrate[(a^(-t) - b^(-t))/t, {t, 0, Infinity}, 
Assumptions -> {a > 0, b > 0}]

ConditionalExpression[-Log[Log[a]/Log[b]], a >= 1 && b >= 1]

If (a<=1 && a>0)||(b<=1 && b >0), then the integral diverges.

$\endgroup$
1
  • $\begingroup$ One sees an inaccuracy in ConditionalExpression[-Log[Log[a]/Log[b]], a >= 1 && b >= 1] . It should be ConditionalExpression[-Log[Log[a]/Log[b]], a > 1 && b > 1] instead of. $\endgroup$
    – user64494
    Apr 23 at 16:42

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