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

\renewcommand{\baselinestretch}{1.1}

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

\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}}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}

\newcommand{\id}{\operatorname{id}}
\newcommand{\Fun}{\operatorname{Functions}}


\fancyhead[L]{\Large \textbf{Math 157 Fall 2013}}
\fancyhead[R]{\large \textbf{Problem Set 1}}




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


\section{Step functions}

\bp Compute $\ds\int_{-3}^3 [t^2] dt.$
\ba The function $g:[-3,3]\to \R$ defined by $g(t)=[t^2]$ is constant
on the open subintervals of the partition 
$$\mathcal{P}=\{-3,-\sqrt{8},-\sqrt{7},-\sqrt{6},-\sqrt{5},-2,-1,0,1,\sqrt{2},\sqrt{3},2,\sqrt{5},\sqrt{6},\sqrt{7},\sqrt{8},3\}$$
Here's a picture:
$$
\includegraphics[scale=0.5]{figure-ps1.pdf}
$$
We compute
\begin{align*}
\ds\int_{-3}^3 [t^2] dt&=\sum_{k=1}^{16}g_k(x_k-x_{k-1})\\
&=8\left(-\sqrt{8}-(-3)\right)+7\left(-\sqrt{7}+(-\sqrt{8})\right)+\cdots
+8\left(3-\sqrt{8}\right)\\
&=42-6 \sqrt{2}-2 \sqrt{3}-2 \sqrt{5}-2 \sqrt{6}-2 \sqrt{7}
\end{align*}
\ea
\ep

\bp Suppose that $s:[a,b]\to \R$ and $t:[a,b]\to \R$ are step
functions.  Prove that $$\int_a^b s+t=\int_a^b s+\int_a^b t.$$
\begin{proof}
Let $\mathcal{P}=\{x_0, \ldots, x_n\}$ be a common partition for which
$s$ and $t$ are constant and take the values $s_k$ and $t_k$
respectively on the open subintervals $(x_{k-1}, x_k)$ for
$k=1,\ldots, n$.  Then
\begin{align*}
\int_a^b s+t&=\sum_{k=1}^n (s_k+t_k)(x_k-x_{k-1})\\
&=\sum_{k=1}^n \left((s_k)(x_k-x_{k-1})+(t_k)(x_k-x_{k-1})\right)\\
&=\sum_{k=1}^n (s_k)(x_k-x_{k-1})+\sum_{k=1}^n (t_k)(x_k-x_{k-1})\\
&=\int_a^b s+\int_a^b t.
\end{align*}
\end{proof}
\ep

\bp Let $s:[a,b]\to \R$ be a step function and let $P=\{x_0,\ldots,
x_n\}$ be a partition of the interval $[a,b]$ for which $s$ is
constant on each subinterval $[x_{k-1},x_k]$.  Let $s_k$ denote the
value of $s$ on the $k$-th subinterval; i.e., $s(x)=s_k$ for all
$x_{k-1}<x<s_k.$.  Define $$\oint_a^b
s=\sum_{k=1}^n s_k^3(x_k-x_{k-1}).$$
For this new theory of integration, which of the following properties
hold?
\ben
\item $\ds \oint_a^b s+t =\oint_a^b s+\oint_a^b t$
\ba This property fails to hold.  For example, let $s(x)=1$ and $t(x)=2$ for $x\in [0,1]$.  Then 
$$\oint_0^1 s+t=(1+2)^3(1-0)=27 \text{ and }\oint_a^b s+\oint_a^b
t=1^3(1-0)+2^3(1-0) = 9.$$
\ea
\item $\ds \oint_a^b c s= c \oint_a^b s$
\ba This property fails to hold.  For example, let $s(x)=1$ for $x\in
[0,1]$.  Then, checking the property for $c=2$, we have 
$$\oint_0^1 2s=(2(1))^3(1-0)=8 \text{ and }2\oint_a^b s=2\left( 1^3(1-0)\right) = 2.$$
\ea
\item $\ds \oint_a^b s+\oint_b^c s =\oint_a^c s$
\ba This property holds.  Let $\mathcal{P}=\{x_0, \ldots, x_n\}$ be a
partition of $[a,c]$ for which $s$ is constant on the open
subintervals $(x_{k-1},x_k)$ and assume $b=x_j\in
\mathcal{P}$.  So that $\{x_0, \ldots, x_j\}$ is a partition of
$[a,b]$ and $\{x_j,\ldots, x_n\}$ is a partition of $[b,c]$.  
\begin{align*}
 \oint_a^b s+\oint_b^c s &=\sum_{k=1}^j s_k^3(x_k-x_{k-1})+\sum_{k=j}^n
 s_k^3(x_k-x_{k-1}) \\
