5

Suppose f is continuous on $[0,1]$. Find

$$L=\lim_{n\rightarrow \infty} \frac{1}{n} \sum_{k=1}^{n} (-1)^k f(\frac{k}{n}) $$

My attempts : I was thinking about Riemann sum... but $(-1)^k$ creates confusion.

Thanks in advance.

Bernard
  • 175,478
jasmine
  • 14,457

3 Answers3

3

Contrary to your name, you are not stupid. You possess a very important ability in problem solving: realizing when you took the wrong approach. In such a case, you just have to abandon that road, and think about a different one.

Here, continuity is the key. Moreover, continuity on a bounded, closed interval, which implies uniform continuity. So if $n$ is large, the values $f(k/n)$ and $f((k+1)/n)$ are very close to each other.

I hope this hint helps. Mind the borders! What if $n$ is odd? What if $n$ is even?

A. Pongrácz
  • 7,418
3

I am here to give an analogous example. Maybe this method is also applicable to your question.

Compute $\sum_1^\infty (-1)^{n-1} 1/n$.

If we have some knowledge about harmonic series $\sum_1^\infty 1/n$: $$ 1 +\frac 12 + \frac 13 + \cdots + \frac 1n = \log(n) + \gamma + o(1) \quad [n \to \infty], $$ where $\gamma$ is the Euler constant, then we could rewrite $$ 1-\frac 12 + \frac 13 - \frac 14 + \cdots + (-1)^{n-1} \frac 1n = \sum_1^n \frac 1j - 2 \sum_1^{\lfloor n/2\rfloor} \frac 1k, $$ and use the asymptotic estimate above to get the result.

UPDATE

Solution. $\blacktriangleleft$ Let $s_n = \sum_1^n (-1)^{k-1} f(k/n)$. Then $-L = \lim s_n$ if $s_n$ converges.

Consider $s_{2n}$. By the similar operation above, $$ s_{2n} = \frac 1{2n}\left(f\left( \frac 1{2n}\right) + f\left(\frac 2{2n} \right)+ \cdots + f\left(\frac {2n}{2n} \right) \right) - 2 \cdot \frac 1 {2n} \left( f \left( \frac 1n\right)+ f \left(\frac 2n\right) + \cdots + f\left(\frac nn\right) \right). $$ Since $f \in \mathcal C[0,1]$, $f \in \mathcal R[0,1]$. Then $$ \lim s_{2n} = \lim_n \frac 1{2n} \sum_1^{2n} f\left( \frac j{2n}\right) - \lim_n \frac 1n \sum_1^n f \left(\frac jn \right) = \int_0^1 f - \int_0^1 f = 0. $$ Now for $s_{2n+1}$, $$ s_{2n+1} = \frac 1 {2n+1} \sum_1^{2n+1} f \left( \frac j{2n+1} \right) - \frac 2 {2n+1} \sum_1^n f \left( \frac {2j}{2n+1}\right). $$ Clearly, $$ \frac {j-1}n \leqslant \frac {2j}{2n+1} = \frac j {n+1/2} \leqslant \frac jn, $$ where the first inequality holds because of $$ \frac {j-1}n \leqslant \frac {2j}{2n+1} \iff (j-1)(2n+1) \leqslant 2jn \iff -(2n+1) + j \leqslant 0 \quad [j \leqslant n]. $$ Thus $(1/n)\sum_1^n f(2j/(2n+1))$ is a Riemann sum w.r.t. to the partition $\{0, 1/n, 2/n, \ldots, 1\}$. Then $$ \lim s_{2n+1} =\lim \frac 1{2n+1} \sum_1^{2n+1} f \left( \frac j {2n+1}\right) - \lim \frac {2n}{2n+1} \cdot \lim \frac 1n \sum_1^n f\left( \frac {2j}{2n+1}\right) = \int_0^1 f - \int_0^1 f = 0. $$ Therefore $s_n$ is a sequence that $\lim s_{2n} = \lim s_{2n+1} = 0$. Conclusively, $L = 0$. $\blacktriangleright$

Seems that $f \in \mathcal R [0,1]$ might be sufficient.

xbh
  • 8,835
  • I don't think that this is related to the problem. In the post, there is a continuous function on a bounded, closed interval, which is very important. The result is $0$ because of a general principal. You showed an interesting, concrete summation, but it is irrelevant here. – A. Pongrácz Aug 18 '18 at 07:58
  • @A.Pongrácz Thanks for your criticism. My point is to use similar operations to get rid of the factor $(-1)^k$ then $L$ could be computed by difference of two Riemann Sums. If this is still not convincing, then I would delete it. – xbh Aug 18 '18 at 08:03
  • I see what you mean now. But I still think this approach could only work in a very restricted setup, and in case of the problem posted, there is a clear general principle that solves the problem for all continuous functions. So what you suggested is a nice idea, and it could be useful in another problem, but nit this one. – A. Pongrácz Aug 18 '18 at 08:04
  • +1 for the updated version. And yes Riemann integrability of $f$ is sufficient as your proof clearly does not make use of any other assumption. – Paramanand Singh Aug 18 '18 at 18:56
2

If $f$ is continuous on $[0,1]$ it is uniformly continuous; for any $n\geq 1$ let $$\Delta_n = \sup_{\substack{x,y\in[0,1]\\|x-y|\leq \frac{1}{n}}}\left|f(x)-f(y)\right|$$ and $M=\sup_{x\in[0,1]}\left|f(x)\right|$. By the triangle inequality $$ \left|\sum_{k=1}^{n}(-1)^k f\left(\tfrac{k}{n}\right)\right| \leq M + \frac{n}{2}\Delta_n $$ and since $\Delta_n \to 0$ as $n\to +\infty$, the wanted limit is zero.

Jack D'Aurizio
  • 353,855