# Demonstration of Fourier Series using Python Code

FOURIER SERIES:

In mathematics, a Fourier series is a way to represent a wave-like function as the sum of simple sine waves. More formally, it decomposes any periodic function or periodic signal into the sum of a set of simple oscillating functions, namely sine and cosine with the harmonics of periods. So, Fourier series are used in the analysis of periodic functions.

Fourier Series:

where,

Here i used python programming tool instead of manual calculation to represent the Fourier
Series with some examples
.

PYTHON CODE:
import numpy as np
import matplotlib.pyplot as plt
resolution = 0.0001
x = np.arange(-np.pi,np.pi,resolution)
square =  np.array(x) ……
See more

OUTPUT WAVEFORM:

Python Output:
Output:
>>> a0
0.99998642294279794 (~1)
>>> b1
-0.63661977194539721 (-2/ π)
>>> b3
-0.21220658952264121 (-2/ 3 π)

## One Reply to “Demonstration of Fourier Series using Python Code”

1. Sanjeev says:

1) Naming consistency between A_n and a_n, B_n and b_n