\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,fancyhdr,epic,eepic,multicol,graphicx}

\renewcommand{\baselinestretch}{1.1}

\theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newtheorem*{answer}{Answer}

\newcommand{\bp}{\begin{problem}}
\newcommand{\ep}{\end{problem}}
\newcommand{\ba}{\begin{answer}}
\newcommand{\ea}{\end{answer}}
\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}


\fancyhead[L]{\Large \textbf{Math 157 Fall 2013}}
\fancyhead[R]{\large \textbf{Homework 1 - selected answers}}



\begin{document}
\pagestyle{fancy}
\fancyfoot[R,L,C]{}

\bp [Problem 1d in Section 1 page 8] Compute the area of the region defined as follows.  The base is a
horizontal line segment of length $b$.   If we choose an arbitrary point on the base
of this figure distance $x$ from the left hand corner, then the vertical
distance from this point to the curve is $2x^2+1$.
\ba
Bound the region in question by two rectangular regions obtained by
inscribing $n$ rectangles of equal width and circumscribing $n$
rectangles of equal width, as in the pictures below:

\begin{center}
\includegraphics[scale=0.3]{hw1-leftsum.pdf}
\includegraphics[scale=0.3]{hw1-curve.pdf}  \includegraphics[scale=0.3]{hw1-rightsum.pdf}
\end{center}

Let $s_n$ be the area of the inscribed rectangular region, let $A$ be
the area of the curved region, and $S_n$ be
the area of the circumscribed rectangular region.  We have
$$s_n<A < S_n.$$
Note, 
\begin{align*}
s_n&=\frac{b}{n}(2(0)^2+1)+\frac{b}{n}\left(2 \left(\frac{b}{n}\right)^2 +1 \right)+
\frac{b}{n}\left( 2 \left(\frac{2b}{n}\right)^2 +1 \right)+
\cdots+
\frac{b}{n}\left( 2\left(\frac{(n-1)b}{n}\right)^2 +1 \right)\\
&=\frac{b}{n} \left( 1+2 \left(\frac{b}{n}\right)^2 +1+
 2 \left(\frac{2b}{n}\right)^2 +1+
\cdots +
 2\left(\frac{(n-1)b}{n}\right)^2 +1 \right)\\
&=\frac{b}{n} \left( 2 \left(\frac{b}{n}\right)^2 +
 2 \left(\frac{2b}{n}\right)^2 +
\cdots +
 2\left(\frac{(n-1)b}{n}\right)^2 +n \right)\\
&=\frac{b}{n} \left( 2 \left(\frac{b}{n}\right)^2 +
 2 \left(\frac{2b}{n}\right)^2 +
\cdots +
 2\left(\frac{(n-1)b}{n}\right)^2\right)+ b\\
&=2\frac{b^3}{n^3} \left( 1^2+2^2+\cdots +(n-1)^2\right)+ b\\
\end{align*} 
Similarly, 
\begin{align*}
S_n&=\frac{b}{n}\left(2 \left(\frac{b}{n}\right)^2 +1 \right)+
\frac{b}{n}\left( 2 \left(\frac{2b}{n}\right)^2 +1 \right)+
\cdots+
\frac{b}{n}\left( 2\left(\frac{nb}{n}\right)^2 +1 \right)\\
&=2\frac{b^3}{n^3} \left( 1^2+2^2+\cdots +n^2\right)+ b\\
\end{align*} 
By the inequalities previously established, we know
$$1^2+2^2 + \cdots + (n-1)^2 < \frac{n^3}{3}<1^2+2^2+\cdots n^2$$
so
$$s_n<2\frac{b^3}{n^3}\frac{n^3}{3} + b =2\frac{b^3}{3}+b \text{
  and }S_n >2\frac{b^3}{n^3}\frac{n^3}{3} + b =2\frac{b^3}{3}+b.$$
Therefore, we have both $$s_n < 2\frac{b^3}{3}+b<S_n \text{ and }
s_n < A <S_n.$$
Since $S_n-s_n$ can be made arbitrarily small, by choosing $n$ large
enough, there is only one number that lies between $s_n$ and $S_n$ for
all $n$.  We conclude that $A=2\frac{b^3}{3}+b.$
\ea
\ep

