# Calculating sum of BesselJ[n, x]

My friend has a sum in his research paper that looks like this

$$\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa}.$$

He was able to calculate this sum analytically, by substituting the denominator with an integral. I wonder, is there a way to calculate this in Mathematica by adjusting some options in the Sum[BesselJ[n, x]^2/(n - К), {n, -Infinity, Infinity}].

UPD People were interested in how to take this sum analytically. So if you substitute

$$\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa} = \sum_{n=-\infty}^{\infty}J_n^2(x)(-i)\int_0^\infty e^{-i(\kappa-n)t}\mathrm{d}t =,$$

where we can now exchange the integration and summation and use $n\to-n$ symmetry

$$=(-i)\int_0^\infty\mathrm{d}t\left\{\sum_{n=1}^{\infty}J_n^2(x)\left(e^{-i(\kappa-n)t}+e^{-i(\kappa+n)t}\right)+J_0^2(x)e^{-i\kappa t}\right\}.$$

Then we take out the $e^{-i\kappa t}$ and get $2\cos{nt}$, so the whole sum becomes

$$\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa} = (-i)\int_0^\infty\mathrm{d}t\left[e^{-i\kappa t}\left\{2\sum_{n=1}^{\infty}J_n^2(x)\cos{nt}+J_0^2(x)\right\}\right],$$

and now can be easily taken

$$\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa} =(-i)\int_0^\infty e^{-i\kappa t}J_0\left(2x\sin{\left({t\over 2}\right)}\right)\mathrm{d}t.$$

Now we have a geometrical progression $a_{n+1}=qa_{n}$, where

$$a_0=\int_0^{2\pi} e^{-i\kappa t}J_0\left(2x\sin{\left({t\over 2}\right)}\right)\mathrm{d}t,~~\text{and}~~q =e^{-2\pi i \kappa}.$$

So

$$\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa} =(-i)\sum_{n=0}^{\infty}a_n=i\frac{a_0}{q-1}.$$ $a_0$ can be found using the integrals shown below on pic, but still Mathematica is not helpful to take it.

• What do you mean by "substituting the denominator with an integral"? I mean, you can do Integrate @@ Sum[ ... ], but that probably won't be equal to the original expression and in any event Mathematica doesn't evaluate that either. – Michael Seifert May 31 '16 at 19:25
• I added the brief explanation in the upd. – hayk Jun 1 '16 at 11:27
• @HaykHakobyan your link of $a_0$ may be broken. Please check it. – tanghe2014 Oct 10 '17 at 10:57
• @tanghe2014 fixed, thnx. – hayk Oct 10 '17 at 21:28

Mathematica returns

Sum[BesselJ[n, x]^2/(n - k), {n, -Infinity, Infinity}]


unevaluated. However, BesselJ[n, x]^2 and BesselJ[-n, x]^2 are equal, so the Sum can be rewritten as

Simplify[-BesselJ[0, x]^2/k + 2 k Sum[BesselJ[n, x]^2/(n^2 - k^2), {n, 1, Infinity}]]
(* -π BesselJ[-k, x] BesselJ[k, x] Csc[k π] *)


which is the desired result. Its plot, here for k == .5, is

Plot[Evaluate[% /. k -> .5], {x, 0, 10}, PlotRange -> All, AxesLabel -> {x, sum}]


The sum converges quite rapidly, at least for k == .5. Define

f[nmax_, x_, k_] := Sum[BesselJ[n, x]^2/(n - k), {n, -nmax, nmax}]
Plot[Evaluate[Table[f[nm, x, .5], {nm, 0, 5, 1}]], {x, 0, 10},
PlotRange -> All, AxesLabel -> {x, sum}]


The curve for nm == 3 is essentially identical to that for the symbolic Sum. Convergence probably is not so rapid for larger k.

Using Laplace transform: $$\mathcal{L}_t[J_0(a \sinh (b t))](s)=\frac{I_{\frac{s}{2 b}}\left(\frac{a}{2}\right) K_{-\frac{s}{2 b}}\left(\frac{a}{2}\right)}{b}$$ where I'm found in this Book on page 276 example 1.

Using identity:

$$a \sin (b t)=-i a \sinh (i b t)$$

all combining together:

 (-I)*(BesselI[s/(2 b), a/2] BesselK[-(s/(2 b)), a/2])/b /. a -> -I*2*x /.
b -> I/2 /. s -> I*k


-2 BesselI[k, -I x] BesselK[-k, -I x]

Sum[BesselJ[n, x]^2/(n - k), {n, -Infinity, Infinity}] == Re[-2 BesselI[k, -I x] BesselK[-k, -I x]]


$$\sum _{n=-\infty }^{\infty } \frac{J_n(x){}^2}{n-k}=\Re(-2 I_k(-i x) K_{-k}(-i x))$$

Comment:

Formula works for:$x\in \mathbb{R}$ and $k=c+\frac{1}{2}$ where $c\in \mathbb{Z}$