[Math] Uniform convergence of $\{\tanh(nx)\}_{n=0}^{\infty}$

sequences-and-seriesuniform-convergence

Quick question. How can I prove that the sequence of functions:

\begin{equation}
f_n(x)=\{\tanh(nx)\}_{n=0}^{\infty}
\end{equation}

converges uniformly to:

\begin{equation}
f(x)=\begin{cases} -1, & x<0 \\
1, & x> 0 \end{cases}
\end{equation}

and why the sequence:

\begin{equation}
f_n(x)=\{\frac{1}{2}\left(\tanh(nx)+1\right)\}_{n=0}^{\infty}
\end{equation}

does not converge uniformly but only pointwise to:

\begin{equation}
f(x)=\begin{cases} 0, & x<0 \\
1/2, & x=0 \\
1, & x>0\end{cases}
\end{equation}
Thank you for your time!

Best Answer

The first claim is false, in fact $\tanh nx \to \mathrm{sgn} x$ pointwise (with $\mathrm{sgn}(0) := 0$). Since $\tanh nx$ is continuous for all $n$ and $\mathrm{sgn}$ is not, the convergence can't be uniform.

Similarly, the second claim follows from limit arithmetics, $$\frac12 (1+\tanh nx) \to \frac12 (1+ \mathrm{sgn}(x)) = \theta(x)$$ (the latter is the Heaviside step function)

The non-uniformness can also be seen by looking at the sequence $x_n = \frac1n$. Computing $f_n(x_n) = \tanh \frac nn = \tanh 1 \ne 0$, but uniform convergence would then imply $0 = f(0) = \lim_{n\to\infty} f(x_n) = \lim_{n\to\infty} f_n(x_n) = \tanh 1$, a contradiction.

Proving the point-wise convergence is rather simple, noting that $\lim_{x\to\pm\infty} \tanh x = \pm 1$ and $\tanh 0 = 0$ we get it basically for free: $$\lim_{n\to\infty} \tanh nx = \begin{cases} \lim_{y\to-\infty} \tanh y \qquad = -1 & x < 0 \\ \tanh 0 \qquad\qquad\quad\ \ \ \, = 0 & x = 0\\ \lim_{y\to\infty} \tanh y \qquad\ \ = 1 & y > 0 \end{cases} = \mathrm{sgn}(x)$$

Related Question