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


Uniqueness of Fourier Series


A series of the form

\begin{equation*} %\label{EqUniq.1} c_0 + \ \sum_{n\ge 1} \left( a_n\,\cos \left( n\,\frac{\pi}{\ell}\,x \right) + b_n\,\sin \left( n\,\frac{\pi}{\ell}\,x \right) \right) \end{equation*}
is called a trigonometric series, where c₀, 𝑎ₙ, bₙ are real numbers.

If trigonometric series converges on [−ℓ, ℓ] to an integrable function 𝑓 and if it can be integrated term by term, then

\begin{align} c_0 &= \frac{a_0}{2} = \frac{1}{2\ell}\,\int_{-\ell}^{\ell} \,f(x)\,{\text d}x . \notag \\ a_n &= \frac{1}{\ell}\,\int_{-\ell}^{\ell} \,f(x)\,\cos \left( n\,\frac{\pi}{\ell}\,x \right){\text d}x , \label{EqUniq.1} \\ 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 . \notag \end{align}
Let 𝑓 be integrable (in either Riemann or Lebesgue sense) on compact interval [−ℓ, ℓ]. The Fourier series of 𝑓 is the series
\begin{equation} \label{EqUniq.2} \frac{a_0}{2} + \ \sum_{n\ge 1} \left( a_n\,\cos \left( n\,\frac{\pi}{\ell}\,x \right) + b_n\,\sin \left( n\,\frac{\pi}{\ell}\,x \right) \right) \end{equation}
where coefficients 𝑎₀, 𝑎ₙ, bₙ are defined by Eqs.\eqref{EqUniq.1}.

The series
\begin{equation} \label{EqUniq.3} \mbox{V.P.}\,\sum_{n=-\infty}^{\infty} \ c_n\,e^{\mathbf{j}\,n\pi x/\ell} , \qquad c_n = \frac{1}{2\ell}\,\int_{-\ell}^{\ell}\,f(x)\, e^{-\mathbf{j}\,n\pi x/\ell} \ {\text d}x \end{equation}
is also called the Fourier series of 𝑓 in complex form. The coefficients 𝑎ₙ, bₙ, and cₙ are called the Fourier coefficients. The coefficients cₙ are usually denoted by \( \displaystyle \quad \hat{f}(n) . \)
In the definition above, «V.P.» abbreviates the Cauchy principal value (valeur principale de Cauchy in French), and j or ⅉ denotes the unit (imaginary) vector on complex plane ℂ, so ⅉ² = −1. Recall that the N-th partial of the Fourier series \eqref{EqUniq.2} or \eqref{EqUniq.3} is the sum
\[ S_N (f; x) = \frac{a_0}{2} + \sum_{n=1}^N \left( a_n\,\cos \left( n\,\frac{\pi}{\ell}\,x \right) + b_n\,\sin \left( n\,\frac{\pi}{\ell}\,x \right) \right) = \sum_{n=-N}^N \ c_n\,e^{\mathbf{j}\,n\pi x/\ell} . , \]
For a 2ℓ-periodic function 𝑓. the partial Fourier sum can be expressed via convolution integral
\[ S_N (f; x) = \frac{1}{2\ell}\,\int_{-\ell}^{\ell} \,f(x-t) \,D_N (t) \,{\text d}t = \frac{1}{2\ell}\,\int_{-\ell}^{\ell} \,f(t )\,D_N (x-t)\,{\text d}t , \]
where DN(t) is known as the Dirichlet kernel:
\[ D_n (x) = \sum_{k=-n}^n \ e^{\mathbf{j}\,k\pi x/\ell} = 1 + 2\,\sum_{k=1}^n \ \cos \left( \frac{k\pi x}{\ell} \right) = \frac{\sin \left( n + \frac{1}{2} \right) \frac{x\pi}{\ell}}{\sin x\pi /(2\ell )} . \]
Riemann's uniqueness theorem:
Proof:

https://math.mit.edu/classes/18.103/outline.pdf https://home.iitm.ac.in/mtnair/FS-Notes-2.pdf

