# Limit of derivatives of convex functions

Let $(f_n)_ {n\in\mathbb{N}}$ be a sequence of convex differentiable functions on $\mathbb{R}$.

Suppose that $f_n(x)\xrightarrow[n\to\infty]{}f(x)$ for all $x\in\mathbb{R}$.

Let $D:=\{x\in\mathbb{R}\,|\,f\text{ is differentiable in }x\}$. I read that $f_n'(x)\xrightarrow[n\to\infty]{}f'(x)$ for all $x\in D$.

Why is it true? How can I prove it?

Furthermore is it true that $f$ is a convex function? As consequence $\mathbb{R}\smallsetminus D$ would be at most countable.

Edit after did's comment: clearly $f$ is convex.

-
This is odd: the fact that a pointwise limit of convex functions is convex is several orders of magnitude easier to prove than the rest of the post. What did you try to prove this part? –  Did Dec 27 '12 at 15:20
I found the following statement in a Statistical Mechanics paper by Orlandini, Tesi, Whittigton: "$f_n(x)$ is a sequence of convex functions, differentiable for all $x$. Therefore, for every $x$ for which the limit of the sequence is differentiable, the sequence of derivatives converges to the derivative of the limit function." –  qwertyuio Dec 27 '12 at 15:27
Is this supposed to answer my previous comment? Here is another question for you: how do you check that a function is convex? This one you might want to answer... –  Did Dec 27 '12 at 15:50
I'm sorry, I didn't understand your previous question. To check that a function is convex I may use the definition, or (easier) I see if the derivative is increasing or if the second derivative is positive. –  qwertyuio Dec 27 '12 at 15:55
The approach using derivatives is doomed since not every convex function is differentiable. The point of my comment is that if only you write down what you call the definition, then the fact that the limit function is still convex becomes obvious. Which brings us back to my very first question: What did you try to prove this part? –  Did Dec 27 '12 at 15:58

Since $f$ is convex, there exist the left and right derivative $f'_{-},f'_{+}$ in every point.

For any $x\in\mathbb{R}$ and for any $\epsilon>0$ is possible to prove that there exists $N\in\mathbb{N}$ such that $$f'_{-}(x)-\epsilon < f_n'(x) < f'_{+}(x)+\epsilon$$ for all $n\geq N$. As a consequence if $x\in D$ then $f_n'(x)\xrightarrow[n\to\infty]{}f'(x)$.

How to prove it? First by definition of right derivative there exists $h>0$ such that $$\frac{f(x+h)-f(x)}{h} < f'_{+}(x) + \epsilon$$ Then since $f_n$ converges to $f$ there exists $N\in\mathbb{N}$ such that $$\frac{f_n(x+h)-f_n(x)}{h} < f'_{+}(x) + \epsilon$$ Now use the convexity and differentiability of $f_n$ to observe that $$f_n'(x)\leq\frac{f_n(x+h)-f_n(x)}{h}$$ Conclude $f_n'(x)<f'_{+}(x) + \epsilon$. A similar reasoning holds to prove the other inequality.

-