TAYLOR • CANTOR • RIEMANN
Convergence, Infinity, and the Critical Line

Taylor Convergence
& Cantor
& Riemann

Three revolutions in how we handle the infinite: Taylor asked when local information becomes global, Cantor asked how many infinities there are, Riemann asked where infinity vanishes. This monograph ties them together — because the Riemann zeta function is a story of analytic continuation, which is a story of power series, which lives in a universe Cantor taught us to measure.

Radius RUncountableζ(s)Critical Line ℜ=½
THE THREE PILLARS
Taylor: $f(x)=\sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x-a)^n$ — when does it equal $f$?
Cantor: $|\mathbb{R}|>|\mathbb{N}|$, $C$ has measure 0 but $|\,C\,|=|\mathbb{R}|$
Riemann: $\zeta(s)=\sum n^{-s}=\prod_p(1-p^{-s})^{-1}$ analytically continued, zeros $\rho$ with $\Re\rho=1/2$?
LIVE — Taylor order 2 → 18 for $e^x$
N=3Taylor $\to$ analytic continuation $\to$ zeta
WHY THESE THREE BELONG TOGETHER
Taylor convergence is limited by the nearest singularity in $\mathbb{C}$. Cantor gave us the language for sets of singularities (measure zero Cantor set). Riemann's $\zeta(s)$ has a power series with radius 1 at $s=1$, but analytic continuation past that pole is what creates the critical strip where RH lives. Analytic continuation is repeated Taylor re-centering — Weierstrass's chain of discs — and Cantor's diagonal argument proves the continuation is unique.

I. Taylor Convergence — When Local Becomes Global

For $f$ infinitely differentiable at $a$, the Taylor polynomial of order $n$:

$$ P_n(x)=\sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k $$

The full Taylor series is $P_\infty$. The question: $R_n(x)=f(x)-P_n(x)\to0$?

Three forms of remainder — the error you must control

Lagrange: $$ R_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1},\quad \xi\in(a,x) $$

Cauchy: $$ R_n(x)=\frac{f^{(n+1)}(\xi)}{n!}(x-\xi)^n(x-a) $$

Integral: $$ R_n(x)=\frac1{n!}\int_a^x (x-t)^n f^{(n+1)}(t)\,dt $$

If you can bound $|f^{(n+1)}|\le M$ on interval, then $|R_n|\le M|x-a|^{n+1}/(n+1)!\to0$ because factorial beats any power. That's why $e^x$, $\sin x$, $\cos x$ have $R=\infty$.

Radius and interval

For $\sum c_n(x-a)^n$, Hadamard:

$$ \frac1R=\limsup_{n\to\infty}|c_n|^{1/n},\qquad \frac1R=\lim\left|\frac{c_{n+1}}{c_n}\right|\text{ if limit exists} $$

Converges absolutely for $|x-a|R$. Endpoints separate. Example:

$$ \frac1{1-x}=\sum_{n\ge0}x^n,\;|x|<1,\quad \ln(1+x)=\sum_{n\ge1}(-1)^{n+1}\frac{x^n}{n},\;|x|<1\text{ plus }x=1 $$

Why radius is complex: $f(x)=1/(1+x^2)$ has Taylor at $0$ with $R=1$, not because of real singularity, but poles at $x=\pm i$ in $\mathbb{C}$. The distance to nearest singularity in complex plane is the radius. This is the bridge to Riemann.

Five canonical series

$$ e^x=\sum\frac{x^n}{n!},\;R=\infty\qquad \sin x=\sum(-1)^n\frac{x^{2n+1}}{(2n+1)!},\;R=\infty $$
$$ \cos x=\sum(-1)^n\frac{x^{2n}}{(2n)!},\;R=\infty\qquad (1+x)^\alpha=\sum\binom\alpha n x^n,\;R=1 $$

Binomial coefficient $\binom\alpha n =\alpha(\alpha-1)...(\alpha-n+1)/n!$.

When Taylor fails

$f(x)=e^{-1/x^2}$ for $x\neq0$, $f(0)=0$ is $C^\infty$ with all $f^{(n)}(0)=0$. Its Maclaurin series is $0$, not $f$. It is smooth but not analytic. Cantor-type functions give more pathology.

II. Cantor — How Many Infinities in a Convergence?

Georg Cantor (1845-1918) asked: how many points does convergence need to handle?

