Approximate sum over odd terms into an integral

I am studying some system on a ring with $N$ discrete sites, and I obtain some quantity $Q$:

\begin{equation} Q(t,r)=\frac{2}{N}\sum_{k=1}^{N-1}\left(1-(-1)^k\right)\sin\left[\frac{k\pi}{N}\right]\sin\left[\frac{rk\pi}{N}\right]\exp\left\{-2t\left(1-\cos\left[\frac{k\pi}{N}\right]\right)\right\} \end{equation}

Where $r$ represents a distance, it is discrete and can take any value up to $N-1$.

I am interested in the case where $N\to \infty$, so I was thinking of approximating my sum into an integral. There is this post that provides a method, here is what I tried:

First I set $k \to 2k-1 $ to only take into account the odd terms. I obtain:

\begin{equation} Q(t,r)=\frac{2}{N}\sum_{k=1}^{N/2}\sin\left[\frac{(2k-1)\pi}{N}\right]\sin\left[\frac{r(2k-1)\pi}{N}\right]\exp\left\{-2t\left(1-\cos\left[\frac{(2k-1)\pi}{N}\right]\right)\right\} \end{equation} I could then just identify my $a, b$ to then apply this rule (for $f$ continuous on $[a,b]$): \begin{equation} \int_{a}^{b} f(x) d x=\lim _{n \rightarrow \infty} \frac{b-a}{n} \sum_{i=1}^{n} f\left(a+\frac{b-a}{n} i\right) \end{equation} However I am unsure of the following points:

  • How does $r$ scales if I defined $x=\frac{(2k-1)\pi}{N}$ and let $N\to \infty$?
  • By summing only over the odd terms I can change the indices into $k \to 2k-1 $, but then my sum goes only to $N/2$ (assuming N is even). What happens to the integral?

Solution 1:

The correct expression is $$ Q(t,r)=\frac{4}{N}\sum_{k=1}^{N/2}\sin\left[\frac{(2k-1)\pi}{N}\right]\sin\left[\frac{r(2k-1)\pi}{N}\right]\exp\left\{-2t\left(1-\cos\left[\frac{(2k-1)\pi}{N}\right]\right)\right\}. $$ since for odd $k$, $1-(-1)^k=2$ yields an extra factor of $2$. Let $$f(x):=2\sin(πx)\sin(πrx)\exp(−2t(1−\cos(πx)))$$ and consider $$\int_0^1 f(x)dx.$$ We would like to approximate the integral via a Riemann sum $$ \sum\limits_{k = 1}^N {f(t_k )(x_k - x_{k - 1} )} . $$ Divide the interval $[0,1]$ into $N$ sub-intevals at the points $$x_k=\frac{k}{N}, \quad 0\leq k\leq N,$$ and choose $t_k$ to be the mid-points: $$t_k=\frac{2k-1}{2N}, \quad 1\leq k\leq N.$$ Then $$ \int_0^1 {f(x)dx} \approx \frac{1}{N}\sum\limits_{k= 1}^N {f\!\left( {\frac{{2k - 1}}{{2N}}} \right)} . $$ The right-hand side is $Q(t,r)$ when we consider only even $N$s (i.e., we replace $N$ by $2N$).