Skip to content
Related Articles

Related Articles

Fourier Series Formula

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 13 May, 2022

A Fourier series is a sum of sine and cosine waves that represents a periodic function. Each wave in the sum, or harmonic, has a frequency that is an integer multiple of the periodic function’s fundamental frequency. Harmonic analysis may be used to identify the phase and amplitude of each harmonic. A Fourier series might have an unlimited number of harmonics. Summing some, but not all, of the harmonics in a function’s Fourier series, yields an approximation to that function. For example, a square wave can be approximated by utilizing the first few harmonics of the Fourier series.

Fourier Series

As seen above, Periodic functions often appear in problems in higher mathematics. A way of dealing with these issues is to represent them in terms of basic periodic functions, which have a small range and can have a domain of all real numbers, such as sine and cosine; this leads us to the Fourier series (FS). The Fourier series is a particularly useful tool for dealing with situations involving partial differential equations. 

Suppose we are given a periodic function f(x). Now as the original  function is periodic therefore,

c1​f1​(x) + … + cn​fn​(x)​

Next consider the infinite series,

\begin{array}{l}\frac{1}{2} a_{o}+ \sum_{ n=1}^{\infty}a_{n}\;cos\frac{n\pi x}{L}+b_{n}\; sin\frac{n\pi x}{L}\end{array} ⇢ (1)

Consisting of 2L-periodic functions converges for all x, then the function to which it converges will be periodic of period 2L. Now as seen above we need to represent the function f(x) in such a way that the periodic function f(x) is replaced by functions like sine and cosine. For this the Fourier series is given by,

\large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx 

Here,

\frac{1}{\pi} \int_{- \pi}^{\pi} f(x) dx 

\frac{1}{\pi} \int_{-\pi}^{\pi} f(x)cos\;nx\;dx .

\frac{1}{\pi} \int_{-\pi}^{\pi}f(x)sin\;nx\;dx .

n = 1,2,3….
   

General form of Fourier Series

For any function f(x) with period 2L, the Fourier series is given as,

f(x)=\begin{array}{l}\frac{1}{2} a_{o}+ \sum_{ n=1}^{\infty}a_{n}\;cos\frac{n\pi x}{L}+b_{n}\; sin\frac{n\pi x}{L}\end{array}   .

Exponential form of Fourier Series

From the equation above,

f(x)=\begin{array}{l}\frac{1}{2} a_{o}+ \sum_{ n=1}^{\infty}a_{n}\;cos\frac{n\pi x}{L}+b_{n}\; sin\frac{n\pi x}{L}\end{array}   .

Now according to Euler’s formula,

e= cosθ +isinθ

Using this

f(x) = \sum_{n=-\infty}^{\infty}   Cneinx.

Here Cn is called decomposition coefficient and is calculated as,

C_n = \frac{1}{2T} \int_{-T}^{T}e^{{-in}\frac{\pi t}{T} }f(t) .

Conditions for Fourier series

Suppose a function f(x) has a period of 2π and is integrable in a period [-π, π]. Now there are two conditions.

The function f(x) with period 2π is absolutely integrable on [-π, π] so that the following Dirichlet integral of this function is finite:
\int\limits_{ - \pi }^\pi  {\left| {f\left( x \right)} \right|dx}  \lt \infty ;

Next condition is that the function is a single valued, piecewise continuous (must have a finite number of jump discontinuities), and piecewise monotonic (must have a finite number of maxima and minima).

If conditions 1 and 2 are satisfied, the Fourier series for the function exists and converges to the given function. This means that the sum of the Fourier series of any given function converges back to give the same function. This is the basic definition of the Fourier series expansion. Before further understanding the concept of the Fourier Series we should first understand the concept of odd and even functions and periodic functions.

  • Odd function: Suppose we are given a function y = f(x).   

Now if,

f(-x) = -f(x) = -y

then the function is said to be odd.

The function is odd in nature and symmetric about the origin

  • Even function: Again consider a function f(x) = y.

