\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{ulem} % for strikethrough \sout{...} command
\usepackage{color}
\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{10in}
\setlength{\textwidth}{7.5in}


\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepackage{tikz}
\usepgfplotslibrary{fillbetween}

%\newcommand{\bdot}{\, {\bf \cdot} \,}
\newcommand{\bdot}{\, {\scriptstyle{\bullet}} \,}
\newcommand{\B}[1]{{\bf {#1}}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}

\newcommand{\force}{{$\mbox{\;}$}}

\newcommand{\myspace}{\mbox{\parbox[c][0.4in]{0.4in}{\hfill}}}  % height then width
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}

\begin{document}

\pagestyle{empty}

\noindent
\parbox{2in}{\bf Math 1120 Form A}
\hfill {\Large \bf Test \#1} \hfill
\parbox{2in}{\bf \hfill Sept. $13^\mathrm{th}$, 2021}

\vspace{0.15in}

\noindent {\large\bf Name:} \underline{\hskip 3.0 truein}
\hfill {\bf Be sure to show your work!}

\vspace{0.1in}

\noindent {\bf \large 1. (15 points)} Approximations

\begin{enumerate}[(a)]
\item Approximate $\displaystyle \int_{-1}^5 \sin(x^2+1)\,dx$ using $n=3$ trapezoids (i.e., compute $T_3$). {\bf Don't bother simplifying}.

\vspace{1.5in}

\force
\hfill
\begin{tikzpicture}[
  declare function={
    f(\x)= (\x-3.25)^4/9+2;      
  }
]
\begin{axis}[
  axis x line=middle, axis y line=middle,
  width=8cm, height=8cm,     % size of the image
  ymin=-0.8, ymax=12, ytick={0}, ylabel=$y$,
  xmin=-0.1, xmax=2.5, xtick={0}, xlabel=$x$,
]

\addplot[blue, ultra thick, domain=0.25:2.25, smooth]{f(x)};

\addplot[black, ultra thick, domain=-0.2:0.3]({0.25},{x});
\addplot[black, ultra thick, domain=-0.2:0.3]({1.25},{x});
\addplot[black, ultra thick, domain=-0.2:0.3]({2.25},{x});

\node at (axis cs:0.25,-0.6) {$a$};
\node at (axis cs:2.25,-0.6) {$b$};
\end{axis}
\end{tikzpicture} 

\vspace{-2.25in}

\item A graph of $y=f(x)$ where $a \leq x \leq b$ is shown to the right. Draw the\\ \underline{\bf midpoint} rule approximation of $I=\displaystyle \int_a^b f(x)\,dx$ using \underline{\bf $n=2$ rectangles}.

\item Using the same graph to the right, rank the integral $I=\displaystyle \int_a^b f(x)\,dx$ as\\ well as $L_n$, $R_n$, $M_n$, and $T_n$ (the left, right, midpoint, and trapezoid rule)\\ approximations from smallest to largest. 

For example: $I \leq L_n \leq R_n \leq M_n \leq T_n$ is definitely wrong.

\fbox{\myspace} \  $\leq$ \  \fbox{\myspace}  \  $\leq$ \  \fbox{\myspace} \  $\leq$ \  \fbox{\myspace} \  $\leq$ \  \fbox{\myspace}

% Remove for time:
% d) Error bound for X when $n=5$ is Y. What is error bound for X when $n=15$?
% e) $L_n=3$, $R_n=7$, $M_n=2$. What are $T_n$ and $S_{2n}$?

\end{enumerate}

\vspace{0.1in}

\noindent {\bf \large 2. (14 points)} Compute the following integrals. Please simplify answers.

\begin{enumerate}[(a)]
\item $\displaystyle \int (x^2-2x+4)\sin(x^3-3x^2+12x+1)\,dx$

\vfill

\item $\displaystyle \int \dfrac{2\ln(x)}{x}\,dx$

\vfill

\item $\displaystyle \int_1^2 3x^2e^{x^3-1}\,dx$

\vfill

\end{enumerate}

\newpage

\noindent {\bf \large 3. (14 points)} Differential Equations. Please simplify your answers.

\begin{enumerate}[(a)]
\item Find a general solution of $\dfrac{dy}{dx} = (\cos(x)+1)y$.

\vfill

\item Solve the following initial value problem: $\dfrac{dy}{dx} = \dfrac{e^x+3x^2}{2y}$ where $y(0)=-5$ (i.e., $y=-5$ when $x=0$).

\vfill

\end{enumerate}

\noindent {\bf \large 4. (10 points)} Find the area between $x=y^2$ and $x=2-y^2$.

\vfill

\noindent {\bf \large 5. (14 points)} Consider the region bounded by $y=\sqrt{x}$, the $x$-axis, and $x=4$. We rotate this region about some axis to obtain a solid of revolution.

\begin{enumerate}[(a)]
\item Find the volume of the solid obtained when rotating our region about the $x$-axis.

\vfill

\item Set up an integral that computes the volume of the solid obtained when rotating our region about the line $y=3$.\\
\force \hfill {\bf Do not evaluate your integral.}

\vspace{1in}

\end{enumerate}

\newpage

\noindent {\bf \large 6. (12 points)} We have a pyramid that is 8 feet tall and has a square base that is 3 feet by 3 feet. 
\begin{enumerate}[(a)]
\item Sketch a picture of this pyramid. Sketch a horizontal slice. 
\item Give a formula for the volume of a horizontal slice of the pyramid. Clearly label your variables.
\item Set up an integral that computes the volume of this pyramid.\\
\force \hfill {\bf You do not need to evaluate your integral.} {\it Note:} The volume is 24 cubic feet.
\end{enumerate}

\vfill

\vfill

\noindent {\bf \large 7. (8 points)} %Arc Length
%
%\begin{enumerate}[(a)]
%\item Compute the arc length of the portion of the graph of $y=2x^{3/2}$ where $0 \leq x \leq 1$.
%
%\vfill
%
%\item 
Set up an integral which computes the arc length of $y=\sin(x)$ where $-\pi \leq x \leq 2\pi$.\\
\force \hfill {\bf Do not try to evaluate this integral.}

\vspace{1.25in}

%\end{enumerate}

\noindent {\bf \large 8. (13 points)} We have a cylindrical tank with radius $2$ feet that is $10$ feet tall. The tank is half filled with a liquid which weights $5$  lbs. per cubic foot. Suppose we pump this liquid just over the rim of the top of the tank. Compute the work done.

\vspace{0.1in}

\force \hfill
\begin{tikzpicture}
\begin{axis}[
  %axis x line=middle, axis y line=middle,
  axis x line = none,
  axis y line = none,
  ticks = none,
  width=1.5in, height=2.5in,     % size of the image = rigged to keep scaling=constrained
  ymin=-1, ymax=10.6, % ytick={0}, ylabel=$y$,
  xmin=-2.5, xmax=4.25, % xtick={0}, xlabel=$x$,
]

\addplot[name path=A, domain=0:180, ultra thick, blue] ({2*cos(x)},{sin(x)/2+5});
\addplot[name path=B, domain=180:360, ultra thick] ({2*cos(x)},{sin(x)/2});

\addplot[domain=180:360, ultra thick, blue] ({2*cos(x)},{sin(x)/2+5});
\addplot[domain=0:180, ultra thick, blue] ({2*cos(x)},{sin(x)/2});
\addplot[domain=0:1, ultra thick, blue] ({1.78*x},{-0.227*x});

\addplot[blue!10] fill between[of=A and B];

\addplot[domain=0:360, ultra thick] ({2*cos(x)},{sin(x)/2+10});
\addplot[domain=180:360, ultra thick] ({2*cos(x)},{sin(x)/2});

\addplot[domain=0:10, ultra thick] ({2},{x});
\addplot[domain=0:10, ultra thick] ({-2},{x});

\node at (axis cs:2.2,-0.8) {$2$ft.};

\addplot[domain=0:7, ultra thick] ({2.65},{x});
\addplot[domain=8:10, ultra thick] ({2.65},{x});
\addplot[domain=-0.2:0.2, ultra thick] ({x+2.65},{0});
\addplot[domain=-0.2:0.2, ultra thick] ({x+2.65},{10});

\node at (axis cs:3.25,7.5) {$10$ft.};

%\node at (axis cs:-4,-1.3) {$\Delta x=8$};
%\node [rotate=90] at (axis cs:9.4,0.95) {$\Delta y=2$};
%\node [fill=black, shape=circle, inner sep=1pt, label=below:{$(-4,1)$}] at (axis cs: -4,1) {};

\end{axis}
\end{tikzpicture}


\vfill

%\noindent {\bf \large X. (XX points)} Water is pressing against the size of a rectangular tank. The tank is $3$ meters wide and $5$ meters tall. Set up an integral that computes the hydrostatic force on that wall. {\it Note:} The mass of water is $\rho=1000$ kg. per cubic meter and the acceleration due to gravity  is approximately $g=9.8$ (i.e., $\rho g=9800$). {\bf Don't bother evaluating your integral. Also, don't worry about simplifying.} 
%
%\vfill

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\noindent
\parbox{2in}{\bf Math 1120 Form B}
\hfill {\Large \bf Test \#1} \hfill
\parbox{2in}{\bf \hfill Sept. $13^\mathrm{th}$, 2021}

\vspace{0.15in}

\noindent {\large\bf Name:} \underline{\hskip 3.0 truein}
\hfill {\bf Be sure to show your work!}

\vspace{0.1in}

\noindent {\bf \large 1. (15 points)} Approximations

\begin{enumerate}[(a)]
\item Approximate $\displaystyle \int_{-4}^2 \cos(x^2+1)\,dx$ using $n=3$ trapezoids (i.e., compute $T_3$). {\bf Don't bother simplifying}.

\vspace{1.5in}

\force
\hfill
\begin{tikzpicture}[
  declare function={
    f(\x)= 9-(\x+0.75)^4/9+2;      
  }
]
\begin{axis}[
  axis x line=middle, axis y line=middle,
  width=8cm, height=8cm,     % size of the image
  ymin=-0.8, ymax=12, ytick={0}, ylabel=$y$,
  xmin=-0.1, xmax=2.5, xtick={0}, xlabel=$x$,
]

\addplot[blue, ultra thick, domain=0.25:2.25, smooth]{f(x)};

\addplot[black, ultra thick, domain=-0.2:0.3]({0.25},{x});
\addplot[black, ultra thick, domain=-0.2:0.3]({1.25},{x});
\addplot[black, ultra thick, domain=-0.2:0.3]({2.25},{x});

\node at (axis cs:0.25,-0.6) {$a$};
\node at (axis cs:2.25,-0.6) {$b$};
\end{axis}
\end{tikzpicture} 

\vspace{-2.25in}

\item A graph of $y=f(x)$ where $a \leq x \leq b$ is shown to the right. Draw the\\ \underline{\bf midpoint} rule approximation of $I=\displaystyle \int_a^b f(x)\,dx$ using \underline{\bf $n=2$ rectangles}.

\item Using the same graph to the right, rank the integral $I=\displaystyle \int_a^b f(x)\,dx$ as\\ well as $L_n$, $R_n$, $M_n$, and $T_n$ (the left, right, midpoint, and trapezoid rule)\\ approximations from smallest to largest. 

For example: $I \leq L_n \leq R_n \leq M_n \leq T_n$ is definitely wrong.

\fbox{\myspace} \  $\leq$ \  \fbox{\myspace}  \  $\leq$ \  \fbox{\myspace} \  $\leq$ \  \fbox{\myspace} \  $\leq$ \  \fbox{\myspace}

% Remove for time:
% d) Error bound for X when $n=5$ is Y. What is error bound for X when $n=15$?
% e) $L_n=3$, $R_n=7$, $M_n=2$. What are $T_n$ and $S_{2n}$?

\end{enumerate}

\vspace{0.1in}

\noindent {\bf \large 2. (14 points)} Compute the following integrals. Please simplify answers.

\begin{enumerate}[(a)]
\item $\displaystyle \int (x^2-2x+5)\cos(x^3-3x^2+15x+8)\,dx$

\vfill

\item $\displaystyle \int \dfrac{2\ln(x)}{x}\,dx$

\vfill

\item $\displaystyle \int_0^1 3x^2e^{x^3-1}\,dx$

\vfill

\end{enumerate}

\newpage

\noindent {\bf \large 3. (14 points)} Differential Equations. Please simplify your answers.

\begin{enumerate}[(a)]
\item Find a general solution of $\dfrac{dy}{dx} = (\sin(x)+99)y$.

\vfill

\item Solve the following initial value problem: $\dfrac{dy}{dx} = \dfrac{4x^3+e^x}{2y}$ where $y(0)=-2$ (i.e., $y=-2$ when $x=0$).

\vfill

\end{enumerate}

\noindent {\bf \large 4. (10 points)} Find the area between $x=y^2$ and $x=2-y^2$.

\vfill

\noindent {\bf \large 5. (14 points)} Consider the region bounded by $y=\sqrt{x}$, the $x$-axis, and $x=4$. We rotate this region about some axis to obtain a solid of revolution.

\begin{enumerate}[(a)]
\item Find the volume of the solid obtained when rotating our region about the $x$-axis.

\vfill

\item Set up an integral that computes the volume of the solid obtained when rotating our region about the line $y=3$.\\
\force \hfill {\bf Do not evaluate your integral.}

\vspace{1in}

\end{enumerate}

\newpage

\noindent {\bf \large 6. (12 points)} We have a pyramid that is 9 feet tall and has a square base that is 5 feet by 5 feet. 
\begin{enumerate}[(a)]
\item Sketch a picture of this pyramid. Sketch a horizontal slice. 
\item Give a formula for the volume of a horizontal slice of the pyramid. Clearly label your variables.
\item Set up an integral that computes the volume of this pyramid.\\
\force \hfill {\bf You do not need to evaluate your integral.} {\it Note:} The volume is 75 cubic feet.
\end{enumerate}

\vfill

\vfill

\noindent {\bf \large 7. (8 points)} %Arc Length
%
%\begin{enumerate}[(a)]
%\item Compute the arc length of the portion of the graph of $y=2x^{3/2}$ where $0 \leq x \leq 1$.
%
%\vfill
%
%\item 
Set up an integral which computes the arc length of $y=\cos(x)$ where $-2\pi \leq x \leq 3\pi$.\\
\force \hfill {\bf Do not try to evaluate this integral.}

\vspace{1.25in}

%\end{enumerate}

\noindent {\bf \large 8. (13 points)} We have a cylindrical tank with radius $1$ foot that is $6$ feet tall. The tank is half filled with a liquid which weights $20$  lbs. per cubic foot. Suppose we pump this liquid just over the rim of the top of the tank. Compute the work done.

\vspace{0.1in}

\force \hfill
\begin{tikzpicture}
\begin{axis}[
  %axis x line=middle, axis y line=middle,
  axis x line = none,
  axis y line = none,
  ticks = none,
  width=1.5in, height=2.5in,     % size of the image = rigged to keep scaling=constrained
  ymin=-1.1, ymax=10.6, % ytick={0}, ylabel=$y$,
  xmin=-2.5, xmax=4.25, % xtick={0}, xlabel=$x$,
]

\addplot[name path=A, domain=0:180, ultra thick, blue] ({2*cos(x)},{sin(x)/2+5});
\addplot[name path=B, domain=180:360, ultra thick] ({2*cos(x)},{sin(x)/2});

\addplot[domain=180:360, ultra thick, blue] ({2*cos(x)},{sin(x)/2+5});
\addplot[domain=0:180, ultra thick, blue] ({2*cos(x)},{sin(x)/2});
\addplot[domain=0:1, ultra thick, blue] ({1.78*x},{-0.227*x});

\addplot[blue!10] fill between[of=A and B];

\addplot[domain=0:360, ultra thick] ({2*cos(x)},{sin(x)/2+10});
\addplot[domain=180:360, ultra thick] ({2*cos(x)},{sin(x)/2});

\addplot[domain=0:10, ultra thick] ({2},{x});
\addplot[domain=0:10, ultra thick] ({-2},{x});

\node at (axis cs:2.2,-0.8) {$1$ft.};

\addplot[domain=0:7, ultra thick] ({2.65},{x});
\addplot[domain=8:10, ultra thick] ({2.65},{x});
\addplot[domain=-0.2:0.2, ultra thick] ({x+2.65},{0});
\addplot[domain=-0.2:0.2, ultra thick] ({x+2.65},{10});

\node at (axis cs:3.25,7.5) {$6$ft.};

%\node at (axis cs:-4,-1.3) {$\Delta x=8$};
%\node [rotate=90] at (axis cs:9.4,0.95) {$\Delta y=2$};
%\node [fill=black, shape=circle, inner sep=1pt, label=below:{$(-4,1)$}] at (axis cs: -4,1) {};

\end{axis}
\end{tikzpicture}


\vfill

%\noindent {\bf \large X. (XX points)} Water is pressing against the size of a rectangular tank. The tank is $3$ meters wide and $5$ meters tall. Set up an integral that computes the hydrostatic force on that wall. {\it Note:} The mass of water is $\rho=1000$ kg. per cubic meter and the acceleration due to gravity  is approximately $g=9.8$ (i.e., $\rho g=9800$). {\bf Don't bother evaluating your integral. Also, don't worry about simplifying.} 
%
%\vfill

\end{document}