Suppose that a real-valued function $f$ is defined on an open set $U \subset \mathbb R^n$ and that all the first-order partial derivatives of $f$ exist at every point in $U$. Also, there exists a constant $M>0$ such that $||\nabla f(x)|| \leq M$ for all $x \in U$. Prove that $f$ is continuous on $U$.
This is the variation of Theorem 9.19 in Rudin's PMA. For the proof, I just mimicked the proof of Theorem 9.19 in PMA as follows:
Fix $x_0 \in U$. Then there is $\epsilon>0$ such that $B(x_0,\epsilon)\subset U$. Fix $x \in B(x_0,\epsilon)$ and define $\gamma(t)=(1-t)x_0+tx$ for $ 0 \leq t\leq 1$, then every point of $\gamma$ is in the ball because the ball is convex. Now let $g(t)=f(\gamma(t))$.
Then, I'd like to say that $g'(t)=\nabla f'(\gamma(t)) \bullet \gamma'(t)$, where $\bullet$ means the usual dot product in $\mathbb R^n$.
However, I wonder if I can write this way because the differentiability of $f$ is not guaranteed even if the first-order partial derivatives always exist.
Does anyone have any ideas to modify the solution, or justify my reasoning? Is there any error to this problem?
You can't quite. However you can take a path there which is made up of piecewise lines, each parallel to a partial derivative. And along each of those paths it is differentiable.
And now your argument works perfectly.