





%\setcounter{section}{1}


\section{Integration in Two Real Variables}
\begin{enumerate}[1.]
\item {\it Evaluate the integral 
$\displaystyle{\iint_D 3 dA}$, if $D$ is the region bounded by the parabola
$y^2-x-5=0$ and the line $x+2y=3$.  }

\medskip


We first find the points where the parabola intersects the line: if $x=y^2-5$
and $x+2y=3$ then $y^2-5=3-2y$, so that $y^2+2y-8=0$, $y=2,-4$.  It will be
more convenient to integrate in $x$ first (draw a picture!):
$$\iint_D 3 dA=\int_{-4}^2\int_{y^2-5}^{3-2y}3dxdy
=\int_{-4}^2 3(3-2y-y^2+5)dy$$
$$=3\int_{-4}^2 (-y^2-2y+8)dy=3(-\frac{y^3}{3}-y^2+8y)\Big|_{-4}^2=108.$$


\item 
{\it Reverse the
order of integration to evaluate the following integrals. }


\medskip

(a) $\displaystyle{\int_0^1 \int_{\sqrt{x}}^1 \cos(y^3+1) dydx
=\int_0^1 \int_{0}^{y^2} \cos(y^3+1) dxdy
=\int_0^1 y^2\cos(y^3+1) dy}$
$$=\frac{\sin(y^3+1)}{3}\Big|_0^1=\frac{\sin (2)-\sin (1)}{3}.$$

\medskip



(b) $\displaystyle{\int_0^1 \int_{x^2}^1  x^3\sin(y^3) dydx
=\int_0^1 \int_0^{\sqrt{y}}  x^3\sin(y^3) dxdy
=\int_0^1 \Big(\frac{x^4}{4} \sin(y^3)\Big)\Big|_{x=0}^{\sqrt{y}} dy}$
$$=\int_0^1 \frac{y^2}{4} \sin(y^3) dy
=-\frac{\cos(y^3)}{12}\Big|_0^1=\frac{-\cos(1)+1}{12}.$$

\bigskip


\item {\it Change the order of integration in the integral
$$
\int_0^4 \int_{x/2}^x \cos(y^2) \, dy\, dx
+ \int_4^8 \int_{x/2}^4 \cos(y^2) \, dy\, dx.
$$
Then evaluate the integral.}


\medskip


\begin{align*}
&\int_0^4 \int_{y}^{2y} \cos(y^2) \, dx\, dy
= \int_0^4 y \cos(y^2)\, dy
\\
&\ \ = \frac{\sin(y^2)}{2}\Big|_{y=0}^4 = \frac{\sin(16)}{2}.
\end{align*}




\bigskip



\item {\it Evaluate the double integrals. Use any method you like.

\medskip

(a)
$\displaystyle \iint_D y\, dA$,  $D$ is the triangle in the $xy$-plane with vertices $(0,0)$, $(1,2)$, $(3,0)$.}




\begin{align*}
&\int_0^2 \int_{y/2}^{3-y} y\, dx\,dy = \int_0^2 y \Big(3-y-\frac{y}{2}\Big) \,dy
\\
&\ \ =  \int_0^2 \Big(3y- \frac{3y^2}{2}\Big) \,dy = \frac{3}{2}y^2-\frac{y^3}{2}\Big|_0^2
\\
&\ \ = \frac{3}{2}\cdot 4 -\frac{8}{2}= 6-4 = 2.
\\
\end{align*}



\bigskip

(b)  $\displaystyle{\int_1^2 \int_{1/x}^1 ye^{xy} dydx
=\int_{1/2}^1 \int_{1/y}^2 ye^{xy} dxdy
=\int_{1/2}^1 e^{xy}|_{x=1/y}^2 dy}$
$$
=\int_{1/2}^1 (e^{2y}-e) dy=\frac{e^{2y}}{2}-ey\Big|_{1/2}^1
=\frac{e^{2}}{2}-e.$$











\item {\it Find the volume under the plane $z=x$ and above the region in the $xy$-plane
bounded by $y=x$ and $y=x^2-x$.}


