The Fourier series for the function f(x) in the interval α < x < α + 2π is given by
\(f\left( x \right) = \frac{{{a_o}}}{2} + \mathop \sum \limits_{n = 1}^\infty {a_n}\cos nx + \mathop \sum \limits_{n = 1}^\infty {b_n}\sin nx\)
where
\({a_o} = \frac{1}{\pi }\mathop \smallint \limits_\alpha ^{\alpha + 2\pi } f\left( x \right)dx;\;{a_n} = \frac{1}{\pi }\mathop \smallint \limits_\alpha ^{\alpha + 2\pi } f\left( x \right)\cos nxdx;\;{b_n} = \frac{1}{\pi }\mathop \smallint \limits_\alpha ^{\alpha + 2\pi } f\left( x \right)\sin nxdx\)
An even function is any function f such that f(-x) = f(x)
Example: cos x, sec x, x2, x4, x6 …….., x-2, x-4 ……..
An odd function is any function f such that f(-x) = -f(x)
Example: sin x, tan x, cosec x, cot x, n, x3 ……., x-1, x-3 ……..
\(\mathop \smallint \limits_{ - L}^L f\left( x \right)dx = \left\{ {\begin{array}{*{20}{c}} {2\mathop \smallint \limits_0^L f\left( x \right)dx,\;\;when\;f\left( x \right)\;is\;an\;even\;function}\\ {0,\;\;when\;f\left( x \right)\;is\;an\;odd\;function} \end{array}} \right.\)
When f is an even periodic function of period 2L, then its Fourier series contains only cosine (include possibly, the constant term) terms.
\(f\left( x \right) = \frac{{{a_o}}}{2} + \mathop \sum \limits_{n = 1}^\infty {a_n}\frac{{\cos n\pi x}}{L}\)
\({a_o} = \frac{1}{L}\mathop \smallint \limits_{ - L}^L f\left( x \right)dx = \frac{2}{L}\mathop \smallint \limits_0^L f\left( x \right)dx\)
\({a_n} = \frac{1}{L}\mathop \smallint \limits_{ - L}^L f\left( x \right)\cos \frac{{n\pi x}}{L}dx = \frac{2}{L}\mathop \smallint \limits_0^L f\left( x \right)\cos \frac{{n\pi x}}{L}dx\)
When f is an odd periodic function of period 2L, then its Fourier series contains only sine terms.
\(f\left( x \right) = \mathop \sum \limits_{n = 1}^\infty {b_n}\sin \frac{{n\pi x}}{L}\)
\({b_n} = \frac{1}{L}\mathop \smallint \limits_{ - L}^L f\left( x \right)\sin \frac{{n\pi x}}{L}dx = \frac{2}{L}\mathop \smallint \limits_0^L f\left( x \right)\sin \frac{{n\pi x}}{L}dx\)