Double Integral of Minimum Function

If $\alpha<\beta$, we have

$$\begin{align} \int_0^\alpha \int_0^\beta \min(x,y)\,dy\,dx&=\int_0^\alpha \int_0^\alpha \min(x,y)\,dy\,dx+\int_0^\alpha \int_\alpha^\beta \min(x,y)\,dy\,dx\\\\ &=\int_0^\alpha \left(\int_0^x \min(x,y)\,dy\,dx+\int_x^\alpha \min(x,y)\,dy\,dx\right)+\int_0^\alpha \int_\alpha^\beta \min(x,y)\,dy\,dx\\\\ &=\int_0^\alpha \int_0^x y\,dy\,dx+\int_0^\alpha \int_x^\alpha x\,dy\,dx+\int_0^\alpha \int_\alpha^\beta x\,dy\,dx\\\\ &=\int_0^\alpha \int_0^x y\,dy\,dx+\int_0^\alpha \int_x^\beta x\,dy\,dx \end{align}$$

Can you finish now?


By definition

$$\min(x,y)=\begin{cases}x\le y\to x\\x\ge y\to y.\end{cases}$$

Then, assuming $\alpha\le\beta$ you can decompose the domain using

$$I=\int_{x=0}^\alpha\int_{y=0}^\beta\min(x,y)\,dy\,dx=\int_{x=0}^\alpha\int_{y=0}^x y\,dy\,dx+\int_{x=0}^\alpha\int_{y=x}^\beta x\,dy\,dx.$$

The condition is required because $y$ may not exceed $\beta$.

This gives

$$I=\int_0^\alpha\left(\frac{x^2}2+\beta x-x^2\right)dx=\frac{\alpha^2\beta}2-\frac{\alpha^3}6=\alpha^2\frac{3\beta-\alpha}6.$$

And by swapping $\alpha,\beta$, $$\alpha\ge\beta\to I=\beta^2\frac{3\alpha-\beta}6.$$