m , MATHEMATICA tutorial, Part 2.5: Pointwise convergence

Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the first course APMA0330
Return to the main page for the second course APMA0340
Return to the main page for the fourth course APMA0360
Return to Part V of the course APMA0340
Introduction to Linear Algebra with Mathematica

Preface


There are know many sufficient conditions for a complex-valued, periodic function f to be equal to the sum of its Fourier series at a point of continuity. Moreover, the behavior of the Fourier series at points of discontinuity is determined as well (it is the midpoint of the one-sided values of the discontinuity).

Our objective is not to obtain the most general, or most difficult, convergence theorems. Rather, we will concentrate our attention on a few simple yet widely applicable tests for pointwise convergence while illustrating the essential ideas. Therefore, this section presents four famous tests of pointwise convergence of the Fourier series: a class of piecewise smooth functions, the Dirichlet conditions, the bounded variation condition or the Jordan test, and Dini's test. All these classes of functions belong to the wider space of absolutely integrable functions, denoted as 𝔏¹. The following example shows that the Fourier series may converge (but very slowly) to a function outside 𝔏¹.

Example 1: We consider the function \[ f(x) = \begin{cases} \frac{\sin (1/x)}{|x|\,\ln (1/|x|)} , &\quad 0 < |x| < e^{-2} , \\ 0, &\quad e^{-2} \le |x| \le \pi \end{cases} \] that was considered previously in Example 2 of section. The given function is not absolutely integrable, but its sine Fourier coefficients exist: \[ b_n = \frac{2}{\pi} \int_0^{\pi} f(x)\,\sin (nx)\,{\text d}x = \frac{2}{\pi} \int_0^{1/e^2} \,\frac{\sin (1/x)}{x\,\ln (1/x)}\ \sin (nx)\,{\text d}x . \] By changing variable x = 1/t, we get \[ b_n = \frac{2}{\pi} \int_{e^2}^{\infty} a_n (t)\,\sin t\,{\text d}t, \qquad a_n (t) = \frac{\sin (n/t)}{t\,\ln t} . \] Tail of this integral is easy bounded on interval [e², ∞). For t ≥ 2n, we have |n/t| ≤ ½, so |sin(n/t)| ≤ n/t. Thus, \[ | a_n (t) | \le \frac{n/t}{t\,\ln t} = \frac{n}{t^2 \ln t} . \] Hence, \[ \left\vert \int_{2n}^{\infty} a_n (t) \,\sin t \,{\text d}t \right\vert \le \int_{2n}^{\infty} \frac{n}{t^2 \ln t}\,{\text d}t \le \frac{1}{\ln n} . \] So the tail contributes O(1/lnn).

The main part of the integral e² ≤ t ≤ 2n has the Dirichlet-type estimate. On interval [e², 2n], we have \[ \left\vert a_n (t) \right\vert \le \frac{1}{t\,\ln t} , \] and 𝑎ₙ(t) is slowly varying and of size ∼ 1/(tlnt). Write \[ \int_{e^2}^{2n} a_n (t)\,\sin t\,{\text d}t \] as a Dirichlet-type integral containing sint oscillates, while 𝑎ₙ(t) is monotone in t for fixed n and tends to zero as t → ∞. A standard Dirichlet argument gives \[ \left\vert \int_{e^2}^{2n} a_n (t)\,\sin t\,{\text d}t \right\vert \le \sup_{e^2 \le t \le 2n} \ |A_n (t) | , \] where derivative of Aₙ(t) is equal to 𝑎ₙ(t). A direct estimate of Aₙ(t) (integrating 𝑎ₙ(t) once and using |sin(n/t)| ≤ 1) yields \[ \left\vert A_n (t) \right\vert \le \int_{e^2}^{2n} \frac{{\text d}t}{t\,\ln t} \,\sim\, \ln\,\ln (2n) - \,\ln (e^2 ) \,\sim \,\ln\,\ln n . \] However, the dependence on n/t in sin(n/t) actually improves this estimate: for large n, the effective contribution comes from t of order n, and a refined estimate (using the same substitution u = n/t inside Aₙ(t)) shows \[ \left\vert \int_{e^2}^{2n} a_n (t)\,\sin t\,{\text d}t \right\vert \le \frac{1}{\ln n} . \] Heuristically, the extra oscillation in sin(n/t) kills the slow ln lnn growth and leaves a 1/lnn scale.

Combining both estimates, we obtain \[ | b_n | \le c_1 \frac{1}{\ln n} + c_2 \frac{1}{\ln n} \le c_3 \frac{1}{\ln n} . \]

  • All Fourier sine coefficients exist,
  • they decay very slowly, like O(1/lnn),
  • the Fourier series is not absolutely convergent---it is only conditionally convergent and converges very delicately,
  • partial sums exhibit strong oscillations and very slow convergence—this is convergence in a highly non‑uniform, fragile sense.
So we know that if x ≠ 0, the function is smooth in a neighborhood of x. Classical Dirichlet--Jordan theory applies:
  • f is piecewise ℭ¹ away from 0,
  • the Fourier series converges to f(x) at every such point.
So for every x ≠ 0, \[ S_N (x;f) \,\to\, f(x) \qquad \mbox{as } N\to\infty . \] At x = 0, every term in partial Fourier sum \[ S_N (x;f) = \sum_{n\ge 1} b_n \sin (nx) \] is zero; so the series converges to f(0) = 0. However, the Fourier series does not converges uniformly near x = 0 because coefficients decay too slowly. The uniform convergence requires bₙ = o(1/n). Thus:
  • The partial sums oscillate violently near x = 0,
  • The Gibbs phenomenon becomes unbounded in a shrinking neighborhood of x = 0,
  • convergence is pointwise but not uniform, and not even locally uniform near 0.
  • classical Fejér or Lebesgue theorems do not apply,
  • function f does not belong to 𝔏¹,
  • but the Fourier series does converge in the sense of distributions.
f[x_] = Piecewise[{{Sin[1/x]/Abs[x]/Log[1/Abs[x]], 0 < Abs[x] < Exp[-2]}}]; Plot[f[x], {x, 0, 0.2}, PlotStyle -> Thick, PlotRange -> {-20, 10}]
b[n_] = 2*NIntegrate[f[x]*Sin[n*x], {x, 0, Exp[-2]}]/Pi; S20[x_] = Sum[b[n]*Sin[n*x], {n, 1, 20}]; Plot[S20[x], {x, 0, 0.5}, PlotStyle -> Thick, PlotRange -> {-0.2, 0.6}]

Figure 1.1A: Plot of function f.
     
Figure 1.1B: 20-term Fourier approximation.

ClearAll[f, bn, S20]; (* Function *) f[x_] := Piecewise[ {{Sin[1/x]/(Abs[x] Log[1/Abs[x]]), 0 < Abs[x] < Exp[-2]}}, 0 ]; (* Sine Fourier coefficients on [0, Pi] *) bn[n_] := (2/Pi) ( NIntegrate[ Sin[1/x]/(x Log[1/x]) Sin[n x], {x, 0, 0.01}, WorkingPrecision -> 40, AccuracyGoal -> 12, PrecisionGoal -> 12, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0} ] + NIntegrate[ Sin[1/x]/(x Log[1/x]) Sin[n x], {x, 0.01, Exp[-2]}, WorkingPrecision -> 30, AccuracyGoal -> 12, PrecisionGoal -> 12 ] ); S20[x_] := Evaluate@Sum[bn[n] Sin[n x], {n, 1, 20}];
   ■
End of Example 1

Pointwise convergence of Fourier Series


We consider four classes of functions for which pointwise convergence of Fourier series is guaranteed. If function 𝑓(𝑥) is continuous on interval [𝑎, b], we abbreviate it as 𝑓 ∈ ℭ([𝑎, b]). If 𝑓 and its derivative are continuous on interval [𝑎, b], then function 𝑓 is called ℭ¹.

A sequence of functions { 𝑠₀(𝑥), 𝑠₁(𝑥), 𝑠₂(𝑥), … } is said to converge pointwise to 𝑓(𝑥) on the interval [𝑎, b] if for each fixed 𝑥 in the interval, \[ \lim_{n\to \infty}\,\left\vert f(x) - s_n (x) \right\vert \,=\, 0 . \]
Throughout, we will use the following notation:
\[ f(x-0) = f(x^{-}) = \lim_{\varepsilon \downarrow 0}\,f(x-\varepsilon ) , \qquad f(x+0) = f(x^{+}) = \lim_{\varepsilon \downarrow 0}\,f(x +\varepsilon ) , \]
provided these limits exist and are finite (notation ε ↓ 0 indicates that ε approaches 0 from above). The former is called the left-hand limit of function f at the point x, and the latter is called the right-hand limit of f at x. At continuity points, we have
\[ f(x-0) = f(x) = f(x+0) \qquad \mbox{or} \qquad f(x^{-}) = f(x) = f(x^{+}) . \]
If 𝑥₀ is a point of discontinuity of function f, then the right-hand and left-hand limits (either or both of them) may exist in some cases and fail to exist in others. If both limits exist, we say that the point x₀ is a point of discontinuity of the first kind, or jump discontinuity or simply jump. If at least one of these limits does not exist, then the point is called a point of discontinuity of the second kind. We are mostly interested in jump discontinuities. If 𝑥₀ has both both limits from left and right, then the quantity
\[ f\left( x_0 +0 \right) - f\left( x_0 -0 \right) \]
is called the jump of the function at 𝑥₀. The following example illustrates this situation.

Example 2: Suppose that \[ f(x) = \begin{cases} (x-1)^2 , &\quad \mbox{for }\ x < 1 , \\ \frac{1}{2} , &\quad \mbox{if } \ x = 1 , \\ \sqrt{x} , &\quad \mbox{for }\ x > 1 , \end{cases} \] where √x indicate a positive branch of the square root function. The graph of the function is shown below.

f[x_] := Piecewise[{{(x - 1)^2, x < 1}, {1/2, x == 1}, {Sqrt[x], x > 1}}]; Plot[f[x], {x, 0, 2}, PlotRange -> {0, 2}, PlotStyle -> Thick, Epilog -> { Red, Disk[{1, 1/2}, 0.03], (* red disk at (1, 1/2) *) Black, Text["1/2", {1, 1/2}, {1.5, -1}] (* label slightly offset *) } ]

   Fig 2.1. Graph of discontinuous function.

The value of the function at x = 1 is signified by a little circle. At x = 1, the left-hand and right-hand limits are \[ f(1-0) = 0, \qquad f(1+0) = 1 . \] Therefore, the jump of the function at x = 1 is \[ \Delta f = f(1+0) - f(1-0) = 1 , \] which is in complete agreement with the intuitive idea of a jump discontinuity.

On the other hand, the tangent function has infinite discontinuity of the second kind at points π/2 ±kπ, k = 0, 1, 2, …. So one-sided limits do not exist at these points.    ■

End of Example 2
In geometrical terms, continuity is indication that curve y = 𝑓(𝑥) has no jumps or breaks at some poins. In studying the smoothness of a curve, we also interested in other types of discontinuities, such as corners or sudden changes of directions of tangents. Mathematically, this is equivalent to determing whether the derivative of a function is continuous: usually, a function is said to be smooth on an interval [𝑎, 𝑏] if its derivative is continuous at every point 𝑥 ∈ [𝑎, 𝑏].

In order to measure the smoothness of a function in a broad sense, we use the notation ℭⁿ([𝑎, 𝑏]) to represent a class of functions whose up to 𝑛-th order derivatives all exist and are continuous in the interval [𝑎, 𝑏]; specifically, ℭ⁰ or simply ℭ denotes the space of continuous functions, and ℭ¹([𝑎, 𝑏]) the space of continuously differentiable functions.

If f(x) is a function that is continuous on the finite (symmetric) interval [−ℓ, ℓ], then if f(−ℓ) ≠ f(ℓ), jump discontinuities appear in making the periodic extension of f(x) from [−ℓ, ℓ] onto the whole axis, and all jump discontinuities are equal to

\[ \Delta f = f(\ell +0) - f(\ell -0 ) . \]

Piecewise smooth functions 𝔓ℭ¹


Before we start working with three advanced sufficient tests, it is important to establish simple criteria that determine when a Fourier series converges.

A real-valued function f is said to be smooth on the finite interval [𝑎, b] if it has a continuous derivative on [𝑎, b]. In geometrical language, this means that the direction of the tangent changes continuously, without jumps, as it moves along the curve y = f(x). Thus, the graph of a smooth function is a continuous curve without any corners (points where the curve has two distinct tangents).

A function f defined on [𝑎, b] is called piecewise continuous on this interval if
  1. there is a subdivision 𝑎 = x₀ < x₁ < ⋯ < xₙ = b such that f is continuous on each subinterval Iₖ = { x : x-₁ < x < xₖ } and
  2. at each of the subdivision points x₀, x₁, … , xₙ both one-sided limits of f exist. At end points, it is required existence of one-sided limits 𝑓(𝑎+0) and 𝑓(b−0).
A function f is piecewise smooth on an interval [𝑎, b] if both f and its derivative f′ are piecewise continuous on the interval. The set of piecewise smooth functions is abbreviated as 𝔓ℭ¹([𝑎, b]).

Note that the existence (in defintion above) of the one-sided limits 𝑓(𝑥ₖ − 0) and 𝑓(𝑥ₖ + 0) implies that 𝑓 can be extended as a continuous function to each closed subinterval of the partition. It is not essential that the function even be defined at the partition point 𝑥ₖ. If at this point, the function is discontinuous, its derivative does not exist, but 𝑓′ remains piecewise continuous if one sided limits exist.

The graph of a piecewise smooth function is either a continuous curve or a discontinuous curve that can have a finite number of corners (at which the derivative has jumps). As one approaches any discontinuity or corner (from one side or the other), the direction of the tangent approaches a definite limiting position, since the derivative can have only jump discontinuities. Thus, 𝑓 ∈ 𝔓ℭ¹ is bounded, and, since it has only a finite number of discontinuities, it is integrable.

A continuous or discontinuous function f that is defined on the whole axis ℝ is called piecewise smooth if it is piecewise smooth on every interval of finite length. In particular, this concept applies to periodic functions. Every piecewise smooth function f is bounded and has a bounded derivative everywhere, except at its corners and points of discontinuity (at all these points, derivative f′(x) does not exist).

Example 3: This example illustrates the concepts of continuous, discontinuous, and piecewise smooth functions by presenting graphs of the functions. We start with function 𝑓(𝑥) = sin(1/𝑥), which is continuous on semi-open interval (0, 1], but discontinuous on closed interval [0, 1]. Another high-oscillating function 𝑔(𝑥) = 𝑥³sin(1/𝑥) is continuous on [0, 1]; since its derivative is also continuous, 𝑔(𝑥) ∈ ℭ¹([0, 1]).

Plot[Sin[1/x], {x, 0, 1}, PlotStyle -> Thick] Plot[x^3 *Sin[1/x], {x, 0, 0.02}, PlotStyle -> Thick]

Figure 3.1: Continuous function sin(1/𝑥) on semiopen interval (0, 1].
     
Figure 3.2: Continuous function 𝑥³sin(1/𝑥) ∈ ℭ¹([0, 1]).

Next two functions contain corner points, and their derivatives are piecewise continuous. First, we consider the function that is built from two trigonometric function, meeting at one point (π/2, 1) at different engle: \[ f(x) = \begin{cases} \sin x , \quad & \mbox{for } 0 \le x \le \pi /2 , \\ 1 + \cos x , \quad & \mbox{for } \pi /2 \le x \le \pi . \end{cases} \] This function is continuous, with one coner point. However, its derivative \[ f' (x) = \begin{cases} \cos x , \quad & \mbox{for } 0 \le x \le \pi /2 , \\ -\sin x , \quad & \mbox{for } \pi /2 \le x \le \pi , \end{cases} \] is discontinuous, with finite jum discontinuity at 𝑥 = π/2. Therefore, function 𝑓 is piecewise smooth ℭ¹.

Plot[{Piecewise[{{Sin[x], 0 <= x <= Pi/2}}], Piecewise[{{Cos[x] + 1, Pi/2 <= x <= Pi}}]}, {x, 0, Pi}, PlotStyle -> {Directive[Blue, Thickness[0.013]], Directive[Red, Thickness[0.012]]}, PlotLegends -> {"sin(x) on [0, \[Pi]/2]", "cos(x)+1 on [\[Pi]/2, \[Pi]]"}]

Figure 3.3: Piecewise smooth function f.
     
Figure 3.4: Derivarive of function f.

Our next function is discontinuous, with piecewise continuous derivative: \[ g(x) = \begin{cases} \sin x , \quad & \mbox{for } 0 \le x \le \pi /2 , \\ \cos x , \quad & \mbox{for } \pi /2 \le x \le \pi , \\ \frac{2}{\pi}\,x -3 , \quad & \mbox{for } \pi \le x \le 2\pi . \end{cases} \] This function has finite jump at 𝑥 = π/2 and the corner point at 𝑥 = π, where tangent lines do not match. Its derivative \[ g' (x) = \begin{cases} \cos x , \quad & \mbox{for } 0 \le x \le \pi /2 , \\ -\sin x , \quad & \mbox{for } \pi /2 \le x \le \pi , \\ \frac{2}{\pi} , \quad & \mbox{for } \pi \le x \le 2\pi , \end{cases} \] has two jump points, at 𝑥 = π/2: \[ \Delta g\left( \frac{\pi}{2} \right) = g\left( \frac{\pi}{2} +0 \right) - g\left( \frac{\pi}{2} -0 \right) = (-1) - 0 = -1 , \] and at 𝑥 = π: \[ \Delta g\left( \pi \right) = g\left( \pi +0 \right) - g\left( \pi -0 \right) = 1 . \] So this function is piecewise smooth ℭ¹.

Plot[{Piecewise[{{Sin[x], 0 <= x <= Pi/2}}], Piecewise[{{Cos[x], Pi/2 <= x <= Pi}}], Piecewise[{{2*x/Pi - 3, Pi <= x <= 2*Pi}}] }, {x, 0, 2*Pi}, PlotStyle -> {Directive[Blue, Thickness[0.013]], Directive[Red, Thickness[0.012]], Directive[Purple, Thickness[0.013]]}, PlotRange -> All, PlotLegends -> {"sin(x) on [0, \[Pi]/2]", "cos(x) on [\[Pi]/2, \[Pi]]", "2x/\[Pi]-3 on [\[Pi], 2\[Pi]]"}]

Figure 3.5: Piecewise smooth function g.
     
Figure 3.6: Derivative of function g.

Finally we plot two continuous functions, but they are not piecewise smooth because their derivatives have infinite discontinuities (slopes are vertical) at point 𝑥 = 0. Recall that piecewise smooth ℭ¹ functions have one-side limits at every point.

\[Alpha] = 1/3; f1[x_] := 1 - x^\[Alpha]; (*right branch*) f2[x_] := 1 - (-x)^\[Alpha]; (*left branch*) Plot[{f1[x], f2[x]}, {x, -1, 1}, PlotStyle -> {Red, Red}, PlotRange -> {0, 2}, Axes -> False, Frame -> True, Exclusions -> None, PlotStyle -> {Thickness[0.02], Thickness[0.02]}]
fRight[x_] := Surd[x, 3]; fLeft[x_] := -Surd[-x, 3]; Plot[{fRight[x], fLeft[x]}, {x, -1, 1}, PlotStyle -> {Directive[Red, Thickness[0.015]], Directive[Red, Thickness[0.015]]}, PlotRange -> All, Exclusions -> None, Axes -> False, Frame -> True ]

Figure 3.7: Continuous but not piecewise smooth function.
     
Figure 3.8: Continuous but not piecewise smooth 𝑥1/3.

   ■
End of Example 3

If a piecewise smooth function 𝑓 has period 2ℓ, then we make the substitution 𝑥 = (ℓ/π) 𝑡. Thus, we define the function 𝑔 by

\[ g(t) = f \left( \frac{\ell}{\pi} \, t \right) , \qquad -\pi \le t \le \pi . \]
It may be observed that 𝑔 is piecewise smooth with period 2π. Moreover, since x = (ℓ/π) 𝑡 is just a change of scale, the points of continuity for 𝑓(𝑥) become points of continuity for 𝑔(𝑡) = f[(ℓ/π) 𝑡] and vice versa. Also, the values of one-sided limits are unchanged: 𝑔(𝑡 — 0) = 𝑓(𝑥 − 0) and 𝑔(𝑡 + 0) = 𝑓(𝑥 + 0).

Lemma 1: Let ϕ : [−ℓ, ℓ] → ℝ be a piecewise ℭ¹ function such that ϕ(0) = 0. Then \[ \int_{-\ell}^{\ell}\,\phi (u)\, D_n (u)\,{\text d}u \,\to\, 0 \quad \mbox{as }\ n\to \infty , \] where 𝐷ₙ(u) is the Dirichlet kernel, \[ D_n (u) = \frac{1}{2} + \sum_{k= 1}^n \cos (ku) = \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)} . \]
Define \[ g(u) = \frac{\phi (u)}{2\,\sin (u/2)} . \] Since ϕ is differentiable at 0 (at every side) and ϕ(0) = 0, we have \[ \phi (u) = u\,\psi (u) , \] where ψ is continuous at 0 (indeed, ψ(0) = ϕ′(0)). Also, for small u, \[ \sin (u/2) = \frac{u}{2} + O\left( u^3 \right) . \] Hence, for small u ≠ 0, \[ g(u) = \frac{u\,\psi (u)}{2\,\sin (u/2)} = \frac{u\,\psi (u)}{u + O\left( u^3 \right)} = \psi (u) + O\left( u^2 \right) . \] So
  • 𝑔(u) has a finite limit as u → 0,
  • we define 𝑔(0) = ϕ′(0) to make 𝑔 continuous at 0.
