\documentclass{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}%
\setcounter{MaxMatrixCols}{30}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}

\newcommand{\topo} {\mathcal{T}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\complex}{\mathbb{C}}
\newcommand{\naturals}{\mathbb{N}}
\newcommand{\basis}{\mathcal{B}}
\newcommand{\ra}{\rightarrow}
\newcommand{\compose}{\circ}
\newcommand{\boundary}{\partial}

\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\bea}{\begin{eqnarray}}
\newcommand{\eea}{\end{eqnarray}}
\newcommand{\beann}{\begin{eqnarray*}}
\newcommand{\eeann}{\end{eqnarray*}}
\newcommand{\integers}{{\mathbb Z}}

\def\reff#1{(\ref{#1})}


\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}


\begin{document}

\title{Real and Complex Analysis Lectures  -- Integration workshop 2020}
\author{Shankar Venkataramani} 
\maketitle

\begin{abstract}
Lecture notes from the Integration Workshop at University of Arizona, 
August 2020.
These notes borrow heavily from notes for previous workshops,
written and revised by Tom Kennedy, David Glickenstein, Ibrahim Fatkullin and others.  There is more material than I can hope to cover in the lectures. I would urge you to go through all of it, even the parts that I don't get to in the lectures, because this background will be very useful in your core classes.
\end{abstract}


\begin{center}
\bf{\Large Lecture 1}
\end{center}


\section{Sequences and series}

\subsection{Definitions, convergence tests}

\begin{definition} Let $a_n$ be a sequence of real or complex numbers. 
We say that $a_n$ {\bf converges} to $a$ if for every $\epsilon > 0$ 
there is an $N$ such that $n \ge N$ implies $|a_n-a|<\epsilon$. 
We say that $a_n$ is a Cauchy sequence if for every 
$\epsilon > 0$ there is an $N$ such that $n,m \ge N$ 
implies $|a_n-a_m|<\epsilon$. 
\end{definition}

\begin{theorem} The following statements are equivalent: \\
(1) $\reals$ is complete.\\
(2) Every bounded sequence in $\reals$ has a least upper bound.
\end{theorem}

The second statement is taken as an axiom about $\reals$. By the completeness axiom of the real numbers, a monotone sequence 
converges if and only if it is bounded. 
Given a sequence $a_n$, define $b_n = \sup \{ a_k : k \ge n \}$.
Then $b_n$ is a nonincreasing sequence and so has a limit.
Call this the limit superior or just lim sup $a_n$ and write
$\limsup_{n \ra \infty} a_n$.
Similarly, the limit inferior or lim inf is defined by 
\beann
\liminf_{n \ra \infty} a_n = \lim_{n \ra \infty}
\inf \{ a_k : k \ge n \}
\eeann

The $\liminf$ and $\limsup$ always exist although the $\liminf$ 
and the $\limsup$ can  be $\pm\infty$. 
We always have $\liminf_{n\to\infty}a_n \le \limsup_{n\to\infty} a_n$. 
They are equal if and only if $a_n$ converges. In this case they are 
equal to the limit of $a_n$ and write
$$\lim_{n\to\infty} a_n.$$

Given a sequence $a_n$ of real or complex numbers we can form the 
series $\sum_{n=1}^\infty a_n$. The partial sums are 
\beann
s_n=\sum_{k=1}^n a_k
\eeann
We can that the series converges to $s$ if the partial sums $s_n$ converges
to $s$. We say it converges absolutely if $\sum_{n=1}^\infty |a_n| < \infty$.

\begin{proposition}
({\bf Integral test}): Let $f$ be a positive decreasing 
function defined on $[1,\infty)$ such that $lim_{x \ra \infty} f(x) = 0$.
For $n = 1, 2, \cdots$, define
\beann
s_n = \sum_{k=1}^n f(k), \quad t_n = \int_1^n \, f(x) \, dx, \quad
d_n = s_n - t_n
\eeann
Then 
\begin{itemize}
\item $0 < f(n+1) \le d_{n+1} \le f(1)$, for $n=1,2,\cdots$. 
\item $d= \lim_{n \ra \infty} d_n$ exists
\item $s_n$ converges if and only if $t_n$ converges. 
\item $0 \le d_k-d \le f(k)$ for $k=1,2,\cdots$. 
\end{itemize}
\end{proposition}