&=\sum_{k=1}^n s_k^3(x_k-x_{k-1})\\
&=\oint_a^c s
\end{align*}


\ea
\item $\ds \oint_{a+c}^{b+c} s(x)dx=\oint_a^b s(x+c)dx$.
\ba
This property holds.  It's convenient to let $t:[a,b]\to \R$ be the
function defined by $t(x)=s(x+c)$.  Note that $s(x)=t(x-c)$.  
Now, let $\mathcal{P}=\{x_0, \ldots, x_n\}$ be a
partition of $[a,b]$ for which $t$ is constant 
on the open subintervals $(x_{k-1},x_k)$.  Say $$t(x)=t_k\text{ for
}x_{k-1}<x<x_k.$$
So, $$\oint_a^b s(x+c)dx=\int_a^b t= \sum_{k=1}^n t_k (x_k-x_{k-1}).$$
Consider the partition $\mathcal{Q}=\{x_0+c, \ldots, x_n+c\}$ of
$[a+c,b+c].$  Note that for any $x\in (x_{k-1}+c,x_k+c)$, we have
$x-c\in (x_{k-1},x_k)$ so $s(x)=t(x-c)=t_k$.  Thus $s$ is constant on
the subinterval $(x_{k-1}+c,x_k+c)$.  Therefore,
$$\oint_{a+c}^{b+c} s(x)dx=\sum_{k=1}^n t_k ((x_k+c)-(x_{k-1}+c))=
\sum_{k=1}^n t_k (x_k-x_{k-1}).$$
Thus, $\ds \oint_{a+c}^{b+c} s(x)dx=\oint_a^b s(x+c)dx$.
\ea
\een
\ep


\section{Products and unions}
\subsection{The Cartesian product}
Recall, for two sets $X$ and $Y$ we define the product $X\times Y$ to
be the set
$$X\times Y=\{(x,y): x\in X, y\in Y\}.$$
There are two important functions $\pi_1:X\times Y \to
X$ and $\pi_2:X\times Y \to Y$.  Here's a diagram:
$$
\xymatrix{
&X\times Y\ar@{->}[ld] _{\pi_1} \ar@{->}[rd]^{\pi_2} & \\
X&&Y}
$$
The functions $\pi_1:X\times Y\to X$ and $\pi_2:X\times Y \to Y$ are
called \emph{projections} and are
defined by $\pi_1(x,y)=x$ and $\pi_2(x,y)=y$.   

% The functions $\pi_1$ and $\pi_2$ are called \emph{projections} and
% satisfy the following universal property:
% \begin{quote}For every set $Z$ and every pair of functions $f:Z\to X$
%   and $g:Z\to Y$, there exists a unique function $h:Z\to X \times Y$
%   so that the following diagram commutes:
% $$
% \xymatrix{
% &z\ar@{->}[ldd] _{f} \ar@{->}[rdd]^{g}  \ar@{->}[d]^{h} & \\
% &X\times Y\ar@{->}[ld] ^{\pi_1} \ar@{->}[rd]_{\pi_2} & \\
% X&&Y}
% $$
% \end{quote}

%\bp Let $X$ and $Y$ be sets.  
The product $X\times Y$ and the projections $\pi_1$ and $\pi_2$
satisfy the following important property.

