# Proving $f(\lVert x\rVert)$ is differentiable in $\Bbb R^n$

Let $f: \Bbb R \to \Bbb R$ be an even, differentiable function, and let $F: \Bbb R^n \to \Bbb R$ be defined as follows: $F(x) = f(\lVert x\rVert)$ ,when $\lVert x\rVert = \sqrt{\sum_{i=1}^n x_i^2}$ .

Prove that $F$ is differentiable in $\Bbb R^n$.

What I tried: It's pretty easy to see that $F$ is differentiable in every $x \neq 0$. For $x = 0$ I got for the partial derivative of $x_1$:

$\frac{\partial F}{\partial x_1}=\lim_{h\to 0} \frac{F(h,...0)-F(0,..,0)}{h} = \lim_{h\to 0} \frac{f(|h|)-f(0)}{h}$ = $f'(0)$

When the last equality follows since $f$ is even. Next I want to show that $\frac{\partial F}{\partial x_1}$ is continuous in $0$, and then finish, but I couldn't prove it.

**Edit: since $f$ is even and differentiable, we also have $f'(0) = 0$. Still having trouble finishing the proof.

• what is your definition of differentiable for a function $F:\mathbb{R}^n \to \mathbb{R}^m$? – Nathanael Skrepek Aug 21 '17 at 19:03
• Differentiability in $x_0$: there exists a linear transformation $A: \Bbb R^m \to \Bbb R^n$ such that $F(x)=F(x_0)+A(x-x_0)+o(\lVert x-x_0\rVert)$ – user401516 Aug 21 '17 at 19:09
• in that case i am afraid you will need a different approach because $f'$ could be non continuous at $0$. – Nathanael Skrepek Aug 21 '17 at 19:13
• I have updated my answer. – Fimpellizieri Aug 21 '17 at 19:19

## 2 Answers

Using your argument, one can easily show that $\frac{\partial F}{\partial x_i}(0)=f'(0)$ for all $i$, so that

$$\nabla F(0)=(f'(0),f'(0),\dots,f'(0))=f'(0)\cdot (1,1,\dots,1).$$

Now, let $g(x)=\lVert x\rVert$. For $x\neq 0$, $g$ is differentiable and $g_i(x)=\frac{x_i}{\lVert x\rVert}$, which implies $\nabla g(x)=\frac{x}{\lVert x \rVert}$.

We may calculate $\nabla F(x)$ for $x\neq 0$ using the chain rule. Let $J$ stand for the Jacobian matrix of a function; for instance, $JF=\nabla F$ and $Jf=f'$ (and here we understand $f'$ as the linear transformation). Then:

\begin{align} \nabla F(x)=JF(x)=J\big[ f(g(x)) \big]&=Jf\big(g(x)\big)\cdot Jg(x) \\&=f'(g(x))\cdot \nabla g(x) \\&=f'(\lVert x \rVert)\cdot \frac{x}{\lVert x \rVert} \end{align}

Do we have $\nabla F(x) \to \nabla F(0)$ as $x \to 0$?

The computation above shows that there is something to be asked about the limit of

$$\frac{f'(\lVert x\rVert)}{\lVert x \rVert}\cdot x$$

as $x\to 0$. I was hoping this would hint towards the insight, but as others have pointed out, we have $f'(0)=0$. In particular, we have $\nabla F(0)=0$. Moreover, since $\frac{x}{\lVert x \rVert}$ is bounded, what can you conclude about $\nabla F(x)$ as $x\to 0$?

Let's try to show that $F$ is differentiable at $x=0$, using the definition. We need to show that there is some linear transformation $T:\mathbb{R}^n\longrightarrow\mathbb{R}$ such that

$$\lim_{\lVert h\rVert\to0}\frac{|F(h)-F(0)-Th|}{\lVert h\rVert}=0$$

The obvious candidate for $T$ is $\nabla F (0)=0$, the zero transformation. Do you think you can take it from here?

• That's actually the part I got in trouble... I think I'm missing something since I can't find a way to use the fact that $T = 0$. – user401516 Aug 21 '17 at 19:28
• Substitute into the expression. You'll get $$\lim_{\lVert h\rVert\to0}\frac{|f(\lVert h\rVert)-f(0)|}{\lVert h\rVert}.$$ Looks familiar? – Fimpellizieri Aug 21 '17 at 19:47
• But then, what if $T \neq 0$ ? shouldn't it still work? – user401516 Aug 21 '17 at 19:51
• You misunderstand the definition. There is only ever at most one $T$ that works. If there were no such $T$, then $F$ would not be differentiable at $x=0$. If there is such as $T$ (as is this case), then we say $F$ is differentiable at $x=0$ and its derivative at $x=0$ is $T$. The interpretation here is that $T$ is the best linear approximation to $F$ near $x=0$. – Fimpellizieri Aug 21 '17 at 19:56
• Maybe I wasn't clear in my question, suppose $f$ was an odd function. Where now does the proof fail? – user401516 Aug 21 '17 at 20:03

Since $f$ is even we know $f(-x) = f(x)$. This will be very useful when we regard the first derivative of $f$ at $0$. Since $f$ is differentiable everywhere $f'(0) = \lim_{x\to 0} \frac{f(x)-f(0)}{x}$ exists. So both the right and the left sided limes exists which leads to \begin{align} \lim_{x\to 0+} \frac{f(x)-f(0)}{x} &= f'(0) =\lim_{x\to 0-} \frac{f(x)-f(0)}{x} = \lim_{t\to 0+} \frac{f(-t)-f(0)}{-t} \\ &= -\lim_{t\to 0+} \frac{f(t)-f(0)}{t} . \end{align} Therefore $\lim_{x\to 0+} \frac{f(x)-f(0)}{x}$ must be $0$ and consequently $f'(0)=0$. This fact will be very useful to show differentiability of $F$ at $0$.

• Thanks. just realized it a minute before your comment, but still having trouble to finish the proof. – user401516 Aug 21 '17 at 18:55
• okay Fimpellizieri already posted how you can continue. – Nathanael Skrepek Aug 21 '17 at 19:26