TITLE: Is it true that a multivariate function is differentiable if it's components are?
QUESTION [6 upvotes]: For example, if I had $f : \mathbb{R}^n \to \mathbb{R} = x_1^2 + x_2^2 + ... + x_n^2$, would it follow that $f$ is differentiable from the fact that $g: \mathbb{R} \to \mathbb{R} = x^2$ is differentiable? Why?

REPLY [3 votes]: Note in the special case $f(x_1, x_2,...,x_n) = \sum_{i} f_i(x_i)$ for some differentiable $f_i:\mathbb{R} \to \mathbb{R}$, it is indeed true that the differentiability of $f$ follows from the differentiability of each $f_i$. Hence in your particular case, you're fine.
However, in the general case, you cannot say anything about the differentiability of a function $f:\mathbb{R}^n \to \mathbb{R}$ just because its "component functions" seem differentiable. It's possible to have functions such that, fixing any $n-1$ variables except say the $k$-th variable, the univariate function $g(x)=f(x_1, x_2, \cdots , \overbrace{x}^{k\text{th  index}}, \cdots, x_n)$ is always differentiable as a function $g:\mathbb{R} \to \mathbb{R}$, but $f$ still fails to be differentiable as a function $f:\mathbb{R}^n \to \mathbb{R}$. In other words, the existence of the partial derivatives does not imply differentiability.