## Cauchy sequences A sequence $\\{a_n\\}\_{n=1}^\infty$ is *Cauchy* if for all $\varepsilon>0$, $\exists k\in\mathbb N$ such that $m,n>k \implies$ $\lvert a_n-a_m \rvert < \varepsilon$. Informally, we think of a sequence being Cauchy meaning "the terms of the sequence get closer and closer to one another". But we need a more precise understanding for this course. Note: there is no concept of limit in this definition (yet!). --- ## Cauchy sequences #### Definition A sequence $\\{a_n\\}\_{n=1}^\infty$ is *Cauchy* if
for all $\varepsilon>0$
,
$\exists k\in\mathbb N$ such that
$m,n>k \implies$
$\lvert a_n-a_m \rvert < \varepsilon$
. #### Or, in words,
No matter how small we pick $\varepsilon>0$
,
we can always go far enough (ie. $k$ far) down the sequence to ensure that
every term after that point (ie. after $k$)
,
is within $\varepsilon$ of every other term
. #### How to prove Cauchyness Construct a machine (a function) that
tells you $k$
for any given $\varepsilon$
, and that $k$
d
o
e
s
t
h
e
j
o
b
. --- ## Proof of Cauchyness: example 1 #### Theorem Let $a_1=4$ and $a_2=14$, with $a_n = (a\_{n-1}+a\_{n-2})/2$. Then $\\{a_n\\}\_{n=1}^\infty$ is Cauchy. #### Definition A sequence $\\{a_n\\}\_{n=1}^\infty$ is *Cauchy* if
for all $\varepsilon>0$
,
$\exists k\in\mathbb N$ such that
$m,n>k \implies$
$\lvert a_n-a_m \rvert < \varepsilon$
. #### How to prove Cauchyness Construct a machine (a function) that
tells you $k$
for any given $\varepsilon$
, and that $k$
d
o
e
s
t
h
e
j
o
b
. #### Proof For all $n\geq2$, $\lvert a\_{n+1}-a_n\rvert=\frac12\lvert a_n-a\_{n-1}\rvert$, so $\lvert a\_{n+1}-a_n\rvert=2\^{-(n-1)}\lvert a_2-a_1\rvert$. But also $a_1 < a_3 \< a_5 < \ldots < a_6 < a_4 < a_2$. Fix
any $\varepsilon>0$
.
Let $k=\lceil-\log_2(\frac\varepsilon{10})\rceil$
.
If $m,n>k$, then
, we can assume $m\geq n$, so
$\lvert a_m - a_n \rvert$
$\leq \lvert a\_{n+1}-a_n \rvert = 2\^{-(n-1)}\lvert a_2-a_1\rvert$
$<$
$2\^{-k}\times10 = 2\^{-\lceil-\log_2(\frac\varepsilon{10})\rceil}\times10 \leqslant 2\^{\log_2(\frac\varepsilon{10})}\times10 =$
$\varepsilon$
. □ Note: We can't use monotone convergence here, because the sequence is neither increasing nor decreasing. It has increasing and decreasing subsequences (even and odd indexed terms) but the whole sequence is neither. --- ## Proof of Cauchyness: example 2 #### Theorem Let $a_n=\sum\_{k=1}^n \frac1k$. Then $\\{a_n\\}\_{n=1}^\infty$ is not Cauchy. #### Definition A sequence $\\{a_n\\}\_{n=1}^\infty$ is *Cauchy* if
for all $\varepsilon>0$
,
$\exists k\in\mathbb N$ such that
$m,n>k \implies$
$\lvert a_n-a_m \rvert < \varepsilon$
. Therefore: A sequence $\\{a_n\\}\_{n=1}^\infty$ is **not** Cauchy if
there exists $\varepsilon>0$ such that
,
$\forall k\in\mathbb N$
,
$m,n>k \\;\not\nobreak\\!\\!\\!\\!\implies$
$\lvert a_n-a_m \rvert < \varepsilon$
. #### How to prove not Cauchyness Pick an $\varepsilon$ as small as you need. Then construct a machine that
tells you $m,n$
for any given $k$
, with
$m,n>k$, yet
$\lvert a_n-a_m \rvert>\varepsilon$
. --- ## Proof of Cauchyness: example 2 #### Theorem Let $ a_n=\sum\_{k=1}^n \frac1k$. Then $\\{a_n\\}\_{n=1}^\infty$ is not Cauchy. #### Definition A sequence $\\{a_n\\}\_{n=1}^\infty$ is **not** Cauchy if
there exists $\varepsilon>0$ such that
,
$\forall k\in\mathbb N$
,
$m,n>k \\;\not\nobreak\\!\\!\\!\\!\implies$
$\lvert a_n-a_m \rvert < \varepsilon$
. #### How to prove not Cauchyness Pick an $\varepsilon$ as small as you need. Then construct a machine that
tells you $m,n$
for any given $k$
, with
$m,n>k$, yet
$\lvert a_n-a_m \rvert>\varepsilon$
. #### Proof
Let $\varepsilon=\frac12$
.
For any $k\in\mathbb N$
,
let $n>k$ and $m=2n>k$
. Then
$\lvert a_m - a_n \rvert$
$= \frac1{n+1}+\frac1{n+2}+\ldots+\frac1{2n}$
$>$
$\frac n{2n} = $
$\varepsilon$
. □ --- ## Why do we care about Cauchyness? #### Theorem Every Cauchy sequence is convergent, and every convergent sequence is Cauchy. #### Proof See lecture notes. #### Application We can prove a sequence is convergent by (often easier) showing it is Cauchy. We can prove a sequence is divergent by (often easier) showing it is not Cauchy. #### Examples The sequence $\\{a_n\\}\_{n=1}^\infty$ given by $a_1=4$ and $a_2=14$, with $a_n = (a\_{n-1}+a\_{n-2})/2$ for $n>2$ is convergent. The sequence $\\{s_n\\}\_{n=1}^\infty$ given by $s_n=\sum\_{k=1}^n \frac1k$ is divergent. --- ## Infinite series We want to generalise the concept of $\displaystyle \sum\_{k=1}^n a_k$ to give meaning to $\displaystyle \sum\_{k=1}^\infty a_k$. Define by $\displaystyle \sum\_{k=1}^\infty a_k = \lim_{n\to\infty} \sum\_{k=1}^n a_k$. So the *partial sums* $s_n = \displaystyle \sum\_{k=1}^n a_k$ are important, because $\displaystyle \sum\_{k=1}^\infty a_k = \lim_{n\to\infty} s_n$. #### Definition An infinite series is *convergent*/*divergent* if $\\{s_n\\}\_{n=1}^\infty$ is *convergent*/*divergent*. #### Example $\displaystyle \sum\_{k=1}^\infty \frac1k$ is divergent, by earlier example. --- ## Example of convergent infinite series In $\displaystyle \sum\_{k=1}^\infty \frac1{k(k+1)}$, the terms in the sum are $\displaystyle \frac1{k(k+1)} = \frac1k-\frac1{k+1}$. The partial sums are $s_n = \left[ \frac11-\frac12 \right] + \left[ \frac12-\frac13 \right] + \ldots + \left[ \frac1n-\frac1{n+1} \right] = 1 - \frac1{n+1} \to 1$ as $n\to\infty$. So $\displaystyle \sum\_{k=1}^\infty \frac1{k(k+1)}=1$. --- ## Telescoping sum calculation $s_n = \left[ \frac11-\frac12 \right] + \left[ \frac12-\frac13 \right] + \ldots + \left[ \frac1n-\frac1{n+1} \right] = 1 - \frac1{n+1} \to 1$ as $n\to\infty$. Here we used the cancellation \\[\begin{alignedat}{8} &\tfrac11 & &- \tfrac12 \\\\ & & &+ \tfrac12 & & - \tfrac13 \\\\ & & & & &+ \tfrac13 & & - \tfrac14 \\\\ & & & & & & & & \hspace{1em}\vdots\hspace{1em} \\\\ & & & & & & & & & &+ \tfrac1{n-1} & & - \tfrac1n \\\\ & & & & & & & & & & & &+ \tfrac1{n} & & - \tfrac1{n+1} = \tfrac11 - \tfrac1{n+1}. \end{alignedat}\\] --- ## Telescoping sum calculation $2s_n = \left[ \frac11-\frac13 \right] + \left[ \frac12-\frac14 \right] + \ldots + \left[ \frac1n-\frac1{n+2} \right] = 1+\tfrac12 -\frac1{n+1} -\frac1{n+2} \to 1$ as $n\to\infty$. Here we used the cancellation \\[\begin{alignedat}{14} &\tfrac11 & & & &- \tfrac13 \\\\ & & &+ \tfrac12 & & & & - \tfrac14 \\\\ & & & & &+ \tfrac13 & & & & - \tfrac15 \\\\ & & & & & & &+ \tfrac14 & & & & - \tfrac16 \\\\ & & & & & & & & & & & & \hspace{1em}\vdots\hspace{1em} \\\\ & & & & & & & & & & & & & &+ \tfrac1{n-1} & & & & - \tfrac1{n+1} \\\\ & & & & & & & & & & & & & & & &+ \tfrac1{n} & & & & - \tfrac1{n+2} = \tfrac11+\tfrac12 - \tfrac1{n+1} - \tfrac1{n+2}. \end{alignedat}\\] So $\sum\_{k=1}^\infty \frac1{k(k+2)}=\frac12\sum\_{k=1}^\infty \frac2{k(k+2)}=\frac12\sum\_{k=1}^\infty \left[\frac1k-\frac1{k+2}\right]=\frac12\times\frac32=\frac34$. --- ## Telescoping series In the same way, we can show that, for any $p>0$, the series $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+p)}$ converges, and calculate its limit. --- ## Telescoping series In the same way, we can show that, for any $p>0$, the series $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+p)}$ converges, and calculate its limit. Or can we? --- ## Telescoping series In the same way, we can show that, for any $p>0$, the series $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+p)}$ converges, and calculate its limit. Or can we? Not if $p\notin\mathbb N$. For example, try to make the telescoping sum argument for $p=\frac32$. --- ## Telescoping series In the same way, we can show that, for any $p>0$, the series $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+p)}$ converges, and calculate its limit. Or can we? Not if $p\notin\mathbb N$. For example, try to make the telescoping sum argument for $p=\frac32$. You never get the cancellation, because the terms are "missing" each other. Let's try another approach. --- ## Comparison of series We know $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+1)}=\sum\_{k=1}^\infty a_k$ converges. Try $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)} = \sum\_{k=1}^\infty b_k$. Here $0 \leqslant b_k \leqslant a_k$ so we are summing smaller things. So $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)}$ must also converge. And we could replace $2$ with any real $p>1$. --- ## Comparison of series We know $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+1)}=\sum\_{k=1}^\infty a_k$ converges. Try $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)} = \sum\_{k=1}^\infty b_k$. Here $0 \leqslant b_k \leqslant a_k$ so we are summing smaller things. So $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)}$ must also converge. And we could replace $2$ with any real $p>1$. #### Theorem (Comparison test) If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty a_k$ converges, then so too does $\displaystyle\sum\_{k=1}^\infty b_k$. --- ## Comparison of series We know $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+1)}=\sum\_{k=1}^\infty a_k$ converges. Try $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)} = \sum\_{k=1}^\infty b_k$. Here $0 \leqslant b_k \leqslant a_k$ so we are summing smaller things. So $\displaystyle\sum\_{k=1}^\infty \frac1{k(k+2)}$ must also converge. And we could replace $2$ with any real $p>1$. #### Theorem (Comparison test) If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty a_k$ converges, then so too does $\displaystyle\sum\_{k=1}^\infty b_k$. #### Corollary If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty b_k$ diverges, then so too does $\displaystyle\sum\_{k=1}^\infty a_k$. --- ## Comparison test #### Theorem (Comparison test) If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty a_k$ converges, then so too does $\displaystyle\sum\_{k=1}^\infty b_k$. #### Example $\sum\_{k=1}^\infty \frac1{k^2}$ converges. #### Idea Want to use comparison with $\sum\_{k=1}^\infty \frac1{k(k+1)}$. But can't because $0 \leqslant \frac1{k^2} \leqslant \frac1{k(k+1)}$ is false! #### Proof $\sum\_{k=1}^\infty \frac1{k^2} = \frac11 + \sum\_{k=2}^\infty \frac1{k^2} = \frac11 + \sum\_{k=1}^\infty \frac1{(k+1)^2}$. But $0 \leqslant \frac1{(k+1)^2} \leqslant \frac1{k(k+1)}$ and $\sum\_{k=1}^\infty \frac1{k(k+1)}$ converges. Therefore, by the comparison test, so too does $\sum\_{k=1}^\infty \frac1{(k+1)^2}$. Hence $\sum\_{k=1}^\infty \frac1{k^2}$ converges. □ --- ## Comparison test #### Theorem (Comparison test) If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty a_k$ converges, then so too does $\displaystyle\sum\_{k=1}^\infty b_k$. #### Example $\displaystyle \sum\_{k=1}^\infty \frac1{k^t}$ converges for all $t\geq2$ and diverges for all $t\leq1$. --- ## Comparison test #### Theorem (Comparison test) If, for all $k\in\mathbb N$, $0 \leqslant b_k \leqslant a_k$, and $\displaystyle\sum\_{k=1}^\infty a_k$ converges, then so too does $\displaystyle\sum\_{k=1}^\infty b_k$. #### Example $\displaystyle \sum\_{k=1}^\infty \frac1{k^t}$ converges for all $t\geq2$ and diverges for all $t\leq1$. This follows by comparison with $\displaystyle\sum\_{k=1}^\infty \frac1{k^2}$ and $\displaystyle\sum\_{k=1}^\infty \frac1k$. We still don't know about $1
--- ## Absolute convergence #### Definition If $\sum\_{n=1}^\infty \lvert a_n \rvert$ converges, then the series $\sum\_{n=1}^\infty a_n$ is said to be *absolutely convergent*. #### Theorem If, a series is absolutely convergent, then it is convergent #### Example Because $\sum\_{n=1}^\infty \frac1{n^3}$ converges, $\sum\_{n=1}^\infty \frac{(-1)^n}{n^3}$ is absolutely convergent, hence also converges. #### Example Which of $\sum\_{n=1}^\infty \frac{(-1)^n}{n},\\; \sum\_{n=1}^\infty \frac{n+3}{2-3n-2n^2},\\; \sum\_{n=1}^\infty \frac{500\sin(\pi n/2)}{n^2},\\; \sum\_{n=1}^\infty \frac{(-1)^n\times3}{n-5\pi},\\; \sum\_{n=1}^\infty \frac{(-1)^nn^2}{n+100}$ can you tell are are absolutely convergent, convergent, or divergent? --- ## Absolute convergence #### Definition If $\sum\_{n=1}^\infty \lvert a_n \rvert$ converges, then the series $\sum\_{n=1}^\infty a_n$ is said to be *absolutely convergent*. #### Theorem If, a series is absolutely convergent, then it is convergent #### Example Because $\sum\_{n=1}^\infty \frac1{n^3}$ converges, $\sum\_{n=1}^\infty \frac{(-1)^n}{n^3}$ is absolutely convergent, hence also converges. #### Example The series $\sum\_{n=1}^\infty \frac{(-1)\^{n+1}}{n}$ is not absolutely convergent, but it is convergent. A series which is convergent but not absolutely convergent is called *conditionally convergent*. A conditionally convergent series will converge to different values if you reorder its terms. --- ## Conditional convergence #### Example The series $S = 1-1+\frac12-\frac12+\frac13-\frac13+\frac14-\frac14+\ldots$ is not absolutely convergent, but it is convergent. A series which is convergent but not absolutely convergent is called *conditionally convergent*. A conditionally convergent series will converge to different values if you reorder its terms. Indeed $S=0$. But, if we could reorder the terms without changing $S$, then take two positive terms before each negative term to get $S = 1+\frac12-1+\frac13+\frac14-\frac12+\ldots$ $S = 1-\frac12+\frac13-\frac14+\ldots = \log(2) = \sum\_{n=1}^\infty \frac{(-1)\^{n+1}}{n}$, as we shall prove later. --- ## Ratio test #### Example $\sum\_{n=1}^\infty \frac{1}{2^n}$ converges. #### Proof The sequence of partial sums is $s_n = \frac12+\frac14+ \ldots+ \frac1{2^n}=\frac{1-(\frac12)^n}{1-\frac12} - 1 \to \frac1{1/2}-1=1$, as $n\to\infty$. □ --- ## Ratio test #### Example $\sum\_{n=1}^\infty \frac{1}{2^n}$ converges. #### Proof The sequence of partial sums is $s_n = \frac12+\frac14+ \ldots+ \frac1{2^n}=\frac{1-(\frac12)^n}{1-\frac12} - 1 \to \frac1{1/2}-1=1$, as $n\to\infty$. □ Here the ratio between consecutive terms is $\frac12$ and $0<\frac12<1$. The same argument would work for convergence of $\sum\_{n=1}^\infty r^n$ with any $r\in(-1,1)$. --- ## Ratio test #### Example $\sum\_{n=1}^\infty \frac{1}{2^n}$ converges. #### Proof The sequence of partial sums is $s_n = \frac12+\frac14+ \ldots+ \frac1{2^n}=\frac{1-(\frac12)^n}{1-\frac12} - 1 \to \frac1{1/2}-1=1$, as $n\to\infty$. □ Here the ratio between consecutive terms is $\frac12$ and $0<\frac12<1$. The same argument would work for convergence of $\sum\_{n=1}^\infty r^n$ with any $r\in(-1,1)$. But we can do better. #### Theorem The series $\sum\_{n=1}^\infty a_n$ with $\lim\_{n\to\infty} \left\lvert\frac{a\_{n+1}}{a_n}\right\rvert = \ell$ converges if $\ell<1$, but diverges if $\ell>1$. --- ## Ratio test #### Theorem The series $\sum\_{n=1}^\infty a_n$ with $\lim\_{n\to\infty} \left\lvert\frac{a\_{n+1}}{a_n}\right\rvert = \ell$ converges if $\ell<1$, but diverges if $\ell>1$. #### Examples $\sum\_{n=1}^\infty \frac1{3^n}$ converges, but $\sum\_{n=1}^\infty 2^n$ diverges. --- ## Ratio test #### Theorem The series $\sum\_{n=1}^\infty a_n$ with $\lim\_{n\to\infty} \left\lvert\frac{a\_{n+1}}{a_n}\right\rvert = \ell$ converges if $\ell<1$, but diverges if $\ell>1$. #### Examples $\sum\_{n=1}^\infty \frac1{3^n}$ converges, but $\sum\_{n=1}^\infty 2^n$ diverges. #### Examples Using the ratio test, and possibly some other tests, decide convergence of: $\sum\_{n=1}^\infty \frac{2^n}{3^n},\\; \sum\_{n=1}^\infty \frac{1}{n\sqrt n},\\; \sum\_{n=1}^\infty n\^{100}(\frac9{10})^n,\\; \sum\_{n=1}^\infty \frac{n\^{100}}{(\frac9{10})^n},\\; \sum\_{n=1}^\infty \frac{2^n + n^5}{n\sin(n) + 3^n},\\; \sum\_{n=1}^\infty \frac{2^n + 4n}{5 - 2^n}$ --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. | $x$ | \| | $2$ | $4$ | $6$ | $8$ | $10$ | $12$ | |-----|-|----|-----|-----|---|----|----| | $f(x)$ | \| | $13$ | $\pi$ | $\frac12$ | $1$ | $1$ | $3$ | --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x$ if $x$ is an integer, and $f(x) = t$ such that $t$ is the number of pixels used to render the letter $x$ in this font, if $x$ is not an integer. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ Most of our functions will be defined by formulae. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. If $x$ is fixed, then $f(x)$ is fixed. $f$ is the function, $f(x)$ means "the function $f$ evaluated at the input $x$" means "the output of $f$ which corresponds to the input $x$". --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. But different inputs could give the same output. #### Example $f:\mathbb R\to\mathbb R$ defined by $f(x) = x^2$ has $f(-x)=f(x)$ for all $x$, so $f$ is not injective. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. --- ## Functions: injectivity and surjectivity A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. --- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. #### Examples Which of the following are injective, surjective, bijective on domain $\mathbb R$ and codomain $\mathbb R$? $f(x) = x^3, \\;\\; g(x) = x^3-x, \\;\\; h(x) = \frac1{\lvert x \rvert +1}, \\;\\; p(x) = \sin(x)$, $q(x) = 5, \\;\\; r(x) = x+\lceil x \rceil$. (How) can you restrict their domains and codomains to make them bijective?