If f(-x) = f(x) = y

Then the function is even in nature.

This is an even function whose graph that is symmetric along the y-axis.

  • Periodic functions: Let a function f(x) be periodic with an interval λ. Now consider an element x as a part of the domain of this function. This means that,

f(x) = f(x + λ).

The graph of function tanx is an example of a periodic function.

Hence periodic functions are those functions that repeat themselves over an interval of values(λ as shown above). The smallest possible positive value of λ is called the period of this function.

Fourier Series

Sample problems

Question 1: Find the Fourier series expansion of the function f(x) = ex, within the limits  [– π, π].

Solution:

Using Fourier series expansion.

a_0 =  \dfrac{1}{2\pi}\int_{- \pi}^{\pi}e^x dx \\= \dfrac{e^\pi - e^{-\pi}}{2\pi} .

a_n = \dfrac{1}{\pi}\int_{- \pi}^{\pi}e^x cos (nx) dx \\= \dfrac{1}{\pi}\dfrac{e^x}{1+n^2}[\cos(nx)+ n\sin(nx)]_{-\pi}^{\pi}\\= \dfrac{1}{\pi(1+n^2)}[e^\pi(-1)^n)-e^{-\pi}(-1)^n)] .

b_n = \dfrac{1}{\pi}\int e^x sin(nx) dx \\= \dfrac{e^x}{\pi (1+n^2)}[\sin(nx)- n \cos(nx)]_{-\pi}^{\pi}\\= \dfrac{1}{\pi (1+n^2)}[e^\pi(-n(-1)^n) - e^{-\pi}(-n)(-1)^n] .

The Fourier series for this function is given as, 

\dfrac{e^\pi -e^{-\pi}}{2\pi} + \sum_{n=1}^{\infty}\dfrac{(-1)^n(e^\pi - e^{-\pi})}{\pi(1+n^2)}[cos nx -n sin nx] .

Question 2: Find the Fourier series expansion of the function f(x) = x , within the limits  [– 1, 1].

Solution:

From Fourier series expansion. Here,

A_{0}=\frac{1}{2 } \cdot \int_{-1}^{1} x d x .

A_{n}=\frac{1}{1} \cdot \int_{-1}^{1} x \cos \left(\frac{n \pi x}{1}\right) d x, \quad n>0 .

B_{n}=\frac{1}{1} \cdot \int_{-1}^{1} x \sin \left(\frac{n \pi x}{1}\right) d x, \quad n>0 .

f(x)=A_{0}+\sum_{n=1}^{\infty} A_{n} \cdot \cos \left(\frac{n \pi x}{L}\right)+\sum_{n=1}^{\infty} B_{n} \cdot \sin \left(\frac{n \pi x}{L}\right) .

\mathrm{f}(\mathrm{x})=\frac{1}{2 \cdot 1} \cdot \int_{-1}^{1}\left(x\right) d x+\sum_{n=1}^{\infty} \frac{1}{1} \cdot \int_{-1}^{1}\left(x\right) \cos \left(\frac{n \pi x}{1}\right) d x \cdot \cos \left(\frac{n \pi x}{1}\right)+\sum_{n=1}^{\infty} \frac{1}{1} \cdot \int_{-1}^{1}\left(x\right) \sin \left(\frac{n \pi x}{1}\right) d x \cdot \sin \left(\frac{n \pi x}{1}\right) .

Om solving the integrals we get even functions and one odd function. Therefore,

f(x) = \sum _{n=1}^{\infty \:}-\frac{2\left(-1\right)^n\sin \left(\pi nx\right)}{\pi n}.

Question 3: Suppose a function f(x) = tanx find its Fourier expansion within the limits [-π, π].

Solution:

 a_0 =  \dfrac{1}{\pi}\int_{- \pi}^{\pi} tanx dx

a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} tanx cosnxdx    

b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} tanx sinnxdx    

\large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx      

