# Lebesgue Integral of a function that vanishes outside the line x=y

Let $f(x,y)=\begin{cases} xy \ \ if\ \ x=y\\ 0 \ \ \ \ if\ \ x\neq y\end{cases}$. Compute $\displaystyle\int_0^1\int_0^1f(x,y)dxdy$.

I know it's strange to write $\displaystyle\int_0^1\int_0^1f(x,y)dxdy=\int_0^1\int_0^1f(x,x)dxdx$.

Here is what I tried. Let $g(x)=f(x,x)=x^2$. $$\int_{[0,1]\times [0,1]}f(x,y)dxdy=\int_0^\sqrt{2} g(t)dt$$ (It becomes the integral along the diagonal of the square $[0,1]\times [0,1]$). Does it make sense? Thank you.

• What is the measure of the domain on which $f\ne 0$? – Mark Viola Oct 3 '16 at 21:18
• $f$ is almost everywhere $0$. – user251257 Oct 3 '16 at 21:19
• $f(x,y)=0$ since the line segment $\{(x,x): 0\leqslant x\leqslant 1\}$ is the image of a subset of $\mathbb R^1$ under a Lipschitz continuous map. – Math1000 Oct 3 '16 at 21:21
• Thank you so much. I wanted to compute it directly :-) But Using the fact that "If $f=0$ a.e. then $\int f =0$", we see that the above integral is 0. – Jax Oct 3 '16 at 21:29

By Fubini, this is equal to the double integral over the square; the function is $0$ everywhere except a set of measure $0$, so the integral is $0$.
To see this directly: the inner integral is of a function that is $0$ except at exactly one point, so the inner integral is $0$ for all $y$.