0

Give an example of a function $f: \mathbb R^2 → \mathbb R$ which is not continuous at $(0, 0)$, but such that $f|_L: L → \mathbb R$ is continuous for all straight lines L through the origin $(0, 0)$.

Le Coq
  • 5

2 Answers2

3

This is a standard example, and googling "continuous along each line through the origin but not continuous at the origin" gave me this question as the first result. I will give a (slightly altered) account of the arguments there.

Take the function $$ f(x,y) =\cases{ \frac{x^2y}{x^4+y^2}&if $(x,y)\neq(0,0)$\\0&if $(x, y) = (0,0)$} $$ Now, along the lines $x = 0$ and $y = 0$, we clearly have $f(0,y) = f(x, 0) = 0$, so the function is continuous along those lines. For any other line, we may write $y = mx$ with $m \neq 0$, which gives (at all points except the origin) $$ f(x, mx) = \frac{x^2\cdot mx}{x^4 + m^2x^2} = \frac{mx}{x^2+m^2} $$ and we see that 1) the denominator is never zero, and 2) the function value goes to $0$ as $x\to 0$. Therefore the function $f$ is continuous along this line as well.

However, now we set $y = x^2$, and we get $$ f(x, x^2) = \frac{x^2\cdot x^2}{x^4 + x^4} = \frac12 $$ which does not go to $0$ as $x \to 0$. Therefore the function is not continuous at $(0,0)$.

Atom
  • 3,905
Arthur
  • 199,419
1

Define $f(x,y)=\frac{y^2}{x}$ for $x\neq0$ and $0$ otherwise. Then for each $y=mx$, $f(x)=m^2x$ which is continuous. Trivially continuous along $x=0$. But the limit is equal to $1$ at the origin as we approach along $x=y^2$, so $f$ is not continuous.

T.J. Gaffney
  • 1,568