2
$\begingroup$

I know that the integration of:

Integrate`InverseIntegrate[Exp[-x Cosh[t]], {t, 0, Infinity}, 
 Assumptions -> Re[x] > 0]

is:

BesselK[0, x].

I would like to integrate the following expression, using the same procedure:

Integrate`InverseIntegrate[Exp[-x Cosh[t] - t], {t, 0, Infinity}, 
 Assumptions -> Re[x] > 0]

The integration fails.

The result should be:

BesselK[1, x]-Exp[-x]/x

What can I do?

$\endgroup$
  • $\begingroup$ what does Integrate`InverseIntegrate supposed to do? Where is this function documented? How can one answer this without knowing what does Integrate`InverseIntegrate mean? I do not see it documented anywhere? It helps if you explain more what this is supposed to do. $\endgroup$ – Nasser Oct 10 '16 at 15:25
  • $\begingroup$ In principle I want only to integrate. For this I found the following link: mathematica.stackexchange.com/questions/4728/…. Integrate[Exp[-x Cosh[t]], {t, 0, Infinity}]does not solve. ` $\endgroup$ – mrz Oct 10 '16 at 16:39
  • 1
    $\begingroup$ See also: ?Integrate`* $\endgroup$ – mrz Oct 10 '16 at 16:46
  • $\begingroup$ thanks, I did ?Integrate* before, but it only gave !Mathematica graphics which did not say much about what this is supposed to do, that is why I asked ;) $\endgroup$ – Nasser Oct 10 '16 at 22:32
  • 1
    $\begingroup$ Of course, I meant I added a little explanation to (4728), but dyslexia struck. $\endgroup$ – Michael E2 Oct 10 '16 at 23:10
2
$\begingroup$

The internal function Integrate`InverseIntegrate[] tries what I call the "obvious" substitutions, namely, u == g[x], where g[x] appears as the argument to a function in the expression being integrated. The problem here is that Power automatically combines the product

Exp[-x Cosh[t]] * Exp[-t]

into a single power. If we try TrigToExp@Exp[-x Cosh[t] - t], we again cannot separate out the Exp[-t] from the integrand. Even if we enter

TrigToExp@Exp[-x Cosh[t]] Exp[-t]
(*  E^(-t - 1/2 (E^-t + E^t) x) *)

the factor Exp[-t] is combined with the other factor. This keeps Integrate`InverseIntegrate[] from identifying u = Exp[t] + Exp[-t] as the substitution to try.

The substitution @mrz shows, u == Exp[-t] is tried by Integrate`InverseIntegrate[], and it gets one step from the solution, by using Integrate`InverseIntegrate[] again. But Integrate`InverseIntegrate[] is applied only once, so it fails. In fact, after the first substitution, Integrate`InverseIntegrate is set equal to $Failed &, preventing any further application of it.

Here's a way to get Mathematica to try two applications of Integrate`InverseIntegrate[]. Basically, we make a copy of it, and have Integrate call it under suitable conditions.

ClearAll[int];
DownValues[int] = 
  DownValues[Integrate`InverseIntegrate] /. Integrate`InverseIntegrate -> int;
Internal`InheritedBlock[{Integrate},
 Unprotect[Integrate];
 Integrate[i_, {x_, a_, b_}, stuff___] /; ! TrueQ[$in] := 
  Block[{$in = True, res}, 
   If[FreeQ[{stuff}, 
     Conditional`InertUndefined | ConditionalExpression],
    If[a < b,
     res = int[i, {x, a, b}, stuff],
     res = int[-i, {x, b, a}, stuff]
     ],
    res = $Failed
    ];
   If[FreeQ[res, $Failed],
    res,
    Integrate[i, {x, a, b}, stuff]
    ]];
 Protect[Integrate];
 Assuming[Re[x] > 0,
  Integrate`InverseIntegrate[
   TrigToExp@Exp[-x Cosh[t] - t], {t, 0, Infinity},
   Assumptions -> Re[x] > 0]
  ]]

(*  (E^-x (-1 + E^x x BesselK[1, x]))/x  *)

Here's a way to do the substitution manually and use Integrate[] instead of Integrate`InverseIntegrate[]:

Assuming[Re[x] > 0 && t > 0 && u > 2,
  TrigToExp[Exp[-x Cosh[t] - t] Dt[t] /.            (* integrand *)
      First@Solve[2 Cosh[t] == u && t > 0, t]] /.   (* substitution *)
   _Dt -> 1 // Simplify];
(Numerator[%] (u - Sqrt[-4 + u^2])) /               (* rationalize, in part *)
  Expand[Denominator[%] (u - Sqrt[-4 + u^2])]
(*  (E^(-((u x)/2)) (u - Sqrt[-4 + u^2]))/(2 Sqrt[-4 + u^2])  *)

Integrate[%, {u, 2, Infinity}, Assumptions -> Re[x] > 0]
(*  -(E^-x/x) + BesselK[1, x]  *)

For some reason, Integrate[] cannot solve the unrationalized expression.

$\endgroup$
2
$\begingroup$

Answer from Wolfram Technical Support:

Consider just what's under the integral

Exp[-x*Cosh[t]-t]dt 
= Exp[-x*Cosh[t]]*Exp[-t]dt 
= Exp[-(x/2)*(Exp[-t]+Exp[t])]*Exp[-t]dt

Now, make the u substitution

u=Exp[-t]
du=-Exp[-t]dt

Thus, the Integrand is

-Exp[-(x/2)*(u+1/u)]du 

and the integral runs from 1 to 0. We can then flip the limits of integration and eliminate the minus sign out front. With the integral in this form, we can get the desired result.

Integrate`InverseIntegrate[Exp[-(x/2)*(u + 1/u)], {u, 0, 1}, 
 Assumptions -> Re[x] > 0]

(E^-x (-1 + E^x x BesselK[1, x]))/x

Using FullSimplify, we get the result in the form you are looking for.

FullSimplify[%]

-(E^-x/x) + BesselK[1, x]
$\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.