\documentclass[11pt,answers]{exam}
\usepackage{amsmath,amsfonts,times, graphicx,multicol,setspace}

\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}

\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}

\newcommand{\ba}{\begin{longanswer}}
\newcommand{\ea}{\end{longanswer}}


\newcommand{\bp}{\addtocounter{problemnum}{1}\begin{problem}}
\newcommand{\ep}{\end{problem}}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
 \newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Inn}{\operatorname{Inn}} 

\newcommand{\ra}{\rightarrow} 
\newcommand{\id}{\operatorname{id}} 


\newcommand{\<}{\langle}
\renewcommand{\>}{\rangle}


\title{Exam 1}
\target{Math 157}

\begin{document}


\begin{exam}{Thursday, October 3, 2013}

\bp Let $S=\{\heartsuit, \diamondsuit, \clubsuit,\spadesuit\}$
and define two binary operations $+$ and $\times$ as follows:

{%\Large
\begin{center}
\begin{tabular}{|l||c|c|c|c|}
\hline 
$+$ & $\heartsuit$ & $\diamondsuit$ & $\clubsuit$  & $\spadesuit$  \\
\hline \hline
$\heartsuit$ & $\heartsuit$ & $\diamondsuit$ & $\clubsuit$ & $\spadesuit$ \\
\hline
$\diamondsuit$ &$\diamondsuit$  & $\heartsuit$ & $\spadesuit$ & $\clubsuit$ \\
\hline
$\clubsuit$ & $\clubsuit$ & $\spadesuit$ & $\heartsuit$ & $\diamondsuit$ \\
\hline
$\spadesuit$ & $\spadesuit$ & $\clubsuit$ & $\diamondsuit$ & $\heartsuit$ \\
\hline
\end{tabular}
$\qquad$
\begin{tabular}{|l||c|c|c|c|}
\hline 
$\times$ & $\heartsuit$ & $\diamondsuit$ & $\clubsuit$  & $\spadesuit$  \\
\hline \hline
$\heartsuit$ & $\heartsuit$ & $\heartsuit$ & $\heartsuit$ & $\heartsuit$\\
\hline
$\diamondsuit$ & $\heartsuit$  & $\diamondsuit$ & $\heartsuit$ & $\diamondsuit$ \\
\hline
$\clubsuit$ & $\heartsuit$ & $\heartsuit$ & $\clubsuit$&$\clubsuit$\\
\hline
$\spadesuit$ & $\heartsuit$ & $\diamondsuit$ & $\clubsuit$  & $\spadesuit$  \\
\hline
\end{tabular}
\end{center}
} 
\ben
%\addtolength{\itemsep}{2in}
\item Which element of $S$ is an identity for the operation $+$?
\ba $\heartsuit$ is an identity for $+$.  You can see this from the
first row and column of the $+$ table.
\ea

\item Solve the equation $\diamondsuit x+ \clubsuit =
  \spadesuit$ for $x$.
\ba Since $\diamondsuit$ is the only element that when added to
$\clubsuit$ results in $\spadesuit$, we must have $\diamondsuit
x=\diamondsuit$.  Looking at the multiplication table reveals that
$\diamondsuit x =
\diamondsuit$ if and only if $x=\diamondsuit$ or $x= \spadesuit$.
\ea


\item Only one of the field axioms is not satisfied by $S$ with
  $+$ and $\times$.  Which one?
\ba
Note that $\spadesuit$ is an identity for $\times$.  However,
$\diamondsuit$ is a nonzero (i.e., not $\heartsuit$) element of $S$ that has
no multiplicative inverse---there's no element of $S$ that when
multiplied by $\diamondsuit$ yields $\spadesuit$.

\emph{Remark:} Note that if $\diamondsuit$ had an inverse, call it
$\diamondsuit^{-1}$, then the equation $\diamondsuit x+ \clubsuit =
  \spadesuit$ would have a unique solution
  $x=\diamondsuit^{-1}(\spadesuit+ -\clubsuit)$.
\ea
\een

\ep


% \bp Let $A,B$ and $C$ be sets.  
% \ben
% \item One of the following
% conditions is sufficient for $A\setminus B = A
% \setminus C.$  Which one? 
% \begin{itemize}
% \item $A \subset (B\cup C)$
% \item $(B\cup C) \subset A$
% \item $A\cap B\cap C =\emptyset$
% \item $(B\cap C) \subset A$
% \item $A\cap C=A \cap B$
% \end{itemize}
% \item Prove that the condition you identified implies that $A\setminus
%   B = A
% \setminus C$.
% \vspace{4in}
% \item Give an example to show that the identified condition is not
%   \emph{necessary} for $A\setminus B = A
% \setminus C$.
% \een
% \ep