\begin{proposition}
({\bf Ratio and root tests}): Given a series
$\sum_{n=1}^\infty a_n$ of nonzero complex terms, let 
\beann
r_- = \liminf_{n \ra \infty} \left| \frac{a_{n+1} }{ a_n } \right|, \quad
r_+ = \limsup_{n \ra \infty} \left| \frac{a_{n+1} }{ a_n } \right|, \quad
\rho = \limsup_{n \ra \infty} |a_n|^{1/n}
\eeann
\begin{itemize}
\item The series converges absolutely if either $r_+ < 1$ or $\rho< 1$.
\item The series diverges if either $r_- > 1$ or $\rho> 1$.
\item In all other cases the tests are inconclusive.
\end{itemize}
\end{proposition}

\subsection{Infinite products}


Let $u_n$ be a sequence of complex numbers. The infinite product
$\prod_{n=1}^\infty u_n$ is said to converge if there is an $N$ such 
that $u_n \ne 0$ for $n \ge N$ and the sequence $p_k = \prod_{n=N+1}^k$
has a nonzero limit $p$ as $k \ra \infty$.

In the case of convergence, 
$\prod_{n=1}^\infty u_n$ is defined to be $p p_1 \cdots p_N$. 

There is a connection betweeen convergence of sums and of products.
For $a_n>0$, the product $\prod_{n=1}^\infty (1+a_n)$ 
converges if and only if the series $\sum_{n=1}^\infty a_n$ 
converges. 

We say that the product $\prod_{n=1}^\infty (1+a_n)$ 
converges absolutely if $\prod_{n=1}^\infty (1+|a_n|)$ converges.
Absolute convergence of the infinite product implies convergence of 
the product.

\subsection{Sequences of functions}

\begin{definition}
A sequence of functions is said to {\bf converge pointwise} 
to a limit function $f$ on a set $S$ provided that for
every $x \in S$, and each $\epsilon > 0$, there exists $N$, 
depending possibly on both $x$ and $\epsilon$ such that
$n > N$ implies $|f_n(x) - f(x)| < \epsilon$. 
If the choice of $N$ does not depend on $x$, the sequence of functions 
is said to {\bf converge uniformly.}
Let $f_n$ be a sequence of functions defined on a set $S$. 
For each $x \in S$, set 
\beann
s_n(x) = \sum_{k=1}^n \, f_k(x) 
\eeann 
If $s_n \rightarrow s$ uniformly on $S$, then we say that 
$\sum_{n=1}^\infty f_n(x)$ converges uniformly on $S$.  
\end{definition}

\begin{proposition}
({\bf Uniform convergence and continuity})
If $f_n  \ra f$ uniformly on $S$ and each $f_n$ is continouous at a point 
$c$, then $f$ is continuous at $c$.
\end{proposition}

\begin{theorem} (Weierstrass M-test) 
Let $M_n$ be a sequence of nonnegative numbers such that
$0 \le |f_n(x)| \le  M_n $ for $n = 1, 2, \cdots$ and every $x \in S$.
If $\sum_{n=1}^\infty M_n$ converges, then 
$\sum_{n=1}^\infty f_n(x)$ converges uniformly on $S$.
\end{theorem} 

\begin{theorem} (Stone-Weierstrass theorem) 
Let $f:[0,1] \to \mathbb{C}$ be a continuous function. There is a sequence of polynomials $g_n(x) = \sum_{k=1}^n a_k x^k$ that converges to $f$ uniformly on $[0,1]$.
\end{theorem} 


\medskip
\noindent {\bf  Integration and differentiation}
\smallskip

Many of the theorems on uniform convergence permit the reversal of the order 
of taking of limits.

\begin{theorem} (Integration) Let $f_n$ be Riemann integrable functions 
on $[a,b]$ for $n=1,2,\cdots$. 
Define 
\beann
g_n(x) = \int_a^x \, f_n(t) dt, \quad x \in [a, b]
\eeann
and
\beann
g(x) = \int_a^x \, f(t) dt, \quad x \in [a, b]
\eeann
Assume there exists $f$ so that $||f_n-f||_\infty \ra 0$. Then 
\begin{itemize}
\item $f$ is Riemann integrable and 
\item $||g_n - g||_\infty \ra 0$
\end{itemize}
\end{theorem}

\begin{theorem} (Differentiation) 
Assume that $f_n$ is differentiable on $(a,b)$,
$f_n^\prime$ is Riemann integrable and that there exist a function
$g$ so that $d(f_n^\prime,g) \ra 0$ and a point $c \in (a,b)$ so that 
$f_n(c)$ converges. Then 

