# Using the Mean Value Theorem to Evaluate an Integral of a Sequence of Functions?

The following statement should be true, I think, but I'm having a hell of a time trying to prove it:

Let $f_n$ be a $C^1$ function on $[0,a]$, satisfying $f_n = 1$ on $[1/n,a]$ and $0\le f_n \le 1$ and $f_n(0)=0$. Let $\phi$ be a continuous function on $[0,a].$

I want to say that

$\lim_{n\to\infty} \int_0^a f_n'(x) \phi(x) dx = \phi(0)$.

If $\phi$ is $C^1$, I can just do integration by parts to prove this. But I'm not sure what to do if $\phi$ is just continuous.

This is what I have so far. Using the mean value theorem, we have

$\int_0^a f_n'(x)\phi(x) dx = \int_0^{1/n} f_n'(x)\phi(x) dx= \frac{1}{n}f_n'(c_n) \phi(c_n)$

where $0<c_n<1/n$.

I think I need to use the mean value theorem on $f_n$ and continuity of $f_n'$ to show that $\frac{1}{n}f_n'(c_n)$ goes to 1 as $n\to\infty$, but I can't seem to figure out how to do this... can someone throw me a hint?

-
Although I prefer "helluva", (+1) for the first line :) – The Chaz 2.0 Jul 28 '11 at 17:50
There must be something missing here. $f_n\equiv1$ satisfies the conditions, and in that case the integral vanishes, independent of $\phi$. (Also the limit doesn't say what limit is being taken -- presumably $n\to\infty$?) – joriki Jul 28 '11 at 17:50
@joriki - Yeah, I forgot $f_n(0)=0$. – Braindead Jul 28 '11 at 17:56
@joriki - Yeah, I also forgot $n\to\infty$ :p – Braindead Jul 28 '11 at 17:58
@The Chaz - No wonder... I was trying to prove something that was false :S – Braindead Jul 28 '11 at 23:00

For a concrete counterexample, consider the following.

Define $f_n$ on $[0,1/n]$ by $$f_n (x) = \cos ^2 \bigg(\frac{\pi }{x}\bigg), \;\; x \in [\alpha_n,1/n],$$ and $$f_n (x) = 0, \;\; x \in [0,\alpha_n],$$ where $\alpha_n$ is very small compared to $1/n$, and $f_n(\alpha_n)=0$. Note that thus $0 \leq f_n \leq 1$, $f_n (0) = 0$, and $f_n (1/n) = 1$, as required. Then, restricted to the interval $[\alpha_n,1/n]$, $$f'_n (x) = 2\cos \bigg(\frac{\pi }{x}\bigg)\sin \bigg(\frac{\pi }{x}\bigg)\frac{\pi }{{x^2 }} = \sin \bigg(\frac{{2\pi }}{x}\bigg)\frac{\pi }{{x^2 }},$$ and, restricted to the interval $[0,\alpha_n]$, $$f'_n (x) = 0.$$ Note that the issue of smoothness of $f_n$ and $f'_n$ at the endpoints $\alpha_n$ and $1/n$ plays no role for our purposes. Now, define $\phi$ by $$\phi(x) = x\sin \bigg(\frac{{2\pi }}{x}\bigg) ,\;\; x \in (0,a],$$ and $$\phi(0) = 0.$$ Note that thus $\phi$ is continuous on $[0,a]$. Now, $$\int_0^{1/n} {f'_n (x)\phi (x)\,dx} = \int_{\alpha _n }^{1/n} {f'_n (x)\phi (x)\,dx} = \pi \int_{\alpha _n }^{1/n} {\frac{{\sin ^2 (\frac{{2\pi }}{x})}}{x} \,dx} .$$ A change of variable $x \mapsto 1/x$ then gives $$\int_0^{1/n} {f'_n (x)\phi (x)\,dx} = \pi \int_n^{1/\alpha _n } {\frac{{\sin ^2 (2\pi x)}}{x}\,dx} .$$ The right-hand side tends to $\infty$ if, for example, $1/\alpha_n > n^2$; then, in particular, $$\int_0^{1/n} {f'_n (x)\phi (x)\,dx} \not \to \phi (0).$$

EDIT: Particular choice of $\alpha_n$ is not essential here. This follows from the fact that, given any $M > 0$, $\int_M^x {\frac{{\sin ^2 (t)}}{t}\,dt} \to \infty$ as $x \to \infty$.

EDIT 2: In fact, $f_n \in C^1 [0,a]$. To show this, it suffices to show that $\lim _{x \downarrow \alpha _n } f'_n (x) = 0$ and $\lim _{x \uparrow 1/n} f'_n (x) = 0$ (this would imply that $f'_n (\alpha_n) = 0$ and $f'_n(1/n)=0$); indeed, $$\mathop {\lim }\limits_{x \downarrow \alpha _n } f'_n (x) = f'_n (\alpha _n + ) = 2\cos \bigg(\frac{\pi }{{\alpha _n }}\bigg)\sin \bigg(\frac{\pi }{{\alpha _n }}\bigg)\frac{\pi }{{\alpha _n^2 }} = 0$$ (since, by definition, $\cos ^2 (\frac{\pi }{{\alpha _n }}) = f_n (\alpha_n) = 0$) and $$\mathop {\lim }\limits_{x \uparrow 1/n } f'_n (x) = f'_n \bigg(\frac{1}{n} - \bigg) = 2\cos \bigg(\frac{\pi }{{1/n }}\bigg)\sin \bigg(\frac{\pi }{{1/n }}\bigg)\frac{\pi }{{1/n^2 }} = 0$$ (since $\sin(n \pi)=0$).

-
I put the integral into mathematica with $\alpha_n = 2/(2(n+k)+1)$, set $n>0$ integer, $k\ge0$ integer, and then took the limit as $n\to\infty$, and I got 0... – Braindead Jul 28 '11 at 22:38
Nice; this is the kind of example I was thinking of. – joriki Jul 28 '11 at 22:40
@Braindead: Yes, that doesn't satisfy $1/\alpha_n > n^2$. – joriki Jul 28 '11 at 22:40
@joriki: Indeed! I skipped an important part. – Braindead Jul 28 '11 at 22:48

If $\phi$ is not of bounded variation (and thus not $C^1$), this may not hold. If $f_n$ is monotonic, you can directly use the continuity of $\phi$:

$$\begin{eqnarray} \lim_{n\to\infty}\left|\int_0^af_n'(x)\phi(x)\mathrm dx-\phi(0)\right| &=& \lim_{n\to\infty}\left|\int_0^{1/n}f_n'(x)\phi(x)\mathrm dx-\phi(0)\right| \\ &=& \lim_{n\to\infty}\left|\int_0^{1/n}f_n'(x)\phi(x)\mathrm dx-\int_0^{1/n}f_n'(x)\phi(0)\mathrm dx\right| \\ &=& \lim_{n\to\infty}\left|\int_0^{1/n}f_n'(x)(\phi(x)-\phi(0))\mathrm dx\right| \\ &\le& \lim_{n\to\infty}\int_0^{1/n}\left|f_n'(x)\right|\left|\phi(x)-\phi(0)\right|\mathrm dx \\ &\le& \lim_{n\to\infty}\int_0^{1/n}\left|f_n'(x)\right|\epsilon(n)\mathrm dx \\ &=& \lim_{n\to\infty}\int_0^{1/n}f_n'(x)\epsilon(n)\mathrm dx \\ &=& \lim_{n\to\infty}\epsilon(n) \\ &=& 0\;. \end{eqnarray}$$

However, if $f_n$ is not monotonic and $\phi$ is not of bounded variation, you can let $f_n$ oscillate enough in sync with oscillations in $\phi$ that the limit may not exist.

-
Tell me what is wrong with the following argument for $\phi$ being C^1: $\int_0^{1/n} f'_n(x)\phi(x) = f_n(x)\phi(x)|_0^{1/n} - \int_0^{1/n} f_n(x) \phi'(x)dx$. Letting $n\to\infty$, the rhs goes to $\phi(0)$. – Braindead Jul 28 '11 at 19:14
@Braindead: Sorry, you're right; I had forgotten to take into account $0\le f_n\le1$. – joriki Jul 28 '11 at 22:04

Your argument for $C^1$ $\phi$ is fine. In fact it can be extended to work for continuous bounded variation $\phi$ if you know a bit about the Riemann-Stieltjes integral since this has a more powerful integration by parts available (not requiring the functions to be differentiable). Specifically:

$$\int_0^{1/n} \phi f_n'dx = \int_0^{1/n} \phi df_n = f_n(1/n)\phi(1/n) - f_n(0)\phi(0) - \int_0^{1/n} f_n d \phi = \phi(1/n) - \int_0^{1/n} f_n d \phi$$

Clearly $\phi(1/n) \to \phi (0)$. The last integral is bounded in magnitude by $F_n \cdot V_0^{1/n} \phi$ where $F_n = \max_{x \in [0,1/n]} f_n(x)$ and $V_0^{1/n} \phi$ is the total variation of $\phi$ on $[0,1/n]$. Assuming $\phi$ is bounded variation on $[0,\epsilon)$ for some $\epsilon >0$, both of these quantities go to zero as $n \to \infty$ so we are done.

Added: The example I originally gave to demonstrate that this can fail for non-BV $\phi$ was wrong. Here is another one. Let $\phi(x) = x \sin(X)$ for $x \neq 0$ and let $\phi(0) = 0$. Joriki's idea is the right one. Any of the integrals $\int_0^{1/n} f_n' \phi$ can be made as large as desired by making $f_n'$ oscillate in tandem with $\phi$. Fix some $n$ and choose $p \in (0,1/n)$ such that $\phi(p) = 0$. We put $f_n'(x) = A \phi^+ - B \phi^-$ if $x \in [0,p]$ and $f_n'(x) = 0$ for $x \geq p$. Here $\phi^+,\phi^-$ are the positive and negative parts of $\phi$ defined by $\phi = \phi^+ - \phi^-$ and $|\phi| = \phi^+ + \phi^-$. $A,B$ are positive constants chosen so that $f_n(x) = \int_0^x f_n'$ has $f_n(1) =1$. The thing to notice is that $A,B$ can be chosen arbitrarily large subject to this constraint and that this means

$$\int_0^{1/n} f_n' \phi = A \int_0^p (\phi^+)^2 + B \int_0^p (\phi^-)^2$$

can also be made arbitrarily large.

-
@Theo: I was assuming continuity yes. I'll make that more clear. – Mike F Jul 28 '11 at 20:05
To have $f_n(1/n) = 1$, you need an extra factor of $n$. – Braindead Jul 28 '11 at 20:11
I think you can show that the integral in the example you gave is less than 2/n. – Braindead Jul 28 '11 at 20:17
@Braindead: Yeah I came to a similar conclusion. It doesn't work. I'll take it out for now. – Mike F Jul 28 '11 at 20:20
@Braindead: Okay I added a new example. – Mike F Jul 28 '11 at 21:30