Now the integral of tanx⋅sinnx and tanx⋅cosnx cannot be found.

Therefore the Fourier series for this function f(x) = tanx is undefined.

Question 4: Find the Fourier series of the function f(x) = 1 for limits  [– π, π] .

Solution:

Comparing with general Fourier series expansion we get,

 a_0 =  \dfrac{1}{\pi}\int_{- \pi}^{\pi}1  dx    

a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 1 \cdot cosnxdx    

b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 1 \cdot sinnxdx .\\ \large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx     

f(x) = π + 0 + 0

f(x) = π

Question 5: Consider a function f(x) = x2 for the limits  [– π, π]. Find its Fourier series expansion.

Solution:

Comparing with general Fourier series expansion we get,

 a_0 =  \dfrac{1}{\pi}\int_{- \pi}^{\pi}x^2  dx . \\ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \cdot cosnxdx . \\ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \cdot sinnxdx . \\ \large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx \\ f(x) = \frac{{\pi}^{3}}{3} + \sum_{n=1}^{\infty}a_{n}cos\;nx +0 .\\ f(x) =  \frac{{\pi}^{3}}{3} + \sum_{n=1}^{\infty} \frac{4πcosnπcosnx}{n2}.

Question 6: Find Fourier series expansion of the function f(x) = 4-3x for the limits  [– 1, 1].

Solution:

Comparing with general Fourier series expansion we get,

a_0 =  \dfrac{1}{\pi}\int_{- \pi}^{\pi}4-3x  dx . \\ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 4-3x \cdot cosnxdx . \\ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 4 -3x\cdot sinnxdx .\\ \large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx .\\ f(x) =\frac{1}{2\cdot \:1}\cdot \:8+\sum _{n=1}^{\infty \:}\frac{1}{1}\cdot \:0\cdot \cos \left(\frac{n\pi x}{1}\right)+\sum _{n=1}^{\infty \:}\frac{1}{1}\left(\frac{6\left(-1\right)^n}{\pi n}\right)\sin \left(\frac{n\pi x}{1}\right).\\ f(x) = 4+\sum _{n=1}^{\infty \:}\frac{6\left(-1\right)^n\sin \left(\pi nx\right)}{\pi n} .

Question 7: Find the expansion of the function 1- \frac{x}{\pi}. For the limits  [– π, π].

Solution:

Comparing with general Fourier series expansion we get,

a_0 =  \dfrac{1}{\pi}\int_{- \pi}^{\pi}4-3x  dx .\\ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 4-3x \cdot cosnxdx .\\ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 4 -3x\cdot sinnxdx .\\ f(x) = \frac{1}{2\pi }\cdot \int _{-\pi }^{\pi }\left(1-\frac{x}{\pi }\right)dx+\sum _{n=1}^{\infty \:}\frac{1}{\pi }\cdot \int _{-\pi }^{\pi }\left(1-\frac{x}{\pi }\right)\cos \left(\frac{n\pi x}{\pi }\right)dx\cdot \cos \left(\frac{n\pi x}{\pi }\right)+\sum _{n=1}^{\infty \:}\frac{1}{\pi }\cdot \int _{-\pi }^{\pi }\left(1-\frac{x}{\pi }\right)\sin \left(\frac{n\pi x}{\pi }\right)dx\cdot \sin \left(\frac{n\pi x}{\pi }\right) .\\ f(x) = =\frac{1}{2\pi }\cdot \:2\pi +\sum _{n=1}^{\infty \:}\frac{1}{\pi }\cdot \:0\cdot \cos \left(\frac{n\pi x}{\pi }\right)+\sum _{n=1}^{\infty \:}\frac{1}{\pi }\left(\frac{2\left(-1\right)^n}{n}\right)\sin \left(\frac{n\pi x}{\pi }\right).\\ f(x) = =1+\sum _{n=1}^{\infty \:}\frac{2\left(-1\right)^n\sin \left(nx\right)}{\pi n} .


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!