(a) there exists f so that $d(f_n,f) \ra 0$, and

(b) $f$ is differentiable with derivative $g$.
\end{theorem}

\section{Inequalities}

Inequalities are the ``bread-and-butter" of analysis, and it is important to get familiar with thinking through an analysis problem and recognizing which inequalities/estimates would help in that context.

While they might seem confusing at first, there are (a few) general principles that underlie most of the elementary inequalities that you will need.

\begin{example} (The triangle inequality for real numbers) Let $x,y \in \mathbb{R}$. Then $|x+y| \leq |x| + |y|$.
\end{example}

Another basic inequality is the AM-GM inequality. Let $x,y$ be real numbers. Then 
$$
0 \leq (x-y)^2 \implies x^2  + y^2 \geq 2 x y.
$$
If $a,b \geq 0$, taking $x = \sqrt{a}, y = \sqrt{b}$ gives 
$$
\frac{a+b}{2} \geq \sqrt{a b}.
$$

We can extend this to vectors in $\mathbb{R}^n$. Indeed
$$
(x_1^2 + x_2^2 + \cdots + x_n^2) + (y_1^2 + x_2^2 + \cdots + y_n^2) \geq 2 (x_1 y_1 + x_2 y_2 + \cdots + x_n y_n)
$$

A useful technique is to look at "symmetries" for (portions) of inequalities. For example, in the previous inequality, the right hand side is invariant under $x_i \to \lambda x_i, y_i  \to y_i/\lambda$, while the left hand side is not. Consequently, for every $\lambda > 0$, we have 
$$
\sum_{i=1}^n \lambda^2 x_i^2 + \sum_{i=1}^n \lambda^{-2} x_i^2 \geq 2 \sum_{i=1}^n  x_i y_i. 
$$
The left hand side depends on $\lambda$ and the inequality is true for all $\lambda$. So, it should also hold for the ``optimal" $\lambda$ obtained by minimizing the left hand side with respect to the choice of $\lambda$.

\begin{exercise}
Prove the Cauchy-Schwarz inequality: 
$$
\displaystyle{\left[\sum x_i^2\right]^{1/2}  \left[\sum x_i^2\right]^{1/2} \geq  \sum  x_i y_i.}
$$ 
\end{exercise}

Other useful techniques for deriving inequalities come from calculus, namely the mean value theorem. Indeed, if  $f$ is differentiable and $f'(x) \geq 0 $ for $x \in (a,b)$, it follows that $f(b) - f(a) = (b-a) f'(c)$ for some $c \in (a,b)$. Consequently $f(b) \geq f(a)$. 

Some useful inequalities that we can obtain using this technique are 
\begin{align*}
e^x & \geq 1  \quad \forall x \geq 0\\
e^x & \geq 1 + x \quad \forall x \geq 0 
\end{align*}
We can also ``integrate both sides" of inequalities to get an (inductive) sequence of inequalities 
$$
e^x \geq 1 + \frac{x^n}{n!} \quad \forall x \geq 0.
$$

\begin{exercise}
Show that $\frac{2}{\pi} x \leq \sin(x) \leq x$ for $0 \leq x \leq \frac{\pi}{2}$.
\end{exercise}

\subsection{Convexity}

A two times differentiable function $f : D \to \mathbb{R}$ defined on an interval $D \subseteq \mathbb{R}$ is {\em convex} if $f''(x) \geq 0$.

\begin{example}
The functions $f(x) = x^2, e^x$ are convex on $D=\mathbb{R}$. The functions $f(x) = 1/x, -\log(x)$ are convex on $(0,\infty)$.
\end{example}


With this as our given definition of convexity we have the following consequences:

\begin{proposition}
Let $f$ be a convex function such that $[a,b] \subset D$, the domain of definition of $f$. Then we have
\begin{enumerate}
\item $f(x) \geq f(a) + (x-a) f'(a)$ for all $x \in D$. This is called the {\em first order condition}.
\item $a$ is not ``special". We also have $f(x) \geq f(b) + (x-b) f'(b)$ for all $x \in D$.
\item $f((1-t) a + t b) \geq  (1-t) f(a) + t f(b)$ for all $0 \leq t \leq 1$.
\end{enumerate}
\end{proposition}

All the inequalities from above and many other useful inequalities arise from judicious choices of $f,a,b$ and $x$ in applications of convexity.

\newpage

