2

The task is to show the following limit exists, and then compute it. Here, $\,\mathrm{f}:\left[0,1\right] \to \mathbb{R}$ is a continuously differentiable function. $$ \lim_{n \to \infty}\left\{n\left[% \sum_{k = 0}^{n}\,\mathrm{f}\left(k \over n\right) - n\int_{0}^{1}\,\mathrm{f}\left(x\right)\,\mathrm{d}x\right]\right\} $$ It seems so innocent, it should be easy for me at this point$\ldots$ Could anyone provide some direction or intuition on how to approach such problems ?. Specific hints would be helpful as well.

EDIT: The comments below discuss why this limit does not exist in general as written. Perhaps this problem $\left(~\mbox{found on a qualifying exam}~\right)$ had a typo.

Felix Marin
  • 89,464
Merkh
  • 3,630
  • The sum looks like a riemann sum doesn't it =D – Martin Jul 13 '16 at 18:30
  • The assertion is not true if $f(x) =x$ So many $n$'s and too little $\frac 1n$ –  Jul 13 '16 at 18:34
  • @Matrin, Yes it does, which is why I am a little flustered about not being able to show the limit exists. – Merkh Jul 13 '16 at 18:34
  • @Arctic Char, I got this question off a qualifier.. usually they don't make such mistakes. Could you give a short proof as to why you think $f(x) = x$ doesnt work? – Merkh Jul 13 '16 at 18:36
  • @Merkh it's just a direct computation. –  Jul 13 '16 at 18:37
  • Yes, it equals $n (1/n + 2/n + 3/n + \cdots + 1) - n^2 = (n(n-1))/2 - n$, and this diverges, I see. – Merkh Jul 13 '16 at 18:38
  • I should say that the limit would be infinite. –  Jul 13 '16 at 18:39
  • Just an observation: Recall that$$\frac{1}{n}\sum_{k=1}^nf\left(\frac{k}{n}\right)$$gives the right-endpoint Riemann sum, so$$\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^n f\left(\frac{k}{n}\right)=\int_0^1f(x),\mathrm{d}x$$Suppose we rewrite the original limit as$$\lim_{n\to\infty}n\left(\sum_{k=0}^n f\left(\frac{k}{n}\right)-n\int_0^1f(x),\mathrm{d}x\right)=\lim_{n\to\infty}n^2\left(\frac{f(0)}{n}+\sum_{k=1}^n\frac{1}{n}f\left(\frac{k}{n}\right)-\int_0^1f(x),\mathrm{d}x\right)$$Maybe there's something you can do with this? – user170231 Jul 13 '16 at 18:40
  • Good catch! Interesting though, because this comes from a qualifying exam. Under what conditions might this limit be finite then? – Merkh Jul 13 '16 at 18:40
  • 3
    @Merkh If $f(x)=x$, then $$\sum_{k=0}^n f(\frac{k}{n})=\sum_{k=0}^n \frac{k}{n}=\frac{1}{n} \cdot \frac{n(n+1)}{2}=\frac{n+1}{2}$$ while the integral is $\frac{n}{2}$ – JasonM Jul 13 '16 at 18:40
  • May be there shouldn't be an $n$? –  Jul 13 '16 at 18:41
  • 1
    @user170231 I see what you did. Perhaps there was a typo on last year's test, maybe it should be a $n^{-1}$. Thanks everybody for the helpful comments – Merkh Jul 13 '16 at 18:42
  • @Merkh See my answer and comment as to why you can't say the limit in infinite for all functions. It will depend on the derivative of the function – MathIsKey Jul 13 '16 at 18:51
  • You need to make some assumption on $f(x)$ and make some changes to the formula. If $f(x)$ is $C^2$, i.e. twice continuous differentiable, then

    $$\lim_{n\to\infty} n\left[\sum_{k=0}^{n-1}\frac12\left(f\left(\frac{k}{n}\right)+f\left(\frac{k+1}{n}\right)\right) - n\int_0^1 f(x)dx\right] = \frac{1}{12}\left(f'(1)-f'(0)\right) $$ This is essentially Euler Maclaurin formula of approximating the integral over $[0,1]$.

    – achille hui Jul 13 '16 at 19:28
  • @achillehui I don't believe that this result is correct. As JasonM illuminated in a previous comment, if $f(x)=x$, then the limit is $\infty$. – Mark Viola Jul 13 '16 at 19:43
  • 1
    @Dr.MV that's what I say the sum need to change, the new sum I refer to is $\sum_{k=0}^{\color{red}{n-1}} \frac12(f(k/n)+f((k+1)/n)$, it differs from the original sum $\sum_{k=0}^n f(k/n)$ by $\frac12(f(0)+f(1))$ which cause the divergence. – achille hui Jul 13 '16 at 19:54
  • @achillehui Yes, I understand. Perhaps, you would consider expanding the comment into a full answer. I believe that the EMSF is an extremely powerful gem and not readily taught. – Mark Viola Jul 13 '16 at 20:24
  • 1
    Sometimes ago, I considered some problem similar to this one. It's over here ===> http://math.stackexchange.com/a/1824025/85343 – Felix Marin Jul 14 '16 at 04:26
  • Another question about the same limit: Limit of a Riemann Sum and Integral. – Martin Sleziak Dec 18 '21 at 12:05