Countable vs uncountable

$\mathbb{N},\mathbb{Z},\mathbb{Q}$ are countable: $|\mathbb{N}|=\aleph_0$. But $\mathbb{R}$ is not. Cantor's diagonal argument: assume enumeration $r_1,r_2,...$ of $[0,1]$, build $d$ whose $n$-th digit differs from $n$-th digit of $r_n$. Then $d$ not in list. So $|\mathbb{R}|>|\mathbb{N}|$. Moreover $|\mathcal P(\mathbb{N})|=|\mathbb{R}|=2^{\aleph_0}$.

The Cantor set $C$ — a convergence monster

Start $[0,1]$, remove middle third $(1/3,2/3)$, then middle thirds of remaining intervals, ad infinitum.

$$ C=\bigcap_{n=0}^\infty C_n,\quad C_0=[0,1],\; C_{n+1}= \frac13C_n\cup\left(\frac23+\frac13C_n\right) $$

Properties:

Cantor function (Devil's staircase)

$f:[0,1]\to[0,1]$ continuous, monotone, $f'=0$ almost everywhere (on complement of $C$), yet $f(0)=0$, $f(1)=1$. It climbs from 0 to 1 purely on a set of measure 0. Construction: write $x=0.a_1a_2..._3$, let $N$ first index with $a_N=1$, else $N=\infty$. Then

$$ f(x)=\sum_{n

with $a_n\in\{0,2\}$. It is constant on each removed middle third — flat almost everywhere, but still increases. Its derivative is zero where defined, yet not constant — failure of FTC without absolute continuity, directly related to Taylor's integral remainder needing better conditions.

Why Cantor matters for Taylor and Riemann

Taylor series converge except on singular sets. Cantor showed singular sets can be large in cardinality but small in measure. Riemann's zeta has analytic continuation to $\mathbb{C}\setminus\{1\}$ — its only singularity is a simple pole. But the boundary of convergence of its Taylor series at $s=2$ is $R=1$ because of that pole at $s=1$. Cantor's set theory lets us speak of sets of divergence, sets of uniqueness for trigonometric series (Cantor's original motivation for set theory!).

III. Riemann Hypothesis — Taylor's Analytic Continuation at its Extreme

For $\Re(s)>1$:

$$ \zeta(s)=\sum_{n=1}^\infty \frac1{n^s}=\prod_{p\text{ prime}}\left(1-p^{-s}\right)^{-1} $$

Euler product: analytic encodes arithmetic. Euler proved $\zeta(2)=\pi^2/6$.

Analytic continuation via Taylor

$\sum n^{-s}$ diverges for $\Re(s)\le1$. Riemann used $\Gamma$ and theta functions to continue $\zeta$ meromorphically to $\mathbb{C}$ with single pole at $s=1$, residue 1, and functional equation:

$$ \zeta(s)=2^s\pi^{s-1}\sin\frac{\pi s}{2}\Gamma(1-s)\zeta(1-s) $$

Equivalently $\xi(s)=\frac12 s(s-1)\pi^{-s/2}\Gamma(s/2)\zeta(s)$ satisfies $\xi(s)=\xi(1-s)$.

How is this Taylor? Analytic continuation is Weierstrass's process: if $f$ analytic at $a$ with radius $R$, pick $b$ inside disc, expand Taylor at $b$ with its own radius. Chain discs to cover $\mathbb{C}\setminus\{1\}$. The zeta function's Taylor at $s=2$ has radius 1 (distance to pole at 1). Re-center at $s=0$, you get larger disc. Repeating, you reach everywhere. Uniqueness of continuation uses Cantor-type identity theorem: if analytic functions agree on set with accumulation point, they agree everywhere.

Zeros and the Hypothesis

Trivial zeros: $\zeta(-2n)=0$ from $\sin$ factor. Non-trivial zeros $\rho$ lie in critical strip $0<\Re(s)<1$, symmetric about $\Re=1/2$ and about real axis. RH:

$$ \text{All non-trivial zeros }\rho\text{ satisfy }\Re(\rho)=\frac12 $$

Equivalently, error in Prime Number Theorem: $\pi(x)=\operatorname{Li}(x)+O(x^{1/2+\epsilon})$. The distribution of primes is as regular as possible.

First zeros (approx): $1/2 + i\cdot14.1347,\;21.0220,\;25.0108,\;30.4248,\;32.9350...$ — computed to $10^{13}$ zeros, all on line, but no proof.

Connection to Taylor convergence: the partial sums $\sum_{n\le N} n^{-s}$ converge only for $\Re(s)>1$. Their Taylor in $s$ about $s=2$ converges only to $|s-2|<1$. To see zeros at $\Re=1/2$, you must leave the original disc — you must analytically continue. RH is statement about where that continued function vanishes.


IV. Interactive Playground

Seven live canvases. No libraries except KaTeX.

01 TAYLOR EXPLORER

Taylor Polynomial $P_N$ → $f$

02 RADIUS & SINGULARITIES

Why $R$ is distance to nearest pole in ℂ

Black X = singularity. Blue disc = disc of convergence. For $\zeta$, pole at $s=1$ limits radius of Taylor at $2$ to $1$.
03 CANTOR SET CONSTRUCTION

Measure 0, cardinality continuum

Length remaining $(2/3)^n$, removed $1-(2/3)^n$. $2^n$ intervals. Cantor ternary expansion $0.a_1a_2..._3$ with $a_i\in\{0,2\}$.
04 CANTOR FUNCTION — Devil's Staircase

$f'=0$ a.e., yet $f(0)=0$, $f(1)=1$

Constant on each removed middle third. Continuous, monotone, not absolutely continuous — shows why Taylor integral remainder needs absolute continuity.
05 DIAGONAL ARGUMENT

$|\mathbb{R}|>|\mathbb{N}|$ live

06 ZETA — Euler product vs sum

$\zeta(s)=\sum n^{-s}=\prod_p(1-p^{-s})^{-1}$

07 CRITICAL STRIP — Zeros of ζ

RH: all non-trivial zeros have $\Re=½$

First zeros: 14.13, 21.02, 25.01, 30.42, 32.93...
Blue dots = zeros on critical line. Red region = $\Re>1$ where Euler product converges. Gray strip $0<\Re<1$. Taylor at $2$ radius 1 touches pole at 1.
08 PRIME COUNTING vs Li(x) — Why RH matters

$\pi(x)$ vs $\operatorname{Li}(x)$ error $O(x^{1/2+\epsilon})$ iff RH


V. GNU Octave Lab — Taylor, Cantor, Riemann in Code

All runnable in Octave (free) / MATLAB. Copy buttons included.

Taylor

01 Taylor polynomial evaluatorCopy
function [p, coeffs] = taylor_poly(f_handle, a, N)
% Numerical Taylor via analytic formulas for common f, not finite diff
% f_handle = 'exp','sin','cos','log','inv','inv2','atan'
% Returns function handle p(x) and coeffs c_n
  coeffs = zeros(1,N+1);
  for n=0:N
    switch f_handle
      case 'exp', coeffs(n+1)=exp(a)/factorial(n);
      case 'sin', coeffs(n+1)=sin(a+n*pi/2)/factorial(n);
      case 'cos', coeffs(n+1)=cos(a+n*pi/2)/factorial(n);
      case 'log', % f=ln(1+x), a>-1
        if n==0, coeffs(n+1)=log(1+a); else coeffs(n+1)=(-1)^(n+1)/(n*(1+a)^n); end
        if n>0 && a==0, coeffs(n+1)=(-1)^(n+1)/n; end
      case 'inv', % 1/(1-x)
        coeffs(n+1)=1/(1-a)^(n+1);
      case 'inv2', % 1/(1+x^2) - use formula via complex
        % Taylor coeffs of 1/(1+x^2) at a: not trivial, use symbolic or recurrence
        % For demo at a=0: coeffs = (-1)^k if n=2k else 0
        if a==0, coeffs(n+1)= (mod(n,2)==0)* (-1)^(n/2); else coeffs(n+1)=0; end
      case 'atan', % atan x at 0
        if mod(n,2)==1, coeffs(n+1)=(-1)^((n-1)/2)/n; else coeffs(n+1)=0; end
    end
  end
  p = @(x) polyval(fliplr(coeffs), x-a);
end
% Example:
% [p,c]=taylor_poly('exp',0,5); x=linspace(-2,2,400); plot(x,exp(x),x,p(x));
02 Plot Taylor convergence & error (exp)Copy
% Taylor convergence for e^x at a=0
a=0; x0=1.5; % evaluate at
x=linspace(-3,3,600);
f=exp(x);
figure; hold on; plot(x,f,'k-','LineWidth',2);
for N=[1 2 3 5 8]
  [p]=taylor_poly('exp',a,N);
  plot(x,p(x),'--','LineWidth',1.2);
end
legend('e^x','N=1','N=2','N=3','N=5','N=8'); grid on;
title('Taylor polynomials converging to e^x, R=\infty');

% Error vs N at x0
err=[];
for N=0:15
  [p]=taylor_poly('exp',a,N);
  err(end+1)=abs(exp(x0)-p(x0));
end
figure; semilogy(0:15,err,'o-'); grid on;
xlabel('N'); ylabel('|R_N|'); title('Lagrange remainder decays factorially');
03 Radius via ratio testCopy
% Estimate radius for 1/(1-x) and ln(1+x)
% c_n = 1 for 1/(1-x) => R=1
% c_n = (-1)^{n+1}/n for ln(1+x) => |c_{n+1}/c_n| ->1 => R=1
n=1:20;
c_log = (-1).^(n+1)./n;
ratio = abs(c_log(1:end-1)./c_log(2:end));
fprintf('ln(1+x) ratio |c_n/c_{n+1}| -> %f, R ~ %f\n', ratio(end), mean(ratio(end-5:end)));

% For 1/(1+x^2) at 0, c_{2k}=(-1)^k, c_{2k+1}=0, use root test
% limsup |c_n|^{1/n}=1 => R=1, distance to poles +-i

Cantor

04 Cantor set construction & measureCopy
function C = cantor_set(n)
% Returns intervals of C_n as Nx2 matrix
  C = [0 1];
  for k=1:n
    newC=[];
    for i=1:size(C,1)
      l=C(i,1); r=C(i,2); m=(r-l)/3;
      newC=[newC; l l+m; r-m r];
    end
    C=newC;
  end
end
% Plot
n=5; C=cantor_set(n);
figure; hold on;
for i=1:size(C,1)
  plot(C(i,:), [0 0], 'k-', 'LineWidth',4);
end
axis([0 1 -0.2 0.2]); title(sprintf('Cantor C_%d: %d intervals, total length (2/3)^%d = %.4f',n,2^n,n,(2/3)^n));

% Uncountable: map ternary 0/2 to binary
% Random point in Cantor set via random binary
randCantor = @(m) sum((randi([0 1],1,m)*2) ./ (3.^(1:m)));
05 Cantor function (Devil's staircase)Copy
function y = cantor_function(x, depth)
% Compute Cantor function via ternary expansion up to depth
  y=zeros(size(x));
  for idx=1:numel(x)
    xi=x(idx);
    % Convert to base 3
    tern=[];
    for k=1:depth
      xi=xi*3; d=floor(xi+1e-12); tern(end+1)=d; xi=xi-d;
      if d==1, break; end
    end
    % Find first 1
    pos=find(tern==1,1);
    if isempty(pos)
      % no 1, map 0->0, 2->1 binary
      bin = (tern==2);
      y(idx)=sum(bin./(2.^(1:numel(bin))));
    else
      bin=(tern(1:pos-1)==2);
      y(idx)=sum(bin./(2.^(1:numel(bin)))) + 1/(2^pos);
    end
  end
end
x=linspace(0,1,2000); y=cantor_function(x,12);
figure; plot(x,y,'LineWidth',1.5); grid on;
title('Cantor function - f''=0 a.e. but increasing'); xlabel('x'); ylabel('f(x)');
06 Diagonal argument enumerationCopy
% Cantor diagonal: show no enumeration of [0,1] can be complete
% Generate random list of reals in [0,1] and diagonalize
rng(0); N=8;
R=rand(N,1); % enumeration attempt
% Build diagonal number whose i-th digit differs from i-th digit of R_i
diagNum=0;
for i=1:N
  % get i-th decimal digit of R_i
  s=sprintf('%.10f',R(i));
  % crude: get char
  d=str2double(s(i+2)); % i-th after decimal
  if isnan(d), d=0; end
  newd=mod(d+1,10);
  if newd==d, newd=mod(d+2,10); end
  diagNum=diagNum + newd*10^(-i);
end
fprintf('Diagonal number %.10f not in list (differs at digit i)\n',diagNum);

Riemann

07 Zeta via Euler product & analytic continuation demoCopy
% zeta(s) for Re(s)>1 via sum and product
function z = zeta_sum(s, N)
  n=1:N; z=sum(n.^(-s));
end
function z = zeta_euler_product(s, primes)
  z=1;
  for p=primes
    z=z/(1-p^(-s));
  end
end
primes=[2 3 5 7 11 13 17 19 23 29 31 37 41 43 47];
s=2; fprintf('zeta(2) sum 1e5 ~ %.8f true pi^2/6=%.8f\n', zeta_sum(s,100000), pi^2/6);
fprintf('Euler product 15 primes %.8f\n', zeta_euler_product(s,primes));

% Analytic continuation via Taylor at s=2 radius 1 cannot reach 0.5
% Use functional equation to get zeta(0.5+14.1347i) ~0
% Octave symbolic or use built-in zeta if available:
% pkg load symbolic; double(zeta(sym(0.5+14.134725*i)))
% Simple check: use Euler-Maclaurin approximation for critical line

% Prime counting vs Li
function pi_x = prime_pi(n)
  pi_x=sum(isprime(1:n));
end
x=100; fprintf('pi(%d)=%d, Li approx via integral\n',x,prime_pi(x));
% Li(x) = ∫_2^x dt/log t
t=linspace(2,x,1000); Li=trapz(t,1./log(t));
fprintf('Li(%d)≈%.2f\n',x,Li);
08 Zeta zeros on critical line (requires symbolic or data)Copy
% If symbolic package available:
% pkg load symbolic
% s = 0.5 + 14.1347251417*i;
% vpa(zeta(s), 20) % should be ~0

% Load first zeros from Odlyzko data or known list:
zeros_imag = [14.13472514, 21.02203964, 25.01085758, 30.42487612, 32.93506159, 37.58617816];
% Plot critical strip
figure; hold on;
plot([0 0], [-40 40], 'k--'); plot([1 1], [-40 40], 'k--'); plot([0.5 0.5], [-40 40], 'r-', 'LineWidth',1.5);
for k=1:length(zeros_imag)
  plot(0.5, zeros_imag(k), 'bo', 'MarkerFaceColor','b');
end
xlabel('Re(s)'); ylabel('Im(s)'); title('Critical strip and zeros on Re=1/2 (RH)');
axis([ -0.5 1.5 0 40]); grid on;

% Functional equation symmetry: if rho is zero, so is 1-rho and conj(rho)

Note: Octave's base does not have $\zeta$ for $\Re(s)\le1$ without symbolic. Install pkg install -forge symbolic then pkg load symbolic to get analytic continuation via mpmath. The Euler product code above shows Taylor radius limitation — it only converges for $\Re(s)>1$, exactly the disc touching the pole at $s=1$.


VI. Tying It Together

Taylor → Cantor: Taylor convergence fails on sets. Cantor gave us sets that are large in cardinality ($2^{\aleph_0}$) but small in measure (0). The Cantor function shows a function can have Taylor series zero everywhere (derivative zero a.e.) yet climb — analyticity is strictly stronger than $C^\infty$.

Cantor → Riemann: Cantor's set theory was born from studying uniqueness sets for trigonometric series — Fourier series $\sum c_n e^{int}$ which are Taylor series on the unit circle $z=e^{it}$. Riemann's zeta is $\sum n^{-s}$, a Dirichlet series, a cousin of power series. Its analytic continuation uses the same uniqueness principle Cantor proved: if two analytic functions agree on a set with accumulation point, they are identical.

Riemann → Taylor: RH is about zeros of an analytic continuation. The continuation itself is constructed by chaining Taylor discs (Weierstrass). Each disc has radius limited by distance to nearest singularity — for $\zeta$, the pole at $s=1$ is the first obstruction. To see the critical line $\Re=1/2$, you must leave the original disc of convergence, exactly what analytic continuation does.

In one line: Cantor tells us how many points we have, Taylor tells us when knowing derivatives at one point tells us all points, Riemann shows us the most important function where that knowledge reveals the primes.

Built as single HTML with KaTeX auto-render, vanilla Canvas (no frameworks), copyable Octave. Like Euler, Riemann, and Cantor, we prefer elementary tools that handle infinity.