Solutions

Homework 6

MTHE / MATH 335 — Winter 2026

Problem 1: Fourier Series

Problem 1Fourier Series

a) For some NNN \in \mathbb{N}, let xl2((N,(N1),,N1,N);C)x \in l_2\Big( (-N, -(N-1), \cdots, N-1, N); \mathbb{C} \Big) with

x(n)=1{nN1}x(n) = 1_{\{|n| \le N_1\}}

Find the Fourier series expansion of xx. Study the case with N1=NN_1 = N, and the case with N1=0N_1 = 0.

b) For some TR+T \in \mathbb{R}_+, let xL2([T2,T2];C)x \in L_2([-\frac{T}{2}, \frac{T}{2}]; \mathbb{C}) with

x(t)=1{tT1}x(t) = 1_{\{|t| \le T_1\}}

Find the Fourier series expansion of xx. Study the cases with (i) T1=T2T_1 = \frac{T}{2}, and (ii) the case where, with T1=12nT_1 = \frac{1}{2n}, we have

xn(t)=n1{t12n},x_n(t) = n1_{\{|t| \le \frac{1}{2n}\}},

as nn \to \infty.

Problem 2: Fourier Series

Problem 2Fourier Series

In l2({0,1,,N1};C)l_2\Big( \{0, 1, \ldots, N-1\}; \mathbb{C} \Big), we observed that the Fourier series

1Nei2πkNn,k{0,1,,N1},\frac{1}{\sqrt{N}} e^{i2\pi \frac{k}{N}n}, \quad k \in \{0, 1, \ldots, N-1\},

provides a complete orthonormal sequence, hence, provides a basis. Let xl2({0,1,,N1};C)x \in l_2\Big( \{0, 1, \ldots, N-1\}; \mathbb{C} \Big) be given as:

x(n)=2+3cos(4πNn)+cos(6πNn)+cos(6πNn+π2),x(n) = 2 + 3\cos\left(\frac{4\pi}{N}n\right) + \cos\left(\frac{6\pi}{N}n\right) + \cos\left(\frac{6\pi}{N}n + \frac{\pi}{2}\right),

for all nn.

What is the Fourier series expansion of xx?

Problem 3: Fourier Series

Problem 3Fourier Series

In class, we observed that in L2([P2,P2];C)L_2([-\frac{P}{2}, \frac{P}{2}]; \mathbb{C}), the sequence of signals

{1Pei2πkPt,kZ}\left\{ \frac{1}{\sqrt{P}} e^{i2\pi \frac{k}{P}t}, k \in \mathbb{Z} \right\}

provides a complete orthonormal sequence.

Let fL2([P2,P2];C)f \in L_2([-\frac{P}{2}, \frac{P}{2}]; \mathbb{C}) such that f(P2)=f(P2)f(-\frac{P}{2}) = f(\frac{P}{2}). Suppose ff is differentiable.

Find the Fourier expansion of g(t)=f(t)g(t) = f'(t) for t[P2,P2]t \in [-\frac{P}{2}, \frac{P}{2}] in terms of the Fourier series coefficients of ff.

Problem 4: Matlab Assignment

Problem 4Matlab Assignment

In this assignment, you are asked to generate (with the help of Matlab) the Fourier series expansion of the following function: xl2({N,(N1),1,0,1,,N1,N})x \in l_2(\{-N, -(N-1), \cdots -1, 0, 1, \ldots, N-1, N\}) where x(n)=1x(n) = 1 for nN1|n| \le N_1 and 00 elsewhere. That is

x(n)=1{nN1},NnNx(n) = 1_{\{|n| \le N_1\}}, \quad -N \le n \le N

with 1{.}1_{\{.\}} denoting the indicator function.

You are asked to obtain a representation of the form:

x~(n)=12N+1k=NNakeik(2π/(2N+1))n\tilde{x}(n) = \frac{1}{\sqrt{2N+1}} \sum_{k=-N}^{N} a_k e^{ik(2\pi/(2N+1))n}

where

