\documentclass[11pt,a4paper,twoside]{article}
\renewcommand\familydefault{iwona}\selectfont
 \renewcommand\sldefault{it}
\newcommand{\exofont}{}
\usepackage{a4wide,theorem,amsmath,amssymb,graphicx,tikz,textcomp}
\usepackage{ifthen}
\newboolean{proofs}
%\setboolean{proofs}{true}
\setboolean{proofs}{false}
\newcommand{\tproof}[1]%teacher proof
{\ifthenelse{\boolean{proofs}}{

\medskip
\hfill\fbox{\fbox{\begin{minipage}{0.9\linewidth}
{
\normalfont
#1
}\end{minipage}}}

\medskip
}{}
}
\newcommand{\mypage}
{\null
\textbf{}

\ifthenelse{\isodd{\thepage}}{\newpage

\null
\newpage

} {\newpage}}

\usepackage{makeidx}
\makeindex
\usepackage{fancyhdr,multicol}
\usepackage[T1]{fontenc}
\usepackage{hyperref} 
\hypersetup{colorlinks=true,linkcolor=black} 
\headheight=16pt
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\footskip}{60pt}
%---------------------------------------------------------
\theoremstyle{break}
\newtheorem{Theo}{Theorem}
\newtheorem{Def}{Definition}
\newtheorem{Regle}{Rule}
\newtheorem{ax}{Axiom}
%------------------------------------------------------------
\newcommand{\axiom}[2]{%
   \par
    \bigskip
    \begin{center}
\noindent\fbox{\begin{minipage}{0.9\textwidth}%
    \begin{ax}[#1]%
    #2%
    \end{ax}           
    \end{minipage}} 
                         \end{center}
    \par
    \bigskip
}
%------------------------------------------------------------
\newcommand{\definition}[1]{%
   \par
    \bigskip    
\noindent\begin{minipage}{\textwidth}%
    \begin{Def}%
    #1%
    \end{Def}%
    \end{minipage}
    \par
    \bigskip
}
%------------------------------------------------------------
\newcommand{\Definition}[2]{%
   \par
    \bigskip
    \noindent\begin{minipage}{\textwidth}%
    \begin{Def}[#1]%
    #2%
    \end{Def}
    \end{minipage}
    \par
    \bigskip
}
%-------------------------------------------
\newcommand{\theorem}[1]{%
    \par
    \bigskip	
   \noindent\begin{minipage}{\textwidth}%
   \par
    \begin{Theo}%
    #1%
    \end{Theo}
    \end{minipage}
    \par
    \bigskip
}
%------------------------------------------------------------
\newcommand{\Theorem}[2]{%
    \par
    \bigskip
    \noindent\begin{minipage}{\textwidth}%
    \par
    \begin{Theo}[#1]%
    #2%
    \end{Theo}
    \end{minipage}
    \par
    \bigskip
}
%------------------------------------------------------------
\newcommand{\remark}[1]{%
    
    \bigskip
    \noindent\textbf{Remark:} #1%
    \par
}
%-------------------------------------------------------
\newcommand{\example}[1]{%
    
   \bigskip
   \noindent\textbf{Example:} #1%
   \par
}
%------------------------------------------------------------
\newcommand{\qed}{%
   ~\hfill\fbox{\null}%\ensuremath{\square}
   \par
   \bigskip
}
%------------------------------------------------------------
\newcommand\bonnecoupe{\addpenalty{-500}}%
\newcommand\pasdecesure{\addpenalty{10000}}
\newcounter{exxo}
\setcounter{exxo}{0}
\newcommand{\exo}[1]{%
   \refstepcounter{exxo}
   \par\medskip{\exofont
   \bonnecoupe
   \noindent
   \textbf{Exercise \theexxo} 
    \par
    \pasdecesure
   #1%
   \par
   \hfill\hrulefill\hfill\null}%\deffont
   \medskip
}

\newcounter{pract}
\setcounter{pract}{0}
\newcommand{\Pract}[2]{%
   \refstepcounter{pract}%\label{#1}
   \par\bigskip
   \bonnecoupe
   \noindent
   \textbf{Practice exercise \thepract\label{#1}} \quad Answer page \pageref{{sol#1}}
    \par
    \pasdecesure
   #2%
   \par
   \medskip
}
\newcommand{\sol}[2]{%
     \par
    \bonnecoupe
    \bigskip\noindent{\textbf{Answers to practice exercice \ref{#1}}, page \pageref{#1}} \label{{sol#1}}
    \par
    \pasdecesure
    #2%
    \par
%     \vspace{1\baselineskip}
}
%------------------------------------------------------------
%------------------------------------------------------------
\renewcommand\labelenumi{(\theenumi)}
\renewcommand\labelenumii{(\theenumii)}
\newcommand{\ds}{\displaystyle}
\newcommand{\sgn}{\text{sgn}}
\newcommand{\simep}{\overset{\scriptscriptstyle{+}}{~\simeq}}
\newcommand{\caution}{{\LARGE \fbox{\textbf{!}}} }
%============================================================
%
%
%
%============================================================


\begin{document}
\pagestyle{fancy}\thispagestyle{empty}
\null

\vfill
\begin{center}
\begin{Huge}\textbf{Sequences and Series} \end{Huge}
\end{center}

\vfill
\tproof{{\Huge This version has proofs and comments for the teacher}

These come in frames like this one, and for this reason, the page numbers are not the same as on the student handout version.

\textit{The proofs given must not be understood as ``the'' proofs, but as the ones which over the years, I feel most comfortable with. When a theorem does not need anything specific to ultracalculus, the proof is omitted.}
}
\vfill

\hfill Coll\`ege Andr\'e-Chavanne

\hfill Gen\`eve


\vfill


\mypage
\section{Infinite sums}

The question is: can an unending sum give a result? Does
\[\sum_{k=0}^\infty \frac{1}{2^k}\]have a meaning?



\begin{center}
\begin{tikzpicture}
\draw (0,0) rectangle (8,8);
\draw (4,0)--(4,8);
\draw(2,4)node{$\frac{1}{2}$};
\draw (4,4)--(8,4);
\draw(6,2)node{$\frac{1}{4}$};
\draw (6,8)--(6,4);
\draw(5,6)node{$\frac{1}{8}$};
\draw (6,6)--(8,6);
\draw(7,5)node{$\frac{1}{16}$};
\draw (7,8)--(7,6);
\draw(6.5,7)node{$\frac{1}{32}$};
\draw (7,7)--(8,7);
\draw(7.5,6.5)node{$\frac{1}{64}$};
\draw(7.5,7.5)node{\dots};
\end{tikzpicture}
\end{center}


\exo{
Is it correct to write
\[x=\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}\dots=\frac{1}{2}+\frac{1}{2}\cdot\left(\frac{1}{4}+\frac{1}{8}+\frac{1}{16}\dots\right)=\frac{1}{2}+\frac{1}{2}\cdot x\]
hence $x=\frac{1}{2}+\frac{1}{2}x$ and therefore $x=1$?
}

\exo{
Using the same method as above, calculate:
\[x=1+2+4+8+16+\dots
\]
}

\bigskip
The question is: what went wrong? In order to answer this sort of question, we will first study another type of unending process.

\tproof{This exercise is not a joke! The method of fiddling around to find the fraction equal to, say, $0.\overline{28}$ as seen in middle school does exactly this and is terribly wrong. Closing a parenthesis \textit{after} infinitely many numbers is impossible unless we define what we mean. And the only definition I know of is that a series is equal to its limits \textit{if the limit exists!} It is possible to define the closing parenthesis as ``the limit if it exists'' but the whole point of this chapter is to make students aware of the whole concept. So I start by assuming that nothing works until defined and proven\dots}

\newpage
\section{Sequences}
\definition{A \textbf{sequence} is a function \
$$u : \{ k, k+1, \dots \} \subseteq \mathbb{N} \longrightarrow \mathbb{R},\quad\text{with } k\in\mathbb{N}.$$ }
\index{sequence}\index{sequence}

We also use the notation:
$$(u_n)_{n \geq k}$$
for the sequence above, with $u_n = u(n)$, for $n \geq 0$. We also
write  $(u_n)$ if the set of indices is obvious or irrelevant. The
numbers $u_n$ are called the \textbf{terms} of the sequence.

The context of a sequence is the list of parameters used in its definition, in particular it contains the integer $k$ -- but not $n$ which is a variable.

A finite sequence can be given by enumeration:
\[1, 2, 3, 4, 5\]

If the rule for obtaining the elements is obvious, dots will be used:
\[1, 2, 3, \dots , 20, 21, 22\]

If the sequence is infinite, the enumeration is impossible, but if the
rule is obvious, dots will be used to indicate the never ending
succession:
\[1, 2, 3, 4, 5, \dots\]

Sets are noted with braces $\{...\}$ If the general term of the
sequence can be represented by $a_n$ the notation $\{a_n\}_n$ is be
used.

The first and last elements of a sequence will be indicated by
superscripts and subscripts:
\[\ds\left(a_n\right)_{n=1}^{20}\]
is the notation for the sequence $a_1, a_2 \dots a_{19}, a_{20}$

%============================================================
\bigskip
\exo{Find $(a_n)_n$ for the sequence of all natural numbers}

For non ending sequences, the symbol $(a_n)_1^\infty$ can be used
to indicate that its number of terms exceeds all finite terms.
(\footnote{The $\infty$ sign expresses the idea of an unending
process. This symbol does \underline{not} represent a number, not even
an ultralarge number. It means ``never ending''})



\Definition{Explicit Relation}{
An explicit relation expresses the $k$th term as a function of $k$.
}

\exo{
Write the first terms of the following sequence:
\[\left(\frac{1}{n} \right)_1^\infty\]}

\exo{
Write down the first five terms of the sequences specified by their
$n$th terms (in each case, $n\in\mathbb{N}$)
\begin{multicols}{2}
\begin{enumerate}
\item$u_n=4n$
\item $t_n=2^{n-1}$
\item $a_n=3n-2$
\item $b_n=2n^2-1$
\item $r_n=(-1)^n$
\item $e_n=(-1)^n\dfrac{n^2}{n+1}$
\end{enumerate}
\end{multicols}}



\Definition{Convergence}{Let $(u_n)_{n \geq k}$ be a sequence. We say that $(u_n)_{n\geq k}$ \textbf{converges} if $\ds\lim_{n \rightarrow \infty} u_n$ exists i.e., if there is an $L \in \mathbb{R}$ such that
\[\lim_{n \rightarrow \infty} u_n = L. \]

or (explicitly)

$(u_n)_{n\geq k}$ \textbf{converges} if there is an observable $L\in\mathbb{R}$ such that for all ultralarge $N$
\[u_N\simeq L.\]

The number $L$ is the \textbf{limit} of the sequence. 
}\index{sequence!convergence}\index{convergence
of a sequence}

\Definition{Non convergence}{\index{non convergence}\index{oscillating}\index{periodic} 
A \textbf{non-convergent} sequence  may be 
\begin{itemize}
\item \textbf{divergent} (the terms eventually get ultralarge), 

\item \textbf{bounded}

\end{itemize}
}


\caution If a sequence has a limit,  it does not necessarily ``reach'' its
limit. It may or may not have terms equal to its limit.

\exo{

\begin{enumerate}
 \item Find the limit of $\left(\frac{1}{n}\right)_n$ 
\item Find the limit of $\left(\frac{n}{n+1}\right)_n$ 
\end{enumerate}
}


\Definition{Recurrence Relation}{\index{recurrence relation}
A \textbf{recurrence relation} expresses the $k$th element of a
sequence in terms of one or more of its predecessors.

In order to know where the sequence begins, it is necessary to state
the value of the first term of the sequence.
\footnote{Recall the conditions for an induction proof.}
}

\exo{
Write the first terms of the sequences:
\begin{enumerate}
\item $u_1=1 \quad u_k=\dfrac{u_{k-1}}{k+1}$
\item $u_1=1 \quad u_n=2\cdot u_{n-1}$
\item $u_1=2 \quad u_i=3+2u_{i-1}$
\end{enumerate}

If possible, rewrite them in explicit form. Why do you need an induction proof?
}

\exo{
Consider

$u_1=5$

$u_n=\begin{cases}
\dfrac{u_{n-1}}{2} & \text{ if $u_{n-1}$ is even}
\\
3\cdot u_{n-1}+1 & \text{ if $u_{n-1}$ is odd}
\end{cases}$

\medskip
Use other values for $u_1$ and try to see the behaviour of this strange sequence. (The fact that it ends in the same way for any initial value is the Syracusa conjecture.) 
}

A \textbf{Graph} of a sequence helps to see how it behaves. Joining
the plotted dots by a dotted line (because the domain is defined on
natural numbers, the plot will be discrete points)

The sequence $\{1, -1/2, 1/3, -1/4, 1/5, -1/6, 1/7, -1/8, \}$ is plotted below:

\begin{center}
\begin{tikzpicture}
\draw[-latex](0,-1)--(0,1);
\draw[-latex](0,0)--(10,0);
\draw[dashed](1,1)--(2,-1/2)--(3,1/3)--(4,-1/4)--(5,1/5)--(6,-1/6)--(7,1/7)--(8,-1/8);
\draw(1,1)circle(0.05)(2,-1/2)circle(0.05)(3,1/3)circle(0.05)(4,-1/4)circle(0.05)(5,1/5)circle(0.05)(6,-1/6)circle(0.05)(7,1/7)circle(0.05)(8,-1/8)circle(0.05);
\end{tikzpicture}
\end{center}

\exo{
Give the first terms of the following sequences:
\begin{enumerate}
\item $u_1=5 \quad u_n=1+\dfrac{u_{n-1}}{10}$ 

\item $u_1=0 \quad u_n=\dfrac{1}{5-u_{n-1}}$
\end{enumerate}

If possible, rewrite them in explicit form.
}

\exo{
Write the first terms of the following sequences:
\begin{enumerate}
\item $u_1=0 \quad u_2=1 \quad u_r=2u_{r-1}-u_{r-2}$
\item $u_1=1 \quad u_2=3 \quad u_k=3u_{k-1}-2u_{k-2}$
\end{enumerate}
}


\exo{\label{Efibonacci} One of the most famous sequences: The
Fibonacci sequence.\index{Fibonacci}
\footnote{ Fibonacci was an Italian mathematician
in the XIIth century; it was he who introduced Arab-Indian numerals
into Europe.}

\[u_1=0 \quad u_2=1 \quad u_n=u_{n-1}+u_{n-2}\]

\begin{enumerate}
\item 
Write the first terms (at least ten) of the sequence and describe the
behaviour of the sequence.

\item
Make a new sequence $v_k$ with the following rule (with $u_n$ the
sequence just calculated), sketch the first terms and describe the behaviour.

$v_1=\dfrac{u_2}{u_1} \quad v_2=\dfrac{u_3}{u_2} \quad
v_3=\dfrac{u_4}{u_3} \quad v_n=\dfrac{u_{n+1}}{u_n}$

\item
Use the same rule as in the beginning, but start with any two numbers
for $u_1$ and $u_2$ (even with $u_2>u_1$) and calculate the second
sequence $v_n$ made from these terms and sketch the first
terms. Describe the behaviour.

\item 
Write the first terms of the sequence:
$w_1=1 \quad w_n=1+\frac{1}{w_{n-1}}$
Describe the behaviour of the sequence.


\end{enumerate}
}



\example{Let $a$ and $d$ be two real numbers and let $k$ be a
positive integer. We define an \textbf{arithmetic progression }
(with \textbf{common difference} $d$) as follows:
$$u_k=a \ \text{ and }\ u_{n+1}=u_n+d \ \text{ for }\ n\geq k.$$
It is immediate that $u_n= a+(n-k)\cdot d$, for all $n>k$. The
context of this sequence is given by $a,d,k$.}
\index{sequence!arithmetic}\index{arithmetic progression}

\example{In a similar way, given $a,r\in\mathbb{R}$ and
$k\in\mathbb{N}$, we define a \textbf{geometric progression} (with
\textbf{common ratio} $r$) by
$$u_k=a\ \text{ and }\ u_{n+1}=u_n\cdot r\ \text{ for all }\ n>k.$$
Then $u_n=a\cdot r^{n-k}$ for all $n<k$. A context of this
sequence is given by $a,r,k$.}
\index{sequence!geometric}\index{geometric progression}
%=====================================================

\exo{What are the conditions for an arithmetic sequence to converge?

What are the conditions for a geometric sequence to converge?}



\exo{
Describe the behaviour of the following sequences:
\begin{enumerate}
\item $\left((-1)^n\right)_n$
\item $u_1=1 \quad u_{n+1}=1-\dfrac{1}{1+u_n}$
\item $\left(\cos\left(n\frac{\pi}{3}\right)\right)_n$ 
\item $\left(\text{random numbers between -1 and 1}\right)$
\item $u_n=n(n+1)(n+2)$
\item $(n)_n$
\item $u_1=1 \quad u_2=1 \quad u_n=\dfrac{u_{n-1}}{u_{n-2}}$
\end{enumerate}
}



\definition{The sequence $(u_n)_{n \geq k}$ is:
\begin{enumerate}
\item
\textbf{increasing} if $u_n \leq u_m$ for all $m \geq n \geq k$,
\item
\textbf{decreasing} if $u_n \leq u_m$ for all $m \geq n\geq k$,
\item \textbf{monotone} if $(u_n)_{n \geq k}$ is either increasing or decreasing.
\item \textbf{bounded above} if there is an $M \in \mathbb{R}$ such that $u_n \leq M$ for all $n \geq k$
(the number $M$ is an \textbf{upper bound}),
\item
\textbf{bounded below} if there is an $M \in \mathbb{R}$ such that $u_n \geq M$ for all $n \geq k$
(the number $M$ is a \textbf{lower bound}),
\item \textbf{bounded} if the sequence is either bounded above and bounded below.
\end{enumerate}
}\index{bound!upper}\index{bound!lower}\index{lower bound}\index{upper bound}\index{bounded sequence}

Let $(u_n)_{n \geq k}$ be a sequence. If it is bounded above then by the context principle there is an observable $M$  which is also an upper bound. Conversely, if there is an observable $M$ such that
$$ u_n \leq M, \text{ for all observable $n$},$$
then by the context principle this statement is true for all integers
(including ultralarge integers). The same remark holds for lower
bounds.

\Definition{Least Upper Bound}{
A least upper bound $M$ to a nonempty set $A$ of real numbers is a value such that $x>M\Rightarrow x\notin A$ and for any $N<M$ there is an $x\in A$ such that $x>N$. 
}

A similar definition holds for greatest lower bound.



\theorem{\label{lub}A nonempty set of real numbers bounded above has a least upper bound (l.u.b). A nonempty set of real number bounded below has a greatest lower bound (g.l.b)}


\newpage
The proof of theorem \ref{lub} needs closure in two versions: the usual one:
\begin{center}
"If there is an $x$ satisfying a property, then there is an observable $x$ satisfying that property."
\end{center}
and its contrapositive
\begin{center}
"If all observable $x$ satisfy a property, then all $x$ satisfy that property."
\end{center}

\exo{
Assume a set $A$ has an upper bound.

The proof of theorem \ref{lub} requires to justify the following steps:
\begin{itemize}
\item Then there is an observable $a\in A$ and  an observable upper bound $B$. Justify.
\item Let $N$ be ultralarge. Divide the interval $[a,B]$ in $N$ even parts. Let $x_k=a+k\cdot\frac{B-a}{N}$. Let $a_j$ be the smallest value in the partition which is still an upper bound for $A$ and let $c$ be its observable neighbour.

Justify that $x_j$ has an observable neighbour.

\item $c$ is the least upper bound. Explain and this ends the proof.
\end{itemize}
}

\tproof{Reminder: this is the completeness of real numbers: a crucial property not shared by rational numbers -- think of $\{x\in \mathbb{Q}\ |\ x>0 \text{ and } x^2\leq 2\}$ which has no l.u.b. in $\mathbb{Q}$.

\bigskip
First I mention that if a set is a closed interval, $[1,5]$ then $5$ is a l.u.b. If it is open, $]1,5[$, then $5$ is still the l.u.b. My advice; take your time on this one, it is not easy to grasp.

\bigskip
But a set can be bits and pieces, not intervals.

Consider a set $A$ and an upper bound $m$ for $A$. The context is given by $A$ (i.e., the parameters used in its definition). By closure, since $A$ is assumed not empty, there is an element in $A$ hence there is an observable $a\in A$. Similarly, if there is an upper bound, then by closure, there is an observable upper bound $b$.(\footnote{This characterisation can also be used for functions: if a function or sequence has ultralarge values, then it has no maximal value since if it did, it would be an observable maximum.})

Let $N$ be an ultralarge whole number. Divide $[a,b]$ into $N$ even parts as usual. Let $x_j$ be the smallest among partition points which is still an upper bound. That means that either $x_{j_1}\in A$ or there is an $x\in A$ such that $x_{j-1}<x$.

Since $x_j$ is between $a$ and $b$ it is not ultralarge and therefore has an observable neighbour, $c$.

Let $d\in[a,b]$ and  observable, then if $d>c\simeq x_j$ then, in $d>x_j$ hence $d\notin A$. If $d<c$ then $d<x_{j-1}$ hence there is a $x\in a$ such that $d<x$. So $c$ is the least upper bound among all observable numbers, hence it is the least upper bound among all numbers.

\bigskip
(If there were a counter example, there would be an observable one...)
}

\exo{
This theorem is \emph{not} true if one replaces "real" by "rational''. Consider 
\[\{x\in\mathbb{Q}\ |\ x^2< 2\}\] Why does this not have a a least upper bound?
}





\exo{prove the following theorem:

\Theorem{Monotone Convergence}{\label{convmono}
Any increasing sequence  which is bounded above is convergent and has a limit. Similarly, any decreasing sequence which bounded below is convergent and has a limit.}\index{convergence!on monotone sequences}
}

\tproof{If the sequence is bounded above, then it has a l.u.b.

We need to show that the l.u.b. is the limit.

Let $L$ be the l.u.b of $(u_n)$. If for all $n$, $u_n\not\simeq L$, then, since the sequence is increasing, there is an observable number $L'<L$ such that for all $n$ we have $u_n<L'$ hence $L$ would not be the l.u.b.

So there is an $n$ such that $u_n\simeq L$ and since for all $k$, we have $u_{n+k}\geq u_n$ and $L$ is l.u.b, all elements of the sequence after $n$ satisfy $u_{n+k}\simeq L$. And this defines $L$ as the limit.}

 
 \tproof{\caution A sequence $(u_n)$ is really a function $u(n)$ hence its context depends on the parameters used to define the terms. If you take $h$ ultrasmall relative to the standard context and the constant sequence $h,h,h,h,h,h,\dots$ then the context of this sequence is $h$ and its limit is $h$, not 0.
 
 \bigskip
 Students have come with these questions...
 }
 
 \subsection*{Construction of a sequence to calculate $\sqrt{2}$}
 
 The square root of 2 (or any number) can be computed by repeated
 approximation. Here is one of many methods:
 
 \medskip
 Let $\sqrt{a}$ be a first approximation to $\sqrt{2}$ \quad(the leftover
 part $b$ is such that $a+b=2$)
 
 $\sqrt{a+b}=\sqrt{a}+\delta$ where $\delta$ is the error
 on the result
 
 The approximation is such that we hope that $\delta < 1$,
 neglect $\delta^2$ which is even smaller, thus obtaining the following
 approximation:
 \[a+b=a+2\sqrt{a}\delta+\delta^2\approx a+2\sqrt{a}\delta\]
 from which we get
 \[\frac{b}{2\sqrt{a}}\approx\delta\]
 thus $\sqrt{a}+\frac{b}{2\sqrt{a}}$ will be a better
 approximation than $\sqrt{a}$
 
 Let $\sqrt{a}$ be written $v$, then $a=v^2$ and as
 $a+b=2$ we have $b=2-v^2$, thus $v+\frac{2-v^2}{2v}$ is a better
 approximation to $\sqrt{2}$ than $v$.
 
 
 A sequence can be constructed:
 
 $a_{n+1}=a_n+\dfrac{2-a_n^2}{2a_n} \quad a_1=$first approximation
 
 Compute the first terms of the sequence for different approximations:
 $a_1=1$ , $a_1=1.5$ or even $a_1=2$
 
 
 The following values are first a computer value for $\sqrt{2}$, followed by sequence value: $a_8$ with ($a_1=1.5$)
 
 $1.41421356237309504880168872420969807856967187537694807317667973798...$
 
 $1.41421356237309504880168872420969807856967187537694807317667973800...$
 
 \exo{
 Write the sequence that calculates $\sqrt{3}$ and calculate the first
 approximations. }
 
 



\definition{Let $(u_n)_{n \geq k}$ be a sequence. We say that $(u_n)_{n \geq k}$ is a \textbf{Cauchy sequence} if
$$u_{N'} \simeq u_N, \quad \text{for all positive ultralarge integers $N, N'$.}$$}\index{Cauchy
sequence}\index{sequence!Cauchy}\index{Cauchy sequence}

A context is given by the sequence. By the context principle, a sequence is a
Cauchy sequence if and only if this condition is met for any extended context.

\exo{Prove the following theorem: 
\theorem{\label{convcauchy} Let  $(u_n)_{n \geq k}$ be a sequence.
Then $(u_n)$ converges if and only if $(u_n)_{n \geq k}$ is a Cauchy
sequence.}\index{convergence!of Cauchy sequences}

}

\tproof{
(1) assume it converges to $L$. Then for any ultralarge $N$ and $N'$ we have $u_N\simeq L\simeq u_{N'}$ hence $u_N\simeq u_{N'}$.

\bigskip
(2) assume it is a Cauchy sequence. Then for any $N$, $N'$, we have $u_N\simeq u_{N'}$, hence there is an $x$ such that for all ultralarge $M$, $u_M\simeq x$. (Take $x=u_N$). Hence there is an observable $c$ such that for all ultralarge $M$, $u_M\simeq c$, so $c$ is the limit.

\bigskip
In particular, this shows that a Cauchy sequence does not reach ultralarge values.
}

\exo{Back to Fibonacci. Use theorem
\ref{convcauchy} to prove that the sequence of ratios converges. Show that the
recurrence relation has a fixed point. Then show that this fixed point
is the limit.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Series}

\bigskip
Let $(u_n)_{n \geq k}$ be a sequence. It is possible to define another sequence by considering the \textbf{partial sums}\index{partial sums} $s_k = u_k$ and $s_{n+1} = s_n + u_{n+1}$, for $n \geq k$. In other words, for a positive integer $N$ we have
$$ s_N = u_k + u_{k+1} + \dots + u_N = \sum_{n=k}^N u_n. $$


\Definition{Partial Sum}{\index{partial sum} 
A \textbf{partial sum} is the sum up to a
given index number. It is indicated by 
\[\mathcal{S}_1=\sum_{i=1}^1\quad\mathcal{S}_2=\sum_{i=1}^2\quad \mathcal{S}_n=\sum_{i=1}^n \]}

\Definition{Infinite Series}{
An infinite series  is the \textbf{limit} of its partial sums.

An infinite series has a sum \textbf{iff} it converges.

Let $(u_n)_{n \geq k}$ be a sequence.
A \textbf{series} is the sequence
\[\left(\sum_{n = k}^N
u_n\right)_{N \geq k}\] of the partial sums. We will denote this
series by
\[\sum_{n =k}^\infty u_n.\]
}

This definition is equivalent to: 

\Definition{Convergence of a Series}{\index{convergence of a series} A
series converges \textbf{iff} there is an observable $L$ such that for any ultralarge $N$
\[\sum_{i=k}^Nu_i\simeq L\]}


Partial sums represent successive approximations of the total sum
$$u_k + u_{k+1} + u_{k+2} + \dots$$
which is not necessarily a real number in the sense that it is not guaranteed that the partial sums converge.


\definition{Let $\sum_{n \geq k} u_n$ be a series.
We say that $\sum_{n \geq k} u_n$ \textbf{converges} to $L$ if
the sequence of patial sums converge to $L$.
}\index{series!convergence}\index{convergence of a
series}

If the series converges, then the total sum is equal to the limit
of the sequence of partial sums. As before, if the limit exists,
it is observable

\exo{\label{Epower}
Here is a well known series for which it may be possible to guess the
limit. However, the question is how to prove it.

Calculate \[\sum_{i=0}^\infty \frac{1}{2^i}\]
}

\exo{
Same question (also  graphically) for
\[\sum_{k=1}^\infty \frac{1}{4^k}\]
}


\exo{Same question for
\[\sum_{k=1}^\infty \frac{1}{n^k}\]}


\example{Consider the \textbf{arithmetic series} $\ds\sum_{n\geq
1} u_n$, with $u_1=a$ and  $u_n = a + (n-1) \cdot d$.

A context is given by $u$. To establish the value of $\ds\sum_{n=1}^N u_n$ first note that
$$ 1+2+ \dots + N-1 = \frac{1}{2} ( 1+ (N-1) + (2+(N-2)) + \dots +( N-1) +1)) = \frac{N
\cdot (N-1)}{2}$$
 thus
$$\sum_{n=1}^N a + (n-1) \cdot d= N \cdot a + d \sum_{n = 1}^N n-1 =
N \cdot a + d \cdot \frac{N \cdot (N-1)}{2} =
\frac{N}{2}(2a+(N-1)d) = \frac{N}{2}(u_1 + u_N).$$
If $N$ is ultralarge, then
$$\sum_{n=1}^N u_n = \frac{N}{2}(2a+(N-1)d)$$
is also ultralarge.

Hence an arithmetic series cannot converge unless $a=d=0$. }

\example{Consider the \textbf{geometric series}  $\ds\sum_{n\geq 1}u_n$, with $u_1=a$ and $u_n = a \cdot r^{n-1}$, with $a, r \in \mathbb{R}$ ($a \not = 0$). Let $\ds s_N = \sum_{n\geq 1}^N u_n$. Note that:
$$s_N = a + ar + ar^2 + \dots + ar^{N-1}$$ multiply by $(1-r)$ and obtain $a-ar^{N}=a(1-r^N)$

therefore $s_N \cdot (1-r) = a \cdot (1 - r^N)$ and
$$ s_N = a \cdot \frac{1 - r^N}{1-r}, \quad \text{ if $r \neq 1$.} $$
Note that if $r =1$ then $s_N = a \cdot N$ so with a common ratio equal to 1, if the initial term is not zero, the series diverges.

It is simple to check that
$$ \sum_{n \geq 1} a \cdot r^n \
\begin{cases}
\text{ diverges if } |r| \geq 1\\
\text{ converges to } a\cdot \frac{1}{1-r} \text{ if } |r| < 1.
\end{cases}
$$}



\exo{For a geometric series with 2 as first term and $r=3/4$. Write the first terms. Calculate the limit.}

\exo{Let \[\sum_{k=0}^\infty 3\cdot 10^{-k}\]
Does this series converge and if so, what is its limit?}

\exo{Calculate (if the value exists) 
\[\sum_{j=0}^\infty 0.999^j\]
}

\section{Convergence Criteria}

\exo{Use theorem \ref{convcauchy} to prove the following.

\theorem{\label{seriecauchy} Let $\ds\sum_{n \geq k} u_n$ be a
series. Then $\ds\sum_{n \geq k} u_n$ converges if and only if
\[\text{for any ultralarge numbers $N < N'$} \quad \ds\sum_{n = N}^{N'} u_n \simeq 0\] }\index{convergence!of a series}
}

\tproof{The sequence of partial sums is a Cauchy sequence.}

\Theorem{Comparison test}{ Let $(u_n)_{n \geq k}$ and $(v_n)_{n
\geq k}$ be two sequences with non-negative terms such that \[ u_n
\geq v_n, \quad \text{for each }n \geq k.\] If the series $\ds\sum_{n
\geq k} u_n$ converges then the series $\ds\sum_{n \geq k} v_n$
converges also.}\index{comparison
test}\index{test!comparison}\index{comparison test}

\tproof{The series for $u_n$ provides un upper bound for $v_n$: take ultralarge $N$, and call $U$ the limit for $u_n$. Then $U\simeq u_N>v_N$.}

The contrapositive of the previous theorem can be used to prove
the divergence of a series.


\theorem{\label{initial}Let $(u_n)$ be s sequence of positive terms. If $\ds\sum_{n \geq k} u_n$ converges then, for ultralarge $N$
$u_N \simeq 0$.}\index{convergence
implies terms tend to 0}

\tproof{Theorem \ref{seriecauchy} with ultralarge $N-1$ and $N$ }

\example{The converse of this theorem is false: consider the \textbf{harmonic series}\index{harmonic series}
$$\sum_{n \geq 1} \frac{1}{n}.$$
We have $\ds\lim_{n \rightarrow \infty} \frac{1}{n} = 0$. We will
show now that this series diverges.

We observe that
$$s_4 = 1+ \frac{1}{2} + \left(\frac{1}{3} + \frac{1}{4}\right) \geq 1 +
\frac{1}{2}+ \left(\frac{1}{4} +\frac{1}{4}\right) =1 + \frac{1}{2}+
\frac{1}{2} = 1 + 2 \cdot \frac{1}{2}$$
$$s_8 = s_4 + \left(\frac{1}{5} + \frac{1}{6} + \frac{1}{7} +
\frac{1}{8}\right) \geq s_4 + 4 \cdot \frac{1}{8} = s_4 + \frac{1}{2}
\geq 1 + 3 \cdot \frac{1}{2}.$$

By induction, we see that
$$S_{2^N}\geq 1+N\cdot\frac{1}{2}.$$
But this implies that the series diverges because if $N$ is
ultralarge then $2^N$ is ultralarge and $S_{2^N}\geq 1+\frac{N}{2}$
is ultralarge hence not observable. }


\Theorem{Integral Test}{Let $f : [k, \infty[ \rightarrow
\mathbb{R}$ be a continuous decreasing and positive function. Let
$\ds F(N) = \int_k^N f(x) \cdot dx$. Then the series $\ds\sum_{n \geq k}
f(n)$ converges if and only if $\ds\lim_{N \rightarrow \infty} F(N)$
exists.}\index{integral
test}\index{test!integral}\index{integral test}


\tproof{
The following sketch show that the integral will be an upper bound for the series. The dashed line is the integral shifted to the left which is a lower bound. Hence the integral converges iff the series converges.

\begin{center}
\begin{tikzpicture}
\draw[latex-latex](0,3.5)--(0,0)--(5,0);
\draw(0,3) .. controls (1,2) and (4,1) .. (5,1)node[above left]{$f$};
\draw (0,2.3)--(1,2.3)--(1,0)node[below]{$1$};
\draw(1,1.82)--(2,1.82)--(2,0)node[below]{$2$};
\draw(2,1.44)--(3,1.44)--(3,0)node[below]{$3$};
\draw(3,1.15)--(4,1.15)--(4,0)node[below]{$4$};
\draw[dashed](-1,2.3)node[left]{$u_1$}--(0,2.3);
\draw[-latex](-1,1)node[below]{area}--(.3,1.3)node[right]{$u_1$};
\draw(1.5,1)node{$u_2$};
\draw(2.5,0.8)node{$u_3$};
\draw(3.5,0.6)node{$u_4$};
\draw[dashed](-1,3) .. controls (0,2) and (3,1) .. (4,1);
\end{tikzpicture}
\end{center}

I do not formalise this more...
}

\example{Consider the series $\sum_{n \geq 1} \frac{1}{n^2}$. Let
$f : ]0, \infty [$ by $x \mapsto \frac{1}{x^2}$. It is a positive
continuous decreasing function. Then
$$F(N) = \int_1^N \frac{1}{x^2} dx = - \frac{1}{x} \bigg|^N_1 = 1
- \frac{1}{N}$$ Then $\lim_{N \rightarrow \infty} F(N) = 1$ so the
series $\sum_{n \geq 1} \frac{1}{n^2}$ converges.}

\bigskip
\exo{

The \textbf{Riemann series} is\index{series!Riemann}

$$\sum_{n \geq 1} \frac{1}{n^p} \quad \text{ with $p \in
\mathbb{R}$.}$$

Show that the Riemann series converges if and only if $p> 1$.
}

The two following criteria use comparisons with some geometric series.

\Theorem{Ratio Test}{Let $\ds\sum_{n \geq k} u_n$ be a series with
strictly positive terms.

If $$N \text{ is ultralarge } \Rightarrow \frac{u_{N+1}}{u_N} \simeq L$$ then
\begin{enumerate}
\item
if $L >1$ the series diverges,
\item
if $L < 1$ the series converges.

\end{enumerate} }\index{ratio test}\index{test!ratio}\index{ratio test}


The ratio test is inconclusive in the case $L =1$: we have seen
that $\ds\sum_{n \geq 1} \frac{1}{n}$ diverges but $\ds\sum_{n \geq 1}
\frac{1}{n^2}$ converges.

\tproof{Assume $L<1$ then there is an observable $r$ such that, for ultralarge $N$
\[\frac{u_{N+1}}{u_N}\simeq L<r<1\]
then for all ultralrge $N$, we have $u_{N+1}<r\cdot u_N$.

Fix an ultralarge $m$ and for any $k$, \[u_{m+k}<r^k\cdot u_m\]

\bigskip
$u_m$ is not ultralarge: since the sequence is decreasing at least for ultralarge values of the index and the first term is observable, either it is always decreasing (and positive) so it is not ultralarge or it first increases, but then it will have a maximum which is observable, so it is not ultralarge.

\bigskip
Then
\[\sum_{k=m}^N u_k<\sum_{k=m}r^k \cdot u_m=u_m\cdot \sum_{k=m}^N r^k\]
This last sum is a geometric series, hence it converges.

\bigskip
The sum $\ds\sum_{k=0}^\infty$ is cut in two parts: a finite sum and an infinite one, $\ds\sum_{k=0}^{m-1}+\ds\sum_{k=m}^\infty$ 

For the first part, the context is extended to $m$. 

For all observable $n$, by closure, $u_n$ is observable. So the sum of an observable number of observable values is observable. 

The second part converges so the whole sum converges in the extended context containing $m$. But the convergence does not depend on the choice of $m$. So simply: it converges.

}


\definition{A series $\sum_{k \geq n} u_n$ (or $(u_n)_{n \geq k}$) is
\textbf{an alternating series}, if
 $u_n \cdot u_{n+1} < 0$ for each $n \geq k$.}\index{series!alternating}\index{alternating series}

\theorem{Let $(u_n)_{n \geq k}$ be an alternating series
decreasing in absolute value. If $\ds\lim_{n \rightarrow
\infty}u_n = 0$ then $\sum_{n \geq k} u_n$ converges.}
\index{convergence!of alternating series}


\example{This shows that the harmonic alternating series defined by
$$\sum_{n \geq 1} (-1)^n \frac{1}{n}$$
converges.}



% \Theorem{Root Test}{Let $\sum_{n \geq k} u_n$ be a series with
% positive terms.
% 
% If $$\lim_{n \rightarrow \infty} \sqrt[n]{u_n}= L$$ then
% \begin{enumerate}
% \item
% if $L >1$ the series diverges,
% \item
% if $L < 1$ the series converges.
% \end{enumerate}}\index{root test}\index{test!root}\index{root test}
% 
% 
% The root test is inconclusive in the case $L =1$ as can be seen
% with the same examples as for the ratio test.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\exo{Show that if one considers the series $\sum_{k=1}^\infty
  (-1)^k$ then by rearranging the order of the terms, the sum can be
  made to be equal to any positive or negative number.}

\caution This is a crucial point. A never ending series can yield
strange things! Because it never ends. This is why it is important to
work on the partial sums. (More difficult theorems state under what
conditions can the terms of a series be rearranged without changing
the result.)



%============================================================
% \index{divergence proof}
% \exo{
% The series $\sum_{n=1}^\infty \frac{1}{n}$ was a problem
% for a long time. The reason is that it diverges even though the terms
% of the sequence become ultrasmall. This is a counter-example
% to the converse of theorem \ref{convcauchy}
% 
% 
% This theorem (\ref{convcauchy}) states a property of converging series, so here it will be
% used ``backwards''. i.e: between two carefully chosen large upper
% values, the difference between the two partial sums not ultrasmall. It is enough to find \emph{one} case were this is not
% satisfied.
% }
%============================================================
%============================================================
% 
\section{Taylor Series}\index{Taylor series}\index{series!Taylor}


\bigskip
The idea of this part is to represent a function by a series
 $\sum_{n \geq k} a_n \cdot (x-c)^n$ such
 that the series converges to $f(x)$ for some values of $x$ around
a point $c$. This is called the \textbf{Taylor series for $f$ at
$c$.}

We first define the $n$th derivative of $f$ by induction on $n$.

\definition{Let $f$ be a function. We say that
$f$ is \textbf{differentiable once at $x$} if $f'(x)$ exists. We
write $f^{(1)}(x) = f'(x)$. By induction, for a positive integer
$n$, we say that $f$ is \textbf{differentiable $n+1$ times at $x$}
if the function $f^{(n)}$ is differentiable at $x$. We write
$f^{(n+1)}(x) = (f^{(n)})'(x)$.}\index{derivative!higher
order}\index{higher order derivative}


\theorem{\label{taylor} Let $N$ be a positive integer and let $c
\in \mathbb{R}$. Let $f$ be a function differentiable $N+1$ times
on an open interval containing $c$ and let $x$ be in this
interval. Then
$$f(x) = \sum_{n=0}^N \frac{(x-c)^n}{n!} \cdot f^{(n)}(c) + \int_c^x \frac{(x-t)^N}{N!} \cdot f^{(N+1)}(t) \cdot dt.$$
}\index{Taylor series}


\exo{
% Let $f:x\mapsto \lim_{n\rightarrow \infty}\sum_{i=0}^n f_i(x)$
Using any of the convergence criteria, prove that 
\[\sum_{k=0}^\infty\frac{x^k}{k!}\]
converges for any value of $x$.

Since it converges and depends on $x$, we define
\[f:x\mapsto \sum_{k=0}^\infty\frac{x^k}{k!}\]
}

\exo{Prove the following theorem.}
\theorem{\label{e2} The number $e$ satisfies
$$e = \lim_{n \rightarrow \infty}\left(1+ \frac{1}{1!} + \frac{1}{2!} +
\dots + \frac{1}{n!}\right).$$ }\index{e!infinite
sum}\index{exponential!infinite sum}

\exo{\label{binom} 
Same idea for the product; show that this "infinite product" converges, then differentiate it.
\[g:x\mapsto\lim_{n\rightarrow\infty}\left(1+\frac{x}{n}\right)^n \]
}


\exo{
Show that
\[\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^n=2+\frac{1^2}{2!}+\frac{1^3}{3!}+\dots=\sum_{k=0}^\infty\frac{1}{k!}\]
}

\definition{\[e^x=\sum_{k=0}^\infty\frac{x^k}{k!}=\lim_{n\rightarrow\infty}\left(1+\frac{x}{n}\right)^n\]
}
%____________________________________________________________
\exo{
Compute the first partial sums for $e^x$ with $x=1$ and other values
of $x$ and compare with the $e^x$ value of your calculator. 
}

\exo{
From complex numbers, recall that $e^{ix}=\cos{x}+i\sin{x}$
\begin{enumerate}
\item Write the beginning of the series for $e^{ix}$
\item Write the series for $\cos(x)$ and $\sin(x)$ (Think about the
real part and imaginary part separately).
\item Prove that these series converge.
\item Calculate $\cos(1)$ using this series.
\item Calculate $\tan(1)$.
\end{enumerate}
}





We have already shown that the alternating harmonic series converges. Now we can show more.

\exo{Prove that the alternating harmonic series
 $\ds\sum_{n \geq 1} \frac{(-1)^{n+1}}{n}$ converges to $\ln(2)$ i.e.,
$$\ln(2) = \lim_{n \rightarrow \infty}\left(1 - \frac{1}{2} + \frac{1}{3}-
\frac{1}{4} + \dots + \frac{(-1)^{n+1}}{n}\right).$$
\index{$\ln(2)$}}

\theorem{\label{critaylor} Let $f$ be a function infinitely many
times differentiable on an open interval containing $c$ and let
$x$ be in that interval. Suppose that there exists an $M$ such that for each positive integer
$n$ the function $f^{(n)}$ is bounded by $M$ on $[x;c]$ (or $[c;x]$ if $c
< x$). Then the series
$$\sum_{n \geq 0}\frac{(x-c)^n}{n!} \cdot f^{(n)}(c) \text{ converges to } f(x).$$ }
\index{Taylor series!convergence}


\exo{
For each of the following, calculate the first terms of the Taylor series. Use induction to obtain the general term. Prove that it converges. Use $c=0$ for all three.
\begin{enumerate}
\item $\cos(x)$
\item $\sin(x)$
\item $\arctan(x)$
\end{enumerate}
}

\example{A Taylor series for $f$ may converge everywhere without
converging to the function $f$. Consider $f$ given by
\[
f(x) = \begin{cases} e^{-\frac{1}{x^2}}, \quad &\text{if $x \not =
0$}\\
0 &\text{otherwise}.
\end{cases}
\]
One can show that
\[
f^{(n)}(0) = 0, \quad \text{for each positive integer $n$}.
\]
The power series $\sum_{n \geq 0} 0 \cdot x^n $ converges
to the function which is everywhere $0$ and not to $f$. This is
not a contradiction to Theorem \ref{critaylor}, as for each $x \ne
0$ and each $M$ there exist $n$ and  $\xi$ between 0 and $x$ such that $|f^{(n)}(\xi)| > M$, so the assumptions
of the theorem are not satisfied.}


\exo{
Calculate the Taylor series for $\sqrt{x}$. You must first find a good value for $c$, which might mean trying several values.

Does it converge for all values of $x$? (Try using to compute square roots of 0,1,4...)

If it does not converge for, say, 10, is it possible to use another value for $c$?
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Pract{series}{
For the following, find the partial sums, determine whether the series converges and find the sum when it exists.

\begin{enumerate}
\item $\ds 1+\frac{1}{3}+\frac{1}{9}+\dots + \left(\frac{1}{3}\right)^n+\dots$
\item $\ds 1+\frac{3}{4}+\frac{9}{16}+\dots +\left(\frac{3}{4}\right)^n+\dots$
\item $\ds\left(1-\frac{1}{2}\right)+\left(\frac{1}{2}-\frac{1}{6}\right)+\left(\frac{1}{6}-\frac{1}{24}\right)+\dots +\left(\frac{1}{n!}-\frac{1}{(n+1)!}\right)+\dots $
\item $\ds\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\dots + \frac{1}{n(n+1)}+\dots $\hfill Hint: $\frac{1}{n(n+1)}=\frac{1}{n}-\frac{1}{n+1}$
\item $\ds 1-2+4-8+\dots + (-2)^n+\dots$
\item $\ds\frac{3}{1^2\cdot 2^2}+\frac{5}{2^2\cdot 3^2}+\dots + \frac{2n+1}{n^2(n+1)^2}+\dots $\hfill Hint: $\frac{2n+1}{n^2(n+1)^2}=\frac{1}{n^2}-\frac{1}{(n+1)^2}$
\item $\ds \frac{1}{1\cdot 3}+\frac{1}{3\cdot 5}+\frac{1}{5\cdot 7}+\dots + \frac{1}{(2n-1)\cdot(2n+1)}+\dots$ 
\item $\ds \frac{1}{3}-\frac{2}{5}+\frac{3}{7}-\frac{4}{9}+\dots + \frac{(-1)^{n-1}\cdot n}{2n+1}$ 
\item $\ds \frac{1}{4}+\frac{1}{7}+\frac{1}{10}+\dots + \frac{1}{3n+1}+\dots$ 
\item $\ds \ln(1)+\ln(2)+\ln(3)+\dots + \ln(n)+\dots$ 
\end{enumerate}

}

\Pract{convergence}{

For the following, the general term of the series is given.
Test the corresponding series for convergence:

\begin{multicols}{2}
\begin{enumerate}
\item $\ds\frac{3n-7}{10n+9} $
\item $\ds\frac{5}{6n^2+n-1} $
\item $\ds\frac{\sqrt{n}}{1+2\sqrt{n}+n} $
\item $\ds n\cdot e^{-n} $
\item $\ds\frac{5^n}{3^n+4^n} $
\item $\ds\frac{n^n}{(n!)^2} $
\item $\ds\frac{2^n\cdot n!}{n^n} $
\item $\ds\frac{1}{\ln(n)} $
\item $\ds \frac{n^2}{2^n} $
\item $\ds\frac{\ln(n)}{n} $
\end{enumerate}
\end{multicols}

}


\Pract{Taylor}{
Give the Taylor series for the following. State for which values of $x$ they converge.

\begin{multicols}{2}
\begin{enumerate}
\item $\ds\frac{1}{1-x}$
\item $\ds\frac{1}{1+x}$
\item $\ds\frac{1}{1-2x}$
\item $\ds \ln(1-x)$
\item $\ds \frac{1}{1+x^2}$
\item $\ds e^{-x}$
\item $\ds e^{-x^2}$
\item $\ds \int_0^x e^{-t^2}dt$
\item $\ds \ln\left(\frac{1+x}{1-x}\right)$
\item $\ds (1+x)^p$ for fixed $p$.
\end{enumerate}
\end{multicols}


}

\newpage

\textbf{}
\newpage
\sol{series}{
\begin{enumerate}
\item $\ds \frac{3}{2}\left(1-\left(\frac{1}{3}\right)^n\right)$. Converges to $\frac{3}{2}$.
\item $\ds 4\left(1-\left(\frac{3}{4}\right)^n\right)$. Converges to $4$.
\item Rewrite as telescoping series: $\ds 1-\frac{1}{(n+1)!}$. Converges to $1$.
\item $\ds 1-\frac{1}{n+1}$. Converges to $1$.
\item If $n$ is even: $-n/2$. If $n$ is odd: $n/2+1/2$. Diverges.
\item Rewrite as telescoping series: $\ds 1-\frac{1}{(n+1)^2}$. Converges to $1$.
\item $\ds \frac{1}{2}\left(1-\frac{1}{2n+1}\right) $. Converges to $\frac{1}{2}$.
\item Diverges because $\ds\lim_{n\to\infty}a_n=\frac{1}{2}$.
\item Diverges.
$3n+1<4n$ (for $n>2$) hence $\frac{1}{3n+1}>\frac{1}{4n}$ and $\sum_{n=1}^N\frac{1}{4n}=\frac{1}{4}\sum_{n=1}^N\frac{1}{n}$ which diverges hence the series is bounded below by a diverging series and diverges also.

\item Diverges because for ultralarge $N$, $\ln(N)\not\simeq 0$. Or simply: the terms are increasing and positive.
\end{enumerate}

}

\sol{convergence}{
\begin{enumerate}
\item Diverges since for ultralarge $N$ we have $\ds\frac{3N-7}{10N+9}=\frac{3-7/N}{10+9/N}\simeq \frac{3}{10}\not\simeq 0$
\item Converges. By comparison: $\ds\frac{5}{6n^2+n-1}< \frac{5}{6}\frac{1}{n^2}$ (for $n>2$)
\item Diverges. $\ds \frac{n^{1/2}}{(n^{1/2}+1)^ 2}=\left( \frac{n^{1/4}}{n^{1/2}+1}\right)^2 =\left( \frac{1}{n^{1/4}+n^{-1/4}}\right)^2> \left(\frac{1}{4n^{1/4}}\right)^2=\frac{1}{2n^{1/2}}>\frac{1}{2n}$

\item $\ds\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\left(1+\frac{1}{n}\right)\frac{1}{e}<1$
\item Diverges. By ratio test: $\ds\frac{5(3^2+4^n)}{3\cdot3^n+4\cdot 4^n}>\frac{5(3^2+4^n)}{3\cdot3^n+3\cdot 4^n}=\frac{5}{3}>1$.
\item Converges. By ratio test: $\ds\frac{(n+1)^n}{(n+1)n^n}=\frac{(n^n(1+1/n)^n}{(n+1)n^n}\simeq \frac{e}{n+1}\simeq 0$.
\item Converges. By ratio test: 
$\ds \frac{(n+1)^2(n+1)n!n!}{n!(n+1)(n+1)!n^n}=\frac{(n+1)^{n-1}}{n^n}=\frac{1}{n}\left(1+\frac{1}{n}\right)^{n-1}\simeq \frac{1}{n}e\simeq 0$


\item Diverges. By comparison: $\ln(n)<n$ hence $\ds\frac{1}{\ln(n)}>\frac{1}{n}$ and the harmonic series diverges.
\item Converges. Ratio test: $\ds\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\frac{1}{2}<1$.
\item Diverges. Integral test: by setting $\ln(x)=u$ we get $\ds\int_1^\infty \frac{\ln(x)}{x}dx=\frac{1}{2}\ln^2(x)\bigg|_1^\infty$ which diverges. By horizontal shifting, this function is below the series.
\end{enumerate}



}

\sol{Taylor}{
\begin{enumerate}
\item $\ds 1+x+x^2+x^3+x^4+\dots$ for $|x|<1$
\item $\ds 1-x+x^2-x^3+x^4-\dots$ for $|x|<1$
\item $\ds 1+2x+2^2x^2+2^3x^3+2^4x^4+\dots$ for $|x|<1/2$
\item $\ds -x-\frac{x^2}{2}-\frac{x^3}{3}-\frac{x^4}{4}-\dots$ for $|x|<1$
\item $\ds 1-x^2+x^4-x^6+x^8-\dots$ for $|x|<1$
\item $\ds 1-x+\frac{x^2}{2!}-\frac{x^3}{3!}+\frac{x^4}{4!}-\dots$ for all $x$
\item $\ds 1-x^2+\frac{x^4}{2!}-\frac{x^6}{3!}+\frac{x^8}{4!}\dots$ for all $x$
\item $\ds x-\frac{x^3}{3!}+\frac{x^5}{5\cdot 2!}-\frac{x^7}{7\cdot 3!}+\frac{x^9}{9\cdot 4!}-\dots$ for all $x$
\item $\ds 2x+\frac{2x^3}{3}+\frac{2x^5}{5}+\frac{2x^7}{7}+\frac{2x^9}{9}+\dots$ for $|x|<1$
\item $\ds 1+px+\frac{p(p-1)}{2!}x^2+\frac{p(p-1)(p-2)}{3!}x^3+\complement_4^p x^4+\dots$ for $|x|<1$
\end{enumerate}
}

\printindex
\end{document}