\begin{quote}
\emph{For any set $Z$ and
any functions $f:Z\to X$ and $g:Z\to Y$, there exists a unique
function 
$h:Z\to X\times Y$ satisfying
$\pi_1h=f$ and $\pi_2h=g$.  
}
\end{quote}

\begin{figure}[h]\label{fig1}
\caption{The important property for Cartesian product of sets}
$$
\xymatrix{
&Z\ar@{->}[ldd] _{f} \ar@{->}[rdd]^{g}  \ar@{-->}[d]^{h} & \\
&X\times Y\ar@{->}[ld] ^{\pi_1} \ar@{->}[rd]_{\pi_2} & \\
X&&Y}
$$
\end{figure}


% We have a bijection between sets
% \begin{align*}
% \Fun(Z,X)\times \Fun(Z,Y)&\to \Fun(Z,X\times Y)\\
% (f,g) &\mapsto h
% \end{align*}

%Your problem:  describe the function $h$.
%\ep

\subsection{The union}
Recall, for two sets $X$ and $Y$ we define the union $X\cup Y$ to
be the set
$$X\cup Y=\{a: a\in X \text{ or }a\in Y\}.$$
There are two important functions $i_1:X \to X\cup Y$ and $i_2:Y\to X
\cup Y$.  Here's a diagram:
$$
\xymatrix{
&X\cup Y & \\
X\ar@{->}[ru] ^{i_1}&&Y\ar@{->}[lu]_{i_2} }
$$
The functions $i_1:X\to X\cup Y$ and $i_2:Y\to X\cup Y$ are
called \emph{inclusions} and are
defined by $i_1(x)=x$ and $i_2(y)=y$.  The union $X\cup Y$ and the
inclusions $i_1$ and $i_2$ satisfy the following important property:
\begin{quote}
\emph{For any set $Z$ and
any functions $f:X\to Z$ and $g:Y\to Z$ such that $f(x)=g(y)$ if $x=y$ 
there exists a unique function 
$h:X \cup Y\to Z$ so that $hi_1=f$ and $hi_2=g.$
}
\end{quote}

\begin{figure}[h]\label{fig2}
\caption{The important property for the union of sets}
$$
\xymatrix{
&Z&\\
&X\cup Y \ar@{-->}[u]_h& \\
X\ar@{->}[ru] _{i_1}\ar@{->}[ruu] ^{f}&&Y\ar@{->}[lu]^{i_2}\ar@{->}[luu]_{g} }
$$
\end{figure}

 
% We have a bijection between sets
% \begin{align*}
% Functions{X,Z}\times_{i_1,i_2}Functions{Y,Z}&\to Functions{X\cup Y,Z}&
% f\times g \mapsto h
% \end{align*}

\bp Let $X=\{1,2\}$ and $Y=\{2,3\}$ and $Z=\{\heartsuit,
\diamondsuit\}$.  
\ben
\item Give an example of functions $f:Z\to X$, $g:Z\to Y$, and $h:Z\to
  X\times Y$ making the diagram in Figure \ref{fig1} commute.
\ba Let 
$$
\xymatrix @R=0.2pc {
Z \ar@{->}[r]^-{f} & X \\
\heartsuit \ar@{|->}[r] & 1\\
\diamondsuit \ar@{|->}[r] & 2
}
\qquad 
\xymatrix @R=0.2pc {
Z \ar@{->}[r]^-{g} & Y \\
\heartsuit \ar@{|->}[r] & 3\\
\diamondsuit \ar@{|->}[r] & 3
}
\qquad
\xymatrix @R=0.2pc {
Z \ar@{->}[r]^-{h} & X\times Y \\
\heartsuit \ar@{|->}[r] & (1,3)\\
\diamondsuit \ar@{|->}[r] & (2,3)
}
$$

Note that $\pi_1\circ h=f \text{ and }\pi_2\circ h=g:$

