Pure mathematics is much more than an armory of tools and techniques for the applied mathematician. On the other hand, the pure mathematician has ever been grateful to applied mathematics for stimulus and inspiration. From the vibrations of the violin string they have drawn enchanting harmonies of Fourier Series, and to study the triode valve they have invented a whole theory of non-linear oscillations.
George Frederick James Temple In 100 Years of Mathematics: a Personal Viewpoint (1981).
The Fourier Transform (FT) is an integral transform, a powerful mathematical tool to map a function from its original space representation into another function space (called, in this case, the Fourier space). In the time domain, the Fourier space is the frequency and in the Cartesian domain is the so-called reciprocal space. The FT is accomplished by integrating the given function in its original space. The advantage of the FT is that in the transformed space, the properties of the original function can usually be characterised and manipulated more quickly than in the original function space. The FT function can generally be mapped back to the original function space using the inverse FT.
The FT plays an important role in pure and applied science, computer science, electronic engineering, and medicine. In this lecture, I will shortly introduce the mathematics of the FT and then show some examples of practical applications.
The Fourier Integral of a Non-Periodic Function
The Fourier series of a periodic function with a period
can be approximated with the following trigonometric series
with
,
and
A non-periodic function can be considered as a periodic function in the limit of . Let now see what happen to the Forier series if we apply this definition.
The first term goes to zero as
First we need to define a new variable called that assume equidistant valules in the interval
of value
. Now we explicitly write the last terms in the Fourier series using the new variable
and
Per the limit of the sum become
Therefore, we have that
This formula is the Fourier integral of the function .
In addition, the Fourier Theorem assure that in the point of discontinuity , the function assumes the average value of the right and left limits to
, i.e.
Introducendo le due funzioni
The Fourier integral can be written as
The Fourier Integral in Complex Form
The Fourier integral can also be expressed in a more compact form using the complex exponential as
By substituting
we get the Fourier integral and a second integral
that is equal to zero as result of the integration of the odd function
Calculation of Fourier Transform Integral using Python
The Fourier integral is a fundamental concept in signal processing and mathematics. It allows us to analyze a complex, time-domain signal in terms of its frequency components. In this Python example, we will demonstrate how to compute the Fourier integral of a simple signal, the rectangular pulse function. The rectangular pulse function is a piecewise function that takes the value 1 within a certain time interval and 0 outside that interval. By applying the Fourier integral, we can decompose this function into its constituent sinusoidal frequencies.
import numpy as np
import matplotlib.pyplot as plt
def rectangular_pulse(t, T):
return np.where(np.abs(t) <= T / 2, 1, 0)
def fourier_integral(t, f_t):
N = len(t)
dt = t[1] - t[0]
omega = 2 * np.pi / (N * dt)
F_omega = np.fft.fft(f_t)
F_omega = np.fft.fftshift(F_omega)
frequencies = np.fft.fftfreq(N, dt)
frequencies = 2 * np.pi * frequencies
return frequencies, F_omega
# Parameters
T = 2 # Width of the rectangular pulse
duration = 10 # Total time duration
N = 1000 # Number of points
# Time values
t = np.linspace(-duration / 2, duration / 2, N, endpoint=False)
# Generate the rectangular pulse function
f_t = rectangular_pulse(t, T)
# Compute the Fourier integral
frequencies, F_omega = fourier_integral(t, f_t)
# Plot the results
plt.figure(figsize=(12, 6))
plt.subplot(2, 1, 1)
plt.plot(t, f_t, label='Rectangular Pulse')
plt.xlabel('Time')
plt.ylabel('f(t)')
plt.grid()
plt.legend()
plt.subplot(2, 1, 2)
plt.plot(frequencies, np.abs(F_omega), label='Fourier Integral')
plt.xlabel('Frequency (ω)')
plt.ylabel('|F(ω)|')
plt.grid()
plt.legend()
plt.tight_layout()
plt.show()
Description of the Python Program:
- Defining the Rectangular Pulse Function: We define a Python function
rectangular_pulse(t, T)to generate the rectangular pulse function. The function takes two arguments:tfor time andTfor the width of the pulse. It returns 1 when the time falls within the interval [-T/2, T/2] and 0 otherwise. - Computing the Fourier Integral: Another function,
fourier_integral(t, f_t), is defined to compute the Fourier integral of a given function. It uses the Fast Fourier Transform (FFT) algorithm to perform this calculation. The function takes the time valuestand the function valuesf_tas input. It calculates the frequencies and their corresponding amplitudes. - Setting Parameters: We set the following parameters for our example:
Trepresents the width of the rectangular pulse.durationis the total time duration we want to consider.Nis the number of data points to sample.
The program output is shown in the Figure below.

The upper panel shows the square pulse function. The bottom panel its Fourier Integral.
