# integrals involving minimum function

I could not compute this integral. How can we get rid of the minimum function? $$\int_{x=0}^{t}\int_{y=0}^{t}\min(x,y)dydx$$

Thanks a lot.

-

Prove that $$\min \{x,y\}=\frac{x+y-\vert x-y\vert}{2}.$$

-
Um, don't you mean to use that formula, instead of proving it? –  Doug Spoonwood Feb 5 '12 at 3:45
@DougSpoonwood,actually I mean "Prove that... and use it." I think that don't make sense to use things fallen from the sky. –  leo Feb 5 '12 at 3:50

To evaluate this integral, observe that $$\min\{y,x\}=\begin{cases}y, ~~\text{when}~~ y \leq x \\x, ~~\text{when} ~~x \leq y\end{cases}$$

So, \begin{align*}\int_o^t\int_0^t \min\{x,y\} \mathrm dy ~~\mathrm dx&=\int_0^t\left(\int_0^xy~\mathrm dy+\int_x^t x\mathrm dy\right)\mathrm d x\\&=\int_0^t\left(\dfrac{x^2}{2}+x(t-x)\right)\mathrm d x\\&=\dfrac{t^3}{6}+\dfrac{t^3}{2}-\dfrac{t^3}{3}\\&=\dfrac{t^3}{3}\end{align*}

-

How about splitting the integral into two regions, one where $x\ge y$, one where $x<y$?

$$\int_{x=0}^{t}\int_{y=0}^{t}\min(x,y)\,dy\,dx=\int_{x=0}^{t}\int_{y=0}^{x}y\,dy\,dx+\int_{x=0}^{t}\int_{y=x}^{t}x\,dy\,dx$$

-