ak=12N+1n=NNx(n)eik(2π/(2N+1))n.a_k = \frac{1}{\sqrt{2N+1}} \sum_{n=-N}^{N} x(n) e^{-ik(2\pi/(2N+1))n}.

By defining a FourSeries function, obtain the expansion coefficients with Matlab. Your function should take the signal as its input and generate the Fourier series coefficients as the output.

Now, let (N=2,N1=1)(N = 2, N_1 = 1); (N=20,N1=5)(N = 20, N_1 = 5); and (N=20,N1=20)(N = 20, N_1 = 20) and obtain x~(n)\tilde{x}(n) above for nZ,n[25,25]n \in \mathbb{Z}, n \in [-25, 25]. Plot the Fourier series coefficients for xx.

For N=20,N1=1N = 20, N_1 = 1, plot x~(n)\tilde{x}(n) for nZ,n[25,25]n \in \mathbb{Z}, n \in [-25, 25]. What is the relationship between x(n)x(n) and x~(n)\tilde{x}(n)?

Problem 5: Matlab and Fourier Series

Problem 5Matlab and Fourier Series

a) Let xL2([0,2];C)x \in L_2([0,2]; \mathbb{C}) be given by:

x(t)=1{t1}t+1{1t2}(1t)x(t) = 1_{\{t \le 1\}}t + 1_{\{1 \le t \le 2\}}(1 - t)

Let x^(k2)\hat{x}(\frac{k}{2}) denote the Fourier series coefficient corresponding to {12ei2πk2t,t[0,2]}\{\frac{1}{\sqrt{2}}e^{i2\pi \frac{k}{2}t}, t \in [0,2]\}.

With Matlab, generate the plot of the signal

xN(t)=k=NNx^(k2)12ei2πk2t,t[0,2]x_N(t) = \sum_{k=-N}^{N} \hat{x}\left(\frac{k}{2}\right) \frac{1}{\sqrt{2}} e^{i2\pi \frac{k}{2}t}, \quad t \in [0,2]

for N=5,10N = 5, 10 and 1515. Here x^(kP)\hat{x}(\frac{k}{P}) are the Fourier Series expansion coefficients.

Observe that, the signal looks more and more like the original signal as NN gets larger.

b) Prove that limN(x(t)xN(t))2dt=0\lim_{N \to \infty} \int (x(t) - x_N(t))^2 dt = 0.

Hint: Use the properties of Hilbert spaces and the fact that {1Pei2πkP}\{\frac{1}{\sqrt{P}}e^{i2\pi \frac{k}{P}}\} forms a complete orthonormal sequence. We had proved a related theorem in class in the context of Hilbert spaces. You could invoke this result directly in your argument.

c) Does for a general xL2([0,2];C)x \in L_2([0,2]; \mathbb{C}),

supt[0,2]x(t)xN(t)0,\sup_{t \in [0,2]} |x(t) - x_N(t)| \to 0,

as NN \to \infty? Explain your argument.

Problem 6: Fourier Transforms Summary

Problem 6Fourier Transforms Summary

Summarize the Fourier transformations DDFT (Discrete-to-Discrete), CDFT (Continuous-to-Discrete), DCFT (Discrete-to-Continuous), and CCFT (Continuous-to-Continuous) by explicitly stating the input and the output spaces.

Problem 7: CCFT Continuity

Problem 7CCFT Continuity

Follow your notes and study the theorem that CCFT is a continuous map from S\mathcal{S} to S\mathcal{S}.

Problem 8: CCFT is Unitary

Problem 8CCFT is Unitary

Show that CCFT is a unitary transformation from L2(R;C)L_2(\mathbb{R}; \mathbb{C}) to itself.

Hint: You may use the construction we discussed in class where the FCC\mathcal{F}_{CC} is first defined on S\mathcal{S} and then extended to L2(R;C)L_2(\mathbb{R}; \mathbb{C}).

Problem 9: The Fast Fourier Transform (FFT) Algorithm

Problem 9The Fast Fourier Transform (FFT) Algorithm

Describe the Fast Fourier Transform (FFT) Algorithm and explain why the computational complexity is reduced when compared with the usual Fourier Transform computations.