Thus, 𝑔(u) is ℭ¹ piecewise. Now we rewrite \[ \phi (u)\,D_n (u) = g(u)\,\sin \left( n + \frac{1}{2} \right) u. \] So \[ I_1 = \int_{-\delta}^{\delta} \, g(u)\, \sin\lambda_n u\,{\text d}u , \qquad \lambda_n = n + \frac{1}{2} . \] Integration by parts yields \[ I_1 (n) = \left[ - \frac{g(u)\,\cos (\lambda_n u)}{\lambda_n} \right]_{-\delta}^{\delta} + \frac{1}{\lambda_n} \,\int_{-\delta}^{\delta} g' (u)\,\cos (\lambda_n u)\,{\text d}u . \] It is clear that the boundary term is bounded by constant/λₙ, which is equivalent to constant/n.

Since the derivative of 𝑔 is absolutely integrable, so 𝑔′ ∈ 𝔏XS¹([−ℓ, ℓ]), we conclude that \[ \left\vert \frac{1}{\lambda_n} \,\int_{-\delta}^{\delta} g' (u)\,\cos (\lambda_n u)\,{\text d}u \right\vert \le \frac{C}{\lambda_n} \,\to\,0 . \]

Theorem 1: Let 𝑓 : [−ℓ, ℓ] → ℝ be piecewise smooth (piecewise ℭ¹ with finitely many jump discontinuities). Then its Fourier series \begin{equation} \label{EqPoint.1} \frac{a_0}{2} + \sum_{n\ge 1} a_n\,\cos \left( n\,\frac{\pi}{\ell}\,x \right) + b_n\,\sin \left( n\,\frac{\pi}{\ell}\,x \right) , \end{equation} where coefficients are given by the Euler--Fourier formulas
\begin{equation} \label{EqPoint.2} \begin{split} a_n &= \frac{1}{\ell}\,\int_{-\ell}^{\ell} f(x)\,\cos \left( n\,\frac{\pi}{\ell}\,x \right) {\text d}x , \qquad n=0,1,2,\ldots , \\ b_n &= \frac{1}{\ell}\,\int_{-\ell}^{\ell} f(x)\,\sin \left( n\,\frac{\pi}{\ell}\,x \right) {\text d}x , \qquad n=1,2,\ldots . \end{split} \end{equation}
converges pointwise to the 2ℓ-periodic function having the following values:
  1. f(x) if x is a point of continuity;
  2. ½(f(x + 0) + f(x − 0)) if x is a point of discontinuity.
  3. ½(f(−ℓ + 0) + f(ℓ − 0)) for 𝑥 = ±ℓ.

It is convenient to introduce the 2ℓ-periodic extension of function 𝑓(𝑥): \[ F(x+2k\,\ell ) = f(x) , \qquad x \in [-\ell , \ell ], \quad k \in \mathbb{Z} . \] The n-th Fourier partial sum can be represented via the Dirichlet kernel (see section) \[ S_n (x) = \frac{1}{\ell} \,\int_{-\ell}^{\ell} \, f(t)\, D_n \left( \frac{\pi}{\ell}\left( x-t \right) \right) {\text d}t , \] where \[ D_n (u) = \frac{1}{2} + \sum_{k=1}^n \cos (ku) = \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)} . \] We fix 𝑥 ∈ ℝ and analyze the partial sum Sₙ(𝑥) as n → ∞.

Choosing some small δ > 0, we split the integral \[ S_n (x) = I_1 (x) + I_2 (x) , \] where \begin{align*} I_1 (x) &= \frac{1}{\ell}\,\int_{|t-x| \le \delta} \ F(t)\,D_n \left( \frac{\pi}{\ell}\left( x-t \right) \right) {\text d}t , \\ I_2 (x) &= \frac{1}{\ell}\,\int_{|t-x| \ge \delta} \ F(t)\,D_n \left( \frac{\pi}{\ell}\left( x-t \right) \right) {\text d}t . \end{align*} Since the far part I₂(x) approaches zero as n → ∞ according to the Riemann-Lebesgue lemma, we concentrate our attention on the near part I₁(x).

Upon adding and subtracting F(𝑥), we get \[ S_n (x) = F(x)\cdot \frac{1}{\ell} \,\int_{-\ell}^{\ell} \,D_n \left( \frac{\pi}{\ell} \left( x-t \right) \right) {\text d}t + \frac{1}{\ell} \,\int_{-\ell}^{\ell} \left( F(t) - F(x) \right) D_n \left( \frac{\pi}{\ell} \left( x-t \right) \right) {\text d}t . \] The first integral equals 1 (mass of the Dirichlet kernel over a period), so that is exactly 𝐹(𝑥). For the second term, change variable \[ u = \frac{\pi}{\ell} \left( x-t \right) , \] and define \[ \phi (u) = F \left( x - \frac{\ell}{\pi}\,u \right) - F(x) . \] Then ϕ(0) = 0, and under the hypothesis that 𝐹 is piecewise ℭ¹, ϕ is piecewise ℭ¹ and differentiable at 0. The second term becomes a constant multiple of \[ \int_{-\pi}^{\pi} \phi (u)\, D_n (u)\,{\text d}u , \] which tends to zero by the lemma.

Hence, \[ S_n (f) \,\to\, F(x) \qquad \mbox{as }\ n \to \infty. \] i.e. the Fourier series converges to 𝑓(𝑥) at a continuity point.

Let us fix 𝑥 where 𝐹 has a jump discontinuity, with one-sided limits \[ F(x-0) = \lim_{h \uparrow x} \, F(h) , \qquad F(x-0) = \lim_{h \downarrow x} F(h) . . \] As before \[ S_n (x) = \frac{1}{\pi}\,\int_{-\pi}^{\pi} \,F \left( x - u\,\frac{\ell}{\pi} \right) D_n (u) \,{\text d}u . \] Define \( \displaystyle \quad G(u) = F \left( x - u\,\frac{\ell}{\pi} \right) . \quad \) Then G is 2π-periodic piecewise ℭ¹ function, and has a jump at u = 0 corresponding to the jump of 𝐹 at 𝑥: \[ G(0-0) = F(x+0) , \qquad G(0+0) = F(x-0) \] because u > 0 corresponds to 𝑡 > x. Hence, \[ S_n (x) = \frac{1}{\pi}\,\int_{-\pi}^{\pi} \, G(u)\,D_n (u)\,{\text d}u . \] Let \[ A = \frac{G(0-0) + G(0+0)}{2} = \frac{F(x-0) + F(x+0)}{2} . \] Write \[ G(u) = A + \psi (u) , \] so that \[ \psi (0-0) = \frac{G(0-0) - G(0+0)}{2} , \quad \psi (0+0) = \frac{G(0+0) - G(0-0)}{2} , \] and in particular ψ(0-0) = −ψ(0+0). Then \[ S_n (x) = \frac{A}{\pi}\, \int_{-\pi}^{\pi} \, D_n (u)\,{\text d}u + \frac{1}{\pi}\, \int_{-\pi}^{\pi} \, \psi (u) \,D_n (u)\,{\text d}u \] The first integral is π, so that term is exactly A. So \[ S_n (x) = A + \frac{1}{\pi}\, \int_{-\pi}^{\pi} \, \psi (u) \,D_n (u)\,{\text d}u . \] Hence, it remains to show that the second integral tends to 0 as n → ∞. The function ψ is piecewise ℭ¹ and has opposite one-sided limits at 0. Define two functions on [0, π] and [−π, 0]:

  • On (0, π):     ψ+(u) = ψ(u).
  • On (−π, 0):     ψ-(u) = ψ(u).
Now define
  • ϕ+(u) = ψ+(u) − ψ(0+0),     u ∈ [0, π];
  • ϕ-(u) = ψ-(u) − ψ(0-0),     u ∈ [−π, 0].
Then
  • ϕ+ is piecewise ℭ¹ on [0, π], differentiable at 0, and ϕ+(0) = 0.
  • ϕ- is piecewise ℭ¹ on [−π, 0], differentiable at 0, and ϕ-(0) = 0.
Extend ϕ+ and ϕ- on [−π, π] by zero outside their half-intervals; they still satisfy the hypothesizes of the lemma (piecewise ℭ¹. differentiable at 0, ϕ+(0) = 0).

Now split the integral: \[ \int_{-\pi}^{\pi}\, \psi (u)\,D_n (u) \,{\text d}u = \int_{-\pi}^{0}\, \psi (u)\,D_n (u) \,{\text d}u + \int_{0}^{\pi}\, \psi (u)\,D_n (u) \,{\text d}u . \] On (0, π), \[ \psi (u) = \phi_{+} (u) + \psi (0+0) ; \] on (−π, 0), \[ \psi (u) = \phi_{-} (u) + \psi (0-0) . \] So \begin{align*} \int_{-\pi}^{\pi}\, \psi (u)\,D_n (u) \,{\text d}u &= \int_{-\pi}^{0}\, \phi_{-} (u)\,D_n (u) \,{\text d}u + \int_{0}^{\pi}\, \phi_{+} (u)\,D_n (u) \,{\text d}u \\ & \quad + \psi (0-0)\, \int_{-\pi}^{0}\,D_n (u) \,{\text d}u + \psi (0+0)\,\int_{0}^{\pi}\, D_n (u) \,{\text d}u \end{align*} By the lemma we proved (with derivative), applied separately to ϕ+ and ϕ-, we have \[ \int_{-\pi}^{0}\, \phi_{-} (u)\,D_n (u) \,{\text d}u \to 0, \quad \int_{0}^{\pi}\, \phi_{+} (u)\,D_n (u) \,{\text d}u \to 0. \] For the remaining terms, we use the symmetry of the Dirichlet kernel, which is even: \[ \int_{-\pi}^{0}\,D_n (u) \,{\text d}u = \int_{0}^{\pi}\, D_n (u) \,{\text d}u = \frac{\pi}{2} . \] So the last two terms combine to \[ \psi (0-0) \cdot \frac{\pi}{2} + \psi (0+0) \cdot \frac{\pi}{2} = \frac{\pi}{2} \left( \psi (0-0) + \psi (0+0) \right) = 0 \] because ψ(0-0) = −ψ(0+0). Thus, \( \displaystyle \quad \int_{-\pi}^{\pi} \psi (u) \,D_n (u)\,{\text d}u \,\to\, 0 \quad \) and therefore \[ S_n (x) \,\to\, \frac{F(x-0) + F(x+0)}{2} . \] This proves the jump-point case.

On [−ℓ, ℓ], the Fourier series is 2ℓ-periodic, and so is 𝐹. The points 𝑥 = −ℓ and 𝑥 = ℓ are the same points on the circle.

Let us look at 𝑥 = ℓ. The one-sided limits of 𝐹 there are:

  • From the left:     𝐹(ℓ−0) = 𝑓(ℓ−0).
  • From the right by periodicity, 𝑥 = ℓ − 0 corresponds to 𝑥 = −ℓ + 0, so \[ F(\ell +0) = F(-\ell +0 ) = f (-\ell + 0) . \]
Hence, at 𝑥 = ℓ, the jump average is \[ \frac{F(\ell -0) + F(\ell +0)}{2} = \frac{f(-\ell +0) + f(\ell -0)}{2} . \] The same value appears at 𝑥 = −ℓ since the Fourier series is periodic. By jump-point result we just proved (applied to the point 𝑥 = −ℓ on the circle) that \[ S(\ell ) = S(-\ell ) = \frac{f(-\ell +0) + f(\ell -0)}{2} . \]
This theorem can be reformulated as follows.

Theorem 2: Let 𝑓 be an absolutely integrable function of period 2ℓ. Then as every point where 𝑓(𝑥) has a right-hand and a left-hand derivative, the Fourier series of 𝑓 converges to the value \[ \frac{f(x+0) + f(x-0)}{2} . \]
Note:    Hypothesis of periodicity of function 𝑓 is redundant.

Let 𝑥 be a continuity point of 𝑓(𝑥), where the right-hand and left-hand derivatives exist: \begin{align*} f'_{+} (x) &= \lim_{u\downarrow 0} \ \frac{f(x+u) - f(x+0)}{u} , \\ f'_{-} (x) &= \lim_{u\downarrow 0} \ \frac{f(x-u) - f(x-0)}{u} . \end{align*} We have to prove that \[ \lim_{n\to \infty} \ S_n (x) = f(x) , \qquad S_n (x) = \frac{a_0}{2} + \sum_{k=1}^n a_k \sin kx + b_k \sin kx. \] As usual, for simplicity, we assume that ℓ = π. Using the formula for the Dirichlet kernel \[ S_n (x) = \frac{1}{\pi}\,\int_{-\pi}^{\pi} f(x+u)\,D_n (u) \,{\text d}u , \qquad D_n (u) = \frac{\sin \left( n+\frac{1}{2} \right) u}{2\,\sin (u/2)} , \] and the property that the integral of the Dirichlet kernel over period length is 1, we can write \[ \lim_{n\to\infty}\ \frac{1}{\pi}\,\int_{-\pi}^{\pi}\.\left[ f(x+u) - f(x) \right] \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)}\,{\text d}u = 0 . \tag{1} \] We show that the function \[ \phi (u) = \frac{f(x+u) - f(x)}{2\,\sin (u/2)} = \frac{f(x+u) - f(x)}{u} \cdot \frac{u}{2\,\sin (u/2)} \] (𝑥 fixed) is absolutely integrable. Since 𝑓(𝑥) has a right-hand and a left-hand derivative at the point 𝑥, the ratio \[ \frac{f(x+u) - f(x)}{u} \tag{2} \] remains bounded as u → 0. This means that there exists a number δ > 0 such that \[ \left\vert \frac{f(x+u) - f(x)}{u} \right\vert \leqslant M \] for −δ ≤ u ≤ δ with some positive constant M. If u ≠ 0, this ratio has discontinuities only where 𝑓(x + u) is discontinuous. However, 𝑓(x + u) is absolutely integrable because 𝑓(x) is absolutely integrable , and hence can have only a finite number of discontinuities. Therefore, the ratio (2) is absolutely integrable on [−δ, δ].

Outside [−δ, δ], the ratio (2) is absolutely integrable as being the product of two absolutely integrable functions, 𝑓(x + u) − 𝑓(x) and bounded function 1/u (|u| ≥ δ implies 1/|u| ≤ 1/δ). Thus, ratio (2) is absolutely integrable both on [−δ, δ] and outside [−δ, δ], and hence is absolutely integrable on [−π, π].

On the other hand, the function \[ \frac{u}{2\,\sin (u/2)} \] is continuous for u ≠ 0 and approaches 1 as u → 0, and therefore is a bounded continuous function, which is undefined only for u = 0. Hence, function ϕ(u) is defined in interval [−π, π] and absolutely integrable, being the product of the absolutely integrable function (2) and the bounded function discussed above.

Since ϕ(u) is absolutely integrable, we have \[ \int_{-\pi}^{\pi}\, \left[ f(x+u) - f(x) \right] \frac{\sin \left( n + \frac{1}{2}\right) u}{2\,\sin (u/2)}\ {\text d}u = \int_{-\pi}^{\pi}\, \phi (u) \,\sin \left( n + \frac{1}{2} \right) u\,{\text d} u . \] The desired relation (1) follows from the Riemann--Lebesgue lemma.

Now we consider the case when point 𝑥 is a point of discontinuity of function 𝑓(𝑥). It is sufficient to show that \begin{align*} \lim_{n\to\infty} \ \frac{1}{\pi}\,\int_0^{\pi} \,f(x+u) \,\frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)}\,{\text d}u = \frac{f(x+0)}{2} , \\ \lim_{n\to\infty} \ \frac{1}{\pi}\,\int_{-\pi}^0 \,f(x+u) \,\frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)}\,{\text d}u = \frac{f(x-0)}{2} . \end{align*} We concentrate our attention only on the fommer limit because a proof of the second one is completely analogous.

Since the integral of the Dirichlet kernel is 1, we need to prove the relation \[ \lim_{n\to\infty} \ \frac{1}{\pi}\,\int_0^{\pi} \left[ f(x+u) - f(x+0) \right] \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)}\,{\text d}u = 0. \tag{3} \] First, we prove the absolute integrability on interval [0, π] of the following function of variable u: \[ \phi (u) = \frac{f(x+u) - f(x+0)}{2\,\sin (u/2)} = \frac{f(x+u) - f(x+0)}{u} \cdot \frac{u}{2\,\sin (u/2)} . \] Since 𝑓(𝑥) has a right-hand derivative at 𝑥, the ratio \[ \frac{f(x+u) - f(x+0)}{u} \qquad (u > 0) \] remains bounded as u → 0. From this, we conclude (similar to the case of the point of continuity) that this function is absolutely integrable on [0, π]. Since the function \( \displaystyle \quad \frac{u}{2\,\sin (u/2)} \ \) is bounded, the function ϕ(u) is absolutely integrable on [0, π]. However, \[ \int_0^{\pi} \left[ f(x+u) - f(x+0) \right] \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)}\,{\text d}u = \int_0^{\pi} \,\phi (u) \,\sin \left( n + \frac{1}{2} \right) u \,{\text d}u , \] and the desired relation follows from the Riemann--Lebesgue lemma.

Corollary 1: Let 𝑓 be ℭ¹ on [−ℓ, ℓ] with 𝑓(−ℓ) = 𝑓(ℓ) having periodic derivative 𝑓′(−ℓ) = 𝑓′(ℓ). Then the Fourier series for 𝑓 converges to 𝑓(𝑥) for all 𝑥 in [−ℓ, ℓ].

It is a simple exercise on integration by parts.

Example 4: We start with the piecewise continuous function \[ f(x) = \begin{cases} x^3 , &\quad \mbox{for } \ 0 < x < 1 , \\ 2-x^2 , &\quad \mbox{for }\ 1 < x < 2 , \end{cases} \] that consists of two brunches: \[ f_{-} (x) = x^3 , \qquad 0 \le x \le 1 \] and \[ f_{+} (x) = 2 - x^2 , \qquad 1 \le x \le 2. \] These branches are obtained by continuous extensions on the closed intervals: \( \displaystyle \quad f_{-}(1) = f(1-0) \quad\mbox{and} \quad f_{+}(1) = f(1+0) . \ \) Thus, function 𝑓+(𝑥) is defined on the closed interval [1, 2] and correspondingly function 𝑓-(𝑥) is defined on the closed interval [0, 1]. Note that 𝑓(𝑥) is undefined at 𝑥 = 1.

(*Functions*)f1[x_] := x^(3); (*domain[0,1]*) f2[x_] := 2 - x^2; (*domain[1,2]*) (*Tangent arrows at (1,1)*) p0 = {1, 1}; slope1 = 3; slope2 = -2; (*Arrow lengths*) len = 0.25; arrow1 = Arrow[{p0, p0 + len Normalize[{1, slope1}]}]; arrow2 = Arrow[{p0, p0 + len Normalize[{1, slope2}]}]; (*Plot*)Show[ Plot[{Piecewise[{{f1[x], 0 <= x <= 1}}], Piecewise[{{f2[x], 1 <= x <= 2}}]}, {x, 0, 2}, PlotStyle -> {Directive[Blue, Thickness[0.015]], Directive[Red, Thickness[0.015]]}, PlotRange -> {{0, 2}, {1.2, -1}}, Exclusions -> All], Graphics[{Black, Thick, arrow1, arrow2, PointSize[0.02], Point[p0]}]]

   Fig 4.1. Continuous, but piecewise ℭ¹ function.

Function 𝑓(𝑥) has the left-hand derivative at 𝑥 = 1: \[ \lim_{u\downarrow 0}\ \frac{f(1-u) - f(1-0) }{u} = f'_{-} (1) = 3 . \] It also has the right-hand derivative \[ \lim_{u\downarrow 0}\ \frac{f(1+u) - f(1+0) }{u} = f'_{+} (1) = -2 , \] which is not equal to 𝑓(1-0) = 3. Geometrically, it is equivalent to the existence of tangent at 𝑥 = 1 to the curve y = 𝑓-(𝑥), equal to 𝑓(𝑥) for 𝑥 < 1 and equal to 𝑓(1-0) for 𝑥 = 1. Similarly, function 𝑓+(𝑥) is defined only for 𝑥 ≥ 1 with tangent at 𝑥 = 1 equals to −2 = 𝑓(1+0).

This example shows that function 𝑓(𝑥) is continuous on interval (0, 2), but its derivative has jump discontinuity at 𝑥 = 1: \[ \begin{cases} f'_{-} (x) &= 3\,x^2 , &\quad \mbox{for }\ x \le 1, \\ f'_{+} (x) &= -2\,x, &\quad \mbox{for } \ x \ge 1 . \end{cases} \] We call this point 𝑥 = 1 a corner point.

We expand into Fourier series each branch (assuming that it is expanded by zero outside the given interval). For 𝑓-, we have \[ f_{-} (x) = \frac{1}{8} + \sum_{n\ge 1} \left( \frac{6 + 3 \left( n^2 -2 \pi^2 - \right) (-1)^n}{n^4 \pi^4} \right) \cos (n\pi x) + \frac{\left( 6 - n^2 \pi^2 \right) (-1)^n}{n^3 \pi^3}\,\sin (n\pi x) . \]

Integrate[x^3 *Cos[n*Pi*x], {x, 0, 1}]
(6 + 3 (-2 + n^2 \[Pi]^2) Cos[n \[Pi]] + n \[Pi] (-6 + n^2 \[Pi]^2) Sin[n \[Pi]])/(n^4 \[Pi]^4)
Integrate[x^3 *Sin[n*Pi*x], {x, 0, 1}]
(n \[Pi] (6 - n^2 \[Pi]^2) Cos[n \[Pi]] + 3 (-2 + n^2 \[Pi]^2) Sin[n \[Pi]])/(n^4 \[Pi]^4)
Similarly, \[ f_{+} (x) = - \frac{1}{6} + \sum_{n\ge 1} \frac{2\,(-1)^n - 4}{n^2 \pi^2} \,\cos (n\pi x) + \frac{\left( 2 + n^2 \pi^2 \right) (-1)^n + 2 \left( n^2 \pi^2 -1 \right)}{n^3 \pi^3} \,\sin (n\pi x) . \]
Integrate[(2 - x^2)*Cos[n*Pi*x], {x, 1, 2}]
1/(n^3 \[Pi]^3)(2 n \[Pi] Cos[n \[Pi]] - 4 n \[Pi] Cos[ 2 n \[Pi]] - (2 + n^2 \[Pi]^2 + 4 (-1 + n^2 \[Pi]^2) Cos[n \[Pi]]) Sin[n \[Pi]])
Integrate[(2 - x^2) *Sin[n*Pi*x], {x, 1, 2}]
1/(n^3 \[Pi]^3)((2 + n^2 \[Pi]^2) Cos[n \[Pi]] + 2 (-1 + n^2 \[Pi]^2) Cos[2 n \[Pi]] + 2 n \[Pi] (Sin[n \[Pi]] - 2 Sin[2 n \[Pi]]))
We plot their 50-term approximations.
sm50[x_] = 1/8 + Sum[(6 + 3 (-2 + n^2 \[Pi]^2) Cos[n \[Pi]] )/(n^4 \[Pi]^4) * Cos[n*Pi*x] + (6 - n^2 \[Pi]^2) Cos[n \[Pi]]/(n^3 \[Pi]^3) * Sin[n*Pi*x], {n, 1, 50}];
Plot[sm50[x], {x, 0, 2}, PlotStyle -> Thickness[0.01]]
sp50[x_] = -1/6 + Sum[(2*(-1)^n - 4)/(n*Pi)^2 * Cos[n*Pi*x] + 1/(n^3 \[Pi]^3) ((2 + n^2 \[Pi]^2) Cos[n \[Pi]] + 2 (-1 + n^2 \[Pi]^2) Cos[2 n \[Pi]] + 2 n \[Pi] (Sin[n \[Pi]] - 2 Sin[2 n \[Pi]])) *Sin[n*Pi*x], {n, 1, 50}];
Plot[sp50[x], {x, 0, 2}, PlotStyle -> Thickness[0.01]]

