# Lipschitz property of $f(x,y)= \frac{xy}{\sqrt{x^2+y^2}}$ for $(x,y)\neq (0,0)$ and $f(0,0)=0.$

Prove that $$f(x,y)=\left \{\begin {array}{lll} \displaystyle \frac{xy}{\sqrt{x^2+y^2}}, & ~(x,y)\neq (0,0)\\ 0, & ~\textrm{διαφορετικά}\\ \end{array} \right.$$ is Lipschitz, with constant $M=1$, that is: $$|f(x_1,y_1)-f(x_2,y_2)|\leq \sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$ for all $(x_1,y_1),~(x_2,y_2).$

Attempt. By using MVT for one variable, we get for some $y'$ and some $x'$ $$f(x_1,y_1)-f(x_2,y_2)=\big(f(x_1,y_1)-f(x_1,y_2)\big)+\big(f(x_1,y_2)-f(x_2,y_2)\big)=f_y(x_1,y')(y_1-y_2)+f_x(x',y_2)(x_1-x_2).$$ By triangle inequality and since $|f_x|,~|f_y|$ are bounded above by $1$: $$|f(x_1,y_1)-f(x_2,y_2)|\leq |f_y(x_1,y')|\,|y_1-y_2|+|f_x(x',y_2)| \,|x_1-x_2|\leq |y_1-y_2|+|x_1-x_2|\leq \sqrt{2}\,\sqrt{(x_1-x_2)^2+(y_1-y_2)^2},$$ so we get the desired property for $M=\sqrt{2}$. Is $M=1$, as stated above, incorrect or am I missing something?

It looks like treating each variable separately makes you overestimate the bound. If you use MVT for $f$ as a function of two variables, you have $$f(x_1,y_1)-f(x_2,y_2)=\nabla f(\vec{p}) \cdot \big( (x_1,y_1)-(x_2,y_2)\big)$$ for some $\vec p \in \mathbb R^2$ lying in the segment that joins both points. So by Cauchy-Schwartz inequality you can say $$|f(x_1,y_1)-f(x_2,y_2)|\le||\nabla f(\vec{p})|| \cdot ||(x_1,y_1)-(x_2,y_2)||$$ and so it's enough to show that the gradient has norm not greater than one, which is true.
• There is a little more argument to give if the segment passes through $(0,0)$ where the gradient is not defined, but this is easily solved by using an intermediate point tending to $(0,0)$. – Gribouillis Dec 25 '17 at 8:08
• Indeed, we have $\|\nabla f(x,y)\|^2=\Big(\frac{y^2-x^2}{y^2+x^2}\Big)^2\leq 1$ for $(x,y)\neq (0,0)$. – Nikolaos Skout Dec 25 '17 at 8:16
• Yes. Actually it's a little trickier: both partial derivatives exist at $(0,0)$ and equal $0$, so the gradient exists at that point (in fact $\nabla f (0,0)= (0,0)$). But the MVT is not applicable at that point because (as it can be proven) $f$ is not differentiable there. – Alejandro Nasif Salum Dec 25 '17 at 8:23