4
$\begingroup$

I have a couple of modules (Laplace transformation of Plus-distributions) that were completely straightforward to integrate with version 12.0.0. However, recently with versions 12.3.1, and 13.0.1 it seems not that straightforward.

Example:

Integrate[Log[x]/x (Exp[-x*y]-1),{x,0,Infinity},GenerateConditions->False]
  (**version 12.0.0**)
(6 EulerGamma^2  + Pi^2  + 6 Log[y] (2 EulerGamma + Log[y]) )/12

The version 12.0.0 just spilled out the results instantly whereas on the other hand versions 12.3.1, and 13.0.1 does not even perform the integration. Of course, there are different ways to perform the integration (and to implement it in the newer versions), but it is really surprising how the newer versions become worse day by day without backward compatibility for such basic features (or not that basic? at least it was nice in version 12.0.0)!


Edit

I thought that Mathematica 12.0.0 is giving the correct result. I tried to derive this in a way (not sure if this is correct though, always there are deep mathematical constraints that are not naively imaginable).

With this method, I can produce the results by Mathematica 12.0.0.

enter image description here


$\endgroup$
5

3 Answers 3

6
$\begingroup$

This integral does not converge. Here's one way to confirm this:

f[a_,y_]=Integrate[Log[x]/x (Exp[-x*y]-1),{x,0,a},Assumptions->{a>0,y>0}];
Limit[f[a,y],a->∞,Assumptions->y>0]

Gives $-\infty$

Here's another way

f[x_, y_] = Log[x]/x (Exp[-x*y] - 1);
AsymptoticIntegrate[f[x, y], x, x -> ∞, 
 Assumptions -> y > 0]

gives $-\frac{1}{2} \log ^2(x)$ which is divergent as $x\to\infty$

Mathematica 12.0.0 was wrong, the newer versions are giving you the correct result.

$\endgroup$
9
  • $\begingroup$ Your AsymptoticIntegrate is interesting. If I remove the Assumptions I get -((E^(-x y) Log[x])/(x y)) + 1/12 (6 EulerGamma^2 + \[Pi]^2 - 12 EulerGamma Log[x] + 12 EulerGamma Log[x y] - 12 Log[x] Log[x y] + 6 Log[x y]^2) $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 18:37
  • 1
    $\begingroup$ This has a finite part exactly what is found in 12.0. $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 18:44
  • 1
    $\begingroup$ I would have restricted 0<y<Infinity looking at my claim of the final answer. But let me think about what AsymptoticIntegrate does with other examples of the related kind. $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 19:07
  • 1
    $\begingroup$ A related example g[x_,y_] = (Exp[-x y] - Exp[-x])/x Log[x]; gives ((E^-x - E^(-x y)/y) Log[x])/x + 1/2 Log[y] (2 EulerGamma + Log[y]) which is fine as x->Infinity as long as y>0. This gives correct textbook result 1/2 Log[y] (2 EulerGamma + Log[y]) from Lewin 1981, eq, 1.106. My example is little worse though. $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 19:44
  • 1
    $\begingroup$ @Boogeyman The first example works since $\int_0^\infty e^{-x}\log(x)/x \ dx$ converges. The 2nd example indeed doesn't work. It's not a GenerateConditions thing, the integral actually doesn't converge. Try it out yourself. Pick a $y$ value, say $y=2$ and do Table[NIntegrate[f[x, 2], {x, 0, 10^n}], {n, 2, 10}]. Without GenerateConditions Mathematica says this is $-\gamma -\log (2)\approx -1.27$. The NIntegrate should clearly convince you that's wrong... $\endgroup$
    – bRost03
    Jun 30, 2022 at 23:46
1
$\begingroup$

The Integral with 13.0.1 gives

