Double integral of floor function and exponential function over rectangular region I am not getting any idea how to deal with this two sums of double integral where functions and rectangular domain is given as 


*

*$\lfloor x+y\rfloor$ and $1\leq x\leq 3$, $2\leq y\leq 5$

*$e^{\max(x^2,y^2)}$ and $0\leq x\leq 1,0\leq y\leq 1$.
For first one I use inequality $x+y-1<\lfloor x+y\rfloor\leq x+y$, and I just get hint that my answer will in between $27$ and $33$. But how I will get exact answer.
 A: As regards the first integral, we have that
$$\iint_R\lfloor x+y\rfloor dxdy=\sum_{k=1+2}^{3+5}k\cdot\mbox{Area}(R\cap\{(x,y): k\leq x+y<k+1\}).$$
Make a drawing of the rectangle $R=[1,3]\times [2,5]$  with the lines $x+y=k$ for $k=3,\dots,8$ and you will easily evaluate the areas of the intersections given in the above formula. Finally you should obtain
$$\iint_R\lfloor x+y\rfloor dxdy=3\cdot\frac{1}{2}+4\cdot\frac{3}{2}+5\cdot\frac{4}{2}+6\cdot\frac{3}{2}+7\cdot\frac{1}{2}+8\cdot 0=30.$$
As regards the second one note that
\begin{align*}\int_{[0,1]\times [0,1]}e^{\max(x^2,y^2)}dxdy
&=
\int_{x=0}^1\left(\int_{y=0}^xe^{x^2}dy\right)dx+
\int_{y=0}^1\left(\int_{x=0}^ye^{y^2}dx\right)dy\\
&=\int_{x=0}^1xe^{x^2}dx+\int_{y=0}^1ye^{y^2}dy\\
&=2\int_{x=0}^1xe^{x^2}dx=[e^{x^2}]_0^1=e-1.
\end{align*}
A: For a given value of $x$ and integer $k$, $$\lfloor x+y\rfloor = \left\{ \begin{matrix} \lfloor x \rfloor + k  & \text{for $k \le y   < k + 1 - x + \lfloor x \rfloor $,} \\ \lfloor x \rfloor + k+1  & \text{for $k + 1 - x + \lfloor x \rfloor \le y   < k + 1$.}\end{matrix}\right.$$ 
Consequently, for an integer $k$,
$$\int_{k}^{k+1} \lfloor x+y\rfloor \,dy = \int_{k}^{k + 1 - x + \lfloor x \rfloor} (\lfloor x \rfloor+ k) \,dy + \int_{k + 1 - x + \lfloor x \rfloor}^{k+1} (\lfloor x \rfloor +k +1 )\,dy = k +x.$$
Therefore,
$$\int_{1}^{3}\int_{2}^{5} \lfloor x+y\rfloor \, dy \, dx = \int_{1}^{3}\left(\int_{2}^{3} \lfloor x+y\rfloor \, dy+\int_{3}^{4} \lfloor x+y\rfloor \, dy+\int_{4}^{5} \lfloor x+y\rfloor \, dy\right)\,dx$$ implies
$$\int_{1}^{3}\int_{2}^{5} \lfloor x+y\rfloor \, dy \, dx = \int_{1}^{3} [(2+x)+(3+x)+(4+x) ]\,dx = \color{red}{30}.$$