$$
\xymatrix @R=0.2pc {
Z \ar@{->}[r]^-{h} & X \times Y \ar@{->}[r]^-{\pi_1} & X\\
\heartsuit \ar@{|->}[r] & (1,3) \ar@{|->}[r]  & 1\\
\diamondsuit \ar@{|->}[r] & (2,3) \ar@{|->}[r]  & 2
}
\qquad 
\xymatrix @R=0.2pc {
Z \ar@{->}[r]^-{h} & X \times Y \ar@{->}[r]^-{\pi_2} & Y\\
\heartsuit \ar@{|->}[r] & (1,3) \ar@{|->}[r]  & 3\\
\diamondsuit \ar@{|->}[r] & (2,3) \ar@{|->}[r]  & 3
}
$$

\ea
\item Give an example of functions $f:X\to Z$, $g:Y\to Z$, and
  $h:X\cup Y \to
Z $ making the diagram in Figure \ref{fig2} commute.
\ba Let 
$$
\xymatrix @R=0.2pc {
X \ar@{->}[r]^-{f} & Z \\
1 \ar@{|->}[r] & \diamondsuit \\
2 \ar@{|->}[r] & \diamondsuit 
}
\qquad 
\xymatrix @R=0.2pc {
Y \ar@{->}[r]^-{g} & Z \\
2 \ar@{|->}[r] & \diamondsuit \\
3 \ar@{|->}[r] & \heartsuit 
}
\qquad
\xymatrix @R=0.2pc {
X\cup Y  \ar@{->}[r]^-{h} & Z \\
1 \ar@{|->}[r] & \diamondsuit \\
2 \ar@{|->}[r] & \diamondsuit \\
3 \ar@{|->}[r] & \heartsuit 
}
$$

Note that $h \circ i_1=f \text{ and }h i\circ _2=g:$

$$
\xymatrix @R=0.2pc {
X \ar@{->}[r]^-{i_1} & X\cup Y \ar@{->}[r]^-{h} & Z\\
1  \ar@{|->}[r] & 1 \ar@{|->}[r]  & \diamondsuit\\
2  \ar@{|->}[r] & 2 \ar@{|->}[r]  & \diamondsuit
}
\xymatrix{
&Z&\\
&X\cup Y \ar@{-->}[u]_h& \\
X\ar@{->}[ru] _{i_1}\ar@{->}[ruu] ^{f}&&
}$$

$$
\xymatrix @R=0.2pc {
Y \ar@{->}[r]^-{i_2} & X\cup Y \ar@{->}[r]^-{h} & Z\\
2  \ar@{|->}[r] & 2 \ar@{|->}[r]  & \diamondsuit\\
3  \ar@{|->}[r] & 3 \ar@{|->}[r]  & \heartsuit
}
\qquad 
\xymatrix{
&Z&\\
&X\cup Y \ar@{-->}[u]_h& \\
&&Y \ar@{->}[lu]^{i_2}\ar@{->}[luu]_{g} }
$$
\ea
\item Are there any functions $X\to X\times Y$ and
  $X\cup Y \to X$?
\ba As long as the sets $X$ and $Y$ are nonempty, then sure, there
will exists functions $X\to X\times Y$ and
  $X\cup Y \to X$.  However, in contrast to the projection $X\times
  Y\to X$ and the inclusion $X\to X\cup Y$, there's no natural way to define such
  functions for arbitrary sets $X$ and $Y$.

\ea

\een
\ep

\begin{definition}For any sets $A$ and $B$, let $\Fun(A,B)$ denote the set of
functions $A\to B$.  
\end{definition}

\bp True or False:  
\ben
\item For any sets $X,Y$, the projections $\pi_1:X\times Y \to X$ and
  $\pi_2:X\times Y \to Y$ are  surjective.
\ba True.  
\ea
\item For any sets $X,Y$, the inclusions $i_1:X \to X\cup Y$ and
  $i_2:Y\to X\cup Y$ are injective.  
\ba True.
\ea
\item For all sets $X$, $Y$, and $Z$, there is a bijection between sets
 $$ \Fun(Z,X)\times \Fun(Z,Y)\to \Fun(Z,X\times Y)$$
