Skip to main content
5 of 8
added 412 characters in body
dr.blochwave
  • 8.8k
  • 3
  • 43
  • 76

Problem evaluating a complicated integral

I'm trying to integrate, for a given value of $y$ and $\sigma$, the function

$$ \int_{-\infty}^{+\infty} 2\sqrt{z+\frac{3}{8}+\sigma ^{2}}\sum_{k=0}^{\infty}\left ( \frac{y^{k}\mathrm{e}^{-y}}{k!\sqrt{2\pi \sigma^{2}}} \mathrm{e}^{-\frac{\left ( z-k \right )^{2}}{2\sigma^{2}}} \right ) \mathrm{d}z $$

For those interested, it's for the exact unbiased inverse of the generalized Anscombe Transform, as given in this paper: http://dx.doi.org/10.1109/TIP.2012.2202675.

In the reference, the values of the above function are tabulated, presumably in Matlab, for $\sigma \in \left \{ 0.01,...,50 \right \}$ and $y \in \left \{0,...,200 \right \}$. The authors have made this table available for download, but I want to do it myself.

However, I can't get it to work - Mathematica just won't evaluate it:

func[z_, y_, sig_] := 
 2 Sqrt[z + 3/8 + sig^2]*
  Sum[((y^k )* Exp[-y])/(k! * Sqrt[2 \[Pi] sig^2]) * 
    Exp[-((z - k)^2) / (2 sig^2)], {k, 0, Infinity}]

Integrate[func[z, 5, 2], {z, -Infinity, Infinity}]

Have I made a mistake somewhere? Or misunderstood the integral/problem as given?

Edit

If I try NIntegrate, for example,

NIntegrate[
 2 Sqrt[z + 3/8 + 2^2]*
  Sum[((5^k )* Exp[-5])/(k! * Sqrt[2 \[Pi] 2^2]) * 
    Exp[-((z - k)^2) / (2 2^2)], {k, 0, Infinity}], 
    {z, -Infinity, Infinity}] 

I get the warning

NIntegrate::inumr: "The integrand ... has evaluated to non-numerical values for all sampling points in the region with boundaries {{-[Infinity],0.}}"

Whilst if I try NSum, I'm warned:

NSum::nsnum: "Summand (or its derivative) ... is not numerical at point k = 15."

dr.blochwave
  • 8.8k
  • 3
  • 43
  • 76