%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                           %
%  Area Under a Curve                       %
%                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\problemgrouptitle{Areas Under a Curve}

\item Let $A$ be the area of the region $\mathcal{R}$ bounded by the $x$-axis, the lines $x=1$ and $x=4$, and the curve $f(x)=2x^2-x+2$ shown below:
\begin{center}
\resizebox{.4\textwidth}{!}{
\asycode{%
import graph;
size(200,200,IgnoreAspect);
real f(real x) {return 2*x^2-x+2;}
pair F(real x) {return (x,f(x));}
draw(graph(f,0,5,operator ..),red+2);
xaxis(shift(-7,-10)*Label("$x$",align=E),xmax=5.5,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=1,Size=3,Label(fontsize(10))),above=true);
yaxis(shift(-8,-7)*Label("$y$",align=N),ymin=0,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=10,Size=3,Label(fontsize(10))),above=true);
xequals(1,0,f(1),dashed);
xequals(4,0,f(4),dashed);
label("$\mathcal{R}$",(2.5,f(2.5)/2),E);
}
}
\end{center}
\begin{enumerate}[label=(\alph*)]
\item\label{itm:riemann} Write a formula for the $n^\text{th}$ sum $S_n$ approximating $A$ using right endpoints of the approximating rectangles.
\item Use $A=\displaystyle\lim_{n\to\infty}S_n$ and your answer from \ref*{itm:riemann} to calculate $A$.
\end{enumerate}
\answer{
\begin{enumerate}
\item $\displaystyle S_n=\frac{3}{n}\sum_{i=1}^nf\left(1+\displaystyle\frac{3i}{n}\right)=\sum_{i=1}^n\left(\frac{9}{n}+\frac{27i}{n^2}+\frac{54i^2}{n^3}\right)=\frac{81}{2}+\frac{81}{2n}+\frac{9}{n^2}$
\item $A=\displaystyle\lim_{n\to\infty}S_n=\frac{81}{2}$
\end{enumerate}
}