\begin{center}
\Large{\bf Lecture 2}
\end{center}



\section{Complex Analysis} 


\subsection{Analytic functions}

Let $O$ be an open subset of $\complex$. Let $f:O \ra \complex$. 
We say $f$ is analytic at $z_0$ if the following complex limit exists:
\beann
f^\prime(w) = \lim_{z \ra w} {f(z)-f(w) \over z - w}
\eeann
for all $w$ in a neighborhood of $z_0$.
One can think of a function from $\complex$ to $\complex$ as 
a function from $\reals^2$ to $\reals^2$. We write $z=x+iy$ and 
$f(z) = u(x,y) + i v(x,y)$. Then the function is $F(x,y)=(u(x,y),v(x,y))$. 
It is important to understand that analyticity is a much stronger
property than requiring that $F$ have a total derivative. 
The above limit involves complex 
numbers and so it includes as special cases $z$ approaching
$z_0$ along any direction. These  ``directional limits'' must 
all give the same complex number as the limit. 
In particular, by considering taking the limit in the coordinate 
directions, one obtains the Cauchy Riemann equations.

\begin{theorem} $f$ is analytic at $z_0=(x_0,y_0)$ if and only if for all $(x,y)$ in a 
neighborhood of $(x_0,y_0)$ the total derivative of $F$ exists  and 
\beann
{\partial u \over \partial x }(x,y) = 
{\partial v \over \partial y }(x,y), \quad 
{\partial u \over \partial y }(x,y) = 
- {\partial v \over \partial x }(x,y).
\eeann
\end{theorem}

\subsection{Power series}

An infinite series of the form
\beann
f(z) = \sum_{n=0}^\infty a_n (z - z_0)^n
\eeann
is called a power series centered at $z_0$. Define $r$ by 
$ 1/r = \limsup_{r \ra \infty} |a_n|^{1/n}$
(We make the conventions that  $1/0 = \infty$ and $1/\infty = 0$.) 
Then by the root test, the series converges absolutely if $|z - z_0| < r$
and diverges if $|z - z_0| > r$. 
Furthermore:

\noindent 1. The series converges uniformly on every compact subset 
of $B(z_0, r)$.

\noindent 2. The function $f$ can be differentiated term by term for 
any $z \in B(z_0,r)$, 
\beann
f^\prime(z) = \sum_{n=1}^\infty n a_n (z - z_0)^{n-1}
\eeann

\noindent 3. The power series for $f^\prime$ has radius of convergence $r$.

\noindent 4. Repeated differentiation and evaluation of this yields
$a_k = f^{(k)}(z_0)/k!$.

\begin{theorem} 
Suppose that the power series 
\beann
f(z) = \sum_{n=0}^\infty a_n (z - z_0)^n
\eeann
has a nonzero radius $r$ of convergence. Then $f$ is analytic on 
$B(z_0,r)$. Conversely, if $f$ is analytic at $z_0$, then 
there is a power series with a nonzero radius of convergence that 
converges to $f$ in a neighborhood of $z_0$.
\end{theorem} 

\subsection{Integration}

\begin{definition} A domain $D$ is simply connected if the region bounded by 
every simple closed curve in $D$ is contained in $D$, i.e., every 
simple closed curve in $D$ may be continuously contracted to a 
point without leaving $D$. 
\end{definition}

