$\frac{\partial f}{\partial x}\le2$, $\frac{\partial f}{\partial y}\le2$. Show $|f(x)-f(y)|\le2\sqrt{2}$ $||x-y||$ $f(x,y)$ defined on $[0,1]\times [0,1]$ and $\frac{\partial f}{\partial x}\le2$, $\frac{\partial f}{\partial y}\le2$. Show $|f(x)-f(y)|\le2\sqrt{2}$ $||x-y||$.
How do I approach this problem? I'm learning transformation in real analysis, but I have no clue where to start.
 A: We use mean value theorem, but with care, because we only know that $f$ is directionally differentiable towards the vectors $(1,0)$ and $(0,1)$ and their scalar multiples.
Write two points as $p=(p_1,p_2), q=(q_1,q_2)$. We are going to find an upper bound for $\lvert f(p)-f(q)\rvert$. Consider a third point $r=(p_1,q_2)$. Define two functions $f_1:[0,1]\to\Bbb R, f_2:[0,1]\to\Bbb R$, by $f_1(t):=f(tp+(1-t)r)$ and $f_2(t):=f(tr+(1-t)q)$. They are differentiable by writing out the limit definition of differentiation, and the derivatives are $f_1'(t)=(p_2-q_2)\frac{\partial f}{\partial x}(tp+(1-t)r)$ and $f_2'(t)=(p_1-q_1)\frac{\partial f}{\partial y}(tp+(1-t)r)$. I leave the calculation steps of the derivatives to you. Now apply mean value theorem to find upper bounds for $\lvert f(p)-f(r)\rvert=\lvert f_1(0)-f_1(1)\rvert$ and $\lvert f(r)-f(q)\rvert=\lvert f_2(0)-f_2(1)\rvert$.
At the end, you will need to use this inequality:
$$\lvert p_1-q_1\rvert+\lvert p_2-q_2\rvert\le \sqrt 2 \lVert p-q\rVert.$$
As an exercise, try to prove the following generalisation:
Let $f$ be a real-valued function defined on an open rectangle of $\Bbb R^n$. Suppose all partial derivatives of $f$ exists and there is a constant $M\in\Bbb R$ such that for each variable $x_i$, $-M\le\frac{\partial f}{\partial x_i}\le M$.  Show that $\lvert f(x)-f(y)\rvert\le M\sqrt n \lVert x-y\rVert$.
A: Consider the function $g(t):=f(tx+(1-t)y)$ for $t\in [0,1]$ (note that $tx+(1-t)y\in [0,1]\times [0,1]$). Thus, by the Mean Value Theorem, there is some $t_0\in (0,1)$ such that
$$f(x)-f(y)=g(1)-g(0)=g'(t_0)(1-0)=\langle\nabla f(t_0),x-y\rangle.$$
Can you take it from here?
P.S. I guess that $f$ is  differentiable in $[0,1]\times [0,1]$ and the partial derivatives are bounded in magnitude that is $\left|\frac{\partial f}{\partial x}\right|\le2$, $\left|\frac{\partial f}{\partial y}\right|\le2$.
