Pointwise convergence (source code)

= Pointwise convergence
{title2=$f_n(x)\to f(x)$}
{wiki}

= Pointwise
{synonym}

For a <sequence> of <functions> $f_n:X\to\mathbb R$, <pointwise convergence> to a <function> $f:X\to\mathbb R$ means
$$
\forall x\in X\;\forall\varepsilon>0\;\exists N\in\mathbb N_{>0}\;\forall n\geq N:\quad |f_n(x)-f(x)|<\varepsilon.
$$
It is the ordinary <limit of a sequence> at each fixed input. The threshold $N=N(x,\varepsilon)$ may depend on the input. <Uniform convergence> instead requires one threshold for the entire <domain of a function>.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl/6.1 Pointwise and uniform convergence>[Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl, §6.1.1, Definition 6.1.1 and Proposition 6.1.5]{ref}

Consider the <polynomial functions> $f_n(x)=x^n$, for positive <integers> $n$, on the <interval> $[0,1]$. For $0\leq x<1$ the <geometric sequence> $(x^n)$ tends to zero, while $f_n(1)=1$. Thus
$$
f(x)=\begin{cases}0,&0\leq x<1,\\1,&x=1.\end{cases}
$$
Each $f_n$ is a <continuous function>, but its <pointwise limit> is <discontinuous> at one. Holding an input still hides what happens near that endpoint. The analogous even-power example on $[-1,1]$ appears in the source.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl/6.1 Pointwise and uniform convergence>[Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl, §6.1.1, Example 6.1.2, even powers on the interval from minus one to one]{ref}

For $0<x<1$ and $0<\varepsilon<1$, taking the <logarithm> of $x^n<\varepsilon$ and dividing by the negative <real number> $\log x$ reverses the <inequality>:
$$
n>\frac{\log\varepsilon}{\log x},\qquad N(x,\varepsilon)=\left\lfloor\frac{\log\varepsilon}{\log x}\right\rfloor+1.
$$
The <floor function> followed by adding one handles the strict <inequality> even when the ratio is an <integer>. For tolerance $\varepsilon=0.01$, the first successful indices at $x=0.5$, $0.8$, and $0.99$ are respectively $7$, $21$, and $459$. At $x=0.5$, $2^{-6}=0.015625$ fails and $2^{-7}=0.0078125$ succeeds. At $x=0$ and $x=1$, the error from this <pointwise limit> is already zero, so $N=1$ works. Nevertheless, $N(x,\varepsilon)$ grows without bound as $x\to1$ from below. A finite list of accurate test inputs cannot establish <uniform convergence>.

\Image[/powers-pointwise-limit-and-domain-endpoints.png]
{title=<Pointwise convergence> of powers changes character when the <domain of a function> stops before one}
{description=On $[0,1]$ the <pointwise limit> is zero except for its value one at the endpoint: the open circle and filled circle distinguish these values. On $[0,0.8]$ the <pointwise limit> is zero everywhere, and the largest error is $0.8^n$. All curves are original evaluations of $x^n$.}

An even sharper warning concerns <integration>. On $[0,1]$, define the <continuous functions>
$$
g_n(x)=\begin{cases}2n^2x,&0\leq x\leq1/(2n),\\2n-2n^2x,&1/(2n)\leq x\leq1/n,\\0,&1/n\leq x\leq1.\end{cases}
$$
Their <supports> are $[0,1/n]$, with height $n$ at $1/(2n)$ and value zero at both ends. Every fixed $x>0$ eventually lies beyond the <support>, and $g_n(0)=0$ always, so <pointwise convergence> gives the zero <function>. Nevertheless, each <integral> is the area of a <triangle>: $\int_0^1g_n(x)\,dx=\tfrac12(1/n)n=\tfrac12$. Shrinking width compensates increasing height. Hence the <limit of a sequence> of these <integrals> differs from the <integral> of the <pointwise limit>; interchanging them requires additional conditions, such as <uniform convergence preserves integrals on a compact interval>.