Student claims $\lim_{x \to 0^+} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} = \lim_{h \to 0} \lim_{x \to 0^+} \frac{f(x+h)-f(x)}{h}$. Is it justified? I am a tutor of an introductory calculus course in our college of engineering. The students are first year engineering undergraduates. We had a quiz where the following question was asked :

Let $f : [0,1] \to \Bbb R$ be continuous on $[0,1]$ and differentiable on $(0,1)$. If $\lim_{x \to 0^+} f'(x)=L$ for some real number $L$, then show that $f'(0)$ exists and $f'(0)=L$

The students had been taught Lagrange's mean value theorem prior to that. So it was expected that they will use it. However, some students have written the following answer:

$L=\lim_{x \to 0^+} f'(x)= \lim_{x \to 0^+}  \lim_{h \to 0} \frac {f(x+h)-f(x)}{h} = \lim_{h \to 0} \lim_{x \to 0^+} \frac {f(x+h)-f(x)}{h} = \lim_{h \to 0} \frac {f(h)-f(0)}{h}.$
This implies that $\lim_{h \to 0} \frac {f(h)-f(0)}{h}$ exists hence $f'(0)$ exists and equals $L$.

In this, they have not provided any justification for exchanging the limits. I am not able to find any justification for that step nor I am able to counter it. Can someone throw some light on this? Thanks in advance.
 A: The second "$=$" in the students' answers is an invalid assumption. Interchanging the order (e.g of $h$ and $x$ ) in the limits often fails to preserve values. To justify a change of order requires additional work.
Suppose we were not given that $\lim_{x\to 0}f'(x)$ exists. Read the students' answer in reverse order. The reversal of the order of limits would then seem to imply that $f'$ is continuous at $0$ merely from $f$ being differentiable, which is a false conclusion. 
So ask them: How & where did you use the existence of $\lim_{x\to 0^+}f'(x)$ to justify the reversal?  The correct answer is "Nowhere".
A: Blindly interchanging the limits without any justifications cannot not be accepted as a valid answer. Here is a valid proof: For any $x>0$ there exits $\xi_x \in (0,x)$ such that $\frac {f(x)-f(0)} x =f'(\xi_x)$. If $\epsilon >0$ and $\delta$ is chosen such that $|f'(y)-L| <\epsilon$ for $0 <y <\delta$ then we get $|\frac {f(x)-f(0)} x-L| <\epsilon$ whenever $0 <x <\delta$ and this proves that $f'(0)=L$. 
A: @glowstonetrees say in their answer

Perhaps it's true that
  $$
\lim_{x \to 0^+} \lim_{h \to 0} g(x,h) = \lim_{h \to 0} \lim_{x \to 0^+} g(x,h)
$$
  if $g(x,h)$ takes the form $g(x,h) = \frac{f(x+h) - f(x)}{h}$, . . .

I will show that even this need not be the case in general. Let $f \colon [0,1] \to \mathbb{R}$ be the function defined by
$$
f(x) = 
\begin{cases}
0, &x = 0;\\
x^2 \sin(1/x), &x \neq 0.
\end{cases}
$$
Then, on the one hand we have
$$
\lim_{h \to 0^+} \lim_{x \to 0^+} \frac{f(x+h)-f(x)}{h}
= \lim_{h \to 0^+} \frac{f(h)-f(0)}{h}
=f'(0)
= 0.
$$
On the other hand, we have
$$
\lim_{x \to 0^+} \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} = \lim_{x \to 0^+} f'(x) = \lim_{x \to 0^+} 2x \sin(1/x) - \cos(1/x),
$$
which does not exist.
So, the interchange of the two limits cannot be done simply by knowing that $g(x,h)$ is of the form $\frac{f(x+h) - f(x)}{h}$.
A: I don't know if this truly counts as a counterexample to what you have, but it is a fact that you can't always exchange the order of two limits. Consider for example
$$f(x,y) = \frac{x-y}{x+y}$$
On one hand, we have
$$\lim_{x\rightarrow 0}\lim_{y\rightarrow 0} f(x,y) = \lim_{x\rightarrow 0} \frac xx = 1$$
But on the other hand,
$$\lim_{y\rightarrow 0}\lim_{x\rightarrow 0} f(x,y) = \lim_{y\rightarrow 0} \frac {-y}{y} = -1$$
so at least it's not true in the general case. Perhaps it's true that
$$\lim_{x \to 0^+}  \lim_{h \to 0} g(x,h) = \lim_{h \to 0} \lim_{x \to 0^+} g(x,h)$$
if $g(x,h)$ takes the form $g(x,h) = \frac{f(x+h)-f(x)}{h}$, but simply saying that "the order of limits can be exchanged" is certainly not good enough justification. 