Lebesgue's uniqueness theorem: If 𝑓 ∈ 𝔏¹([−ℓ, ℓ]) and its Fourier coefficients \( \quad c_n = \frac{1}{2\ell}\,\int_{-\ell}^{\ell}\, f(x)\, e^{\mathbf{j}\,n\pi x/\ell}\ {\text d}x, \quad n \in \mathbb{Z}, \quad \) all all zeroes for all n ∈ ℤ, then 𝑓(𝑥) = 0 for almost every 𝑥.
In particular, taking differences, if two functions have the same Fourier coefficients, then they are the same (except on a set of measure zero).

Since the Fourier coefficients of function f(x) are determined through integrals \eqref{EqFourier.2} or \eqref{EqFourier.4}, it requires f(x) to be integrable, so f ∈ 𝔏¹. Assuming that the Fourier series for f(x) converges to f in an appropriate sense, the natural question should appear: is this series unique? This would lead to the following statement: if \( \hat{f}(n) = 0 \) for all n ∈ ℤ, then f(x) ≡ 0. This assertion cannot be correct without reservation because calculating Fourier coefficients requires integration, and we know that any two functions that differ at finitely many (or discrete) points have the same Fourier series. However, we do have the following positive result.

Theorem 9: Let f be a periodic integrable on finite interval [−ℓ, ℓ] function. Suppose that f is 0 in a neighbourhood of x; that is, there exists δ >0 such that f(t) ≡ 0 for all t∈(x−δ, x+δ). Then the partial Fourier sum SN(f; x) → 0 as N → ∞.
This result is significant in that while the Fourier coefficients \( \hat{f}(n) \) depends on the values of f globally— that is, to calculate \( \hat{f}(n) \) one needs to know f everywhere withing the full interval — the convergence of SN(f; x) only depends on a local neighbourhood of that point.
We compute
\begin{align*} S_N (f; x) &= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(y)\,D_N (x-y)\,{\text d}y \\ &= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x-y)\,D_N (y)\,{\text d}y \\ &= \frac{1}{2\pi} \int_{[-\pi , \pi] \setminus [-\delta , \delta ]} f(x-y)\,D_N (y)\,{\text d}y + \frac{1}{2\pi} \int_{ [-\delta , \delta ]} f(x-y)\,D_N (y)\,{\text d}y \\ &= \frac{1}{2\pi} \int_{[-\pi , \pi] \setminus [-\delta , \delta ]} f(x-y)\, \frac{\sin \left( N + \tfrac{1}{2} \right) y}{\sin\tfrac{y}{2}} . \end{align*}
Now mapping
\[ y \mapsto \frac{f(x-y)}{\sin\tfrac{y}{2}} \]
is an 𝔏¹ function on \( [-\pi , \pi] \setminus [-\delta , \delta ] , \) so
\begin{align*} S_N (f; x) &= \frac{1}{2\pi} \int_{-\pi}^{\pi} \chi_S (y)\, \frac{f(x-y)}{\sin \tfrac{y}{2}} \cdot \frac{e^{{\bf j} \left( N + \tfrac{1}{2} \right) y} - e^{-{\bf j} \left( N + \tfrac{1}{2} \right) y} }{2{\bf j}}\, {\text d}y \\ &= \frac{1}{2\pi} \cdot \frac{1}{2{\bf j}} \int_{-\pi}^{\pi} \chi_S (y)\, \frac{f(x-y)}{\sin \tfrac{y}{2}} \cdot e^{{\bf j} \left( N + \tfrac{1}{2} \right) y} {\text d}y - \frac{1}{2\pi} \cdot \frac{1}{2{\bf j}} \int_{-\pi}^{\pi} \chi_S (y)\, \frac{f(x-y)}{\sin \tfrac{y}{2}} \cdot e^{-{\bf j} \left( N + \tfrac{1}{2} \right) y} {\text d}y \end{align*}
Setting
\[ g(y) = \chi_S (y) \, \frac{f(x-y)}{\sin \tfrac{y}{2}} \cdot e^{{\bf j} y/2} \qquad\mbox{and} \qquad h(y) = \chi_S (y) \, \frac{f(x-y)}{\sin \tfrac{y}{2}} \cdot e^{-{\bf j} y/2} \]
we see that the two terms are nothing but Fourier coefficients of g and h, so that
\[ S_N (f; x) = \frac{1}{2\pi}\left[ \hat{g}(-N) - \hat{h}(N) \right] \,\to 0 \qquad\mbox{as} \quad N \to \infty \]
by the Riemann-Lebesgue lemma.
Uniqueness Theorem: Suppose that f(x) is a periodic integrable function on the interval [−ℓ, ℓ] (it is abbreviated as f∈𝔏¹) with Fourier coefficients \( \hat{f}(n) =0 \) for all n ∈ ℤ={ 0, ±1, ±2, … }. Then f(ξ) = 0 whenever f(x) is continuous at the point ξ ∈[−ℓ, ℓ].
We suppose first that f is real-valued, and argue by contradiction. Assume, without loss of generality, that f is defined on {−π, π] and ξ = 0, with f(ξ) > 0. The idea now is to construct a family of trigonometric polynomials {pk} that “peak” at 0, and so that \( \int p_k (t)\,f(t)\,{\text d}t \to \infty \) as k → ∞. This will be our desired contradiction since these integrals are equal to zero by assumption.

