If a function is uniformly continuous restricted to each line, is it globally uniformly continuous

examples-counterexamplesmultivariable-calculusreal-analysisuniform-continuity

Question: Suppose $f: \mathbb{R}^2\to \mathbb{R}$ is a continuous function such that for every line $L$ passing through the origin $(0, 0)$, the restriction of the function $f|_{L} : L\to\mathbb{R}$ is uniformly continuous (we can view $L\cong\mathbb{R}$ if we wish). Does it follow that $f$ is uniformly continuous?

Motivation. A friend and I were discussing the following fact: If $f: \mathbb{R}^2\to\mathbb{R}$ has bounded partial derivatives, then $f$ is uniformly continuous. One way to prove this fact is to show that $f$ must be Lipschitz, i.e. $|f(x)-f(y)|\leq C |x-y|$ for some constant $C$. My proof for the latter fact uses the following idea: take two points $x$ and $y$ in $\mathbb{R}^2$, look at the line $L$ joining $x$ and $y$, then restrict $f$ to $L\cong\mathbb{R}$, and use the Mean Value Theorem for the function $f|_{L}$. The derivative of $f|_{L}$ will be bounded, because it is a directional derivative of $f$, which is a linear combination of the partial derivatives of $f$, which are themselves bounded. While formulating this proof, I was naturally lead to ask the question above.

Best Answer

Try $$f(x,y) = \frac{y}{1+x^2}$$