       Re: Theta function integration bug

• To: mathgroup at smc.vnet.net
• Subject: [mg126886] Re: Theta function integration bug
• From: Sebastian Meznaric <meznaric at gmail.com>
• Date: Fri, 15 Jun 2012 15:27:26 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jr9km3$3kp$1@smc.vnet.net>

On Wednesday, June 13, 2012 9:57:39 AM UTC+1, Sebastian Meznaric wrote:
> The bug can be found in the following analytic integral:
> Integrate[
>  EllipticTheta[3, \[Phi], \[Alpha]] Exp[I \[Phi]], {\[Phi], 0,
>   2 \[Pi]}]
>
> Mathematica evaluates the integral to 0, which is not correct, which can be seen considering that for small value of alpha, the elliptic theta is close to the delta function. Numerical integration also confirms that this integral is non-zero.

I was evaluating the integral of EllipticTheta[3, (\[Phi] - \[Pi])/2, E^(-(\[Sigma]^2/2))]/(2 \[Pi]) over 0 to 2Pi. You can show that this is equal to e^{-\sigma^2 / 2} as follows.

Start with the sum  \sum_{k=-\infty}^{\infty} \int_0^{2\pi} \frac{1}{\sigma \sqrt{2 \pi}} e^{-(\phi+2\pi k)^2/2\sigma^2} e^{i \phi} d\phi.

You can exchange integral and sum by Weierstrass M-test of uniform convergence. Now the sum evaluates, according to Mathematica, to (EllipticTheta[3, \[Phi]/2,
E^(-(\[Sigma]^2/2))])/(2 \[Pi]) for positive \sigma. So the above is the same as the integral of the Elliptic Theta function. Now if you do the integration term by term, on the other hand, you get
\sum_{k=-\infty}^{\infty} \frac{1}{2} e^{-2i\pi i k - \sigma^2/2}((E_f(\frac{2(k+1)\pi - i \sigma^2}{\sqrt{2}\sigma}) - (E_f(\frac(2k\pi - i \sigma^2}{\sqrt{2}\sigma}), where E_f is the error function.

This is a cascading sum of the error functions that evaluates to e^{-\sigma^2/2}.

There are also physical reasons why the above integral should not vanish.



• Prev by Date: Re: Bug in NIntegrate[]?
• Next by Date: Re: part of the expression?
• Previous by thread: Re: Theta function integration bug
• Next by thread: ToString Awkwardness