Order of limits of difference quotient Let $f$ be a uniformly continuous real function, and let $a$ be a real number. Assume that $f'$ is also uniformly continuous. I need to prove this:
$$\lim_{x_1\rightarrow a}\lim_{x_2\rightarrow x_1}\frac{f(x_1)-f(x_2)}{x_1-x_2}
=\lim_{x_2\rightarrow a}\lim_{x_1\rightarrow a}\frac{f(x_1)-f(x_2)}{x_1-x_2}$$
Intuitively, the equation just says that the derivative of $f$ at $a$ is equal to the limit of the derivatives of $f$ close to $a$, and is therefore clearly true. However, I need a proof that proceeds directly from the definitions of limits and uniform continuity (or "basic" theorems about limits and uniform continuity), and I don't know how to do that.
 A: By definition of the derivative, $$\lim_{x_2\rightarrow x_1}\frac{f(x_1)-f(x_2)}{x_1-x_2}=f'(x_1)$$ so $$\lim_{x_1\rightarrow a}\lim_{x_2\rightarrow x_1}\frac{f(x_1)-f(x_2)}{x_1-x_2}=\lim_{x_1\to a}f'(x_1).$$
On the other hand, if $x_2\neq a$ then $$\lim_{x_1\rightarrow a}\frac{f(x_1)-f(x_2)}{x_1-x_2}=\frac{f(a)-f(x_2)}{a-x_2}=\frac{f(x_2)-f(a)}{x_2-a}$$ since the function $g(x)=\frac{f(x)-f(x_2)}{x-x_2}$ is continuous at any point other than $x_2$ (since $f(x)$ is continuous).  Thus $$\lim_{x_2\rightarrow a}\lim_{x_1\rightarrow a}\frac{f(x_1)-f(x_2)}{x_1-x_2}=\lim_{x_2\rightarrow a}\frac{f(x_2)-f(a)}{x_2-a}=f'(a).$$
So the equation you wish to prove is just $$\lim_{x_1\to a}f'(x_1)=f'(a),$$ which follows from continuity of $f'$.
(For the record, the "basic theorems on continuity" used here are that if $f(x)$ is continuous at $a$ then $f(a)=\lim_{x\to a}f(x)$, a difference of continuous functions is continuous, and a quotient of continuous functions is continuous whenever the denominator is nonzero.  If you don't know any of these facts, I would suggest trying to prove them; I don't think there is any way to solve this problem without essentially using these facts in some form.)
