# Riemann sum estimate of Cauchy residue formula

Let $e(k) = \exp \left(\frac{2 \pi i k}{N}\right)$ be a root of unity.

I wanted to numerically verify the Cauchy residue formula in Mathematica.
$$\lim_{N \to \infty}\frac{1}{N}\sum_{k=0}^{N-1} \frac{e(k) }{e(k) - a} = \frac{1}{2\pi i} \oint_{|z|=1} \frac{dz}{z - a} = \mathbf{1}( |a| < 1)$$

This computes the winding number of the curve $|z|=1$ (counter-clockwise) around $a \in \mathbb{C}$.

Can this Riemann sum be evaluated exactly? I would like to know the leading-order correction of the Riemann sum to the integral .

-

## 1 Answer

Denote the lhs as $f_N(a)$. It can be regarded as a rational function of complex variable $a$. It's straightforward to check that $f_N(a e(i))=f_N(a)$, $i=0,\ldots,N-1$. Which means that $f_N$ is a rational function of $a^N$. From the other hand $\lim_{a\to\infty}f_N(a)=0\;$. This leaves the only possibility $$f_N(a)=\frac c{\prod_{i=0}^{N-1}(e(i)-a)}=\frac c{1-a^N}.$$ Plugging $a=0$ gives $c=1$ so $f_N(a)=\frac1{1-a^N}$. Thus the difference between the sum and the integral is $f_N(a)-1=\frac {a^N}{1-a^N}$.

-

This is more clever than the way I was going. Very nice. (+1) – oen Jul 9 '12 at 5:25
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 14, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9168057441711426, "perplexity_flag": "head"}