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


Classical Fourier theory based on Riemann integration allows evaluation of Fourier coefficients for functions that are not absolutely integrable (such as sin(x)/x). Modern Fourier theory ignores these functions, so it prefers dealing with elements from Banach space 𝔏¹ or Hilbert space 𝔏² based on Lebesgue integration.

https://www.math.ku.dk/bibliotek/arkivet/noter/fouan.pdf

Fourier Coefficients


For a real- or complex-valued function f defined on the compact interval [−ℓ, ℓ], where ℓ > 0, its Fourier coefficients are defined by the Euler--Fourier formulas

\begin{equation} \label{EqEval.1} a_n = \frac{1}{\ell} \int_{-\ell}^{\ell} \,f(x)\,\cos \left( \frac{n\pi x}{\ell} \right) {\text d}x , \qquad b_n = \frac{1}{\ell} \int_{-\ell}^{\ell} \, f(x)\,\sin \left( \frac{n\pi x}{\ell} \right) {\text d}x . \end{equation}
or, in complex form,
\begin{equation} \label{EqEval.2} \hat{f}(n) = \frac{1}{2\ell} \int_{-\ell}^{\ell} f(x)\, e^{-{\bf j} n\pi x/\ell} {\text d} x , \qquad n\in \mathbb{Z} = \left\{ 0, \pm 1, \pm 2, \pm 3, \ldots \right\} . \end{equation}
The latter coefficients will also often be denoted by cₙ instead of \( \displaystyle \quad \hat{f}(n) , \ \) to maintain consistency with the notation used in the trigonometric case.

These formulas are meaningful only when all the integrals defining them exist (i.e., have finite numerical values) for all indices. Therefore, the existence of the Fourier coefficients depends on which definition of the integral is employed. Since the work of Cauchy, the notion of integration has been progressively generalized, leading to increasingly broader classes of integrable functions. Consequently, the theory of Fourier series has been extended to encompass these larger classes of functions.

Although this tutorial primarily employs the Riemann integral (including the Riemann--Stieltjes integral), whenever possible, with a natural extension to the Lebesgue integral (including the Lebesgue--Stieltjes integral), situations may arise in which the Fourier coefficients exist in a sense more general than that of Lebesgue integration. Modern Fourier analysis relies heavily on integration theories beyond those of Riemann and Lebesgue. Among them are:

In addition to generalized notions of integration, Fourier coefficients may also be defined through regularization techniques, such as the Cauchy principal value and the Hadamard finite part.

In the classical theory, the Euler--Fourier formulas involve ordinary (possibly improper) Riemann integrals. Consequently, the Fourier coefficients exist provided that each of these integrals converges for every integer n, even if the convergence is only conditional. Within the classical Riemann framework, this is the only requirement for the existence of the Fourier coefficients.

The following are among the principal results of the classical theory of Fourier series in which Riemann integration plays an essential role:

A function may fail to be in 𝔏¹([−π, π) and corresponding integrals \eqref{EqEval.1} may still converge. ,

Example 1: Let us consider the function \[ f(x) = \frac{1}{x}\,\sin \left( \frac{1}{x} \right) \quad \mbox{on}\quad (0, \pi ) . \] This function is not absolutely integrable because near the origin f(x) ∼ 1/x. So \[ \int_0^{\pi} \left\vert f(x) \right\vert {\text d} x = \infty . \] Mathematica provides a huge numerical value that indicates its divergence:

NIntegrate[Abs[Sin[1/x]]/x, {x, 0, Pi}]
575.018
Indeed, we need to show that \[ J(\varepsilon ) = \int_0^{\varepsilon} \left\vert \frac{\sin (1/x)}{x} \right\vert = \int_{1/\varepsilon}^{+\infty} \frac{| \sin t |}{t}\,{\text d} t \] diverges. It is well known that \[ \int_1^{\infty} \frac{| \sin t |}{t}\,{\text d} t = \infty , \] because on each interval where |sint| ≥ c > 0 (say around (kπ + π/6, kπ + 5π/6)), you get a contribution ≥ 1/k, and series Σ 1/k diverges. Hence, the absolute value of f is not intewgrable.

But f(x) is integrable, as Mathematica confirms:

NIntegrate[Sin[1/x]/x, {x, 0, Pi}]
1.25427
Now we rigorously show that Fourier coefficients exist for each n. Since the function has one singular point at the origin, we breal the integral into two parts \[ b_n = \frac{1}{\pi} \left( \int_0^{\varepsilon} + \int_{\varepsilon}^{\pi} \right) \frac{\sin (1/x)}{x}\,\sin (nx)\,{\text d}x . \] The only problematic region is x → 0. The second integral is fine. We must analyze \[ I_n (\varepsilon ) = \int_0^{\varepsilon} \frac{\sin (1/x)}{x}\,\sin (nx)\,{\text d}x . \] Let t = 1/x. Then
  • x = 1/t,
  • dt = −dt/t²,
  • as x → 0+0 ⇔ t ↓ 0, t → +∞.
Compute \[ I_n (\varepsilon ) = \int_{1/\varepsilon}^{+\infty} \sin (t)\,\sin \left( \frac{n}{t} \right) \frac{{\text d}t.}{t} . \] This is the key transformation. For large t, \[ \sin \left( \frac{n}{t} \right) \,\sim \,\frac{n}{t} . \] Thus, the integrand behaves like \[ \sin (t) \cdot \frac{n}{t} \cdot \frac{1}{t} = n \,\frac{\sin (t)}{t^2} . \] So near infinity, \[ I_n (\varepsilon ) \,\sim\, n\,\int_{1/\varepsilon}^{+\infty} \frac{\sin (t)}{t^2} \,{\text d}t , \] which converges absolutely because sine function is bounded by 1. We conclude that the Fourier coefficient bₙ exists for every n ≥ 1.

This example shows that the oscillation near the singular point is strong enough to overcome the 1/x blow-up.

This example also show that the given function f(x) = sin(1/x)/x is not in 𝔏¹. Therefore, the classical (based on improper Riemann integration) Fourier theory is wider than modern theory based on Lebesgue integration.

We can expand this function into sine-Fourier series \[ \frac{1}{x}\,\sin \left( \frac{1}{x} \right) = \sum_{n\ge 1} b_n \sin (nx) . \] With Mathematica, we can evaluate several coefficients, numerically. The following figure presents graph of function f(x) in blue, and its 20-term sine0Fourier approximation, in red.

f[x_] = Sin[1/x]/x;
s20 = 2* Sum[ Sin[n*x]*NIntegrate[Sin[1/x]*Sin[n*x]/x, {x, 0, Pi}], {n, 1, 20}]/ Pi;
+ Plot[{f[x], s20}, {x, 0, Pi}, PlotStyle -> {{Thick, Blue}, {Thick, Red}}]
Figure 1.1.

   ■
End of Example 1
A function has Fourier coefficients if: This includes: In Lebesgue theory: The following are among the principal results of Fourier analysis that are naturally formulated and proved within the framework of Lebesgue integration: So the modern theory is cleaner, but the classical theory is broader.

Example 2: Let us define on (−π, π) 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} \] This function is extended in odd way so its Fourier series will contain only sine functions. As usual, f is assumed to be 2π periodic because we extend it into the Fourier series.