Figure 4.2: 50-term approximation of 𝑓-.
     
Figure 4.3: 50-term approximation of 𝑓+.

These plots indicate that the Fourier approximation for 𝑓-(𝑥) exhibits the Gibbs phenomenon at point 𝑥 = 1, while the Fourier approximation for 𝑓+(𝑥) exhibits the Gibbs phenomenon at points 𝑥 = 0, 1, and 2 on interval [0, 2] where these two branches are discontinuous. However, when we add these two Fourier approximations, we do not observe the Gibbs phenomenon at corner point 𝑥 = 1 because function 𝑓(𝑥) is continuous at this point and oscillations from two branches are canceled.

Plot[sm50[x] + sp50[x], {x, 0, 2}, PlotStyle -> Thickness[0.01]]

   Fig 4.4. 50-term Fourier approximation of 𝑓(𝑥).

Now we consider another piecewise continuous function: \[ g(x) = \begin{cases} x^3 , \quad & \mbox{for }\ 0 < x < 1, \\ 1 - x^2 , \quad & \mbox{for } \ 1 < x < 2 . \end{cases} \]

(*Functions*)f1[x_] := x^3; (*domain[0,1]*) f2[x_] := 1 - x^2; (*domain[1,2]*) (*Red disks and labels*) pts = {{0, -1}, {1, 1/2}, {2, -1}}; labels = {"-1", "1/2", "-1"}; diskGraphics = Table[{Red, Disk[pts[[i]], 0.05], Black, Text[labels[[i]], pts[[i]] + {0.15, 0.15}]}, {i, 1, Length[pts]}]; (*Plot*) Show[Plot[{Piecewise[{{f1[x], 0 <= x <= 1}}], Piecewise[{{f2[x], 1 <= x <= 2}}]}, {x, 0, 2}, PlotStyle -> {Directive[Blue, Thickness[0.015]], Directive[Red, Thickness[0.015]]}, PlotRange -> {{0, 2}, {-2, 2}}, Exclusions -> All], Graphics[diskGraphics]]

   Fig 4.5. Piecewise ℭ¹ function.

This function 𝑔(𝑥) consists of two branches: 𝑔-(𝑥) = 𝑓-(𝑥) that was considered previously and a new one, \[ g_{+} (x) = \left( 1 - x^2 \right) \qquad \mbox{for }\ x \in [1,2]. \] Expanding this branch into the Fourier series gives \[ g_{-} (x) = -\frac{2}{3} + \sum_{n\ge 1} \,\frac{-4 + 2 (-1)^n}{n^2 \pi^2} \,\cos (n\pi x) + \frac{3 n^2 \pi^2 -2 + 2(-1)^n}{n^3 \pi^3}\,\sin (n\pi x) . \] With Mathematica, we plot its 50-term approximation:

gp50[x_] = -2/3 + Sum[1/(n^3 \[Pi]^3) (-2 (2 n \[Pi] Cos[2 n \[Pi]] + Sin[n \[Pi]]) + Cos[n \[Pi]] (2 n \[Pi] + (4 - 6 n^2 \[Pi]^2) Sin[ n \[Pi]])) * Cos[n*Pi*x] + 1/(n^3 \[Pi]^3)(2 Cos[n \[Pi]] + (-2 + 3 n^2 \[Pi]^2) Cos[ 2 n \[Pi]] + 2 n \[Pi] (Sin[n \[Pi]] - 2 Sin[2 n \[Pi]]))* Sin[n*Pi*x], {n, 1, 50}];
Plot[gp50[x], {x, 0, 2}, PlotStyle -> Thickness[0.01`]]

   Fig 4.6. 50-term Fourier approximation of branch 𝑔+(𝑥).

Now we consider the tent-function \[ t(x) = \begin{cases} 2\,x/\pi , &\quad \mbox{for } 0 \le x \le \pi /2 , \\ 2\left( \pi -x \right) /\pi , &\quad \mbox{for } \pi /2 \le x \le \pi . \end{cases} \]

f[x_] := Piecewise[{{2 x/Pi, 0 <= x <= Pi/2}, {2 (Pi - x)/Pi, Pi/2 <= x <= Pi}}]; fs = FourierSinSeries[f[x], x, 15]; Plot[{f[x], fs}, {x, 0, Pi}, PlotStyle -> {{Blue, Thick}, {Red, Thick}}, PlotLegends -> {"Tent function", "15-term FourierSinSeries"}, ImageSize -> Large] Pi/2 < x <= Pi}}];

   Fig 4.7: 15-term sine Fourier approximation of the tent function.

Its sine Fourier coefficients can be evaluated explicitely: \[ b_n = \frac{2}{\pi}\,\int_0^{\pi}\,f(x)\,\sin (nx)\,{\text d}x = \frac{8}{n^2 \pi^2}\,\sin \left( \frac{n\pi}{2} \right) , \qquad n=1,2,\ldots . \] Therefore, \[ f(x) = \frac{8}{\pi^2} \ \sum_{k\ge 0} \ \frac{(-1)^k}{(2k+1)^2}\ \sin \left( (2k+1)\,x \right) . \]
bn = (2/Pi)*Integrate[f[x]*Sin[n*x], {x, 0, Pi}]
(4 (2 Sin[(n \[Pi])/2] - Sin[n \[Pi]]))/(n^2 \[Pi]^2)
Setting in the Fourier series expansion for the tent function 𝑥 = π/2, we obtain \[ \frac{\pi^2}{8} = \sum_{k\ge 0}\,\frac{1}{(2k+1)^2} . \] We check with Mathematica:
Sum[1/(2*k + 1)^2 , {k, 0, Infinity}]
\[Pi]^2/8
We also check Parseval's Identity for sine Fourier series: \[ \frac{2}{\ell} \,\int_0^{\ell}\,f^2 (x)\,{\text d}x = \sum_{n\ge 1} \ b_n^2 . \] In our case, this identity becomes ⅔, as Mathematicaconfirms:
Integrate[(f[x])^2 , {x, 0, Pi}]*2/Pi
2/3
Sum[(8/n^2 /Pi^2 *Sin[n*Pi/2])^2, {n, 1, Infinity}]
2/3
   ■
End of Example 4

Dirichlet conditions (DC)


Peter Dirichlet

For a Fourier series to converge to the function’s value, the function must satisfy some conditions. Peter Gustav Lejeune Dirichlet (1805--1859) provided the first rigorous proof of convergence of the Fourier series for a specific class of functions. This original test (named after Dirichlet) was published in 1829, for piecewise monotone functions (functions with a finite number of sections per period each of which is monotonic). His sufficient conditions are known as the Dirichlet conditions (DC); necessary conditions for convergence of Fourier series are unknown. These conditions are crucial because they define the practical domain of applicability for Fourier series. Most signals and functions encountered in physics and engineering, such as square waves or sawtooth waves, satisfy the Dirichlet conditions.

Johann Peter Gustav Lejeune Dirichlet (1805–1859) was an influential German mathematician who made foundational contributions to number theory, analysis, and mechanics. He is best known for providing in 1837 the rigorous and modern definition of a function, creating analytic number theory, and for the Dirichlet theorem on arithmetic progressions.

As Germany provided little opportunity to study higher mathematics at that time, Dirichlet decided to go to Paris, where he spent 4 years (1822--1826). During his stay in France, Peter met with Joseph Fourier who raised his interest in theoretical physics, especially Fourier's analytic theory of heat.

The next definition involves another class of functions that includes previously discussed class of piecewise smooth ℭ¹ functions. . A function f is piecewise monotone on an interval [𝑎, b] if this interval can be broken into a finite number of subintervals where function f is monotone.

A function f : [𝑎, b] → ℝ is said to satisfy the Dirichlet conditions (DC) if
  1. 𝑓 is piecewise continuous, i.e., it has only finitely many discontinuities, and each has finite one-sided limits.
  2. 𝑓 is piecewise monotone, so there are finite number of subintervnals on which f is monotone.

These two assumptions are sufficient conditions for pointwise convergence of the Fourier series, and neither is implied by the other. If a function 𝑓(𝑥) satisfies these two Dirichlet conditions, then its Fourier series converges at every 𝑥 to

\[ \frac{f(x+0) + f(x-0)}{2} . \]

Functions that satisfy the Diruchlet conditions also possess the following properties.

  • it is absolutely integrable because piecewise continuity already implies boundedness on a finite interval;
  • it has a finite number of extrema;
  • 𝑓 has a finite number of jump discontinuities over the interval, and these discontinuities must be finite;
  • 𝑓 has bounded one-sides limiting values at every point of the given interval.

However, the Gibbs phenomenon is observed near every point of discontinuity: the Fourier series will exhibit high-frequency oscillations near this point, even though it converges in the limit.

Example 5: Let us consider a monotone function 𝑥(𝑡) = 1/√𝑡 for 0 < 𝑡 ≤ 1 and zero at the origin. Now we construct a periodic signal by \[ f(t) = \sum_{m=-\infty}^{\infty} x*t - m) . \] Clearly, 𝑥(𝑡) ∈ 𝔏¹([0,1]) because its norm is \( \displaystyle \quad \| x \|_1 = \int_0^1 \frac{{\text d}t}{\sqrt{t}} = 2. \quad \) However, this function does not satisfy the Dirichlet conditions as it has the infinite discontinuity at the origin. It is also does not belong to 𝔏²([0,1]) since its mean square norm is ∥𝑥(𝑡)∥₂ = ∞. Nevertheless, its Fourier series converges pointwise on the interval (0,1].

Indeed, the Fourier coefficients of 𝑥(𝑡) are \begin{align*} \hat{x} (k) &= \int_0^1 \frac{1}{\sqrt{t}}\, e^{- \mathbf{j}2\pi k\,t}\, {\text d}t \\ &= 2\,\int_0^1 e^{- \mathbf{j}2\pi k\,u^2}\, {\text d}u \end{align*} by substitution u = √𝑡. Using Mathematica, we find its value:

Integrate[Exp[-I*a*u^2], {u, 0, 1}]
-(((-1)^(3/4) Sqrt[\[Pi]] Erf[(-1)^(1/4) Sqrt[a]])/(2 Sqrt[a]))
\[ \hat{x}(k) = - \frac{(-1)^{3/4}}{2\,\sqrt{2k}} \,\mbox{erf}\left( (-1)^{1/4} \sqrt{2\pi k} \right) , \] where erf(·) is the error function: \( \displaystyle \quad \mbox{erf}(u) = \frac{2}{\sqrt{\pi}} \,\int_0^u e^{-t^2}\,{\text d}t . \quad \) Since the error function is bounded, the Fourier coefficients decay as 1/√𝑘. So Fourier series convergence is rather slow.
Integrate[Cos[2*Pi*k*t]/Sqrt[t], {t, 0, 1}]
FresnelC[2 Sqrt[k]]/Sqrt[k]
Integrate[Sin[2*Pi*k*t]/Sqrt[t], {t, 0, 1}]
FresnelS[2 Sqrt[k]]/Sqrt[k]
Now we plot function 𝑥(𝑡) and its 50-term Fourier approximation.
S50[t_] = 2 + Sum[FresnelC[2 Sqrt[k]]/Sqrt[k]*Cos[2*Pi*k*t] + FresnelS[2 Sqrt[k]]/Sqrt[k]*Sin[2*Pi*k*t], {k, 1, 50}]*2;
Plot[{1/Sqrt[t], S50[t]}, {t, 0. o1, 1}, PlotStyle -> Thickness[0.008]]

   Fig 5.1. Fourier series approximation of 𝑥(𝑡) = 1/√𝑡.

   ■
End of Example 5

Theorem 3 (Dirichlet, 1829): If f is 2ℓ-periodic and satisfies the Dirichlet conditions. Then the Fourier series converges at x to

\[ \frac{f(x+0) + f(x-0)}{2} . \]
Its proof is based on application of the second mean value theorem. The simplified version of the mean value theorem was discovered by Pierre Bonnet in 1850. Theorem 3 provides sufficient conditions for Fourier series to converge pointwise. The idea is to apply the second mean value theorem to the integral representation of the partial Fourier sum.
Second mean value Theorem (Hobson, 1908): Let g(x) be a bounded, monotone real valued function defined on the interval [𝑎,b], that is continuous at 𝑎 and b; and f(x) a Riemann integrable function on [𝑎, b]. Then there exists a real number c∈[𝑎, b] such that \[ \int_a^b g(x)\,f(x)\,{\text d} x = g(a+0) \int_a^c f(x)\,{\text d} x + g(b-0) \int_c^b f(x)\,{\text d} x . \] In case when 𝑔(𝑥) is also non-negative monotone on [𝑎, b], then \[ \int_a^b g(x)\,f(x)\,{\text d} x = g(a+0) \int_a^c f(x)\,{\text d} x , \qquad \mbox{if } g(x) \downarrow , \] and \[ \int_a^b g(x)\,f(x)\,{\text d} x = g(b-0) \int_c^b f(x)\,{\text d} x , \qquad \mbox{if } g(x) \uparrow . \]

We prove the case when 𝑔 is increasing. Since 𝑔 is increasing, define \[ \phi (x) = g(x) - g(a) . \] Then ϕ(𝑥)≥0 and ϕ is increasing. Also \[ g(x) = g(a) + \phi (x) \] So \[ \int_a^b g(x)\,f(x)\,{\text d}x = g(a)\,\int+a^b \, \int_a^b \,f(x)\,{\text d}x + \int_a^b \,\phi (x)\,f(x)\,{\text d}x . \] Thus, it suffices to evaluate the second integral. Now apply the first mean value theorem for integrals (for a nonnegative monotone function): there exists c ∈ [𝑎,b] such that \[ \int_a^b \,\phi (x)\,f(x)\,{\text d}x = \phi (b)\,\int_c^b \,f(x)\,{\text d}x . \] Since ϕ(b) = 𝑔(b) − 𝑔(𝑎), we obtain \[ \int_a^b g(x)\,f(x)\,{\text d}x = g(a)\, \int_a^b \,f(x)\,{\text d}x + \left( g(b) - g(a) \right) \int_c^b \,f(x)\,{\text d}x . \] Since \[ \int_a^b \,f(x)\,{\text d}x = \int_a^c \,f(x)\,{\text d}x + \int_c^b \,f(x)\,{\text d}x + \left( g(b) - g(a) \right) \] then \begin{align*} \int_a^b g(x)\,f(x)\,{\text d}x &= g(a) \left( \int_a^c \,f(x) + \int_c^b \,f(x) \right) \int_c^b \,f(x)\,{\text d}x \\ &= g(a)\,\int_a^c \,f(x)\,{\text d}x + g(b) \,\int_c^b \,f(x)\,{\text d}x . \end{align*}

The crucial ingredient is the following lemma (sometimes itself called the second mean value theorem in some texts):

If ϕ(𝑥) is nonnegative and monotone increasing on [𝑎,b], then there exists c∈[𝑎,b] such that \[ \int_a^b \phi (x)\,f(x)\,{\text d}x = \phi (b)\,\int_a^b f(x)\,{\text d}x . \]

We consider only the case when ℓ = π, for simplicity. So we assume that
  • (D1) On [−π, π], 𝑓 has only finitely many discontinuities, all of finite jump type;
  • (D2) [−π, π] is a union of finitely many intervals on each of which 𝑓 is monotone (piecewise monotone).

The n-th partial sum can be written as the convolution with the Dirichlet kernel \[ S_n (f; x) = \frac{1}{2\pi} \,\int_{-\pi}^{\pi} \, f(x-t)\,D_n (t)\,{\text d}t , \] where the Dirichlet kernel is \[ D_n (t) = \sum_{k=-n}^n e^{{\bf j}kt} = \frac{\sin \left( \left( n + \frac{1}{2} \right) t \right)}{\sin (t/2)} . \] The convergence analysis is entirely about the oscillatory integral with kernel Dₙ.

Symmetrization and localization: Rewrite using evenness of Dₙ: \[ S_n (f; x) = \frac{1}{2\pi}\,\int_0^{\pi} \left( f(x+t) + f(x-t) \right) D_n (t)\,{\text d}t . \] Since 𝑥 is a point where the one-sided limits exist, we subtract the candidate limit \[ \ell (x) = \frac{f(x+0) + f(x-0)}{2} , \] and define \[ g_x (t) = \frac{f(x+t) + f(x-t)}{2} \, - \, \ell (x) . \] Then \[ S_n (f;x) - \ell (x) = \frac{1}{\pi}\,\int_0^{\pi} g_x (t) \,D_n (t)\,{\text d}t . \] So we must show that \[ \int_0^{\pi} g_x (t) \,D_n (t)\,{\text d}t \,\to\, 0, \qquad \mbox{as} \quad n\to\infty . \]

Dirichlet exploits the following key facts:

  • (F1) On each monotone subinterval, gx is of bounded variation and has only one-sided limits at endpoints.
  • (F2) There are only finitely many such subintervals and finitely many discontinuities of 𝑓.
He splits [0, π] into
  • a small neighborhood of 0, where the behavior of gx(t) is controlled by the existence of one-sided limits at 𝑥;
  • finitely many subintervals away from 0, on each of which gx(𝑡) is monotone.
For fixed small δ ∈ (0,𝜋), we have \[ \int_0^{\pi} g_x (t)\, D_N (t)\,{\text d} t = I_1 (N, \delta ) + I_2 (N, \delta ) , \] where \[ I_1 (N, \delta ) = \int_0^{\delta} g_x (t)\, D_N (t)\,{\text d} t , \quad I_2 (N, \delta ) = \int_{\delta}^{\pi} g_x (t)\, D_N (t)\,{\text d} t . \] On [𝛿,𝜋], the denominator sin(𝑡/2) is bounded away from zero, so \[ \left\vert D_N (t) \right\vert = \left\vert \frac{\sin \left( \left( N + \frac{1}{2} \right) t \right)}{\sin (t/2)} \right\vert \le \frac{1}{| \sin (t/2) |} \le C(\delta ) . \] Moreover, for each fixed 𝑡 ∈ [𝛿,𝜋], sin((𝑁+½)𝑡) oscillates and its average tends to zero. So \[ \lim_{N\to \infty}\, I_2 (N,\delta ) = \lim_{N\to \infty}\, \int_{\delta}^{\pi} g_x (t)\, D_N (t)\,{\text d} t = 0 \] for each fixed 𝛿>0. On each monotone subinterval [𝑎, b] ⊂ [δ, π], he integrates by parts in the Riemann–Stieltjes sense: \[ \int_a^{b} g_x (t) \,D_n (t) \,{\text d}t = \left( G_x (t)\, D_n (t) \right) \bigg \vert_{t=a}^b - \int_a^{b} G_x (t) \, {\text d} D_n (t) , \] where G𝑥(𝑡) is a primitive or a variation-controlled antiderivative of g𝑥(𝑡). The oscillatory nature of Dₙ and the bounded variation of gx(t) yield a uniform bound of order O(1/n) (or at least a bound independent of n) for each piece. Summing over finitely many pieces keeps the total under control.

Actually, one can prove that 𝐼₂(𝑁,δ) → 0 as 𝑁 → ∞ under weaker conditions using the Riemann–Lebesgue lemma (without integration by parts). However, this result was unknown to Dirichlet as it was proved later, in 1853 by Bernhard Riemann and in 1903 by Henri Lebesgue.

This step is based on only g𝑥 ∈ 𝔏¹ , no monotonicity. So the problem is entirely in the small 𝑡 part 𝐼₁(𝑁,𝛿).

The “small t” part: rewriting with the oscillatory numerator \[ I_1 (N, \delta ) = \int_0^{\delta} g_x (t) \, \frac{\sin \left( \left( N + \frac{1}{2} \right) t \right)}{\sin (t/2)} \, {\text d}t . \] Define \[ M_x (t) := \frac{g_x (t)}{\sin (t/2)} . \] Then \[ I_1 (N, \delta ) = \int_0^{\delta} M_x (t) \,\sin \left( \left( N + \frac{1}{2} \right) t \right) {\text d} t . \] Now comes the critical classical step: apply the second mean value theorem (or a variant of it) to this integral, using monotonicity of 𝑀𝑥 on (0,𝛿). This is where Dirichlet conditions enter.

  • 𝑓 is piecewise monotone and piecewise continuous on [−𝜋,𝜋],
  • with only finitely many discontinuities and extrema.
From this, one deduces:
  • For each fixed 𝑥, there exists 𝛿>0 such that on (0,𝛿), both 𝑓(𝑥+𝑡) and 𝑓(𝑥−𝑡) are monotone (in 𝑡), hence so is g𝑥(𝑡), and hence so is M𝑥(𝑡) (up to a constant shift).
  • Moreover, sin(𝑡/2) is strictly increasing on (0,𝛿) for small 𝛿.
Thus, on (0,𝛿), the quotient \[ M_x (t) = \frac{g_x (t)}{\sin (t/2)} \] is a monotone function (or at least of bounded variation with a very simple structure), and in the classical proof one assumes or arranges it to be monotone. This is the structural heart: near each point 𝑥, the function 𝑓 behaves like a monotone function on a small interval.

The second mean value theorem for integrals (one version) says:

If 𝑀 is monotone on [0,𝛿] and 𝑔 is continuous, then \[ \int_0^{\delta} M(t) \, g(t)\,{\text d}t = M(0+0) \, \int_0^{\xi} g(t)\, {\text d}t + M(\xi -0) \,\int_{\xi}^{\delta} g(t)\, {\text d}t \] for some 𝜉 ∈ [0,𝛿]. Apply this with:

  • 𝑀(𝑡) = 𝑀𝑥(𝑡) (monotone in 𝑡 on (0,𝛿),
  • 𝑔(𝑡) = sin((𝑁+½)𝑡).
We get \[ I_1 (N, \delta ) = M_x (0+0) \,\int_0^{\xi_N} \,\sin \left( \left( N + \frac{1}{2} \right) t \right) {\text d}t + M_x (\delta -0) \, \int_{\xi_N}^{\delta} \sin \left( \left( N + \frac{1}{2} \right) t \right) {\text d}t \] for some 𝜉𝑁 ∈ [0,𝛿]. We compute the integrals explicitly: \[ \int_0^{\xi_N} \,\sin \left( \left( N + \frac{1}{2} \right) t \right) {\text d}t = \frac{1 - \cos \left( \left( N + \frac{1}{2} \right) \xi_N \right) }{N + 1/2} . \] \[ \int_{\xi_N}^{\delta} \sin \left( \left( N + \frac{1}{2} \right) t \right) {\text d}t = \frac{\cos \left( \left( N + \frac{1}{2} \right) \xi_N \right) - \cos \left( \left( N + \frac{1}{2} \right) \delta \right)}{N+ 1/2} . \] So \begin{align*} I_1 (N, \delta ) &= \frac{1}{N + 1/2} \left[ M_x (0+0) \left( 1 - \cos \left( \left( N + \frac{1}{2} \right) \xi_N \right) \right) \right. \\ &\quad \left. + M_x (\delta -0) \left( cos \left( \left( N + \frac{1}{2} \right) \xi_N \right) - \cos \left( \left( N + \frac{1}{2} \right) \delta \right) \right) \right] . \end{align*} Hence, \[ \left\vert I_1 (N, \delta ) \right\vert \le \frac{C(\delta )}{N} \] for some constant 𝐶(𝛿) depending on bounds of 𝑀𝑥 on (0,𝛿). Thus, for fixed 𝛿, \[ \lim_{N\to \infty}\, I_1 (N, \delta ) = 0 . \] Combine with 𝐼₂(𝑁,𝛿) → 0 and then let 𝛿 → 0 while using the continuity of g𝑥 at 0 (i.e. existence of one-sided limits of 𝑓) to conclude: \[ \lim_{N\to\infty} \, S_N (f; x) = \ell = \frac{f(x+0)n+ f(x-0)}{2} . \] That is the classical Dirichlet proof in essence.

Example 6: Let us consider the continuous function \[ f(x) = x^{1/3} \qquad x \in (-\pi , \pi ), \] extended periodically outside interval [−&pi, π] with period 2π. 𝑓(𝑥) is continuous everywhere, and has a singular derivative at the origin, so it is not piecewise smooth ℭ¹. This function satisfies the Dirichlet conditions:

  • Absolutely integrable: Since \[ \int_{-\pi}^{\pi} \, |x|^{1/3} \ {\text d}x = \frac{3}{2}\, \pi^{4/3} \.< \,\infty . \] the function is integrable over a period.
  • Finite number of discontinuities: The function is continuous everywhere, including at x = 0.
  • Finite number of extrema: It is strictly increasing on (−π,π), so there are no interior local maxima or minima. On one period, the only extrema occur at the endpoints (equivalently, at the jump introduced by the periodic extension).
Since the given function is odd, its Fourier series is purely sine: \[ x^{1/3} = \sum_{n\ge 1} b_n \sin (nx) , \] where \[ b_n = \frac{2}{\pi} \,\int_0^{\pi}\, x^{1/3} \ \sin (nx)\,{\text d}x , \qquad n=1,2,\ldots . \] The coefficients do not have a simple closed form in elementary functions, but Mathematica knows how to handle them:
Integrate[x^(1/3) *Sin[n*x], {x, 0, Pi}]
1/2 I (\[Pi]^( 4/3) (ExpIntegralE[-(1/3), -I n \[Pi]] - ExpIntegralE[-(1/3), I n \[Pi]]) + (((-I n)^(2/3) - (I n)^( 2/3)) Gamma[4/3])/n^2)
However, their asymptotic behavior is interesting. The dominant contribution comes from the non-smooth point at x=0, yielding \[ b_n = O \left( n^{-4/3} \right) . \] This example illustrates several important ideas simultaneously:
  • The function is continuous but not differentiable at x = 0, since \[ f' (x) = \frac{1}{3}\, x^{-2/3} , \] which blows up as 𝑥→0.
  • Nevertheless, the Fourier series converges pointwise to the function everywhere by Dirichlet's theorem.
  • The singularity in the derivative is reflected in the relatively slow decay bₙ = O(n−4/3), demonstrating the general principle that the smoother a function is, the faster its Fourier coefficients decay.
Clear["Global`*"] (* Define the function on [0, Pi] *) f[x_] := x^(1/3) (* Number of Fourier terms *) nmax = 20; (* Fourier sine coefficients *) coeff = Table[(2/Pi) NIntegrate[ Evaluate[x^(1/3) Sin[n x]], {x, 0, Pi}], {n, 20}]; (* Partial Fourier sum *) S[x_] := Sum[coeff[[n]] Sin[n x], {n, Length[coeff]}]; (* Plot *) Plot[{Sign[x] Abs[x]^(1/3), S[x]}, {x, -Pi, Pi}, PlotStyle -> {{Blue, Thick}, {Red, Thick}}, PlotLegends -> {"f(x)=x^(1/3)", Row[{"Fourier sum (", nmax, " terms)"}]}, AxesLabel -> {"x", "y"}, GridLines -> Automatic, ImageSize -> Large]

   Fig 6.1. x1/3 and its 20-term Fourier approximation.

   ■
End of Example 6

Functions of Bounded variation


Camille Jordan

Dirichlet conditions are not the sharp conditions for restoration of a function from its Fourier discretization. Modern formulations weaken the hypotheses considerably. The next important step in this direction was made by considering bounded variation (BV) functions of a single variable were first introduced by Camille Jordan, in the paper (1881) dealing with the convergence of Fourier series.

Marie Ennemond Camille Jordan (1838–1922) was a French mathematician, known both for his foundational work in group theory and for his textbook Cours d'analyse de l'École polytechnique. Camille Jordan is not to be confused with the geodesist Wilhelm Jordan (Gauss–Jordan elimination) or the physicist Pascual Jordan (Jordan algebras). The properties of functions of bounded variation became widely known because they were discussed by Jordan in a note appended to the third volume of his Course d’analyse (1887).

Lemma 3 (Jordan criterion): Let 𝑓 : [𝑎, 𝑏] → ℝ be bounded function. Then 𝑓 is Riemann integrable on [𝑎, 𝑏] if and only if the set 𝐷 of points of discontinuity of 𝑓 has Lebesgue measure zero.
For an interval 𝐼 = [𝑥𝑘−1, 𝑥𝑘], define the oscillation of 𝑓 on 𝐼 by \[ \omega (f; I) = \sup_{x,y \in I} |f(x) - f(y)| . \] Given a partition 𝑃 : 𝑎 = 𝑥₀ < 𝑥₁ < ⋯ < 𝑥ₙ = 𝑏, define:
  • Lower sum: \[ L(f;P) = \sum_{k=1}^n m_k \left( x_k - x_{k-1} \right) , \qquad m_k = \inf_{x \in [x_{k-1} - x_k ]} f(x) , \]
  • Upper sum: \[ U(f;P) = \sum_{k=1}^n M_k \left( x_k - x_{k-1} \right) , \qquad M_k = \sup_{x \in [x_{k-1} - x_k ]} f(x) . \]
Note that \[LU(f;P) - U(f;P) = \sum_{k=1}^n \left( M_k - m_k \right)\left( x_k - x_{k-1} \right) \le \sum_{k=1}^n \omega \left( f; [x_{k-1} - x_k ] \right) \left( x_k - x_{k-1} \right) . \] Direction 1: Riemann integrable ⇒ discontinuities have measure zero.

Assume 𝑓 is Riemann integrable on [𝑎, 𝑏] and bounded: ∣𝑓(𝑥)∣≤𝑀 for all 𝑥.

We must show: the set 𝐷 of discontinuities of 𝑓 has Lebesgue measure zero. Fix 𝜀>0. Since 𝑓 is Riemann integrable, there exists a partition 𝑃 such that \[ U(f;P) - L(f;P) < \varepsilon . \] Let 𝑃 : 𝑎 = 𝑥₀ < 𝑥₁ < ⋯ < 𝑥ₙ = 𝑏. For each 𝑘, set \[ \omega_k = \omega \left( f; [x_{k-1} - x_k ] \right) . \] Then \[ \sum_{k=1}^n \omega_k \left( x_k - x_{k-1} \right) \le U(f;P) - L(f;P) < \varepsilon . \] Now fix a positive integer 𝑚. Consider the set of indices \[ K_m = \left\{ k\ : \ \omega_k \ge \frac{1}{m} \right\} . \] For these intervals, \[ \sum_{k \in K_m} \omega_k \left( x_k - x_{k-1} \right) \ge \sum_{k \in K_m} \frac{1}{m} \left( x_k - x_{k-1} \right) = \frac{1}{m} \sum_{k \in K_m} \left( x_k - x_{k-1} \right) . \] But the left-hand side is bounded by the total sum: \[ \sum_{k \in K_m} \omega_k \left( x_k - x_{k-1} \right) \le \sum_{k =1}^n \omega_k \left( x_k - x_{k-1} \right) < \varepsilon . \] Hence, \[ \frac{1}{m} \sum_{k \in K_m} \left( x_k - x_{k-1} \right) < \varepsilon \qquad \Longrightarrow \qquad \sum_{k \in K_m} \left( x_k - x_{k-1} \right) < m\varepsilon . \] Now, define \[ D_m = \left\{ x \in [a, b] \ : \ \mbox{oscillation of } f \mbox{ at } x \ge \frac{1}{m} \right\} . \] Key observations:

  • If 𝑥∈𝐷𝑚, then in every neighborhood of 𝑥, the oscillation of 𝑓 is at least 1/𝑚.
  • In particular, for our partition 𝑃, any point 𝑥∈𝐷𝑚 must lie in some interval [𝑥𝑘−1 , 𝑥𝑘] with 𝜔𝑘 ≥ 1/𝑚, i.e. with 𝑘∈ 𝐾𝑚.
Thus, \[ D_m = \cup_{k \in K_m} \ \left[ x_{k-1} , x_k \right] . \] The total length of this finite union is \[ \lambda \left( \cup_{k \in K_m} \ \left[ x_{k-1} , x_k \right] \right) \le \sum_{k \in K_m} \left( x_k - x_{k-1} \right) < m\varepsilon . \] Since 𝜀>0 was arbitrary, this shows that for each fixed 𝑚, the set 𝐷𝑚 has Lebesgue measure zero. Finally, note that the set of discontinuities is \[ D = \cup_{m=1}^{\infty} D_m , \] because a point is a discontinuity iff its oscillation is strictly positive, hence at least 1/𝑚 for some 𝑚. A countable union of measure-zero sets has measure zero, so 𝐷 has measure zero.

Direction 2: discontinuities have measure zero ⇒ Riemann integrable

Now assume:

  • 𝑓 : [𝑎, 𝑏] → ℝ is bounded: ∣𝑓(𝑥)∣≤𝑀 for all 𝑥.
  • The set 𝐷 of discontinuities of 𝑓 has Lebesgue measure zero.
We must show: 𝑓 is Riemann integrable.

Fix 𝜀>0.

Step 1: Cover the discontinuities by small total length. Since 𝐷 has measure zero, there exists a finite collection of open intervals \( \displaystyle \quad \{ 𝐼_𝑗 \}_{j=1}^N \quad \) such that:

  • \( \displaystyle \quad 𝐷 ⊂ \cup_{𝑗=1}^𝑁 𝐼_𝑗 , \)
  • \( \displaystyle \quad \sum_{𝑗=1}^𝑁 \left\vert 𝐼_𝑗 \right\vert < \varepsilon /(4𝑀) . \)
(We can use finite instead of countable cover because we’re on a compact interval [𝑎,𝑏] and can truncate.)

Step 2: Continuity on the complement and uniform continuity. Let \[ K = [a, b] \setminus \cup_{j=1}^N \ I_j . \] On 𝐾, 𝑓 is continuous at every point (since all discontinuities lie in the union of the 𝐼_𝑗). Also, 𝐾 is closed in [𝑎,𝑏], hence compact.

A continuous function on a compact set is uniformly continuous, so there exists 𝛿>0 such that: If 𝑥,𝑦 ∈ 𝐾 and ∣𝑥−𝑦∣ < 𝛿, then |f(x) − f(y)| < ε/2(b-a).

Step 3: Choose a partition adapted to both the cover and uniform continuity. Now choose a partition 𝑃 : 𝑎 = 𝑥₀ < 𝑥₁ < ⋯ < 𝑥ₙ = 𝑏 such that:

  • Each interval [𝑥𝑘−1,𝑥𝑘] has length <𝛿.
  • The partition is fine enough that each interval either:
    • lies entirely inside one of the 𝐼_𝑗, or
    • intersects 𝐾 in a nontrivial way (i.e. contains points of 𝐾).
This is always possible by refining.

We now estimate 𝑈(𝑓,𝑃) − 𝐿(𝑓,𝑃). Split the sum over two types of subintervals:

  1. Type A: intervals [𝑥𝑘−1,𝑥𝑘] contained in ⋃_j 𝐼_𝑗 .
  2. Type B: intervals [𝑥𝑘−1,𝑥𝑘] that intersect 𝐾.
Step 4: Estimate on Type A intervals (inside the small cover) On any interval [𝑥𝑘−1,𝑥𝑘], we have \[ 0 \le M_k - m_k \le 2M , \] So \[ \left( M_K - m_K \right) \left( x_k - x_{k-1} \right) \le 2M \left( x_k - x_{k-1} \right) . \] Summing over all Type A intervals, we get \[ \sum_{{\text type }A} \left( M_K - m_K \right) \left( x_k - x_{k-1} \right) \le 2M \sum_{{\text type }A} \left( x_k - x_{k-1} \right) \le 2M \sum_{j=1}^N \left\vert I_j \right\vert < 2M \cdot \frac{\varepsilon}{4M} = \frac{\varepsilon}{2} . \]

Step 5: Estimate on Type B intervals (touching the “good” set 𝐾).

Let [𝑥𝑘−1,𝑥𝑘] be a Type B interval. Then it contains at least one point 𝑦𝑘 ∈ 𝐾. For any 𝑥 ∈ [𝑥𝑘−1,𝑥𝑘] ∩ 𝐾, we have ∣𝑥−𝑦𝑘∣ < 𝛿, so by uniform continuity on 𝐾, \[ \left\vert f(x) - f(y_k ) \right\vert < \frac{\varepsilon}{2 \left( b-a \right)} . \] Thus, on [𝑥𝑘−1,𝑥𝑘] ∩ 𝐾, the values of 𝑓 vary by at most 𝜀/(b-a). Points in [𝑥𝑘−1,𝑥𝑘] that lie in the small intervals 𝐼j are either absent (if the interval is not fully inside any 𝐼𝑗) or form a negligible part, but crucially:

The oscillation of 𝑓 on [𝑥𝑘−1,𝑥𝑘] is bounded by 𝜀/(𝑏−𝑎). (Formally: any discontinuity inside this interval lies in some 𝐼𝑗, but the interval is short and the continuous behavior on 𝐾 dominates; one can refine the argument, but the standard approach is to note th,at the sup and inf on this small interval can be approximated by values at points of 𝐾, giving oscillation ≤ 𝜀/(𝑏−𝑎).)

Hence, for Type B intervals, \[ M_k - m_k \le \frac{\varepsilon}{b-a} . \] Therefore, \[ \sum_{{\text type }B} \left( M_K - m_K \right) \left( x_k - x_{k-1} \right) \le \frac{\varepsilon}{b-a} \, \sum_{{\text type }B} \left( x_k - x_{k-1} \right) \le \frac{\varepsilon}{b-a} \cdot (b-a) = \varepsilon . \]

Step 6: Combine both estimates. Putting Type A and Type B together: \[ U(f,P) - L(f,P) = \sum_{k=1}^n \left( M_K - m_K \right) \left( x_k - x_{k-1} \right) = \sum_{{\text type }A} + \sum_{{\text type }B} = \varepsilon + \varepsilon = 2 \varepsilon . \] Since 𝜀>0 was arbitrary, this shows that the upper and lower Riemann sums can be made arbitrarily close; hence, 𝑓 is Riemann integrable. This completes the proof of the Jordan test.

A function f : [𝑎, b] → ℝ is of bounded variation if the supremum of the sums \( \displaystyle \quad V_P (f) = \sum_{i=1}^n |f(x_i ) - f(x_{i-1})|, \ \) taken over all partitions 𝑃 = { 𝑥₀, 𝑥₁, … , 𝑥ₙ } of [𝑎, b], is finite. In other words, if the numbers VP(f) form a bounded set, as P ranges over the set of all partitions of [𝑎, b]. We denote the supremum of the VP(f) over all partitions P by \( \displaystyle \ V_a^b (f), \ \) the variation of f from 𝑎 to b.
The set 𝐵𝑉([𝑎, b]) of functions of bounded variation on a closed finite interval [𝑎, b] forms a vector space over ℝ (or ℂ). It is closed under function addition and scalar multiplication: if f and g are of bounded variation, then f + g and c f (for a scalar c) are also of bounded variation. The set 𝐵𝑉([𝑎, b]) is often endowed with the norm \( \displaystyle \quad \| f |_{BV}\, = |f(a)| + V_a^b (f) , \quad \) where \( \displaystyle \quad V_a^b (f) \ \) is the total variation of f. With this norm, 𝐵𝑉([𝑎, b]) is a complete normed space (a Banach space), but it is not separable. Here are some simple properties of 𝐵𝑉 functions.
  • If the function 𝑥(𝑡) is increasing in 𝑡 ∈ [𝑎, b], then its variation V(𝑡) = x(b) − x(𝑎).
  • If the function 𝑥(𝑡) is decreasing in 𝑡 ∈ [𝑎, b], then its variation V(𝑡) = 𝑥(𝑎) − 𝑥(b).
  • Every 𝐵𝑉 function has left and right limits everywhere.
  • Every 𝐵𝑉 function is Riemann integrable.
  • The function 𝑥(𝑡) ∈ 𝐵𝑉 has at most a countably infinite number of finite discontinuities on [𝑎, b].
  • The function 𝑥(𝑡) ∈ 𝐵𝑉 is bounded on [𝑎, b], so 𝐵𝑉[𝑎, b] ⊂ 𝔏[𝑎, b] ⊂ 𝔏p[𝑎, b] (p ≥ 1).
  • If x(t) is differentiable and its derivative is continuous on [𝑎, b], then
    \[ V(x; [a, b]) = \int_a^b \ \dot{x}(t) |\,{\text d}t . ` \]
  • \[ V_a^b (f) = V_a^c (f) + V_c^b (f) \quad \mbox{if } a < c < b . \]
References:    Proofs of these properties could be found in the following books:
  • G.B.Folland, Chapter 3.
  • Royden & Fitzpatrick, Section 6.3.
  • L. Ambrosio et al,
  • A. Zygmund, Chapter II.

In opposite to Dirichlet’s classical conditions that require finitely many jumps, 𝐵𝑉 allows countably many discontinuities

  • but they must be jump discontinuities only, and
  • the total variation must be finite.

Dirichlet's original proof uses a decomposition into finitely many monotone pieces. If you allow infinitely many pieces, the proof breaks.

Example 7: This example presents several high oscillating functions for which the corresponding Fourier series converge almost everywhere. Some of these functions are of bounded variations, but others are not.

Example 7A: We consider the following high oscillating function \( \displaystyle \quad f(x) = \sin \left( \frac{1}{x} \right) . \quad \) This function is a composition of two continuous functions: y = sin(u) and u = 1/𝑥, 𝑥 ≠ 0. Therefore, the given function 𝑓(𝑥) is a continuous for all 𝑥 ≠ 0. It is bounded and therefore integrable on (0, 1). But it violates the Dirichlet conditions as having infinite many maxima and minima and it is not piecewise continuous.

Now we show that \( \displaystyle \quad \lim_{x\to 0} \ \sin (1/x) \quad \) does not exist. We show this by exhibiting two sequences approaching zero that give different limit values of 𝑓(𝑥).

The first sequence \[ x_n = \frac{1}{\pi /2 + 2\pi n} , \qquad n= 0,1,2,\ldots . \] Then 𝑥ₙ → 0 as 𝑛 → ∞, and \[ \frac{1}{x_n} = \frac{\pi}{2} + 2\pi n \qquad \Longrightarrow \qquad \sin \left( \frac{1}{x_n} \right) = \sin \left( \frac{\pi}{2} + 2\pi n \right) = 1 . \] So along this sequence, 𝑓(𝑥ₙ) = 1.

The second sequence \[ x_n = \frac{1}{3\pi /2 + 2\pi n} , \qquad n= 0,1,2,\ldots . \] Then 𝑥ₙ → 0 as 𝑛 → ∞, and \[ \frac{1}{x_n} = \frac{3\pi}{2} + 2\pi n \qquad \Longrightarrow \qquad \sin \left( \frac{1}{x_n} \right) = \sin \left( \frac{3\pi}{2} + 2\pi n \right) = -1 . \] So along this sequence, 𝑓(𝑥ₙ) = −1.

Since approaching 0 along different sequences gives different limiting values (1 and −1), the limit does not exist. Hence, 𝑓 cannot be continuous at 𝑥 = 0 (no matter what value you assign to 𝑓(0)).

On the other hand, this function is square integrable, so 𝑓 ∈ ℌ²'([0,1]). According to Carleson's Theorem (1966), the Fourier series of 𝑓(𝑥) = sin(1/𝑥) converges pointwise almost everywhere to the function itself (see section). However, this function is not of bounded variation.    ▣

Example 7B: We consider another square integrable and high oscillating function \( \displaystyle \quad g(x) = \cos \left( \frac{1}{x} \right) . \quad \) This function is a composition of two continuous functions: y = cos(u) and u = 1/𝑥, 𝑥 ≠ 0. Therefore, the given function 𝑔(𝑥) = cos(1/𝑥) is a continuous for all 𝑥 ≠ 0.

Fourier coefficients of function 𝑔 are all finite: \begin{align*} a_0 &= \int_0^1 \cos \left( \frac{1}{x} \right) {\text d}x \approx 0.328276 ; \\ a_n &= \int_0^1 \cos \left( \frac{1}{x} \right) \cos \left( 2\pi n x \right) {\text d}x < \infty ; \\ b_n &= \int_0^1 \cos \left( \frac{1}{x} \right) \sin \left( 2\pi n x \right) {\text d}x < \infty . \end{align*} We plot function 𝑔(𝑥) along with its 20-term Fourier approximation using Mathematica:

S20[x_] = Integrate[Cos[1/x], {x, 0, 1}] + 2 *Sum[ Cos[2*Pi*n*x]* NIntegrate[Cos[1/x]*Cos[2*Pi*n*x], {x, 0, 1}] + Sin[2*Pi*n*x]*NIntegrate[Cos[1/x]*Sin[2*Pi*n*x], {x, 0, 1}], {n, 1, 20}]; Plot[{Cos[1/x], S20[x]}, {x, 0.01, 1}, PlotStyle -> Thick]
Figure 7.1: Fourier partial sum with 20 terms for function 𝑔.

   ▣

Example 7C: Let 𝑓(𝑥) = 𝑥·sin(π/(x)) for 0 < x ≤ 1, and f(0) = 0. We rewrite this function as \[ f(x) = \begin{cases} x\cdot \sin \left( \frac{1}{x} \right) , \quad&\mbox{for}\quad 0 < x < 1 , \\ 0 , \quad& \mbox{if} \quad x= 0 . \end{cases} \] We want to show that \[ \lim_{x\to 0} \, f(x) = \lim_{x\to 0} \, x\cdot \sin \left( \frac{1}{x} \right) = 0 = f(0) , \] which means that function 𝑓(𝑥) is continuous at 𝑥 = 0. Use the inequality \[ -1 \le \sin \left( \frac{1}{x} \right) \le 1 \quad \mbox{for} \quad x \ne 0. \] Multiplying by |𝑥| gives \[ - |x| \le |x|\cdot \sin \left( \frac{1}{x} \right) \le |x| , \quad x\ne 0. \] Thus, \[ \left\vert x\cdot \sin \left( \frac{1}{x} \right) \right\vert \le |x| , \quad x\ne 0. \] Since \( \displaystyle \quad \lim_{x\to 0}\,|x| = 0, \quad \) by squeeze theorem, \[ \lim_{x\to 0}\,x\cdot \sin \left( \frac{1}{x} \right) = 0. \] So 𝑓 is continuous at 0. For 𝑥 ≠ 0, it is a product and composition of continuous functions, so it is continuous everywhere.

The derivative at 0, if it exists, is \[ f' (0) = \lim_{h\to 0}\, \frac{f(h) - f(0)}{h} = \lim_{h\to 0}\, \frac{f(h) - 0}{h} = \lim_{h\to 0}\, \sin \left(\frac{1}{h} \right) . \] However, sin(1/h) has no limit as h → 0: it oscillates between −1 and 1. Therefore, its derivative at the origin does not exist. Now we show that this function is not of bounded variation..

Let us choose the sequence \[ a_n = \frac{1}{2n\pi + \pi /2} , \qquad n = 0, 1, 2, \ldots . \] Then \[ f (a_n ) = a_n \cdot 1 = a_n . \] Another sequence that provides the minima is \[ b_n = \frac{1}{2n\pi + 3\pi /2} , \qquad n = 0, 1, 2, \ldots . \] So \[ f (b_n ) = b_n \cdot (-1) = - b_n . \] Note that 𝑎ₙ, bₙ tend to zero as n → ∞, and the points are interplaced \[ -1 \cdots \le b_{n+1} \le a_{n+1} \le b_n \le a_n \cdots \le 1 . \] Now form a partition using \[ \left\{ \, 0, \ b_N , \ a_N , b_{N-1} , \ a_{N-1} , \, \ldots , \, b_0 , \ a_0 , \ 1\, \right\} \] for large 𝑁. The variation contributed by the oscillations near 0 includes term \[ \left\vert f( a_n ) - f(b_n ) \right\vert = \left\vert a_n - (-b_n ) \right\vert = a_n + b_n . \] So for this partition \[ V_0^1 (f) \ge \sum_{n=0}^N \left( a_n + b_n \right) . \] Asymptotically, \[ a_n = \frac{1}{2\pi n + \pi /2} \,\sim\, \frac{1}{2\pi n} , \qquad b_n = \frac{1}{2\pi n + 3\pi /2} \,\sim\, \frac{1}{2\pi n} , \] hence \[ a_n + b_n \,\sim\,\frac{1}{n\pi} . \] Therefore, \[ \sum_{n=1}^N \left( a_n + b_n \right) \,\sim\, \frac{1}{\pi}\,\sum_{n=1}^N \,\frac{1}{n} , \] and the harmonic series diverges as 𝑁 → ∞. Thus, the variation sums can be made arbitrary large; this means that \( \displaystyle \quad V_0^1 (f) = \infty . \)    ▣

Example 7D: Let 𝑔(𝑥) = 𝑥·cos(π/(2x)) for 0 < x ≤ 1, and 𝑔(0) = 0. Consider the partition P of [0, 1] given by \( \displaystyle \quad 0 < \frac{1}{2n} < \frac{1}{2n-1} < \cdots < \frac{1}{3} < \frac{1}{2} < 1. \quad \) The corresponding values of 𝑔 are \[ 0, \ \frac{(-1)^n}{2n} , 0\ , \frac{(-1)^{n-1}}{2n-1} , 0 , \ \cdots , 0,\ -\frac{1}{6}, \ 0 , \ \frac{1}{4} , \ 0, \ -\frac{1}{2} , \ 0, \] Then \[ V_P (g) = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \cdots + \frac{1}{n} , \] showing that 𝑔 is not in BV[0, 1]. However, 𝑔 ∈ 𝔏²([0,1]), and hence its Fourier series converges to 𝑔(𝑥) pointwise almost everywhere.    ▣

Example 7E: We consider function \[ f(x) = \begin{cases} x^{1+a}\,\sin \left( \frac{1}{x} \right) , &\quad \mbox{when }\ x > 0, \\ 0, & \quad \mbox{if } \ x = 0. \end{cases} \] with 𝑎 > 0. Its derivative is \[ f' (x) = \left( 1 + a \right) x^a \,\sin \left( \frac{1}{x} \right) - x^{a-1}\,\cos \left( \frac{1}{x} \right) . \] Hence, \[ \left\vert f' (x) \right\vert \le \left( 1 + a \right) x^a + x^{a-1} . \] Now check integrability of the derivative on (0,1): \[ \int_0^1 x^a \,{\text d} x = \frac{1}{a+1} < \infty \] and \[ \int_0^1 x^{a-1} \,{\text d} x = \frac{1}{a} < \infty \quad \mbox{because}\quad a > 0. \] So \[ \int_0^1 \left\vert f' (x) \right\vert {\text d}x < \infty . \] For any fixed &epsilon > 0, 𝑓 ∈ ℭ¹ on [ε,1], so for 𝑥 ∈ [ε,1] \[ f(x) = f(\varepsilon ) + \int_{\varepsilon}^x f' (t)\,{\text d}t . \] Letting ε → 0+0

  • 𝑓(ε) → 𝑓(0) = 0 because we already know that 𝑓 is continuous at 0,
  • \( \displaystyle \quad \int_0^{\varepsilon} \left\vert f' (t) \right\vert {\text d}t \,\to\, 0 \quad \) by integrability of the derivative.
Thus, for every 𝑥 ∈ [0, 1], \[ f(x) = f(0) + \int_0^x \,f' (t)\,{\text d}t = \int_0^x \,f' (t)\,{\text d}t . \] So function 𝑓 is absolutely continuous on [0, 1].

Now we show that function 𝑓 is uniformly bounded on variation for any partition. Let us take arbitrary partition 0 = 𝑥₀ < 𝑥₁ < 𝑥₂ < ⋯ < 𝑥ₙ = 1. Then for each subinterval \[ f(x_k ) - f(x_{k-1}) = \int_{x_k}^{x_{k-1}} \,f' (t) \,{\text d}t . \] Hence, \[ \left\vert f(x_k ) - f(x_{k-1}) \right\vert \le \int_{x_k}^{x_{k-1}} \left\vert f' (t) \right\vert {\text d}t . \] Summing over k, \[ \sum_{k=1}^n \left\vert f(x_k ) - f(x_{k-1}) \right\vert \le \sum_{k=1}^n \int_{x_k}^{x_{k-1}} \left\vert f' (t) \right\vert {\text d}t = \int_0^1 \left\vert f' (t) \right\vert {\text d}t . \] The right-hand side is a fixed finite constant, independent of the partition. Therefore, \[ V_0^1 (f) = \sup_{\mbox{partition}} \ \sum_n \left\vert f(x_k ) - f(x_{k-1}) \right\vert \le \int_0^1 \left\vert f' (t) \right\vert {\text d}t < \infty . \] So 𝑓 is of bounded variation on [0, 1].

Finally, we consider a numerical experiment and verify that the Fourier series for 𝑓(𝑥) = 𝑥3/2sin(1/𝑥) converges pointwise. To achieve this, we employ Mathematica:

f[x_] = x^(3/2) * Sin[1/x]; a0 = Integrate[f[x], {x, 0, 1}]; S20[x_] = N[a0] + 2* Sum[ Cos[2*n*Pi*x]*NIntegrate[f[x]*Cos[2*n*Pi*x], {x, 0, 1}] + Sin[2*n*Pi*x]*NIntegrate[f[x]*Sin[2*n*Pi*x], {x, 0, 1}], {n, 1, 20}]; Plot[{f[x], S20[x]}, {x, 0, 1}, PlotStyle -> Thick]
Figure 7.2: Fourier partial sum with 20 terms for function 𝑓.

   ■
End of Example 6

We will use the following important properties of the functions of bounded variation on a compact interval:

Every 𝐵𝑉 function has a derivative almost everywhere (this is a consequence of the Lebesgue Differentiation Theorem).

Every 𝐵𝑉 function 𝑓 admits the Jordan decomposition \[ f = g - h , \] where 𝑔 and ℎ are monotone increasing functions.

Lebesgue decomposition theorem for 𝐵𝑉 functions:
Let 𝑓 : [𝑎,𝑏] → ℝ be of bounded variation. Then there exist unique functions \[ f_c , \ f_j , \ f_s \ : \ [a,b] \to \mathbb{R} \] such that \[ f = f_c + f_j + f_s \] and

  1. 𝑓𝑐 is absolutely continuous on [𝑎,𝑏], so \( \displaystyle \quad f_c (x) = f_g (a) + \int_a^x g(t)\,{\text d}t \ \) for some 𝑔 ∈ 𝔏¹.
  2. 𝑓j is a pure jump function, i.e. \[ f_j = \sum_{t \in J(f)} \, \Delta f(t) \, \chi_{(t, b]} (x) , \] where \[ \Delta f(t) = f(t+0) - f(t-0) \] and 𝐽(𝑓) is the (countable) set of jump discontinuities. Here χt,b(t) is the characteristic function of the interval (𝑡, b] --- It outputs 1 for any input inside the interval and 0 for any input outside it.
  3. 𝑓𝑠 is singular continuous:
    • continuous everywhere,
    • derivative 𝑓𝑠(𝑥) = 0 for almost everywhere 𝑥,
    • increases only on a measure‑zero set.
    This decomposition is unique up to additive constants.

We have the following chains of inclusions for continuous functions over a closed, bounded interval of the real line:

Continuously differentiableLipschitz continuousabsolutely continuous ⊆ continuous and bounded variation ⊆ differentiable almost everywhere.

So monotone functions, Lipschitz functions are in 𝐵𝑉, but Hölder continuous functions are not always in 𝐵𝑉. The indefinite Riemann integral of a (bounded) integrable function is in 𝐵𝑉. 𝐵𝑉 functions form an algebra of discontinuous functions whose first derivative exists almost everywhere.

Every function of bounded variation is absolutely integrable, so BV([𝑎,b]) ⊂ 𝔏p([𝑎,b]) for any p ∈ [1, ∞].

Example 8: Let us consider a sequence of functions 𝑥ₙ(𝑡) = 1/2ⁿ for 1/2n+1 ≤ 𝑡 ≤ 1/2ⁿ, 𝑛 = 0, 1, 2, …. and zero otherwise. Now we construct periodic function \[ f(t) = \sum_{m=-\infty}^{\infty} \, x(t-m) , \] where \( \displaystyle \quad x(t) = \sum_{n\ge 0} \, x_n (t) . \quad \) This function violates the Dirichlet conditions as it has infinite many jumps.

f[x_] := Module[{n}, n = Floor[-Log[2, x]];(*n such that 1/2^(n+1) Plot[f[x], {x, 1/64, 1}, PlotRange -> {0, 1}, Exclusions -> None, PlotStyle -> Thick, AxesLabel -> {"x", "f(x)"}, Ticks -> {Table[1/2^k, {k, 0, 6}], Automatic}, GridLines -> {Table[1/2^k, {k, 0, 6}], None}, GridLinesStyle -> Directive[Gray, Dashed]]
For 𝑥 ∈ (1/2n+1, 1/2ⁿ), we have −log₂𝑥 ∈ (𝑛, 𝑛+1), so Floor9−Log[2,x]] = 𝑛.
g[x_] := Piecewise[{{1, 1/2 < x <= 1}, {1/2, 1/4 < x <= 1/2}, {1/4, 1/8 < x <= 1/4}, {1/8, 1/16 < x <= 1/8}, {1/16, 1/32 < x <= 1/16}, {1/32, 1/64 < x <= 1/32}}, 0]
Plot[g[x], {x, 1/64, 1}, PlotRange -> {0, 1}, PlotStyle -> Thick]
With Mathematica, we plot two versions of this function:

Figure 8.1: Continuous staircase.
     
Figure 8.2: Discontinuous staircase.

This function is neither continuous nor piecewise continuous on (0, 1) because it is discontinuous at infinitely many points. However, 𝑥(𝑡) is of bounded variation and hence integrable on (0, 1). The total variiation of staircase function 𝑥(𝑡) is the sum of all jumps: \[ V_0^1 (x) = \sum_{n\ge 1} \frac{1}{2^n} = 1. \]

Sum[1/2^n , {n, 1, Infinity}]
1
Now we evaluate the Fourier coefficients of function 𝑥(𝑡) on interval [0,1]: \begin{align*} a_0 &= \int_0^1 x(t)\,{\text d}t = 1 \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{4} + \frac{1}{4} \cdot \frac{1}{8} + \cdots \\ &= \frac{1}{2} \left[ 1 + \frac{1}{4} + \frac{1}{16} + \cdots \right] \\ &= \frac{1}{2} \,\sum_{n\ge 0} \frac{1}{4^n} = \frac{2}{3} . \end{align*}
Sum[1/4^n , {n, 0, Infinity}]
4/3
Other coefficients \begin{align*} a_n &= \int_0^1 \cos (2\pi n t)\,x(t)\,{\text d}t \\ &= \sum_{k\ge 0} \, \frac{1}{2^k} \,\int_{2^{-k-1}}^{2^{-k}} \,\cos (2\pi n t) \,{\text d}t \\ &= \frac{1}{n\pi} \,\sum_{k\ge 0} \, \frac{1}{2^{k+1}} \left[ \sin \left( 2^{1-k} n\pi \right) - \sin \left( 2^{-k} n\pi \right) \right] \le \frac{2}{n\pi} \end{align*}
(1/2^k) * Integrate[Cos[2*Pi*n*t], {t, 2^(-k - 1), 2^{-k}}]
{(2^(-1 - k) (Sin[2^(1 - k) n \[Pi]] - Sin[2^-k n \[Pi]]))/(n \[Pi])}
because \[ \sum_{k\ge 0} \frac{1}{2^{1+k}} = 1 . \]
Sum[2^(-1 - k), {k, 0, Infinity}]
1
Similarly, we get \[ b_n = \int_0^1 \sin (2\pi n t)\,x(t)\,{\text d}t \le \frac{2}{n\pi} . \] Therefore, the Fourier series of the given staircase function is presented by double sum: \begin{align*} S[f] &= \frac{2}{3} + 2\,\sum_{n\ge 1} \,\frac{2}{n\pi}\,\sum_{k=0}^{\infty} \,\frac{1}{2^{1+k}}\left\{ \left[ \sin \left( 2^{1-k} n\pi \right) - \sin \left( 2^{-k} n\pi \right) \right] \cos (2\pi n x) \right. \\ &\quad + \left. \left[ 2\left( 1 + 2\,\cos \left( 2^{-k} n\pi \right) \right) \sin^2 \left( 2^{-1-k} n\pi \right) \right] \sin (2\pi n x) \right\} . \end{align*} This Fourier series converges slowly because its coefficients decay as 1/𝑛, but the inner summation converges very fast and we keep only 10 terms for numerical experiment.
ss25[x_] = 2/3 + 2*Sum[ Sin[2*Pi*n*x]* Sum[{(2^-k (1 + 2 Cos[2^-k n \[Pi]]) Sin[ 2^(-1 - k) n \[Pi]]^2)/(n \[Pi])}, {k, 0, 10}], {n, 1, 25}] + 2* Sum[Cos[2*Pi*n*x]* Sum[{(2^(-1 - k) (Sin[2^(1 - k) n \[Pi]] - Sin[2^-k n \[Pi]]))/( n \[Pi])}, {k, 0, 10}], {n, 1, 25}]; Plot[ss25[x], {x, 0, 1}, PlotStyle -> Thick]
Figure 8.3: Fourier approximation of staircase function with 25 terms.
   ■
End of Example 8

Example 9: The Cantor set is a famous fractal that was discovered in 1874 by Henry John Stephen Smith and mentioned by German mathematician Georg Cantor in 1883. It is constructed by starting with the closed interval [0,1] and repeatedly removing the "middle third" of every remaining segment to infinity. Despite having an infinite number of points, the set's total length is zero, yet it contains as many points as the original interval.

The Cantor ternary set 𝐶 is created by iteratively deleting the open middle third from a set of line segments. This construction can be described recursively by setting 𝐶₀ = [0,1] and \[ {\mathcal C}_{n+1} = \frac{{\mathcal C}_{n}}{3} \,\cup\, \left( \frac{2}{3} + \frac{{\mathcal C}_{n}}{3} \right) = \frac{1}{3} \left( {\mathcal C}_{n} \cup \left( 2 + {\mathcal C}_{n} \right) \right) . \] for 𝑛 ≥ 0, so that \[ {\mathcal C} = \lim_{n\to\infty} \, {\mathcal C}_n = \cap_{n=1}^{\infty} {\mathcal C}_n . \]

The Cantor function

The Cantor function (often called the "Devil's Staircase") is a famous mathematical function that goes from 0 to 1 on the interval [0,1]. It is continuous everywhere, but strictly constant over intervals whose total length adds up to 1, making its derivative 0 almost everywhere.

The Devil’s staircase is the Cantor–Lebesgue function (also called the Cantor ternary function) that provides the canonical example of a singular continuous function. The Cantor function is closely related to the Cantor set. The Cantor set 𝐶 can be defined as the set of those numbers in the interval [0, 1] that do not contain the digit 1 in their base-3 (triadic) expansion, except if the 1 is followed by zeros only (in which case the tail 1000… can be replaced by 0222… to get rid of any 1). It turns out that the Cantor set is a fractal with (uncountably) infinitely many points (zero-dimensional volume), but zero length (one-dimensional volume). The formal definition is as follows.

For 𝑥 ∈ [0,1] :
  1. Write 𝑥 in base 3, using digits 0, 1, 2: \[ x = 0.x_1 x_2 x_3 \ldots . \]
  2. If the base-3 representation of 𝑥 contains a 1, replace every digit strictly after the first 1 with 0.
  3. Replace every digit:
    • 0 ↦ 0
    • 2 ↦ 1
    • 1 never appears for points in the Cantor set; if it does, choose the terminating expansion.
  4. Interpret the resulting binary expansion as a number in Cantor set, denoted by 𝐶. This defines a function 𝐹𝐶 : [0,1] → [0,1].
Equivalently, letting 𝐶 be the Cantor set on [0,1], the Cantor function 𝐹𝐶 : [ 0 , 1 ] → [ 0 , 1 ] can be defined as \[ {\mathcal F}_c (x) = \begin{cases} \sum_{n\ge 1} \frac{x_n}{2^n} , \quad & \mbox{if } \ x = \sum_{n\ge 1} \frac{2\,x_n}{3^n} \,\in \,{\mathcal C} \quad\mbox{for }\ x_n \in \left\{ 0, 1 \right\} ; \\ \sup_{y \le x, \ y\in {\mathcal C}} \ {\mathcal F}_c (x) , \quad & \mbox{ if } x \in \, [0,1] \setminus {\mathcal C} . \end{cases} \]

Its properties:

  • Continuous everywhere.
  • Nondecreasing.
  • Constant on each interval removed in the Cantor construction.
  • Derivative zero almost everywhere.
  • Increases only on the Cantor set (a measure‑zero set).
  • \( \displaystyle \quad {\mathcal F}_c \left( \frac{x}{3} \right) = \frac{{\mathcal F}_c (x)}{2} \quad \) and \( \displaystyle \quad {\mathcal F}_c \left( \frac{x+2}{3} \right) = \frac{1 + {\mathcal F}_c (x)}{2} . \)
This is exactly what “singular continuous” means. We give some examples.

We start with one half: \[ 1/2 \mapsto 0.1111111\ldots_3 , \] because \[ \sum_{k\ge 1} 3^{-k} = \frac{1}{2} . \]

Sum[1/3^k , {k, 1, Infinity}]
1/2
Digit replacement: 1 → (not allowed in the Cantor set; but replacement rule only applies to 0 and 2) So the Cantor function uses the terminating expansion: \[ \frac{1}{2} = 0.10000\ldots_2 . \] Thus, 𝐹c(½) = ½ because 𝐹c(𝑥) = 1 − 𝐹c(1 − 𝑥).

1/3 ↦ \[ \frac{1}{3} = 0.10000_3 . \] Digit replacement: 1 stays 1 (but note: 1 never appears for points in the Cantor set). So its binary form is \[ 0.1_3 \ \mapsto \ 0.1_2 = \frac{1}{2} . \] Hence, 𝐹c(⅓) = ½. From self-similarity, 𝐹c(⅔) = ½.

¼ Rewrite 𝑥 = ¼ in base 3: \[ \frac{1}{4} = 0.020202\ldots_3 \] Reason: \[ \frac{1}{8} = \sum_{k\ge 1} \ \frac{1}{9^k} = \sum_{k\ge 1} \ \frac{1}{3^{2k}} = 0.010101\ldots_3 . \] There are no 1s in base-3 representation of ¼. Digit replacement:

  • 0 → 0
  • 2 → 1
So: \[ 0.020202\ldots_3 \ \mapsto \ 0.010101\ldots_2 . \] This is the binary repeating fraction: \[ 0.010101\ldots_2 = \frac{1}{3} . \]
Sum[1/4^k , {k, 1, Infinity}]
1/3
Digit replacement: 1 → (not allowed in the Cantor set; but replacement rule only applies to 0 and 2) So the Cantor function uses the terminating expansion: \[ \frac{1}{2} = 0.10000\ldots_2 . \] Thus, 𝐹c(¼) = ⅓. By self-similarity, 𝐹c(¾) = ⅔.

    has the ternary representation 0.01210121…, with repeating block 0121. Indeed, we can compute its ternary expansion using long division.

We want digits 𝑎₁, 𝑎₂, 𝑎₃, … ∈ {0, 1, 2} such that \[ \frac{1}{5} = \sum_{k\ge 1} \,\frac{a_k}{3^k } . \] We start with 𝑥₀ = 1/5. Since \[ 3\,x_0 = \frac{3}{5} < 1 \qquad \Longrightarrow \qquad a_1 = 0 . \] Then we set 𝑥₁ = ⅗ and compute \[ 3\,x_1 = \frac{9}{5} = 1.8 . \] The largest digit ≤ 1.8 is 1; hence 𝑎₂ = 1. Next step: \[ x_2 = 3\,x_1 -1 = \frac{9}{5} -1 = \frac{4}{5} . \] We calculate \[ 3\,x_2 = \frac{12}{5} = 2.4 . \] The largest digit ≤ 2.4 is 2, so 𝑎₃ = 2. Next step: \[ x_3 = 3\,x_2 -2 = \frac{12}{5} - 2 = \frac{2}{5} . \] Next calculation shows \[ 3\,x_3 = \frac{6}{5} = 1.2 . \] The largest digit ≤ 1.2 is 1. so 𝑎₄ = 1. Next step: \[ x_4 = 3\,x_3 - 1 = \frac{6}{5} -1 = \frac{1}{5} . \] Now we are back to the original value 𝑥₄ = 𝑥₀. This means that the digits repeat from here on.

We evaluate the repeated block that corresponds to 0121: \[ q = \frac{1}{9} + \frac{2}{3^3} + \frac{1}{3^4} = \frac{16}{81} . \] Since the block repeats every 4 digits, the full ternary expansion is \[ \frac{1}{5} = q \cdot \frac{1}{1 - 3^{-4}} = \frac{16}{91} \cdot \frac{1}{1 - \frac{1}{81}} = \frac{16}{91} \cdot \frac{81}{80} = \frac{16}{80} . \] We check with Mathematica (its code is presented at the end)

Base3Expansion[1/5]
<|"PrefixDigits" -> {}, "RepeatDigits" -> {0, 1, 2, 1}, "Representation" -> Row[{"0.", Row[{ }], "(", Row[{0, 1, 2, 1}], ")_3"}]|>
The rational number 𝑥 = ⅕ belongs to the open interval (1/9, 2/9), which is removed in the Cantor set construction, so on it the Cantor function is constant. Using the self-similarity relation \[ {\mathcal C}(x) = \frac{1}{2} \, {\mathcal C}(3\,x) \qquad \mbox{for } \ x \in [0, 1/3] , \] take any 𝑥 ∈ (1/9, 2/9). Then 3𝑥 ∈ (⅓, ⅔), and we have 𝐹c(⅕) = ¼. By self-similarity, 𝐹c(⅘) = ¾.

    has the ternary representation \[ \frac{1}{6} = 0.0\left( 1 \right)_3 . \]

Base3Expansion[1/6]
<|"PrefixDigits" -> {0}, "RepeatDigits" -> {1}, "Representation" -> Row[{"0.", Row[{0}], "(", Row[{1}], ")_3"}]|>
Digit replacement: \[ 0.01_3 \ \mapsto \ 0.01_2 = \frac{1}{4} . \] So 𝐹c(⅙) = ¼.

1/7    has the base 3 periodic representation of length 6 with block 010212: \[ \frac{1}{7} = 0.010212\left( 010212 \right)_3 . \]

Base3Expansion[1/7]
<|"PrefixDigits" -> {}, "RepeatDigits" -> {0, 1, 0, 2, 1, 2}, "Representation" -> Row[{"0.", Row[{ }], "(", Row[{0, 1, 0, 2, 1, 2}], ")_3"}]|>
The first 1 occurs at position 𝑘 = 2. For any 𝑥, if the first ternary digit equal to 1 occurs at position 𝑘, then \[ {\mathcal F}_c (x) = \frac{k-1}{2^k} . \] This is the constant value on the middle-third interval at level 𝑘. So we have \[ {\mathcal F}_c \left( \frac{1}{6} \right) = \frac{1}{4} . \]

    has the ternary representation \[ \frac{1}{8} = 0.0100101\ldots = 0.01\left( 01 \right)_3 . \]

Base3Expansion[1/8]
<|"PrefixDigits" -> {}, "RepeatDigits" -> {0, 1}, "Representation" -> Row[{"0.", Row[{ }], "(", Row[{0, 1}], ")_3"}]|>
The first 1 occurs at position 𝑘 = 2, so F_C(⅛) = ¼.

1/9    has the ternary representation \[ \frac{1}{9} = 0.01_3 = 0.01_2 . \]

Base3Expansion[1/9]
<|"PrefixDigits" -> {0, 1}, "RepeatDigits" -> {}, "Representation" -> Row[{"0.", Row[{0, 1}], "_3"}]|>
Digit replacement: \[ 0.01_3 \ \mapsto \ 0.01_2 = \frac{1}{4} . \] Thus, 𝐹c(1/9) = ¼.
CantorFunction[1/9]
1/4
Now we plot the Cantor function together with their values at ⅕, ⅙, 1/7, ⅛, and 1/9.
(* Cantor function: monotone, Plot-safe *) Clear[CantorF] CantorF[x_?NumericQ] := Module[{t = x, c = 0, pow = 1/2}, Do[ t = 3 t; If[t < 1, Null, If[t < 2, c += pow; Break[], c += pow; t -= 2 ] ]; pow /= 2, {40} ]; c ] interval = {1/9, 2/9}; pts = {1/5, 1/6, 1/7, 1/8}; offsets = {0.05, 0.08, 0.11, 0.14}; Show[ Plot[CantorF[x], {x, 0.095, 0.24}, PlotRange -> {{0.095, 0.24}, {-0.03, 0.27}}, PlotStyle -> Thick, Exclusions -> None, AxesLabel -> {"x", "C(x)"}, ImageSize -> 750, Epilog -> { (* red interval on x-axis *) {Thick, Red, Line[{{interval[[1]], 0}, {interval[[2]], 0}}]}, (* purple plateau at 1/4 *) {Thick, Purple, Line[{{interval[[1]], 1/4}, {interval[[2]], 1/4}}], Text[Style["1/4", 14, Purple], {interval[[2]] + 0.003, 1/4}] }, (* 1/9 and 2/9 below x-axis, slanted *) Text[Style[TraditionalForm[1/9], 14, Italic], {1/9, -0.015}], Text[Style[TraditionalForm[2/9], 14, Italic], {2/9, -0.015}], (* 1/5..1/8 inside 0–0.25, slanted, with arrows down to axis *) Table[ { Black, Arrow[{{p, offsets[[i]]}, {p, 0}}], Text[ Style[TraditionalForm[pts[[i]]], 14, Italic], {p, offsets[[i]] + 0.015} ] }, {i, Length[pts]}, {p, {pts[[i]]}} ] } ], AxesOrigin -> {0.095, 0} ]

   Fig 9.1. Cantor--Lebesgue function including interval (1/9, 2/9).

1/10    has the ternary representation with 4-dogot periodic block 0022: \[ \frac{1}{10} = 0.\left( 0022 \right)_3 . \]

Base3Expansion[1/10]
<|"PrefixDigits" -> {}, "RepeatDigits" -> {0, 0, 2, 2}, "Representation" -> Row[{"0.", Row[{ }], "(", Row[{0, 0, 2, 2}], ")_3"}]|>
Digit replacement: \[ 0022 \ \mapsto \ 0011 . \] So \[ {\mathcal F}_c \left( \frac{1}{10} \right) = 0.0011_2 = \frac{1}{5} , \] because \[ q \cdot \frac{1}{1 - \frac{1}{2^4}} = \frac{1}{5}, \qquad q = \frac{1}{8} + \frac{1}{16} = \frac{3}{16} . \]

Systematic method to convert a rational number to base‑3 Let 𝑥 ∈ (0,1) be rational. To compute its base‑3 expansion: Algorithm (long division in base 3)

Set 𝑥_0 = 𝑥. For 𝑘=1,2,3,…:

  1. Multiply by 3: \[ 𝑦_𝑘 = 3𝑥_{𝑘−1} \]
  2. The 𝑘-th base‑3 digit is \[ a_k = \left\lfloor y_k \right\rfloor \in \{ 0, 1, 2 \} . \]
  3. Update the remainder: \[ x_k = y_k - a_k . \]
  4. Stop if 𝑥ₖ = 0 (terminating expansion) or if a remainder repeats (periodic expansion).
This is exactly the same as decimal long division, but with base 3.

Below is fully working Mathematica code that:

  • computes base‑3 expansions,
  • detects periodicity,
  • performs Cantor digit replacement,
  • evaluates the Cantor function,
  • plots the Devil’s staircase with your nine points marked.
Base‑3 expansion of a rational number
(* Exact base-3 expansion with periodicity detection *) Clear[Base3Expansion] Base3Expansion[r_Rational] := Module[{num = Numerator[r], den = Denominator[r], prefix = {}, seen = <||>, pos = 1, digit, rem, repeatStart, repeat}, rem = Mod[num, den]; (*Long division in base 3 with remainder tracking*) While[! KeyExistsQ[seen, rem] && rem != 0, seen[rem] = pos; digit = Quotient[3 rem, den]; AppendTo[prefix, digit]; rem = Mod[3 rem, den]; pos++]; If[rem == 0,(*terminating expansion*)<|"PrefixDigits" -> prefix, "RepeatDigits" -> {}, "Representation" -> Row[{"0.", Row[prefix], "_3"}]|>,(*repeating expansion*) repeatStart = seen[rem]; repeat = prefix[[repeatStart ;;]]; prefix = prefix[[1 ;; repeatStart - 1]]; <|"PrefixDigits" -> prefix, "RepeatDigits" -> repeat, "Representation" -> Row[{"0.", Row[prefix], "(", Row[repeat], ")_3"}]|>]]
Cantor function evaluation from ternary digits:
CantorFunction[x_Rational] /; 0 <= x <= 1 := Module[{r = x, digits = {}, d, n = 0, sum = 0}, While[True, n++; r = 3 r; d = Floor[r]; r = r - d; AppendTo[digits, d]; Which[d == 1, sum = Sum[If[digits[[k]] == 2, 1, 0]/2^k, {k, 1, n - 1}] + 1/2^n; Return[sum], r == 0, sum = Sum[If[digits[[k]] == 2, 1, 0]/2^k, {k, 1, n}]; Return[sum]]]]
   ■
End of Example 9

Although a 𝐵𝑉-function is a difference of two monotone functions, the usual Dirichlet-condition proof does not extend to these functions. The subtle issue is that the object appearing in the Dirichlet proof is not simply a monotone function 𝑓, but a localized difference such as

\[ g(t) = f(x+t) - f(x+0) \]
or
\[ g(t) = f(x+t) - f(x+0) + f(x-t) - f(x-0 ) , \]
which tends to 0 as 𝑡 → 0+0. If we write
\[ g(t) = g_1 (t) - g_2 (t) \]
with 𝑔₁, 𝑔₂ monotone, it is not automatically true for an arbitrary decomposition that both 𝑔₁(𝑡) → 0 and 𝑔₂(𝑡) → 0. The cancellation 𝑔(𝑡) = 𝑔₁(𝑡) − 𝑔₂(𝑡) → 0 may occur between two nonzero monotone limits. Therefore, one cannot naively apply the monotone second-mean-value argument to the two pieces separately unless one keeps careful track of the endpoint terms.

A correct 𝐵𝑉 proof uses a Jordan-type lemma:

Lemma 4: For any ϕ ∈ 𝐵𝑉(0, δ) with δ > 0, such that ϕ(𝑡) → 0 as 𝑡 → 0+0. Then \[ \int_0^{\delta} \phi (t)\,\frac{\sin (\lambda t)}{t}\,{\text d}t \, \to \, 0 \quad \mbox{as} \quad \lambda \to \infty . \]
What is known is that ϕ(𝑡)/𝑡 is integrable (but need not be 𝐵𝑉) when ϕ ∈ 𝐵𝑉 and ϕ(0) = 0.

The proof of the lemma uses Jordan's trick: represent \[ \phi (t) = \mu \left( [0, t] \right) , \] where μ = dϕ is the finite signed variation measure. Hence, \[ \frac{\phi (t)}{t} = \frac{1}{t}\,\int_0^t \,{\text d}\mu (s) . \] Now interchange integrations. \[ \int_0^{\pi} \,\frac{\phi (t)}{t}\,\sin (\lambda t)\,{\text d}t = \int_0^{\pi} \left( \int_s^{\pi} \, \frac{\sin (\lambda t)}{t}\,{\text d}t \right) {\text d}\mu (s) \] This is the heart of Jordan's proof.

Define \[ K_{\lambda} (s) = \int_s^{\pi} \, \frac{\sin (\lambda t)}{t}\,{\text d}t . \] It could be shown that \[ \left\vert K_{\lambda} (s) \right\vert \le \frac{C}{1 + \lambda s} , \] uniformly in ss. Indeed, integrate by parts: \[ K_{\lambda} (s) = \left. -\frac{\cos (\lambda t)}{\lambda t} \right\vert_s^t - \frac{1}{\lambda}\,\int_s^{\pi} \,\frac{\cos (\lambda t)}{t^2}\,{\text d}t . \] The boundary term is \( \displaystyle \quad O \left( \frac{1}{\lambda s} \right) , \quad \) and the integral satisfies \[ \frac{1}{\lambda}\,\int_s^{\pi} \,\frac{1}{t^2}\,{\text d}t = O \left( \frac{1}{\lambda s} \right) . \] Thus, \[ \left\vert K_{\lambda} (s) \right\vert \le \frac{C}{1 + \lambda s} , \] So \[ \left\vert \int_0^{\pi} \,\frac{\phi (t)}{t}\,\sin (\lambda t)\,{\text d}t \right\vert \le \int_0^{\pi} \, \frac{C}{1 + \lambda s} \,{\text d}\mu (s) . \] Now |μ| is a finite measure. Also \[ \frac{1}{1 + \lambda s} \,\to\, 0 \] for every s > 0. Since \[ \mu \left( \{ 0 \} \right) = \phi (0) - \phi (0-0) = 0 , \] there is no atom at 0. Hence, by the dominated convergence theorem for finite measures, \[ \int_0^{\pi} \,\frac{1}{1 + \lambda s}\, {\text d}|\mu | \,\to\, 0 . \] Consequently, \[ \int_0^{\pi} \,\frac{\phi (t)}{t}\,\sin (\lambda t)\,{\text d}t \,\to\, 0 \qquad \mbox{as } \lambda \to 0. \]

Jordan’s insight: the class “piecewise monotone with finitely many jumps” is contained in the much larger class of functions of bounded variation. He showed that the same conclusion holds for all fBV[−π, π].

Theorem 4 (Dirichlet--Jordan, global BV version): Let f be a 2ℓ-periodic, integrable function such that f is of bounded variation on [−ℓ, ℓ]. Then for every x ∈ ℝ,
\[ \lim_{n\to\infty} S_n (f; x) = \frac{f(x+0) + f(x-0)}{2} , \]
where Sₙ(f; x) is the n-th partial sum of the Fourier series of f, and f(x ±0) are the one-sided limits. In particular, if f is continuous at x, then the Fourier series converges to f(x). Moreover, if f is continuous on closed interval I ⊂ [−ℓ, ℓ], then the convergence is uniform on I.

The Dirichlet kernel is \[ D_n (t) = \frac{1}{2} + \sum_{k=1}^n \,\cos kt = \frac{\sin \left( n + \frac{1}{2} \right) t}{2\,\sin (t/2)} . \] Then n-th Fourier partial sum is \[ S_n (f;x) = \frac{1}{\pi}\,\int_{-\pi}^{\pi}\, f(x-t)\,D_n (t)\,{\text d}t . \] Define \[ A = \frac{f(x+0) + f(x-0)}{2} \] and substract it from the partial sum \[ S_n (f;x) - A = \frac{1}{\pi}\,\int_{-\pi}^{\pi} \phi (t) \, D_n (t)\,{\text d}t , \] where \[ \phi (t) = \phi_x (t) = f(x+0) + f(x-0) - 2\,A , \qquad \phi (0+0) = 0. \] Because translations preserve variation, we have ϕ ∈ 𝐵𝑉([−π, π]). Thus, the theorem reduces to proving \[ \int_{-\pi}^{\pi} \phi (t) \, D_n (t)\,{\text d}t \,\to\, 0 \qquad \mbox{as } n\to\infty . \] Define \[ g(t) = \frac{\phi (t)}{2\,\sin (u/2)} . \] Near the origin, its denominator behaves as t. Since ϕ(0) = 0 and every 𝐵𝑉 function satisfies \[ |\phi (t)| \le V_0^t (\phi ) , \] we have \[ g(t) = O(1) \quad \mbox{as } t\to 0. \] Indeed, \[ \frac{|\phi (t)|}{t} \le \frac{1}{t}\, V_0^t (\phi ) , \] which remains locally bounded because the variation measure is finite.

Moreover, 𝑔 is again 𝐵𝑉 on [0, π]. Hence, \[ \int_0^{\pi} \,\phi\,D_n = \int_0^{\pi} \,g(t)\,\sin \left( n + \frac{1}{2} \right) t\,{\text d}t . \] Thus, it is enough to show \[ \int_0^{\pi} \,g(t)\,\sin \left( \lambda_n t \right) {\text d}t \,\to\, 0 , \qquad \lambda_n = n + \frac{1}{2} . \] A 𝐵𝑉 function defines a finite signed measure d𝑔. For every ℭ¹ function h, \[ \int h\,{|text d}g + \int g\,{\text d}h = g(\pi )\,h(\pi ) - g(0)\, h(0) . \] Take \[ h(t) = - \frac{\cos (\lambda_n t)}{\lambda_n} \qquad \Longrightarrow \qquad {\text d}h = \sin \left( \lambda_n t \right) {\text d}t . \] Hence, \[ \int_0^{\pi} g(t)\,\sin \left( \lambda_n t \right) {\text d}t = \left[ - \frac{g(t)\,\cos \left( \lambda_n t \right)}{\lambda_n} \right]_{t=0}^{t=\pi} + \frac{1}{\lambda_n} \,\int_0^{\pi} \cos \left( \lambda_n t \right) {\text d}g (t) . \] The boundary term satisfies \[ \left\vert \frac{g(\pi )\,\cos\left( \lambda_n \pi \right) - g(0) |}{\lambda_n} \right\vert \le \frac{|g(\pi )| + |g(0)|}{\lambda_n} \,\to\, 0 . \] Now d𝑔 is a finite signed measure. Therefore, \[ \left\vert \int_0^{\pi} \,\cos \left( \lambda_n t \right) {\text d}g \right\vert \le |{\text d}g |\left( [0, \pi ]\right) , \] where |d𝑔| denotes total variation. Hence, \[ \left\vert \int_0^{\pi} \,\cos \left( \lambda_n t \right) {\textd d}g \right\vert \le \frac{|{\text d}g|\left( [0, \pi ]\right)}{\lambda_n} \,\to\, 0 . \] Consequently, \[ \int_0^{\pi} \,g(t) \,\sin \left( \lambda_n t \right) {\text d}t \,\to\, 0 . \] Therefore, \[ \int_0^{\pi} \, \phi (t)\, D_n (t)\,{\text d}t \,\to \, 0 . \] Thus, \[ S_n (f;x) - A \,\to\, 0 . \] There are three important inbredients in this proof:

  1. Localization: \[ S_n (f;x) = \frac{1}{\pi}\,\int_0^{\pi} \,\phi (t)\,D_n (t)\,{\text d}t . \]
  2. Cancellation of the simgularity in the Dirichlet kernel:

    The factor ϕ(0) = 0 cancels the singularity of the Dirichlet kernel, so \[ g(t) = \frac{\phi (t)}{2\,\sin (t/2)} \] is again of bounded variation.

  3. Integration by parts leads to \[ \int_0^{\pi} g(t)\,\sin \left( \lambda_n t \right) {\text d}t = O\left( \lambda_n^{-1} \right) \] because oscillation transfers the derivative from the sine to the finite variation measure d𝑔.
One point in the sketch above deserves refinement. The claim that \[ \frac{V_0^t (\phi )}{t} \] "is locally bounded" is not true for every 𝐵𝑉 function. The rigorous proof instead establishes directly that 𝑔(𝑡) = ϕ(𝑡)/(2sin⁡(𝑡/2)) is of bounded variation (or equivalently works with the Stieltjes measure associated to ϕ without dividing by sin⁡(𝑡/2). This lemma is the main technical step in classical treatments such as those of Zygmund and Hardy. Once that lemma is established, the integration-by-parts argument above is completely rigorous.

Example 10: Let 𝐶 : [0,1] → [0,1] be the standard Cantor function, extended by 0 outside [0,1]. Take the (non-periodic) Fourier transform with Lebesgue measure normalized by d𝑡/2π: \[ \hat{C}(\xi ) = \int_{\mathbb{R}} C(t)\, e^{-\mathbf{j} \xi t} \ \frac{{\text d}t}{2\pi} . \] Then one has the explicit formula \[ \hat{C}(\xi ) = \frac{1}{\mathbf{j}\xi} - \frac{1}{\mathbf{j}\xi} \,\prod_{k=1}^{\infty} \,\cos \left( \frac{\xi}{3^k} \right) \qquad (\xi \ne 0) , \] and \( \displaystyle \quad \hat{C}(0) = \int_0^1 \,C(t)\,\frac{\text d}{2\pi} . \)

Let us show a derivation of the formula above. On [0,1], define the 𝑛-th Cantor measure μₙ as the uniform discrete measure on the 2ⁿ endpoints of the 𝑛-th stage Cantor construction: \[ \mu_n = \frac{1}{2^n} \,\sum_{k=1}^{2^n} \,\delta_{x,k,n} \] when each δ𝑥,𝑘,𝑛 has a ternary expansion using only digits 0 and 1 in the first 𝑛 places.

Define the step function \[ C_n (x) = \mu_n ([0,1]) , \qquad x \in \{ 0, 1 \} , \] and extend by 0 outside [0,1]. Then

  • 𝐶ₙ is nondecreasing step function;
  • 𝐶ₙ → 𝐶 uniformly on [0,1], when 𝐶 is the Cantor function;
  • μₙ ⇀ μ weakly, where μ is the Cantor (probability) measure and 𝐶(𝑥) = μ([0,𝑥]).

Let us define the Fourier--Stieltjes transform of μₙ: \[ \phi_n (\xi ) = \int_{-\pi}^{\pi} \,e^{-\mathbf{j}\xi x}\,{\text d}\mu_n (x) = \frac{1}{2^n}\,\sum_{k=1}^{2^n} e^{-\mathbf{j}\xi x_{k,n}} . \] Using the ternary construction, each point at stage 𝑛 is of the form \[ x = \sum_{i=1}^m \frac{2\varepsilon_i}{3^i} , \qquad \varepsilon_i \in \{ 0, 1 \} . \] Thus, \[ \phi_n (\xi ) = \frac{1}{2^n} \ \sum_{\varepsilon_1 , \ldots , \varepsilon_m} \,\exp \left\{ -\mathbf{j}\xi \sum_{k=1}^n \frac{2\varepsilon_i}{3^i} \right\} = \prod_{i=1}^n \frac{1}{2} \left( 1 + e^{-\mathbf{j} \xi 2/3^i} \right) . \] Rewrite each factor: \[ \frac{1}{2} \left( 1 + e^{-\mathbf{j}\alpha} \right) = e^{-\mathbf{j} \alpha /2}\,\cos\left( \frac{\alpha}{2} \right) . \] With α = 2ξ/3i, we get \[ \phi_n (\xi ) = \prod_{i=1}^n \, e^{-\mathbf{j}\xi /3^i} \,\cos \left( \frac{\xi}{3^i} \right) = \exp \left\{ -\mathbf{j}\xi \,\sum_{i=1}^n \right\} \prod_{i=1}^n \cos \left( \frac{\xi}{3^i} \right) . \] Since \[ \sum_{i=1}^n 3^{-i} = \frac{1}{2} \left( 1 - 3^{-n} \right) , \] this is \[ \phi_n (\xi ) = \exp \left\{ -\mathbf{j}\xi \,\frac{1 - 3^{-n}}{2} \right\} \prod_{i=1}^n \cos \left( \frac{\xi}{3^i} \right) . \] As 𝑛 → ∞, \[ \phi_n (\xi ) \,\to\, \phi (\xi ) = e^{-\mathbf{j} /2} \, \prod_{i=1}^{\infty} \cos \left( \frac{\xi}{3^i} \right) , \] which is the classical product formula for the Fourier--Stieltjes transform of the Cantor measure μ.

Now we rederive this formula using integration by parts. The non-periodic Fourier transform of 𝐶ₙ on ℝ is \[ \hat{C}_n (\xi ) = \int_{\mathbb{R}} C_n (x)\, e^{-\mathbf{j}\xi x} \,{\text d} x = \int_0^1 e^{-\mathbf{j}\xi x} \,{\text d} x . \] Integration by parts yields \[ \int_0^1 e^{-\mathbf{j}\xi x} \,{\text d} x = \left[ - C_n (x)\, \frac{e^{-\mathbf{j}\xi x}}{\mathbf{j}\xi} \right]_{x=0}^1 + \frac{1}{\mathbf{j}\xi}\,\int_0^{1} \, e^{-\mathbf{j}\xi x} \,{\text d} C_n (x) . \] However, d𝐶ₙ = dμₙ, and 𝐶ₙ(0) = 0, 𝐶ₙ(1) = 1, so \[ \int_0^1 e^{-\mathbf{j}\xi x} \,{\text d} x = \frac{1}{\mathbf{j}\xi} \left( 1 - \int_0^{1} \, e^{-\mathbf{j}\xi x} \,{\text d} \mu_n (x) \right) = \frac{1}{\mathbf{j}\xi} \left( 1 - \phi_n (\xi ) \right) . \] Thus, \[ \hat{C}_n (\xi ) = \frac{1}{\mathbf{j}\xi} \left( 1 - \exp \left\{ -\mathbf{j}\xi \,\frac{1 - 3^{-n}}{2} \right\} \right) \prod_{i=1}^n \cos \left( \frac{\xi}{3^i} \right) . \]

   ▣

If you now periodize 𝐶 to a 2𝜋-periodic function 𝐹 on ℝ (by composing with an affine map from [0,1] to some interval of length 2𝜋), the Fourier coefficients of that periodic Cantor function are just the samples of this transform at integer frequencies (up to the usual scaling depending on your convention). Concretely, with the standard 2𝜋-periodic convention \[ \hat{F} = \frac{1}{2\pi}\,\int_{-\pi}^{\pi} F(x)\,e^{-\mathbf{j}nx} \,{\text d} x , \] you get \[ \hat{F}(n) = \frac{1}{\mathbf{j} n} \left( 1 - e^{\mathbf{j} n/2} \,\prod_{k=1}^{\infty} \cos \left( \frac{n}{3^k} \right) \right) , \qquad n\ne 0 , \] again with \( \displaystyle \quad \hat{F}(0) \quad \) given by the average of 𝐹

Let 𝐶 be the standard Cantor function, periodized to a 2𝜋-periodic function 𝐹.

  • 𝐶 is monotone, hence of bounded variation on [0,1].
  • After periodization,  𝐹 ∈ 𝐵𝑉([−𝜋,𝜋]) and is continuous.
By the Dirichlet–Jordan theorem: \[ S_n (F;x) \,\to\, F(x) \qquad \mbox{for every } x. \] So the classical Fourier series of the Cantor function (as a 𝐵𝑉 function with respect to Lebesgue measure) converges pointwise everywhere to the Cantor function.

It is not the Fourier series that misbehaves; the pathologies belong to the Fourier–Stieltjes series of the Cantor measure, which is a different object.

Let \( \displaystyle \quad \hat{F}(n) \quad \) be the Fourier coefficients of the periodized Cantor function: \[ \hat{F} (n) = \frac{1}{2\pi} \,\int_{-\pi}^{\pi}\, F(x)\,e^{-\mathbf{j}nx} \,{\text d} x . \] For any 𝐵𝑉 function on [−𝜋,𝜋], one has the classical estimate \[ \left\vert \hat{F} (n) \right\vert \le \frac{\mbox{Var}(F)}{\pi\,|n|} , \qquad n\ne 0. \] Since Var(𝐹) = 1 for the Cantor function (it is increasing from 0 to 1), we get \[ \left\vert \hat{F} (n) \right\vert = O \left( \frac{1}{|n|} \right) . \] So at the very least, the coefficients decay like 1/∣𝑛∣. This is expected because the Cantor function is discontinuous at end points (upon its periodic expansion), 𝐶(0) = 0 \ne 1 = 𝐶(1).

The Cantor function is not just BV; it is Hölder continuous with exponent \[ \alpha = \frac{\ln 2}{\ln 3} \approx 0.6309. \[ In general, if a 2𝜋-periodic function is Hölder continuous of order 𝛼 ∈ (0,1], then \[ \left\vert \hat{F} (n) \right\vert = O \left( \frac{1}{|n|^{\alpha}} \right) . \] So for the Cantor function, \[ \left\vert \hat{F} (n) \right\vert = O \left( \frac{1}{|n|^{\alpha}} \right) , \qquad \alpha = \frac{\ln 2}{\ln 3} . \] This is a sharper estimate than the BV bound 𝑂(1/∣𝑛∣) in the sense that it reflects the fractal regularity: the function is smoother than a generic BV function, but not Lipschitz.

However, you cannot absolute convergence of the Fourier series because ∑|𝑛|−α diverges for α ≤ 1.

Mathematica already has the built-in CantorStaircase.

f[x_] := CantorStaircase[x]
You can verify it:
Plot[f[x], {x, 0, 1}, PlotRange -> All]
On the interval [0,1], the Fourier series for Cantor's function is \[ C(x) = \frac{a_0}{2} + \sum_{n\ge 1}\, a_n \cos (2n\pi x) + b_n \sin (2n\pi x) . \] Define Cantor's function:
Clear[cantor] cantor[x_?NumericQ] := cantor[x, 40] cantor[0., _] = 0.; cantor[1., _] = 1.; cantor[x_?NumericQ, n_Integer] := Which[ n == 0, x, x < 1/3, .5*cantor[3. x, n - 1], x <= 2/3, .5, True, .5 + .5*cantor[3. x - 2., n - 1] ]
The coefficients are
M = 40; alist = Table[ 2 NIntegrate[cantor[x] Cos[2 Pi n x], {x, 0, 1}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}], {n, 1, M}]; blist = Table[ 2 NIntegrate[cantor[x] Sin[2 Pi n x], {x, 0, 1}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}], {n, 1, M}];
Now build the truncated series, say with the first 30 harmonics
FS[x_] := N[a0 + Sum[ alist[[k]] Cos[2 Pi k x] + blist[[k]] Sin[2 Pi k x], {k, 1, M}]]
Plot[{cantor[x], FS[x]}, {x, 0, 1}, PlotStyle -> {{Blue, Thick}, {Red, Thick}}, PlotRange -> All]
Figure 10.1: Fourier partial sum (in red) with 40 terms for Cantor's function (in blue).

   ■
End of Example 10
There is also a stronger version (Jordan test):

Theorem 5 (Jordan local test): If for some δ > 0, f is of bounded variation on interval [−δ, δ], then \[ \lim_{\lambda\to\infty}\ S_n (f;x) = \lim_{\lambda\to\infty}\ \frac{1}{\pi}\,\int_{0}^{\delta} \left[ f(x+t) + f(x-t) \right] D_n (x-t)\,{\text d}t = \frac{f(x+0) + f(x-0)}{2} . \]

Split the integral \[ S_n (f;x) = \frac{1}{\pi}\,\int_0^{\pi} \, \frac{f(x+t) + f(x-t)}{2\,\sin (t/2)}\, \sin \left( n + \frac{1}{2} \right) t \,{\text d}t \] into two parts \[ \int_0^{\pi} = \int_0^{\delta} + \int_{\delta}^{\pi} . \] Away from the origin part tends to zero because the denominator is bounded from below. This case is actually reduced to the Riemann--Lebesgue lemma.

Near the origin on (0,δ) functions \[ f(x+t) , \qquad f(x-t) \] are 𝐵𝑉. So exactly Jordan's argument applies.

This theorem 5 is essentially equivalent to Riemann's localization principle. Indeed, if two L1L1-functions agree in a neighborhood of 𝑥₀, then \[ S_n (f; x_0 ) - S_n (g; x_0 ) \,\to\, 0 . \] Hence, one may replace 𝑓 by a function that is globally 𝐵𝑉 but coincides with 𝑓 near 𝑥₀​, and the global Jordan theorem immediately yields the local one.

There is a finite signed Borel measure μ on [𝑎, b] such that \[ f(t) = f(a) + \mu ([a, b]) , \] and the total variation of μ equals the total variation of f.

Thus, integrals of the form \[ \int f(t)\, D_n (x-t)\,{\text d} t \] can be reinterpreted as Stieltjes integrals with respect to a finite measure of bounded variation.

Localization and Jordan’s test: As before, write \[ S_n (f; x) - \ell (x) = \frac{1}{\pi}\,\int_0^{\pi}\, g_x (t)\, D_n (t) \,{\text d}t , \] with \[ g_x (t) = \frac{f(x+t) + f(x-t)}{2} - \ell (x) . \] Now assume only that f is of bounded variation on [−π, π] (or locally near x for the local version). Then:

  • gx is also of bounded variation on [0, π];
  • hence defines a finite signed Stieltjes measure dα(t)with total variation bounded by V(gx).
We then integrate by parts in the Stieltjes sense: \[ \int_0^{\pi} g_x (t)\, D_N (t) \,{\text d}t = \left. \left( \alpha (t)\,D_n (t) \right) \right\vert_{t=0}^{\pi} - \int_0^{\pi} \alpha (t)\, {\text d} D_n (t) . \] Key points:
  • Boundary term: α(t) is bounded and Dₙ is uniformly bounded on [ε, π]; near 0, α(t) → 0 because gx(t) → 0 as t → 0 (one-sided limits exist).
  • Main term: dDₙ is highly oscillatory; one shows that \[ \int_0^{\pi} \alpha (t)\, {\text d} D_n (t) \ \to \ 0 \] using the oscillation of \( \displaystyle \quad \sin \left( \left( n + \frac{1}{2} \right) t \right) \quad \) and the bounded variation of α.
This is essentially a Dirichlet-type test for Stieltjes integrals: if 𝑓 has bounded variation and the kernel has oscillatory primitives uniformly bounded in 𝑡, then the integral tends to 0. Thus, \[ S_n (f; x) \ \to \ \ell (x) \] for all x, with the same midpoint rule at jumps.

Why 𝐵𝑉 allows countably many jumps?

A function in BV[−π, π] may have countably many jump discontinuities, but:
  • the sum of the absolute jump sizes is finite (it is part of the total variation);
  • there is no uncontrolled accumulation of variation at a point.
This is exactly what the Stieltjes-measure viewpoint captures: the jump part of 𝑓 corresponds to a purely atomic part of the measure with finite total mass. The oscillatory integral against a finite measure is still controlled, so the proof goes through without needing “finitely many jumps” or “finitely many monotone pieces”.

In other words, Jordan’s theorem shows that Dirichlet’s finiteness assumptions were technically convenient but not essential—bounded variation is the true structural condition. Therefore, we expect that its Fourier series converges pointwise for almost all points from [0, 1] (according to Carleson's theorem).

Example 11: On interval [0, 1], we consider the composition of trigonometric functions: \[ f(t) = \sin \left( \tan (\pi t) \right) , \qquad t \in (0,1] . \] Since sine function is bounded by 1, this function 𝑓 belongs to 𝔏p for any p ∈ [1, ∞], including p = 2 and p = ∞. Therefore, we expect that its Fourier series converges pointwise almost everywhere in [0,1] according to Carleson's theorem.

However, this trigonometric function is not of bounded variation as it is seen from its graph.

Plot[Sin[Tan[Pi*x]], {x, 0, 1}, PlotStyle -> Thick]

   Fig 11.1. Graph of sin(tan(π𝑥)).
     
   Fig 11.2. Graph of cos<.(tan(π𝑥)).

There's also another closely related function 𝑔(𝑥) = cos(tan(π𝑥)). The sum of their square norms in 𝔏²([0,1]) is \[ \| \sin (\tan (\pi x)\|^2 + \| \cos (\tan (\pi x)\|^2 = 1 = \int_0^1 f^2 (x)\,{\text d}x + \int_0^1 g^2 (x)\,{\text d}x \] because \[ \| \sin (\tan (\pi x)\|^2 = \int_0^1 f^2 (x)\,{\text d}x = \frac{1}{2} - \frac{1}{2\,e^2} \approx 0.432332 , \qquad \| \cos (\tan (\pi x)\|^2 \approx 0.567668 . \]

Integrate[(Sin[Tan[Pi*x]])^2, {x, 0, 1}]
1/2 - 1/(2 E^2)
Integrate[(Cos[Tan[Pi*x]])^2, {x, 0, 1}]
1/2 (1 + 1/E^2)
   ■
End of Example 11

Dini's conditions


Ulisse Dini

The following theorem was proved in 1880 by an Italian mathematician Ulisse Dini (1845--1918). Ulisse_Dini grew up at a time when political, and military, events in Italy were intensifying as the country came nearer to unification. In 1865 Dini entered a competition for a scholarship to provide the necessary funds to allow a student to further their studies abroad. He won the scholarship and went to Paris where he studied with Bertrand and Hermite. This was a period of high mathematical activity for Dini and seven publications came out of the research he undertook during his time in Paris.

Dini returned to Pisa in 1866, and was appointed to a post in the University of Pisa. There he taught advanced topics in algebra and also the theory of geodesy. Political events in Italy continued, with the Treaty of Vienna bringing Venice into the Italian Kingdom in 1866. Rome was attacked by Italian troops the following year but France defended the city with its troops against the attack. There was widespread unrest in Italy due to dissatisfaction with the government and it was far from clear that the newly unified country would not split apart again. In 1870, however, Italian troops captured Rome.

Dini progressed quickly in his career at the University of Pisa, being appointed to Betti's chair of analysis and higher geometry in 1871. This was not due to Betti's retiral, but rather because Betti's interests had moved more towards mathematical physics. Dini was not someone who was going to concentrate solely on mathematics and a university career, the political events of the time having a profound effect on someone of Dini's character.

Dini published a number of major texts throughout his career. He published Foundations of the theory of functions of a real variable in 1878; a treatise on Fourier series in 1880; and a two volume work Lessons on infinitesimal analysis with the first volume appearing in 1907 and the second in 1915. In this last work he devoted a chapter to integral equations in which he presented many of his own innovative ideas. Dini's most famous student was Luigi Bianchi.

There are several "Dini's tests" because Dini's original idea can be applied in multiple ways, depending on what exactly you want to prove about a Fourier series:

  • pointwise convergence at a single point,
  • uniform convergence on an interval,
  • convergence at endpoints,
  • convergence of the conjugate series,
  • convergence under different regularity assumptions (a function has one-sided limits, continuity, monotonicity, bounded variation).
Theorem 6 (Dini's criterion): Suppose that a 2ℓ-periodic function f(x) ∈ 𝔏[−ℓ, ℓ]. If function 𝑓 has one -sided limits at point 𝑥 and satisfies the local Dini's conditions
\[ \int_0^{\delta} \,\frac{|f(x+t) - f(x+0)|}{t} \, {\text d} t < \infty , \qquad \int_0^{\delta} \,\frac{|f(x-t) - f(x-0)|}{t} \, {\text d} t < \infty , \]
then the Fourier partial sums approach
\[ \lim_{n\to\infty}\ S_n (f;x) = \frac{f(x+0) + f(x-0)}{2} . \]
Note:    Dini's conditions admit also a symmetric formulation:
\[ \int_0^{\delta} \,\frac{|f(x+t) - f(x+0)| + |f(x-t) - f(x-0)|}{t} \ {\text d} t < \infty \]

Proof of Theorem 6 is based on the following

Lemma 5 (Dini): Let ϕ be measurable on [−ℓ, ℓ] function with ϕ(0) = 0. If for some small positive δ, \[ \int_0^{\delta} \, \frac{|\phi (t)|}{t}\,{\text d}t \,<\,\infty , \] then \[ \int_{-\ell}^{\ell} \phi (u)\,D_n (u)\,{\text d}u \,\to \, 0 \qquad\mbox{as } n\to\infty . \]
Near u = 0, the Dirichlet kernel behaves as \[ D_n (u) = \frac{\sin \left( n + \frac{1}{2} \right) u}{2\,\sin (u/2)} \,\sim \,\frac{\sin \left( n + \frac{1}{2} \right) u}{u} . \] Thus, \[ \phi (u)\, D_n (u) \,\sim \,\phi (u) \cdot \frac{\sin \lambda_n u}{u} , \qquad \lambda_n = n + \frac{1}{2} . \] The Dini condition ensures that \[ \frac{\phi (u)}{u} \in 𝔏^1 (0, \delta ) , \] so the product is integrable.
The n-th Fourier partial sum at 𝑥 is \[ S_n (f;x) = \frac{1}{\pi} \,\int_{-\pi}^{\pi} \, f(x-t)\,D_n (t)\,{\text d}t , \] where \[ D_n (t) = \frac{\sin \left( n + \frac{1}{2} \right) t}{2\,\sin (t/2)} . \] Split function 𝑓(𝑥 − 𝑡) into its one-sided limits: \[ f(x-t) = \begin{cases} f(x+0) + \phi_{+} (t) , \qquad& \mbox{for } t< 0 , \\ f(x-0) + \phi_{-} (t) , \qquad& \mbox{for } t > 0 \end{cases} \] where \[ \phi_{-} (t) = f(x-t) - f(x-0), \qquad \phi_{+} (t) = f(x-t) - f(x+0) . \] Then \[ S_n (f;x) = \frac{f(x-0)}{\pi} \,\int_0^{\pi} D_n (t) \,{\text d}t + \frac{f(x+0)}{\pi} \,\int_{-\pi}^0 D_n (t) \,{\text d}t +E_n , \] where \[ E_n = \frac{1}{\pi} \left( \int_0^{\pi} \phi_{-} (t)\, D_n (t) \,{\text d}t + \int_{-\pi}^0 \phi_{+} (t)\, D_n (t) \,{\text d}t \right) . \] Because Dₙ(𝑡) is even, \[ \int_0^{\pi} \,D_n (t)\,{\text d}t = \int_{-\pi}^0 \,D_n (t)\,{\text d}t = \pi . \] Thus, the main terms give \[ \frac{f(x -0)}{2\pi} \cdot \pi + \frac{f(x +0)}{2\pi} \cdot \pi = \frac{f(x+0) + f(x-0)}{2} . \] So \[ S_n (f; x) = \frac{f(x+0) + f(x-0)}{2} + E_n . \] We must show that Eₙ → 0 as n → ∞.

Let us consider the positive side: \[ I_n^{-} = \int_0^{\pi}\,\phi_{-} (t)\,D_n (t)\, {\text d}t . \] Define \[ g_{-} (t) = \frac{\phi_{-} (t)}{\sin (t/2)} . \] Because ϕ-(𝑡) = 𝑓(𝑥−𝑡) − 𝑓(𝑥−0) and ϕ-(𝑡) → 0 as 𝑡 → 0+0., and sin(𝑡/2) → 𝑡/2, we have \[ g_{-}(t) \,\to\, 2\,\phi'_{-}(0) \] provided 𝑓 is differentiable from the left at 𝑥. Under the Dini condition, 𝑔- ∈ 𝔏¹ and is of bounded variation. Thus, \[ I_n^{-} = \int_0^{\pi} \, g_{-} (t)\,\sin \left( \left( n + \frac{1}{2} \right) t \right) {\text d} t . \] By Dirichlet's test (or integration by parts). since 𝑔- is integrable and of bounded variation, \[ I_n^{-} \,\to\, 0 . \] The same argument applies to the negative part \[ I_n^{+} = \int_{-\pi}^0 \,\phi_{+} (t)\,D_n (t) \,{\text d}t \,\to\, 0 . \] Thus, \[ E_n = \frac{1}{2\pi} \left( I_n^{-} + I_n^{+} \right) \,\to\, 0 . \] Finally, we get \[ S_n (f;x) = \frac{f(x+0) + f(x-0)}{2} + E_n \,\to\, \frac{f(x+0) + f(x-0)}{2} . \] Remark:    In presented proof, differentiability of 𝑓 at the point was used, but only for simplification and it is not necessary. The real condition needed is \[ \int_0^{\delta} \,\frac{|\phi (u)|}{u}\,{\text d}u \,< \,\infty \qquad (\mbox{Dini}). \] This condition already implies that ϕ(u)/u ∈ 𝔏¹(0, δ), and therefore \[ g(u) = \frac{\phi (u)}{\sin (u/2)} \,\sim\,\frac{\phi (u)}{u/2} \] is integrable near 0, even if ϕ is not differemtiable.

This Dini's test gives the sharpest possible local condition for convergence at a point. It does not require:

  • global smoothness,
  • bounded variation,
  • monotonicity,
  • piecewise ℭ¹.

Example 12: Let us define a 2π-periodic function 𝑓 with parameter 𝑎 > 1 on [−π, π] by \[ f(x) = \frac{1}{1 + \ln^a (x)} . \]

We expect that the corresponding Fourier series converges at the origin. Near 𝑥 = 0, 𝑓(𝑥) → 0, but very slowly. One-sided limits exist and equal 0: \[ f(0+0) = f(0-0) = 0. \] We check Dini's conditions at 0 (since function 𝑓 is symmetric, it is sufficient to check one of two): \[ \int_0^{\delta} \,\frac{|f(t) - f(0+0)|}{t}\ {\text d}t = \int_0^{\delta} \,\frac{{\text d}t}{t\left( 1 + |\ln t|^a \right)} . \] Substitute u = −lnt (so 𝑡 = e-u):

Integrate[1/(1 + u^a), {u, B, Infinity}]
ConditionalExpression[(\[Pi] Csc[\[Pi]/a])/a - B Hypergeometric2F1[1, 1/a, 1 + 1/a, -B^a], Re[a] > 1]
\[ \int_0^{\delta} \,\frac{{\text d}t}{t\,|\ln t|^a} = \int_{B}^{\infty} \,\frac{{\text d}u}{1 +u^a} = \frac{\pi}{a}\,\csc \left( \frac{\pi}{a}\right) -B\cdot\, _2F_1 \left( 1, \frac{1}{a}, 1 , \frac{1}{a}, -B^2 \right) < \infty , \] where B = −lnδ > 0 because δ ∈ (0, 1). Therefore, Dini's test holds for any 𝑎 > 1. So we know that the Fourier series converges at 0: \[ S(f;0) = \lim_{n\to\infty} \ S_n (f;0) \.=\, \frac{f(0+0) + f(0-0)}{2} = 0 . \]
  • 𝑓 is not Lipschitz or Hölder near 0;
  • the derivative of 𝑓 blows up badly at 𝑥 = 0;
  • yet the Fourier series still converges at the origin, purely by Dini's integrability condition.
We check these conclusions with Mathematica.
ClearAll[f, x, nTerms, a0, a, S]; f[x_] := 1/(1 + Log[Abs[x]]^2); nTerms = 20; a0 = NIntegrate[ f[x], {x, -Pi, Pi}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0} ]/Pi; a = Table[ NIntegrate[ f[x] Cos[k x], {x, -Pi, Pi}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0} ]/Pi, {k, 1, nTerms} ]; S[x_] := a0/2 + Sum[a[[k]] Cos[k x], {k, 1, nTerms}]; Plot[ Evaluate[{f[x], S[x]}], {x, -.5, .5}, PlotStyle -> {{Blue, Thick]}, {Red, Thick}}, PlotLegends -> {"f(x)", "20-term Fourier sum"}, PlotRange -> All, ImageSize -> Large ]
Figure 12.1: Fourier partial sum with 20 terms for function 𝑓.

   ■
End of Example 12
Theorem 7 (Dini’s test (continuous version): Let 𝑓 ∈ 𝔏¹([−π, π]) and let 𝑥 ∈ (−π, π) be a point at which 𝑓 is continuous. Suppose that that there exists δ > 0 such that
\[ \int_{0}^{\delta} \frac{|f(x-t) - f(x)|}{t} \, {\text d}t < + \infty . \]
Then the Fourier series of 𝑓 converges at 𝑥 to f(x), \[ \lim_{n\to\infty}\ S_n (f;x) = f(x) , \] where Sₙ(𝑓;𝑥) denoted the n-th partial sum of the Fourier series of 𝑓.
Recall that if f has a continuous derivative, then
\[ \lim_{t\to 0} \left\vert \frac{f(x-t) - f(x)}{t} \right\vert \]
exists and is bounded for all x; in this case, taking δ = π,
\[ \int_{|t| < \pi} \left\vert \frac{f(x-t) - f(x)}{t} \right\vert {\text d}t \le 2\pi \| f' \|_{\infty} = 2\pi \max | f' (x) | < +\infty . \]

For arbitrary integrable function f, we compute

\begin{align*} \left\vert S_N (f; x) - f(x) \right\vert &= \frac{1}{2\pi} \left\vert \int f(x-y)\,D_N (y) \,{\text d}y - \int f(x)\, D_N (y)\,{\text d} y \right\vert \\ &= \frac{1}{2\pi} \left\vert \int \frac{f(x-y) - f(x)}{|y|} \,\sin \left( N + \frac{1}{2} \right) y \cdot \frac{|y|}{\sin (y/2)}\,{\text d} y \right\vert \\ &= \frac{1}{2\pi} \left\vert \frac{1}{2{\bf j}}\int_{-\pi}^{\pi} \frac{f(x-y) - f(x)}{|y|} \frac{|y|}{\sin (y/2)} \cdot \left( e^{{\bf j}y/2} e^{{\bf j} Ny} - e^{-{\bf j}y/2} e^{-{\bf j} Ny} \right) {\text d} y \right\vert \\ &= \frac{1}{2\pi} \cdot \frac{1}{2} \left\vert \int_{-\pi}^{\pi} \, \underbrace{\frac{f(x-y) - f(x)}{|y|} \frac{|y|}{\sin (y/2)} \cdot e^{{\bf j}y/2}}_{= g(y)} e^{{\bf j} Ny} {\text d} y - \int_{-\pi}^{\pi} \, \underbrace{\frac{f(x-y) - f(x)}{|y|} \frac{|y|}{\sin (y/2)} \cdot e^{-{\bf j}y/2}}_{= h(y)} e^{-{\bf j} Ny} {\text d} y \right\vert . \end{align*}
To complete the proof, it suffices to show that g, h ∈ 𝔏¹[−ℓ, ℓ]. For g, we need to show that
\[ \int_{-\pi}^{\pi} \frac{|f(x-y) - f(x)|}{|y|} \frac{|y|}{|\sin (y/2)|} \cdot \left\vert e^{{\bf j}y/2} \right\vert {\text d} y < + \infty . \]
We split the integral into the regions where |y| < δ and δ < |y| < 2π. For latter domain of integration, we have \( \frac{1}{|\sin (y/2) |} \le M \) for some positive constant M. Then
\[ \int_{\delta < |y| < \pi} \frac{|f(x-y) - f(x)|}{|\sin (y/2)|} \left\vert e^{{\bf j}y/2} \right\vert {\text d}y \le M \int_{\delta < |y| < \pi} |f(x-y) - f(x)| \, {\text d}y \le 2M\, \| f \|_1 . \]
For domain |y| < δ, we observe that    \( \frac{|y|}{|\sin (y/2)|} \le 2 , \) so that
\[ \int_{|y| < \delta} \frac{|f(x-y) - f(x)|}{|y|} \frac{|y|}{|\sin (y/2)|} \cdot \left\vert e^{{\bf j}y/2} \right\vert {\text d} y \le \int_{|y| < \delta} \frac{|f(x-y) - f(x)|}{|y|} \cdot 2 \,{\text d} y < + \infty \]
by assumption.

h because |h| = |g|.
A useful consequence is obtained by estimating the difference ∣𝑓(𝑥+𝑡)−𝑓(𝑥)∣ by the local modulus of continuity. The modulus of continuity measures a function's smoothness by quantifying how much the function's output changes as the input shifts by a small distance δ. In Fourier analysis, it is used to formulate Dini's tests, which determine whether and how smoothly a Fourier series converges to its function values.    ▣

Corollary (Dini’s Condition in terms of the Modulus of Continuity): Let \[ \omega_x (\delta ) = \sup_{0 < |h| \le\delta} \ |f(x+h) - f(x)| \] denote the local modulus of continuity of 𝑓 at the point 𝑥. If \begin{equation} \label{EqPoint.3} \int_0^{\delta}\, \frac{\omega_x (t)}{t}\,{\text d}t \,<\,\infty \end{equation} for some δ > 0, then the Fourier series of 𝑓 converges at 𝑥 to 𝑓(𝑥).

Since \[ |f(x+t) - f(x)| \le \omega_x (t) , \] the modulus o,f continuity is enough for convergence.

Condition \eqref{EqPoint.3} is known as the Dini continuity condition at the point 𝑥. It is satisfied, for example, whenever

\[ \omega_x (t) = O( t^a ), \qquad a > 0, \]
that is, whenever 𝑓 is Hölder continuous at x. Thus, every Hölder continuous function satisfies Dini's condition, although the converse is false. This corollary is the form of Dini's test most frequently used in modern Fourier analysis because the modulus of continuity is often easier to estimate than the integral involving 𝑓(𝑥 + 𝑡) − 𝑓(𝑥).

Example 13:

At first sight this theorem is surprising because the representation of the Fourier partial sums through the Dirichlet kernel naturally contains \[ f(x+t) + f(x-t) - 2\,f(x) \] The connection is simply \[ | f(x+t) + f(x-t) - 2\,f(x) | \le |f(x+t) - f(x) | + |f(x-t) - f(x)| . \] Hence, \[ \int_0^{\delta} \,\frac{|f(x+t) - f(x)|}{t}\,{\text d}t \, < \,\infty \] (and the analogous estimate on the left, which is automatic if one applies the same condition to 𝑓(−𝑥) implies the symmetric Dini condition.

One can observe that piecewise monotonicity (or Dirichlet's conditions) implies the Dini integral is finite, so Dini's criterion gives the same conclusion. So from Dirichlet's conditions follow Dini's test.

Also 𝐵𝑉 imply Dini, so Jordan's theorem is stronger than Dini's criterion. If Vx(𝑡) denotes the variation of 𝑓 on [𝑥, 𝑥+𝑡], then \[ | f(x+t) - f(x)| \le V_x (t) . \] Since variation is increasing, \[ \int_0^{\delta} \,\frac{V_x (t)}{t}\,{\text d}t \] can be estimated by an integration-by-parts argument, yielding finiteness. Thus every 𝐵𝑉 function satisfies Dini's condition at every continuity point (and the corresponding one-sided conditions at jump points).

The classical example givis 𝑓(𝑥) = |𝑥|α, where 0 < α &ly; 1 and |𝑥| ≤ π. At 𝑥 = 0, \[ |f(t) - f(0)| = t^{\alpha} , \] so \[ \int_0^{\delta} \,\frac{t^\alpha}{t}\,{\text d}t = \int_0^{\delta} \, t^{\alpha -1} \,{\text d}t = \frac{\delta^{\alpha}}{\alpha} \, < \,\infty . \] Notice how little work this requires. One does not need to invoke bounded variation or monotonicity.

This is a standard example because ff is not Lipschitz when 0<α<1, yet Dini's condition still holds.

f[x_] := Sqrt[x]; Nterms = 20; a0 = NIntegrate[f[x], {x, 0, 2 Pi}]/Pi; a = Table[NIntegrate[f[x] Cos[n x], {x, 0, 2 Pi}]/Pi, {n, Nterms}]; b = Table[NIntegrate[f[x] Sin[n x], {x, 0, 2 Pi}]/Pi, {n, Nterms}]; S20[x_] := a0/2 + Sum[a[[k]] Cos[k x] + b[[k]] Sin[k x], {k, Nterms}]; Plot[Evaluate[{Sqrt[x], S20[x]}], {x, -0.2, 2 Pi + 0.3}, PlotStyle -> {{Blue, Thickness[0.012]}, {Red, Thick}}]
Figure 13.1: Fourier partial sum with 20 terms for function 𝑓.

   ■
End of Example 13
We demonstrate differeent versions of Dini's theorem in the following examples.

Example 14:

Dini–Lipschitz criterion: Let 𝑓 ∈ 𝔏¹([−π, π]) be 2π-periodic function and let 𝑥 ∈ ℝ. If \[ \int_0^{\delta} \,\frac{|f(x+t) + f(x-t) - 2\,f(x)|}{t}\,{\text d}t \, < \,\infty . \] for some δ > 0, then the Fourier series of 𝑓 converges at 𝑥 to 𝑓(𝑥).    ▣

Equivalently, if one defines the central second difference operator, denoted by \[ \delta_t^2 f(x) = f(x+t) + f(x-t) - 2\,f(x) , \] the condition becomes \[ \int_0^{\delta} \,\frac{| \delta_t^2 \,f(x)|}{t}\ {\text d}t \, < \,\infty . \] This version is particularly useful for functions that are continuous but not differentiable, because the second difference often decays faster than the first difference. Its proof can be found in classical treatises by Bari or Zygmund. ,

For example, \[ f(x) = \begin{cases} \frac{|x|}{|\ln |x||} , \qquad& \mbox{for } 0 < |x| \le \pi , \\ 0, \qquad& \mbox{if } x = 0, \end{cases} \] extended periodically. This function is continuous but not Lipschitz at the origin, We have \[ f(t) - f(-t) - 2\,f(0) = \frac{2t}{|\ln t|} . \] So \[ \int_0^{\delta} \,\frac{|f(x+t) + f(x-t) - 2\,f(x)|}{t}\,{\text d}t 2\, \int_0^{\delta} \,\frac{{\text d}t|}{|\ln t|} . \] With substitution u = −lnt, we get \[ 2\, \int_0^{\delta} \,\frac{{\text d}t|}{|\ln t|} = 2\,\int_B^{\infty| \,\frac{e^{-u}}{u}\,{\text d}u , \] which converges immediately. We demonstrate Fourier approximation to the given function with Mathematica:

ClearAll[f, x, a0, a, S, nTerms]; (* Number of Fourier terms *) nTerms = 20; (* Function *) f[x_] := Piecewise[ { {0, x == 0}, {Abs[x]/Abs[Log[Abs[x]]], True} } ]; (* Fourier cosine coefficients *) a0 = (2/Pi) NIntegrate[ f[x], {x, 0, Pi}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0} ]; a = Table[ (2/Pi) NIntegrate[ f[x] Cos[k x], {x, 0, Pi}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0} ], {k, 1, nTerms} ]; (* Partial Fourier sum *) S[x_] := a0/2 + Sum[a[[k]] Cos[k x], {k, 1, nTerms}]; (* Plot *) Plot[ Evaluate[{f[x], S[x]}], {x, -0.5, 0.5}, PlotStyle -> { {Blue, Thickness[0.01]}, {Red, Thick} }, PlotLegends -> {"f(x)", "1024-term Fourier approximation"}, PlotRange -> All, PlotPoints -> 200, MaxRecursion -> 4, ImageSize -> Large ]
A better choice is to replace the Table with a ParallelTable:
LaunchKernels[]; a = ParallelTable[ (2/Pi) NIntegrate[ f[x] Cos[k x], {x, 0, Pi}, Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}, AccuracyGoal -> 8, PrecisionGoal -> 8 ], {k, 1, nTerms} ];

Figure 14.1: 1024-term Fourier approximatio of f.
     
Figure 14.2: Approximation with ParallelTable option.

One final remark: for this particular function, the 1024-term approximation shows that convergence of the Fourier series is quite slow although, its convergence is predicted by Dini's test quite well near 𝑥=0.    ■
End of Example 14

Example 15: We present three examples of functions having Fourier expansions; the reader can see how discussed tests for pointwise convergence work. The idea is to choose functions of increasing regularity, since

  • piecewise ℭ¹ and Dirichlet's tests require the weakest assumptions.
  • Jordan's test strengthens the conclusion by assuming bounded variation.
  • Dini's test is useful at points where continuity is "better than just continuity" (Dini continuity), even when the function is not smooth.
Here is a sequence of examples that are suitable for our presentation. \[ f(x) = \mbox{sign}(x) = \begin{cases} \phantom{-}1, &\quad\mbox{if } x > 0 , \\ \phantom{-}0, &\quad\mbox{if } x = 0 , \\ -1, &\quad\mbox{if } x < 0; \end{cases} \] \[ g(x) = |x| = \begin{cases} \phantom{-}x, &\quad\mbox{if } x \ge 0 , \\ -x, &\quad\mbox{if } x \le 0; \end{cases} \] and \[ h(x) = |x|\,\ln \left( \frac{1}{|x|} \right) . \] Properties of function 𝑓(𝑥):
  • piecewise monotone,
  • finitely many jumps,
  • bounded,
  • not continuous.
    • Its Fourier series is \[ \mbox{sign}(x) = \frac{4}{\pi} \,\sum_{k\ge 0} \ \frac{1}{2k+1}\,\sin (2k+1)x . \] Dirichlet's theorem says that if 𝑓 is piecewise monotone (or piecewise ℭ¹), then its partial Fourier sums approach \[ S_n (f;x) \,\to\, \frac{f(x+0) + f(x-0)}{2} \qquad \mbox{as } n\to\infty . , \] At the jump, we have \[ S_n (-\pi ) \,\to\, \frac{f(-\pi +0) +f(\pi -0)}{2} = \frac{1 -1}{2} = 0 , \quad S_n (f;0) \,\to\, \frac{f(0+0) + f(0-0)}{2} = \frac{1 -1}{2} = 0 . \] This beautifully illustrates convergence to the midpoint of the jump. This function is also of bounded variation, V(𝑓) = 2.

         Fig 15.1. Graph of periodically extended signum function.
           
         Fig 15.2. Fourier approximation of sign(𝑥).

      Observe that function 𝑔(𝑥) is

      • continuous,
      • monotone on each side of 00,
      • total variation V(𝑔) = 2π < ∞.
      Hence 𝑔 ∈ 𝐵𝑉. Jordan's theorem states: If 𝑔 has bounded variation, then \[ S_n (g;x) \,\to\, \frac{g(x+0) + g(x-0)}{2} \qquad\mbox{as } n\to\infty . \] Since 𝑔 (on interval [−π, π]) and its periodic extension is continuous, 𝑔(θ+0) = 𝑔(θ−0) = 𝑔(θ). Therefore \[ S_n (g;x) \,\to\, g(x) \] everywhere.

      According to Jordan's test, the Fourier series \[ |x| = \frac{\pi}{2} - \frac{4}{\pi}\, \sum_{k\ge 0} \frac{\cos (2k+1)x}{(2k+1)^2} \] converges pointwise everywhere. Note that the derivative of 𝑔(𝑥) is 𝑓(𝑥), and its Fourier series is obtained by term-by-term differentiation of the series of 𝑔(𝑥).

         Fig 15.3. Graph of periodically extended function 𝑔.
           
         Fig 15.4. 20-term Fourier approximation of 𝑔(𝑥).

      Modulus of continuity of ℎ(𝑥) near zero is \[ \omega_h (\delta ) \,\sim\,\delta\,\ln\left( \frac{1}{\delta} \right) . \] Then \int_0^1 \, \frac{\omega_h (t)}{t} \ {\text d}t = \int_0^1 \,\ln \left( \frac{1}{t} \right) {\text d}t = 1 \,< \,\infty .

      Integrate[Log[1/x], {x, 0, 1}]
      1
      So the Dini condition holds. Therefore, Dini's theorem implies \[ S_n (h;0) \,\to\, h(0) = 0 . \] Since the same estimate works at every point, \[ S_n (h;x) \,\to\, h(x) \] for every 𝑥. This is a nice example because the derivative behaves like ln(|𝑥|). So the function is not ℭ¹, yet Dini's criterion still guarantees convergence.
      a0 = 2*Integrate[Abs[x]*Log[1/Abs[x]], {x, 0, Pi}]/Pi
      -(1/2) \[Pi] (-1 + 2 Log[\[Pi]])
      S20[x_] = NIntegrate[Abs[x]*Log[1/Abs[x]], {x, 0, Pi}]/Pi + 2*Sum[Cos[n*x] * NIntegrate[Abs[x]*Log[1/Abs[x]]*Cos[n*x], {x, 0, Pi}], {n, 1, 20}]/Pi;
      Plot[{Abs[x]*Log[1/Abs[x]], S20[x]}, {x, 0, Pi + 0.5}, PlotStyle -> {{Blue, Thickness[0.01]}, {Red, Thick}}]
      Figure 15.5: Fourier partial sum with 20 terms for function ℎ (red).

      These examples illustrate increasing subtlety:
      • Dirichlet conditions and piecewise smooth class handles discontinuities.
      • Jordan handles all functions of bounded variation.
      • Dini handles continuous functions with sufficiently mild singularities, even when bounded variation or differentiability is not the main point of the argument.
         ■
      End of Example 15
Observe that for Dini’s theorem to hold, it is in fact enough to have that there exist constants H > 0 and α ∈ (0, 1] such that that whenever |y| ≤ 2ℓ, we have
\[ | f(x-y) - f(y)| \le H \left\vert y \right\vert^{\alpha} . \]
Such functions are called α-Hölder continuous. Note that if function f has a continuous derivative, then f is automatically 1-Hölder (also known as Lipschitz).

The smoothness of the function drastically affects the rate of decrease of the Fourier coefficients: the smoother the function the more rapidly its Fourier coefficient decrease. The study of pointwise convergence of Fourier series is largely the study of the interplay between assumptions of smoothness and conclusions about convergence.

 

  1. Which of the following function is piecewise smooth ℭ¹, which satisfies the Dirichlet conditions, and which is of bounded variation.
    1. \( \displaystyle \quad \sqrt{1-x^2} \quad \) on interval [−1, 1];
    2. the Heaviside function \( \displaystyle \quad H(x) = \begin{cases} 1, \quad& \mbox{for } x > 0, \\ \frac{1}{2} , \quad& \mbox{when } x = 0 , \\ 0, \quad& \mbox{for } x < 0 , \end{cases} \quad \) on interval [−2, 2];
    3. x on interval [0, 1];
    4. \( \displaystyle \quad x^{1.5} \sin\left( \frac{1}{x} \right) \quad \) on interval [0, π];
    5. the Dirichlet function, which is 1 at rational numbers and 0 otherwise.
  2. Does an absolutely integrable (in Lebesgue sense) on interval [0, 1] have bounded variation?
  3. Using Fourier series for the Heaviside function, find the sum \( \displaystyle \quad \sum_{k\ge 0} \ \frac{(-1)^k}{2k+1} . \)
  4. Expand 𝑥²H(𝑥) into Fourier series over interval [−π, π], where H(𝑥) is the Heaviside function.
  5. 𝑥
  6. Show that every piecewise constant function on [a, b] is of bounded variation.

 

  1. Ambrosio, L., Fusco, N., & Pallara, D., Functions of Bounded Variation and Free Discontinuity Problems, ‎ Oxford University Press, 2000.
  2. Barlie, R.G. and Sherbert, D.R., Introduction to Real Analysis,
  3. Dirichlet, P., (1829), "Sur la convergence des series trigonometriques qui servent à represénter une fonction arbitraire entre des limites donnees", Journal für die reine und angewandte Mathematik (J. Reine Angew. Math.), 4: 157–169.
  4. Folland, G.B., Real Analysis: Modern Techniques and their Applications, Second edition, John Wiley & Sons, Inc., New York,
  5. Jordan, Camille (1881), "Sur la série de Fourier" [On Fourier's series], Comptes rendus hebdomadaires des séances de l'Académie des sciences, 92: 228–230 (at Gallica).
  6. Kolmogorov, A.N. & Fomin, S.V., Introductory Real Analysis, ,
  7. Royden, H.L. and Fitzpatrick, G.P., Real Analysis, Fourth edition, Pearson, 2010.
  8. Rudin, W., Real and Complex Analysis,
  9. Titchmarsh, E.C., The Theory of Functions,
  10. Waterman, D., Bounded variation and Fourier series, Real Analysis Exchange, 1977, Vol. 3.
  11. Zygmund, A., Trigonometrical Series, Third edition, Volumes I & II combined, Cambridge University Press, London,

 

Return to Mathematica page
Return to the main page (APMA0340)
Return to the Part 1 Matrix Algebra
Return to the Part 2 Linear Systems of Ordinary Differential Equations
Return to the Part 3 Non-linear Systems of Ordinary Differential Equations
Return to the Part 4 Numerical Methods
Return to the Part 5 Fourier Series
Return to the Part 6 Partial Differential Equations
Return to the Part 7 Special Functions