\bp [Problem 20 in Section 2 page 16]
\ben
\item Prove that one of the following two formulas about sets is always
right and the other is sometimes wrong:
\begin{gather*}
A-(B-C)=(A-B)\cup C\\
A-(B\cup C)=(A-B)-C
\end{gather*}
\ba Here is a proof that $(A-B)-C=A-(B\cup C)$ for any sets $A,B$, and $C$.

\begin{proof}Let $a\in A-(B\cup C)$.  This means $a\in A$ and $a\notin B\cup C$.  Since
$a\notin B\cup C$,  $a\notin B$, so $a\in A-B$.  Since $a\notin B\cup
C$, $a\notin C$.  So, $a\in (A-B)-C$.  This proves $A-(B\cup
C)\subseteq (A-B)-C.$

Now let $a\in (A-B) -C$.  This means that $a\in A-B$ and $a\notin C$.
Since $a\in A-B$, $a\in A$ and $a\notin B$.  It follows from $a\notin C$
and $a\notin B$ that $a\notin B\cup C$.  The fact that $a\in A$ and
$a\notin B\cup C$ implies that $a\in A-(B\cup C)$.  This shows that
$(A-B)-C\subseteq A-(B\cup C).$

From the two statements $A-(B\cup
C)\subseteq (A-B)-C$ and $(A-B)-C\subseteq A-(B\cup C)$, it follows that
 $(A-B)-C=A-(B\cup C).$
\end{proof}

Sometimes, it's not true that $A-(B-C)=(A-B)\cup C.$  
For example, let $A=\{1,2,3,4\}$, $B=\{1,2,5,6\}$, $C=\{2,3,6,7\}$.  Then $B-C=\{1,5\}$
and $$A-(B-C)=\{2,3,4\}.$$   One the other hand $A-B=\{3,4\}$ and
$$(A-B)\cup C=\{2,3,4,6,7\}.$$


\ea
\item State some additional necessary and sufficient condition for the
  formula which is sometimes incorrect to be always right.
\ba First note that for all sets $A,B$, and $C$, we have 
$$A-(B-C)\subset (A-B)\cup C.$$
To prove this, let $a\in A-(B-C)$.  Then $a\in A$ and $A\notin B-C$.
If $A\notin B-C$, we have either $a\notin B$ or $a\in C$.  If $a\in
C$, then $a\in (A-B)\cup C$.  If $a\notin B$, then $a\in A$ and
$a\notin B$ imply that $a\in A-B$, hence $a\in (A-B)\cup C$.

Now, we prove that $C-A=\emptyset$ is necessary and sufficient for $$A-(B-C)=(A-B)\cup
C.$$
\begin{proof}
To see that the condition $C-A=\emptyset$ is \emph{necessary}
for $A-(B-C)=(A-B)\cup C$, suppose that $C-A \neq \emptyset$ then there is an
element $c\in C-A$.  Then $c\in (A-B)\cup C$.  But since 
$c\in C-A\Rightarrow c\notin A$, it follows that $c \notin A-(B-C)$.
Therefore, $(A-B)\cup C\neq A-(B-C)$.

To see that $C-A=\emptyset$ is sufficient for $A-(B-C)=(A-B)\cup
C$, suppose that $C-A=\emptyset.$
Since it's already been shown that we always have $A-(B-C)\subset
(A-B)\cup C$, it remains to prove that
$(A-B)\cup C\subseteq A-(B-C).$  So,
let $a\in (A-B)\cup C$.  This means that $a\in A-B$ or $a\in C$.  If
$a\in A-B$, we have $a\in A$ and $a\notin B$.  If $a\notin B$, we have
$a\notin B-C$, so we have $a\in A-(B-C)$.  On the other hand if $a\in
C$, then $a\in A$ (since $C-A=\emptyset$) and $a\notin B-C$, so $a\in A-(B-C)$.
\end{proof}

\ea
\een
\ep

\end{document}