%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                           %
%  The Definite Integral                    %
%                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\problemgrouptitle{The Definite Integral}

\item Consider the following graphically defined function $f(x)$:

~~~\resizebox{.4\textwidth}{!}{
\asycode{%
import graph;
import geometry;
size(300,0);
add(shift(-6,-4)*grid(12,8,gray+linetype("4 4")));
xaxis(shift(-10,-10)*Label("$x$",align=E),Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=1,Size=3,Label(fontsize(10)),OmitFormat(),OmitTick(0,6)));
yaxis(shift(-8,-10)*Label("$y$",align=N),Arrow(HookHead,size=4),ticks=Ticks(n=1,Size=3,Label(fontsize(10)),OmitFormat(0),OmitTick(0,4)));
label(shift(-2,0)*Label("$f(x)$",fontsize(12)),(4,1),NE);
draw((-6,1)--(-3,-2), red+2);
draw((-3,-2)--(-2,-2), red+2);
draw((-2,-2)--(2,2), red+2);
draw((2,2)--(3,2), red+2);
draw((3,2)--(6,-1), red+2);
}
}
\begin{enumerate}
\item Using the interpretation of the definite integral in terms of net signed area between the function and the $x$-axis, find
\begin{enumerate}
\item $\displaystyle \int_{-5}^0f(x)\,dx$
\item $\displaystyle \int_{-2}^5f(x)\,dx$
\end{enumerate}
\item If we define the function $\displaystyle g(t)=\int_{-6}^t f(x)\,dx$, on what intervals is
\begin{enumerate}
\item $g(t)$ increasing?
\item $g(t)$ decreasing?
\end{enumerate}
\end{enumerate}
\answer{\begin{enumerate}
\item \begin{enumerate}
\item $-6$
\item $4$
\end{enumerate}
\item \begin{enumerate}
\item Increasing on $(-6,-5)\cup(0,5)$
\item Decreasing on $(-5,0)\cup(5,6)$
\end{enumerate}
\end{enumerate}}

\begin{problemblock}[2]{Use the interpretation of the definite integral as the net signed area to find:}

\addtoanswerkey{\begin{multicols}{2}}

\item $\displaystyle\int_0^2 3x\d{x}$
\answer{$\displaystyle 6$}

\item $\displaystyle\int_{-1}^4 6\d{x}$
\answer{$\displaystyle 30$}

\item $\displaystyle\int_0^3(2x-4)\d{x}$
\answer{$\displaystyle -3$}

\item $\displaystyle\int_{-4}^3(-x)\d{x}$
\answer{$\displaystyle\frac{7}{2}$}

\end{problemblock}

\addtoanswerkey{\end{multicols}}

\item Find $\displaystyle\int_{-r}^0\sqrt{r^2-x^2}\d{x}$ by interpreting the integral as an area.  Here $r>0$ is a positive constant.
\answer{Notice that the area can be viewed as the quarter of a circle:

\resizebox{0.4\textwidth}{!}{
\asycode{%
import graph;
size(150,0);
real f(real x) {return sqrt(1-x^2);}
pair F(real x) {return (x,f(x));}
draw(graph(f,-1,0,operator ..),red+2);
xaxis("$x$",xmin=-1.2,xmax=1.2,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=1,Size=3,Label(fontsize(10)),OmitFormat(-1),OmitTick(1)),above=true);
yaxis("$y$",ymin=0,ymax=1.2,Arrow(HookHead,size=4),above=true);
labelx("$-r$",-1);
}
}

Then the integral is $\displaystyle\frac{1}{4}\left(\pi r^2\right)$.  (Since the area is above the $x$-axis the integral is positive.)}

\item Simplify the following to a single definite integral using the properties of the definite integral.
\[\int_{-1}^7\!f(x)\,dx+\int_3^{-1}\!f(x)\,dx+\int_7^9\!f(x)\,dx\]
\answer{$\displaystyle\int_3^9\!f(x)\,dx$}

\begin{problemblock}{Use Riemann sums with right endpoint evaluation to evaluate the following definite integrals.}

\item $\displaystyle\int_0^3 \left(x^3+1\right)dx$
\answer{$S_n=\displaystyle\frac{3}{n}\left(\frac{27n^4+54n^3+27n^2}{4n^3}+n\right)= \frac{93n^2+162n+81}{4n^2}$\newline
and so $\displaystyle\int_0^3\left(x^3+1\right)dx=\lim_{n\to\infty} S_n=\frac{93}{4}$.}

\item $\displaystyle\int_0^b x^2\d{x}$ where $b>0$ is constant
\answer{$S_n=\displaystyle b^3\left(\frac{1}{3}+\frac{1}{2n}+\frac{1}{6n^2}\right)$ and so $\displaystyle\int_0^b x^2\d{x}=\lim_{n\to\infty} S_n=\frac{b^3}{3}$.}

\end{problemblock}
