Search Knowledge

© 2026 LIBREUNI PROJECT

Calculus & Analysis / Overview

Fourier Analysis

Fourier Analysis

Fourier Analysis allows us to decompose complex, periodic signals into a sum of simple sine and cosine waves.

Fourier Series

Any periodic function f(x)f(x) with period 2L2L can be represented as: f(x)=a02+n=1(ancosnπxL+bnsinnπxL)f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos\frac{n\pi x}{L} + b_n \sin\frac{n\pi x}{L} \right)

python
1import numpy as np
2 
3def square_wave_fourier(x, terms):
4 res = 0
5 for n in range(1, terms + 1, 2):
6 # f(x) = (4/pi) * summation sin(n*x)/n
7 res += (4 / np.pi) * (np.sin(n * x) / n)
8 return res
9 
10x_val = np.pi/2
11print(f"Square wave approx (5 terms) at pi/2: {square_wave_fourier(x_val, 5)}")
12print(f"Square wave approx (100 terms) at pi/2: {square_wave_fourier(x_val, 100)}")

The Fourier Transform

For non-periodic functions, the Fourier Transform f^(ξ)\hat{f}(\xi) maps a function from the time (or space) domain to the frequency domain: f^(ξ)=f(x)e2πixξdx\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i x \xi} dx

python
1import numpy as np
2 
3# Fast Fourier Transform (FFT)
4signal = np.array([1, 0, 1, 0, 1, 0, 1, 0])
5fft_res = np.fft.fft(signal)
6 
7print(f"Signal: {signal}")
8print(f"FFT Magnitudes: {np.abs(fft_res).round(2)}")
9print("The spike at index 4 represents the fundamental frequency of the oscillation.")

Parseval’s Theorem

Parseval’s Theorem states that the total energy of a signal in the time domain is equal to the total energy in the frequency domain: f(x)2dx=f^(ξ)2dξ\int |f(x)|^2 dx = \int |\hat{f}(\xi)|^2 d\xi

What happens to the Fourier coefficients as the function becomes smoother?

The Fourier Transform of a Gaussian is what type of function?