2 Answers2

5

We will make some extra assumption on $f(x)$ and shows that under such assumption, the limit diverges unless $f(0)+f(1) = 0$.

Let $f : [0,1] \to \mathbb{R}$ be any $C^2$ function on $[0,1]$, i.e. twice differentiable and the $2^{nd}$ derivative $f''(x)$ is continuous. For any $0 \le a < b \le 1$, let $h = b - a$ and consider following integral

$$\mathcal{I} \stackrel{def}{=} \int_a^b f''(x) (x-a)(b-x) dx$$ Integrate by parts, it is easy to see

$$\begin{align} \mathcal{I} &= \int_a^b (x-a)(b-x) df'(x) = \left[(x-a)(b-x)f'(x)\right]_a^b - \int_a^b f'(x)(a+b - 2x) dx\\ &= \int_a^b (2x - (a+b)) df(x) = \left[(2x-(a+b))f(x)\right]_a^b - 2\int_a^b f(x) dx\\ &= h(f(a)+f(b)) - 2\int_a^b f(x)dx \end{align} $$ Notice the factor $(x-a)(b-x)$ is non-negative on $[a,b]$ with $\displaystyle\;\int_a^b (x-a)(b-x) dx = \frac{h^3}{6}\;$.
If $M$ and $m$ is the maximum and mimumum of $f''(x)$ over $[a,b]$, we have following bound for $\mathcal{I}$.

$$m\frac{h^3}{6} \le \mathcal{I} \le M\frac{h^3}{6}$$

Since $f''(x)$ is continuous over $[a,b]$, by IVT, there exists an $c \in (a,b)$ such that $$\mathcal{I} = f''(c)\frac{h^3}{6}$$

Now for any fixed $n > 1$, sub divide $[0,1]$ into $n$ subintervals $[a_k,b_k] = \left[\frac{k}{n},\frac{k+1}{n}\right]$ for $0 \le k < n$. Apply result above, we find there are $c_k \in [a_k,b_k]$ such that

$$\frac{1}{12n^3} f''(c_k) = \frac{1}{2n}\left(f(a_k)+f(b_k)\right) - \int_{a_k}^{b_k} f(x)dx$$ Summing over $k$ give us

$$n\left\{ \sum_{k=0}^{n-1} \frac12\left[ f\left(\frac{k}{n}\right) +f\left(\frac{k+1}{n}\right) \right] - n\int_0^1 f(x)dx \right\} = \frac{1}{12n}\sum_{k=0}^{n-1}f''(c_k)$$

