3
$\begingroup$

I have tried this integral in Mathematica,

Assuming[m > 0,Integrate[Cos[m k] Exp[ Cos[k]], {k, 0, 2 Pi}]]

And Mathematica failed to perform this. Whereas if any value of m is declared then it is showing the result in terms of Modified Bessel Function. I want to know the reason why Mathematica can not perform the integral in the general term of m, but performing this integral when the value of m is declared.

$\endgroup$
5
  • $\begingroup$ For fixed m I get a result, for example Integrate[Cos[3 k] Exp[Cos[k]], {k, 0, 2 Pi}] (* 2 \[Pi] BesselI[3, 1] *) $\endgroup$ Sep 24 at 7:35
  • $\begingroup$ But Integrate[Cos[3/2* k] Exp[Cos[k]], {k, 0, 2 Pi}] gives a result of zero. So the general formula with the Bessel function probably only applies to integers. $\endgroup$ Sep 24 at 7:43
  • 1
    $\begingroup$ Integrate[Cos[17*k] Exp[Cos[k]], {k, 0, 2 *Pi}] performs $$2 \pi (183252363823720801 I_1(1)-762935687373888144 I_2(1)) .$$ $\endgroup$
    – user64494
    Sep 24 at 7:51
  • 1
    $\begingroup$ N[2 \[Pi] (183252363823720801 BesselI[1, 1] - 762935687373888144 BesselI[2, 1]), 50] is equal to N[ 2 \[Pi] BesselI[17, 1], 50] $\endgroup$ Sep 24 at 16:21
  • 1
    $\begingroup$ @VaclavKotesovec: That can presumably be proven analytically using the identity $I_{n+1}(z) = \frac{2n}{z} I_n(z) + I_{n-1}(z)$. And Mathematica returns True from FullSimplify[(183252363823720801 BesselI[1, 1] - 762935687373888144 BesselI[2, 1]) == BesselI[17, 1]]. $\endgroup$ Sep 24 at 17:56
7
$\begingroup$

The problem is probably that the formula with the Bessel function only applies to some m and in general it will be more complicated. Take a look at the following graph.

Show[Plot[NIntegrate[Cos[m* k] Exp[Cos[k]], {k, 0, 2 Pi}], {m, 0, 5}, PlotStyle -> Red], Plot[2*Pi*BesselI[m, 1], {m, 0, 5}]]

enter image description here

$\endgroup$

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