\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}
\centerline{MATH 136 -- Calculus 2}
\centerline{Practice Day on Areas Between Curves and Average Values}
\centerline{March 9, 2020}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
We will now return to Chapter 6 and look at some applications of integration.
We will start with two rather simple first ways we can use integrals to 
compute other quantities.
\begin{itemize}
\item {\it Areas between curves:}  
If $y = f(x)$ and $y = g(x)$ are two graphs, with $f(x) \ge g(x)$ for all $x$ in $[a,b]$
then the area between the two graphs is computed by the integral 
$${\rm Area} = \int_a^b \text{top curve} - \text{bottom curve}\ dx = \int_a^b f(x) - g(x)\ dx.$$
If the graphs cross for $x$ in the interval, then the top and bottom curve will 
interchange.  In this case, the area can be computed by the integral
$${\rm Area} = \int_a^b |f(x) - g(x)|\ dx.$$
In practice, though, to compute areas in cases like this, we would use the interval union 
property and split this into two or more integrals over intervals where the top and bottom 
curves do not change.  
\item {\it Average values:}  If $f(x)$ is integrable on $[a,b]$, then we can find a 
number $\overline{y}$ such that 
$$\int_a^b f(x)\ dx = \overline{y}(b - a).$$
This $\overline{y}$ is called the average value of $f$ on the interval $[a,b]$.  Note that
we can derive the following formula for $\overline{y}$ by dividing through by the constant
$b - a$:
$$\overline{y} = \frac{1}{b - a} \int_a^b f(x)\ dx.$$ 
In other words, $\overline{y}$ is the height of a rectangle on the same base $[a,b]$ whose
(signed) area is the same as the area of the region between the graph $y = f(x)$ and the
$x$-axis.  If $f(x)$ is continuous on $[a,b]$, then the {\it Mean Value Theorem for Integrals}
says that $\overline{y} = f(c)$ for some $c$ in $[a,b]$.  
\end{itemize}
\vskip 10pt
\noindent
{\it Questions}
\vskip 10pt
\begin{enumerate}
\item Find the area between $y = \sin(x)$ and $y = \cos(x)$ for $x$ in $[-\pi/4,\pi/4]$.
(Draw the region to start.)
\item[] {\it Solution:} On this interval, $y = \cos(x)$ always lies above $y = \sin(x)$, so the area is 
\begin{align*}
\int_{-\pi/4}^{\pi/4} \cos(x) - \sin(x)\ dx &= \left. \sin(x) + \cos(x)\right|_{-\pi/4}^{\pi/4}\\
&= \frac{\sqrt{2}}{2} + \frac{\sqrt{2}}{2} + \frac{\sqrt{2}}{2} - \frac{\sqrt{2}}{2}\\
&= \sqrt{2}.
\end{align*} 
\item Find the area bounded by $y = x^2$ and $y = x + 2$. (Note: This means the area of 
the bounded region above the parabola and below the line, but not any other area between
those curves.)  
\item[] {\it Solution:} The parabola crosses the line where $x^2 = x + 2$, or $x^2 - x - 2 = (x-2)(x+1) = 0$.
The roots are $x = -1$ and $x = 2$.  The area is 
$$\int_{-1}^2 x+2 - x^2\ dx = \left. \frac{x^2}{2} + 2x - \frac{x^3}{3}\right|_{-1}^2 = \frac{9}{2}.$$
\item Find the area between $y = x^2$ and $y = x + 2$ for $x$ in $[-3,3]$.  (Draw the region.)
\item[] {\it Solution:}  From the previous question, we know the parabola crosses over the 
line at $x = -1$ and again at $x = 2$.  The area we want is
\begin{align*}
\int_{-3}^{-1} x^2 - (x + 2)\ dx &+ \int_{-1}^2 x + 2 - x^2\ dx + \int_2^3 x^2 - (x + 2)\ dx\\
&= \frac{26}{3} + \frac{9}{2} + \frac{11}{6}\\
&= \frac{52 + 27 + 11}{6}\\ 
&= 15.
\end{align*}
\item Find the average value of $f(x) = x e^{-x}$ for $x$ in $[0,3]$.  Approximate the $x = c$ 
such that $f(c) = \overline{y}$ as in the Mean Value Theorem for Integrals.  
(Note:  There is no convenient way to 
solve for $x$ in an equation $x e^{-x} = k$ using just algebra.)
\item[] {\it Solution:}  The average value is found like this (integrate by parts or use a table): 
$$\frac{1}{3 - 0} \int_0^3 x e^{-x}\ dx = \frac{1}{3}\left(\left. -xe^{-x} - e^{-x}\right|_0^3\right) = 
\frac{1}{3}(1 - 4e^{-3}) \doteq 0.267.$$
We need to solve $.267 = x e^{-x}$.  Plotting with a graphing calculator, we can see the solution
is $c \doteq 0.397$.  
\item Find the average value of $f(x) = \sqrt{16 - x^2}$ for $x$ in $[0,3]$. Find the $x = c$ 
such that $f(c) = \overline{y}$ as in the Mean Value Theorem for Integrals.
\item[] {\it Solution:}  The average value is 
$$\frac{1}{3 - 0} \int_0^3 \sqrt{16 - x^2}\ dx.$$
Using a table of integrals, this is 
$$\frac{1}{3}\left(\frac{x\sqrt{16 - x^2}}{2} + 8\sin^{-1}(x/4)\right)$$
Evaluating between $0$ and $3$ we get 
$$\frac{1}{3}\left(\frac{3\sqrt{7}}{2} + 8\sin^{-1}(3/4)\right) \doteq 3.584$$
Then we solve for $x$:
$$3.584 = \sqrt{16 - x^2} \Rightarrow x = \sqrt{16 - (3.584)^2} \doteq 1.775$$
\end{enumerate}
\end{document}
