# Integration with Bessel function as result

When I try to calculate this integral,

1/(2*Pi)*Integrate[ Exp[I*2*θ]*Cos[1/2 (7 + Cos[θ])], {θ, 0, 2*Pi}]


Mathematica is unable to compute it. But the result is known to be -BesselJ[2, 1/2] Cos[7/2], using the integral form of the Bessel functions. Why doesn't Mathematica calculate this integral analytically? There is no issue in computing it using NIntegrate.

• Because ,nothing is perfect.A perfect CAS does not exist and never will be. Sep 19 '18 at 15:39
• Mathematica can't take Integrate[Exp[-Cosh[x]], {x, 0, Infinity}] either... Nov 11 '18 at 11:01

1/(2*Pi)*Integrate[#, {θ, 0, 2*Pi}] & /@
TrigExpand[Exp[I*2*θ]*Cos[1/2 (7 + Cos[θ])]]

(* -BesselJ[2, 1/2] Cos[7/2] *)

• I've used Map with pure functions in other applications, but can you please explain what that code does? Sep 20 '18 at 6:35
• @theorist TrigExpand generates a sum of expressions. /@ maps Integrate over all terms, thereby integrating the terms of the sum separately. The Plus head of the sum is not affected by this, so the results of the individual integrations will be summed up to the final result. Sep 20 '18 at 9:30

With little help MMA can do it.

Using a trick: Cos[x] == Exp[I x] // Re // ComplexExpand

Integrate[1/(2*Pi)*Exp[I*2*θ]*Exp[I*1/2*(7 + Cos[θ])], {θ, 0, 2*Pi}] // Re // ComplexExpand

(*-BesselJ[2, 1/2] Cos[7/2] *)