# Inequality proof for a $\mathcal{C}^1$ function.

Let $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ be continuously differentiable. Suppose $|f_x (x,y) | \leq K$, $|f_y (x,y) | \leq K$ for all $(x,y)$. Prove that $$|f(x_1, y_1) - f(x_2, y_2)| \leq \sqrt 2 K \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$$
My approaches don't seem to work here. Give me an idea!

-
Try using the fundamental theorem of calculus in the following way: $|f_x(x,y)| \leq K$ means that $f(x_1,y_1) - f(x_2,y_1) = \int_{x_2}^{x_1} f_x(s,y) ds \leq \int_{x_2}^{x_1} K ds$ and the same for $f_y(x,y)$. – user1736 Dec 12 '11 at 6:27

A hint: Put $z(t):=z_1+t(z_2-z_1)$ $\ (0\leq t\leq 1)$ and consider the auxiliary function $\phi(t):=f\bigl(z(t)\bigr)$ of one variable. Then $f(z_2)-f(z_1)=\phi(1)-\phi(0)=\ldots\$, which can be estimated using various mean value theorems.
We have $$|f(x_1, y_1) - f(x_2, y_2)|=|f(x_1, y_1) -f(x_1,y_2)+f(x_1,y_2)-f(x_2, y_2)|$$ $$\leq |f(x_1, y_1) -f(x_1,y_2)|+|f(x_1,y_2)-f(x_2, y_2)|.$$ Apply the mean value theorem to the function $f(x_1,y)$ (i.e. fixed $x_1$ and consider it as function of $y$), we have $$f(x_1, y_1) -f(x_1,y_2)=f_y(x_1,\xi)\cdot(y_1-y_2)$$ where $\xi$ lies between $y_1$ and $y_2$, which implies that $$|f(x_1, y_1) -f(x_1,y_2)|\leq |f_y(x_1,\xi)|\cdot|y_1-y_2|\leq K\cdot|y_1-y_2|.$$ Similarly, if we apply the mean value theorem to the function $f(x,y_2)$, for some $\eta$ lies between $x_1$ and $x_2$ we have $$|f(x_1, y_2) -f(x_2,y_2)|=|f_x(\eta,y_2)|\cdot|x_1-x_2|\leq K\cdot|x_1-x_2|.$$ Combining all these, we obtain $$|f(x_1, y_1) - f(x_2, y_2)|\leq |f(x_1, y_1) -f(x_1,y_2)|+|f(x_1,y_2)-f(x_2, y_2)|$$ $$\leq K\cdot|y_1-y_2|+ K\cdot|x_1-x_2|\leq \sqrt 2 K \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2},$$ where the last inequality follows from $A+B\leq\sqrt{2}\sqrt{A^2+B^2}$.