I am doing some analytical work that includes the integral of $e^{i(n\, t - x \sin t)}$. I know the result of this integral is a Bessel function.

$$J_n(x)=\frac1{2\pi}\int_{-\pi}^\pi e^{i(x\sin\tau-n\tau)}\mathrm d\tau$$

However, when making the calculation, Mathematica does not seem to know the identity shown above and does not use it. How can I inform Mathematica of the identity so it will use it and give me results expressed in terms of Bessel functions?

  • 6
    $\begingroup$ For specific integer values of $n$, Mathematica is certainly aware of this identity (try e.g. Integrate[Exp[I (x Sin[t] - 3 t)], {t, -π, π}]/(2 π)). In general, however, this isn't true, and the result comes out in terms of Anger and Weber functions (in Mathematica, AngerJ[] and WeberE[]). $\endgroup$ Nov 13, 2019 at 21:53
  • $\begingroup$ Thank you very much! In my case, n can be an integer. However, it is not a given value. I tried this: Integrate[E^(I (-n t + x Sin[t])), {t, -\[Pi], \[Pi]}, Assumptions -> n \[Element] Integers]/(2 \[Pi]) that assumes n is integer, but it does not work. $\endgroup$
    – yeliya201
    Nov 14, 2019 at 13:20
  • 1
    $\begingroup$ Yes, it seems Mathematica does not know what to do for generic n. $\endgroup$ Nov 15, 2019 at 7:07
  • $\begingroup$ For this integral we only need the Anger function (the Weber function cancels out): Integrate[E^(I (x Sin[t] - n t)), {t, -π, π}]/(2 π) == AngerJ[n, x]. This is easily verified by replacing Integrate with NIntegrate. Also, we can verify the Bessel equality with Assuming[Element[n, NonNegativeIntegers], AngerJ[n, x] // FunctionExpand] which gives BesselJ[n, x]. More generally, AngerJ[n, x] // FunctionExpand // FullSimplify gives a combination of HypergeometricPFQRegularized functions. $\endgroup$
    – Roman
    Jul 31, 2022 at 15:31

2 Answers 2

In[1]:= $Version

Out[1]= "13.2.1 for Microsoft Windows (64-bit) (January 27, 2023)"

In[2]:= Integrate[Exp[ I x  Sin[u] - n I  x], {u, -\[Pi], \[Pi]}]

Out[2]= ConditionalExpression[2 E^(-I n x) \[Pi] BesselJ[0, Abs[x]], 
 x \[Element] Reals]

In[7]:= Series[
  2 E^(-I n x) \[Pi] BesselJ[0, Abs[x]] == 
   Integrate[Exp[ I x  Sin[u] - n I  x], {u, -\[Pi], \[Pi]}], {x, 0, 
   13}] // FullSimplify

Out[7]= True

The simple Leibniz Trick (as we see it today after the axiomatic introduction of differential forms as multilinear maps 100 years ago) can always be applied by supplying the differential dx as a symbol and write the trivial substitutin rules

In[5]:= integrate[
  Exp[ I x  Sin[u] - n I  x] du , {u, -\[Pi], \[Pi]}] /. {  
  x -> v/n ,  Sin[u] -> p, du -> dp/Sqrt[1 - p^2], u -> ArcSin[p]}

Out[5]= integrate[(dp E^(-I v + (I p v)/n))/Sqrt[
 1 - p^2], {ArcSin[p], -\[Pi], \[Pi]}]

In[7]:= E^(-I v)
  Integrate[(E^(((I p v)/n))) /Sqrt[1 - p^2], {p, -1, 1}]

Out[7]= E^(-I v) \[Pi] BesselJ[0, v/n]

keeping in mind, that the substutions are invertibly valid in intervals of monotony only.

In general, you may add known integrals from tables to your treasure trove

      Exp[ I x_Symbol*Sin[u_] - 
        I  x_Symbol (n_Symbol | n_?NumericQ)], {u_, -\[Pi], \[Pi]}] :=
     (1/(2 \[Pi]) BesselJ[n , x] /; n \[Element] Integers && n >= 0 )

One method is to set the function as

J[n_, x_] := (1/(2*Pi))*Integrate[Exp[I*(x*Sin[u] - n*u)], {u, -Pi, Pi}];

As a simple use case the script

J[n_, x_] := (1/(2*Pi))*Integrate[Exp[I*(x*Sin[u] - n*u)], {u, -Pi, Pi}];
Sum[J[n, 0], {n, 0, Infinity}]

provides the result of 1, the desired result.

Since the Bessel function of the first kind is known to be useful in the calculation, based upon the description by the OP, then it would be more useful to use the series expansion, or other forms, built into Mathematica for calculations and then convert the result to the desired form.

  • $\begingroup$ Thank you very much! I think my problem is a little different. I hope Mathematica can know that the result of the integral contains a Bessel function and give the result with J[n,x]. Maybe I have not fully understood you, sorry! $\endgroup$
    – yeliya201
    Nov 14, 2019 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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