Integrate $f(x,y)=x^{2}+y^{2}$ over the triangle region with vertices $(0,0), (1,0)$ and $(0,1)$.
Solution:
First you need to draw a picture where you indicate the triangle on the coordinate system.
Suppose we want to integrate in the following order $dydx$. In this case you see that $x$ moves from $0$ to $1$, and at
each fixed point $x \in (0,1)$ you see that $y$ coordinate moves from $0$ to $1-x$. So your integral will be
\begin{align*}
\int_{0}^{1}\int_{0}^{1-x}(x^{2}+y^{2})dydx.
\end{align*}
Let's first calculate the interior integral:
\begin{align*}
&\int_{0}^{1-x}(x^{2}+y^{2})dy = \left. \left(yx^{2}+\frac{y^{3}}{3} \right)\right|_{y=0}^{y=1-x} = \\
&(1-x)x^{2}+\frac{(1-x)^{3}}{3}.
\end{align*}
Ok let's calculate second integral. So we have
\begin{align*}
&\int_{0}^{1} (1-x)x^{2}+\frac{(1-x)^{3}}{3} dx = \int_{0}^{1}x^{2}-x^{3}+\frac{(1-x)^{3}}{3} dx=
&\left. \left(\frac{x^{3}}{3}-\frac{x^{4}}{4}-\frac{(1-x)^{4}}{3\cdot 4} \right)\right|_{0}^{1}=\\
&\frac{1}{3}-\frac{1}{4}+\frac{1}{12}=\frac{1}{6}
\end{align*}
Surely you can calculate integral in the different order, say $ dxdy$. In this case (based on your picture)
you have that as $y$ moves from $0$ to $1$ then at each fixed point $y \in (0,1)$ we see that $x$ moves from $0$ to
$1-y$. So we have
\begin{align*}
\int_{0}^{1}\int_{0}^{1-y}(x^{2}+y^{2})dxdy
\end{align*}
Find the average value of $f(x,y)=\frac{1}{xy}$ over the square region: $\ln 2 \leq x \leq 2\ln 2$, $\ln 2 \leq y \leq 2\ln 2$.
Solution:
\begin{align*}
\text{Average} = \frac{1}{\text{Area(square)}} \iint_{\text{square}} \frac{1}{xy}dxdy
\end{align*}
Area of the square is $(\ln 2)^{2}$ therefore the avergae will be
\begin{align*}
\text{Average} = \frac{1}{(\ln 2)^{2}}\int_{\ln 2}^{2\ln 2}\int_{\ln 2}^{2 \ln 2} \frac{1}{xy}dxdy
\end{align*}
In this case order of integration does not matter. Let's calculate interior integral
\begin{align*}
&\int_{\ln 2}^{2 \ln 2} \frac{1}{xy}dx = \frac{1}{y}\int_{\ln 2}^{2 \ln 2} \frac{1}{x}dx=\\
&\frac{1}{y} \left. \ln x \right|_{x=\ln 2}^{x=2\ln 2} = \frac{1}{y}\left(\ln (2\ln 2)-\ln (\ln 2) \right)
\end{align*}
It might be a good idea to recall the following two properties of logarithm
\begin{align*}
\ln a + \ln b &= \ln (ab)\\
\ln a - \ln b &= \ln \left(\frac{a}{b}\right)
\end{align*}
So using the second property we see that our expression simplifies
\begin{align*}
\frac{1}{y}\left(\ln (2\ln 2)-\ln (\ln 2)\right) = \frac{1}{y} \ln \left( \frac{2\ln 2}{\ln 2}\right) = \frac{\ln 2}{y}.
\end{align*}
Now let's calculate the second integral
\begin{align*}
&\int_{\ln 2}^{2\ln 2}\frac{\ln 2}{y}dy = \ln 2\int_{\ln 2}^{2\ln 2}\frac{1}{y}dy = \ln 2 \left.\ln y\right|_{\ln 2}^{2\ln 2}=\\
&(\ln 2) \left(\ln (2\ln 2)-\ln (\ln 2)\right) = (\ln 2) \ln \left( \frac{2\ln 2}{\ln 2}\right) = (\ln 2)\cdot (\ln 2)=(\ln 2)^{2}.
\end{align*}
Don't forget that we are looking for the average value
\begin{align*}
\text{average} = \frac{1}{(\ln 2)^{2}} (\ln 2)^{2}=1.
\end{align*}