Lecture 9

More examples

The Exponential decay

f(t)={0,t<0eat,x0f(t) = \begin{cases} 0, t< 0\\ e^{-at}, x \geq 0 \end{cases}

The Fourier transform of ff is given by Ff(s)=0+eate2πistdt=12πis+a\mathcal Ff(s) = \int_{0}^{+\infty} e^{-at}e^{-2\pi i s t}dt = \frac{1}{2\pi i s + a}. Note that this is a complex valued function. The Fourier transform of the rect function and Λ are real valued because they are even functions.

The Gaussian

The Gaussian function is ex2e^{-x^2}.

It follows that the normalized Gaussian eπx2e^{-\pi x^2} has area 1. The normalized Gaussian satisfies the differential equation ddxf(x)=2πxf(x)\frac{d}{dx}f(x) = -2\pi x f(x) with initial value f(0)=1f(0) = 1. Note that this determines the function completely as a consequence of uniqueness theorem of ODE.

The Fourier transform of the Gaussian is itself. To see this, let f(x)=eπx2f(x) = e^{-\pi x^2} denote the Gaussian. Then ddsFf(s)=dds+eπx2e2πisxdx=+eπx2(2πix)e2πisxdx\frac{d}{ds}\mathcal Ff(s) = \frac{d}{ds}\int_{-\infty}^{+\infty}e^{-\pi x^2}e^{-2\pi i s x}dx = \int_{-\infty}^{+\infty}e^{-\pi x^2} (-2\pi ix)e^{-2\pi is x}dx. The change of integration and differentiatiation is justified in the appendix. Then using integration by parts it is equal to +e2πisxd(ieπx2)=+eπx2(2πs)e2πisxdx=2πsFf(s)\int_{-\infty}^{+\infty}e^{-2\pi i s x}d(ie^{-\pi x^2}) = -\int_{-\infty}^{+\infty}e^{-\pi x^2}(2\pi s)e^{-2\pi is x}dx = -2\pi s \mathcal Ff(s).

It follows that Ff\mathcal Ff satsifies the same differential equation as the Gaussian. Moreover, since Ff(0)=+eπx2dx=1\mathcal Ff(0) = \int_{-\infty}^{+\infty}e^{-\pi x^2}dx = 1, the initial value is also the same. Then one must has Ff(s)=eπs2\mathcal Ff(s) = e^{-\pi s^2}. To give an elementary proof of this result, we can consider the function Ff(s)eπs2\mathcal Ff(s)e^{\pi s^2} and show that its derivative is zero and conclude that it is equal to its value at 0, which is 1.

Basic properties of Fourier transform

Shifting theorem and scaling theorem

(1) Shifting theorem

F(f(x+h))(s)=Ff(s)e2πihs\mathcal{F}(f(x+h))(s) = \mathcal F f(s)e^{2\pi i h s}.

Proof. LHS = +f(x+h)e2πisxdx=+f(x)e2πis(xh)d(xh)=+f(x)e2πisxe2πihsdx=e2πishFf(s)\int_{-\infty}^{+\infty} f(x+h)e^{-2\pi i s x}dx = \int_{-\infty}^{+\infty}f(x')e^{-2\pi i s (x'-h)}d(x' - h) = \int_{-\infty}^{+\infty}f(x)e^{-2\pi i s x}e^{2\pi i hs}dx = e^{2\pi i s h}\mathcal F f(s) = RHS.

(2) (Ff)(s+h)=F(e2πishf(x))(s)(\mathcal F f) (s+h)=\mathcal F(e^{-2\pi i s h}f(x))(s) .

Proof. LHS = +e2πishf(x)e2πisxdx=+f(x)e2πi(s+h)xdx=(Ff)(s+h)\int_{-\infty}^{+\infty}e^{-2\pi i s h}f(x)e^{-2\pi i s x}dx = \int_{-\infty}^{+\infty}f(x)e^{-2\pi i (s+h)x}dx = (\mathcal Ff)(s+h).

(3) Scaling theorem

F(f(ax))=1a(Ff)(as)\mathcal F(f(ax)) = \frac{1}{|a|} (\mathcal Ff) (\frac{a}{s}).

Proof. LHS = +f(ax)e2πisxdx=+f(x)e2πisxad(xa)=1aFf(sa)\int_{-\infty}^{+\infty}f(ax)e^{-2\pi i s x}dx = \int_{-\infty}^{+\infty}f(x')e^{-2\pi i s \frac{x'}{a} }d(\frac{x'}{a}) = \frac{1}{a}\mathcal Ff(\frac{s}{a}). Note that this requires a>0a>0, otherwise we’ll get negative sign, so overall we get 1a\frac{1}{|a|}.

(4) Derivative theorem

F(f(x))(s)=2πisFf(s).\mathcal F(f'(x))(s) = 2\pi i s \mathcal Ff(s).
ddsFf(s)=F(2πixf(x))(s).\frac{d}{ds}Ff(s)=\mathcal F(-2\pi i xf(x))(s) .

In other words, the Fourier transform of “taking derivatives ddx\frac{d}{dx}” is “multiplying by 2πis2\pi i s”, the inverse Fourier transform of "taking derivatives dds\frac{d}{ds} " is “multiplying by -2\pi i x”.

Proof. LHS = +f(x)e2πixsdx=+e2πixsdf=+f(x)de2πixs=2πis+f(x)e2πixsdx=2πisFf(s)\int_{-\infty}^{+\infty}f'(x)e^{-2\pi i xs}dx = \int_{-\infty}^{+\infty}e^{-2\pi i x s}df = -\int_{-\infty}^{+\infty}f(x)de^{-2\pi i xs} = 2\pi i s \int_{-\infty}^{+\infty}f(x)e^{-2\pi i x s }dx = 2\pi i s\mathcal Ff(s).

Remark. We need some assumption to ensure the identity make sense.

(5) Convolution theorem

The Fourier transform of convolution is product:

F(fg)(s)=Ff(s)Fg(s).\mathcal F (f*g)(s) = \mathcal Ff(s)\mathcal Fg(s).

Proof. LHS = Rx(Ryf(xy)g(y)dy)e2πixsdx=Ryg(y)Rxf(xy)e2πi(xy)sd(xy)e2πiysdy=RyFf(s)g(y)e2πisydy=Ff(s)Fg(s)\int_{\mathbb{R_x}}(\int_{\mathbb{R}_y} f(x-y)g(y)dy) e^{-2\pi i x s}dx = \int_{\mathbb{R}_y}g(y)\int_{\mathbb{R}_x}f(x -y)e^{-2\pi i(x-y)s}d(x-y)e^{-2\pi i ys}dy = \int_{\mathbb{R}_y}\mathcal Ff(s)g(y)e^{-2\pi i s y}dy = \mathcal Ff(s)\mathcal Fg(s).

The Schwartz class

We didn’t state precisely the assumptions needed for above properties to hold. For example, in order for the derivative theorem to apply the function need to be differentiable, and for the second part of derivative theorem to work we need to assume xf(x)xf(x) is integrable,... etc. We seek for a class of functions such that

  • It is closed under Fourier transform and invesrse Fourier transform, with inversion theorem work.
  • All the properties makes sense without adding further assumptions. In particular, it should be closed under differentiation, multiplying by polynomials, and convolution.

In particular, any derivative is continuous and moderate decreasing. We call a function ff moderate decreasing if f(x)C1+x2|f(x)|\leq \frac{C}{1+x^2} for some constant C>0C> 0.

Appendix: some pictures

Plot the sinc function

x = var('x')
sinc(x)  = sin(pi * x)/(pi * x)
plot(sinc,x,-10,10)

Appendix: Integration on R\mathbb{R}

We use the word “function” to mean reasonable functions to work on in integration theory. They are assumed to be at least measurable.

The Dominated convergence theorem

Let fn(x)f_{n}(x) be a sequence of functions on R\mathbb{R} such that limnfn(x)\lim_{n\to \infty}f_n(x) exists almost everywhere (in our course we almost exclusively consider the case when the limit is everywhere). Suppose fn(x)F(x)|f_n(x)|\leq |F(x)| for some F(x)L1(R)F(x)\in L^1(\mathbb{R}), then

limnRfn(x)dx=Rlimnfn(x).\lim_{n\to \infty}\int_{\mathbb{R}}f_n(x)dx = \int_{\mathbb{R}} \lim_{n\to \infty}f_n(x).

The Fubini theorem

The Fubini theorem consisits of two parts:

Unsigned case

For positive functions all are the same. Let f(x,y)0f(x,y)\geq 0 on R2\mathbb{R}^2. Then R2fdm=RxRyf(x,y)dydx=RyRxf(x,y)dxdy\int_{\mathbb{R}^2}fdm = \int_{\mathbb{R}_x}\int_{\mathbb{R}_y}f(x,y)dy dx = \int_{\mathbb{R}_y}\int_{\mathbb{R}_x}f(x,y)dxdy. The equation holds in the sense that if one is , then all the others are .

Signed case

If f(x,y)L1(R2)f(x,y)\in L^1(\mathbb{R}^2), then RxRyf(x,y)dydx=RyRxf(x,y)dxdy\int_{\mathbb R_x} \int_{\mathbb{R}_y}f(x,y)dy dx = \int_{\mathbb{R}_y}\int_{\mathbb{R}_x}f(x,y)dxdy.

Differentiation under integral sign

The idea to take derivatives under integral sign is to reformulate the derivative of integral as a limit then try to apply the dominated convergence theorem. Suppose you have a family of functions f(x,t)f(x,t). Then ddtRf(x,t)dx=limh01hR(f(x,t+h)f(x,t))dx=limh0R1h(f(x,t+h)f(x,t))\frac{d}{dt}\int_{\mathbb{R}}f(x,t)dx = \lim_{h \to 0}\frac{1}{h}\int_{\mathbb{R}}(f(x,t+h) - f(x,t))dx = \lim_{h\to 0}\int_{\mathbb{R}}\frac{1}{h}\cdot (f(x,t+h) - f(x,t)). By dominate convergence theorem, a sufficient condition to take the limit inside integral is to show that there exists a function F(x)L1(R)F(x)\in L^1(\mathbb{R}), independent of hh, such that 1hf(x,t+h)f(x,t)F(x)\frac{1}{|h|}|f(x,t+h)-f(x,t)| \leq |F(x)|. This estimate is usually a consequence of the mean value theorem or Lipschitz condition.

Appendix: Use ChatGPT to visualize Fourier transforms

Simply let it do for you.

Me: Write a sagemath program to plot the Fourier transform of exponential decay e^(-a * x) for various a

ChatGPT: Here is a SageMath program that plots the Fourier transform of the exponential decay e^(-a * x) for various values of a:

python

import matplotlib.pyplot as plt
import numpy as np
from scipy.fft import fft

# Define the exponential decay function
def exponential_decay(x, a):
    return np.exp(-a * x)

# Define the range of x values
x = np.linspace(-10, 10, 1000)

# Set the values of a to use
a_values = [0.5, 1, 2, 3]

# Plot the Fourier transforms for each value of a
for a in a_values:
    y = exponential_decay(x, a)
    y_fft = np.abs(fft(y))
    plt.plot(x, y_fft, label=f"a = {a}")

plt.legend()
plt.xlabel("Frequency")
plt.ylabel("Amplitude")
plt.title("Fourier Transform of Exponential Decay")
plt.show()

This code uses the fft function from scipy.fft to compute the Fourier transform of the exponential decay function e^(-a * x) for each value of a in the list a_values. The results are plotted using matplotlib.pyplot, and the legend displays the value of a used for each plot.

Notice that the exponential decay defined by GPT is not correct. So I pointed out the error and also asked it to plot the exponential decays as well.

Me: Your exponential decay is not correct. It should be a piecewise function, which is equal to zero when x is negative and equal to exp(-a*x) when x is positive. plot your exponential decays as well

ChatGPT: Here’s an updated version of the code with the exponential decay functions plotted as well:

python

import matplotlib.pyplot as plt
import numpy as np
from scipy.fft import fft

# Define the exponential decay function
def exponential_decay(x, a):
    return np.exp(-a * x) * (x >= 0)

# Define the range of x values
x = np.linspace(-10, 10, 1000)

# Set the values of a to use
a_values = [0.5, 1, 2, 3]

fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(8, 10))

# Plot the exponential decays for each value of a
for a in a_values:
    y = exponential_decay(x, a)
    ax1.plot(x, y, label=f"a = {a}")

ax1.legend()
ax1.set_xlabel("x")
ax1.set_ylabel("Exponential Decay")
ax1.set_title("Exponential Decay Functions")

# Plot the Fourier transforms for each value of a
for a in a_values:
    y = exponential_decay(x, a)
    y_fft = np.abs(fft(y))
    ax2.plot(x, y_fft, label=f"a = {a}")

ax2.legend()
ax2.set_xlabel("Frequency")
ax2.set_ylabel("Amplitude")
ax2.set_title("Fourier Transform of Exponential Decay")

plt.tight_layout()
plt.show()

It seems that ChatGPT only knows fast Fourier transform so the picture does not look very nice compared with calculating the Fourier transform by hand and ask it to plot the Fourier transform. Then I asked it to plot the 1a2+4π2x2\frac{1}{a^2+4\pi^2x^2} that I calculated by hand.

Me: use sagemath to plot the graph of 1/(a^2+4pi^2*a^2) for a=0.5, 1, 2, 3

ChatGPT: Here is an example code to plot the graph of the function 1/(a^2 + 4 * pi^2 * x^2) in Sagemath for different values of a:


var("a x")
f(x) = 1 / (a^2 + 4 * pi^2 * x^2)

p = plot(f(x), (x, -10, 10), color='blue')

for i in [0.5, 1, 2, 3]:
    p += plot(f(x).subs(a=i), (x, -10, 10), color='red', linestyle='dotted')

p.show()

This code defines the function f(x) = 1 / (a^2 + 4 * pi^2 * x^2), and then plots it for x ranging from -10 to 10. The different values of a are plotted as dotted red lines on top of the original blue line. The resulting plot should show the behavior of the function for different values of a.

Unfortunately, the code still has bug. But it’s easy to fix as follows:

x =var("x")
p=plot(0)

for a in [0.5, 1, 2, 3]:
    f(x) = 1 / (a^2 + 4 * pi^2 * x^2)
    p+=plot(f(x), (x, -2, 2), color='red')

p.show()

Overall, the AI is pretty good. You can try to let chatGPT plot the powers sinca(x)\mathrm{sinc}^a(x) for large aa and also the Gaussian function eπx2e^{-\pi x^2}, what do you find and can you explain why?