Fourier Series Formula
The Fourier series formula gives an expansion of a periodic function f(x) in terms of an infinite sum of sines and cosines. It is used to decompose any periodic function or periodic signal into the sum of a set of simple oscillating functions, namely sines and cosines. Let us understand the Fourier series formula using solved examples.
What Are Fourier Series Formulas?
Fourier series makes use of the orthogonal relationships of the cosine and sine functions. Fourier series formula for a function is given as,
\(\large f(x)=\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx\)
where,
- \(a_0\) = \(\frac{1}{\pi} \int_{- \pi}^{\pi} f(x) dx\)
- \(a_n\) = \(\frac{1}{\pi} \int_{-\pi}^{\pi} f(x)cos\;nx\;dx\)
- \(b_n\) = \(\frac{1}{\pi} \int_{-\pi}^{\pi}f(x)sin\;nx\;dx\)
- n = 1, 2, 3…..
Let us have a look at a few solved examples on the Fourier series formula to understand the concept better.
Examples on Fourier Series Formulas
Example 1: Expand the function f(x) = ex in the interval [ – π , π ] using Fourier series formula.
Solution:
Applying the Fourier series formula, we know that f(x) = \(\dfrac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}cos\;nx+\sum_{n=1}^{\infty}b_{n}sin\;nx\)
\(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]\)
Thus f(x) = ex =\(\dfrac{e^\pi -e^{-\pi}}{2\pi} + \sum_{n=1}^{\infty}[(\dfrac{(-1)^n(e^\pi - e ^{-\pi})}{\pi(1+n^2)} cos nx + \dfrac{-n(-1)^n(e^\pi - e^{-\pi})}{\pi(1+n^2)} sin nx]\)
Answer:Thus, the Fourier series for f(x) = ex =
\(\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]\)
Example 2: Find the Fourier series for the square 2π-periodic wave defined on the interval [−π,π]:\({f\left( x \right) \text{ = }}\kern0pt {\begin{cases} 0, & \text{if} & – \pi \le x \le 0 \\ 1, & \text{if} & 0 < x \le \pi \end{cases}.}\)
Solution:
First we calculate the constant \(a_0\):
\({{a_0} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {f\left( x \right)dx} } = {\frac{1}{\pi }\int\limits_0^\pi {1dx} } = {\frac{1}{\pi } \cdot \pi }={ 1.}\)
Find now the Fourier coefficients for n≠0:
\({{a_n} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {f\left( x \right)\cos nxdx} } = {\frac{1}{\pi }\int\limits_0^\pi {1 \cdot \cos nxdx} } = {\frac{1}{\pi }\left[ {\left. {\left( {\frac{{\sin nx}}{n}} \right)} \right|_0^\pi } \right] } = {\frac{1}{{\pi n}} \cdot 0 }={ 0,}\)
\({{b_n} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {f\left( x \right)\sin nxdx} } = {\frac{1}{\pi }\int\limits_0^\pi {1 \cdot \sin nxdx} } \\ = {\frac{1}{\pi }\left[ {\left. {\left( { – \frac{{\cos nx}}{n}} \right)} \right|_0^\pi } \right] } = { – \frac{1}{{\pi n}} \cdot \left( {\cos n\pi – \cos 0} \right) } = {\frac{{1 – \cos n\pi }}{{\pi n}}.}\)
As cos nπ = (−1)n, we can write:
\({b_n} = \frac{{1 – {{\left( { – 1} \right)}^n}}}{{\pi n}}.\)
Answer:Thus, the Fourier series for the square wave is:
\({f\left( x \right) = \frac{1}{2} }+{ \sum\limits_{n = 1}^\infty {\frac{{1 – {{\left( { – 1} \right)}^n}}}{{\pi n}}\sin nx} .}\)
Example 3: What will be the fourier series of the function \(\mathrm{f}(\mathrm{x})=1-\mathrm{x}^{2}\) in the interval \([-1,1]\)?
Solution:
Given,
\(f(x)=1-x^{2} ;[-1,1]\)
We know that, the fourier series of the function \(f(x)\) in the interval \([-L, L]\), i.e. \(-L \leq x \leq L\) is written as:
\(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)\)
Here, \(A_{0}=\frac{1}{2 L} \cdot \int_{-L}^{L} f(x) d x\)
\(A_{n}=\frac{1}{1} \cdot \int_{-1}^{1} f(x) \cos \left(\frac{n \pi x}{1}\right) d x, \quad n>0\)
\(B_{n}=\frac{1}{1} \cdot \int_{-1}^{1} f(x) \sin \left(\frac{n \pi x}{1}\right) d x, \quad n>0\)
Now, by applying the formula for \(\mathrm{f}(\mathrm{x})\) in the interval \([-1,1]\) :
\(\mathrm{f}(\mathrm{x})=\frac{1}{2 \cdot 1} \cdot \int_{-1}^{1}\left(1-x^{2}\right) d x+\sum_{n=1}^{\infty} \frac{1}{1} \cdot \int_{-1}^{1}\left(1-x^{2}\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(1-x^{2}\right) \sin \left(\frac{n \pi x}{1}\right) d x \cdot \sin \left(\frac{n \pi x}{1}\right)\)
Now simplifying the definite integrals,
\(\begin{aligned}
&=\frac{1}{2 \cdot 1}\left(\frac{4}{3}\right)+\sum_{n=1}^{\infty} \frac{1}{1}\left(-\frac{4(-1)^{n}}{\pi^{2} n^{2}}\right) \cos \left(\frac{n \pi x}{1}\right)+\sum_{n=1}^{\infty} \frac{1}{1} \cdot 0 \cdot \sin \left(\frac{n \pi x}{1}\right) \\
&=\frac{2}{3}+\sum_{n=1}^{\infty}-\frac{4(-1)^{n} \cos (\pi n x)}{\pi^{2} n^{2}}
\end{aligned}\)
Answer: The Fourier series of the function \(\mathrm{f}(\mathrm{x})=1-\mathrm{x}^{2}\) in the interval \([-1,1]\) is \(\frac{2}{3}+\sum_{n=1}^{\infty}-\frac{4(-1)^{n} \cos (\pi n x)}{\pi^{2} n^{2}}\)
FAQs on Fourier Series Formulas
What Is Meant by the Fourier Series?
A Fourier series presents an expansion of a periodic function f(x) in terms of an infinite sum of sines and cosines. Fourier Series makes use of the orthogonality relationships of the sine and cosine functions.
What Is the Fourier Series Formula?
The fourier series formula of the function f(x) in the interval [-L, L], i.e. -L ≤ x ≤ L is given by:
f(x) = A_0 + ∑_{n = 1}^{∞} A_n cos(nπx/L) + ∑_{n = 1}^{∞} B_n sin(nπx/L)
What Is the Application of the Fourier Series Formula?
Fourier series describes a periodic signal in terms of cosine and sine waves. Thus, it models any arbitrary periodic signal with a combination of sines and cosines.
How To Solve a Fourier Series Using a Fourier Series Formula?
The steps for solving a Fourier series are given below:
Step 1: Multiply the given function by sine or cosine, then integrate
Step 2: Estimate for n=0, n=1, etc., to get the value of coefficients.
Step 3: Finally, substituting all the coefficients in the Fourier formula.
What Are the 2 Types of Fourier Series Formula?
The two types of Fourier series formulas are trigonometric series formula and exponential series formula.
visual curriculum