\bp Let $A,B$ and $C$ be sets.  
\ben
\item One of the following
conditions is sufficient for $(A\setminus B)\setminus C = A
\setminus (B\setminus C).$  Which one? 
\begin{itemize}
\item $A \subset (B\cup C)$
\item $(B\cup C) \subset A$
\item $A\cap B\cap C =\emptyset$
\item $C \subset (B\setminus A)$
\item $A\cap B=C \cap B$
\end{itemize}
\item Prove that the condition you identified implies that  $(A\setminus B)\setminus C = A
\setminus (B\setminus C).$
\ba The condition $C \subset (B\setminus A)$ is sufficient for $(A\setminus B)\setminus C = A
\setminus (B\setminus C).$  That is, for all sets $A$, $B$, and $C$
with $C \subset (B\setminus A)$, we have $(A\setminus B)\setminus C = A
\setminus (B\setminus C).$ 

\emph{Proof}.  First we prove that for all sets $A,B,C$ $$(A\setminus B)\setminus C \subseteq A
\setminus (B\setminus C).$$  Let $a\in  (A\setminus B)\setminus C .$
This means $a\in A\setminus B$ and $a\notin C$.  The fact that $a\in
A\setminus B$ implies that $a\in A$ and $a\notin B$.  Since $a\notin
B$, it follows that $a\notin B\setminus C$.  Hence $a\in A \setminus
(B\setminus C)$.

Now we prove that for all sets $A,B,C$ with $C \subset (B\setminus
A)$, $$A
\setminus (B\setminus C)\subseteq (A\setminus B)\setminus C. $$ 
So suppose $C \subset (B\setminus
A)$ and let $a\in A\setminus (B\setminus C)$.  So, $a\in A$ and
$a\notin B\setminus C$.  The fact that $a\notin B\setminus C$ means
that $$a\notin B\text{ or }a\in C.$$  But since $C\subset (B\setminus
A)$, it's impossible for $a\in C$ since $a\in C$ implies $a\notin A$
and we know $a\in A$.  
Therefore, we have $a\in A$, $a\notin B$, and $a\notin C$.  That is
$a\in (A\setminus B)\setminus C$.

\ea

\item Give an example to show that the identified condition is not
  \emph{necessary} for $A\setminus
  B = A
\setminus C$.
\ba Let $A=\{1,2,3,4\}$, $B=\{1,2,5,6,7\}$, and $C=\{6,7,8,9\}$.  Note
that $C$ is not a subset of $B\setminus A=\{5,6,7\}$.  We do
have $$(A\setminus B)\setminus C=\{3,4\}\setminus C=\{3,4\} \text{ and
} A\setminus (B\setminus C) =A \setminus \{1,2,5\}=\{3,4\}.$$
\ea

\een
\ep

\bp True or False.  Give brief, but conclusive evidence, to support
your answer.
\ben
\item For all sets $S$ and for all $A\subseteq S$ there exists a
  unique set
  $B\subseteq S$ with $A\cup B =S$.
\ba False.  Let $S=\{1,2,3,4\}$ and $A=\{1,3\}$.  Note that
$B=\{2,4\}$ and $B'=\{1,2,4\}$ are different sets with the property
that $A\cup B=S$.
\ea
\item For all sets $A\subseteq \R$, either $A$ or $\R\setminus A$ is bounded
  above.
\ba False.  Let $A=\N$.  Note $A$ is not bounded above, and
$\R\setminus \N$ is not bounded above.  
\ea
\item For all $x,y\in \R$, if $x^2<y^2$ then either $x<y$ or $-x<y$.
\ba False.  Let $x=3$ and $y=-4$.  Then $x^2=9<16=y^2$.  However,
neither $3<-4$ nor $-3<-4$ are true.
\ea
\item For all $x\in \R$ and for all $n\in \N\left
    (|2x-6|<\dfrac{1}{n}\Rightarrow x=3\right).$
\ba True.  If $|2x-6|<\dfrac{1}{n}$ for all $n\in \N$, then $2x-6=0$,
which implies that $x=3$.
\ea
\een
\ep

\bp 
\ben
\item Use mathematical induction to prove that 
$\ds \sum_{k=1}^n k^3 =\frac{(n)^2(n+1)^2}{4}$ for all $n\in \N$.

\ba To prove that $\ds \sum_{k=1}^n k^3 =\frac{(n)^2(n+1)^2}{4}$ for
all $n\in \N$, note that for $n=1$, the statement is
$1=\frac{(1^2)(2^2)}{4}$, which is true.

