\documentclass{amsart}

\usepackage{graphics}
\usepackage{calculus}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\everymath{\displaystyle}

\title{Math 165: Honors Calculus I\\
Assignment 11 Solutions}

\newcommand{\problem}[1]{\bigskip\textbf{Problem #1}\ }


\begin{document}

\maketitle

\problem{1}
Let $A = \bigg\{1 + \frac{1}{n} - \frac{1}{m}\;\big|\;n,m\in \N\bigg\}$.
Prove that $\sup A = 2$ and $\inf A = 0$.

\begin{proof}
We first show $\sup A = 2$.  For any $n,m\in\N$, $\frac{1}{n} \le 1$
and $-\frac{1}{m} < 0$, so
  \[
  1 + \frac{1}{n} - \frac{1}{m} \le 1 + 1 -\frac{1}{m} < 2
  \]
Thus, $2$ is an upper bound for~$A$. Since $\sup A$ is the \emph{least}
upper bound, it is $\le$ any other upper bound; in particular, $\sup A \le
2$. To show $\sup A = 2$, we eliminate the other possibility, $\sup A < 2$,
by showing that leads to a contradiction. So suppose $h = \sup A < 2$.
Since $2-\frac{1}{m} \in A$ for all $m\in \N$, and $h$ is an upper bound
for~$A$, we get $2 - \frac{1}{m} \le h < 2$ for all $m\in \N$.
But this implies that $m \le \frac{1}{2-h}$ for all $m\in \N$. We know this
is impossible becase $\N$ is unbounded. In fact, $\left[\frac{1}{2-h}\right]
+ 1$ is a positive integer that is greater than $\frac{1}{2-h}$. This
contradiction implies that $\sup A = 2$.

Now we prove $\inf A = 0$. Since $\frac{1}{n} > 0$ and $-\frac{1}{m} \ge
-1$ for all $n,m\in \N$, we get
  \[
  1 + \frac{1}{n} - \frac{1}{m} \ge 1 + \frac{1}{n} - 1 > 0
  \]
So, 0 is a lower bound for~$A$. Since $\inf A$ is the \emph{greatest}
lower bound, $\inf A \ge 0$. Suppose $k = \inf A > 0$. Then, since
$\frac{1}{n}\in A$ for all $n\in\N$ and $k$ is a lower bound for $A$,
$0 < k \le \frac{1}{n}$ for all $n\in \N$. This implies that $n
\le 1/k$ for all $n\in\N$ which is clearly impossible. In fact,
$\left[\frac{1}{k}\right]+1$ is a positive integer that is greater than
$\frac{1}{k}$. This contradiction implies that $\inf A = 0$.
\end{proof}

\problem{2} Define
  \[
  f(x) =\left\{\begin{array}{ll}
        0 &\mbox{if $x = 1/n$ for some $n\in \N$}\\
        1 &\mbox{otherwise}\\
        \end{array}\right.
  \]
Prove that $f(x)$ is integrable on $[0,1]$.

\begin{proof} Fix $n\in \N$ and define a step function $s_n$ by
  \[ s_n(x) = \left\{\begin{array}{ll}
           0    & \mbox{if $0 \le x \le 1/n$}\\
           f(x) & \mbox{if $1/n < x \le 1$}
           \end{array}\right.
  \]
  \[
  \resizebox{1.5in}{!}{\includegraphics{assign11.eps}}
  \]
A partition for $s_n$ is given by the points  $x_0=0$, $x_1=1/n$,
$x_2=1/(n-1)$, \ldots, $x_{n-1} = 1/2$, $x_n = 1$.  Define a second step
function by $t(x) = 1$ for $0 \le x \le 1$. Then
  \[ s_n(x) \le f(x) \le t(x)\ \mbox{for all $0\le x \le1$} \]

The integrals of these steps functions are easy to calculate:
  \begin{eqnarray*}
  \int_0^1 s_n &=& \sum_{k=1}^n s_k(x_k - x_{k-1})
                =  0(x_1 - x_0) + \sum_{k=2}^n 1(x_k - x_{k-1})\\
               &=& x_n - x_1 = 1 - \frac{1}{n}\\
  \int_0^1 t &=& 1
  \end{eqnarray*}
Since $\int_0^1 s \le \underline{I}(f) \le \overline{I}(f) \le \int_0^1 t$
for any step functions satisfying $s(x) \le f(x) \le t(x)$ on $[0,1]$,
we see that
  \[ 1 - \frac{1}{n} \le \underline{I}(f) \le \overline{I}(f) \le 1 \]
and these inequlities must hold for any $n\in\N$. Since $I = 1$ is the
only number that satisfies
  \[ 1 - \frac{1}{n} \le I \le  1 \quad \mbox{for all $n \in \N$} \]
we conclude that $\underline{I}(f) = \overline{I}(f) = 1$. Therefore $f$
is integrable and $\int_0^1 f = 1$.
\end{proof}

\problem{3} Use Theorem 1.14 to find an approximation to the integral $\int_1^2
\frac{1}{x}\,dx$ so that the error is $< .05$.

\bigskip
\emph{Solution.}
The function $f(x) = \frac{1}{x}$ is decreasing on $[1,2]$. The partition
points for $n$ subintervals of equal length are given by $x_k = 1 +
k\frac{1}{n}$, for $k = 1,\ldots,n$.
Let
  \[
  B_n = \frac{1}{n}\sum_{k=1}^nf(x_k)
      = \frac{1}{n}\sum_{k=1}^n\frac{1}{1+k\frac{1}{n}} 
      = \sum_{k=1}^n\frac{1}{n+k}
  \]
By Theorem~1.14,
  \[
  B_n \le \int_1^2 \frac{1}{x}\, dx \le B_n + E_n
  \]
where
  \[
   E_n = \frac{(f(1) - f(2))(2 -1)}{n} =  \frac{1}{2n}
  \]
If we take our approximation to be the midpoint of the interval $[B_n,
B_n + E_n]$, namely $A_n = B_n + E_n/2$, then the true value of the
integral will lie with $\pm E_n/2$ of $A_n$. We would like this error to be
less than $0.05$:
  \[
  \frac{1}{2}E_n < 0.05 \Longleftrightarrow \frac{1}{4n}
  < 0.05 \Longleftrightarrow n > \frac{1}{4\cdot0.05} =  5
  \]
Therefore, the desired approximation is
  \begin{eqnarray*}
  A_6 &=& B_6 + \frac{1}{2}E_6\\
      &=& \bigg(\frac{1}{6+1} + \frac{1}{6+2} + \frac{1}{6+3}+ \frac{1}{6+4}+
          \frac{1}{6+5} + \frac{1}{6+6}\bigg)  +  \frac{1}{2}\frac{1}{2\cdot6}\\
      &=& 0.694877
  \end{eqnarray*}
The actual value of this integral is $\log(2) = 0.693147$ and the error of
our approximation is $0.694877 -  0.693147 = 0.00173 < 0.05$.
\end{document}