The RHS has the form of a Riemann sum over $f''(x)$. This means as $n \to \infty$, the limit of LHS exists and equals to $$\lim_{n\to\infty} n\left\{ \sum_{k=0}^{n-1} \frac12\left[ f\left(\frac{k}{n}\right) +f\left(\frac{k+1}{n}\right) \right] - n\int_0^1 f(x)dx \right\}\\ = \frac{1}{12} \int_0^1 f''(x)dx = \frac{1}{12} (f'(1)-f'(0))\tag{*1} $$ Compare this with the sequence in question, we find

$$n\left\{\sum_{k=0}^n f\left(\frac{k}{n}\right) - n\int_0^1 f(x)dx\right\} = \frac{n}{2}(f(0)+f(1)) + \frac{1}{12}(f'(1)-f'(0)) + o(1) $$ From this, we find unless $f(0)+f(1) = 0$, the sequence at hand contains a term proportional to $n$ and diverges in general. If $f(0)+f(1) = 0$, the limit do exists and equals to $\frac{1}{12}(f'(1) - f'(0))$.

As mentioned in comment, this is essentially Euler Maclaurin formula of approximating the integral over $[0,1]$.

As a side note, I think the condition $f$ is $C^2$ can be relaxed. However, I don't know the exact condition for $(*1)$ to be true. $C^2$ is simply the condition one can prove what one need directly.

achille hui
  • 122,701
  • A rough order-1 computation seems to give that the first order of $\int_0^1 f(x) - \frac 1n \sum_{k=0}^{n-1} f\left(\frac kn\right)$ is $\frac{f(1)-f(0)}{2n}$, which would mean that the right condition is $f(1) \mathbf{-} f(0) = 0$. You can see that with $f(x) = 2x-1$: the symmetry around $1/2$ makes almost every term in the sum cancel, to give $\frac{1}{2n}\sum_{k=0}^{2n-1} f\left(\frac kn\right) = \frac{f(0)}{2n} = \frac{-1}{2n}$ so we still get a $n^{-1}$ term, despite the fact that the function does satisfy $f(0) + f(1) = 0$. – PseudoNeo Jul 13 '16 at 23:42
  • 1
    @PseudoNeo the sum in question is $\sum_{k=0}^{\color{red}{n}}$, so $\int_0^1 f(x) - \frac1n\sum_{k=0}^n f\left(\frac{k}{n}\right) \approx \frac{f(1)-f(0)}{2n} - \frac{f(1)}{n} = -\frac{f(1)+f(0)}{2n}$. – achille hui Jul 13 '16 at 23:46
  • Ah, my bad. (I found the question with n-1 more interesting, so I mentally modified it; sorry about that!) – PseudoNeo Jul 13 '16 at 23:49
-2

Here is a start.

Factor out a $n$ from inside and rearrange things and you get the following

$\lim_{n \rightarrow \infty} \frac{ \frac{1}{n} \sum_{i=1}^n f(\frac{k}{n}) - \int_0^1 f(x) dx}{\frac{1}{n^2}} = \frac{0}{0}$

The top zero is because you have a Riemann approximation (the summation) which approaches exactly your integral. So from here we could do l'hospital's rule (you just have to be careful with doing derivatives of summations that depend on the variable)

MathIsKey
  • 375
  • You can't just say that the limit is infinity because $n^2 \rightarrow \infty$ because you have a competing quantity going to zero. You have to tease out the true answer using l'hospital's rule to figure out which one is faster. – MathIsKey Jul 13 '16 at 18:49
  • How exactly would one use L'hopital's rule? The numerator is not a well-defined function (of a real variable) –  Jul 13 '16 at 18:56
  • @AhmedHussein The numerator is a very well defined function of $n$. Are you asking how to deal with points that aren't differentiable? That is the tricky part but since we are dealing with limits it makes things much easier. – MathIsKey Jul 13 '16 at 19:16
  • I am just wondering: to differentiate, you would assume that the numerator is differentiable function of a real variable (i.e. $n \in \Bbb R$). How would one interpret "$\sum_{k=1}^x$", when $x \in \Bbb R \setminus \Bbb N$? –  Jul 13 '16 at 19:21
  • @AhmedHussein You can see link and link for some examples – MathIsKey Jul 13 '16 at 19:28