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.
Integrate`InverseIntegrate
supposed to do? Where is this function documented? How can one answer this without knowing what doesIntegrate`InverseIntegrate
mean? I do not see it documented anywhere? It helps if you explain more what this is supposed to do. $\endgroup$Integrate[Exp[-x Cosh[t]], {t, 0, Infinity}]
does not solve. ` $\endgroup$?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$