\begin{theorem} [one of many ``Cauchy's theorems''] 
If  $D$  is a simply connected open set and $f$ is analytic on $D$ and 
$\gamma$ is a differentiable closed curve in $D$, then 
\be
\oint_\gamma f(z) dz =0
\ee
\end{theorem}

\subsection{Zeroes, poles and residues}

We say $f$ has a zero at $z_0$ if $f(z_0)=0$. 
In this case it is possible to write it in the form 
$f(z) = (z-z_0)^n g(z)$ in a neighborhood of $z_0$ where $g$ does not 
vanish on this neighborhood. The integer $n$ is unique and called the 
{\it order} of the zero.

A neigborhood of a point $z_0$ means an open set containing $z_0$.
By a deleted neighborhood of $z_0$ we will mean a neighborhood of 
$z_0$ with $z_0$ removed. A function
$f$ has an isolated singularity at $z_0$ if it is analytic on
a deleted neighborhood of $z_0$. 

If $f$ has an isolated singularity at $z_0$, and we can redefine it 
at $z_0$ so that the function is analytic at $z_0$, then we say 
$f$ has a removable singularity at $z_0$. 
Otherwise we consider $1/f$ where $1/f$ is defined to be $0$ at 
$z_0$. If this is analytic at $z_0$  we say $f$ has a pole at $z_0$.
The order of the pole is defined as the order of the zero of 
$1/f$ at $z_0$. If it does not have a pole we say it has an essential 
singularity. 

\begin{theorem} If $f$ has a pole of order $n$ at $z_0$ then 
\beann
f(z) = {a_{-n}\over (z-z_0)^n} + {a_{-(n-1)}\over (z-z_0)^{n-1}}
+ \cdots + {a_{-1}\over z-z_0} + g(z) 
\eeann
where $g$ is analytic at $z_0$. 
\end{theorem}
The {\it principal part} of $f(z)$ (at $z_0$) is 
\beann
{a_{-n}\over (z-z_0)^n} + {a_{-(n-1)}\over (z-z_0)^{n-1}}
+ \cdots + {a_{-1}\over z-z_0} 
\eeann
The {\it residue} of $f$ at $z_0$ is $a_{-1}$ 


\section{Introduction to metric spaces}

\subsection{Definition of a metric space and basic results}

\begin{definition}

A metric space $(X,d)$ is a set $X$ and a function (called the metric)
$d:X\times X\rightarrow\mathbb{R}$ such that for all $x,y,z\in
X,$ the metric satisfies:

\begin{enumerate}
\item (positive definite) $d\left(  x,y\right)  \geq0$ with $d\left(
x,y\right)  =0$ if and only if $x=y$

\item (symmetric) $d\left(  x,y\right)  =d\left(  y,x\right)  $

\item (triangle inequality) $d\left(  x,z\right)  \leq
d\left(  x,y\right)  +d\left(  y,z\right)  $
\end{enumerate}
\end{definition}

\medskip
\begin{example}  {\bf: The $L^\infty$ norm }
\smallskip

Consider the vector space $C(S)$, the real valued bounded continuous functions 
on a metric space $S$, and define the infinity norm (or sup norm) by 
\beann
||f||_\infty = \sup_{x \in S} |f(s)|
\eeann
\end{example}

$|| \quad  ||_\infty$ is a norm
This norm induces a metric $d(f, g) = ||f - g||_\infty$ in the usual way. 
The theorems above on uniform continuity show that
$C(S)$ with this metric is a complete metric space.

\begin{definition}
In a metric space $(X,d)$, a set $U$ is said to be open if $\forall x \in U$,
$\exists \epsilon >0$ such that $d(y,x)< \epsilon$ implies $y \in U$. 
\end{definition}


\subsection{Continuous maps}

\begin{definition} Let $(X,d)$ and $(Y,d^\prime)$ be metric spaces
and $f:X \rightarrow Y$ a function. For $x \in X$, we say $f$ is
continuous at $x$ if $\forall \epsilon >0$, $\exists \delta>0$ such that
$d(x,y) < \delta$ implies $d^\prime(f(x),f(y))< \epsilon$. 
We say the map is globally continuous (or just continuous) if 
it is continuous at every point in $X$.
\end{definition}

\begin{definition}
Let $(X,d)$ and $(Y,d^\prime)$ be metric spaces. 
A function  $f:X \rightarrow Y$ is 
{\bf sequentially continuous} if for every convergent 
sequence $x_n \rightarrow x$ in $X$, we have $f(x_n) \rightarrow f(x)$.
\end{definition}

\begin{proposition} In a metric space continuous = sequentially continuous. 
\end{proposition}

\subsection{Completeness and Uniform continuity}

\begin{definition}
A sequence $x_n$ in a metric space is {\bf Cauchy} if for any $\epsilon>0$ 
there exist an integer $N$ such that for $n,m \ge N$ we have 
$d(x_n,x_m)<\epsilon$. A metric space $X$ is {\bf complete} if 
every Cauchy sequence converges, i.e., for every Cauchy sequence
$x_n$ there is $ x \in X$ such that $x_n$ converges to $x$.
\end{definition}

Complete metric spaces are the natural setting for analysis, because, in these spaces Cauchy sequences (i.e sequences that ``morally" should converge) are indeed convergent. They come up frequently in applications, because they allow one to assert the existence of a solution as the limit of an appropriately constructed sequence of approximate solutions. For this reason, it is useful to identify if a given metric space is complete, and if not (as for e.g $\mathbb{Q}$ is not complete), develop an approach to make a ``natural" complete metric space (e.g. going from $\mathbb{Q}$ to $\reals$.)

Completeness is {\bf not} a topological property. Two metric spaces can be homeomorphic (topologically the same) while one if complete, and the other is not. The issue here is that continuous functions can map Cauchy sequences into sequences that are not Cauchy, and vice-versa. 

\begin{example}
$f(x) = x/(1-x^2)$.
\end{example}

A stronger notion than continuity is {\em uniform continuity}. 

\begin{definition}
A function $f:(M,d) \to (N,\rho)$ between metric spaces  is {\em uniformly continuous} if for all $\epsilon > 0$, there is a $\delta > 0$ such that {\em for all } $ x \in M$, $d(y,x) < \delta \implies \rho(f(y),f(x)) < \epsilon$.
\end{definition}

If $f$ is uniformly continuous, then it will map Cauchy sequences into Cauchy sequence.

\begin{proposition} Every closed subset of a complete metric space is a complete metric space with the induced metric.
\end{proposition}

This gives an approach to ``completing" any metric space, that you will explore in the problem set. 

\section{Compactness in metric spaces}

\subsection{Definitions of compactness}

In a topological space there are two different notions of compactness. 

\begin{definition} 
A set $F$ in a topological space 
$(X,\topo)$ is {\bf compact}
if for any collection of open sets whose union contains $F$ 
(an open cover of $F$), there is a finite subcollection whose union 
still contains $F$ (finite subcover).
\end{definition}

\begin{definition} 
A set $F$ in a topological space $(X,\topo)$ is {\bf sequentially compact}
if every sequence contained in $F$ has a limit point in $F$. That is, every
sequence has a subsequence which converges to a point in $F.$
\end{definition}

\begin{proposition} In a metric space a set is compact if and only if it 
is sequentially compact.  
\end{proposition}

In a general topological space you can have sequentially compact sets 
which are not compact and compact sets which are not sequentially compact.


\subsection{Properties of compact spaces}

\begin{proposition}
If $f:X\rightarrow Y$ is continuous and $X$ is compact, then $f\left(
X\right)$ is compact.
\end{proposition}

\begin{proposition}
If $f:X\rightarrow\mathbb{R}$ is continuous and $X$ is sequentially
compact, then there exist $x_{min}$ and $x_{max}$ in $X$ such that
\begin{align*}
f\left(  x_{min}\right)   &  =\inf_{x\in X}f\left(  x\right) \\
f\left(  x_{max}\right)   &  =\sup_{x\in X}f\left(  x\right)  .
\end{align*}
In words, $f$ attains its minimum and maximum.
\end{proposition}

\begin{proof}
This idea is called the {\em direct method}. We prove that $f$ attains its min. Let 
\beann
m=\inf_{x\in X}f\left(  x\right)
\eeann
By the definition of $\inf$, 
we can find $x_n \in X$ such that $f(x_n) <  m + 1/n$.
The sequence $x_n$ has a subsequence $x_{n_k}$ 
that converges to some $x_{min} \in X$. 
By continuity $f(x_{min})=\lim_k f(x_{n_k})$. So we have 
\beann
m \le f(x_{min}) = \lim_k f(x_{n_k}) \le \limsup_k [m + 1/n_k] = m
\eeann
Hence $f(x_{min})=m$. 
\end{proof}


\subsection{Heine-Borel and Bolzano-Weierstrass theorems}

Notice that $(0,1]$, which is not closed, is not compact, because the cover ${\displaystyle\bigcup\limits_{k\in\mathbb{N}}}
\left\{  (1/k,1]\right\}  $ has no finite subcover.
And notice that $[0,\infty)$, which is not bounded, is not compact because
the cover $[0,n]$, $n=1,2,\cdots$ has no finite subcover. 

\begin{definition}
A subset $X$ of $\mathbb{R}^{n}$ is said to be \emph{bounded }if there exists
$r>0$ such that $X\subset B\left(  0,r\right)  =\left\{  x\in\mathbb{R}%
^{n}:\left\vert x\right\vert <r\right\}  $.
\end{definition}

\begin{theorem}
Subsets of $\reals^n$ are compact if and only if they are closed and bounded.
\end{theorem}

%

Since compactness and sequential compactness are equivalent in $\reals^n$, 
we have 
\begin{theorem} (Bolzano-Weierstrass)  Every bounded sequence in $\mathbb{R}^n$ has a convergent subsequence.
\end{theorem}



\end{document}
\end
