4

Mathematica is unable to produce a result for the following definite integral:

$$\int\limits_{0}^{\infty}\cos{(x \sinh{t})} \ dt$$

Integrate[Cos[x Sinh[t]], {t, 0, Infinity}]

However, this is a standard integral of the form BesselK[0, x], the modified Bessel function of the second kind. Is Mathematica unaware of this definition?

xzczd
  • 65,995
  • 9
  • 163
  • 468
Udichi
  • 559
  • 3
  • 13

2 Answers2

8

Workaround:

func=Cos[x*Sinh[t]];    

InverseMellinTransform[Integrate[MellinTransform[func, x, s], {t, 0, Infinity}, 
Assumptions -> 0 < s < 1], s, x]

(* BesselK[0, x] *)

FourierCosTransform[Integrate[FourierCosTransform[func, x, s], {t, 0, Infinity}, 
Assumptions -> s > 0], s, x]

(* BesselK[0, x] *)

Summary: Obviously nothing's foolproof.

Mariusz Iwaniuk
  • 13,841
  • 1
  • 25
  • 41
7

You can try dumb substitutions:

Integrate[
 Cos[x Sinh[t]] Dt[t] /. First@Solve[x Sinh[t] == u, t, Reals] /. {Dt[u] -> 1, Dt[x] -> 0},
 {u, 0, ∞}, Assumptions -> x > 0]
(*  BesselK[0, x]  *)

The above converts the integral to almost the same as in @MarcoB's comment.

Here's a general function to do the above more or less automatically:

ClearAll[trydumbsubs];
SetAttributes[trydumbsubs, HoldAll];
trydumbsubs[Integrate[f_, {t_, a_, b_}, Assumptions -> hyp_]] :=
  Module[{subs, sub, res = $Failed},
   subs = SortBy[
      DeleteCases[DeleteDuplicates@Cases[f, (g_)[arg_] :> arg, {0, Infinity}], t],
      -LeafCount[#] &];
   Do[
     sub = Solve[arg == u, t, Reals];
     If[ListQ[sub],
      res = Integrate[
        f*Dt[t] /. First@sub /. {Dt[u] -> 1, _Dt -> 0},
        {u, Limit[arg, t -> a, Assumptions -> hyp], 
         Limit[arg, t -> b, Assumptions -> hyp]},
        Assumptions -> hyp
        ],
      res = $Failed];
     If[FreeQ[res, Integrate | $Failed],
      Return[res]
      ],
     {arg, subs}];
   res /; FreeQ[res, Integrate | $Failed]
   ];

OP's example:

trydumbsubs@ Integrate[Cos[x Sinh[t]], {t, 0, Infinity}, Assumptions -> x > 0 && t > 0]
(*  BesselK[0, x]  *)
Michael E2
  • 235,386
  • 17
  • 334
  • 747