\ba True.   The followin is a bijection 
$$\xymatrix @R=0.2pc {
  \Fun(Z,X)\times \Fun(Z,Y)  & \Fun(Z,X\times Y) \ar@{->}[l] & \\
  (\pi_1 \circ h,  \pi_2 \circ h) &  h \ar@{|->}[l] 
}
$$
\ea
\item For all sets $X$, $Y$, and $Z$, there is a bijection between sets
 $$ \Fun(X,Z)\times \Fun(Y,Z)\to \Fun(X\times Y,Z)$$
\ba False.  For example if $X=\{1\}$, $Y=\{a,b,c\}$, and
$Z=\{\heartsuit, \diamondsuit\}$, then $X\times Y$ has $3$ elements
so there are $9$ functions $X\times Y\to Z$.  On the other hand,
there are two function from $X\to Z$ and $9$ functions from $Y\to Z$, so
the set $\Fun(X,Z)\times \Fun(Y,Z)$ has $18$ elements.  There's no
bijection between a set with $9$ elements and a set with $18$ elements.
 \ea
\item For all sets $X$, $Y$, and $Z$, there is a bijection between sets
 $$ \Fun(X,Z)\cup\Fun(Y,Z)\to \Fun(X\times Y,Z)$$
\ba False.  For example if $X=\{1,2\}$, $Y=\{2,3\}$, and
$Z=\{\heartsuit, \diamondsuit\}$, then $X\cup Y$ has $3$ elements
so there are $9$ functions $X\times Y\to Z$.  On the other hand,
there are $4$ function from $X\to Z$ and $9$ functions from $Y\to Z$,
none are equal, so
the set $\Fun(X,Z)\cup \Fun(Y,Z)$ has $13$ elements.  There's no
bijection between a set with $9$ elements and a set with $13$ elements.
 \ea
\item For all sets $X$, $Y$, and $Z$ with $X\cap Y=\emptyset$, there
  is a bijection between sets  $$ \Fun(X,Z)\times \Fun(Y,Z)\to \Fun(X\cup Y,Z)$$
\ba True.   The followin is a bijection 
$$\xymatrix @R=0.2pc {
  \Fun(X,Z)\times \Fun(Y,Z)  & \Fun(X\cup Y,Z) \ar@{->}[l] & \\
  (h \circ i_1, h\circ i_2) &  h \ar@{|->}[l] 
}
$$
\ea
\een
\ep


\bp Prove or disprove:  for all sets $X,Y,Z$, we have $X\times (Y\cup
Z)=(X\times Y) \cup (X \times Z).$
\ba This is true.  Here's a proof.
Let $p\in Z \times (Y \cup Z)$.  So, $p=(x,w)$ for some $x\in X$ and
$w\in Y\cup Z$.  If $w\in Y$, then $(x,w)\in X\times Y \subseteq X
\times Y \cup X \times Z.$  if $w\in Z$, then $(x,w)\in X \times Z \subseteq X
\times Y \cup X \times Z.$  This proves that $X\times (Y\cup
Z)\subseteq (X\times Y) \cup (X \times Z).$

Now suppose $p\in (X\times Y) \cup (X \times Z).$  This means $p\in
(X\times Y) $ or $p\in (X\times Y) $.  If $p\in
(X\times Y) $ , then $p=(x,y)$ for some $x\in X$ and some $y\in Y$.
Since $Y\subseteq Y\cup Z$, we have $x\in X$ and $y\in Y\cup Z$ and we
see that $p=(x,y)\in X\times (Y\cup Z)$.  If, on the other hand, $p\in
(X\times Z) $ , then $p=(x,z)$ for some $x\in X$ and some $z\in Z$.
Since $Z\subseteq Y\cup Z$, we have $x\in X$ and $z\in Y\cup Z$ and we
see that $p=(x,z)\in X\times (Y\cup Z)$.  This proves that $(X\times
Y) \cup (X \times Z)\subseteq X\times (Y\cup Z).$


\ea
\ep


\end{document}