\documentclass[12pt,a4paper]{article}
\usepackage{amssymb,amsmath,amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{convention}[theorem]{Convention}
\newtheorem{statement}[theorem]{Statement}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{axiom}[theorem]{Axiom}
\theoremstyle{definition}
\newtheorem{question}[theorem]{Q}
\begin{document}
\title{Analysis I\\Course C5}
\author{T.~W.~K\"{o}rner}
\maketitle
\begin{footnotesize}
\noindent
{\bf Small print}
The syllabus for the course is defined by
the Faculty Board Schedules (which are minimal for lecturing
and maximal for examining).
I should {\bf very much} appreciate being told
of any corrections or possible improvements
and might even part with a small reward to the
first finder of particular errors. This document
is written in \LaTeX2e and should be available from my
home page 
{\sf http://www.dpmms.cam.ac.uk/\textasciitilde twk}
in latex, dvi and ps formats.
My e-mail address is \verb+twk@dpmms+. Some, fairly useless,
comments on the exercises
are available for supervisors from me or the secretaries in DPMMS.
\end{footnotesize}

\tableofcontents

\section{Why do we bother?} It is surprising how many people
think that analysis consists in the difficult
proofs of obvious theorems. All we need know, they say, is what
a limit is, the definition of continuity
and the definition of the derivative. All the
rest is `intuitively clear'.

If pressed they will agree that these definitions apply as
much to the rationals ${\mathbb Q}$ as to the real
numbers ${\mathbb R}$. They then have
to explain the following interesting
example.
\begin{example}\label{Rational}
If $f:{\mathbb Q}\rightarrow{\mathbb Q}$
is given by
\begin{alignat*}{2}
f(x)&=-1&&\qquad\text{if $x^{2}<2$,}\\
f(x)&=1&&\qquad\text{otherwise,}
\end{alignat*}
then

(i) $f$ is a continuous function with $f(0)=-1$, $f(2)=1$ yet
there does not exist a $c$ with $f(c)=0$,

(ii) $f$ is a differentiable function with $f'(x)=0$ for
all $x$ yet $f$ is not constant.
\end{example}

What is the difference between ${\mathbb R}$ and ${\mathbb Q}$
which makes
calculus work on one even though it fails on the other?
Both are `ordered fields', that is, both support operations
of `addition'
and `multiplication' together with a relation `greater than'
(`order') with the properties that we expect. If the
reader is interested she will find a complete list of
the appropriate axioms in texts like the altogether
excellent book of Spivak~\cite{Spivak} and its
many rather less excellent competitors,
but, interesting as
such things may be, they are irrelevant to our purpose
which is not to consider the shared properties
of ${\mathbb R}$ and ${\mathbb Q}$
but to identify  a \emph{difference} between the
two systems which will enable us to exclude the
possibility of a function like that of Example~\ref{Rational}
for functions from ${\mathbb R}$ to ${\mathbb R}$.


To state the difference we need only recall a definition
from course~C3.
\begin{definition}\label{one convergence definition}
If $a_{n}\in{\mathbb R}$ for each $n\geq 1$
and $a\in{\mathbb R}$ then we say that $a_{n}\rightarrow a$
if given $\epsilon>0$ we can find an $n_{0}(\epsilon)$
such that
\[|a_{n}-a|<\epsilon\ \text{for all $n\geq n_{0}(\epsilon)$}.\]
\end{definition}
The key property of the reals, the \emph{fundamental axiom}
which makes everything work was also stated in
the course~C3.
\begin{axiom}{\bf [The fundamental axiom of analysis]}
If $a_{n}\in{\mathbb R}$ for each $n\geq 1$, $A\in{\mathbb R}$
and $a_{1}\leq a_{2}\leq a_{3}\leq \ldots$ and
$a_{n}<A$ for each $n$ then there exists an $a\in{\mathbb R}$
such that $a_{n}\rightarrow a$ as $n\rightarrow\infty$.
\end{axiom}
Less ponderously, and just as rigorously, the fundamental axiom
for the real numbers
says \emph{every increasing sequence bounded above tends
to a limit}.

Everything which depends on the fundamental axiom is
analysis, everything else is mere algebra.

\section{The axiom of Archimedes} We start by proving 
the following results on limits, some of which
you saw proved in course~C3.
\begin{lemma}\label{one sequences}
(i) The limit is unique. That is, if $a_{n}\rightarrow a$
and $a_{n}\rightarrow b$ as $n\rightarrow\infty$
then $a=b$.

(ii) If $a_{n}\rightarrow a$ as $n\rightarrow\infty$
and $n(1)<n(2)<n(3)\ldots$ then
$a_{n(j)}\rightarrow a$ as $j\rightarrow\infty$.

(iii) If $a_{n}=c$ for all $n$ then $a_{n}\rightarrow c$
as $n\rightarrow\infty$.

(iv) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$ then
$a_{n}+b_{n}\rightarrow a+b$.

(v) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$ then
$a_{n}b_{n}\rightarrow ab$.

(vi) If $a_{n}\rightarrow a$
as $n\rightarrow\infty$, $a_{n}\neq 0$ for each $n$ and
$a\neq 0$, then $a_{n}^{-1}\rightarrow a^{-1}$.

(vii) If $a_{n}\leq A$ for each $n$ and
$a_{n}\rightarrow a$
as $n\rightarrow\infty$ then $a\leq A$.
\end{lemma}

We need the following variation on the fundamental axiom.
\begin{exercise}\label{Exercise 1.4}
A decreasing sequence of real numbers bounded below tends
to a limit.
\end{exercise}
[Hint. If $a\leq b$ then $-b\leq -a$.]

Useful as the results of Lemma~\ref{one sequences} are,
they are also true of sequences in ${\mathbb Q}$.
They are therefore mere, if important, algebra.
Our first truly `analysis' result may strike the
reader as rather odd.
\begin{theorem}{\bf [Axiom of Archimedes]}\label{Archimedes}
\[\frac{1}{n}\rightarrow 0\ \text{as $n\rightarrow\infty$}\]
\end{theorem}
Theorem~\ref{Archimedes} shows that there is no `exotic'
real number $\gimel$ say (to choose an exotic symbol)
with the property that $1/n>\gimel$ for all integers $n\geq 1$
yet $\gimel>0$ (that is, $\gimel$ is strictly positive
and yet smaller than all strictly positive rationals).
There exist number systems with such exotic numbers
(the famous `non-standard analysis' of Abraham Robinson
and the `surreal numbers' of Conway constitute two
such systems) but, just as the rationals are, in
some sense, too
small a system for the standard theorems of analysis to hold
so these non-Archimedean systems are, in some sense,
too big. Archimedes and  Eudoxus
realised the need for an axiom
to show that there is no exotic number $\daleth$ bigger
than any integer\footnote{Footnote for passing historians,
this is a course in mathematics.}
(i.e. $\daleth>n$ for all integers $n\geq 1$;
to see the connection with our form of the axiom consider
$\gimel=1/\daleth$). However, in spite of its name, what
was an axiom for Archimedes is a theorem
for us.
\begin{theorem} Given any real number $K$ we can find
an integer $n$ with $n>K$.
\end{theorem}

\section{Series and sums} There is no need to
restrict the notion of a limit to real numbers.
\begin{definition}\label{complex convergence definition}
If $a_{n}\in{\mathbb C}$ for each $n\geq 1$
and $a\in{\mathbb C}$ then we say that $a_{n}\rightarrow a$
if given $\epsilon>0$ we can find an $n_{0}(\epsilon)$
such that
\[|a_{n}-a|<\epsilon\ \text{for all $n\geq n_{0}(\epsilon)$}.\]
\end{definition}
\begin{exercise}\label{complex sequences}
We work in ${\mathbb C}$.

(i) The limit is unique. That is, if $a_{n}\rightarrow a$
and $a_{n}\rightarrow b$ as $n\rightarrow\infty$
then $a=b$.

(ii) If $a_{n}\rightarrow a$ as $n\rightarrow\infty$
and $n(1)<n(2)<n(3)\ldots$ then
$a_{n(j)}\rightarrow a$ as $j\rightarrow\infty$.

(iii) If $a_{n}=c$ for all $n$ then $a_{n}\rightarrow c$
as $n\rightarrow\infty$.

(iv) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$ then
$a_{n}+b_{n}\rightarrow a+b$.

(v) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$ then
$a_{n}b_{n}\rightarrow ab$.

(vi) If $a_{n}\rightarrow a$
as $n\rightarrow\infty$, $a_{n}\neq 0$ for each $n$ and
$a\neq 0$, then $a_{n}^{-1}\rightarrow a^{-1}$.
\end{exercise}
\begin{exercise}\label{complex series 2} Explain why there is no result in
Exercise~\ref{complex sequences} corresponding
to part (vii) of Lemma~\ref{one sequences}.
\end{exercise}

We illustrate some of the ideas introduced by studying
infinite sums.
\begin{definition}~\label{convergent sum}
We work in ${\mathbb F}$ where ${\mathbb F}={\mathbb R}$
or ${\mathbb F}={\mathbb C}$.
If $a_{j}\in{\mathbb F}$
we say that
$\sum_{j=1}^{\infty}a_{j}$ converges to $s$
if
\[\sum_{j=1}^{N}a_{j}\rightarrow s\]
as $N\rightarrow{\infty}$.
We write $\sum_{j=1}^{\infty}a_{j}=s$.

If $\sum_{j=1}^{N}a_{j}$ does not tend to a limit
as $N\rightarrow\infty$,
we say that the sum $\sum_{j=1}^{\infty}a_{j}$
diverges.
\end{definition}
\begin{lemma} We work in ${\mathbb F}$ where ${\mathbb F}={\mathbb R}$
or ${\mathbb F}={\mathbb C}$.

(i) Suppose $a_{j},\, b_{j}\in{\mathbb F}$
and $\lambda,\,\mu\in{\mathbb F}$. If
$\sum_{j=1}^{\infty}a_{j}$ and $\sum_{j=1}^{\infty}b_{j}$
converge then so does 
$\sum_{j=1}^{\infty}\lambda a_{j}+\mu b_{j}$
and
\[\sum_{j=1}^{\infty}\lambda a_{j}+\mu b_{j}
=\lambda \sum_{j=1}^{\infty}a_{j}
+\mu \sum_{j=1}^{\infty}b_{j}.\]

(ii) Suppose $a_{j},\, b_{j}\in{\mathbb F}$
and there exists an $N$ such that
$a_{j}=b_{j}$ for all $j\geq N$. Then,
either $\sum_{j=1}^{\infty}a_{j}$ and $\sum_{j=1}^{\infty}b_{j}$
both converge or they both diverge. (In other
words, initial terms do not matter.)
\end{lemma}
\begin{exercise} Any problem on sums $\sum_{j=1}^{\infty}a_{j}$
can be converted into one on sequences by considering
the sequence $s_{n}=\sum_{j=1}^{n}a_{j}$. Show conversely
that a sequence $s_{n}$ converges if and only
if, when we set $a_{1}=s_{1}$ and $a_{n}=s_{n}-s_{n-1}$
$[n\geq 2]$ we have $\sum_{j=1}^{\infty}a_{j}$
convergent. What can you say about 
$\lim_{n\rightarrow\infty}\sum_{j=1}^{n}a_{j}$
and $\lim_{n\rightarrow\infty}s_{n}$ if both exist?
\end{exercise}

The following results are fundamental to the study
of sums.
\begin{theorem}{\bf (The comparison test.)}\label{comparison test}
We work in ${\mathbb R}$.
Suppose that $0\leq b_{j}\leq a_{j}$ for all $j$.
Then,
if $\sum_{j=1}^{\infty}a_{j}$ converges, so does
$\sum_{j=1}^{\infty}b_{j}$.
\end{theorem}
\begin{theorem}\label{absolute convergence}
We work in ${\mathbb F}$ where ${\mathbb F}={\mathbb R}$
or ${\mathbb F}={\mathbb C}$.
If $\sum_{j=1}^{\infty}|a_{j}|$ converges, then so does
$\sum_{j=1}^{\infty}a_{j}$.
\end{theorem}

Theorem~\ref{absolute convergence} is often stated using
the following definition.
\begin{definition} We work in ${\mathbb F}$ where ${\mathbb F}={\mathbb R}$
or ${\mathbb F}={\mathbb C}$.
If $\sum_{j=1}^{\infty}|a_{j}|$ converges we say that the sum 
$\sum_{j=1}^{\infty}a_{j}$ is absolutely convergent.
\end{definition}
Theorem~\ref{absolute convergence} then becomes the
statement that  absolute convergence implies convergence.

Here is a trivial but useful consequence of
Theorems~\ref{comparison test} and~\ref{absolute convergence}.
\begin{lemma}{\bf (Ratio test.)}\label{ratio test}
Suppose $a_{j}\in{\mathbb C}$
and $|a_{j+1}/a_{j}|\rightarrow l$ as $j\rightarrow\infty$.
If $l<1$, then $\sum_{j=1}^{\infty}|a_{j}|$ converges.
If $l>1$, then $\sum_{j=1}^{\infty}a_{j}$ diverges.
\end{lemma}
Of course Lemma~\ref{ratio test} tells us nothing if $l=1$
or $l$ does not exist.

Sums which are not absolutely convergent are much harder
to deal with in general. It is worth
keeping in mind the following trivial observation.
\begin{lemma} We work in ${\mathbb F}$ where ${\mathbb F}={\mathbb R}$
or ${\mathbb F}={\mathbb C}$.
If $\sum_{j=1}^{\infty}a_{j}$ converges, then
$a_{j}\rightarrow 0$ as $j\rightarrow\infty$.
\end{lemma}
At a deeper level the following result is
sometimes useful.
\begin{lemma}{\bf (Alternating series test.)}\label{alternating}
We work in ${\mathbb R}$. If
we have a decreasing sequence of positive
numbers $a_{n}$ with $a_{n}\rightarrow 0$
as $n\rightarrow\infty$, then
$\sum_{j=1}^{\infty}(-1)^{j+1}a_{j}$ converges.

Further
\[\left|\sum_{j=1}^{N}(-1)^{j+1}a_{j}
-\sum_{j=1}^{\infty}(-1)^{j+1}a_{j}\right|\leq|a_{N+1}|\]
for all $N\geq 1$.
\end{lemma}
The last sentence is sometimes expressed by saying
`the error caused by replacing a convergent
infinite alternating sum of decreasing terms
by the sum of its first few terms is no greater than the
absolute value of the first term neglected'.

Later we will give another test for convergence
called the integral test (Lemma~\ref{Lemma Integral test})
from which we deduce the result known to many of
you that $\sum_{n=1}^{\infty}n^{-1}$ diverges.
I will give another proof in the next example.
\begin{example}
(i) ${\displaystyle \sum_{n=1}^{\infty}\frac{1}{n}}$ diverges.

(ii) ${\displaystyle \sum_{n=1}^{\infty}\frac{(-1)^{n}}{n}}$ is
convergent but not absolutely convergent.

(iii) If $v_{2n}=1/n$, $v_{2n-1}=-1/(2n)$ then
$\sum_{n=1}^{\infty}v_{n}$ is not convergent.
\end{example}
\section{Least upper bounds} A non-empty bounded set in ${\mathbb R}$
need not have a maximum.
\begin{example} The set $E=\{-1/n\,:\,n\geq 1\}$ is non-empty and
any $e\in E$ satisfies the inequalities $-1\leq e\leq 0$
but $E$ has no largest member.
\end{example}
However, as we shall see every non-empty bounded set in ${\mathbb R}$
has a least upper bound (or supremum).
\begin{definition}\label{Definition, sup}
Let $E$ be a non-empty set in ${\mathbb R}$.
We say that $\alpha$ is a least upper bound for $E$ if

(i) $\alpha\geq e$ for all $e\in E$ [that is, $\alpha$ is an upper bound
for E] and

(ii) If $\beta\geq e$ for all $e\in E$ then $\beta\geq \alpha$
[that is, $\alpha$ is the least such upper bound].
\end{definition}
If $E$ has a supremum $\alpha$ we write $\sup_{e\in E}e=\sup E=\alpha$.
\begin{lemma}\label{Lemma, supremum unique}
If the least upper bound exists it is unique.
\end{lemma}
The following remark is trivial but sometimes helpful.
\begin{lemma}\label{Lemma, supremum other}  
Let $E$ be a non-empty set in ${\mathbb R}$.
Then $\alpha$ is a least upper bound for $E$ if and only if
we can find $e_{n}\in E$ with $e_{n}\rightarrow \alpha$
and $b_{n}$ such that $b_{n}\geq e$ for all $e\in E$
and $b_{n}\rightarrow \alpha$ as $n\rightarrow\infty$.
\end{lemma}
Here is the promised result.
\begin{theorem}\label{theorem, supremum}
Any non-empty set in ${\mathbb R}$
with an upper bound has a least upper bound.
\end{theorem}

We observe that this result is actually equivalent
to the fundamental axiom.
\begin{theorem} Theorem~\ref{theorem, supremum}
implies the fundamental axiom.
\end{theorem}

Of course we have the notion of a greatest lower bound
or infimum.
\begin{exercise}\label{exercise infimum}  Define the greatest lower bound
in the manner of Definition~\ref{Definition, sup},
prove its uniqueness in the manner of
Lemma~\ref{Lemma, supremum unique} and state
and prove a result corresponding to Lemma~\ref{Lemma, supremum other}.
\end{exercise}
If $E$ has an infimum $\beta$ we write $\inf_{e\in E}e=\inf E=\beta$.
One way of dealing with the infimum is to
use the following observation.
\begin{lemma}\label{Lemma minus infimum}
Let $E$ be a non-empty set in ${\mathbb R}$
and write $-E=\{-e\,:\,e\in E\}$. Then $E$ has an infimum
if and only if $-E$ has a supremum. If $E$ has an infimum
$\inf E=-\sup (-E)$.
\end{lemma}
\begin{exercise}\label{exercise infimum 2} 
Use Lemma~\ref{Lemma minus infimum}
and Theorem~\ref{theorem, supremum} to show
that any non-empty set in ${\mathbb R}$
with a lower bound has a greatest lower bound. 
\end{exercise}

The notion of a supremum will play an important 
r\^{o}le in our proofs of
Theorem~\ref{Theorem, interval maximum} 
and Theorem~\ref{radius of convergence}.

The following result is also equivalent to the
fundamental axiom (that is, we can deduce it from
the fundamental axiom and conversely, if we
take it as an axiom, rather than a theorem,
then we can deduce the fundamental axiom as a theorem).
\begin{theorem}{\bf [Bolzano-Weierstrass]}\label{one Bolzano}
If $x_{n}\in{\mathbb R}$ and there exists a $K$
such that $|x_{n}|\leq K$ for all $n$, then we can find
$n(1)<n(2)<\ldots$ and $x\in{\mathbb R}$ such that
$x_{n(j)}\rightarrow x$ as $j\rightarrow\infty$.
\end{theorem}
The Bolzano-Weierstrass theorem
says that every bounded sequence of reals has a convergent
subsequence. Notice that we say nothing about uniqueness;
if $x_{n}=(-1)^{n}$ then $x_{2n}\rightarrow 1$ but
$x_{2n+1}\rightarrow -1$ as $n\rightarrow\infty$.

We shall prove the theorem of Bolzano-Weierstrass
by `lion hunting' but your supervisor may well
show you another method. We shall use the
Bolzano-Weierstrass theorem to prove that every
continuous function
on a closed bounded interval is bounded and attains its bounds
(Theorem~\ref{Theorem, interval maximum}).
The Bolzano-Weierstrass theorem
will be much used in the next analysis course
because it generalises to many dimensions.

\section{Continuity} We make the following definition.
\begin{definition}\label{Definition, Continuity 1}
A function $f:{\mathbb R}\rightarrow{\mathbb R}$
is continuous at $x$ if given $\epsilon>0$ we can find a
$\delta(\epsilon,x)>0$ [read `a delta depending on epsilon 
and $x$'] such that
\[|f(x)-f(y)|<\epsilon\]
for all $y$ with $|x-y|<\delta(\epsilon,x)$.

If $f$ is continuous at each point $x\in{\mathbb R}$ we say that
$f$ is a continuous function on ${\mathbb R}$.
\end{definition}
I shall do my best to make this seem a reasonable definition
but it is important to realise that I am really stating a rule
of the game (like a knights move in chess or the definition
of offside in football). If you wish to play the game
you must accept the rules. Results about continuous functions
must be derived from the definition and not stated as
`obvious from the notion of continuity'.

In practice we use a slightly more general definition.
\begin{definition}\label{Definition, Continuity 2}
Let $E$ be a subset of ${\mathbb R}$.
A function $f:E\rightarrow{\mathbb R}$
is continuous at $x\in E$ if given $\epsilon>0$ we can find a
$\delta(\epsilon,x)>0$ [read `a delta depending on epsilon 
and $x$'] such that
\[|f(x)-f(y)|<\epsilon\]
for all $y\in E$ with $|x-y|<\delta(\epsilon,x)$.

If $f$ is continuous at each point $x\in E$, we say that
$f$ is a continuous function on $E$.
\end{definition}
However, it will do no harm and may be positively helpful
if, whilst you are getting used to the idea of
continuity, you concentrate on the case $E={\mathbb R}$.
\begin{lemma}\label{second continuous}
Suppose that $E$ is a subset of ${\mathbb R}$,
that $x\in E$,
and that $f$ and $g$
are functions from $E$ to ${\mathbb R}$.

(i) If $f(x)=c$ for all $x\in E$, then f is continuous
on $E$.

(ii) If $f$ and $g$ are continuous at $x$,
then so is $f+g$.

(iii) Let us define $f\times g:E\rightarrow {\mathbb R}$
by $f\times g(t)=f(t)g(t)$ for all $t\in E$. Then
if $f$ and $g$ are continuous at $x$, so is $f\times g$.

(iv) Suppose that $f(t)\neq 0$ for all $t\in E$. If
$f$ is continuous at $x$ so is $1/f$.
\end{lemma}
\begin{lemma}\label{continuous chain rule} 
Let $U$ and $V$ be subsets of ${\mathbb R}$. Suppose
$f:U\rightarrow{\mathbb R}$ is such that
$f(t)\in V$ for all $t\in U$. If $f$
is continuous at $x\in U$ and $g:V\rightarrow{\mathbb R}$
is continuous at $f(x)$, then the composition
$g\circ f$ is continuous at $x$.
\end{lemma}
By repeated use of parts~(ii) and~(iii) of
Lemma~\ref{second continuous} it is easy to
show that polynomials $P(t)=\sum_{r=0}^{n}a_{r}t^{r}$
are continuous. The details are spelled out in
the next exercise.
\begin{exercise}\label{Exercise, polynomial}
 Prove the following results.

(i) Suppose that $E$ is a subset of ${\mathbb R}$
and that $f:E\rightarrow{\mathbb R}$ is continuous
at $x\in E$. If $x\in E'\subset E$ then the
restriction $f|_{E'}$ of $f$ to $E'$ is also continuous
at $x$.

(ii) If $J:{\mathbb R}\rightarrow{\mathbb R}$ is
defined by $J(x)=x$ for all $x\in{\mathbb R}$,
then $J$ is continuous on ${\mathbb R}$.

(iii) Every polynomial $P$ is continuous on ${\mathbb R}$.

(iv) Suppose that $P$ and $Q$ are polynomials
and that $Q$ is never zero on some subset $E$
of ${\mathbb R}$. Then the rational function
$P/Q$ is continuous on $E$ (or, more precisely,
the restriction of $P/Q$ to $E$ is continuous.)
\end{exercise}
The following result is little more than an observation
but will be very useful.
\begin{lemma}\label{one arrow}
Suppose that $E$ is a subset of ${\mathbb R}$,
that $x\in E$, and that $f$ is continuous at $x$.
If $x_{n}\in E$ for all $n$ and $x_{n}\rightarrow x$
as $n\rightarrow\infty$, then $f(x_{n})\rightarrow f(x)$
as $n\rightarrow\infty$.
\end{lemma}

So far in this section we have only done algebra
but the next result depends on the fundamental axiom.
It is one of the key results of analysis and although
my recommendation runs contrary to a century of
enlightened pedagogy I can see no objections
to students learning the proof as a model.
Notice that the theorem resolves 
the problem posed by Example~\ref{Rational}~(i).
\begin{theorem}{\bf (The intermediate value theorem).}%
\label{intermediate state}
If $f:[a,b]\rightarrow{\mathbb R}$ is continuous
and $f(a)\geq 0\geq f(b)$ then there exists a $c\in[a,b]$
such that $f(c)=0$.
\end{theorem}
Exercises~\ref{Intermediate 1} to~\ref{Intermediate 3}
are applications of the intermediate value
theorem.
\begin{exercise}\label{Intermediate 1} Show
that any real polynomial of odd degree has
at least one root. Is the result true for
polynomials of even degree? Give a proof or counterexample.
\end{exercise}
\begin{exercise}\label{Intermediate 2} Suppose  that
$g:[0,1]\rightarrow [0,1]$ is a continuous function.
By considering $f(x)=g(x)-x$, or otherwise,
show that there exists a $c\in [0,1]$ with $g(c)=c$.
(Thus every continuous map of $[0,1]$ into itself
has a fixed point.) Give an example of a bijective
(but, necessarily, non-continuous) function
$h:[0,1]\rightarrow [0,1]$ such that $h(x)\neq x$
for all $x\in [0,1]$.

\noindent [Hint: First find a function
$H:[0,1]\setminus\{0,\ 1,\ 1/2\}\rightarrow [0,1]\setminus\{0,\ 1,\ 1/2\}$ 
such that $H(x)\neq x$.]

\end{exercise}
\begin{exercise}\label{Intermediate 3} Every mid-summer day
at six o'clock in the morning, the youngest monk
from the monastery of Damt starts to climb the narrow
path up Mount Dipmes.
At six in the evening he reaches the small temple
at the peak where he spends the night in meditation.
At six o'clock in the morning on the following day
he starts downwards, arriving back at the monastery
at six in the evening. Of course, he does not always walk
at the same speed. Show that, none the less, there
will be some time of day when he will be at the
same place on the path on both his upward and
downward journeys.
\end{exercise}

We proved the intermediate value theorem
(Theorem~\ref{intermediate state}) by lion hunting.
We prove the next two theorems by using the
Bolzano-Weierstrass Theorem (Theorem~\ref{one Bolzano}).
Again the results are very important and I can see
no objection to learning the proofs as a model.
\begin{theorem} If $f:[a,b]\rightarrow{\mathbb R}$
is continuous then we can find an $M$ such that
$|f(x)|\leq M$ for all $x\in[a,b]$.
\end{theorem}
In other words a continuous function on a closed bounded
interval is bounded. We improve this result in the next theorem.
\begin{theorem}\label{Theorem, interval maximum}
If $f:[a,b]\rightarrow{\mathbb R}$ is continuous then we can find
$x_{1},\, x_{2}\in[a,b]$ such that
\[f(x_{1})\leq f(x)\leq f(x_{2})\]
for all $x\in[a,b]$.
\end{theorem}
In other words a continuous function on a closed bounded
interval is bounded and attains its bounds. 
\section{Differentiation} In this section it will
be useful to have another type of limit.
\begin{definition}\label{Another limit}
Let $E$ be a subset of ${\mathbb R}$,
$f$ be some function from $E$ to ${\mathbb R}$,
and $x$ some point of $E$. If $l\in{\mathbb R}$
we say that $f(y)\rightarrow l$ as $y\rightarrow x$
[or, if we wish to emphasise the restriction to $E$
that $f(y)\rightarrow l$ as $y\rightarrow x$ through
values $y\in E$]
if, given $\epsilon>0$, we can find a
$\delta(\epsilon)>0$ [read `a delta depending on epsilon']
such that
\[|f(y)-l|<\epsilon\]
for all $y\in E$ with $0<|x-y|<\delta(\epsilon)$.
\end{definition}
As before there is no real loss if the reader
initially takes $E={\mathbb R}$.

The following two exercises are easy but useful.
\begin{exercise}\label{continuous equivalent}
Let $E$ be a subset of ${\mathbb R}$.
Show that a function $f:E\rightarrow{\mathbb R}$
is continuous at $x\in E$ if and only if 
$f(y)\rightarrow f(x)$ as $y\rightarrow x$.
\end{exercise}
\begin{exercise}\label{real limits}
Let $E$ be a subset of ${\mathbb R}$,
$f$, $g$ be some functions from $E$ to ${\mathbb R}$,
and $x$ some point of $E$.
(i) The limit is unique. That is, if $f(y)\rightarrow l$
and $f(y)\rightarrow k$ as $y\rightarrow x$
then $l=k$.

(ii) If $x\in E'\subseteq E$ and $f(y)\rightarrow l$
as $y\rightarrow x$ through
values $y\in E$, then $f(y)\rightarrow l$
as $y\rightarrow x$ through
values $y\in E'$.

(iii) If $f(t)=c$ for all $t\in E$ then $f(y)\rightarrow c$
as $y\rightarrow x$.

(iv) If $f(y)\rightarrow l$ and $g(y)\rightarrow k$
as $y\rightarrow x$ then
$f(y)+g(y)\rightarrow l+k$.

(v) If $f(y)\rightarrow l$ and $g(y)\rightarrow k$
as $y\rightarrow x$ then
$f(y)g(y)\rightarrow lk$.

(vi) If $f(y)\rightarrow l$
as $y\rightarrow x$, $f(t)\neq 0$ for each $t\in E$ and
$l\neq 0$ then $f(t)^{-1}\rightarrow l^{-1}$.

(vii) If $f(t)\leq L$ for each $t\in E$ and
$f(y)\rightarrow l$ 
as $y\rightarrow x$ then $l\leq L$.
\end{exercise}
We can now define the derivative.
\begin{definition}\label{Definition, Derivative}
Let $E$ be a subset of ${\mathbb R}$.
A function $f:E\rightarrow{\mathbb R}$
is differentiable at $x\in E$ with derivative $f'(x)$
if
\[\frac{f(y)-f(x)}{y-x}\rightarrow f'(x)\]
as $y\rightarrow x$.

If $f$ is differentiable at each point $x\in E$, we say that
$f$ is a differentiable function on $E$.
\end{definition}
As usual, no harm will be done if you replace $E$
by ${\mathbb R}$.

Here are some easy consequences of the definition.
\begin{exercise} Let $E$ be a subset of ${\mathbb R}$,
$f$ some function from $E$ to ${\mathbb R}$,
and $x$ some point of $E$. Show that if
$f$ is differentiable at $x$ then
$f$ is continuous at $x$.
\end{exercise}
\begin{exercise}\label{derivatives}
Let $E$ be a subset of ${\mathbb R}$,
$f$, $g$ be some functions from $E$ to ${\mathbb R}$,
and $x$ some point of $E$. Prove the following results.

(i) If $f(t)=c$ for all $t\in E$ then $f$ is differentiable
at $x$ with $f'(x)=0$.

(ii) If $f$ and $g$ are differentiable at $x$ then so
is their sum $f+g$ and 
\[(f+g)'(x)=f'(x)+g'(x).\]

(iii) If $f$ and $g$ are differentiable at $x$ then so
is their product $f\times g$ and 
\[(f\times g)'(x)=f'(x)g(x)+f(x)g'(x).\]

(iv) If $f$ is differentiable at $x$ and $f(t)\neq 0$ for all $t\in E$
then $1/f$ is differentiable at $x$ and
\[(1/f)'(x)=-f'(x)/f(x)^{2}.\]

(v) If $f(t)=\sum_{r=0}^{N}a_{r}t^{r}$ on $E$ then 
$f$ is differentiable at $x$ and
\[f'(x)=\sum_{r=1}^{N}ra_{r}x^{r-1}\].
\end{exercise}

The next result is slightly harder to prove
than it looks. (we split the proof into two halves
depending on whether $f'(x)\neq 0$ or $f'(x)=0$.
\begin{lemma}\label{chain rule}{\bf [Chain rule]} 
Let $U$ and $V$ be subsets of ${\mathbb R}$. Suppose
$f:U\rightarrow{\mathbb R}$ is such that
$f(t)\in V$ for all $t\in U$. If $f$
is differentiable at $x\in U$ and $g:V\rightarrow{\mathbb R}$
is differentiable at $f(x)$, then the composition
$g\circ f$ is differentiable at $x$ with
\[(g\circ f)'(x)=f'(x)g'(f(x)).\]
\end{lemma}

\section{The mean value theorem} We have almost finished
our project of showing that the horrid situation
revealed by Example~\ref{Rational}
can not occur for the reals.

Our first step is to prove Rolle's
theorem.
\begin{theorem}{\bf [Rolle's theorem]}\label{Rolle}
If $g:[a,b]\rightarrow {\mathbb  R}$
is a continuous function with $g$ differentiable on $(a,b)$
and $g(a)=g(b)$, then we can find a $c\in (a,b)$ such that
$g'(c)=0$.
\end{theorem}

A simple tilt gives the famous mean value theorem.
\begin{theorem}{\bf (The mean value theorem).}\label{mean}
If $f:[a,b]\rightarrow {\mathbb  R}$
is a continuous function with $f$ differentiable on $(a,b)$,
then we can find a $c\in (a,b)$ such that
\[f(b)-f(a)=(b-a)f'(c).\]
\end{theorem}

We now have the results so long desired.
\begin{lemma}\label{easy mean}
If $f:[a,b]\rightarrow {\mathbb  R}$
is a continuous function with $f$ differentiable on $(a,b)$,
then the following results hold.

(i) If $f'(t)>0$ for all $t\in (a,b)$ then $f$ is strictly increasing
on $[a,b]$. (That is, $f(y)>f(x)$ whenever $b\geq y>x\geq a$.)

(ii) If $f'(t)\geq 0$ for all $t\in (a,b)$ then $f$ is increasing
on $[a,b]$. (That is, $f(y)\geq f(x)$ whenever $b\geq y>x\geq a$.)

(iii) {\bf [The constant value theorem]}
If $f'(t)=0$ for all $t\in (a,b)$ then $f$ is constant
on $[a,b]$. (That is, $f(y)=f(x)$ whenever $b\geq y>x\geq a$.)
\end{lemma}
Notice that since we deduce Lemma~\ref{easy mean}
from the mean value theorem we can not use it
in the proof of Rolle's theorem.

The mean value theorem has many important consequences,
some of which we look at in the remainder of the section.

We start by looking at inverse functions.
\begin{lemma} (i) Suppose $f:[a,b]\rightarrow{\mathbb R}$
is continuous. Then $f$ is injective if and only
if it is strictly increasing (that is $f(t)>f(s)$ whenever
$a\leq s<t\leq b$) or strictly decreasing.

(ii) Suppose $f:[a,b]\rightarrow{\mathbb R}$
is continuous and strictly increasing. Let $f(a)=c$
and $f(b)=d$. Then the map $f:[a,b]\rightarrow[c,d]$
is bijective and $f^{-1}$ is continuous on $[c,d]$.
\end{lemma}
\begin{lemma}{\bf [Inverse rule]} Suppose
$f:[a,b]\rightarrow{\mathbb R}$
is differentiable on $[a,b]$ and $f'(x)>0$ for
all $x\in[a,b]$. Let $f(a)=c$
and $f(b)=d$. Then the map $f:[a,b]\rightarrow[c,d]$
is bijective and $f^{-1}$ is differentiable on $[c,d]$
with
\[f^{-1}{}'(x)=\frac{1}{f'(f^{-1}(x))}.\]
\end{lemma}
In the opinion of the author the true meaning of the
inverse rule and the chain rule only becomes clear
when we consider higher dimensions in the next analysis course.

We now prove a form of Taylor's theorem.
\begin{theorem}{\bf [$n$th mean value theorem]}\label{many mean}
Suppose that $b>a$ and $f:[a,b]\rightarrow{\mathbb R}$ is $n+1$ times
differentiable. Then
\[f(b)-\sum_{j=0}^{n}\frac{f^{(j)}(a)}{j!}(b-a)^{j}=
\frac{f^{(n+1)}(c')}{(n+1)!}(b-a)^{n+1}\]
for some $c'$ with $a<c'<b$.
\end{theorem}
This gives us a global and a local Taylor's theorem.

\begin{theorem}{\bf [Global Taylor theorem]}\label{Global theta}
Suppose that $b>a$ and $f:[a,b]\rightarrow{\mathbb R}$ is $n+1$ times
differentiable. If $x,\, t\in[a,b]$
\[f(t)=\sum_{j=0}^{n}\frac{f^{(j)}(x)}{j!}(t-x)^{j}
+\frac{f^{(n+1)}(x+\theta(t-x))}{(n+1)!}(t-x)^{n+1}\]
for some $\theta\in(0,1)$.
\end{theorem}
\begin{theorem}\label{local Taylor}{\bf [Local Taylor theorem]}
Suppose that $\delta>0$ and $f:(x-\delta,x+\delta)\rightarrow{\mathbb R}$ 
is $n$ times
differentiable on $(x-\delta,x+\delta)$ and $f^{(n)}$ is
continuous at $x$. Then
\[f(t)=\sum_{j=0}^{n}\frac{f^{(j)}(x)}{j!}(t-x)^{j}+
\epsilon(t)(t-x)^{n}\]
where $\epsilon(t)\rightarrow 0$ as $t\rightarrow x$.
\end{theorem}
Notice that the local Taylor theorem always gives us some information
but that the global one is useless unless we can find
a useful bound on the $n+1$th derivative.

To reinforce this warning we consider a famous example of Cauchy.
\begin{exercise}\label{start bump} Consider the function
$F:{\mathbb R}\rightarrow{\mathbb R}$ defined by
\begin{alignat*}{2}
F(0)&=0\\
F(x)&=\exp(-1/x^{2})&&\qquad\text{otherwise}.
\end{alignat*}

(i) Prove by induction, using the standard rules of differentiation,
that $F$ is infinitely differentiable at all points $x\neq 0$
and that, at these points,
\[F^{(n)}(x)=P_{n}(1/x)\exp(-1/x^{2})\]
where $P_{n}$ is a polynomial which need not be found explicitly.

(ii) Explain why $x^{-1}P_{n}(1/x)\exp(-1/x^{2})\rightarrow 0$
as $x\rightarrow 0$.

(iii) Show by induction, using the definition of differentiation,
that $F$ is infinitely differentiable at $0$
with $F^{(n)}(0)=0$ for all $n$.
[Be careful to get this part of the argument
right.]

(iv) Show that
\[F(x)=\sum_{j=0}^{\infty}\frac{F^{(j)}(0)}{j!}x^{j}\]
if and only if $x=0$. (The reader may prefer to say
that `The Taylor expansion of $F$ is only valid at $0$'.)

(v) Why does part~(iv) not contradict the local Taylor theorem
(Theorem~\ref{local Taylor})?
\end{exercise}
Since examiners are fonder of the global Taylor theorem
than it deserves I shall go through the following example.
\begin{example} Assuming the standard properties of
the exponential function show that
\[\exp x=\sum_{j=0}^{\infty}\frac{x^{j}}{j!}\]
for all $x$.
\end{example}
Please note that in a pure mathematics question many (or even most)
of the marks in a question of this type
will depend on estimating the remainder term.
[In methods questions you may simply be asked to
`find the Taylor's series' without being asked to prove
convergence.]
\section{Complex variable} The field ${\mathbb C}$
of complex numbers resembles the field ${\mathbb R}$
of real numbers in many ways but not in all.
\begin{lemma} We can not define an order on ${\mathbb C}$
which will behave in the same way as $>$ for ${\mathbb R}$.
\end{lemma}
However there is sufficient similarity for us to define
limits, continuity and differentiability.
(We have already seen some of this in 
Definition~\ref{complex convergence definition}
and Exercise~\ref{complex sequences}.)

\begin{definition}\label{Another complex limit}
Let $E$ be a subset of ${\mathbb C}$,
$f$ be some function from $E$ to ${\mathbb C}$,
and $z$ some point of $E$. If $l\in{\mathbb C}$
we say that $f(w)\rightarrow l$ as $w\rightarrow z$
[or, if we wish to emphasise the restriction to $E$
that $f(w)\rightarrow l$ as $w\rightarrow z$ through
values $w\in E$]
if, given $\epsilon>0$, we can find a
$\delta(\epsilon)>0$ [read `a delta depending on epsilon']
such that
\[|f(w)-l|<\epsilon\]
for all $w\in E$ with $0<|w-z|<\delta(\epsilon)$.
\end{definition}
As usual there is no real loss if the reader
initially takes $E={\mathbb C}$.

\begin{definition}\label{complex continuity}
Let $E$ be a subset of ${\mathbb C}$.
We say that a function $f:E\rightarrow{\mathbb C}$
is continuous at $z\in E$ if and only if
$f(w)\rightarrow f(z)$ as $w\rightarrow z$.
\end{definition}
\begin{exercise}\label{complex limits}
Let $E$ be a subset of ${\mathbb C}$,
$f$, $g$ be some functions from $E$ to ${\mathbb C}$,
and $z$ some point of $E$.

(i) The limit is unique. That is, if $f(w)\rightarrow l$
and $f(w)\rightarrow k$ as $w\rightarrow z$
then $l=k$.

(ii) If $z\in E'\subseteq E$ and $f(w)\rightarrow l$
as $w\rightarrow z$ through
values $w\in E$, then $f(w)\rightarrow l$
as $w\rightarrow x$ through
values $w\in E'$.

(iii) If $f(u)=c$ for all $u\in E$ then $f(w)\rightarrow c$
as $w\rightarrow z$.

(iv) If $f(w)\rightarrow l$ and $g(w)\rightarrow k$
as $w\rightarrow z$ then
$f(w)+g(w)\rightarrow l+k$.

(v) If $f(w)\rightarrow l$ and $g(w)\rightarrow k$
as $w\rightarrow z$ then
$f(w)g(w)\rightarrow lk$.

(vi) If $f(w)\rightarrow l$
as $w\rightarrow z$, $f(u)\neq 0$ for each $u\in E$ and
$l\neq 0$ then $f(w)^{-1}\rightarrow l^{-1}$.
\end{exercise}
\begin{exercise}\label{first continuous complex}
Suppose that $E$ is a subset of ${\mathbb C}$,
that $z\in E$,
and that $f$ and $g$
are functions from $E$ to ${\mathbb C}$.

(i) If $f(u)=c$ for all $u\in E$, then f is continuous
on $E$.

(ii) If $f$ and $g$ are continuous at $z$,
then so is $f+g$.

(iii) Let us define $f\times g:E\rightarrow {\mathbb C}$
by $f\times g(u)=f(u)g(u)$ for all $u\in E$. Then
if $f$ and $g$ are continuous at $z$, so is $f\times g$.

(iv) Suppose that $f(u)\neq 0$ for all $u\in E$. If
$f$ is continuous at $z$ so is $1/f$.

(v) If $z\in E'\subset E$ and $f$ is continuous at $z$ then the
restriction $f|_{E'}$ of $f$ to $E'$ is also continuous
at $z$.

(vi) If $J:{\mathbb C}\rightarrow{\mathbb C}$ is
defined by $J(z)=z$ for all $z\in{\mathbb C}$,
then $J$ is continuous on ${\mathbb C}$.

(vii) Every polynomial $P$ is continuous on ${\mathbb C}$.

(viii) Suppose that $P$ and $Q$ are polynomials
and that $Q$ is never zero on some subset $E$
of ${\mathbb C}$. Then the rational function
$P/Q$ is continuous on $E$ (or, more precisely,
the restriction of $P/Q$ to $E$ is continuous.)
\end{exercise}
\begin{exercise}\label{continuous complex chain rule}
Let $U$ and $V$ be subsets of ${\mathbb C}$. Suppose
$f:U\rightarrow{\mathbb C}$ is such that
$f(z)\in V$ for all $z\in U$. If $f$
is continuous at $w\in U$ and $g:V\rightarrow{\mathbb C}$
is continuous at $f(w)$, then the composition
$g\circ f$ is continuous at $w$.
\end{exercise}

\begin{definition}\label{Definition, Complex Derivative}
Let $E$ be a subset of ${\mathbb C}$.
A function $f:E\rightarrow{\mathbb C}$
is differentiable at $z\in E$ with derivative $f'(z)$
if
\[\frac{f(w)-f(z)}{w-z}\rightarrow f'(z)\]
as $w\rightarrow z$.

If $f$ is differentiable at each point $z\in E$ we say that
$f$ is a differentiable function on $E$.
\end{definition}
\begin{exercise}\label{derivatives complex -1}
Let $E$ be a subset of ${\mathbb C}$,
$f$ some function from $E$ to ${\mathbb C}$,
and $z$ some point of $E$. Show that if
$f$ is differentiable at $z$ then
$f$ is continuous at $z$.
\end{exercise}
\begin{exercise}\label{derivatives complex}
Let $E$ be a subset of ${\mathbb C}$,
$f$, $g$ be some functions from $E$ to ${\mathbb C}$,
and $z$ some point of $E$. Prove the following results.

(i) If $f(u)=c$ for all $u\in E$ then $f$ is differentiable
at $z$ with $f'(z)=0$.

(ii) If $f$ and $g$ are differentiable at $z$ then so
is their sum $f+g$ and
\[(f+g)'(z)=f'(z)+g'(z).\]

(iii) If $f$ and $g$ are differentiable at $z$ then so
is their product $f\times g$ and
\[(f\times g)'(z)=f'(z)g(z)+f(z)g'(z).\]

(iv) If $f$ is differentiable at $z$ and $f(u)\neq 0$ for all $u\in E$
then $1/f$ is differentiable at $z$ and
\[(1/f)'(z)=-f'(z)/f(z)^{2}.\]

(v) If $f(u)=\sum_{r=0}^{N}a_{r}u^{r}$ on $E$
then $f$ is differentiable at $z$ and
\[f'(z)=\sum_{r=1}^{N}ra_{r}z^{r-1}\].
\end{exercise}
\begin{exercise}\label{complex chain rule}{\bf [Chain rule]}
Let $U$ and $V$ be subsets of ${\mathbb C}$. Suppose
$f:U\rightarrow{\mathbb C}$ is such that
$f(z)\in V$ for all $t\in U$. If $f$
is differentiable at $w\in U$ and $g:V\rightarrow{\mathbb R}$
is differentiable at $f(w)$, then the composition
$g\circ f$ is differentiable at $w$ with
\[(g\circ f)'(w)=f'(w)g'(f(w)).\]
\end{exercise}

In spite of these similarities the subject of 
complex differentiable functions is very different
from that of real differentiable functions.
It turns out that `well behaved' complex functions
need not be differentiable.
\begin{example} Consider the map $\Gamma:{\mathbb C}\rightarrow{\mathbb C}$
given by $\Gamma(z)=z^{*}$. The function $\Gamma$ is
nowhere differentiable.
\end{example}
Because complex differentiability is so much more restrictive
than real differentiability we can prove stronger theorems
about  complex differentiable functions. For example it
can be shown that such functions can be written locally 
as power series\footnote{The syllabus says that this
fact is part of this course. In this one instance
I advise you to ignore the syllabus.}
(contrast the situation in the real case revealed by
Example~\ref{start bump}). To learn more
go to the course~P3 on complex methods.
\section{Power series} In this section we work in
${\mathbb C}$ unless otherwise stated.
We start with a very
useful observation.
\begin{lemma} If $\sum_{n=0}^{\infty}a_{n}z_{0}^{n}$ converges
and $|z|<|z_{0}|$ then $\sum_{n=0}^{\infty}a_{n}z^{n}$ converges.
\end{lemma}
This gives us the following basic theorem on
power series.
\begin{theorem}\label{radius of convergence}
Suppose that $a_{n}\in{\mathbb C}$. Then either
$\sum_{n=0}^{\infty}a_{n}z^{n}$ converges for
all $z\in{\mathbb C}$, or there exists a real number $R$
with $R\geq 0$ such that

(i) $\sum_{n=0}^{\infty}a_{n}z^{n}$ converges if $|z|<R$,

(ii) $\sum_{n=0}^{\infty}a_{n}z^{n}$ diverges if $|z|>R$.
\end{theorem}
We call $R$ the radius of convergence of $\sum_{n=0}^{\infty}a_{n}z^{n}$.
If $\sum_{n=0}^{\infty}a_{n}z^{n}$ converges for all $z$
we write $R=\infty$.
The following useful strengthening is left to
the reader as an exercise.
\begin{exercise}\label{New radius}
Suppose that $\sum_{n=0}^{\infty}a_{n}z^{n}$
has radius of convergence $R$.
Then the sequence $|a_{n}z^{n}|$ is unbounded if $|z|>R$
and $\sum_{n=0}^{\infty}a_{n}z^{n}$ converges absolutely
if $|z|<R$.
\end{exercise}
Note that we say nothing about what happens on the circle of convergence.
\begin{example} (i) $\sum_{n=1}^{\infty}n^{-2}z^{n}$ has radius of convergence
$1$ and converges for all $z$ with $|z|=1$.

(ii) $\sum_{n=1}^{\infty}z^{n}$ has radius of convergence
$1$ and diverges for all $z$ with $|z|=1$.
\end{example}
A more complicated example is given in Exercise~\ref{Many pointed}.

It is a remarkable fact that we can operate with power series
in the same way as polynomials (within the radius of convergence).
In particular we shall show that we can differentiate term by term.
\begin{theorem} If $\sum_{n=0}^{\infty}a_{n}z^{n}$ has radius
of convergence $R$ and we write $f(z)= \sum_{n=0}^{\infty}a_{n}z^{n}$
then $f$ is differentiable at all points $z$ with $|z|<R$ and
\[f'(z)=\sum_{n=1}^{\infty}na_{n}z^{n-1}.\]
\end{theorem}

The proof is starred in the syllabus. We use three simple observations.
\begin{lemma} If $\sum_{n=0}^{\infty}a_{n}z^{n}$ has radius
of convergence $R$ then given any $\epsilon>0$ we can find
a $K(\epsilon)$ such that $\sum_{n=0}^{\infty}|a_{n}z^{n}|<K(\epsilon)$
for all $|z|\leq R-\epsilon$.
\end{lemma}
\begin{lemma} If $\sum_{n=0}^{\infty}a_{n}z^{n}$ has radius
of convergence $R$ then so do $\sum_{n=1}^{\infty}na_{n}z^{n-1}$
and $\sum_{n=2}^{\infty}n(n-1)a_{n}z^{n-2}$.
\end{lemma}
\begin{lemma} (i) ${\displaystyle \binom{n}{r}\leq n(n-1)\binom{n-2}{r-2}}$
for all $2\leq r\leq n$.

(ii) $|(z+h)^{n}-z^{n}-nhz^{n-1}|\leq n(n-1)(|z|+|h|)^{n-2}|h|^{2}$
for all $z,\ h\in{\mathbb C}$.
\end{lemma}

In this course we shall mainly work on the real line.
Restricting to the real line we obtain the following
result.
\begin{theorem} (i) If $a_{j}\in{\mathbb R}$ there exists a
unique $R$ (the radius of convergence) with $0\leq R\leq\infty$ such that
$\sum_{n=0}^{\infty}a_{n}x^{n}$ converges for all real
$x$ with $|x|<R$ and diverges for all real $x$ with $x>R$.

(ii) If $\sum_{n=1}^{\infty}a_{n}x^{n}$ has radius
of convergence $R$ and we write $f(x)= \sum_{n=0}^{\infty}a_{n}x^{n}$
then $f$ is differentiable at all points $x$ with $|x|<R$ and
\[f'(x)=\sum_{n=1}^{\infty}na_{n}x^{n-1}.\]
\end{theorem}
\section{The standard functions} In school you learned
all about the functions $\exp$, $\log$, $\sin$ and $\cos$
and about the behaviour of $x^{\alpha}$. Nothing that you
learned was wrong (we hope) but you might be hard
pressed to prove all the facts you know in a coherent
manner,

To get round this problem, we start from scratch
making new definitions and assuming nothing about these
various functions. One of your tasks is to make sure
that the lecturer does not slip in some unproved fact.
On the other hand you must allow your lecturer to choose
definitions which allow an easy development of the subject rather
than those that follow some `historic', `intuitive' 
or `pedagogically appropriate' path\footnote{If you
want to see a treatment along these lines see
the excellent text of Burn\cite{Burn}.}.

Let us start with the exponential function.
Throughout this section we shall restrict ourselves
to the real line.
\begin{lemma} The sum $\sum_{n=0}^{\infty}\frac{x^{n}}{n!}$
has infinite radius of convergence.
\end{lemma}
We can thus define a function $e:{\mathbb R}\rightarrow{\mathbb R}$
by
\[e(x)=\sum_{n=0}^{\infty}\frac{x^{n}}{n!}.\]
(We use $e(x)$ rather than $\exp(x)$ to help us
avoid making unjustified assumptions.)

\begin{theorem}\label{T, real exponential}
(i) The function $e:{\mathbb R}\rightarrow{\mathbb R}$
is everywhere differentiable with $e'(x)=e(x)$.

(ii) $e(x+y)=e(x)e(y)$ for all $x,\, y\in{\mathbb R}$.

(iii) $e(x)>0$ for all $x\in{\mathbb R}$.

(iv) $e$ is a strictly increasing function.

(v) $e(x)\rightarrow\infty$ as $x\rightarrow\infty$,
$e(x)\rightarrow 0$ as $x\rightarrow -\infty$.

(vi) $e:{\mathbb R}\rightarrow (0,\infty)$ is a bijection.
\end{theorem}

It is worth stating some of our results in the language of group
theory.
\begin{lemma} The mapping $e$ is an isomorphism of
the group $({\mathbb R},+)$ and the group $((0,\infty),\times)$.
\end{lemma}

Since $e:{\mathbb R}\rightarrow (0,\infty)$ is a bijection
we can consider the inverse function $l:(0,\infty)\rightarrow{\mathbb R}$.

\begin{theorem} 
(i) $l:(0,\infty)\rightarrow{\mathbb R}$ is a bijection.
We have $l(e(x))=x$ for all $x\in{\mathbb R}$
and $e(l(t))=t$ for all $t\in (0,\infty)$.

(ii) The function $l:(0,\infty)\rightarrow{\mathbb R}$
is everywhere differentiable with $l'(t)=1/t$.

(iii) $l(uv)=l(u)+l(v)$ for all $u,\, v\in(0,\infty)$.
\end{theorem}

We now write $e(x)=\exp(x)$, $l(t)=\log t$ (the use
of $\ln$ is unnecessary). If $\alpha\in{\mathbb R}$
and $x>0$.
we write $r_{\alpha}(x)=\exp(\alpha \log x)$.
\begin{theorem}\label{theorem, laws of indices} 
Suppose $x,\, y>0$ and $\alpha,\, \beta\in{\mathbb R}$.
Then

(i) $r_{\alpha}(xy)=r_{\alpha}(x)r_{\alpha}(y)$,

(ii) $r_{\alpha+\beta}(x)=r_{\alpha}(x)r_{\beta}(x)$,

(iii) $r_{\alpha}(r_{\beta}(x))=r_{\alpha\beta}(x)$

(iv) $r_{1}(x)=x$.
\end{theorem}

\begin{exercise}\label{exercise, index OK} 
Use the results of Theorem~\ref{theorem, laws of indices}
to show that if $n$ is a strictly positive integer
and $x>0$ then
\[r_{n}(x)=\underbrace{xx\dots x}_{n}.\]
\end{exercise}

Thus, if we write $x^{\alpha}=r_{\alpha}(x)$, our new notation is
\emph{consistent} with our old school notation
when $\alpha$ is rational but gives, in addition,
a valid definition when $\alpha$ is irrational.
\begin{lemma} (i) If $\alpha$ is real, 
$r_{\alpha}:(0,\infty)\rightarrow(0,\infty)$ is
everywhere differentiable and $r_{\alpha}'(x)=\alpha r_{\alpha -1}(x)$.

(ii) If $x>0$ and we define $f_{x}(\alpha)=x^{\alpha}$
then $f_{x}:{\mathbb R}\rightarrow (0,\infty)$ is
everywhere differentiable and $f_{x}'(\alpha)=\log x f_{x}(\alpha)$.
\end{lemma}

Finally we look at the trigonometric functions.
\begin{lemma} The sums $\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n+1}}{(2n+1)!}$
and $\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n}}{(2n)!}$
have infinite radius of convergence.
\end{lemma}
We can thus define functions $s,\, c:{\mathbb R}\rightarrow{\mathbb R}$
by
\[s(x)=\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n+1}}{(2n+1)!}
\ \text{and}\ c(x)=\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n}}{(2n)!}\]

\begin{lemma}\label{lemma, trigonometry}
(i) The functions $s,\, c:{\mathbb R}\rightarrow{\mathbb R}$
are everywhere differentiable with $s'(x)=c(x)$ and $c'(x)=-s(x)$.

(ii) $s(x+y)=s(x)c(y)+c(x)s(y)$, $c(x+y)=c(x)c(y)-s(x)s(y)$ and
$s(x)^{2}+c(x)^{2}=1$
for all $x,\, y\in{\mathbb R}$.

(iii) $s(-x)=-s(x)$, $c(-x)=c(x)$ for all $x\in{\mathbb R}$.
\end{lemma}

\begin{exercise}\label{Exercise, sinh}
Write down what you consider to be the
chief properties of $\sinh$ and $\cosh$. (They should convey
enough information to draw a reasonable graph of the
two functions.)

(i) Obtain those properties by starting with the definitions
\[\sinh x=\sum_{n=0}^{\infty}\frac{x^{2n+1}}{(2n+1)!}
\ \text{and}\ \cosh x=\sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}\]
and proceeding along the lines of Lemma~\ref{lemma, trigonometry}.

(ii) Obtain those properties by starting with the definitions
\[\sinh x=\frac{\exp x-\exp (-x)}{2}
\ \text{and}\ \cosh x=\frac{\exp x+\exp (-x)}{2}\]
\end{exercise}

We have not yet proved one of the most remarkable properties
of the sine and cosine functions, their periodicity.

\begin{theorem} Let $s$ and $c$ be as in Lemma~\ref{lemma, trigonometry}.

(i) If $c(a)=0$ and $c(b)=0$ then $s(b-a)=0$.

(ii) We have $s(x)>0$ for all $0<x\leq 1$.

(iii) There exists a unique $\omega\in[0,2]$ such that $c(\omega)=0$.

(iv) $s(\omega)=1$.

(v) $s(x+4\omega)=s(x)$, $c(x+4\omega)=c(\omega)$.

(vi) The function $c$ is strictly decreasing from $1$ to $-1$
as $x$ runs from $0$ to $2\omega$,
\end{theorem}

We now {\bf define} $\pi=2\omega$. If ${\mathbf x}$ and ${\mathbf y}$
are non-zero vectors in ${\mathbb R}^{m}$ we 
know by the Cauchy-Schwarz inequality that
$|{\mathbf x}.{\mathbf y}|\leq \|{\mathbf x}\|\|{\mathbf y}\|$
and we may {\bf define} the angle between the two vectors
to be that $\theta$ with $0\leq\theta\leq \pi$ which satisfies
\[\cos\theta=\frac{{\mathbf x}.{\mathbf y}}{\|{\mathbf x}\|\|{\mathbf y}\|}.\]

We can also justify the standard use of polar coordinates. 
\begin{lemma} If $(x,y)\in{\mathbb R}^{2}$ and $(x,y)\neq(0,0)$
then there exist a unique $r>0$ and $\theta$ with $0\leq\theta<2\pi$
such that
\[x=r\cos\theta,\ y=r\sin\theta.\]
\end{lemma}

You may be unhappy with a procedure which reduces geometry to analysis.
It is possible to produce treatments which soften the blow\footnote{The
matter is more subtle than it looks. Classical Euclidean geometry
is `weaker' than the geometry required to justify analysis
and if you wished to obtain analysis from geometry you would need
to add extra axioms.} but what we can not do is to justify analytic
results by appealing to geometry and then appeal to analysis
to justify the geometry.
\section{Onwards to the complex plane} This section contains
useful background material which does not really form
part of the course. If time is short I shall omit it entirely.

The mean value theorem {\bf fails} for differentiable
functions $f:{\mathbb C}\rightarrow{\mathbb C}$.
(See Example~\ref{no complex mean}.)
However, the constant value theorem holds.
\begin{theorem}\label{T, constant complex value}
If $f:{\mathbb C}\rightarrow{\mathbb C}$
is differentiable and $f'(z)=0$ for all $z\in{\mathbb C}$
then $f$ is constant.
\end{theorem}

The proof of Theorem~\ref{T, constant complex value}
that I shall give is very ad hoc and you will meet 
better ones later.

Since the constant value theorem holds we can extend the proof
of Theorem~\ref{T, real exponential}~(ii) to this wider context
and obtain a version of the exponential function
for complex numbers. In this section we work in ${\mathbb C}$
unless otherwise stated.
\begin{lemma} The sum $\sum_{n=0}^{\infty}\frac{z^{n}}{n!}$
has infinite radius of convergence.
\end{lemma}
We can thus define a function $\exp:{\mathbb C}\rightarrow{\mathbb C}$
by
\[\exp(z)=\sum_{n=0}^{\infty}\frac{z^{n}}{n!}.\]

\begin{theorem}\label{T, complex exponential}
(i) The function $e:{\mathbb C}\rightarrow{\mathbb C}$
is everywhere differentiable with $e'(z)=e(z)$.

(ii) $e(z+w)=e(z)e(w)$ for all $z,\, w\in{\mathbb C}$.
\end{theorem}

Notice that the remaining parts of Theorem~\ref{T, real exponential}
are either meaningless or false
(compare Theorem~\ref{T, real exponential}~(vi)
with Lemma~\ref{famous}~(iii) which shows that
$\exp:{\mathbb C}\rightarrow{\mathbb C}$ is
not injective). We must be very careful 
in making the transition from real to complex.

We obtain a series of famous formulae.
\begin{lemma}\label{famous} (i) If $\theta$ is real
\[\exp i\theta=\cos\theta+i\sin\theta.\]

(ii) If $x$ and $y$ are real
\[\exp (x+iy)=(\exp x)(\cos y+i\sin y).\]

(iii) $\exp$ is periodic with period $2\pi i$, that is to say
\[\exp(z+2\pi i)=\exp z\]
for all $z\in{\mathbb C}$.

(iv) $\exp({\mathbb C})={\mathbb C}\setminus\{0\}$.
\end{lemma}
\begin{example}~\label{no complex mean} 
Observe that $\exp 0=\exp 2\pi i=1$ but
$\exp'(z)=\exp(z)\neq 0$
for all $z\in{\mathbb C}$. Thus the  mean value theorem
does not hold for differentiable
functions $f:{\mathbb C}\rightarrow{\mathbb C}$.
\end{example}

It is also possible to extend the definition of
sine and cosine to the complex plane but the
reader is warned that the behaviour of the
new functions may be somewhat unexpected.
Since these extended functions most certainly
do not form part of this course (though you will be
expected to know them after the Complex Methods course)
their study is left as an exercise.

\begin{exercise}\label{complex sine}
(i) Explain why the infinite sums
\[\sin z=\sum_{n=0}^{\infty}\frac{(-1)^{n}z^{2n+1}}{(2n+1)!}
\ \text{and}\ \cos z=\sum_{n=0}^{\infty}\frac{(-1)^{n}z^{2n}}{(2n)!}\]
converge everywhere and are differentiable everywhere
with $\sin' z=\cos z$, $\cos' z=-\sin z$.

(ii) Show that
\[\sin z=\frac{\exp iz-\exp (-iz)}{2i},\ \cos z=\frac{\exp iz+\exp (-iz))}{2}\]
and
\[\exp iz=\cos z+i\sin z\]
for all $z\in{\mathbb C}$.

(iii) Show that
\[\sin (z+w)=\sin z\cos w+\cos z\sin w, 
\ \cos(z+w)=\cos z \cos w-\sin z\sin w,\]
and
$(\sin z)^{2}+(\cos z)^{2}=1$
for all $z,\, w\in{\mathbb C}$.

(iv) $\sin(-z)=-\sin z$, $\cos (-z)=\cos z$ for all $z\in{\mathbb C}$.

(v) $\sin$ and $\cos$ are $2\pi$ periodic in the sense that
\[\sin (z+2\pi)=\sin z\ \text{and}\ \cos (z+2\pi)=\cos z\]
for all $z\in{\mathbb C}$.

(vi) If $x$ is real then $\sin ix=i\sinh x$ and $\cos ix=\cosh x$.

(vii) Recover the addition formulae for $\sinh$ and $\cosh$ by
setting $z=ix$ and $w=iy$ in part~(iii).

(ix) Show that $|\sin z|$ and $|\cos z|$ are bounded if $|\Im z|\leq K$
for some $K$ but that $|\sin z|$ and $|\cos z|$ are unbounded
on ${\mathbb C}$.
\end{exercise}

However, as you were already shown in the Algebra and Geometry
course and will be shown again in the Complex Methods course
\begin{center}
{\bf There is no logarithm defined on all of 
${\mathbb C}\setminus\{0\}$.}
\end{center}
\begin{exercise}\label{no logarithm} Suppose,
if possible, that there exists a continuous
$L:{\mathbb C}\setminus\{0\}\rightarrow{\mathbb C}$
with $\exp(L(z))=z$ for all $z\in{\mathbb C}\setminus\{0\}$.

(i) If $\theta$ is real, show that 
$L(\exp(i\theta))=i(\theta+2\pi n(\theta))$ for some
$n(\theta)\in{\mathbb Z}$.

(ii) Define $f:{\mathbb R}\rightarrow{\mathbb R}$
by
\[f(\theta)=\frac{1}{2\pi}
\left(\frac{L(\exp i\theta)-L(1)}{i}-\theta\right).\]
Show that $f$ is a well defined continuous function,
that $f(\theta)\in{\mathbb Z}$ for all $\theta\in{\mathbb R}$,
that $f(0)=0$ and that $f(2\pi)=-1$.

(iii) Show that the statements made in the last
sentence of (ii) are incompatible with the intermediate
value theorem and deduce that no function can exist
with the supposed properties of $L$.

(iv) Discuss informally what connection, if any, the
discussion above has with the existence of the
international date line.
\end{exercise}

A similar argument shows that it is not possible
to produce a continuous square root on the complex plane.
\begin{exercise}\label{no square root} Show by
modifyiing the argument of Exercise~\ref{no logarithm},
that there does not exist a continuous
$S:{\mathbb C}\rightarrow{\mathbb C}$
with $S(z)^{2}=z$ for all $z\in{\mathbb C}$.
\end{exercise}
More generally, it is not possible to define continuous non-integer
powers $z^{\alpha}$ on the complex plane. (Of course,
$z\mapsto z^{n}$ is well behaved if $n$ is an integer.)
However, in the special case when
$x$ is real and strictly positive we can define
\[x^{z}=\exp(z\log x)\] 
without problems and this enables us to write $\exp z=e^{z}$
where $e=\exp 1$.
Surprisingly, Exercise~\ref{no logarithm} is not an end but a beginning
of much important mathematics -- but that is another story.
\section{The Riemann integral}
At school we are taught that an integral is
the area under a curve. If pressed the framer of this
definition might reply that
everybody knows what area is,
but then everybody knows what honey tastes like.
But does honey taste the same to you as it
does to me? Perhaps the question is unanswerable
but, for many practical purposes, it is sufficient
that we agree on what we call honey.

In order to agree on what an integral is,
we need a definition which does not depend on
intuition. It is important that, as far as possible,
the properties of our formally defined integral
shall agree with our intuitive ideas on area
{\bf but we have to prove this agreement}
and not simply assume it.

In this section we introduce a notion of
integral due to Riemann. For the moment we only attempt to
define our integral for
bounded functions on bounded intervals.

Let $f:[a,b]\rightarrow{\mathbb R}$ be a function
such that there exists a $K$ with $|f(x)|\leq K$ for all
$x\in[a,b]$. [To see the connection with `the area
under the curve' it is helpful to suppose initially
that $0\leq f(x)\leq K$. However, all the definitions
and proofs work more generally for  $-K\leq f(x)\leq K$.]

A dissection ${\mathcal D}$ of $[a,b]$
is a finite subset of $[a,b]$ containing the end
points $a$ and $b$. By convention, we write
\[{\mathcal D}=\{x_{0},x_{1},\dots,x_{n}\}
\ \text{with}\ a=x_{0}\leq x_{1}\leq x_{2}\leq\dots\leq x_{n}=b.\]
We define the \emph{upper sum} and \emph{lower sum} 
associated with ${\mathcal D}$ by
\begin{align*}
S(f,{\mathcal D})=&\sum_{j=1}^{n}(x_{j}-x_{j-1})
\sup_{x\in [x_{j-1},x_{j}]}f(x),\\
s(f,{\mathcal D})=&\sum_{j=1}^{n}(x_{j}-x_{j-1})
\inf_{x\in [x_{j-1},x_{j}]}f(x)
\end{align*}
[Observe that, \emph{if the integral $\int_{a}^{b}f(t)\,dt$ exists,}
then the upper sum ought to provide an upper bound and
the lower sum a lower bound for that integral.]

The next lemma is obvious but useful.
\begin{lemma}\label{Lemma, more dissections}
If ${\mathcal D}$ and ${\mathcal D}'$ are
dissections with ${\mathcal D}'\supseteq{\mathcal D}$ then
\[S(f,{\mathcal D})\geq S(f,{\mathcal D}')
\geq
s(f,{\mathcal D}')\geq s(f,{\mathcal D}).\]
\end{lemma}

The next lemma is again hardly more than an observation
but it is the key to the proper treatment of the integral.
\begin{lemma}{\bf [Key integration property]}%
\label{Lemma, Key integration property} If
$f:[a,b]\rightarrow{\mathbb R}$
is bounded and
${\mathcal D}_{1}$ and ${\mathcal D}_{2}$ are two dissections,
then
\begin{equation*}
S(f,{\mathcal D}_{1})\geq S(f,{\mathcal D}_{1}\cup{\mathcal D}_{2})
\geq
s(f,{\mathcal D}_{1}\cup{\mathcal D}_{2})\geq s(f,{\mathcal D}_{2}).
\tag*{$\bigstar$}
\end{equation*}
\end{lemma}
The inequalities $\bigstar$ tell us that, whatever dissection
you pick and whatever dissection I pick, your lower
sum cannot exceed my upper sum. There is no way we
can put a quart in a pint pot\footnote{Or put a litre
in a half litre bottle.}.

Since $S(f,{\mathcal D})\geq -(b-a)K$
for all dissections ${\mathcal D}$ 
we can define the \emph{upper integral} as
$I^{*}(f)=\inf_{{\mathcal D}}S(f,{\mathcal D})$.
We define the \emph{lower integral} similarly
as $I_{*}(f)=\sup_{{\mathcal D}}s(f,{\mathcal D})$.
The inequalities $\bigstar$ tell us that these
concepts behave well.
\begin{lemma} If $f:[a,b]\rightarrow{\mathbb R}$
is bounded, then $I^{*}(f)\geq I_{*}(f)$.
\end{lemma}
[Observe that, \emph{if the integral $\int_{a}^{b}f(t)\,dt$ exists,}
then the upper integral ought to provide an upper bound and
the lower integral a lower bound for that integral.]

If $I^{*}(f)=I_{*}(f)$, we say that $f$ is Riemann
integrable and we write
\[\int_{a}^{b}f(x)\,dx=I^{*}(f).\]

The following lemma provides a convenient criterion
for Riemann integrability.
\begin{lemma}\label{Lemma, Riemann criterion}
(i) A bounded function
$f:[a,b]\rightarrow{\mathbb R}$ is Riemann integrable
if and only if, given any $\epsilon>0$, we can find
a dissection ${\mathcal D}$ with
\[S(f,{\mathcal D})-s(f,{\mathcal D})<\epsilon.\]

(ii) A bounded function
$f:[a,b]\rightarrow{\mathbb R}$ is Riemann integrable
with integral $I$
if and only if, given any $\epsilon>0$, we can find
a dissection ${\mathcal D}$ with
\[S(f,{\mathcal D})-s(f,{\mathcal D})<\epsilon
\ \text{and}\ |S(f,{\mathcal D})-I|\leq\epsilon.\]
\end{lemma}

Many students are tempted to use
Lemma~\ref{Lemma, Riemann criterion}~(ii) as the
\emph{definition} of the Riemann integral.
The reader should reflect that, 
without the inequality $\bigstar$, it is not even clear
that such a definition gives a unique value for $I$.
(This is only the first of a series of nasty problems
that arise if we attempt to develop the theory without
first proving $\bigstar$, so I strongly advise the reader
not to take this path.)

We now prove a series of standard results on the integral.

\begin{lemma}
(i) The function $J:[a,b]\rightarrow{\mathbb R}$ given by
$J(t)=1$ is integrable and
\[\int_{a}^{b} 1\,dx=b-a.\] 

(ii) If $f,g:[a,b]\rightarrow{\mathbb R}$ are
Riemann integrable, then so is $f+g$
and
\[\int_{a}^{b} f(x)+g(x)\,dx
=\int_{a}^{b}f(x)\,dx+ \int_{a}^{b}g(x)\,dx.\]

(iii) If $f:[a,b]\rightarrow{\mathbb R}$ is
Riemann integrable, then $-f$ is and
\[\int_{a}^{b} (-f(x))\,dx
=-\int_{a}^{b}f(x)\,dx.\]

(iv) If $\lambda\in{\mathbb R}$
and $f:[a,b]\rightarrow{\mathbb R}$ is
Riemann integrable, then $\lambda f$ is Riemann
integrable and 
\[\int_{a}^{b} \lambda f(x)\,dx
=\lambda\int_{a}^{b}f(x)\,dx.\]

(v) If $f,g:[a,b]\rightarrow{\mathbb R}$ are
Riemann integrable functions with $f(t)\geq g(t)$ for
all $t\in[a,b]$, then
\[\int_{a}^{b}f(x)\,dx\geq \int_{a}^{b}g(x)\,dx.\]
\end{lemma}
\begin{lemma} (i) If $f:[a,b]\rightarrow{\mathbb R}$ is 
Riemann integrable then so is $f^{2}$.

(ii) If $f,g:[a,b]\rightarrow{\mathbb R}$ are
Riemann integrable, then so is the product $fg$.
\end{lemma}
\begin{lemma} (i) If $f:[a,b]\rightarrow{\mathbb R}$ is
Riemann integrable then so is $f_{+}(t)=\max(f(t),0)$.

(ii) If $f:[a,b]\rightarrow{\mathbb R}$ is
Riemann integrable, then $|f|$ is Riemann
integrable and
\[\int_{a}^{b} |f(x)|\,dx
\geq\left|\int_{a}^{b}f(x)\,dx\right|.\]
\end{lemma}
Notice that we often only need the much weaker
inequality
\[\left|\int_{a}^{b}f(x)\,dx\right|\leq \sup_{t\in[a,b]}|f(t)|(b-a)\]
usually stated as
\[|\text{integral}|\leq\text{length}\times\text{sup}.\]

The next lemma is also routine in its proof
but continues our programme of showing that
the integral has all the properties we expect.
\begin{lemma}  Suppose that $a\leq c\leq b$ and that
$f:[a,b]\rightarrow{\mathbb R}$ is a bounded function. 
Then, $f$ is Riemann integrable on $[a,b]$ if and only
if $f|_{[a,c]}$ is Riemann integrable on $[a,c]$
and $f|_{[c,b]}$ is Riemann integrable on $[c,b]$. Further,
if $f$ is Riemann integrable on $[a,b]$, then
\[\int_{a}^{b}f(x)\,dx=\int_{a}^{c}f|_{[a,c]}(x)\,dx
+\int_{c}^{b}f|_{[c,b]}(x)\,dx.\]
\end{lemma}
In a very slightly less precise and very much more usual notation
we write
\[\int_{a}^{b}f(x)\,dx=\int_{a}^{c}f(x)\,dx
+\int_{c}^{b}f(x)\,dx.\]

There is a standard convention which
says that, if $b\geq a$ and $f$ is Riemann
integrable on $[a,b]$, we define
\[\int_{b}^{a}f(x)\,dx=-\int_{a}^{b}f(x)\,dx.\]
It is, however, a convention that requires care in use.
\begin{exercise}\label{social convention} 
Suppose that $b\geq a$, $\lambda,\mu\in{\mathbb R}$, 
and $f$ and $g$ are Riemann integrable. Which of the
following statements are always true and which are not?
Give a proof or counter-example. If the statement
is not always true, find an appropriate correction
and prove it.

(i) ${\displaystyle \int_{b}^{a}\lambda f(x)+\mu g(x)\,dx
=\lambda\int_{b}^{a}f(x)\,dx+\mu \int_{b}^{a}g(x)\,dx}$.

(ii) If $f(x)\geq g(x)$ for all $x\in[a,b]$, then
${\displaystyle \int_{b}^{a}f(x)\,dx\geq\int_{b}^{a}g(x)\,dx}$.
\end{exercise}

\section{Some properties of the integral}
Not all bounded functions are Riemann integrable
\begin{lemma}
If $f:[0,1]\rightarrow{\mathbb R}$ is
given by
\begin{align*}
f(x)=1&\qquad\text{when $x$ is rational,}\\
f(x)=0&\qquad\text{when $x$ is irrational,}
\end{align*}
then $f$ is not Riemann integrable
\end{lemma}

This does not worry us unduly, but makes
it more important to show that the functions we
wish to be integrable actually are.

Our first result goes back to Riemann
(indeed, essentially, to Newton and Leibniz).
\begin{lemma}\label{Lemma, Riemann Bounded variation}
(i) If $f:[a,b]\rightarrow{\mathbb R}$ is increasing.
then $f$ is Riemann integrable.
 
(ii)If $f:[a,b]\rightarrow{\mathbb R}$ can be written
as $f=f_{1}-f_{2}$ with $f_{1},f_{2}:[a,b]\rightarrow{\mathbb R}$
increasing, then $f$ is Riemann integrable.

(iii) If $f:[a,b]\rightarrow{\mathbb R}$ 
is piecewise monotonic,
then $f$ is Riemann integrable.
\end{lemma}

It should be noted that the results of 
Lemma~\ref{Lemma, Riemann Bounded variation}
do not require $f$ to be continuous.
(For example, the Heaviside function,
given by $H(t)=0$ for $t<0$, $H(t)=1$
for $t\geq 0$ is increasing but not continuous.)
It is quite hard to find a continuous function
which is not the difference of two increasing functions
but 
an example is given in
Exercise~\ref{exercise, bounded variation}.

The proof of the next result is starred. Next
year you will see a simpler proof based on a different
idea (that of uniform continuity).
\begin{theorem}
If $f:[a,b]\rightarrow{\mathbb R}$ is continuous
then $f$ is Riemann integrable.
\end{theorem}

We complete the discussion of integration and this
course with a series of results which apply
only to \emph{continuous} functions.


Our first result is an isolated, but useful, one.
\begin{lemma}\label{Lemma, integral positive}
If $f:[a,b]\rightarrow{\mathbb R}$
is continuous, $f(t)\geq 0$ for all $t\in[a,b]$
and
\[\int_{a}^{b}f(t)\,dt=0,\]
it follows that $f(t)=0$ for all $t\in[a,b]$.
\end{lemma} 

\begin{exercise}\label{Exercise, integral positive zero} 
Let $a\leq c\leq b$.
Give an example of a
Riemann integrable function $f:[a,b]\rightarrow{\mathbb R}$
such that $f(t)\geq 0$ for all $t\in[a,b]$
and
\[\int_{a}^{b}f(t)\,dt=0,\]
but $f(c)\neq 0$.
\end{exercise}

We now come to the justly named fundamental theorem of the calculus.
\begin{theorem}{\bf [The fundamental theorem of the calculus]}%
\label{Theorem, fundamental calculus}
Suppose that $f:(a,b)\rightarrow{\mathbb R}$ is a
continuous function and that $u\in(a,b)$. If we set
\[F(t)=\int_{u}^{t}f(x)\,dx,\]
then $F$ is differentiable on $(a,b)$ and $F'(t)=f(t)$
for all $t\in (a,b)$.
\end{theorem}

\begin{exercise}\label{not fundamental}
(i) Let $H$ be the Heaviside function
$H:{\mathbb R}\rightarrow{\mathbb R}$ given by
$H(x)=0$ for $x<0$, $H(x)=1$ for $x\geq 0$. Calculate
$F(t)=\int_{0}^{t}H(x)\,dx$ and show that $F$ is
not differentiable at $0$. Where does our
proof of Theorem~\ref{Theorem, fundamental calculus}
break down?

(ii) Let $f(0)=1$, $f(t)=0$ otherwise. Calculate
$F(t)=\int_{0}^{t}f(x)\,dx$ and show that $F$ is
differentiable at $0$ but $F'(0)\neq f(0)$. Where does our
proof of Theorem~\ref{Theorem, fundamental calculus}
break down?
\end{exercise}

Sometimes we think of the fundamental theorem
in a slightly different way.
\begin{theorem}\label{Theorem, fundamental as equation} 
Suppose that $f:(a,b)\rightarrow{\mathbb R}$ is
continuous, that $u\in(a,b)$ and $c\in{\mathbb R}$.
Then there is a unique solution
to the differential equation $g'(t)=f(t)$ $[t\in(a,b)]$
such that $g(u)=c$.
\end{theorem}
We call the solutions of $g'(t)=f(t)$ \emph{indefinite integrals}
(or, simply, \emph{integrals}) of $f$.

Yet another version of the fundamental
theorem is given by the next theorem.
\begin{theorem}\label{Theorem, integral derivative}
Suppose that
$g:[a,b]\rightarrow{\mathbb R}$ has
continuous derivative.
Then
\[\int_{a}^{b}g'(t)\,dt=g(b)-g(a).\]
\end{theorem}

Theorems~\ref{Theorem, fundamental calculus}
and~\ref{Theorem, integral derivative} show that
(under appropriate circumstances) integration
and differentiation are inverse operations and the
the theories of differentiation and integration
are subsumed in the greater theory of the calculus.
 
We use the fundamental theorem of the calculus
to prove the formulae for integration by substitution
and integration by parts.
\begin{theorem}{\bf [Change of variables for integrals]}
Suppose that
$f:[a,b]\rightarrow{\mathbb R}$ is continuous
and $g:[\gamma,\delta]\rightarrow{\mathbb R}$
is differentiable with continuous derivative.
Suppose further that $g([\gamma,\delta])\subseteq [a,b]$.
Then, if $c$, $d\in[\gamma,\delta]$, we have
\[\int_{g(c)}^{g(d)}f(s)\,ds=\int_{c}^{d}f(g(x))g'(x)\,dx.\]
\end{theorem}
\begin{exercise}\label{No substitutes} 
The following exercise is traditional.

(i) Show that integration by substitution, using $x=1/t$,
gives
\[\int_{a}^{b}\frac{dx}{1+x^{2}}
=
\int_{1/b}^{1/a}\frac{dt}{1+t^{2}}\]
when $b>a>0$.

(ii) If we set $a=-1$, $b=1$ in the formula of~(i),
we obtain
\[\int_{-1}^{1}\frac{dx}{1+x^{2}}
\overset{?}{=}
-\int_{-1}^{1}\frac{dt}{1+t^{2}}\]
Explain
this apparent failure 
of the method of integration by substitution.

(iii) Write the result of (i) in terms of $\tan^{-1}$
and prove it using standard trigonometric identities.
\end{exercise}
\begin{lemma}\label{Lemma, Integration by parts} 
Suppose that
$f:[a,b]\rightarrow{\mathbb R}$ has
continuous derivative and
$g:[a,b]\rightarrow{\mathbb R}$
is continuous. Let $G:[a,b]\rightarrow{\mathbb R}$
be an indefinite integral of $g$.
Then, we have
\[\int_{a}^{b}f(x)g(x)\,dx=\left[f(x)G(x)\right]_{a}^{b}
-\int_{a}^{b}f'(x)G(x)\,dx.\]
\end{lemma}

We obtain the following version of Taylor's theorem 
by repeated integration by parts.
\begin{theorem}{\bf [A global Taylor's theorem
with integral remainder]}\label{Integral Taylor}
If $n\geq 1$ and $f:(-a,a)\rightarrow{\mathbb R}$
is $n$ times differentiable with continuous $n$th
derivative, then
\[f(t)=\sum_{j=0}^{n-1}\frac{f^{(j)}(0)}{j!}t^{j}
+R_{n}(f,t)\]
for all $|t|<a$, where
\[R_{n}(f,t)=\frac{1}{(n-1)!}
\int_{0}^{t}(t-x)^{n-1}f^{(n)}(x)\,dx.\]
\end{theorem}
In the opinion of the lecturer this form is
powerful enough for most purposes
and is a form that is easily remembered 
and proved for examination.
\section{Infinite integrals} The reader may already
be familiar with definitions of the following type.

\begin{definition}\label{infinite integral up} 
If $f:[a,b]\rightarrow{\mathbb R}$
and $M,P\geq 0$ let us write
\begin{equation*}
f_{M,P}(x)=
\begin{cases}
f(x)&\text{if $-P\leq f(x)\leq M$}\\
M&\text{if $f(x)>M$}\\
-P&\text{if $f(x)<-P$.}
\end{cases}
\end{equation*}
If $f_{M,P}$ is Riemann integrable for each $M,\, P\geq 0$
and
\[\int_{a}^{b}f_{M,P}(x)\,dx\rightarrow L\]
as $M,P\rightarrow\infty$ then we say that $f$
is Riemann integrable and
\[\int_{a}^{b}f(x)\,dx=L\]
\end{definition}
\begin{definition}\label{infinite integral along}
If $f:[a,\infty)\rightarrow{\mathbb R}$
is such that $f|_{[a,X]}$ is Riemann integrable for each $X>a$
and $\int_{a}^{X}f(x)\,dx\rightarrow L$ as $X\rightarrow\infty$,
then we say that $\int_{a}^{\infty}f(x)\,dx$ exists
with value $L$.
\end{definition}

It must be said that neither Definition~\ref{infinite integral up}
nor Definition~\ref{infinite integral along} are more
than ad hoc. 

In the rest of this section we look at 
Definition~\ref{infinite integral along}.
\begin{lemma}\label{Lemma, increasing integral} 
Suppose $f:[a,\infty)\rightarrow{\mathbb R}$
is such that $f|_{[a,X]}$ is Riemann integrable on
$[a,X]$ for each $X>a$.
If $f(x)\geq 0$ for all $x$, then
$\int_{a}^{\infty}f(x)\,dx$ exists if and only if
there exists a $K$ such that
$\int_{a}^{X}f(x)\,dx\leq K$ for all $X$.
\end{lemma}

We use Lemma~\ref{Lemma, increasing integral} to
prove the integral comparison test.
\begin{lemma}\label{Lemma Integral test} If
$f:[1,\infty)\rightarrow{\mathbb R}$ is a decreasing
function with $f(x)\rightarrow 0$ as $x\rightarrow\infty$
then
\[\sum_{n=1}^{\infty}f(n)\ \text{and}
\ \int_{1}^{\infty}f(x)\,dx\]
either both diverge or both converge.
\end{lemma}
\begin{example}\label{Slow powers}
If $\alpha>1$ then $\sum_{n=1}^{\infty}n^{-\alpha}$
converges. If $\alpha\leq 1$ 
then $\sum_{n=1}^{\infty}n^{-\alpha}$
diverges.
\end{example}

This is really as far as we need to go, but
I will just add one further remark.
\begin{lemma}\label{Lemma, absolute integal}
Suppose $f:[a,\infty)\rightarrow{\mathbb R}$
is such that $f|_{[a,X]}$ is Riemann integrable on $[a,X]$ for each $X>a$.
If
$\int_{a}^{\infty}|f(x)|\,dx$ exists, then
$\int_{a}^{\infty}f(x)\,dx$ exists.
\end{lemma}
It is natural to state Lemma~\ref{Lemma, absolute integal}
in the form `absolute convergence of the integral implies
convergence'. 

Speaking broadly, infinite integrals $\int_{a}^{\infty}f(x)\,dx$
work well when they are absolutely
convergent, that is to say,
$\int_{a}^{\infty}|f(x)|\,dx<\infty$, but are full of traps for
the unwary otherwise. This is not a weakness of the
Riemann integral but inherent in any mathematical situation
where an object only exists `by virtue of the cancellation
of two infinite objects'. (Question~\ref{Dirichlet kernel}
gives an example of an integral which is convergent but not absolutely
convergent.)

\section{Further reading} The two
excellent books
Spivak's \emph{Calculus}~\cite{Spivak} and
J.~C.~Burkill's
\emph{A First Course in Mathematical Analysis}~\cite{Burkill}
both cover the course completely and should be in your
college library\footnote{A quieter version of the JCR
with shelves of books replacing the bar.}. Burkill's
book is more condensed and Spivak's more leisurely.
A completely unsuitable but interesting version of the
standard analysis course is given by Berlinski's
\emph{A Tour of the Calculus}~\cite{Berlinski}
--- Spivak rewritten by Sterne with additional purple
passages by the Ankh-Morpork tourist board.
I have written \emph{A Companion to Analysis}~\cite{Korner}
which covers this course at a higher level
together with the next analysis course. It is available
off the web but is unlikely to be as suitable for beginners
as Spivak and Burkill. If you do download it,
remember that you are under a moral obligation to
send me an e-mail about any mistakes you find.
\begin{thebibliography}{9}
\bibitem{Berlinski} D.~Berlinski
\emph{A Tour of the Calculus}
Mandarin Paperbacks 1997.
\bibitem{Burkill} J.~C.~Burkill
\emph{A First Course in Mathematical Analysis}
CUP, 1962.
\bibitem{Burn} R.~P.~Burn
\emph{Numbers and Functions}
CUP, 1992.
\bibitem{Korner} T.~W.~K\"{o}rner
\emph{A Companion to Analysis} for the moment
available via my home page {\sf http://www.dpmms.cam.ac.uk/\textasciitilde twk/}\ .
\bibitem{Spivak} M.~Spivak,
\emph{Calculus}
Addison-Wesley/Benjamin-Cummings, 1967.
\end{thebibliography}
\section{First example sheet} Students vary in how much work
they are prepared to do. On the whole, exercises from
the main text are reasonably easy and provide good
practice in the ideas. Questions and parts of questions
marked with $^{\star}$ are not intended to be hard
but cover topics less central to the present course.
 
\begin{question}\label{Q1}
Let $a_{n}\in{\mathbb R}$. We say that
$a_{n}\rightarrow\infty$ as $n\rightarrow\infty$
if, given $K>0$, we can find
an $n_{0}(K)$ such that $a_{n}\geq K$ for all $n\geq n_{0}(K)$.

(i) Write down a similar definition for $a_{n}\rightarrow-\infty$.

(ii) Show that $a_{n}\rightarrow-\infty$ if and only if
$-a_{n}\rightarrow\infty$.

(iii) If $a_{n}\neq 0$ for all $n$, show that, if
$a_{n}\rightarrow\infty$, it follows that $1/a_{n}\rightarrow 0$
as $n\rightarrow\infty$.

(iv) Is it true that, if $a_{n}\neq 0$ for all $n$
and $1/a_{n}\rightarrow 0$, then $a_{n}\rightarrow\infty$
as $n\rightarrow\infty$? Give a proof or a counter example.
\end{question}
\begin{question}\label{Q2} Prove that, if
\[a_{1}>b_{1}>0\ \text{and}\ a_{n+1}=\frac{a_{n}+b_{n}}{2}
,\ \ b_{n+1}=\frac{2a_{n}b_{n}}{a_{n}+b_{n}},\]
then $a_{n}>a_{n+1}>b_{n+1}>b_{n}$. Prove that, as
$n\rightarrow\infty$, $a_{n}$ and $b_{n}$ both tend to
the limit $\surd(a_{1}b_{1})$.

Use this result to give an example of an increasing 
sequence of rational numbers
tending to a limit $l$ which is not rational.
\end{question}
\begin{question} (Exercise~\ref{Exercise 1.4}.)\label{Q3}
Show that
a decreasing sequence of real numbers bounded below tends
to a limit.

\noindent [Hint. If $a\leq b$ then $-b\leq -a$.]
\end{question}
\begin{question}\label{Q4}
(i) By using the binomial theorem, or otherwise, show that,
if $\eta>0$ and $n$ is a positive integer, then
\[(1+\eta)^{n}\geq \eta n.\]
Deduce that $(1+\eta)^{n}\rightarrow\infty$ as $n\rightarrow\infty$.

(ii) By using the binomial theorem, or otherwise, show that,
if $\eta>0$, then
\[(1+\eta)^{n}\geq \eta^{2} \frac{n(n-1)}{2}.\]
Deduce that $n^{-1}(1+\eta)^{n}\rightarrow\infty$ as $n\rightarrow\infty$.
                   
(iii) Show that, if $k$ is any positive integer
and $a>1$, then $n^{-k}a^{n}\rightarrow\infty$ as $n\rightarrow\infty$.
[Thus `powers beat polynomial growth'.]

(iv) Show that if $k$ is any positive integer
and $1>a\geq 0$, then $n^{k}a^{n}\rightarrow 0$ as $n\rightarrow\infty$.
\end{question}
\begin{question}\label{Q5} If $a\in{\mathbb R}$ and $a\neq -1$
describe the behaviour of 
\[\frac{a^{n}-1}{a^{n}+1}\]
as $n\rightarrow\infty$. (That is, for each value of $a$
say whether the sequence converges or not, and, if it
converges, say what it converges to. For certain values of $a$
you may find it useful to divide top and bottom by $a^{n}$.)
\end{question} 
\begin{question} (Exercises~\ref{complex sequences}\label{Q6}
and~\ref{complex series 2}.)

We work in ${\mathbb C}$.

(i) The limit is unique. That is, if $a_{n}\rightarrow a$
and $a_{n}\rightarrow b$ as $n\rightarrow\infty$,
then $a=b$.

(ii) If $a_{n}\rightarrow a$ as $n\rightarrow\infty$
and $n(1)<n(2)<n(3)\ldots$, then
$a_{n(j)}\rightarrow a$ as $j\rightarrow\infty$.

(iii) If $a_{n}=c$ for all $n$, then $a_{n}\rightarrow c$
as $n\rightarrow\infty$.

(iv) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$, then
$a_{n}+b_{n}\rightarrow a+b$.

(v) If $a_{n}\rightarrow a$ and $b_{n}\rightarrow b$
as $n\rightarrow\infty$, then
$a_{n}b_{n}\rightarrow ab$.

(vi) If $a_{n}\rightarrow a$
as $n\rightarrow\infty$ and $a_{n}\neq 0$ for each $n$ and
$a\neq 0$, then $a_{n}^{-1}\rightarrow a^{-1}$.

(vii) Explain why there is no result in
Exercise~\ref{complex sequences} corresponding
to part (vii) of Lemma~\ref{one sequences}.
\end{question}

\begin{question}$\negthickspace^{\star}${\bf [Ces\'{a}ro summation]}
If\label{Q7}
$a_{j}\in{\mathbb R}$ we write
\[\sigma_{n}=\frac{a_{1}+a_{2}+\dots+a_{n}}{n}.\]

(i) Show that, if $a_{n}\rightarrow 0$, then $\sigma_{n}\rightarrow 0$.
[Hint: Given $\epsilon>0$ we can find an $j_{0}(\epsilon)$
such that $|a_{j}|<\epsilon/2$ for all $j\geq j_{0}(\epsilon)$.]

(ii) Show that, if $a_{n}\rightarrow a$, then $\sigma_{n}\rightarrow a$.

(iii) If $a_{n}=(-1)^{n}$ show that $a_{n}$ does not converge
but $\sigma_{n}$ does.

(iv) If $a_{2^{m}+r}=(-1)^{m}$ for $0\leq r\leq 2^{m}-1$, $m\geq 0$
show that $\sigma_{n}$ does not converge.

(v) If $\sigma_{n}$ converges show that $n^{-1}a_{n}\rightarrow 0$
as $n\rightarrow\infty$.
\end{question}
\begin{question}\label{Q8} In this question you may assume the
standard properties of the exponential function
including the relation $\exp x\geq 1+x$ for $x\geq 0$.

(i) Suppose that $a_{n}\geq 0$. Show that
\[\sum_{j=1}^{n}a_{j}\leq\prod_{j=1}^{n}(1+a_{j})\leq
\exp\left(\sum_{j=1}^{n}a_{j}\right).\]
Deduce, carefully, that $\prod_{j=1}^{n}(1+a_{j})$ tends
to a limit as $n\rightarrow\infty$ if and only if
$\sum_{j=1}^{n}a_{j}$ does.

(ii)$^{\star}$ Euler made use of these ideas as follows.
Let $p_{k}$ be the $k$th prime.  By observing that
\[\frac{1}{1-p_{k}^{-1}}\geq \sum_{r=0}^{m}p_{k}^{-r}\]
show that
\[\prod_{k=1}^{n}\frac{1}{1-p_{k}^{-1}}\geq \sum_{u\in S(N,n)}\frac{1}{u}\]
where $S(N,n)$ is the set of all integers of the form
\[u=\prod_{k=1}^{n}p_{k}^{m_{k}}\]
with $0\leq m_{k}\leq N$.

By letting $N\rightarrow\infty$ show that
\[\prod_{k=1}^{n}\frac{1}{1-p_{k}^{-1}}\geq \sum_{u\in S(n)}\frac{1}{u}\]
where $S(n)$ is the set of all integers whose only prime factors
are $p_{1}$, $p_{2}$, \dots, $p_{n}$. Deduce that
there are infinitely many primes (what can could you
say about $S(n)$ if there were only $n$ primes?)
and show that
\[\prod_{k=1}^{n}\frac{1}{1-p_{k}^{-1}}\rightarrow\infty\]
as $n\rightarrow\infty$.

Conclude that
\[\sum_{k=1}^{\infty}\left(\frac{1}{1-p_{k}^{-1}}-1\right)
\ \text{diverges}.\]
Show that $|1-(1-p_{k}^{-1})^{-1}|\leq 2p_{k}^{-1}$ and deduce
that
\[\sum_{k=1}^{\infty}\frac{1}{p_{k}}\ \text{diverges}.\]
\end{question}
\begin{question}\label{Q9} (i) If $a_{j}$ is an integer 
with $0\leq a_{j}\leq 9$ show \emph{from the fundamental axiom}
that
\[\sum_{j=1}^{\infty}a_{j}10^{-j}\]
exists. Show that $0\leq \sum_{j=1}^{\infty}a_{j}10^{-j}\leq 1$,
carefully quoting any theorems that you use.

(ii)$^{\star}$ If $0\leq x\leq 1$, show that we can find integers
$x_{j}$ with $0\leq x_{j}\leq 9$ such that
\[x=\sum_{j=1}^{\infty}x_{j}10^{-j}.\]

(iii)$^{\star}$ If $a_{j}$ and $b_{j}$ are integers 
with $0\leq a_{j},b_{j}\leq 9$ and
$a_{j}=b_{j}$ for $j<N$, $a_{N}>b_{N}$ show that
\[\sum_{j=1}^{\infty}a_{j}10^{-j}\geq \sum_{j=1}^{\infty}b_{j}10^{-j}.\]
Give the precise necessary and sufficient condition
for equality and prove it.

\end{question}
\begin{question}$\negthickspace^{\star}$\label{1.1}\label{Q10}
(We work with the same ideas as
in Example~\ref{Rational}.)

(i) Find a differentiable function
$f:{\mathbb Q}\rightarrow{\mathbb Q}$ such that
$f'(x)=1$ for all $x\in{\mathbb Q}$ but $f(0)>f(1)$.

(ii) If we define $g:{\mathbb Q}\rightarrow{\mathbb Q}$
by $g(x)=(x^{2}-2)^{-2}$ show that $g$ is continuous
but unbounded on the set of $x$ with $|x|\leq 4$.
\end{question}

\begin{question}\label{Q11} 
In each of the following cases determine an integer $N$
(not necessarily the least such integer) with the property
that if $m\geq N$ the $m$th partial sum of the series
$\sum_{n=1}^{\infty}a_{n}$ differs from the sum of the series
by less than 0.01:

(i) $a_{n}=1/n(n+1)$;

(ii) $a_{n}=2^{-n}$;

(iii)$^{\star}$ $a_{n}=n2^{-n}$;

(iv)$^{\star}$ $a_{n}=n^{-n}$.
\end{question}
\begin{question}\label{Q12}
 For what values of real $\beta$ is
\[\sum_{n=1}^{\infty}\frac{n^{\beta}}{n^{2\beta}-n^{\beta}+1}\]
convergent and for which divergent. Prove your answer.
(You may assume that $\sum_{n=1}^{\infty}n^{-\beta}$
converges if $\beta>1$ and diverges otherwise.)
\end{question}
\begin{question}$\negthickspace^{\star}$ (i) Let us write
\[S_{n}=\sum_{r=0}^{n}\frac{1}{r!}.\]
Show by induction, or otherwise, that $1/r!\leq 2^{-r+1}$ 
for $r\geq 1$ and deduce that $S_{n}\leq 3$.\label{Q13}
Show, from first principles, that $S_{n}$ converges
to a limit (which, with the benefit of extra knowledge,
we call $e$).

(ii) Show that, if $n\geq 2$  and $r\geq 0$ then
\[\frac{n!}{(n+r)!}\leq \frac{1}{3^{r}}.\]
Deduce carefully that, if $m\geq n\geq 2$,
\[0\leq n!(S_{m}-S_{n})\leq \frac{1}{2}.\] 
and that
\[0<n!(e-S_{n})\leq \frac{1}{2}.\]
Deduce that $n!e$ is not an integer for any $n$  and
conclude that $e$ is irrational.

(iii) Show similarly that 
${\displaystyle\sum_{r=0}^{\infty}\frac{1}{(2r)!}}$
is irrational.

\end{question}
\section{Second example sheet}  Students vary in how much work
they are prepared to do. On the whole, exercises from
the main text are reasonably easy and provide good
practice in the ideas. Questions and parts of questions
marked with $^{\star}$ are not intended to be hard
but cover topics less central to the present course.

\begin{question} (Exercises~\ref{exercise infimum}
and ~\ref{exercise infimum 2}.)\label{Q14}

(i)Define the greatest lower bound
in the manner of Definition~\ref{Definition, sup},
prove its uniqueness in the manner of
Lemma~\ref{Lemma, supremum unique} and state
and prove a result corresponding to Lemma~\ref{Lemma, supremum other}.

(ii)  Use Lemma~\ref{Lemma minus infimum}
and Theorem~\ref{theorem, supremum} to show
that any non-empty set in ${\mathbb R}$
with a lower bound has a greatest lower bound.
\end{question}
\begin{question}\label{Q15}
Suppose that $A$ and $B$ are non-empty
bounded subsets of ${\mathbb R}$. Show that
\[\sup\{a+b:a\in A,\ b\in B\}=\sup A+\sup B.\]
The last formula is more frequently written
\[\sup_{a\in A,\ b\in B}a+b=\sup_{a\in A}a+\sup_{b\in B}b.\]

Suppose, further that $a_{n}$ and $b_{n}$ are bounded
sequences of real numbers. For each of the following
statements either give a proof that it is always true
or an example to show that it is sometimes false.

(i) $\sup_{n}(a_{n}+b_{n})=\sup_{n}a_{n}+\sup_{n}b_{n}$.

(ii) $\sup_{n}(a_{n}+b_{n})\leq\sup_{n}a_{n}+\sup_{n}b_{n}$.

(iii) $\sup_{n}(a_{n}+b_{n})\geq\sup_{n}a_{n}+\inf_{n}b_{n}$.

(iv) $\sup_{a\in A,\ b\in B}ab=(\sup_{a\in A}a)(\sup_{b\in B}b)$.

(v) $\inf_{a\in A,\ b\in B}a+b=\inf_{a\in A}a+\inf_{b\in B}b$.

\end{question}
\begin{question}(Exercise~\ref{Exercise, polynomial})\label{Q16}
Prove the following results.

(i) Suppose that $E$ is a subset of ${\mathbb R}$
and that $f:E\rightarrow{\mathbb R}$ is continuous
at $x\in E$. If $x\in E'\subset E$ then the
restriction $f|_{E'}$ of $f$ to $E'$ is also continuous
at $x$.

(ii) If $J:{\mathbb R}\rightarrow{\mathbb R}$ is
defined by $J(x)=x$ for all $x\in{\mathbb R}$,
then $J$ is continuous on ${\mathbb R}$.

(iii) Every polynomial $P$ is continuous on ${\mathbb R}$.

(iv) Suppose that $P$ and $Q$ are polynomials
and that $Q$ is never zero on some subset $E$
of ${\mathbb R}$. Then the rational function
$P/Q$ is continuous on $E$ (or, more precisely,
the restriction of $P/Q$ to $E$ is continuous.)
\end{question}
\begin{question} (Exercises~\ref{Intermediate 1} to~\ref{Intermediate 3}.)

(i) Show\label{Q17}
that any real polynomial of odd degree has
at least one root. Is the result true for
polynomials of even degree? Give a proof or counterexample.

(ii)$^{\star}$ Suppose  that
$g:[0,1]\rightarrow [0,1]$ is a continuous function.
By considering $f(x)=g(x)-x$, or otherwise,
show that there exists a $c\in [0,1]$ with $g(c)=c$.
(Thus every continuous map of $[0,1]$ into itself
has a fixed point.) Give an example of a bijective
(but, necessarily, non-continuous) function
$h:[0,1]\rightarrow [0,1]$ such that $h(x)\neq x$
for all $x\in [0,1]$.

\noindent [Hint: First find a function
$H:[0,1]\setminus\{0,\ 1,\ 1/2\}\rightarrow [0,1]\setminus\{0,\ 1,\ 1/2\}$
such that $H(x)\neq x$.]

(iii)$^{\star}$ Every mid-summer day
at six o'clock in the morning, the youngest monk
from the monastery of Damt starts to climb the narrow
path up Mount Dipmes.
At six in the evening he reaches the small temple
at the peak where he spends the night in meditation.
At six o'clock in the morning on the following day
he starts downwards, arriving back at the monastery
at six in the evening. Of course, he does not always walk
at the same speed. Show that, none the less, there
will be some time of day when he will be at the
same place on the path on both his upward and
downward journeys.
\end{question}
\begin{question} (Exercise~\ref{continuous equivalent}.)\label{Q18}

Let $E$ be a subset of ${\mathbb R}$.
Show that function $f:E\rightarrow{\mathbb R}$
is continuous at $x\in E$ if and only if
$f(y)\rightarrow f(x)$ as $y\rightarrow x$.
\end{question}
\begin{question}(Exercise~\ref{real limits}.)\label{Q19}

Let $E$ be a subset of ${\mathbb R}$,
$f$, $g$ be some functions from $E$ to ${\mathbb R}$,
and $x$ some point of $E$.
(i) The limit is unique. That is, if $f(y)\rightarrow l$
and $f(y)\rightarrow k$ as $y\rightarrow x$
then $l=k$.

(ii) If $x\in E'\subseteq E$ and $f(y)\rightarrow l$
as $y\rightarrow x$ through
values $y\in E$, then $f(y)\rightarrow l$
as $y\rightarrow x$ through
values $y\in E'$.

(iii) If $f(t)=c$ for all $t\in E$ then $f(y)\rightarrow c$
as $y\rightarrow x$.

(iv) If $f(y)\rightarrow l$ and $g(y)\rightarrow k$
as $y\rightarrow x$ then
$f(y)+g(y)\rightarrow l+k$.

(v) If $f(y)\rightarrow l$ and $g(y)\rightarrow k$
as $y\rightarrow x$ then
$f(y)g(y)\rightarrow lk$.

(vi) If $f(y)\rightarrow l$
as $y\rightarrow x$, $f(t)\neq 0$ for each $t\in E$ and
$l\neq 0$ then $f(t)^{-1}\rightarrow l^{-1}$.

(vii) If $f(t)\leq L$ for each $t\in E$ and
$f(y)\rightarrow l$
as $y\rightarrow x$ then $l\leq L$.
\end{question}
\begin{question}(Exercise~\ref{derivatives}.)\label{Q20}

Let $E$ be a subset of ${\mathbb R}$,
$f$, $g$ be some functions from $E$ to ${\mathbb R}$,
and $x$ some point of $E$. Prove the following results.

(i) If $f(t)=c$ for all $t\in E$ then $f$ is differentiable
at $x$ with $f'(x)=0$.

(ii) If $f$ and $g$ are differentiable at $x$ then so
is their sum $f+g$ and 
\[(f+g)'(x)=f'(x)+g'(x).\]

(iii) If $f$ and $g$ are differentiable at $x$ then so
is their product $f\times g$ and 
\[(f\times g)'(x)=f'(x)g(x)+f(x)g'(x).\]

(iv) If $f$ is differentiable at $x$ and $f(t)\neq 0$ for all $t\in E$
then $1/f$ is differentiable at $x$ and
\[(1/f)'(x)=-f'(x)/f(x)^{2}.\]

(v) If $f(t)=\sum_{r=0}^{N}a_{r}t^{r}$ on $E$ then
then $f$ is differentiable at $x$ and
\[f'(x)=\sum_{r=1}^{N}ra_{r}x^{r-1}\].
\end{question}

\begin{question} We work in the real numbers.\label{Q21}
Are the following true or false?
Give a proof or counterexample as appropriate.

(i) If $\sum_{n=1}^{\infty}a_{n}^{4}$ converges then
$\sum_{n=1}^{\infty}a_{n}^{5}$ converges.

(ii) If $\sum_{n=1}^{\infty}a_{n}^{5}$ converges
then $\sum_{n=1}^{\infty}a_{n}^{4}$ does.

(iii) If $a_{n}\geq 0$ for all $n$ and $\sum_{n=1}^{\infty} a_{n}$
converges then $na_{n}\rightarrow 0$ as $n\rightarrow\infty$. 

(iv)$^{\star}$ If $a_{n}\geq 0$ for all $n$ and $\sum_{n=1}^{\infty} a_{n}$
converges then $n(a_{n}-a_{n-1})\rightarrow 0$ as $n\rightarrow\infty$. 

(v)$^{\star}$ If $a_{n}$ is a decreasing sequence of positive numbers
and $\sum_{n=1}^{\infty} a_{n}$
converges then $na_{n}\rightarrow 0$ as $n\rightarrow\infty$.

(vi)$^{\star}$ If $a_{n}$ is a decreasing sequence of positive numbers
and $na_{n}\rightarrow 0$ as $n\rightarrow\infty$
then $\sum_{n=1}^{\infty} a_{n}$ converges.

\noindent[Hint. If necessary, look at 
Lemmas~\ref{Lemma Integral test} and~\ref{Slow powers}.]

(vii)$^{\star}$ If
$\sum_{n=1}^{\infty} a_{n}^{2}$ converges then 
$\sum_{n=1}^{\infty} n^{-1}a_{n}$ converges.
 
\noindent[Hint: Cauchy-Schwarz]

(viii)$^{\star}$ If $\sum_{n=1}^{\infty} a_{n}$ converges then 
$\sum_{n=1}^{\infty} n^{-1}|a_{n}|$ converges.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q22}
{\bf [General principle of convergence]}
We say that a sequence $x_{n}$ of points in ${\mathbb R}$
form a Cauchy sequence if given any $\epsilon>0$
we can find an $n_{0}(\epsilon)$ such that
\[|x_{n}-x_{m}|<\epsilon\ \text{for all $n,\, m\geq n_{0}(\epsilon)$}.\]

(i) Show that any convergent sequence is a Cauchy sequence.

(ii) Suppose that the points  $x_{n}$ form a Cauchy sequence.
Show that, if we can find $n(j)\rightarrow\infty$ such
that $x_{n(j)}\rightarrow x$, it follows that
$x_{n}\rightarrow x$. (Thus, if any subsequence of a Cauchy
sequence converges, so does the sequence.)

(iii) Show that if the points  $x_{n}$ form a Cauchy sequence
the set $\{x_{n}\,:\,n\geq 1\}$ is bounded.

(iv) Use the theorem of Bolzano-Weierstrass to show that
any Cauchy sequence converges.

[We have thus shown that a sequence converges if and only
if it is a Cauchy sequence. This is the famous Cauchy
general principle of convergence. Its generalisation will play
an important r\^{o}le in next year's analysis course~C9.]
\end{question} 
\begin{question}$\negthickspace^{\star}$\label{Q23}
{\bf [A method of Abel]}

(i) Suppose that
$a_{j}$ and $b_{j}$ are sequences of complex numbers
and that $S_{n}=\sum_{j=1}^{n}a_{j}$ for $n\geq 1$
and $S_{0}=0$. Show that, if $1\leq u\leq v$ then
\[\sum_{j=u}^{v}a_{j}b_{j}=\sum_{j=u}^{v}S_{j}(b_{j}-b_{j+1})
-S_{u-1}b_{u}+S_{v}b_{v+1}.\]
(This is known as partial summation, for obvious reasons.)

(ii) Suppose now that, in addition, the $b_{j}$
form a decreasing sequence of positive terms
and that $|S_{n}|\leq K$ for all $n$.
Show that
\[\left|\sum_{j=u}^{v}a_{j}b_{j}\right|
\leq 3Kb_{u}.\]
(You can replace $3Kb_{u}$ by $2Kb_{u}$ if you are careful
but there is no advantage in this.)
Deduce that if $b_{j}\rightarrow 0$ as $j\rightarrow\infty$
then $\sum_{j=1}^{\infty}a_{j}b_{j}$ converges.

Deduce the alternating series test.

(iii) If $b_{j}$ is a decreasing sequence of positive terms
with $b_{j}\rightarrow 0$ as $j\rightarrow\infty$ show
that  $\sum_{j=1}^{\infty}b_{j}z^{j}$ converges
in the region given by $|z|\leq 1$ and $z\neq 1$.
Show by example that we must have the condition $z\neq 1$.
Show by example that we must have the condition $|z|\leq 1$.
\end{question}

\begin{question}$\negthickspace^{\star}$\label{Q24}
Enter any number on your calculator.
Press the $\sin$ button repeatedly. What appears to happen?
Prove your conjecture using any properties of $\sin$ that
you need.
\end{question}
\section{Third example sheet}  Students vary in how much work
they are prepared to do. On the whole, exercises from
the main text are reasonably easy and provide good
practice in the ideas. Questions and parts of questions
marked with $^{\star}$ are not intended to be hard
but cover topics less central to the present course.
I know that there is a general belief amongst students,
directors of studies and the Faculty Board
that there is a magic set of questions which is suitable
for everybody. If there is one, I will be happy to circulate it.
For the moment I remark that the unstarred questions 
on this example sheet represent
a good week's work for someone who finds the course hard
and the whole sheet represents
a good week's work for someone who finds the unstarred
questions boring.

\begin{question}{\bf [Very traditional]}\label{Exercise, non Darboux}
(i) Consider the function $f:{\mathbb R}\rightarrow{\mathbb R}$
given by $f(t)=t^{2}\sin 1/t$ for $t\neq 0$, $f(0)=0$.\label{Q25}
Show that $f$ is everywhere differentiable and find its derivative.
Show that $f'$ is not continuous.

\noindent
[Deal quickly with the easy part and then
go back to the definition to deal with $t=0$.
There are wide selection of counter-examples
obtained by looking at $t^{\beta}\sin t^{\alpha}$
for various values of $\alpha$ and $\beta$.]

(ii) Find an infinitely differentiable
function $g:(1,\infty)\rightarrow{\mathbb R}$
such that $g(t)\rightarrow 0$ but $g'(t)\nrightarrow 0$
as $t\rightarrow\infty$.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q26}
Question~\ref{Exercise, non Darboux} shows that the
derivative of a differentiable function need not be continuous.
In spite of this the derivative still obeys Darboux's
theorem:- If $f:[a,b]\rightarrow{\mathbb R}$ is differentiable
and $k$ lies between $f'(a)$ and $f'(b)$ then there is
a $c\in[a,b]$ such that $f'(c)=k$. In this question
we prove the result.

Explain why there is no loss of generality in supposing
that $f'(a)>k>f'(b)$. Set $g(x)=f(x)-kx$. By looking
at $g'(a)$ and $g'(b)$ show that $g$ cannot have a maximum
at $a$ or $b$. Use the method of proof of Rolle's
theorem to show that there exists a $c\in(a,b)$ with $g'(c)=0$
and deduce Darboux's theorem.

Give an example of a function $f:{\mathbb R}\rightarrow{\mathbb R}$
such that there does not exist a differentiable function
$F:{\mathbb R}\rightarrow{\mathbb R}$ with $F'=f$.
\end{question}
\begin{question}\label{Q27}
(i) {\bf [Cauchy's mean value theorem]}
Suppose that $f,\, g:[a,b]\rightarrow{\mathbb R}$
are continuous and that $f$ and $g$ are differentiable
on $(a,b)$. Suppose further that $g'(x)\neq 0$ for
all $x\in (a,b)$. Explain why $g(a)\neq g(b)$.
By applying Rolle's theorem to $F$ where
\[F(x)=(g(b)-g(a))(f(x)-f(a))-(g(x)-g(a))(f(b)-f(a)),\]
show that there is a $\zeta\in (a,b)$ such that
\[\frac{f'(\zeta)}{g'(\zeta)}=\frac{f(b)-f(a)}{g(b)-g(a)}.\]

(ii) {\bf [L'H\^{o}pital's rule]} 
Suppose that $f,\, g:[a,b]\rightarrow{\mathbb R}$
are continuous and that $f$ and $g$ are differentiable
on $(a,b)$. Suppose that $f(a)=g(a)=0$, that $g'(t)$
does not vanish near $a$ and
$f'(t)/g'(t)\rightarrow l$ as $t\rightarrow a$
through values of $t>a$. Show that
$f(t)/g(t)\rightarrow l$ as $t\rightarrow a$
through values of $t>a$.
\end{question}
\begin{question}(Exercise~\ref{start bump}.)\label{Q28}

Consider the function
$F:{\mathbb R}\rightarrow{\mathbb R}$ defined by
\begin{alignat*}{2}
F(0)&=0\\
F(x)&=\exp(-1/x^{2})&&\qquad\text{otherwise}.
\end{alignat*}

(i) Prove by induction, using the standard rules of differentiation,
that $F$ is infinitely differentiable at all points $x\neq 0$
and that, at these points,
\[F^{(n)}(x)=P_{n}(1/x)\exp(-1/x^{2})\]
where $P_{n}$ is a polynomial which need not be found explicitly.

(ii) Explain why $x^{-1}P_{n}(1/x)\exp(-1/x^{2})\rightarrow 0$
as $x\rightarrow 0$.

(iii) Show by induction, using the definition of differentiation,
that $F$ is infinitely differentiable at $0$
with $F^{(n)}(0)=0$ for all $n$.
[Be careful to get this part of the argument
right.]

(iv) Show that
\[F(x)=\sum_{j=0}^{\infty}\frac{F^{(j)}(0)}{j!}x^{j}\]
if and only if $x=0$. (The reader may prefer to say
that `The Taylor expansion of $F$ is only valid at $0$'.)

(v) Why does part~(iv) not contradict the local Taylor theorem
(Theorem~\ref{local Taylor})?
\end{question}

\begin{question} In this question you may assume the
standard properties of $\sin$ and $\cos$ but not their
power series expansion.\label{Q29}

(i) By considering the sign of $f'_{1}(x)$, when
$f_{1}(t)=t-\sin t$, show that
\[t\geq \sin t\]
for all $t\geq 0$.

(ii) By considering the sign of $f'_{2}(x)$, when
$f_{2}(t)=\cos t-1+t^{2}/2!$, show that
\[\cos t\geq 1-\frac{t^{2}}{2!}\]
for all $t\geq 0$.

(iii) By considering the sign of $f'_{3}(x)$, when
$f_{3}(t)=\sin t -t+t^{3}/3!$, show that
\[\sin t\geq t-\frac{t^{3}}{3!}\]
for all $t\geq 0$.

(iv) State general results suggested by parts~(i) to~(iii)
and prove them by induction. State and prove
corresponding results for $t<0$.

(v) Using~(iv), show that
\[\sum_{n=0}^{N}\frac{(-1)^{n}t^{2n+1}}{(2n+1)!}\rightarrow\sin t\]
as $N\rightarrow\infty$ for all $t\in{\mathbb R}$. State and prove
a corresponding result for $\cos$.

\noindent[This question could be usefully illustrated by computer
graphics.]
\end{question}
\begin{question} (i) Suppose $f:[0,1]\rightarrow{\mathbb R}$
is twice differentiable with $f''(t)\geq 0$ for all $t\in[0,1]$.
If $f'(0)>0$ and $f(0)=0$\label{Q30}
explain why $f(t)>0$ for $t>0$. If $f'(0)\geq 0$
and $f(0)=f(1)=0$ what can you say about $f$ and why?
If $f'(1)\leq 0$
and $f(0)=f(1)=0$ what can you say about $f$ and why?

(ii) Suppose $f:[0,1]\rightarrow{\mathbb R}$
is twice differentiable with $f''(t)\geq 0$ for all $t\in[0,1]$
and $f(0)=f(1)=0$. Show that $f(t)\leq 0$ for all $t\in[0,1]$.
[Hint: Consider the sign of $f'$.]

(iii) Suppose $g:[a,b]\rightarrow{\mathbb R}$
is twice differentiable with $g''(t)\geq 0$ for all $t\in[a,b]$.
By considering the function $f:[0,1]\rightarrow{\mathbb R}$
defined by
\[f(t)=g\big((1-t)a+tb\big)-(1-t)g(a)-tg(b)\]
show that
\[g\big((1-t)a+tb\big)\leq (1-t)g(a)+tg(b)\]
for all $t$ with $1\geq t\geq 0$.

[In other words a twice differentiable function with everywhere
positive second derivative is \emph{convex}. Convex functions
are considered in the last part of the probability course
where you prove the very elegant Jensen's inequality.
You should note, however, that not all convex functions are twice
differentiable (look at $x\mapsto |x|$).]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q31}
The results of this question are also useful
in the probability course when you study extinction probabilities.
Notice that the point of this question is to obtain rigorous
proofs of the results stated.

Suppose $a_{0}>0$, $a_{1},\,a_{2},\,\dots,\,a_{n}\geq 0$
and $\sum_{j=0}^{n}a_{j}=1$. We set $P(t)=\sum_{j=0}^{n}a_{j}t^{j}$.

(i) Find $P(0)$, $P(1)$ and $P'(1)$. Show that $P'(t)\geq 0$
and $P''(t)\geq 0$ for all $t\geq 0$.

(ii) Show that the equation $P(t)=t$ has no solution
with $0\leq t<1$ if $\sum_{j=1}^{n}ja_{j}\leq 1$
and exactly one such solution if  $\sum_{j=1}^{n}ja_{j}>1$.
We write $\alpha$ for the smallest solution of $P(t)=t$
with $0\leq t\leq 1$.

(iii) If we set $x_{0}=0$ and $x_{n}=P(x_{n-1})$ for $n\geq 1$
show, by induction, that $x_{n-1}\leq x_{n}\leq\alpha$.

(iv) Deduce, giving your reasons explicitly, that $x_{n}$
must converge to a limit $\beta$. Show that $0\leq\beta\leq\alpha$
and $P(\beta)=\beta$. Deduce that $\beta=\alpha$ and so
\[x_{n}\rightarrow\alpha\ \text{as $n\rightarrow\infty$}.\]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q32}
The first proof that transcendental
numbers existed is due to Liouville. This question
gives a version of his proof. 

Let $P(t)=\sum_{j=0}^{N}a_{j}t^{j}$ with the $a_{j}$
integers and $a_{N}\neq 0$. Let $\alpha$ be a root
of $P$. 

(i) Why can we choose a $\delta>0$ such that $P(t)\neq 0$
for all $t$ with $t\in[\alpha-\delta,\alpha+\delta]$
and $t\neq\alpha$. 

(ii) Let $\delta$ be as in (i). Explain why there
exists a $K$ such that $|P(t)-P(s)|\leq K|t-s|$
for all $t,\, s\in[\alpha-\delta,\alpha+\delta]$.

(iii) If $p$ and $q$ are integers such that $q\geq 1$
and $P(p/q)\neq 0$
show that $|P(p/q)|\geq q^{-N}$. [Hint: Remember that the
coefficients of $P$ are integers.]

(iv) If $p$ and $q$ are integers such that $q\geq 1$,
$P(p/q)\neq 0$ and $p/q\in[\alpha-\delta,\alpha+\delta]$
use~(ii) and~(iii) to show that
\[\left|\alpha-\frac{p}{q}\right|\geq K^{-1}q^{-N}.\]

(v) Show that, if
$p$ and $q$ are integers such that $q\geq 1$ 
and $\alpha\neq p/q$, then
\[\left|\alpha-\frac{p}{q}\right|\geq \min(\delta,K^{-1}q^{-N}).\]

(vi) Show that if $\alpha$ is a root of
a polynomial with integer coefficients then there exists a
$K$ and an $N$ (depending on $\alpha$) such that
\[\left|\alpha-\frac{p}{q}\right|\geq K^{-1}q^{-N}\]
whenever $p$ and $q$ are integers with $q\geq 1$ and $\alpha\neq p/q$.

(vii) Explain why $\sum_{n=0}^{\infty}10^{-n!}$ converges.
Call the limit $L$. Show that
\[\left|L-\sum_{n=0}^{m}10^{-n!}\right|\leq 2((10)^{m!})^{-m-1}.\]
By taking $q=(10)^{m!}$ and looking at~(vi), show that $L$
can not be the root of
a polynomial with integer coefficients.

(viii) By looking at
\[\sum_{n=0}^{\infty}\zeta_{n}10^{-n!}\]
with $\zeta_{n}=\pm 1$ show that there are uncountably many
transcendentals.
\end{question}
\begin{question}\label{Q33} In this question you may assume standard
results on the power function $t\mapsto t^{\alpha}$.

Use the form of Taylor's
theorem given in  Theorem~\ref{Global theta} to show that
\[(1+x)^{\alpha}=1+\alpha x+ \frac{\alpha(\alpha-1)}{2!}x^{2}
+\dots+\frac{\alpha(\alpha-1)\dots(\alpha-n+1)}{n!}x^{n}+\dots\]
for all $0\leq x<1$. Note that the main part of your task
is to estimate the remainder term.

What happens if $\alpha$ is a positive integer?

Why does your argument fail for $-1<x<0$? (The result is true
but our form of the remainder does not give it. This is one
of the reasons why there are so many forms of Taylor's
with different remainders.)
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Use Rolle}\label{Q34}
(i) Suppose that $x_{0}$, $x_{1}$,
\dots $x_{n}$  are distinct. Set
\[e_{j}(x)=\prod_{k\neq j}\frac{x-x_{k}}{x_{j}-x_{k}}.\]
What is the value of $e_{j}(x_{k})$ if $j\neq k$ and
if $j=k$? Show that given real  numbers $\alpha_{j}$ there is
a polynomial of degree $n$ with $f(x_{j})=\alpha_{j}$.

(ii) Suppose $f:[a,b]\rightarrow{\mathbb R}$ is $n+1$ times
differentiable, $a<x_{0}<x_{1}<\dots<x_{n}<b$
and $P$ is a polynomial of degree $n$ with $P(x_{j})=f(x_{j})$
for $0\leq j\leq n$. We are interested in the error
\[e(x)=f(x)-P(x)\]
at a point $x\in[a,b]$ with $x\neq x_{j}$ for all $j$.

Set
\[F(t)=f(t)-P(t)-e(x)\prod_{k=0}^{n}\frac{t-x_{k}}{x-x_{k}}.\]
Explain why $F$ vanishes at least $n+2$ times on $[a,b]$.
Explain why $F'$ vanishes at least $n+1$ times on $[a,b]$.
By repeating the argument show that $F^{(n+1)}$ must vanish
at least once (at $\zeta$, say) on $[a,b]$. Show that
\[e(x)=\frac{1}{(n+1)!}f^{(n+1)}(\zeta)\prod_{k=0}^{n}(x-x_{k}).\]

Deduce that if $|f^{(n+1)}(t)|\leq M$ for all $t\in[a,b]$
then
\[|f(t)-P(t)|\leq \frac{M}{(n+1)!}|Q(t)|\]
where $Q(t)=\prod_{k=0}^{n}(t-x_{k})$.

[The argument just given should remind you of the
proof of Theorem~\ref{many mean}.]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q35}
Recall from last term (or earlier)
that
\[(\cos\theta+i\sin\theta)^{n}=\cos n\theta+i\sin n\theta\]
for all real $\theta$ and all integers $n\geq 0$.

By taking real parts, show that there is a real
polynomial $T_{n}$ of degree $n$ such that
\[T_{n}(\cos\theta)=\cos n\theta\]
for all real $\theta$.

Write down $T_{0}(t)$, $T_{1}(t)$, $T_{2}(t)$ and $T_{3}(t)$
explicitly.

Show that, if $n\geq 1$ then

(a) $|T_{n}(t)|\leq 1$ for all $t$ with $|t|\leq 1$,

(b) $T_{n+1}(t)=2tT_{n}(t)-T_{n-1}(t)$, (why does this result hold for all $t$?)

(c) the coefficient of $t^{n}$ in $T_{n}(t)$ is $2^{n-1}$.


Explain why $T_{n+1}$ has $n+1$ zeros $x_{0}$, $x_{1}$,
\dots, $x_{n}$ lying in $(-1,1)$. Use~(a), (c) and the
final result of question~\ref{Use Rolle} to show
that if $[a,b]=[-1,1]$ and $f$ and $P$ obey the
hypotheses of question~\ref{Use Rolle}
(so that, in particular, 
$|f^{(n+1)}(t)|\leq M$ for all $t\in[-1,1]$)
then
\[|f(t)-P(t)|\leq \frac{M}{(n+1)!}|2^{-n}T_{n+1}(t)|
\leq \frac{M}{2^{n}(n+1)!}\]

The rest of the question just asks for another
of useful property of the Tchebychev
polynomials $T_{n}$. (The modern view is that
Tchebychev should have called himself Chebychev.
He seems to have preferred Tchebycheff.)
                   
(d) If $n,\ m\geq 0$ then
\begin{equation*}
\int_{-1}^{1}\frac{T_{n}(x)T_{m}(x)}{(1-x^{2})^{1/2}}\,dx=
\begin{cases}
0&\text{if $n\neq m$}\\
\frac{\pi}{2}&\text{if $n=m\neq 0$}
\end{cases}
\end{equation*}
What happens if $n=m=0$?
\end{question}
\begin{question}(Exercise~\ref{complex limits}.)\label{Q36}

Let $E$ be a subset of ${\mathbb C}$,
$f$, $g$ be some functions from $E$ to ${\mathbb C}$,
and $z$ some point of $E$.

(i) The limit is unique. That is, if $f(w)\rightarrow l$
and $f(w)\rightarrow k$ as $w\rightarrow z$
then $l=k$.

(ii) If $z\in E'\subseteq E$ and $f(w)\rightarrow l$
as $w\rightarrow z$ through
values $w\in E$, then $f(w)\rightarrow l$
as $w\rightarrow z$ through
values $w\in E'$.

(iii) If $f(u)=c$ for all $u\in E$ then $f(w)\rightarrow c$
as $w\rightarrow z$.

(iv) If $f(w)\rightarrow l$ and $g(w)\rightarrow k$
as $w\rightarrow z$ then
$f(w)+g(w)\rightarrow l+k$.

(v) If $f(w)\rightarrow l$ and $g(w)\rightarrow k$
as $w\rightarrow z$ then
$f(w)g(w)\rightarrow lk$.

(vi) If $f(w)\rightarrow l$
as $w\rightarrow z$, $f(u)\neq 0$ for each $u\in E$ and
$l\neq 0$ then $f(w)^{-1}\rightarrow l^{-1}$.
\end{question}
\begin{question}(Exercise~\ref{first continuous complex} %
and~\ref{continuous complex chain rule}.)\label{Q37}
Suppose that $E$ is a subset of ${\mathbb C}$,
that $z\in E$,
and that $f$ and $g$
are functions from $E$ to ${\mathbb C}$.

(i) If $f(u)=c$ for all $u\in E$, then f is continuous
on $E$.

(ii) If $f$ and $g$ are continuous at $z$,
then so is $f+g$.

(iii) Let us define $f\times g:E\rightarrow {\mathbb C}$
by $f\times g(u)=f(u)g(u)$ for all $u\in E$. Then
if $f$ and $g$ are continuous at $z$, so is $f\times g$.

(iv) Suppose that $f(u)\neq 0$ for all $u\in E$. If
$f$ is continuous at $z$ so is $1/f$.

(v) If $z\in E'\subset E$ and $f$ is continuous at $z$ then the
restriction $f|_{E'}$ of $f$ to $E'$ is also continuous
at $z$.

(vi) If $J:{\mathbb C}\rightarrow{\mathbb C}$ is
defined by $J(z)=z$ for all $z\in{\mathbb C}$,
then $J$ is continuous on ${\mathbb C}$.

(vii) Every polynomial $P$ is continuous on ${\mathbb C}$.

(viii) Suppose that $P$ and $Q$ are polynomials
and that $Q$ is never zero on some subset $E$
of ${\mathbb C}$. Then the rational function
$P/Q$ is continuous on $E$ (or, more precisely,
the restriction of $P/Q$ to $E$ is continuous.)

(ix) Let $U$ and $V$ be subsets of ${\mathbb C}$. Suppose
$f:U\rightarrow{\mathbb C}$ is such that
$f(z)\in V$ for all $z\in U$. If $f$
is continuous at $w\in U$ and $g:V\rightarrow{\mathbb C}$
is continuous at $f(w)$, then the composition
$g\circ f$ is continuous at $w$.

\end{question}
\begin{question}(Exercises~\ref{derivatives complex -1}\label{Q38}
\ref{derivatives complex} and~\ref{complex chain rule}.)

Let $E$ be a subset of ${\mathbb C}$,
$f$, $g$ be some functions from $E$ to ${\mathbb C}$,
and $z$ some point of $E$. 

Show that if
$f$ is differentiable at $z$ then
$f$ is continuous at $z$.

Prove the following results.

(i) If $f(u)=c$ for all $u\in E$ then $f$ is differentiable
at $z$ with $f'(z)=0$.

(ii) If $f$ and $g$ are differentiable at $z$ then so
is their sum $f+g$ and
\[(f+g)'(z)=f'(z)+g'(z).\]

(iii) If $f$ and $g$ are differentiable at $z$ then so
is their product $f\times g$ and
\[(f\times g)'(z)=f'(z)g(z)+f(z)g'(z).\]

(iv) If $f$ is differentiable at $z$ and $f(u)\neq 0$ for all $u\in E$
then $1/f$ is differentiable at $z$ and
\[(1/f)'(z)=-f'(z)/f(z)^{2}.\]

(v) If $f(u)=\sum_{r=0}^{N}a_{r}u^{r}$ on $E$ then
then $f$ is differentiable at $z$ and
\[f'(z)=\sum_{r=1}^{N}ra_{r}z^{r-1}\].

(vi) Let $U$ and $V$ be subsets of ${\mathbb C}$. Suppose
$f:U\rightarrow{\mathbb C}$ is such that
$f(z)\in V$ for all $t\in U$. If $f$
is differentiable at $w\in U$ and $g:V\rightarrow{\mathbb R}$
is differentiable at $f(w)$, then the composition
$g\circ f$ is differentiable at $w$ with
\[(g\circ f)'(w)=f'(w)g'(f(w)).\]

\end{question}
\begin{question}(Exercise~\ref{New radius}.)\label{Q39}
Suppose that $\sum_{n=0}^{\infty}a_{n}z^{n}$
has radius of convergence $R$.
Then the sequence $|a_{n}z^{n}|$ is unbounded if $|z|>R$
and $\sum_{n=0}^{\infty}a_{n}z^{n}$ converges absolutely
if $|z|<R$.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Many pointed}\label{Q40}
This question requires Abel's test from Exercise~\ref{Q23}
which is also starred.

(i) Show that $\sum_{n=1}^{\infty}z^{n}/n$ has radius of
convergence $1$, converges for all $z$ with $|z|=1$
and $z\neq 1$ but diverges if $z=1$.

(ii) Let $|z_{1}|=|z_{2}|=\dots=|z_{m}|=1$.
Find a power series $\sum_{n=0}^{\infty}a_{n}z^{n}$ 
which has radius of convergence
$1$ and converges for all $z$ with $|z|=1$
and $z\neq z_{1},\ z_{2},\ \dots,\ z_{m}$
but diverges if $z=z_{j}$ for some $1\leq j\leq m$.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Add power series}
(i) Show that there exist power series\label{Q41}
of all radii of convergence (including $0$ and $\infty$).

(ii) Suppose the power series $\sum_{n=0}^{\infty}a_{n}z^{n}$
has radius of convergence $R$ and
the power series $\sum_{n=0}^{\infty}b_{n}z^{n}$
has radius of convergence $S$. Show that, if $R\neq S$
then  $\sum_{n=0}^{\infty}(a_{n}+b_{n})z^{n}$
has radius of convergence $\min(R,S)$.

(iii) Suppose that the conditions of~(ii) hold except that $R=S$.
Show that the radius of convergence $T$  of
$\sum_{n=0}^{\infty}(a_{n}+b_{n})z^{n}$ satisfies the
condition $T\geq R$. Show by means of examples that
$T$ can take any value with $T\geq R$. [Hint: Start by
thinking of a simple relation between $a_{n}$ and $b_{n}$
which will give $T=\infty$.]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q42}
(i) Suppose that $x_{n}$ is a bounded sequence
of real numbers. Show carefully that $y_{n}=\sup_{m\geq n}x_{m}$
is a bounded decreasing sequence and deduce that $y_{n}$
tends to a limit $y$ say. We write
\[\limsup_{n\rightarrow\infty}x_{n}=y.\]

(ii) Suppose that $x_{n}$ is a bounded sequence
of real numbers. Prove the following two results.

\ \ (A) Given any $\epsilon>0$, we can find an $M(\epsilon)$
such that
\[x_{n}\leq \limsup_{m\rightarrow\infty}x_{m}+\epsilon\]
for all $n\geq M(\epsilon)$.

\ \ (B) Given any $\epsilon>0$ and any $N$ we can find
an integer $P(N,\epsilon)\geq N$ such that
\[x_{P(N,\epsilon)}\geq \limsup_{m\rightarrow\infty}x_{m}-\epsilon.\]

(iii) Using (ii) or otherwise show that if $a_{n}\in{\mathbb C}$
and the sequence $|a_{n}|^{1/n}$ is bounded and
$\limsup_{n\rightarrow\infty}|a_{n}|^{1/n}\neq 0$
then $\sum_{n=0}^{\infty}a_{n}z^{n}$
has radius of convergence $(\limsup_{n\rightarrow\infty}|a_{n}|^{1/n})^{-1}$.

Show also that, if the sequence $|a_{n}|^{1/n}$ is unbounded,
$\sum_{n=0}^{\infty}a_{n}z^{n}$
has radius of convergence $0$, and, if
$\limsup_{n\rightarrow\infty}|a_{n}|^{1/n}=0$,
$\sum_{n=0}^{\infty}a_{n}z^{n}$ has infinite radius of
convergence.

[This result has considerable theoretical significance
but I strongly advise using the definition directly
rather than relying on the formula.]

(iv) Use the formula of this question to obtain
the results of Question~\ref{Add power series}.
\end{question}
\begin{question}\label{Q43} (i) Starting from the observation that
\[1+x+x^{2}+\dots+x^{n}=\frac{1-x^{n+1}}{1-x}\]
show that
\[\frac{1}{1-x}=\sum_{n=0}^{\infty}x^{n}\]
for all $|x|<1$. Show that the result is false or meaningless
if $|x|\geq 1$.

(ii) Use term by term differentiation to obtain power series
expansions for $(1-x)^{-n}$ for all integer $n$ with $n\geq 1$.

(iii) Find the radius of convergence of $\sum_{n=1}^{\infty}x^{n}/n$.
Use term by term differentiation and the constant
value theorem to show that
\[\log (1-x)=-\sum_{n=1}^{\infty}\frac{x^{n}}{n}.\]

(iv) Use similar ideas to obtain a power series expansion
for $\tan^{-1}x$ in a range to  be stated.
\end{question}

\begin{question}(Exercise~\ref{Exercise, sinh}.)\label{Q44}
 
Write down what you consider to be the
chief properties of $\sinh$ and $\cosh$. (They should convey
enough information to draw a reasonable graph of the
two functions.)

(i) Obtain those properties by starting with the definitions
\[\sinh x=\sum_{n=0}^{\infty}\frac{x^{2n+1}}{(2n+1)!}
\ \text{and}\ \cosh x=\sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}\]
and proceeding along the lines of Lemma~\ref{lemma, trigonometry}.

(ii) Obtain those properties by starting with the definitions
\[\sinh x=\frac{\exp x-\exp (-x)}{2}
\ \text{and}\ \cosh x=\frac{\exp x+\exp (-x)}{2}\]
\end{question}
\begin{question}$\negthickspace^{\star}$(Exercise~\ref{complex sine}.)
 
(i) Explain why the infinite sums\label{Q45}
\[\sin z=\sum_{n=0}^{\infty}\frac{(-1)^{n}z^{2n+1}}{(2n+1)!}
\ \text{and}\ \cos z=\sum_{n=0}^{\infty}\frac{(-1)^{n}z^{2n}}{(2n)!}\]
converge everywhere and are differentiable everywhere
with $\sin' z=\cos z$, $\cos' z=-\sin z$.

(ii) Show that
\[\sin z=\frac{\exp iz-\exp (-iz)}{2i},\ \cos z=\frac{\exp iz+\exp (-iz)}{2}\]
and
\[\exp iz=\cos z+i\sin z\]
for all $z\in{\mathbb C}$.

(iii) Show that
\[\sin (z+w)=\sin z\cos w+\cos z\sin w,
\ \cos(z+w)=\cos z \cos w-\sin z\sin w,\]
and
$(\sin z)^{2}+(\cos z)^{2}=1$
for all $z,\, w\in{\mathbb C}$.

(iv) $\sin(-z)=-\sin z$, $\cos (-z)=\cos z$ for all $z\in{\mathbb C}$.

(v) $\sin$ and $\cos$ are $2\pi$ periodic in the sense that
\[\sin (z+2\pi)=\sin z\ \text{and}\ \cos (z+2\pi)=\cos z\]
for all $z\in{\mathbb C}$.

(vi) If $x$ is real then $\sin ix=i\sinh x$ and $\cos ix=\cosh x$.

(vii) Recover the addition formulae for $\sinh$ and $\cosh$ by
setting $z=ix$ and $w=iy$ in part~(iii).

(viii) Show that $|\sin z|$ and $|\cos z|$ are bounded if $|\Im z|\leq K$
for some $K$ but that $|\sin z|$ and $|\cos z|$ are unbounded
on ${\mathbb C}$.
\end{question}
\begin{question}$\negthickspace^{\star}$(Exercise~\ref{no logarithm}.)
\label{Q46}

Suppose,
if possible, that there exists a continuous
$L:{\mathbb C}\setminus\{0\}\rightarrow{\mathbb C}$
with $\exp(L(z))=z$ for all $z\in{\mathbb C}\setminus\{0\}$.

(i) If $\theta$ is real, show that
$L(\exp(i\theta))=i(\theta+2\pi n(\theta))$ for some
$n(\theta)\in{\mathbb Z}$.

(ii) Define $f:{\mathbb R}\rightarrow{\mathbb R}$
by
\[f(\theta)=\frac{1}{2\pi}
\left(\frac{L(\exp i\theta)-L(1)}{i}-\theta\right).\]
Show that $f$ is a well defined continuous function,
that $f(\theta)\in{\mathbb Z}$ for all $\theta\in{\mathbb R}$,
that $f(0)=0$ and that $f(2\pi)=-1$.

(iii) Show that the statements made in the last
sentence of (ii) are incompatible with the intermediate
value theorem and deduce that no function can exist
with the supposed properties of $L$.

(iv) Discuss informally what connection, if any, the
discussion above has with the existence of the
international date line.
\end{question}
\begin{question}$\negthickspace^{\star}$(Exercise~\ref{no square root}.)
\label{Q46 A}
Show by
modifying the argument of Exercise~\ref{no logarithm},
that there does not exist a continuous
$S:{\mathbb C}\rightarrow{\mathbb C}$
with $S(z)^{2}=z$ for all $z\in{\mathbb C}$.
\end{question}

\section{Fourth example sheet}  Students vary in how much work
they are prepared to do. On the whole, exercises from
the main text are reasonably easy and provide good
practice in the ideas. Questions and parts of questions
marked with $^{\star}$ are not intended to be hard
but cover topics less central to the present course.


\begin{question}(Exercise~\ref{social convention}.)\label{Q47} 
Suppose that $b\geq a$, $\lambda,\mu\in{\mathbb R}$,
and $f$ and $g$ are Riemann integrable. Which of the
following statements are always true and which are not?
Give a proof or counter-example. If the statement
is not always true, find an appropriate correction
and prove it.

(i) ${\displaystyle \int_{b}^{a}\lambda f(x)+\mu g(x)\,dx
=\lambda\int_{b}^{a}f(x)\,dx+\mu \int_{b}^{a}g(x)\,dx}$.

(ii) If $f(x)\geq g(x)$ for all $x\in[a,b]$, then
${\displaystyle \int_{b}^{a}f(x)\,dx\geq\int_{b}^{a}g(x)\,dx}$.
\end{question}
\begin{question}(Exercise~\ref{Exercise, integral positive zero}.)
Let $a\leq c\leq b$.\label{Q48}
Give an example of a
Riemann integrable function $f:[a,b]\rightarrow{\mathbb R}$
such that $f(t)\geq 0$ for all $t\in[a,b]$
and
\[\int_{a}^{b}f(t)\,dt=0,\]
but $f(c)\neq 0$.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q49}
Define $f:[0,1]\rightarrow{\mathbb R}$ by
$f(p/q)=1/q$ when $p$ and $q$ are coprime integers
with $1\leq p <q$ and $f(x)=0$ otherwise.

(i) Show that $f$ is Riemann integrable and
find $\int_{0}^{1}f(x)\,dx$.

(ii) At which points is $f$ continuous? Prove
your answer.
\end{question}

\begin{question}(Exercise~\ref{not fundamental}).\label{Q50}

(i) Let $H$ be the Heaviside function
$H:{\mathbb R}\rightarrow{\mathbb R}$ given by
$H(x)=0$ for $x<0$, $H(x)=1$ for $x\geq 0$. Calculate
$F(t)=\int_{0}^{t}H(x)\,dx$ and show that $F$ is
not differentiable at $0$. Where does our
proof of Theorem~\ref{Theorem, fundamental calculus}
break down?

(ii) Let $f(0)=1$, $f(t)=0$ otherwise. Calculate
$F(t)=\int_{0}^{t}f(x)\,dx$ and show that $F$ is
differentiable at $0$ but $F'(0)\neq f(0)$. Where does our
proof of Theorem~\ref{Theorem, fundamental calculus}
break down?
\end{question}
\begin{question}(Exercise~\ref{No substitutes}.)\label{Q51}

The following exercise is traditional.

(i) Show that integration by substitution, using $x=1/t$,
gives
\[\int_{a}^{b}\frac{dx}{1+x^{2}}
=
\int_{1/b}^{1/a}\frac{dt}{1+t^{2}}\]
when $b>a>0$.

(ii) If we set $a=-1$, $b=1$ in the formula of~(i),
we obtain
\[\int_{-1}^{1}\frac{dx}{1+x^{2}}
\overset{?}{=}
-\int_{-1}^{1}\frac{dt}{1+t^{2}}\]
Explain
this apparent failure
of the method of integration by substitution.

(iii) Write the result of (i) in terms of $\tan^{-1}$
and prove it using standard trigonometric identities.
\end{question}

\begin{question}\label{Question, define logarithm}\label{Q52}
In this question we give an alternative
treatment of the logarithm so no properties of the
exponential or logarithmic function should be used.
You should quote all the theorems that you use,
paying particular attention to those on integration.

We set
\[l(x)=\int_{1}^{x}\frac{1}{t}\,dt.\]

(i) Explain why $l:(0,\infty)\rightarrow{\mathbb R}$
is a well defined function.

(ii) Use the change of variable theorem for integrals to
show that
\[\int_{x}^{xy}\frac{1}{t}\,dt=l(y)\]
for all $x,\, y>0$. Deduce that $l(xy)=l(x)+l(y)$.

(iii) Show that $l$ is everywhere differentiable with 
$l'(x)=1/x$.

(iv) Show that $l$ is a strictly increasing function.

(v) Show that $l(x)\rightarrow\infty$ as $x\rightarrow\infty$.
\end{question}
\begin{question}\label{Q53} In the lectures we deduced the properties
of the logarithm from those of the exponential.
Reverse this by making a list of the properties
of the exponential, define $\exp$ as the inverse function of $\log$
(explaining carefully why you can do this) and using
the properties of $\log$ found in the previous question
(Question~\ref{Question, define logarithm}).
\end{question}

\begin{question}$\negthickspace^{\star}$\label{Q54}
{\bf [The first mean value theorem for integrals]}
Suppose $g:[a,b]\rightarrow{\mathbb R}$ is a continuous
function such that
$g(x)\geq 0$ for all $x\in[a,b]$. If $f:[a,b]\rightarrow{\mathbb R}$
is continuous explain why we can find $k_{1}$ and $k_{2}$
in $[a,b]$ such that
\[f(k_{1})\leq f(x)\leq f(k_{2})\]
for all $x\in[a,b]$. Deduce carefully that
\[f(k_{1})\int_{a}^{b}g(x)\,dx\leq \int_{a}^{b}f(x)g(x)\,dx
\leq f(k_{2})\int_{a}^{b}g(x)\,dx\]
and show, stating carefully any theorem that you need, that
there exists a $c\in[a,b]$ such that
\[\int_{a}^{b}f(x)g(x)\,dx=f(c)\int_{a}^{b}g(x)\,dx.\]

Does this result remain true if $g(x)\leq 0$ for all $x\in[a,b]$?
Does this result remain true if we place no restrictions on
$g$ (apart from continuity). In each case give a proof or
a counter example.
(The first mean value theorem for integrals is used in
the numerical analysis course.)
\end{question}

\begin{question} Use the integral form of the remainder\label{Q55}
in Taylor's theorem (i.e. Theorem~\ref{Integral Taylor}) to obtain
the power series expansion for $\sin$.
\end{question}
\begin{question}{\bf [The binomial theorem]}\label{Q56}
If $1>x\geq t\geq 0$ show that
\[\frac{x-t}{1+t}\leq x.\]
If $-1<x\leq t\leq 0$ show that
\[\frac{t-x}{1+t}\leq -x.\]
Use the integral form of the
Taylor theorem to show that, if $|x|<1$, then
\[(1+x)^{\alpha}=1+\alpha x+ \frac{\alpha(\alpha-1)}{2!}x^{2}
+\dots+\frac{\alpha(\alpha-1)\dots(\alpha-n+1)}{n!}ix^{n}+\dots.\]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q57}
{\bf [Cauchy-Schwarz for integrals]}
Write $C([a,b])$ for the set of continuous functions
$f:[a,b]\rightarrow{\mathbb R}$. 

(i) If you are doing course~P1 verify that $C([a,b])$
is a vector space over ${\mathbb R}$. Is it finite dimensional?
Prove your answer.

(ii) If $f,\, g\in C([a,b])$
we write
\[\langle f,g\rangle=\int_{a}^{b}f(t)g(t)\,dt.\]
Show that if $f,\, g,\, h\in C([a,b])$ and 
$\lambda,\, \mu\in{\mathbb R}$ then

\ \ \ (a) $\langle f,f\rangle\geq 0$,

\ \ \ (b) if $\langle f,f\rangle=0$ then $f=0$.

\ \ \ (c) $\langle f,g\rangle=\langle g,f\rangle$,

\ \ \ (d) $\langle \lambda f+\mu g,h\rangle
=\lambda \langle f,h\rangle+\mu \langle g,h\rangle$.

(iii) By imitating the proof of the Cauchy-Schwarz
inequality for ${\mathbb R}^{n}$ in the course C1/C2
show that
\[\langle f,g\rangle^{2}\leq \langle f,f\rangle\langle g,g\rangle.\]
In other words
\[\left(\int_{a}^{b}f(t)g(t)\,dt\right)^{2}
\leq \int_{a}^{b}f(t)^{2}\,dt\int_{a}^{b}g(t)^{2}\,dt.\]

(iv) When do we have equality in the inequality proved
in~(iii).
\end{question}
\begin{question}$\negthickspace^{\star}$ Explain why\label{Q58}
\[\frac{1}{n+1}\leq\int_{n}^{n+1}\frac{1}{x}\,dx\leq\frac{1}{n}.\]
Hence or otherwise show that if we write
\[T_{n}=\sum_{r=1}^{n}\frac{1}{r}-\log n\]
we have $T_{n+1}\leq T_{n}$ for all $n\geq 1$.
Show also that $1\geq T_{n}\geq 0$. Deduce
that $T_{n}$ tends to a limit $\gamma$ (Euler's constant)
with $1\geq \gamma\geq 0$. [It is an indication of how little
we know about specific real numbers that, after three
centuries, we still do not know whether $\gamma$
is irrational. G.~H.~Hardy is said to have offered
his chair to anyone who could prove that $\gamma$
was transcendental.]

(ii) By considering $T_{2n}-T_{n}$, show that
\[1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+
\frac{1}{5}-\frac{1}{6}+\frac{1}{7}-\frac{1}{8}\dots=\log 2\]

(iii) By considering $T_{4n}-\frac{1}{2}T_{2n}-\frac{1}{2}T_{n}$,
show that
\[1+\frac{1}{3}-\frac{1}{2}+\frac{1}{5}+
\frac{1}{7}-\frac{1}{4}\dots=\frac{3}{2}\log 2\]

The famous example is due to Dirichlet. It gives a specific 
example where rearranging a non-absolutely convergent
sum changes its value.
\end{question}
\begin{question}
{\bf [Simple versions of Stirling's formula]\label{Q59}}
(The first part of this question
is in the probability course.)

(i) Prove that
\[\int_{1}^{n}\log x\, dx\leq \sum_{r=1}^{n}\log r\leq
\int_{1}^{n}\log x\, dx+\log n.\]
Compute $\int_{1}^{n}\log x\, dx$
and hence show that
\[\frac{1}{n}(n!)^{1/n}\rightarrow \frac{1}{e}\]
as $n\rightarrow\infty$.

(ii)$^{\star}$ Show that
\[\int_{n-1/2}^{n+1/2}\log x\, dx-\log n=
\int_{0}^{1/2}\log\left(1+\frac{t}{n}\right)
+\log\left(1-\frac{t}{n}\right)\,dt.\]
By using the mean value theorem, or otherwise, deduce that
\[\left|\int_{n-1/2}^{n+1/2}\log x\, dx-\log n\right|\leq
\frac{4}{3n^{2}}.\]
(You may replace $4/(3n^{2})$ by $An^{-2}$ with $A$ another constant,
if you wish.)
Deduce that
$\int_{1/2}^{N+1/2}\log x\, dx -\log N!$ converges to a limit.
Conclude that
\[\frac{n!}{(n+1/2)^{(n+1/2)}}e^{n}
\rightarrow C\]
as $n\rightarrow\infty$ for some constant $C$.

(iii)$^{\star}$ Find a function $f(n)$ not involving factorials
such that
\[f(n)\binom{2n}{n}\]
tends to a limit as $n\rightarrow\infty$. You should try for an
$f$ in as simple a form as possible. (But, of course, different people
may have different views on what simple means.)

(iv)$^{\star}$ Show that the result of (ii) implies the result of (i).
Give an example of a sequence $a_{n}$ such that
$a_{n}^{1/n}$ converges but $a_{n}$ does not.
\end{question}
\begin{question}\label{Q60}
(i) Show that 
$\sum_{n=27}^\infty \frac{1}{n\log n\log\log n}$
diverges. Find a value of $N$ such that
$\sum_{n=27}^{N} \frac{1}{n\log n\log\log n}\geq 3$.
Try and find its numerical value on your calculator.

(ii)$^{*}$ Given $a_{n}>0$ such that $\sum_{n=1}^{\infty}a_{n}$
diverges show that we can find $b_{n}>0$ such that
$b_{n}/a_{n}\rightarrow 0$ but $\sum_{n=1}^{\infty}b_{n}$
diverges. 

Given $a_{n}>0$ such that $\sum_{n=1}^{\infty}a_{n}$
converges show that we can find $b_{n}>0$ such that
$b_{n}/a_{n}\rightarrow \infty$ but $\sum_{n=1}^{\infty}b_{n}$
converges.

[These two results show that it is futile to look for
some sort of `supercharged ratio test' to decide the
convergence of all possible series.]
\end{question}
\begin{question}\label{Q61}

(i) By writing \[
r(r+1)\dots (r+m-1)=A_{m}\big(r(r+1)\dots (r+m)-(r-1)r\dots (r+m-1)\big),\]
where $A_{m}$ is to found explicitly, compute 
$\sum_{r=1}^{N}r(r+1)\dots (r+m-1)$. Deduce that
\[N^{-m-1}\sum_{r=1}^{N}r(r+1)\dots (r+m-1)\rightarrow\frac{1}{m+1}.\]

(ii) Show that
\[r(r+1)\dots (r+m-1)-r^{m}=P(r)\]
where $P$ is a polynomial of degree less than $m$.
Show using (i) and induction, or otherwise, that
\[N^{-m-1}\sum_{r=1}^{N}r^{m}\rightarrow\frac{1}{m+1}.\]

(iii) Use dissections of the form
\[{\mathcal D}=\{0,\ a/n,\ 2a/n,\ \dots,\ a\}\]
to compute
\[\int_{0}^{a}x^{m}\,dx\]
directly from the definition.

(iv) Use dissections of the form
\[{\mathcal D}=\{br^{n},\ br^{n-1},\ br^{n-2},\ \dots,\ b\}\]
with $0<r$ and $r^{n}=a/b$ to compute
\[\int_{a}^{b}x^{m}\,dx\]
directly from the definition.
\end{question}
\begin{question}$\negthickspace^{\star}$\label{Q62} 
If $A_{n}$ and $G_{n}$ are the arithmetic and geometric means of the
$n$ positive integers
\[n+1,\ n+2,\ldots,\ n+n\]
show that, as $n\rightarrow\infty$,
\[\frac{A_{n}}{n}\rightarrow\frac{3}{2}
\ \ {\rm and}\ \ \frac{G_{n}}{n}\rightarrow\frac{4}{e}.\]
Deduce that $e\geq 8/3$.
\end{question}

\begin{question}$\negthickspace^{\star}$\label{Dirichlet kernel} 
(i) Let\label{Q63}
\[v_{n}=\int_{n\pi}^{(n+1)\pi}\frac{\sin x}{x}\,dx.\]
By writing both integrals as integrals from $0$ to $\pi$,
or otherwise, show that $|v_{n}|\geq |v_{n+1}|$.
By using a theorem on the convergence of sums (to be
stated) show that the sequence
\[\int_{0}^{n\pi}\frac{\sin x}{x}\,dx\rightarrow L\]
as $n\rightarrow\infty$ \emph{through integer values of} $n$
where $L$ is a strictly positive
real number.

(ii) Deduce carefully that
\[\int_{0}^{X}\frac{\sin x}{x}\,dx\rightarrow L\]
as $X\rightarrow\infty$ \emph{through real values of} $X$.
Thus $\int_{0}^{\infty}\frac{\sin x}{x}\,dx$ exists
with value $L$.

(iii)$^{*}$ Let
\[G(\lambda)=\int_{0}^{\infty}\frac{\sin \lambda x}{x}\,dx.\]
Show carefully (we have not actually proved a change
of variables theorem for infinite integrals)
that $G(\lambda)$ exists for all real $\lambda$ and
\begin{equation*}
G(\lambda)=
\begin{cases}
L&\text{if $\lambda>0$}\\
0&\text{if $\lambda=0$}\\
-L&\text{if $\lambda<0$}
\end{cases}
\end{equation*}
\noindent [Note that $G$ is not continuous at $0$. This is an
indication of the unintuitive behaviour which infinite integrals
can exhibit.]
\end{question}
\begin{question}$\negthickspace^{\star}$\label{exercise, bounded variation}
(i) Suppose $f_{1},\, f_{2}:[a,b]\rightarrow{\mathbb R}$\label{Q64}
are increasing and $g=f_{1}-f_{2}$. Show that there
exists a $K$ such that, whenever 
\[a=x_{0}\leq x_{1}\leq x_{2}\leq\dots\leq x_{n}=b\]
we have
\[\sum_{j=1}^{n}|g(x_{j})-g(x_{j-1})|\leq K.\]

(ii) Let $g:[-1,1]\rightarrow{\mathbb R}$ be given by
$g(x)=x^{2}\sin x^{-4}$ for $x\neq 0$, $g(0)=0$.
Show that $g$ is once differentiable everywhere 
but that $g$ is not the difference of two increasing
functions.
\end{question}
\begin{center}
{\bf Final Note To Supervisors}
\end{center}
Let me reiterate my request for corrections and improvements
\emph{particularly to the exercises}. The easiest
path for me is e-mail. My e-mail address is \verb+twk@dpmms+.

\end{document}