Since f is continuous at 0, we can choose 0 < δ π/2, so that f(ξ) f(0)/2, whenever |ξ| < δ. Let

\[ p(t) = \epsilon + \cos t, \]
where ϵ > 0 is chosen so small that |p(t)| < 1 −ϵ/2, whenever δ ≤ |t| ≤ π. hen, choose a positive η with η < δ so that p ≥ 1 + ϵ/2, for |t| < η. Finally, let
\[ p_k (t) = \left[ p(t) \right]^k , \]
and select B so that |f(t)| < B for all t. This is possible since f is integrable, hence bounded.

By construction, each pk is a trigonometric polynomial, and since \( \hat{f}(n) = 0 \) for all n ∈ ℤ, we must have

\[ \int_{-\pi}^{\pi} f(t)\,p_k (t) \,{\text d}t = 0 \qquad \mbox{for al} \quad k. \]
However, we have the estimate
\[ \left\vert \int_{-\pi}^{\pi} f(t)\,p_k (t) \,{\text d}t \right\vert \le 2\pi B \left( 1 - \epsilon /2 \right)^k . \]
Also, our choice of δ guarantees that p(t) and f(t) are non-negative whenever |t| < δ; thus,
\[ \int_{\eta \le |t| < \delta} f(t)\,p_k (t) \,{\text d}t \ge 0. \]
Finally,
\[ \int_{|t| <\eta} f(t)\,p_k (t) \,{\text d}t \ge 2\eta\,\frac{f(0)}{2} \left( 1 + \epsilon /2 \right)^k . \]
Therefore, \( \int p_k (t) \,f(t)\,{\text d}t \to\infty \) as k → ∞. This concludes the proof when f is real-valued. In general, write f(t) = u(t) + jv(t), where u and v are real-valued. If we define complex conjugate \( \overline{f} (t) = \overline{f(t)}, \) then
\[ u(t) = \frac{f(t) + \overline{f}(t)}{2} \qquad \mbox{and} \qquad v(t) = \frac{f(t) - \overline{f}(t)}{2} , \]
and since \( \hat{\overline{f}}(n) = \overline{\hat{f}(-n)} , \) we conclude that the Fourier coefficients of u and v all vanish; hence f= 0 at its points of continuity.
Corollary 1: If f(x) is a periodic continuous function and its Fourier coefficients are all zero, then f(x) ≡ 0.

Example 1: Menshov's null series \[ \sum_{n=-\infty}^{\infty} \ c_n \,e^{\mathbf{j}\,nx} , \] not identically zero, which converges to 0, almost everywhere.