Integrate[x^(a - 1)*Log[x]*(Exp[(-x)*y] - 1), {x, 0, Infinity}]
(* ConditionalExpression[(Gamma[a]*(-Log[y]+PolyGamma[0,a]))/y^a,
   -1 < Re[a] < 0 && Re[y] > 0 && Im[y] == 0] *)

with condition among others that -1<a<0. This is supported by numeric calculation:

y = 7/10;Show[ListPlot[Table[{a, 
NIntegrate[x^(a - 1)*Log[x]*(Exp[(-x)*y] - 1), {x, 0, 10^100}, 
Method -> "DoubleExponential"]}, {a, -0.99, 0, 0.01}]], 
Plot[(Gamma[a]*(-Log[y] + PolyGamma[0, a]))/y^a, 
  {a, -0.99, 0}, PlotStyle -> {Orange}, PlotRange -> All]]

enter image description here

where you see that the integral seems to diverge for a->0 and not have a small value like

(6 EulerGamma^2 + Pi^2 + 6 Log[y] (2 EulerGamma + Log[y]))/12
       (* 4.005549 for y=0.7 *)

If the numerical integral is done with upper limit Infinity there is better agreement near a=-1, but this is probably because then also symbolic processing is used by Mathematica. The Method DoubleExponential gives the best agreement here with large but finite upper limit.

$\endgroup$
3
  • $\begingroup$ Then the question is after your comparison plot if one can compare coefficients of ‘a’ which is finite and corresponds to the original integral. $\endgroup$
    – BabaYaga
    Jul 2, 2022 at 6:31
  • $\begingroup$ Btw I see that you have started with a different integration and then taking a->0. $\endgroup$
    – BabaYaga
    Jul 2, 2022 at 6:47
  • $\begingroup$ I agree that your integral is divergent. This can be also seen by just expanding your result around a=0. My question: whether a series expansion is permissible on both sides. If yes, then it would be an infinite sum of finite terms/integrals. One of which would be the integrand in the question. In some way, the divergence will be regulated with 1/a kind of term. $\endgroup$
    – BabaYaga
    Jul 2, 2022 at 7:01
-1
$\begingroup$

In version 13 on Windows 10:

Series[Log[x]/x (Exp[-x*y] - 1), {x, Infinity, 2}, Assumptions -> x > 0 && y > 0] // Normal

$\frac{e^{-x y} \log (x)}{x}-\frac{\log (x)}{x}$

shows the integral under consideration diverges at infinity so the result in version 12 is not correct. Version 13 reports the divergence when executing Integrate[Log[x]/x (Exp[-x*y] - 1), {x, 0, Infinity}, GenerateConditions -> True].

$\endgroup$
14
  • $\begingroup$ Well, not really! This is a finite integral (plus-distribution). Mathematica 12.0.0 is giving the correct result. See math.stackexchange.com/questions/2665891/… $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 12:54
  • $\begingroup$ Sorry, this link is not math, but science fiction. $\endgroup$
    – user64494
    Jun 30, 2022 at 13:21
  • 2
    $\begingroup$ Sorry, this link might be science fiction. But this integral is doable and finite. One approach would be to start with a different integrand like x^(-1+a) (Exp[-y x] -1) and do a derivative wrt y. With this, the RHS will become simpler integration. Then one needs to series expand both sides (after y integration as well) in a and from the coefficient you will see that the coefficient of a term will lead to this integrand with the result stated in the question which is also correctly produced by Mathematica12.0.0. The integrand is logarithmically divergent but integrable. $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 15:08
  • $\begingroup$ Sorry, I have nothing to discuss with you in such manner. $\endgroup$
    – user64494
    Jun 30, 2022 at 15:26
  • 4
    $\begingroup$ I am not sure whether I upset you or you just don't want to chat or you believe my claim is wrong. Somehow I do not find clarity in your current answer. And I also tried to provide a derivation (see edit) if that is what you meant. Nevertheless thanks for engaging. $\endgroup$
    – BabaYaga
    Jun 30, 2022 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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