\begin{align} \int_{-1}^1\int_{-1}^1 \max(x,y)\,dx \,dy \end{align} How can I calculate this double integral?
Help me please.
\begin{align} \int_{-1}^1\int_{-1}^1 \max(x,y)\,dx \,dy \end{align} How can I calculate this double integral?
Help me please.
On
Define \begin{align} I=\int_{-1}^1\int_{-1}^1 \max(x,y)\,dx \,dy \end{align} and we want to calculate $I$.
Note that we can split the integral in the following way: \begin{align} I=\int_{-1}^1\int_{-1}^1 \max(x,y)\,dx \,dy =\int_{-1}^1\Bigl(\int_{-1}^y \max(x,y)\,dx +\int_{y}^1 \max(x,y)\,dx\Bigr)\,dy \end{align} Now for the first part, we note, that $x$ runs from $-1$ to $y$ and is therefore always smaller than $y$. For the second part, $x$ runs from $y$ to $1$ and is therefore always greater than $y$. We can then rewrite the expression as \begin{align} I&=\int_{-1}^1\int_{-1}^1 \max(x,y)\,dx \,dy =\int_{-1}^1\Bigl(\int_{-1}^y \max(x,y)\,dx +\int_{y}^1 \max(x,y)\,dx\Bigr)\,dy \\ &=\int_{-1}^1\Bigl(\int_{-1}^y y\,dx +\int_{y}^1 x\,dx\Bigr)\,dy =\int_{-1}^1 y\cdot x|_{-1}^y+\frac{x^2}{2}|_{y}^1 \,dy =\int_{-1}^1 y^2+y+\frac12-\frac{y^2}{2} \,dy \\ &=\int_{-1}^1 \frac{y^2}{2} +y+\frac12\,dy = \Bigl(\frac{y^3}{6}+\frac{y^2}{2}+\frac{y}{2}\Bigr)|_{-1}^1=\frac{1}{6}+\frac12 +\frac12+\frac16-\frac12+\frac12\\ &=\frac43 \end{align}
However, I strongly encourage you to understand the splitting of the integral and replacing the $\max$ function with the corresponding value $x$ or $y$.
Hint
$$\max\{x,y\}=\frac{|x+y|+|x-y|}{2}$$
Then $$\int_{-1}^1\int_{-1}^1\max\{x,y\}dxdy=\frac{1}{2}\int_{-1}^1\int_{-1}^1|x+y|dxdy+\frac{1}{2}\int_{-1}^1\int_{-1}^1|x-y|dxdy$$