It is not a Fourier series. If these cₙ​ were Fourier coefficients of an 𝔏¹-function (or finite measure), then uniqueness of Fourier coefficients would force every cn=0cn​=0. Thus the series cannot be a Fourier series, despite converging pointwise (a.e.) to the zero function.    ■

End of Example 1

Example 17: Consider the piecewise continuous function on the interval [-2,2]:

\[ f(x) = \begin{cases} 1, & \ \mbox {if } -2 < x < -1 , \\ x^2 -1, & \ \mbox {if } -1< x< 2 , \end{cases} \]
Its Fourier coefficients are evaluated with the aid of Mathematica:
f[x_] = Piecewise[{{1, -2 < x < -1}, {x^2 - 1, -1 < x < 2}}, 0]
Integrate[f[x], {x, -2, 2}]/2
1/2
Other coefficients we find by direct integration:
Simplify[Integrate[f[x]*Sin[n*Pi*x/2], {x, -2, 2}]/2 , Assumptions -> Element[n, Integers]]
-((2 (-1)^n (-4 + n^2 \[Pi]^2) + (8 + n^2 \[Pi]^2) Cos[(n \[Pi])/2] + 4 n \[Pi] Sin[(n \[Pi])/2])/(n^3 \[Pi]^3))
Simplify[Integrate[f[x]*Cos[n*Pi*x/2], {x, -2, 2}]/2 , Assumptions -> Element[n, Integers]]
(8 (-1)^n n \[Pi] + 4 n \[Pi] Cos[(n \[Pi])/2] - (8 + n^2 \[Pi]^2) Sin[(n \[Pi])/ 2])/(n^3 \[Pi]^3)
So
\begin{align*} a_0 &= \frac{1}{2} , \\ a_n &= \frac{8(-1)^n n\pi + 4n\pi \cos \left( \frac{n\pi}{2} \right) - \left( 8 + n^2 \pi^2 \right) \sin \left( \frac{n\pi}{2} \right)}{n^3 \pi^3} , \\ b_n &= - \frac{2 (-1)^n \left( n^2 \pi^2 -4 \right) + \left( 8 + n^2 \pi^2 \right) \cos \left( \frac{n\pi}{2} \right) + 4n\pi\,\sin \left( \frac{n\pi}{2} \right)}{n^3 \pi^3} . \end{align*}
Finally, we build partial Fourier sums with N = 10, 20, and 100 terms
F10[x_] = 1/4 + Sum[(( 8 (-1)^n n \[Pi] + 4 n \[Pi] Cos[(n \[Pi])/2] - (8 + n^2 \[Pi]^2) Sin[(n \[Pi])/ 2])/(n^3 \[Pi]^3))* Cos[n*Pi*x/2] - (( 2 (-1)^n (-4 + n^2 \[Pi]^2) + (8 + n^2 \[Pi]^2) Cos[(n \[Pi])/ 2] + 4 n \[Pi] Sin[(n \[Pi])/2])/(n^3 \[Pi]^3))* Sin[n*Pi*x/2], {n, 1, 10}]
F20[x_] = 1/4 + Sum[(( 8 (-1)^n n \[Pi] + 4 n \[Pi] Cos[(n \[Pi])/2] - (8 + n^2 \[Pi]^2) Sin[(n \[Pi])/ 2])/(n^3 \[Pi]^3))* Cos[n*Pi*x/2] - (( 2 (-1)^n (-4 + n^2 \[Pi]^2) + (8 + n^2 \[Pi]^2) Cos[(n \[Pi])/ 2] + 4 n \[Pi] Sin[(n \[Pi])/2])/(n^3 \[Pi]^3))* Sin[n*Pi*x/2], {n, 1, 20}]
F100[x_] = 1/4 + Sum[(( 8 (-1)^n n \[Pi] + 4 n \[Pi] Cos[(n \[Pi])/2] - (8 + n^2 \[Pi]^2) Sin[(n \[Pi])/ 2])/(n^3 \[Pi]^3))* Cos[n*Pi*x/2] - (( 2 (-1)^n (-4 + n^2 \[Pi]^2) + (8 + n^2 \[Pi]^2) Cos[(n \[Pi])/ 2] + 4 n \[Pi] Sin[(n \[Pi])/2])/(n^3 \[Pi]^3))* Sin[n*Pi*x/2], {n, 1, 100}]
and plot them:
Plot[{f[x], F10[x]}, {x, -2.5, 2.5}, PlotStyle -> {{Thick, Black}, {Thick, Red}}]
Plot[{f[x], F20[x]}, {x, -2.5, 2.5}, PlotStyle -> {{Thick, Black}, {Thick, Orange}}]
Plot[{f[x], F100[x]}, {x, -2.5, 2.5}, PlotStyle -> {{Thick, Black}, {Thick, Blue}}]
   Fourier approximation with 10 terms    Fourier approximation with 20 terms    Fourier approximation with 100 terms
       
   ■