Now suppose that $\ds \sum_{k=1}^m k^3 =\frac{(m)^2(m+1)^2}{4}$ for
some $m\in \N$ and consider $\ds \sum_{k=1}^m k^3 $
\begin{align*}
\ds \sum_{k=1}^{m+1} k^3 &=\left(\sum_{k=1}^{m} k^3 \right)+(m+1)^3\\
&=\frac{(m)^2(m+1)^2}{4}+ (m+1)^3\\
&=\frac{(m)^2(m+1)^2}{4}+ \frac{4(m+1)^2(m+1)}{4}\\
&=\frac{(m+1)^2\left(m^2+4(m+1)\right)}{4}\\
&=\frac{(m+1)^2(m^2+4m+4)}{4}\\
&=\frac{(m+1)^2(m+2)^2}{4}\\
\end{align*}
This proves that if the statement is true for $n=m$ then it's true for
$n=m+1$.  

Since the statement is true for $n=1$, and true for $m$ implies true for $m+1$, 
the principle of mathematical induction, says it's true
for all $n\in \N$.
\ea
\een
\ep
\addtocounter{problemnum}{-1}
\bp
\ben
\addtocounter{enumi}{1}
\item Use this result to compute the area of the region pictured below 
(the
vertical distance between the point $b$ units from $0$ is
$\frac{1}{2}b^3$).
\bigskip

\begin{center}
\includegraphics[scale=0.7]{exam1_pic.pdf}
\end{center}
\een
\ep
\pagebreak
\ba
To compute the area of the region in question, we 
bound it by two rectangular regions obtained by
inscribing $n$ rectangles of equal width and circumscribing $n$
rectangles of equal width, as pictured below:
\begin{center}
  \includegraphics[scale=0.5]{inscribed.pdf}$\qquad$\includegraphics[scale=0.5]{circumscribed.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.  
$$s_n<A < S_n.$$
We express the
areas of the rectangular regions $s_n$ as a sum,
the $i$-th terms of which is the
area of an inscribed rectangle of width $\frac{1}{n}$ and height
$\frac{1}{2}\left(\frac{i-1}{n}\right)^3$.
%, or the area of a circumscribed
%rectangle of width $\frac{1}{n}$ and height $\frac{1}{2}\left(\frac{i}{n}\right)^3$.
\begin{align*}
s_n&=\frac{1}{n}\left(\frac{1}{2}(0)^3\right)+\frac{1}{n}\left( \frac{1}{2} \left(\frac{1}{n}\right)^3  \right)+
\frac{1}{n}\left( \frac{1}{2}\left(\frac{2}{n}\right)^3 \right)+
\cdots+
\frac{1}{n}\left( \frac{1}{2}\left(\frac{(n-1)}{n}\right)^3 \right)\\
&=\frac{1}{2n^4} \left( 1^3+2^3+\cdots (n-1)^3\right)
\end{align*} 
Similarly, we express the
areas of the rectangular regions $S_n$ as a sum,
the $i$-th terms of which is the
the area of a circumscribed
rectangle of width $\frac{1}{n}$ and height
$\frac{1}{2}\left(\frac{i}{n}\right)^3$.
\begin{align*}
s_n&=\frac{1}{n}\left(\frac{1}{2}(1)^3\right)+\frac{1}{n}\left( \frac{1}{2} \left(\frac{2}{n}\right)^3  \right)+
\cdots+
\frac{1}{n}\left( \frac{1}{2}\left(\frac{(n-1)}{n}\right)^3 \right)+\frac{1}{n}\left( \frac{1}{2}\left(\frac{n}{n}\right)^3 \right)\\
&=\frac{1}{2n^4} \left( 1^3+2^3+\cdots (n)^3\right)
\end{align*} 
By the inequalities proved above, we have
$$s_n=\left(\frac{1}{2n^4}\right)\left(\frac{(n-1)^2(n)^2}{4}\right)=
\frac{1}{8}\left(1-\frac{1}{n}\right)^2
%+ \frac{1}{8 n^2} - \frac{1}{4 n}
\text{ and
}S_n=\left(\frac{1}{2n^4}\right)\left(\frac{(n)^2(n+1)^2}{4}\right)=
\frac{1}{8}\left(1+\frac{1}{n}\right)^2$$
%+ \frac{1}{8 n^2} +\frac{1}{4 n}$$
So, for every $n\in \N$, we have $$s_n<\frac{1}{8}<S_n\text{ and }s_n<A<S_n.$$
Since $S_n-s_n=\frac{1}{2n}$, we have $\left|A-\frac{1}{8}\right|\leq
\frac{1}{2n}$ for every $n\in \N$.  Thus,
$\left|A-\frac{1}{8}\right|=0$, and we conclude $$A=\frac{1}{8}.$$
\ea




\end{exam}
\end{document}

