# Checking for differentiability,partial derivatives of a multivariable function

Let $f : \mathbb{R}^2 \to \mathbb{R}$ be defined as $$f(x,y)=\begin{cases} (x^2+y^2)\cos \frac{1}{\sqrt {x^2+y^2}}, & \text{for (x,y) \ne (0,0)} \\ 0, & \text{for (x,y) = (0,0)} \end{cases}$$ then check whether its differentiable and also whether its partial derivatives ie $f_x,f_y$ are continuous at $(0,0)$. I dont know how to check the differentiability of a multivariable function as I am just beginning to learn it. For continuity of partial derivative I just checked for $f_x$ as function is symmetric in$y$and $x$. So $f_x$ turns out to be $$f_x(x,y) = 2x\cos \left(\frac {1}{\sqrt {x^2+y^2}}\right)+\frac {x}{\sqrt {x^2+y^2}}\sin \left(\frac {1}{\sqrt{x^2+y^2}}\right)$$ which is definitely not $0$ as $(x,y)\to (0,0)$. Same can be stated for $f_y$. But how to proceed with the first part? Thanks!

• You should compute $f_x,f_y$ at $(0,0)$ by definition. – user223391 Nov 12 '17 at 13:58
• They are $0$ . Then what to do? – Archis Welankar Nov 12 '17 at 14:01

we have $$\frac{\partial f(0,0)}{\partial y}=\lim_{h\to 0}h\cos\left(\frac{1}{h}\right)=0$$ since $|h\cos\left(\frac{1}{h}\right)|\le |h|$ which tends to $0$

As stated in the answer by @MeeSeongIm, the partial derivatives at $(0,0)$ are $\partial_x f(0,0) = 0$ and $\partial_y f(0,0) = 0$.

The only candidate for the differential at $(0,0)$ is: $$Df(0,0) = \begin{bmatrix} \partial_x f(0,0) & \partial_y f(0,0)\end{bmatrix} = \begin{bmatrix} 0 & 0\end{bmatrix}$$ which is simply the zero-functional.

We have:

\begin{align}\lim_{(h_1,h_2) \to (0,0)}\frac{\left|f(h_1,h_2) - f(0,0) - Df(0,0)(h_1,h_2)\right|}{\|(h_1,h_2)\|} &= \lim_{(h_1,h_2) \to (0,0)}\frac{h_1^2+h_2^2}{\sqrt{h_1^2+h_2^2}}\cdot \left|\cos\frac1{\sqrt{h_1^2+h_2^2}}\right|\\ &= \lim_{(h_1,h_2) \to (0,0)}\sqrt{h_1^2+h_2^2}\cdot \underbrace{\left|\cos\frac1{\sqrt{h_1^2+h_2^2}}\right|}_{\le 1}\\ &= 0 \end{align}

Hence, $f$ is differetiable at $(0,0)$ with the differential being $0$, even though the partial derivatives are not continuous at $(0,0)$.

We have \begin{align*} f_x(0,0) &= \lim_{h\rightarrow 0} \frac{f(0+h,0)-f(0,0)}{h} \\ &= \lim_{h\rightarrow 0} \frac{h^2 \cos \left(\frac{1}{h} \right)-0}{h} \\ &= \lim_{h\rightarrow 0} h \cos \left(\frac{1}{h}\right). \\ \end{align*} So $$|f_x(0,0)| = \left| \lim_{h\rightarrow 0} h \cos \left(\frac{1}{h}\right) \right| \leq \lim_{h\rightarrow 0} h =0.$$ So $f_x(0,0) =0$.

Similarly $f_y(0,0)=0$.

To show that $f_x$ is continuous at $(0,0)$, we need to show that $$\lim_{(x,y)\rightarrow (0,0)} f_x(x,y) = f_x(0,0).$$ However, consider the path $y=0$. Then \begin{align*} \lim_{(x,y)\rightarrow (0,0)} \frac{x }{\sqrt{x ^2+y^2}} \sin \left(\frac{1}{\sqrt{x^2+y^2}}\right) &+ 2 x \cos \left(\frac{1}{\sqrt{x^2+y^2}}\right) \\ &= \lim_{x\rightarrow 0} \frac{x }{|x|}\sin \left(\frac{1}{|x|}\right) + 2 x \cos \left(\frac{1}{|x|}\right) \\ &= \lim_{x\rightarrow 0} \text{sgn}(x) \sin \left(\frac{1}{|x|}\right) + 2 x \cos \left(\frac{1}{|x|}\right), \\ \end{align*} where $$\text{sgn}(x)= \begin{cases} \: \:\: 1 &\mbox{ if } x > 0 \\ -1 &\mbox{ if } x < 0. \\ \end{cases}$$ Since $\sin\left( \frac{1}{|x|}\right)$ rapidly oscillates between $-1$ and $1$ as $x\rightarrow 0$ and it is not multiplied by any function $g(x)$ such that $g(x)\sin\left( \frac{1}{|x|}\right)\rightarrow 0$ as $x\rightarrow 0$, $f_x$ is not continuous at $(0,0)$.

We have a similar argument for the continuity of $f_y$ at $(0,0)$.

• This is only one part of the question – user223391 Nov 12 '17 at 14:06
• @ZacharySelk I just saw that. Thanks. Will edit. – Mee Seong Im Nov 12 '17 at 14:08