3
$\begingroup$

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.

$\endgroup$
2
  • 2
    $\begingroup$ Because ,nothing is perfect.A perfect CAS does not exist and never will be. $\endgroup$ Sep 19 '18 at 15:39
  • $\begingroup$ Mathematica can't take Integrate[Exp[-Cosh[x]], {x, 0, Infinity}] either... $\endgroup$
    – Yuriy S
    Nov 11 '18 at 11:01
3
$\begingroup$
1/(2*Pi)*Integrate[#, {θ, 0, 2*Pi}] & /@
 TrigExpand[Exp[I*2*θ]*Cos[1/2 (7 + Cos[θ])]]

(* -BesselJ[2, 1/2] Cos[7/2] *)
$\endgroup$
2
  • $\begingroup$ I've used Map with pure functions in other applications, but can you please explain what that code does? $\endgroup$
    – theorist
    Sep 20 '18 at 6:35
  • 3
    $\begingroup$ @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. $\endgroup$ Sep 20 '18 at 9:30
2
$\begingroup$

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] *)
$\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.