User:Joker2233

Formal mathematical description of the phenomenon
Let $$f: {\mathbb R} \to {\mathbb R}$$ be a piecewise continuously differentiable function which is periodic with some period $$L > 0$$. Suppose that at some point $$x_0$$, the left limit $$f(x_0^-)$$ and right limit $$f(x_0^+)$$ of the function $$f$$ differ by a non-zero gap $$a$$:


 * $$ f(x_0^+) - f(x_0^-) = a \neq 0.$$

For each positive integer N &ge; 1, let SN f be the Nth partial Fourier series


 * $$ S_N f(x) := \sum_{-N \leq n \leq N} \hat f(n) e^{2\pi i n x/L}

= \frac{1}{2} a_0 + \sum_{n=1}^N a_n \cos\left(\frac{2\pi nx}{L}\right) + b_n \sin\left(\frac{2\pi nx}{L}\right)$$

where the Fourier coefficients $$\hat f(n), a_n, b_n$$ are given by the usual formulae


 * $$ \hat f(n) := \frac{1}{L} \int_0^L f(x) e^{-2\pi i n x/L}\, dx$$


 * $$ a_n := \frac{2}{L} \int_0^L f(x) \cos\left(\frac{2\pi nx}{L}\right)\, dx$$


 * $$ b_n := \frac{2}{L} \int_0^L f(x) \sin\left(\frac{2\pi nx}{L}\right)\, dx.$$

Then we have


 * $$ \lim_{N \to \infty} S_N f\left(x_0 + \frac{L}{2N}\right) = f(x_0^+) + a\cdot (0.089490\dots)$$

and


 * $$ \lim_{N \to \infty} S_N f\left(x_0 - \frac{L}{2N}\right) = f(x_0^-) - a\cdot (0.089490\dots)$$

but


 * $$ \lim_{N \to \infty} S_N f(x_0) = \frac{f(x_0^-) + f(x_0^+)}{2}.$$

More generally, if $$x_N$$ is any sequence of real numbers which converges to $$x_0$$ as $$N \to \infty$$, and if the gap a is positive then
 * $$ \limsup_{N \to \infty} S_N f(x_N) \leq f(x_0^+) + a\cdot (0.089490\dots)$$

and
 * $$ \liminf_{N \to \infty} S_N f(x_N) \geq f(x_0^-) - a\cdot (0.089490\dots)$$

If instead the gap a is negative, one needs to interchange limit superior with limit inferior, and also interchange the &le; and &ge; signs, in the above two inequalities.