\documentclass[11pt,pages, 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{\Q}{\mathbb{Q}}
\newcommand{\Inn}{\operatorname{Inn}} 

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


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


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

\begin{document}


\begin{exam}{\today}


\bp Use mathematical induction to prove that for all $n\in \N$,
$$0^3+1^3+2^3+\cdots +(n-1)^3<\frac{n^4}{4}\text{ and }\frac{n^4}{4}< 1^3+2^3+\cdots +(n-1)^3+n^3.$$
Use this result to compute the area of the region pictured below (the
vertical distance between the point $b$ units from $0$ is $b^3$).
\begin{center}
\includegraphics[scale=0.3]{practice_exam_pic.pdf}
\end{center}

\ba We proved in class that $0^3+1^3+2^3+\cdots +(n-1)^3<\frac{n^4}{4}$ for all
$n\in \N$ and that $\frac{n^4}{4}< 1^3+2^3+\cdots +(n-1)^3+n^3$ for
all $n\in \N$.  Here, I'll write the details for the second one.

To prove that $\frac{n^4}{4}< 1^3+2^3+\cdots +(n-1)^3+n^3$ for all
$n\in \N$ by induction, consider the base case:  since
$\frac{1^4}{4}<1$, the inequality is holds when $n=1$.

Now, assume the inequality holds for $n=k$.  That is, suppose that
for some natural number $k$, we have $$\frac{k^4}{4}<
1^3+2^3+\cdots +k^3.$$  After adding $(k+1)^3$ to both sides we have
$$\frac{k^4}{4}+(k+1)^3 <
1^3+2^3+\cdots +k^3+(k+1)^3$$ and doing a little arithmetic yields
\begin{equation}\label{eq1}
\frac{k^4}{4}+\frac{4k^3}{4}+\frac{12k^2}{4}+\frac{12k}{4}+\frac{4}{4}<
1^3+2^3+\cdots +k^3+(k+1)^3.
\end{equation}
Also, 
\begin{equation}\label{eq2}
\frac{k^4}{4}+\frac{4k^3}{4}+\frac{6k^2}{4}+\frac{4k}{4}+\frac{1}{4}<
\frac{k^4}{4}+\frac{4k^3}{4}+\frac{12k^2}{4}+\frac{12k}{4}+\frac{4}{4}.
\end{equation}
Combining \eqref{eq1} and \eqref{eq2} gives
%$\frac{6k^2}{4}+\frac{8k}{4}+\frac{3}{4}$ from the left hand side we
$$\frac{k^4}{4}+\frac{4k^3}{4}+\frac{6k^2}{4}+\frac{4k}{4}+\frac{1}{4}<
1^3+2^3+\cdots +k^3+(k+1)^3.$$
That is,
$$\frac{(k+1)^4}{4}<
1^3+2^3+\cdots +k^3+(k+1)^3.$$
This proves that if the inequality holds for $k$ then it holds for
$k+1$.  

So, by the principle of mathematical induction, the inequality holds
for all $n\in \N$.
\ea
\ep

\ba [Continued] 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.  We have
$$s_n<A < S_n.$$
\begin{align*}
s_n&=\frac{2}{n}((0)^3)+\frac{2}{n}\left( \left(\frac{2}{n}\right)^3  \right)+
\frac{2}{n}\left( \left(\frac{4}{n}\right)^3 \right)+
\cdots+
\frac{2}{n}\left( \left(\frac{(n-1)2}{n}\right)^3 \right)\\
&=\frac{2}{n} \left( \left(\frac{2}{n}\right)^3+
 \left(\frac{4}{n}\right)^3 +
\cdots +
 \left(\frac{(n-1)2}{n}\right)^3\right)\\
&=\frac{2^4}{n^4} \left( 1^3+2^3+\cdots (n-1)^3\right)
\end{align*} 
Similarly, 
\begin{align*}
S_n&=\frac{2^4}{n^4} \left( 1^3+2^3+\cdots (n)^3\right)
\end{align*} 
By the inequalities proved above, we have
$$s_n<\left(\frac{2^4}{n^4}\right)\left(\frac{n^4}{4}\right)=4 \text{ and }4=\left(\frac{2^4}{n^4}\right)\left(\frac{n^4}{4}\right)<S_n.$$
So, for every $n\in \N$, we have $$s_n<4<S_n\text{ and }s_n<A<S_n.$$
Since $S_n-s_n=\frac{16}{n}$, we conclude that there is only one real
number that lies between $s_n$ and $S_n$ for every $n\in \N$.
Therefore, $A=4$.
\ea



\bp Prove that $\ds |x+y|\leq |x|+|y|$ for all $x,y\in \R$.
\ba First, we prove a lemma.  For all $z\in \R$ and all $a\geq 0$, 
$$|z|\leq a \Leftrightarrow
-a\leq z\leq a.$$

To prove that $|z|\leq a \Rightarrow -a\leq z\leq a$, suppose that
$|z|\leq a$.  If
$z\geq 0$, then we automatically get $-a\leq z$ and since $|z|\leq a$ means $z\leq a$ 
we get $-a\leq z\leq a$ also.  If $z\leq 0$, then we automatically have
$z\leq a$ and since
$|z|\leq a$ means $-z \leq a$ we get $-a \leq z$, and so $-a\leq z\leq
a$.

To prove that if $-a\leq z\leq a\Rightarrow |z|\leq a$, suppose that
$-a\leq z\leq a$.  If $z\geq 0$, then $|z|=z\leq a$.  If $z \leq 0$,
then $|z|=-z$ and $-a \leq z \Rightarrow -z \leq a \Leftrightarrow
|z|\leq a$.

Now, since $|x|\leq |x|$ the Lemma (by substituting
$z=x$ and $a=|x|$) implies
$$-|x|\leq x \leq |x|.$$  Similarly, we have $$-|y|<y<|y|.$$
Adding gives $$-(|x|+|y|)\leq x+y \leq |x|+|y|$$
which the Lemma (by substituting $z=x+y$ and $a=|x|+|y|$)
implies that $|x+y|\leq |x|+|y|.$
\ea
\ep


\bp Let $a,b\in \R$ with $a\neq 0$.  
Use the field axioms of $\R$ to carefully prove that if $ax+b=0$ then
$x=-b \left(\frac{1}{a}\right).$  Justify all your steps.
\ba
\begin{align*}
ax+b=0 & \Rightarrow (ax+b)-b=0-b & \text{ existence of negatives}\\
& \Rightarrow ax+(b+-b)=-b & \text{ associativity of $+$ and def of
  $0$}\\
& \Rightarrow ax=-b & \text{ since $b+-b=0$}\\
& \Rightarrow \left(\frac{1}{a}\right)(ax)=\left(\frac{1}{a}\right)(-b) &
  \text{ existence of recipricals}\\
& \Rightarrow
\left(\left(\frac{1}{a}\right)a\right)(x)=\left(\frac{1}{a}\right)(-b)
& \text{ associativity of $\times $}\\
&\Rightarrow 1x=\left(\frac{1}{a}\right)(-b)
& \text{since $\left(\frac{1}{a}\right)a=1$}\\
&\Rightarrow x=\left(\frac{1}{a}\right)(-b)& \text{by definition of $1$}\\
\end{align*}
\ea
\ep


\bp True or False:  If $S$ is a nonempty subset of rational numbers
that is bounded above, then the least upper bound of $S$ is rational.  
\ba False.  The set $$S=\{r\in \Q: r<\sqrt{3}\}$$ is bounded above and
the least upper bound is $\sqrt{3}$ which is irrational.

We proved that $\sqrt{3}$ isn't rational in class.  It's clear that
$\sqrt{3}$ is an upper bound for $S$.  To see that  
$\sqrt{3}$ is the least upper bound for $S$, suppose $B<\sqrt{3}$.
Since there is a rational number between any two distinct real
numbers, we know 
there exists a rational number $r$ with $B<r<\sqrt{3}$, and that says
that $B$ is not an upper bound for $S$. 
\ea
\ep


\bp Prove or disprove:  For all propositions $p,q,r,s$, we have
$$((p\Rightarrow q) \Rightarrow r) \Rightarrow s \equiv ((p\wedge
q)\wedge r)\Rightarrow s.$$
\ba If $p,r$ are true and $q,s$ are false, then $p\Rightarrow q$ is
false, $(p\Rightarrow q)\Rightarrow r$ is true, hence $((p\Rightarrow
q)\Rightarrow r) \Rightarrow s$ is false.  On the other hand $((p\wedge
q)\wedge r)$ is false, so $((p\wedge
q)\wedge r)\Rightarrow s$ is true.
\ea
\ep

\bp Let $X$ and $Y$ be sets.  Recall, for sets $X$ and $Y$, we define
the set $X\setminus Y$ to be $$X\setminus Y=\{x\in X \text{ satisfying
}x\notin Y\}.$$  Prove or disprove:
\ben
\item 
For all sets $A,B,C$ $$(A\setminus B)\cup C=(A\cup C) \setminus
(B\cup C).$$
\ba False.  For example, let $A=\{1,2,3\}$, $B=\{1,4\}$ and $C=\{3,4,5\}$.  Then 
$$(A\setminus B)\cup C=\{2,3\}\cup C=\{2,3,4,5\} \text{ and }(A\cup C) \setminus
(B\cup C)=\{1,2,3,4,5\}\setminus \{1,3,4,5\}=\{2\}.$$
\ea
\item 
For all sets $A,B,C$ 
\ba
False.  For example, let $A=\{1,2,3\}$, $B=\{1,4\}$ and $C=\{3,4,5\}$.  Then 
$$A\setminus (B\cup C)=A\setminus \{1,3,4,5\}=\{2\} \text{ and }
(A\setminus B) \cup
(A \setminus C)= \{2,3\}\cup \{1,2\}=\{1,2,3\}$$
\ea
\item 
For all sets $A,B,C$ $$A\setminus (B\cap C)=(A\setminus B) \cup
(A \setminus C).$$
\ba This is true.  To prove that $A\setminus (B\cap C)\subseteq (A\setminus B) \cup
(A \setminus C)$, let $a\in A\setminus (B\cap C)$.  This means $a\in
A$ and $a\ notin (B\cap C)$.  Since $a\notin B\cap C$, we know
$a\notin B$ or $a\notin C$.  If $a\notin B$, then $a\in A\setminus B$
so $a\in A (\setminus B)\cup (A\setminus C).$  If $a\notin C$, then $a\in A\setminus C$
so $a\in A (\setminus B)\cup (A\setminus C).$

To prove that $(A\setminus B) \cup
(A \setminus C)\subseteq A\setminus (B\cap C)\subseteq (A\setminus
B)$, let $a\in (A\setminus B) \cup
(A \setminus C).$  This means $a\in A\setminus B$ or $a\in A \setminus
C$.  In the first case, $a\in A \setminus B$ means $a\in A$ and
$a\notin B$.  Since $a\notin B$, $a\notin B \cap C$, so we have $a\in
A$ and $a\notin B \cap C$, so $a\in A \setminus (B\cap C)$.  In the
second case, $a\in A \setminus C$ means $a\in A$ and
$a\notin C$.  Since $a\notin C$, $a\notin B \cap C$, so we have $a\in
A$ and $a\notin B \cap C$, so $a\in A \setminus (B\cap C)$. 
\ea
\een
\ep



\bp Let $X$ and $Y$ be subsets of real numbers.  Define
the set $X-Y$ to be $$X-Y=\{x-y \text{ where }x \in X \text{ and }y\in Y\}.$$
% For example, if $X=\{
  % 2,3,5\}$ and $Y=\{0,1,2\}$ then $$X-Y=
  % \{2,3,5,1,2,4,0,1,3\}=\{0,1,2,3,4,5\}.$$

\ben
\item Suppose that $X,Y\subset \R$ and that $L$ is
  the least upper bound of $X$ and $M$ is the least upper bound of
  $Y$.  Prove or disprove:  the least upper bound of $X-Y$ is $L-M$.
\ba Let $X=\{1,2,3\}$ and $Y=\{-1,1\}$.  Then
$X-Y=\{2,3,4,0,1,2\}=\{0,1,2,3,4\}$.  Not that $X \subset X-Y$ and
$0\notin Y$.
\ea
\item Prove or disprove:  For any sets $X,Y\subset \R$, if $X\subset
  X-Y$ then $0\in Y$.
\ba The same example above disproves this statement for 
$\sup X=3$,
$\sup Y=1$ but $\sup X -Y =3\neq 3-1$.
\ea
\een
\ep

\bp Use the order axioms of $\R$ to prove that if $x,y$ are positive
real numbers with $x<y$ then $x^2<y^2.$
\ba Suppose $x,y>0$ and $x<y$.  Since $x,y>0$, the sum $y+x>0$.
Also, $x<y$ implies $y-x>0$.  Therefore the product $(y+x)(y-x)>0$.
This says that $y^2-x^2>0$, which means that $x^2<y^2$.
\ea
\ep

\bp More induction:  use mathematical induction to prove that 
\ben
\item $\ds \sum_{k=1}^n k=\frac{(n)(n+1)}{2}$ for all $n\in \N$.
\ba When $n=1$, the statement is that $1=\frac{(1)(2)}{2}$ which is
true.

Assume that for some $m\in \N$ we have $\ds \sum_{k=1}^m k=\frac{(m)(m
 +1)}{2}$.  Now consider
\begin{align*}
\sum_{k=1}^{m+1} k&=\left(\sum_{k=1}^{m} k\right) +m+1\\
&=\frac{(m)(m
 +1)}{2}+m+1\\
&=\frac{(m)(m
 +1)+2(m+1)}{2}\\
&=\frac{(m+1)(m
 +2)}{2}
\end{align*}
This shows that if the statement is true for $m\in \N$, it's true for
$m+1\in \N$, so by PMI, the statement is true for all $n\in \N$.
\ea
\item $\ds n!>2^n$ for all natural numbers $n\geq 4.$
\ba Here we do a modified version of mathematical induction where the
base step verifies that it's true for $n=4$.  For $n=4$, the statement
is $24>16$, which is true.

Now assume that for some $k\in \N$, $k!>2^k$.  Now consider 
$$(k+1)!=(k+1)k!>(k+1)2^k>(2)(2^k)=2^{k+1}.$$
The first inequality in the line above follows from the inductive hypothesis and
the second follows from the fact that $k+1>2$.

That completes the proof.
\ea
\een
\ep

\bp Negate the following propositions.  Decide whether the proposition
or its negation are true.
\ben
\item $\forall x \in \R \exists n\in \N (x<n)$
\ba $\exists x \in \R \forall n\in \N (n\leq x)$.  The original
statement is true---it's the Archimedean property of $\R$.  The
negation is false, it says that $\N$ is bounded above by some real number.
\ea
\item $\exists x \in \R \forall n\in \N (x>n)$
\ba $\forall x \in \R \exists n \in N(x \leq n)$.   Here the original
statement is false---it says that $\N$ is bounded above by some real
number.
\ea
\item $\forall x>0 \exists n\in \N \left(
    \frac{1}{n}<x \right)$
\ba $\exists x >0 \forall n\in N \left( \frac{1}{n} \geq x \right)$
The original statement is true and the negation is false.  The
negation says that there's a real number less than $\frac{1}{2}$
less than $\frac{1}{3}$, and less than $\frac{1}{n}$ for every 
$n\in \N$.
\ea
\item $\forall x\in \R \forall y\in \R \left( x<y \Rightarrow \exists
    z\in \R (x<z<y)\right)$
\ba $\exists x \in \R \exists y \in \R \left( x<y \text{ and } \forall
  z \in \R (z \leq x \text{ or }y \leq z\right).$
The original statement is true.  There exists a real number between any two distinct real
numbers.
\ea
\een
\ep

\end{exam}
\end{document}

