[Math] Proving that norm function is continuously differentiable

calculuscontinuityderivativesmultivariable-calculusreal-analysis

Let $B:=\mathbb{R}^n$. Consider the function $f:B\backslash\{0\} \to \mathbb{R}$ defined as $f(x)=\|x\|$. I want to prove that $f$ is continuously differentiable on $B$. One way is to use single-variable calculus and find the general partial derivative of $f$ on $B$ explicitly and then observe that it is continuous on $B$. But I decided to use the definition of the directional derivative and use $f^2(x)=\|x\|^2$ instead. This gives that $\partial_i f(x)=2x_i$ for $1\le i \le n$.

But does the fact that $f^2$ has a continuous partial derivative also imply that $f$ has it? The issue is that for $x=\vec{0}$, we can't observe the fact that $f$ has no continuous partial derivative at this point, but $f^2$ does have one.

I'd appreciate if someone could please clarify this matter for me.

Best Answer

Compositions of $C^\infty$ functions are $C^\infty.$ So if $U\subset \mathbb R^n$ is open, $g:U \to (0,\infty),$ and $g\in C^\infty(U),$ then $g^{1/2}\in C^\infty(U).$ This is because $t\to t^{1/2}$ is in $C^\infty((0,\infty)),$ which implies $g^{1/2}$ is the composition of two $C^\infty$ functions. For your particular case we would take $g(x) = |x|^2, U = \mathbb R^n \setminus \{0\}.$

Related Question