\begin{align*}
\iint_D x\, dA 
&= \int_0^2 \int_{x^2-x }^{x} x dy dx 
= \int_0^2 x (x-x^2+x)   dx
\\
&= \int_0^2 (2x^2-x^3) dx 
= \frac{2x^3}{3}-\frac{x^4}{4} \Big|_{x=0}^2 = \frac{16}{3}-\frac{16}{4} = \frac{16}{3}-4 = \frac{4}{3}.
\end{align*}



\bigskip

\item {\it Evaluate the double integral
$\displaystyle \iint_D x\, dA$, where $D$ is the triangle with vertices $(0,0)$, $(2,1)$, $(4,0)$.}

\medskip

\begin{align*}
\iint_D x\, dA 
&= \int_0^1 \int_{2y}^{4-2y} x dx dy 
= \int_0^1 \frac{x^2}{2}\Big|_{2y}^{4-2y}  dy
\\
&= \int_0^1 2\big( (2-y)^2 -y^2 \big) dy 
= \int_0^1 ( 8-8y)dy 
\\
&= 8y-4y^2 \Big|_0^1 = 8-4=4.
\end{align*}

An alternative way to do it is to notice that $ \iint_D x\, dA = $ (area of $D$) $\times$ (the average value 
of $x$ on $D$).  The average value 
of $x$ on $D$ is, by symmetry, 2. The area of $D$ is $\frac{1}{2}\cdot 4\cdot 1 =2$. Therefore
$\iint_D x\, dA = 2\cdot 2=4 $.

\medskip

\item{\it Let $T$ be the triangle with vertices $(0,0)$, $(s,0)$ and $(s,t)$ for some $s,t > 0$.  Determine the centroid of $T$.}

\medskip
The centroid of $T$ is the point $(\bar{x}, \bar{y})$, with $\bar{x}$ and $\bar{y}$ determined by the formulas
$$
\bar{x} = \frac{1}{\textrm{Area}(T)} \iint_{T} x \, dA, \quad \bar{y} = \frac{1}{\textrm{Area}(T)} \iint_{T} y \, dA.
$$
The triangle $T$ has a right angle at $(s,0)$, and
$$
\textrm{Area} (T) = \frac{st}{2}.
$$
We can represent $T$ both as  $x$-simple and as $y$-simple:
\begin{eqnarray*}
T &:=& \{(x,y) \in \mathbb{R}^2 : \ 0 \leq x \leq s,\   0 \leq y \leq \frac{tx}{s}  \} \\[1ex]
\quad & = & \{(x,y) \in \mathbb{R}^2:\  0 \leq y \leq t,\  \frac{sy}{t} \leq x \leq s \}.
\end{eqnarray*}
We now calculate the points $\bar{x}$ and $\bar{y}$ using iterated integrals.
For $\bar{y}$, we have
\begin{eqnarray*}
\bar{y} & = & \frac{2}{st} \int_{0}^{s} \int_{0}^{tx/s} y \, dy dx 
= \frac{1}{ts} \int_{0}^{s} \bigg[ y^2 \bigg]_{y=0}^{y=tx/s} dx \\[1ex] 
\quad & = & \frac{t}{s^3} \int_0^s x^2 dx = \frac{t}{3 s^3} \bigg[ x^3 \bigg]_{x=0}^{x=s} \\[1ex]
\quad & = & \frac{t}{3}.
\end{eqnarray*}

For $\bar{x}$, we have
\begin{eqnarray*}
\bar{x} & = & \frac{2}{st} \int_{0}^{t} \int_{sy/t}^{s} x \, dx dy = \frac{1}{st} \int_0^t \bigg[ x^2 \bigg]_{x = sy/t}^{x=s} dy \\[1ex]
\quad & = & \frac{s}{t^3} \int_0^t (t^2 - y^2) dy = \frac{s}{t^3} \bigg[t^2 y - \frac{y^3}{3} \bigg]_{y = 0}^{y = t} \\[1ex]
\quad & = & \frac{2s}{3}.
\end{eqnarray*}
Hence, the centroid of $T$ is $(\bar{x}, \bar{y}) = (\frac{2 s}{3}, \frac{t}{3})$.

\end{enumerate}

