Let $f:\mathbb R^n\longrightarrow \mathbb R$ and $a\in\mathbb R^n$ s.t. $\nabla f(a)$ exist.
I know that for a function $g:\mathbb R\longrightarrow \mathbb R$, it suffice that $g'(a)$ exist to have that $g$ is differentiable in $a$. Indeed, $$\lim_{h\to 0}\frac{g(a+h)-g(a)-g'(a)h}{h}=\lim_{h\to 0}\left(\frac{g(a+h)-g(a)}{h}-g'(a)\right)=0$$ since $$\lim_{h\to 0}\frac{g(a+h)-g(a)}{h}=g'(a).$$ Now I was wondering why in $\mathbb R^n$ the continuity of the gradient is requiert. So I try to compute :
$$\lim_{h\to 0}\frac{f(a+h)-f(a)-\nabla f(a)\cdot h}{\|h\|},$$ but I don't see in what the fact that $\nabla f$ is continuous at $a$ is necessary to conclude that the limit above is $0$. I mean, when we do the calculation, when do we need the fact that $\nabla f$ is continuous at $a$ ?