Question regarding differentiability of a composite function I am given that the function $f:\mathbb{R}→\mathbb{R}$ is differentiable and am tasked to show that $A: \mathbb{R^n}→\mathbb{R^n}$ with $A(x):=f(\vert\vert x\vert\vert_2)x$ is also differentiable. At first glance it looks to me like an easy question but I kind of doubt my answer is correct. I would argue one cound simply look at the coordinate functions $A_i$ which are obviously $f(\vert\vert x\vert\vert_2)x_i$. Now because $f$ is differentiable in the point $\vert\vert x\vert\vert_2$, and because $x_i$ is also differentiable we know that $A_i$ is the composition of two differentiable functions and therefore also differentable, would this be correct?
 A: It is allowed, but not necessary, to look at the $A_i$. We are given
$$A(x)=f\bigl(|x|\bigr)\>x\ .$$
Since $x\mapsto|x|:=\sqrt{x_1^2+x_2^2+\ldots+x_n^2}$ is differentiable at all points $x\ne0$ it follows from general principles about differentiability that $A$ is differentiable at all points $x\ne0$.
It remains to consider the point $x=0$. For small $|x|$ we have the approximation $$A(x)-A(0)=A(x)\doteq f(0)x\ .$$ This leads to  the  conjecture that in fact$$dA(0).X=f(0)X\qquad(X\in T_0)\ .$$ In order to prove this we look at
$$A(0+X)-A(0)-f(0)X=\bigl(f\bigl(|X|\bigr)-f(0)\bigr)\>X\ .$$
Here the right hand side is indeed $=o\bigl(|X|\bigr)$ when $X\to0$, since $f$ is continuous at $0$.
A: $A(x) = f(\| x\|) x = [B \circ (f \circ N, id)](x)$, where $N: \Bbb R^n \to \Bbb R$, $N(x) = \|x\|$ and $B: \Bbb R \times \Bbb R^n \to \Bbb R^n$, $B(\lambda, x) = \lambda x$. Let $\Omega = \Bbb R^n \setminus \{ 0\}$.
$N$ is differentiable on $\Omega$ and:
$$\nabla N (x) = \frac1{\|x\|} x$$
Hence $f \circ N$ is differentiable on $\Omega$ and:
$$\nabla (f \circ N)(x) = f'(N(x)) \nabla N(x) = f'(\|x\|) \nabla N(x)$$
$B$ is a bilinear continuous map (it is a bilinear map on a finite dimensional space); it is differentiable everywhere and:
$$DB(\lambda, x)(\theta, y) = B(\theta, x) + B(\lambda, y) = \theta x + \lambda y$$
Hence, $A$ is differentiable on $\Omega$ and for all $h \in \Bbb R^n$,
$$[DA(x)]h = DB(f(N(x)), x) (\nabla (f \circ N)(x) \cdot h, h) \\ = DB(f(\|x\|), x)(f'(\|x\|) \nabla N(x) \cdot h, h) \\ = \left[ \frac1{\|x \|} f'( \|x\|) (x \cdot h) \right] x + f(\|x\|) h$$
