Suppose that $f(x,y)$ satisfies the following conditions:

- For all $X$ , the function $f( X, y )$ is continuous in $y$ .
- For all $Y$ , the function $f ( x, Y)$ is continuous in $x$ .

Must the function $f(x,y)$ be continuous?

No, it need not be continuous
Yes, it must be continuous

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Consider the functions $g(x) = \begin{cases}x & 0\leq x\leq 1 \\ 2-x & 1 \leq x \leq 2 \\ 0 & \text{otherwise}\end{cases}$ and $f(x,y) = \begin{cases} \frac{g(x/y)}{y} & x,y > 0 \\ 0 & \text{otherwise}\end{cases}$

Then we claim that this $f$ satisfies the two conditions but is not continuous at the origin.

Property 1:Fix some $X$ . If $X\leq 0$ then $f(X,y) = 0$ for all $y$ , which is continuous. Therefore, let's assume $X>0$ . Then $\begin{aligned}f(X,y) &= \begin{cases}g(X/y)/y & y > 0 \\ 0 & \text{otherwise}\end{cases} \\ &= \begin{cases}\frac{X}{y^2} & 0 \leq \frac{X}{y} \leq 1 \\ \frac{2-\frac{X}{y}}{y} & 1\leq \frac{X}{y} \leq 2 \\ 0 & \text{otherwise}\end{cases} \\ &= \begin{cases}\frac{X}{y^2} & y \geq X \\ \frac{2}{y} - \frac{X}{y^2} & \frac{X}{2} \leq y \leq X \\ 0 & \text{otherwise}\end{cases}\end{aligned}$ which is continuous (note that the pieces "fit" together and at the only possible problem point of $y=0$ , the function is locally zero, so continuous)Property 2:Fix some $Y$ . As before, if $Y \leq 0$ , then $f(x,Y) = 0$ for all $x$ , which is continuous, so we may assume $Y>0$ . Then $f(x,Y) = g(x/Y)/Y = (h \circ g \circ h)(x)$ is just the composition of the continuous function $g$ and the continuous function $h(x) = x/Y$ , hence continuous.$f$ is not continuous at the origin:To see this, note that $f(0,0) = 0 \\ \lim_{x\to 0^+} f(x,x) = \lim_{x\to 0^+} \frac{g(x/x)}{x} = \lim_{x\to 0^+} \frac{1}{x} = +\infty.$