# Question on continuity of functions from $X\times X\rightarrow Y$

I am stuck on the following problem, which I do not believe to be so difficult.

Let $X$ and $Y$ be Banach spaces. Let $f:X\times X\rightarrow Y$ be a function such that for any fixed $x_0$, $f(x,x_0)$ and $f(x_0,x)$ are continuous in $x$. Then is $f(x,x)$ continuous in $x$?

I tried taking an arbitrary convergent subsequence $\{x_n\}$ which converges to some $x$ and trying to argue that $f(x_n,x_n)$ converges to $f(x,x)$ using continuity in both terms, but I cannot seem to make this work for some reason.

Any help is greatly appreciated.

-

Let $X=Y:=\Bbb R$ and $$f(x,y):=\begin{cases}\frac{xy}{x^2+y^2},&\mbox{if }(x,y)\neq (0,0);\\ 0&\mbox{ if }(x,y)=(0,0). \end{cases}$$ This function is continuous once a variable is fixed, but is not globally continuous.

-
In particular, $f(x,x)=0$ if $x$ is $0$, $f(x,x)=1/2$ otherwise. –  Chris Eagle Jan 13 '13 at 21:56
Consider the function $f:\mathbb R\times \mathbb R\to \mathbb R$ given by $f(x,0)=f(0,x)=0$ for all $x\in \mathbb R$, and $f(x,y)=1$ if either $x$ or $y$ is irrational, and $f(x,y)=1/2$ otherwise.
Clearly, $f(x,0)$ and $f(0,x)$, being constantly $0$, are continuous. However, $f(x,x)$ is a Dirichlet function which is discontinuous. Note that the discontinuity is not removable.
Intuitively what is going on here is that there are infinitely many directions to consider in $\mathbb R \times \mathbb R$ and knowledge of the behaviour of the function along just two directions (along the axis) is not sufficient to determine it's behaviour with respect to the other infinity of directions.