The given function is not absolutely integrable because near zero, \[ |f(x)| \,\sim \, \frac{1}{|x|\,\ln (1/|x|)} . \] So \[ \int_0^{1/e^2} |f(x)|\,{\text d}x \ge \int_0^{1/e^2} \frac{{\text d}x}{|x|\,\ln (1/|x|)} . \] Substitute t = ln(1/x), then dx = −e−tdt, and we get \[ \int_0^{1/e^2} |f(x)|\,{\text d}x \ge \int_2^{+\infty} \frac{{\text d}t}{t} = \infty . \] So f ∉ 𝔏¹([−π, π). However, the Fourier sine 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 . \] Let t = 1/x, then dx = −dt/t² and ln(1/x) = ln(t). Then \[ b_n = \frac{2}{\pi} \int_{e^2}^{\infty} \frac{\sin t}{\left( 1/t \right) \ln t}\,\sin \left( \frac{n}{t} \right) \frac{{\text d}t}{t^2} = \frac{2}{\pi} \int_{e^2}^{\infty} \frac{\sin t\,\sin (n/t)}{t\,\ln t} \,{\text d}t . \] For large t, \[ \sin \left( \frac{n}{t} \right) \,\sim \,\frac{n}{t} , \] so the integrand behaves like \[ \frac{\sin t}{t\,\ln t} \cdot \frac{n}{t} = n\,\frac{\sin t}{t^2 \ln t} . \] Now \[ \int_{e^2}^{\infty} \left\vert \frac{\sin t}{t^2 \ln t} \right\vert {\text d}t \le \int_{e^2}^{\infty} \frac{{\text d}t}{t^2 \ln t} < \infty . \] Hence, the integral defining bₙ converges absolutely for each n. Thus, all Fourier coefficients exist, even so f ∉ 𝔏¹.

However, the corresponding Fourier series converges very slow because bₙ ∼ 1/lnn (see section).    ■

End of Example 2

Example 3: Thomae's function is a real-valued function of a real variable that is named after Carl Johannes Thomae, but has many other names: the popcorn function, the raindrop function, the countable cloud function, the modified Dirichlet function, the ruler function (not to be confused with the integer ruler function), the Riemann function, or the Stars over Babylon (John Horton Conway's name). It can be defined as: \[ f(x) = \begin{cases} 1/q , \qquad & x = \frac{p}{q} \quad\mbox{in lowest terms}, \\ 0, \qquad & x \notin \mathbb{Q} . \end{cases} \] This function has a remarkably rich structure

  • Thomae's function 𝑓 is bounded and maps all real numbers to the unit interval, 𝑓 : ℝ → ]0,1].
  • 𝑓 is periodic with period 1 : 𝑓 ( x + n ) = 𝑓 ( x ) for all integers n and all real x.
  • 𝑓 is discontinuous at every rational number, so its points of discontinuity are dense within the real numbers.
  • 𝑓 is continuous at every irrational number, so its points of continuity are dense within the real numbers.
  • 𝑓 is nowhere differentiable.
  • 𝑓 has a proper local maximum at each rational number, providing an example of a function with a dense set of proper local maxima.
  • 𝑓 is Riemann integrable on any interval and the integral evaluates to 0 over any set.
Every non-empty open subinterval of {0, 1] contains at least one irrational number. Since 𝑓(𝑥) = 0 for all irrational numbers, the infimum of 𝑓(𝑥) on any subinterval [𝑥i-1, 𝑥i] of a given partition P is always 0: \[ m_i = \inf_{[x_{i-1}, x_i ]} \ f(x) = 0. \] As a result, the lower Riemann sum L(𝑓, P) for any partition P is exactly 0.

Now we determine the upper Riemann sum. For any given ε > 0, there are only finitely many rational numbers in whose denominator 1/q *ge; ε/2. Let k be the number of such points.

We can choose a partition P where each of these k points is enclosed in a very narrow subinterval of total combined length less than &eosilon;/2. On these narrow subintervals, the maximum value of 𝑓(𝑥) is bounded above by 1. On all other subintervals, the maximum value of 𝑓(𝑥) is strictly less than ε/2.

The upper Riemann sum U(𝑓, P) can be split into two parts: \[ U(f, P) < \left( 1 \cdot \frac{\varepsilon}{2} \right) + \left( \frac{\varepsilon}{2} \cdot 1 \right) = \varepsilon . \] Since ε can be chosen to be arbitrarily small, the infimum of the upper Riemann sums (the upper Riemann integral) must be 0. So the integral must be zero.

Alternatively, from the perspective of Lebesgue integration, Thomae's function is equal to almost everywhere because the set of rational numbers has a Lebesgue measure of zero. The Lebesgue integral of any function that vanishes almost everywhere is 0.

So all Fourier coefficients of Thomae's function are zeroes. Therefore, the Fourier analysis is not suitable for Thomae's function. :    ■

End of Example 3

Properties of Fourier Coefficients


