# Is $g$ is differentiable?

Let $f:\Bbb R\to \Bbb R$ be a differentiable function. Define $g:\Bbb R^2\to \Bbb R$ as $g(x,y) =f(\sqrt {x^2+y^2})$.

Is $g$ differentiable?

If we can show that one of the partial derivatives exist and the other is continuous then by sufficient condition of differentiability we have $g$ differentiable.

Let $u(x,y)=x^2+y^2$ ;$g(x,y)=f(u)$

then $g_x=\dfrac{\partial g}{\partial x}=\dfrac{\partial g}{\partial u}\dfrac{\partial u}{\partial x}=f_u\times 2x$ which is continuous since $f$ is differentiable and hence the partialderivatives are continuous.

Also $g_y=\dfrac{\partial g}{\partial y}=\dfrac{\partial g}{\partial u}\dfrac{\partial u}{\partial y}=f_u\times 2y$ which is continuous since $f$ is differentiable and hence the partial derivatives are continuous.

Thus $g$ is differentiable.

Can anyone please check my solution and comment on it? It will be highly helpful.

• Wouldn't you write $g(x, y)=f(\sqrt{u})$? – Kevin Jan 22 '16 at 12:30
• Take $f(x)=x$ and $g(x,y)=\sqrt{x^2+y^2}=\|(x,y)\|$, then $g$ is not differentiable at $0$ whereas $f$ is differentiable. – Surb Jan 22 '16 at 12:33

First: the premise is that $f$ is differentiable, you're using that it's continuously derivable which is not true. For example you have $f(x) = x^2\sin(1/x)$ except $f(0)=0$ that's differentiable, but not having continuous derivate at $0$.

Second: the derivatives of $u(x,y)$ are $u'_x(x,y) = x/\sqrt{x^2+y^2}$ and $u'_y(x,y) = y/\sqrt{x^2+y^2}$, this is important because that makes the derivative undefined when $x=y=0$.

Third: "If we can show that one of the partial derivatives exist and the other is continuous then by sufficient condition of differentiability we have $g$ differentiable.", that's not enough even if you don't rely on this in the rest of the proof.

Instead you could use differentiability directly:

Since $h(x,y)=\sqrt{x^2+y^2}$ is differentiable (when $x$, and $y$ are not both zero) you have that $g(x,y) = (f\circ h)(x,y)$ is.

To see that $h(x,y)$ is differentiable you observe that it's continuously derivable which implies differentiability.

To see that composition of differentiable functions are differentiable you use the linear approximations. For example if $\phi$ and $\psi$ are differentiable you have that $$\phi(\psi(a+h)) = \phi\left(\psi(a) + \psi'(a)h + o(h)\right) = \phi(\psi(a)) + \phi'(\psi(a))\psi'(a)h + \phi'(\psi(a))o(h) + o(h)$$

But since $\phi'(\psi(a))o(h)$ is itself o(h) you have that:

$$\phi(\psi(a+h)) = \phi(\psi(a)) + \phi'(\psi(a))\psi'(a)h + o(h)$$

that is $\phi\circ\psi$ is differentiable.

• You did not say whether my approach is right or not – Learnmore Jan 22 '16 at 13:44
• @Amartya..a Skyking pointed out,"your approach has some issues". – Nitin Uniyal Oct 31 '16 at 3:47