End of Example 17

Example 18: Let us consider a periodic step function with period T:

\[ f(x) = \mbox{sign}\left( \sin \frac{2\pi x}{T} \right) = \begin{cases} \phantom{-}1, & \ \mbox{for }\ 0 < x < T /2, \\ -1, & \ \mbox{for }\ T/2 < x < T . \end{cases} \]
Plot[Sign[Sin[Pi*x]], {x, 0, 4}, PlotStyle -> Thick]
Periodic step function with period 2.
Its Fourier series becomes
\[ \mbox{sign}\left( \sin \frac{2\pi x}{T} \right) = \frac{4}{\pi} \sum_{n\ge 1} \frac{1}{2n-1}\,\sin \frac{2\pi x \left( 2n -1 \right)}{T} . \]
      Using Mathematica We plot animation of the Fourier series approximation depending on the number m of terms.
s[x_, m_] = 4*Sum[Sin[Pi*x*(2*n - 1)]/(2*n - 1), {n, 1, m}]/Pi;
animation = Table[Plot[s[x, m], {x, -0.1, 2*Pi + 0.1}, PlotRange -> {-1, 1, 1.1}, PlotStyle -> Thickness[0.008], PlotLabel -> "Fourier approximation depends on " <> ToString[m] <> " terms"], {m, 0, 100, 2}];;
Export["Animation.gif", animation, "AnimationRepetitions" -> 100]
       Fourier series approximation depending on the number of terms. .            Mathematica code

   

Let χ(x) be the chracteristic function of the interval (−h, h):
\[ \chi (x) = \begin{cases} 1, & \ \mbox{if}\quad -h < x < h, \\ 0, & \ \mbox{otherwise}. \end{cases} \]
Its Fourier series is
\[ S{\chi ](x) = \frac{1}{2}\, a_0 + \sum_{k \ge 1} a_k \cos (kx) , \]
where
\[ a_k = \]
The conjugate function is
\[ \chi^{\ast} (x) = \sum_{k \ge 1} a_k \sin (kx) = \frac{1}{\pi}\,\ln \left\vert \frac{\sin \frac{1}{2} \left( x+h \right)}{\sin \frac{1}{2} \left( x-h \right)} \right\vert . \]
   ■
End of Example 18

Riemann localization for Fourier Series


Riemann's localization principle: Let 𝑓 be a 2π-periodic function of bounded variation on every interval of length 2π. Then the limit
\[ \lim_{n\to\infty}\ S_n (f; \vartheta ) \]
if it exists, depends only on the values of 𝑓 in an arbitrarily small neighborhood of ϑ. In particular, altering 𝑓 outside any neighborhood of ϑ does not change this limit.
The n-th partial sum at a point x can be written in the convolution form: \[ S_n (f;x) = \sum_{k=-n}^n \hat{f} (k)\,e^{\mathbf{j}kx} = \frac{1}{2\pi}\,\int_{-\pi}^{\pi} \,f(x-t)\,D_n (t)\,{\text d}t , \] where \[ D_n (t) = \sum_{k=-n}^n \, e^{\mathbf{j}\,kx} = \frac{\sin\left( n + \frac{1}{2}\right) t}{\sin (t/2)} . \] The key step is to show that the contribution from |x| ≥ δ vanishes as n → ∞; so we look at \[ I_n (\delta ) = \frac{1}{2\pi}\,\int_{|t| \ge \delta} \ f(x-t)\, D_n (t)\,{\text d}t \] and prove that Iₙ(δ) → 0 for fixed δ>0.

