# Multivariable calculus - Seeing if this function is differentiable at the origin

$$\begin{cases} \frac{\sin\left(\sqrt{ x^2+y^2}\right)}{\sqrt{x^2+y^2}} \space \space \text{ if } (x, y) \neq(0,0) \\1 \space \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space \text{ if } \space \space(x, y) = (0, 0) \end{cases}$$

I just had a test, my classmates had a different result than mine (function not being differentiable at the origin or partial derivatives not existing).

Now first I make sure that the function is continuous at the origin, by computing this limit

$$\lim\limits_{(x, y) \to (0, 0)} \frac{\sin\left(\sqrt{ x^2+y^2}\right)}{\sqrt{x^2+y^2}} = 1$$

Proving that it exists and that it's 1 is quite easy so I'll skip those steps, but since it's 1 the function is continuous at the origin. Now, I need to compute the partial derivatives at $$(0, 0)$$, so:

$$\frac{\partial f}{\partial x} = \lim\limits_{h \to 0} \frac{f(0+h, \space 0) - f(0, \space0)}{h} = \lim\limits_{h \to 0} \frac{\frac{\sin\left(\sqrt{h^2}\right)}{\sqrt{h^2}}-1}{h} = \lim\limits_{h \to 0} \frac{\frac{sin(h)}{h}-1}{h} = \lim\limits_{h \to 0} \frac{\frac{h}{h}-1}{h} = \lim\limits_{h \to 0} \frac{1-1}{h} = 0$$

$$\frac{\partial f}{\partial y} = 0$$ too, I'll skip the steps since it's basically the same.

Now that I have both partial derivatives (which are 0), I need to see if it's actually differentiable using the following limit:

$$\lim\limits_{(h, k) \to (0, 0)} \frac{f(h, \space k) - f(0, \space 0) - fx(0, \space 0)h - fy(0, \space 0)k}{\sqrt{h^2+k^2}}$$ with fx and fy being the partial derivatives, so:

$$\lim\limits_{(h, k) \to (0, 0)} \frac{\frac{\sin\left(\sqrt{h^2+k^2}\right)}{\sqrt{h^2+k^2}}-1}{\sqrt{h^2+k^2}} = \lim\limits_{(h, k) \to (0, 0)} \frac{\sin\left(\sqrt{h^2+k^2}\right)-\sqrt{h^2+k^2}}{h^2+k^2}$$.

For the function to be differentiable, the above limit must be 0, so converting into polar coordinates I get:

$$\lim\limits_{\rho \to 0} \frac{\sin(\sqrt{\rho ^2})-\sqrt{\rho^2}}{\rho^2} = \lim\limits_{\rho \to 0} \frac{\rho - \rho}{\rho ^2} = 0$$

The limit is 0, so the function is differentiable. Everyone else got that the function is not differentiable, though, I'm trying to understand where my mistake is (if there is one, but being the only one with a different result leads me to think that there is a mistake somewhere in there).

• $\lim_{h \rightarrow 0} \dfrac{\frac{\sin h}{h} - 1}{h} \rightarrow \infty$. You cannot apply that limit separately to numerator without applying it to the denominator. You may have to use L' Hospital Rule by making the fraction $\dfrac{\cos h - h}{h^2}$. – Aniruddha Deshmukh Apr 9 at 15:59
• Thank you very much. – Frost832 Apr 9 at 16:00
• Also, while it is true that $\lim_{\rho \to 0}\frac{\sin \rho - \rho}{\rho^2} = 0$, your demonstration of it makes no sense. – Paul Sinclair Apr 10 at 1:20