Let f(x) be an absolutely integrable function on a symmetric interval [−ℓ, ℓ], which we abbreviate as f ∈ 𝔏¹;([−ℓ, ℓ]). Generally speaking, this abbreviation means that function f(x) is integrable in Lebesgue sense. However, you can use Riemann integration instead without any harm. We list some basic properties of Fourier coefficients that follow from their definition.
  1. Fourier coefficients are bounded. Specifically
    \[ \left\vert a_k \right\vert , \left\vert b_k \right\vert \le \frac{1}{\ell} \int_{-\ell}^{\ell} \left\vert f(x) \right\vert {\text d} x , \qquad \left\vert \hat{f}(n) \right\vert \le \frac{1}{2\ell} \int_{-\ell}^{\ell} \left\vert f(x) \right\vert {\text d} x . \]
  2. Linearity: If f, g ∈ 𝔏¹([−ℓ, ℓ]), and α, β are arbitrary scalars (real or complex), then
    \[ a_k \left( \alpha f + \beta g \right) = \alpha\,a_k (f) + \beta\,a_k (g) , \qquad b_k \left( \alpha f + \beta g \right) = \alpha\,b_k (f) + \beta\,b_k (g) . \]
  3. If periodic function f(x) has a continuous derivative on [−ℓ, ℓ], then Fourier coefficient of f and its derivative are related according to the following relations:
    \[ a_k (f) = -\frac{1}{k}\,b_k (f') , \qquad b_k (f) = \frac{1}{k}\,a_k (f') , \qquad \hat{f}(\pm n) = \mp \frac{\bf j}{n} \,\hat{f'}(n) . \]
  4. If f has a parity, its Fourier coefficients take special forms:
    • If f(x) is even on symmetric interval [−ℓ, ℓ], then all coefficients bk = 0 and
      \[ a_k = \frac{2}{\ell} \int_0^{\ell} f(x)\,\cos \left( \frac{k\pi x}{\ell} \right) {\text d} x , \qquad k=0,1,2,3,\ldots . \]
    • If f(x) is odd on symmetric interval [−ℓ, ℓ], then all coefficients 𝑎k = 0 and
      \[ b_k = \frac{2}{\ell} \int_0^{\ell} f(x)\,\sin\left( \frac{k\pi x}{\ell} \right) {\text d} x , \qquad k=1,2,3,\ldots . \]
  5. Fourier coefficients do not depend on values of function f(x) at discrete number of points within closed interval [−ℓ, ℓ].

Example 10: We consider the power function \( f(x) = \left( x^2 - \ell^2 \right)^2 . \) Expanding it into Fourier series, we get

\[ \left( x^2 - \ell^2 \right)^2 = \frac{2\ell^2}{3} + \frac{4 \ell^2}{\pi^2} \sun_{n\ge 1} \frac{(-1)^n}{n^2} \,\cos \left( \frac{n\pi x}{\ell} \right) . \]
To verify Parseval's identity for this function, we first calculate its square norm:
\[ \frac{1}{\ell} \,\| f \|^2 = \frac{1}{\ell} \int_{-L}^L \left( x^2 - \ell^2 \right)^2 {\text d}x = \frac{16}{15}\,\ell^4 . \]
Integrate[(x^2 - L^2)^2, {x, -L, L}]/L
(16 L^4)/15
This number must be equal to the sum of squares of Fourier coefficients:
\[ \frac{16}{15}\,\ell^4 = \frac{8\,\ell^4}{9} + \frac{16 \ell^4}{\pi^4} \sum_{n\ge 1} \frac{1}{n^4} . \]
This equation is simplified to
\[ \sum_{n\ge 1} \frac{1}{n^4} = . \]

 

Example 10B: Here is another qadratic function (on interval −ℓ < x < ℓ):

\[ x \left( \ell -x \right) = \frac{\ell^2}{3} - \frac{4\ell^2}{\pi^2} \sum_{n\ge 1} \frac{(-1)^n}{n^2} \,\cos \left( \frac{n\pi x}{\ell} \right) - \frac{2\ell^2}{\pi} \sum_{n\ge 1} \frac{(-1)^n}{n^2} \,\sin \left( \frac{n\pi x}{\ell} \right) . \]
Integrate[x*(L - x)*Cos[n*Pi*x/L], {x, -L, L}]/L
-((2 L^2 (2 n \[Pi] Cos[n \[Pi]] + (-2 + n^2 \[Pi]^2) Sin[n \[Pi]]))/( n^3 \[Pi]^3))
Integrate[x*(L - x)*Sin[n*Pi*x/L], {x, -L, L}]/L
-((2 L^2 (n \[Pi] Cos[n \[Pi]] - Sin[n \[Pi]]))/(n^2 \[Pi]^2))
The norm of this function is
\[ \| f \|^2 = \int_{-\ell}^{\ell} x^2 \left( \ell -x \right)^2 {\text d} x = \frac{16}{15}, \ell^5 . \]
Application of Parseval's identity yields
\[ \frac{16}{15}, \ell^4 = \frac{2\ell^4}{9} + \frac{16 \ell^4}{\pi^4} \sum_{n\ge 1} \frac{1}{n^4} + \frac{4\ell^4}{\pi^2} \sum_{n\ge 1} \frac{1}{n^2} . \]
Some simplification yields
\[ \frac{16}{\pi^4} \sum_{n\ge 1} \frac{1}{n^4} + \frac{4}{\pi^2} \sum_{n\ge 1} \frac{1}{n^2} = \]
   ■
End of Example 10

A German mathematical genius by the name of Bernhard Riemann (1826--1866) first published the oscillatory integrals lemma (now known as the Riemann--Lebesgue lemma) in 1867. He originally proved it in his 1853 habilitation thesis, “Über die Darstellbarkeit einer Function durch eine trigonometrische Reihe” (On the representability of a function by a trigonometric series), but the work was only published posthumously by Richard Dedekind in 1867. Henri Lebesgue later generalized it to Lebesgue-integrable functions in 1903.

Riemann--Lebesgue lemma for Riemann integrable functions: Let 𝑓 : [𝑎, 𝑏] → ℝ be a bounded function that is Riemann integrable on closed, finite interval [𝑎, 𝑏]. Then \[ \lim_{\lambda\to\infty} \ \int_a^b \,f(x)\,\sin (\lambda x)\,{\text d}x = 0 , \qquad \lim_{\lambda\to\infty} \ \int_a^b \,f(x)\,\cos (\lambda x)\,{\text d}x = 0 . \] Using Euler's identity, these limites can be compactly written in complex form \[ \lim_{\lambda\to\infty} \ \int_a^b \,f(x)\,e^{\mathbf{j}\,\lambda x}\ {\text d}x = 0 . \]
First, we show that the lemma is trivially true for a single constant block (a step function) 𝑓(𝑥) = c on [α, β] using standard integration: \[ \int_{\alpha}^{\beta} \, c \cdot \sin (\lambda x)\,{\text d}x = \left[ -c\cdot \frac{\cos (\lambda x)}{\lambda} \right]_{x=\alpha}^{\beta} = c\cdot \frac{\cos (\lambda\alpha ) - \cos (\lambda\beta )}{\lambda} \] As λ → ∞, the λ in the denominator drives this entire expression to 0. By extension, the lemma is true for any finite sum of blocks (step functions

By the definition of the Riemann integral, any bounded Riemann-integrable function can be approximated arbitrarily well by a step function s(𝑥) constructed from an upper/lower partition. For a ε > 0, we can pick a step function such that \[ \int_a^b | f(x) - s(x) |\,{\text d}x < \varepsilon . \] That is, step functions are dense in the Riemann integrable functions in the 𝔏¹-seminorm \( \quad \| f \|_1 = \int_a^b |f| . \quad \) Notice that this is not a norm on the space of pointwise-defined functions (functions differing on finitely many points have seminorm zero), but that causes no difficulty.

Then split the original integral into an approximation error component and a step component: \[ \left\vert \int_a^b \,f(x)\,\sin (\lambda x)\,{\text d}x \right\vert \le \int_a^b \left\vert f(x) - s(x) \right\vert \cdot \underbrace{| \sin (\lambda x) |}_{\le 1} \,{\text d}x + \left\vert \int_a^b \,s(x)\,\sin (\lambda x)\,{\text d}x \right\vert . \] The left integral is smaller than ε by design. The right integral can be made smaller than ε by pushing λ high enough (since s(x) is just a collection of blocks). Thus, the total value drops under 2ε, proving the limit is zero.

Now we show how to construct such step function s(𝑥). If P is a partition of [𝑎, 𝑏] with upper and lower Riemann sums \[ U(f, P) - L(f,P) < \varepsilon , \] define step functions \[ l(x) = m_i , \qquad u(x) = M_i \] on each subinterval, where mi and Mi are the infimum and supremum of 𝑓 there. Then \[ \le f \le u , \] and \[ \int \left( u - l \right) = U(f,P) - L(f,P) < \varepsilon . \] Choosing, for example, \( \quad s = \frac{u+l}{2} \quad \) gives \[ \int | f-s | \le \frac{1}{2}\,\int \, (u-l ) < \frac{\varepsilon}{2} . \] This proof uses nothing beyond the Darboux definition of the Riemann integral.

In the classical, proper Riemann integration setting, functions must be bounded. However, the Riemann-Lebesgue Lemma generalizes beyond proper Riemann integration to absolutely integrable functions (𝑓 ∈ 𝔏¹). This generalization is achieved using either improper Riemann integrals or Lebesgue integration.

Example 4:

For example, let us consider the unbounded function 𝑓(𝑥) = 1/√𝑥 on interval [0, π]. For this unbounded function, the integral at the singularity 𝑥 = 0 is evaluated as an improper Riemann integral. The Riemann-Lebesgue Lemma still applies perfectly because the function is absolutely integrable over the interval: \[ \int_0^{\pi} \, \left\vert \frac{1}{\sqrt{x}} \right\vert {\text d} x = 2 \sqrt{\pi} < \infty . \] When expanding a function given only on the interval [0, π], it is standard practice to extend it to the interval [−π, π] to form either a Fourier Cosine Series (even extension) or a Fourier Sine Series (odd extension).

Option A: The Fourier Cosine Series The even extension creates a series composed entirely of cosine terms: \[ f(x) = \frac{1}{2}\, a_0 + \sum_{n\ge 1} \, a_n\,\cos (nx) . \] The DC coeficient: \[ a_0 = \frac{2}{\pi}\,\int_0^{\pi}\, \frac{1}{\sqrt{x}} \, {\text d} = \frac{2}{\pi}\,\left[ 2\sqrt{x} \right]_{x=0}^{x= \pi} = \frac{4}{\sqrt{\pi}} . \] The AC coefficients: \[ a_n = \frac{2}{\pi}\,\int_0^{\pi}\, \frac{1}{\sqrt{x}} \,\cos (nx)\, {\text d} = . \] Option B: The Fourier Sine Series The odd extension creates a series composed entirely of sine terms: \[ f(x) = \sum_{n\ge 1}\, b_n \,\sin (nx) , \] where \[ b_n = \frac{2}{\pi}\,\int_0^{\pi}\, \frac{1}{\sqrt{x}} \,\sin (nx)\, {\text d} = . \] All these integrals are expressed through Fresnel Integrals \[ C(z) = \int_0^z \,\cos \left( \frac{\pi}{2}\,r^2 \right) {\text d}r , \qquad S(z) = \int_0^z \,\sin \left( \frac{\pi}{2}\,r^2 \right) {\text d}r . , \] Evaluating these integrals requires a change of variables \( \displaystyle \quad u = \sqrt{\frac{2nx}{\pi}} , \quad \) which maps then directly to the classical Fresnel Integrals. Solving the integrals yields the exact formulas for the coefficients: \begin{align*} a_n &= \frac{2\sqrt{2}}{\sqrt{\pi n}}\, C \left( \sqrt{2n} \right) , \\ b_n &= \frac{2\sqrt{2}}{\sqrt{\pi n}}\, S \left( \sqrt{2n} \right) . \end{align*} To see how these coefficients behave as the frequency n grows, we take the limit using the known asymptotic behavior of the Fresnel integrals. As their arguments roll out to infinity, both Fresnel functions stabilize and converge to exactly fffffffrac12;: \[ \lim_{n\to\infty} \ C \left( \sqrt{2n} \right) = \frac{1}{2} \qquad \mbox{and}\qquad \lim_{n\to\infty} \ S \left( \sqrt{2n} \right) = \frac{1}{2} \] Substituting these asymptotic limits into our coefficient equations reveals their large-n behavior: \[ a_n = \frac{2\sqrt{2}}{\sqrt{\pi n}} \left( \frac{1}{2} \right) = \frac{\sqrt{2}}{\sqrt{\pi n}} , \qquad b_n = \frac{2\sqrt{2}}{\sqrt{\pi n}} \left( \frac{1}{2} \right) = \frac{\sqrt{2}}{\sqrt{\pi n}} . \] Obviously, these coefficients vanish at infinity. Smooth bounded functions have Fourier coefficients that decay incredibly fast. The presence of the vertical asymptote singularity at x = 0 drops the decay rate down to 1/√n.

To explain why the lemma remains valid despite the vertical asymptote, you can use a simple truncation technique that relies only on basic limits:

  1. Isolate the Singularity: Split the integral into a tiny region near the singularity [0, ε], and a safe, well-behaved region [ε, π]: \[ \int_0^{\pi} \,\frac{\sin (nx)x}{\sqrt{x}} \,{\text d}x = \int_0^{\varepsilon} \,\frac{\sin (nx)x}{\sqrt{x}} \,{\text d}x + \int_{\varepsilon}^{\pi} \,\frac{\sin (nx)x}{\sqrt{x}} \,{\text d}x . \]
  2. Bound the Problematic Area: On the tiny interval , use the fact that |sin(nx)| to prove that the area is bounded entirely by the choice ofε regardless of how large n becomes: \[ \left\vert \int_0^{\varepsilon} \, \frac{\sin (nx)}{\sqrt{x}}\,{\text d}x \right\vert \le \int_0^{\varepsilon} \, \frac{1}{\sqrt{x}} \,{\text d}x = 2\sqrt{\varepsilon} . \]
  3. Apply the Bounded Lemma to the Rest: On the remaining interval [ε, π], the function is bounded and properly Riemann integrable. Therefore, the classical Riemann-Lebesgue Lemma holds exactly: \[ \lim_{n\to\infty}\ \int_{\varepsilon}^{\pi} \,\frac{\sin (nx)x}{\sqrt{x}} \,{\text d}x = 0 . \]
  4. Combine the Limits: By making ε arbitrarily small, the first part shrinks to zero. By letting n → ∞, the second part drops to zero. Consequently, the total integral is forced to zero    ■
    End of Example 4
   

Example 5: We present a few examples where direct application of the Riemann-Lebesgue lemma is not possible.

Example 5A: Consider \[ f(x) = \frac{\cos (1/x^2 )}{\sqrt{x}} , \qquad 0 < x \le 1 . \] First, we show that 𝑓 is improperly Riemann integrable. Indeed, \( \displaystyle \quad \int_0^1 \,\frac{\cos (1/x^2 )}{\sqrt{x}} \,{\text d}x \quad \) converges conditionally. Setting u = 1/x², we obtain \[ {\text d}x = - \frac{1}{2}\, u^{-3/2} \ {\text d}u, \qquad x^{-1/2} = u^{1/4} , \] so \[ \int_0^1 \,\frac{\cos (1/x^2 )}{\sqrt{x}} \,{\text d}x = \frac{1}{2}\,\int_1^{\infty} \,\frac{\cos u}{u^{5/4}}\,{\text d}u . \] which actually converges absolutely, because \( \displaystyle \quad \int_1^{\infty} \,u^{-5/4}\ {\text d}u < \infty . \quad \) Therefore, 𝑓 ∈ 𝔏¹(0,1). Consequently, the ordinary Riemann–Lebesgue lemma applies.    ▣

Example 5B:

We consider another function \[ g(x) = \frac{\cos (1/x^2 )}{x} , \qquad 0 < x \le 1 . \] This integral converges conditionally by Dirichlet test, \[ \int_0^1 \,\frac{\cos (1/x^2 )}{x} \,{\text d}x = \frac{1}{2}\, \int_1^{\infty} \,\frac{\cos u}{u}\,{\text d}u < \infty , \] but not absolutely, \[ \frac{1}{2}\, \int_1^{\infty} \,\frac{|\cos u|}{u}\,{\text d}u = \infty . \] Thus,

  • 𝑔 is improperly Riemann integrable,
  • 𝑔 ∉ 𝔏¹(0,1).
This is precisely the kind of function for which one must be careful: the classical Riemann–Lebesgue lemma does not apply directly, and whether \[ \int_0^1 \,g(x)\,\phi (nx)\,{\text d}x \,\to\, 0 \] holds requires additional analysis.

Let \[ c_n = \int_0^1 \,\frac{\cos (1/x^2 )}{x} \ e^{\mathbf{j}nx} \ {\text d}x . \] We will show that cₙ → 0 as n → ∞.

Step 1. Change variables u = 1/x². Then \[ x = u^{-1/2}, \qquad {\text d}x = - \frac{1}{2}\,u^{-3/2}\ {\text d}u , \] and \[ \frac{{\text d}x}{x} = - \frac{1}{2} \,\frac{{\text d}u}{u} . \] Hence, \[ c_n = \frac{1}{2}\,\int_1^{\infty} \,\frac{\cos u}{u}\, e^{-\mathbf{j}\,n/\sqrt{u}}\ {\text d}u . \] Step 2. Split the oscillation using \[ \cos u = \frac{1}{2}\, e^{\mathbf{j}\,u} + \frac{1}{2}\, e^{-\mathbf{j}\,u} . \] It suffices to study \[ I_n^{\pm} = \int_1^{\infty} \, \frac{1}{u}\, e^{\pm\mathbf{j}\,u - \mathbf{j}\,n/\sqrt{u}} \ {\text d}u . \] Step 3. Integration by parts. Consider \[ \phi_n (u) = u - \frac{n}{\sqrt{u}} . \] Then \[ \phi'_n (u) = 1 + \frac{n}{2\,u^{3/2}} \ge 1 . \] Thus the phase has no stationary points.

Since \[ e^{\mathbf{j}\,\phi_n (u)} = \frac{1}{\mathbf{j}\,\phi'_n (u)} \,\frac{\text d}{{\text d}u} \, e^{\mathbf{j}\,\phi_n (u)} . \] Integration by parts gives \[ I_n^{+} = \left[ \frac{e^{\mathbf{j}\,\phi_n (u)}}{\mathbf{j}\, \phi'_n (u)} \right]_{u=1}^{\infty} \ -\ \int_1^{\infty} \, e^{\mathbf{j}\,\phi_n (u)} \ \frac{\text d}{{\text d}u} \left( \frac{1}{\mathbf{j}\,\phi'_n (u)} \right) {\text d}u . \] Now
  • the boundary term at u = ∞ is 0,
  • at u = 1, \[ \left\vert \frac{1}{\phi'_b (1)} \right\vert = \frac{1}{1 + n/2} \,\to\, 0; \]
  • moreover, \[ \frac{\text d}{{\text d}u} \left( \frac{1}{u\,\phi'_n (u)} \right) = O \left( \frac{1}{u^2} \right) , \] uniformly in n, because \[ \phi'_n (u) \ge 1 , \qquad \phi''_n (u) = - \frac{3n}{4\,u^{5/4}} \] Since u−2 ∈ Lfr'²(1,∞), the remaining integral is bounded by an absolutely convergent integral, and another integration-by-parts estimate (or the uniform version of Dirichlet's test) yields \[ I_n^{+} \,\to\,0 . \]
  • ,/ul> Exactly the same argument applies to \( \displaystyle \quad I_n^{-} \quad \) because \[ \phi_n (u) = -u - \frac{n}{\sqrt{u}} , \qquad \phi'_n (u) = -1 + \frac{n}{2\, ^{3/2}} , \] has at most one stationary point. Splitting the integral at that point (if it exists) and applying the same argument on each interval shows that In → 0.

    Therefore \[ c_n = \frac{1}{4} \left( I_n^+ + I_n^{-} \right) \,\to\, 0 . \]

    Another argument. The functions \[ \psi_n (u) = e^{-\mathbf{j}\,n/\sqrt{u}} \] are uniformly bounded and satisfy \[ \psi'_n (u) = \frac{\mathbf{j}\,n}{2\,u^{3/2}} \, \psi_n (u) . \] Since \( \displaystyle \quad \int_1^{\infty} \,\frac{\cos u}{u}\, {\text d}u \quad \) is a Dirichlet integral, one can invoke the uniform Dirichlet test (or the Jordan–Dirichlet theorem) to conclude immediately that cₙ → 0.

    This example is quite interesting because it shows that the decay of Fourier coefficients can hold even when the classical Riemann–Lebesgue lemma is not applicable due to the lack of absolute integrability.    ■

    End of Example 5
Riemann--Lebesgue lemma for Riemann--Stieltjes integrals: Let F be periodic of bounded variation (𝐵𝑉) with mean zero, and let 𝑓 ∈ 𝐵𝑉[𝑎, 𝑏] (or absolutely continuous). Then \[ \int_a^b\,f(x)\,{\text d} \left( F(nx) \right) - f(b)\,F(nb) + f(a)\, F(na) \,\to\,0 \qquad \mbox{as } n\to\infty . \] If in addition, 𝑓(𝑎) = 𝑓(𝑏) = 0, then \[ \int_a^b\,f(x)\,{\text d} \left( F(nx) \right) \,\to\,0 \qquad \mbox{as } n\to\infty . \]
In fact, the theorem is most useful when dF represents an oscillatory measure rather than an oscillatory function. Here are several natural applications.

Example 6: One of the nicest applications is to high-frequency oscillatory Stieltjes integrals, where the oscillation is carried by the integrator rather than by the integrand. This is the exact analogue of the classical Riemann–Lebesgue lemma.

Example 6A: Let \[ F(t) = \sin t , \] which is 2π-periodic, of bounded variation on every bounded interval, and has mean zero. If 𝑓 ∈ 𝐵𝑉[𝑎, 𝑏], then \[ \int_a^b \, f(x)\,{\text d}\left( \sin nx \right) \,\to\,0 . \] Since \[ {\text d}\left( \sin nx \right) = n\,\cod \left( \sin nx \right) , \] this becomes \[ n\,\int_a^b f(x)\,\cos (nx)\,{\text d}x \,\to\, 0 . \] If er take 𝑓(𝑥) = 𝑥 or sin𝑥, we get \[ \int_{-\pi}^{\pi} \, x\,\cos (nx)\,{\text d}x = 0, \qquad \int_{-\pi}^{\pi} \, \sin x\,\cos (nx)\,{\text d}x = 0 . \]

Integrate[Sin[x]*Cos[n*x], x]
0
Integrate[x*Cos[n*x], x]
0
However, if the interval of integration is not equal to the period (2π), this integral is not zero,

At first glance this is surprising because of the factor n. The oscillations of cos⁡(nx) exactly compensate for it. For example, with 𝑓(𝑥) = 𝑥 or sin𝑥, \[ \int_{0}^{1} \, x\,\cos (nx)\,{\text d}x = \frac{n\,\sin n -1 + \cos n}{n}, \qquad \int_{0}^{1} \, \sin x\,\cos (nx)\,{\text d}x = \frac{n \left( \cos 1\,\cos n -1 \right) + n^2 \sin 1\,\sin n}{1 + n^2} . \] which does not tend to zero. This illustrates why one must be careful about the precise theorem: the endpoint term survives unless the theorem is stated with the appropriate normalization (or with 𝑓(𝑎) = 𝑓(𝑏) = 0.

However, if 𝑓(0) = 𝑓(1) = 0, say \[ f(x) = x\left( 1-x \right) , \] then \[ \int_0^1 \, x\left( 1-x \right) {\text d} \left( \sin (nx) \right) \,\to \, 0 . \]

Example 6B: Let \[ F(t) = \begin{cases} \phantom{-}1 , \qquad & 0 < t < \pi , \\ -1 , \qquad & \pi < t < 2\pi , \end{cases} \] be a square wave extended periodically.

Then F has bounded variation, period 2π2π, and mean zero. Its Stieltjes measure is \[ {\text d}F = -2 \,\sum_{k\in \mathbb{Z}} \ \delta_{(2k-1) \pi} + 2 \,\sum_{k\in \mathbb{Z}} \ \delta_{2k\, \pi} , \] so \[ \int_a^b \,f(x)\,{\text d} F(\pi x) \] is a weighted sum of the values of 𝑓 at the lattice points \[ x = \frac{k\pi}{n} . \] The theorem says that these rapidly oscillating alternating point masses produce complete cancellation: \[ \int_a^b \,f(x) \,{\text d} F(nx) \,\to \, 0 . \] Thus the theorem can be interpreted as an equidistribution result for alternating Dirac masses.

The integrator is a step function, so the integral reduces to a finite alternating sum: \[ \int_a^b \,f(x)\,{\text d} F(nx) = 2\,\sum_{2k\pi /n \in (a,b)} \ f \left( \frac{2k\pi}{n} \right) \] and the theorem asserts that this alternating sampling of 𝑓 tends to zero as the mesh π/n shrinks. This provides a concrete and distinctly Riemann–Stieltjes application that has no equally natural formulation in ordinary Riemann integration.

Example 6C: If F is periodic of bounded variation, it has a Fourier–Stieltjes expansion. The theorem implies that for every 𝑓 ∈ 𝐵𝑉[𝑎, 𝑏], \[ \int_a^b \,f(x)\,{\text d} F(nx) \,\to\, 0 , \] which is exactly the statement that the dilated Stieltjes measures dF(nx) converge weakly to zero.

This viewpoint appears in harmonic analysis and Example 6D: Let F be the sawtooth function \[ F(x) = x - \lfloow x \rfloor - \frac{1}{2} \]

Figure 6.1: Plot of the sawtooth function

Then F is periodic with period 1, has mean zero, and is of bounded variation. Moreover, \[ {\text d}f = {\text d}x - \sum_{k \in \mathbb{Z}} \ \delta_k , \] with δₖ is the Kronecker delta. So \[ {\text d}f = n\,{\text d}x - \sum_{k} \ \delta_{k/n} . \] Hence, \[ \int_0^1 \,f(x)\,{\text d}F(nx) = n\,\int_0^1 \,f(x)\,{\text d}x - \sum_{k=1}^{n-1} \, f \left( \frac{k}{n} \right) , \] up to endpoint conventions. The Riemann--Lebesgue theorem therefore yields \[ \sum_{k=1}^{n-1} \, f \left( \frac{k}{n} \right) = n\,\int_0^1 \,f(x)\,{\text d}x + o(1) , \] which is simply the convergence of Riemann sums written in an elegant Stieltjes form.

Example 6E: Suppose \[ F(x) = \sum_{m \in \mathbb{Z}} \ a_m \,H(x-m) , \] where H is the Heaviside function and the coefficients satisfy \[ a_{m+p} = a_m , \qquad \sum_{m=0}^{p-1} a_m = 0 . \] Then \[ {\text d} F = \sum_{m \in \mathbb{Z}} \ a_m \,\delta_m \] is a periodic signed measure with zero total mass. The Riemann-Lebesgue theorem gives \[ \sum_m \,a_m \,f\left( \frac{m}{n} \right) \, \to \. 0 . \] Thus every zero-average periodic finite-difference operator annihilates smooth trends asymptotically.

For example, \[ a_0 = 1, \qquad a_1 = -1 , \] gives \[ \sum_k \left[ f\left( \frac{2k}{n} \right) - f\left( \frac{2k+1}{n} \right) \right] \,\to \, 0 . \]

Example 6F: The first Bernoulli periodic function \[ B_1 (x) = \{ x \} - \frac{1}{2} , \qquad \{ x \} = x - \lfloor x \rfloor , \] is exactly the sawtooth function above.

The Euler--Maclaurin identity can be written \[ \sum_{k=0}^{n-1} \, f \left( \frac{k}{n} \right) = n\,\int_0^1 f(x)\,{\text d}x - \int_0^1 \, f(x)\,{\text d}B_1 . \] The Riemann--Lebesgue lemma immediately implies \[ \int_0^1 \, f(x)\,{\text d}B_1 = o(1) , \] recovering the leading term of Euler--Maclaurin without any differentiability assumptions on 𝑓.

It shows that the error term in approximating an integral by a Riemann sum is exactly a Riemann–Stieltjes integral against the periodic Bernoulli function, and the Riemann–Lebesgue lemma explains why this error tends to zero. This gives a conceptual bridge between oscillatory Stieltjes integration and one of the fundamental asymptotic formulas in analysis.    ■

End of Example 6
The Riemann-Lebesgue lemma is a particular case of the following affirmation.
Corollary 1: Let 𝑓 be improper Riemann integrable on [𝑎, 𝑏], and let 𝑔 : ℝ → ℝ be continuous, periodic, and satisfy \[ \int_0^T \,g(x)\,{\text d}x = 0 , \] where T is any period of 𝑔. Then \[ \int_a^b \,f(x)\,g(nx)\,{\text d}x \,\to\,0 \qquad \mbox{as } n\to\infty . \]
Suppose 𝑔 has period T and zero mean. Define \[ G(x) = \int_0^x \,g(t)\,{\text d}t \] Since 𝑔 is continuous and \[ G(x+T) - G(x) = \int_x^{x+T} \ g(t)\,{\text d}t = \int_0^T \,g(t)\,{\text d}t = 0, \] the function G is continuous and periodic, hence bounded. Now write \[ g(nx) = \frac{1}{n}\,\frac{\text d}{{\text d}x}\, G(nx) . \] Hence, \[ \int_a^b \,f(x)\, g(nx)\,{\text d}x = \int_a^b \,f(x)\, {\text d} \left( \frac{1}{n}\, G(nx) \right) , \] where the integral on the right is a Riemann–Stieltjes integral. Since \[ \sup_x \left\vert \frac{1}{n}\,G(nx) \right\vert \ls \frac{1}{n}\,\| G \|_{\infty} \,\to\, 0 , \] the integrator converges uniformly to zero.

A standard Riemann–Stieltjes Riemann–Lebesgue theorem states:

If 𝑓 is (improperly) Riemann integrable and αₙ are functions of bounded variation with \[ \sup \left\vert \alpha_n \right\vert \to 0 , \qquad \sup V(\alpha_n ) < \infty , \] then \[ \int_a^b \,f\,{\text d}\alpha_n \,\to\,0 . \] Here \( \displaystyle \quad \alpha_n (x) = \frac{1}{n}\,G(nx) \quad \) and \[ V(\alpha_n ) = \frac{1}{n} \,V(G(nx)) = \int_a^b \, |g(u)| \,{\text d}x = \frac{1}{n}\,\int_{na}^{nb} |g(u)|\,{\text d}u , \] which remains uniformly bounded because gg is periodic and continuous.

Hence, the hypotheses of the Riemann–Stieltjes version are satisfied, giving \[ \int_a^b f(x)\,g(nx)\,{\text d}x \,\to\, 0 . \]

The modern formulation of the Riemann-Lebesgue Lemma requires a function to be absolutely integrable (∫|f| < ∞), not necessarily bounded.
Riemann--Lebesgue lemma: For every Riemann intagrable function f(x) on interval [−ℓ, ℓ],
\[ \lim_{\nu\to\infty} \int_{-\ell}^{\ell} f(x)\,\cos (\nu x)\,{\text d}x = \lim_{\nu\to\infty} \int_{-\ell}^{\ell} f(x)\,\sin (\nu x)\,{\text d}x = \lim_{\nu\to\infty} \int_{-\ell}^{\ell} f(x)\,e^{{\bf j}\nu x}\,{\text d}x =0. \]
For any real number 𝑎, we define f𝑎(x) = f(x − 𝑎). Its Fourier coefficient is given by
\[ \hat{f}_a (n) = \frac{1}{2\pi} \int_0^{2\pi} f_a (\xi )\,e^{-{\bf j}n\xi} {\text d}\xi = \frac{1}{2\pi} \int_0^{2\pi} f(\xi -a)\,e^{-{\bf j}n\xi} {\text d}\xi , \]
where j is the imaginary unit on complex plane ℂ, so j² = −1. Let t = ξ − 𝑎; the limits of integration do not change as f is assumed to be 2π-periodic function, so we have
\begin{align*} \hat{f}_a (n) &= \frac{1}{2\pi} \int_0^{2\pi} f(t)\,e^{-{\bf j} n \left( t+a \right)} {\text d} t \\ &= \frac{1}{2\pi}\, e^{-{\bf j}na} \int_0^{2\pi} f(t)\,e^{-{\bf j} n t} {\text d}t = e^{-{\bf j}na} \hat{f} (n) . \end{align*}
Now, choose 𝑎 = π/n. Then \( e^{-{\bf j}na} = -1, \) for such 𝑎, and we have
\begin{align*} 2\left\vert \hat{f} (n) \right\vert &= \left\vert \hat{f} (n) - e^{-{\bf j} n a} \hat{f}(n) \right\vert \\ &= \left\vert \hat{f} (n) - \hat{f}_a (n) \right\vert \\ &= \left\vert \frac{1}{2\pi} \int_0^{2\pi} f(t)\,e^{-{\bf j}nt} - \frac{1}{2\pi} \int_0^{2\pi} f(t -a)\,e^{-{\bf j}nt} \right\vert \\ &= \frac{1}{2\pi} \left\vert \int_0^{2\pi} \left[ f(t) - f(t-a) \right] e^{-{\bf j}nt} \right\vert {\text d} t \\ & \le \int_0^{2\pi} \left\vert f(t) - f(t-a) \right\vert {\text d}t . \end{align*}
Note that 𝑎 → 0 as n → ∞.

If f is a continuous function (it is abbreviated as fC0), then \( \left\vert f(t) - f(t-a) \right\vert \to 0 \) for every t ∈ [−ℓ, ℓ]. Hence, by the Dominated Convergent Theorem,

\[ \lim_{n\to\infty} \int_{-\ell}^{\ell} \left\vert f(t) - f\left( t - \frac{\pi}{n} \right) \right\vert {\text d} t = 0 . \]
In general, if f ∈ 𝔏¹, then there exists continuous function g(x) such that for arbitrary positive ε, \( \| f(x) - g(x) \|_1 < \varepsilon \) Take K large enough so that \( \left\vert \hat{g}(k) \right\vert < \varepsilon /2 \) whenever |k| ≥ K. Then
\[ \left\vert \hat{f}(n) \right\vert \le \left\vert \hat{f}(n) - \hat{g} (n) \right\vert + \left\vert \hat{g}(n) \right\vert \le \| f - g \|_1 + \frac{\varepsilon}{2} < \varepsilon , \qquad \mbox{with} \quad \|f \|_1 = \int_{-\ell}^{\ell} \left\vert f(x) \right\vert {\text d}x . \]

Example 3:    ■

End of Example 3

 

Order of Decay of Fourier Coefficients


We investigate the interplay between the smoothness of a function and the decay of its Fourier coefficients. Let us consider a function f(x) having N continuous derivatives on [−ℓ, ℓ]. The integrals in Euler--Fourier formulas \eqref{EqFourier.2} and \eqref{EqFourier.4} can be integrated by parts N times. Taking one coefficient, say 𝑎k, and integrate by parts twice, we obtain
\begin{align*} a_k &= \frac{1}{\ell} \int_{-\ell}^{\ell} f(x)\,\cos \left( \frac{k\pi x}{\ell}\right) {\text d} x = \frac{1}{k\pi} \int_{-\ell}^{\ell} f(x)\,{\text d}\left( \sin\frac{k\pi x}{\ell} \right) \\ &= \frac{1}{k\pi} \left[ f(x)\,\sin\frac{k\pi x}{\ell} \right]_{x=-\ell}^{x=\ell} - \frac{1}{k\pi} \int_{-\ell}^{\ell} f'(x)\,\sin \left( \frac{k\pi x}{\ell}\right) {\text d} x \\ &= \frac{\ell}{(k\pi )^2} \left[ f'(x)\,\cos\frac{k\pi x}{\ell} \right]_{x=-\ell}^{x=\ell} + \frac{\ell}{(k\pi )^2} \int_{-\ell}^{\ell} f''(x)\,\cos \left( \frac{k\pi x}{\ell}\right) {\text d} x . \end{align*}
So we see that if function f(x) has one periodic derivative and the second derivative is integrable, the Fourier coefficients decay as 1/k². Clearly, this process can be continued until the N-th differential appears in the integral, but useful information can be greened from these expressions.

Theorem 6: If a periodic function f(x) is continuous and has continuous periodic derivatives up to the (N−1)-st order and if its N-th derivative is integrable on interval [−ℓ, ℓ], then its Fourier coefficients can be estimated by
\[ 2 \left\vert \hat{f}(n) \right\vert = \sqrt{a_n^2 + b_n^2} \le \frac{K}{n^N} , \]
where K is a positive constant.

Example 9: We start with the power function p3(x) = x³. Expanding it into Fourier series, we get

\[ x^3 = -\frac{2 \ell^3}{\pi^3} \sum_{n\ge 1} \frac{n^2 \pi^2 -6}{n^3} \left( -1 \right)^n \sin \left( \frac{n \pi x}{\ell} \right) . \]
Integrate[x^3*Sin[n*Pi*x/L], {x, -L, L}]/L
-((2 L^3 (n \[Pi] (-6 + n^2 \[Pi]^2) Cos[n \[Pi]] - 3 (-2 + n^2 \[Pi]^2) Sin[n \[Pi]]))/(n^4 \[Pi]^4))
The Fourier series for x³ converges very slowly.
\[ x^4 = \frac{\ell^4}{5} + \frac{8 \ell^4}{\pi^4} \sum_{n\ge 1} \frac{n^2 \pi^2 -6}{n^4} \left( -1 \right)^n \cos \left( \frac{n \pi x}{\ell} \right) . \]
Integrate[x^4*Cos[n*Pi*x/L], {x, -L, L}]/L
(2 L^4 (4 n \[Pi] (-6 + n^2 \[Pi]^2) Cos[ n \[Pi]] + (24 - 12 n^2 \[Pi]^2 + n^4 \[Pi]^4) Sin[ n \[Pi]]))/(n^5 \[Pi]^5)
So the Fourier series for x4 converges uniformly.

\[ x^5 = -\frac{2 \ell^5}{\pi^5} \sum_{n\ge 1} \frac{n^6 \pi^6 - 42 n^4 \pi^4 + 840 n^2 \pi^2 -5040}{n^7} \left( -1 \right)^n \sin \left( \frac{n \pi x}{\ell} \right) . \]
\[ x^6 = \frac{\ell^6}{7} + \frac{12 \ell^6}{\pi^6} \sum_{n\ge 1} \frac{n^4 \pi^4 -20 n^2 \pi^2 +120}{n^6} \left( -1 \right)^n \cos \left( \frac{n \pi x}{\ell} \right) . \]
\[ x^7 = -\frac{2 \ell^7}{\pi^7} \sum_{n\ge 1} \frac{n^4 \pi^4 -10 n^2 \pi^2 + 120}{n^5} \left( -1 \right)^n \sin \left( \frac{n \pi x}{\ell} \right) . \]
These examples of the Fourier series allow us to make an observation. The Fourier series for monomians with even powers converge uniformly as there general term decreases as 1/n². However, for odd poweers, Fourier series converge but slowly.    ■
End of Example 9

Example 11: ????????????? Let us consider the quadratic polynomial 𝑓(𝑥) = 𝑎 𝑥² + b 𝑥 + c, where 𝑎, 𝑏, and c are real constants. The Fourier coefficients are readily calculated as \begin{align*} a_0 &= \frac{1}{\ell}\,\int_{-\ell}^{+\ell} \,\left( a\,x^2 + b\,x + c \right) {\text d} x = 2\,c + \frac{2}{3}\,a\,\ell^2 , \\ a_n &= \frac{1}{\ell}\,\int_{-\ell}^{+\ell} \,\left( a\,x^2 + b\,x + c \right) \cos \left( n\,\frac{\pi}{\ell}\,x \right){\text d} x = \frac{4a\,\ell^2}{n^2 \pi^2}\, (-1)^n , \\ b_n &= \frac{1}{\ell}\,\int_{-\ell}^{+\ell} \,\left( a\,x^2 + b\,x + c \right) \sin \left( n\,\frac{\pi}{\ell}\,x \right){\text d} x = -\frac{2b\,\ell}{n\pi}\, (-1)^n . \end{align*}

Integrate[a*x^2 + b*x + c, {x, -L, L}]/L
(2 c L + (2 a L^3)/3)/L
Integrate[(a*x^2 + b*x + c)*Cos[n*Pi*x/L], {x, -L, L}]/L
(4 a L^3 n \[Pi] Cos[n \[Pi]] + 2 L (c n^2 \[Pi]^2 + a L^2 (-2 + n^2 \[Pi]^2)) Sin[ n \[Pi]])/(L n^3 \[Pi]^3)
Integrate[(a*x^2 + b*x + c)*Sin[n*Pi*x/L], {x, -L, L}]/L
-((2 b L (n \[Pi] Cos[n \[Pi]] - Sin[n \[Pi]]))/(n^2 \[Pi]^2))
So we get \[ a\,x^2 + b\,x + c = c + a\,\frac{a\,\ell^2}{3} + \frac{4a\,\ell^2}{\pi^2}\, \sum_{n\ge 1} \frac{(-1)^n}{n^2} \,\cos \left( \frac{n\pi x}{\ell} \right) - 2b\,\frac{\ell}{\pi}\,\sum_{n\ge 1} \frac{(-1)^n}{n} \,\sin \left( \frac{n\pi x}{\ell} \right) . \] The function 𝑓(𝑥) = 𝑎 𝑥² + b 𝑥 + c can be viewed as the linear combination of two functions 𝑓(𝑥) = 𝑓₁(𝑥) + 𝑓₂(𝑥), where 𝑓₁(𝑥) = 𝑎 𝑥² + c is an even function and 𝑓₂(𝑥) = 𝑏 𝑥 is an odd function on the interval (−ℓ, ℓ). The traces of these two functions in the Fourier series are then clearly labeled by the constants 𝑎, 𝑏, and c, and reflected in the corresponding even and odd constituents of the series: \[ f_1 (x) = a\,x^2 + c = c + a\,\frac{a\,\ell^2}{3} + \frac{4a\,\ell^2}{\pi^2}\, \sum_{n\ge 1} \frac{(-1)^n}{n^2} \,\cos \left( \frac{n\pi x}{\ell} \right) \] and \[ f_2 (x) = b\,x = - 2b\,\frac{\ell}{\pi}\,\sum_{n\ge 1} \frac{(-1)^n}{n} \,\sin \left( \frac{n\pi x}{\ell} \right) . \] From these expansions, we derive \[ x^2 = \frac{2}{3}\,\ell^2 + \frac{4\,\ell^2}{\pi^2}\, \sum_{n\ge 1} \frac{(-1)^n}{n^2} \,\cos \left( \frac{n\pi x}{\ell} \right) \] and \[ x = - 2\,\frac{\ell}{\pi}\,\sum_{n\ge 1} \frac{(-1)^n}{n} \,\sin \left( \frac{n\pi x}{\ell} \right) . \]    ■
End of Example 11

 

 

  1. Bary, N.K., A Treatise on Trigonometric Series, A Pergamon Press Book, New York, 1964.
  2. Lebesgue, H., Sur les séries trigonométriques (On trigonometric series), Annales scientifiques de l'École Normale Supérieure, Série 3, Tome 20, 1903, pages: 453–485.

 

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