Define \[ F(t) = f(x-t) , \qquad G_n = \int_0^t \,D_n (u)\,{\text d}u . \] Then on [δ, π], we have \[ \int_{\delta}^{\pi} \,F(t)\,D_n (t)\,{\text d}t = \int_{\delta}^{\pi} \,F(t)\,{\text d} G_n (t) . \] This is exactly the Riemann--Stieltjes step.

  • The integral ∫ FdGₙ is a Riemann--Stieltjes integral.
  • The function F has bounded variation on [δ, π].
  • The function Gₙ is uniformly bounded in n on [δ, π]. because integrating the the highly oscillatory Dₙ over an interval away from 0 produces cancellation.

From the integration by parts formula: \[ \int_{\delta}^{\pi} \,F(t)\,D_n (t)\,{\text d}t = F(\pi )\,G_n (\pi ) - F(\delta )\,G_n (\delta ) - \int_{\delta}^{\pi} \,G_n (t)\,{\text d} F(t) , \] one shows

  • Gₙ(π) and Gₙ(δ) are uniformly bounded in n.
  • dF is a finite signed measure (𝐵𝑉).
  • Gₙ(𝑡) oscillates and has mean zero in the limit.
Hence, each term tends to 0 as n → ∞, and sililarly on [−*pi;, −δ]. So the contribution from |𝑡| ≥ δ vanishes: \[ \int_{|t|\ge \delta} \,F\,G_n = \int_{|t|\ge \delta} \,F\,{\text d}G_n \to 0 . \]

We need to show that Gₙ(𝑡) is uniformly bounded: \[ \sup_{n\ge 1} \ \sup_{t \in [\delta , \pi ]} \ \left\vert G_n (t) \right\vert < \infty . \] Observe that \[ D_n (u) = \Im \left( \frac{e^{\mathbf{j} \left( n + 1/2 \right) u}}{\sin (u/2)} \right) , \] but mpre directly, \[ |\sin (u/2) | \ge c_{\delta} > o , \qquad u \in [\delta , \pi ]. \] So \[ \left\vert D_n (u) \right\vert \le \frac{1}{c_{\delta}} . \] This along gives a crude bound: \[ \left\vert G_n (u) \right\vert = \left\vert \int_{\delta}^{\pi} \,D_n (u)\,{\text d}u \right\vert \le \int_{\delta}^{\pi} \left\vert D_n (u) \right\vert {\text d}u \le \frac{\pi - \delta}{c_{\delta}} , \] which is independent of n. Thus, we conclude \[ \sup_{n\ge 1} \ \sup_{t \in [\delta , \pi ]} \ \left\vert G_n (t) \right\vert \le \frac{\pi - \delta}{c_{\delta}} < \infty . \]

Corollary 3: Let 𝑓 and 𝑔 be 2π-periodic functions of bounded variation. If \[ f(x) = g(x) \] for all x in some neighborhood of θ, then \[ \lim_{n\to\infty} \ S_n (f; \theta ) = \lim_{n\to\infty} \ S_n (g; \theta ) . \] Consequently, whenever one of the limits exists, so does the other, and they are equal.

 

 

  1. Bari, N.K., A Treatise on Trigonometric Series, Oxford, Pergamon Press, 1964.
  2. Kozma, G. and Olevskii, A., Menshov Representation Spectra, Journal d'Analyse Mathématique 84 (2001), 361–393.
  3. D. E. Menshov, Об одной особенности тригонометрических рядов ("On a property of trigonometric series"), Matematicheskii Sbornik, 31 (1916), 197–208.
  4. 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