Continuity of a function in two variables Function $f(x,y)$ is continuous in each variable separately. Prove that there exists a point where it is continuous in two variables.


I do not quite understand how to act here. I know the definition of continuity. But how to use them, I do not know. This is my homework on mathematical analysis.
For $\varepsilon&gt;0$ denote
$$X_{\varepsilon} = \Big \{ (x,y) ~|~ \exists \eta &gt;0, \forall (h,k) \in [-\eta,\eta]^2,~ |f(x+h,y+k)-f(x,y)|&lt; \varepsilon  \Big\}.$$
Then $f$ is continuous on $\bigcap_{\varepsilon \in \mathbb{Q}_{&gt;0}} X_{\varepsilon}$.

Lemma: For any $\varepsilon&gt;0$, and open $O$ : $X_{\varepsilon} \cap O$ has non empty interior.

Proof: WLOG we can assume that $O=(-1,1) \times (1,1)$.
Since $x \mapsto f(x,0)$ is continuous at $0$, there exists $\alpha \in (0,1)$ such that $|f(x,0)-f(0,0)| \leq \frac{\varepsilon}{4}$ for all $|x| \leq \alpha$.
Denote
$$E_{\beta} = \Big \{ x \in (-\alpha,\alpha) ~|~ \forall |y| &lt; \beta, ~ |f(x,y) - f(x,0)| \leq \frac{\varepsilon}{4} \Big\}.$$
Then : (1) $E_\beta$ is closed because it is an intersection of closed sets, (2) $\cup_\beta E_\beta = (-\alpha,\alpha)$ because $y \mapsto f(x,y)$ is continuous for any $x$.
Baire theorem implies that $E_{\beta_0}$ contains an open $I$ for some $\beta_0$.
Then for any $(x,y)$ and $(x',y') \in I \times (-\beta_0,\beta)$, we have
$$\begin{array}{rcl}
|f(x,y)-f(x',y')| &amp;\leq&amp; |f(x,y)-f(x,0)| + |f(x,0)-f(x',0)| + |f(x',y')-f(x',0)| \\
&amp;\leq&amp; \varepsilon \\
\end{array}$$
Hence $X_\varepsilon \cap O$ has non-empty interior. QED

Baire theorem implies that $\bigcap_{\varepsilon \in \mathbb{Q}_{&gt;0}} X_{\varepsilon}$ is dense.
Let $(x_p, y_p)$ be a point and let ${(x_n , y_n)}_{n\in \mathbb{N}}$ be any sequence such that $(x_n , y_n) \rightarrow (x_p, y_p)$.

Then
$$
\lim_{n\rightarrow \infty} |f(x_n , y_n) - f(x_p , y_p)| = \lim_{n\rightarrow \infty} |f(x_n , y_n) - f(x_n , y_p) + f(x_n , y_p) - f(x_p , y_p) + f(x_p , y_p) - f(x_p , y_n) + f(x_p , y_n) - f(x_p , y_p)| \leq \lim_{n\rightarrow \infty} |f(x_n , y_n) - f(x_n , y_p)| + |f(x_n , y_p) - f(x_p , y_p)| + |f(x_p , y_p) - f(x_p , y_n)| + |f(x_p , y_n) - f(x_p , y_p)| 
$$

Each of these terms goes to zero since $f$ is continuous in each variable. 

Therefore $$\lim_{n\rightarrow \infty} f(x_n,y_n) = f(x_p,y_p)$$ By definition this means f is continuous at $(x_p, y_p)$.

(This proof is straight forward to generalize in arbitrary metric spaces, though I figured that's not what you were looking for.)