Integrability of $f(x, y) = \frac{1}{n^2}, x \in \left(\frac{1}{n + 1}, \frac1n\right], y \in [0, 1]$ Let $f : [0, 1]^2 \to \mathbb{R}$ be the step function 
$$f(x, y) = \frac{1}{n^2}, \quad x \in \left(\frac{1}{n + 1}, \frac1n\right], \quad y \in [0, 1].$$
I need to show that $f$ is integrable. 
I'm sorry for my lack of effort but I just don't know where to begin here. For a single variable function, the function needs to have a finite number of discontinuities and must be bounded over the interval of integration for it to be Riemann integrable over that interval. Do these conditions still apply for a function of $2$ variables? I'm also confused by the expression of the function. The variable $y$ takes values in $[0,1]$ but the function $f$ only depends on $n$.  
 A: You have to show that the lower Riemann integral equals the upper Riemann integral. Consider a partition $\mathcal{P}$ of $[0,1]^2$ into rectangles $R_1, \ldots, R_m$. Then the lower sum over this partition is
$$L(f,\mathcal{P}):=\sum_{i=1}^m \inf_{R_i}f \text { meas}(R_i)$$ and the lower Riemann integral  is the supremum of $L(f,\mathcal{P})$ over all partitions $\mathcal{P}$. 
The upper sum over a partition is
$$U(f,\mathcal{P}):=\sum_{i=1}^m \sup_{R_i}f \text { meas}(R_i)$$ and the upper Riemann integral  is the infimum of $U(f,\mathcal{P})$ over all partitions $\mathcal{P}$. 
Now fix $\varepsilon>0$. Since $\frac{1}{n^2}\to 0$ as $n\to\infty$ you can find $n_\varepsilon$ such that $\frac{1}{n^2}\le \varepsilon$ for all $n\ge n_\varepsilon$.
Take the partition $\mathcal{P}_\varepsilon$ given by $[0,\frac{1}{n_\varepsilon}]\times [0,1]$, $(\frac{1}{n_\varepsilon},\frac{1}{n_\varepsilon-1}]\times [0,1]$, $\dots$, $(\frac{1}{2},1]\times [0,1]$. 
On   $R_1=[0,\frac{1}{n_\varepsilon}]\times [0,1]$ you have that $\inf_{R_1} f=0$ (since $\frac{1}{n^2}\to 0$ as $n\to\infty$), while $\sup_{R_1} f\le \varepsilon $ by the choice of $n_\varepsilon$. On all the other rectangles $R_i$, which are of the form $(\frac{1}{n+1},\frac{1}{n}]\times [0,1]$ you have that $\sup_{R_i} f=\inf_{R_i} f=\frac1{n^2}$.
Thus 
$$L(f,\mathcal{P}_\varepsilon)\le \text{lower integral}\le \text{upper integral}\le U(f,\mathcal{P}_\varepsilon),$$ which implies that
\begin{align}0\le \text{upper integral}-\text{lower integral} \le U(f,\mathcal{P}_\varepsilon)-L(f,\mathcal{P}_\varepsilon)\\= (\sup_{R_1}f -\inf_{R_1}f )\text { meas}(R_1) \le \varepsilon.\end{align}
You can now send $\varepsilon$ to zero. So the function is integrable.
PS: Instead of playing with the height of the function you could have played with the measure of the rectangles, that is, make $\text { meas}(R_1)\le \varepsilon$ and then use the fact that $(\sup_{R_1}f -\inf_{R_1}f )\le 1-0$.
A: The definition can be read as follows: Given $(x,y)\in[0,1]^2$, find the $n\in\mathbb N$ such that $x\in\left(\frac1{n+1},\frac1n\right]$ and $y\in[0,1]$, and then set $f(x,y)=\frac1{n^2}$. So, since $y\in[0,1]$ always holds for $(x,y)\in[0,1]^2$, the function does not actually depend on $y$.
However, there is no such $n\in\mathbb N$ for $x=0$ so one would first have to define $f$ for this case seperately. For example we could consider the case $f(x,y)=0$ for $x=0$.
As florence noted, a function on a bounded interval does not need to have only finitely many discontinuities in order to be Riemann integrable.
For functions on $[0,1]^2$ I am not sure what the common definition of Riemann integrability is. What could be ment is, that for every $x\in[0,1]$ the proper Riemann integral $g(x)=\int_0^1f(x,y)\mathrm dy$ exists and that the proper Riemann integral $\int_0^1g(x)\mathrm dx$ exists. Maybe you can check this for your function $f$.
