# Differentiation and Integration of Fourier Series

• ### Differentiation of Fourier Series

Let $$f\left( x \right)$$ be a $$2\pi$$-periodic piecewise continuous function defined on the closed interval $$\left[ { – \pi ,\pi } \right].$$ As we know, the Fourier series expansion of such a function exists and is given by

${f\left( x \right) = \frac{{{a_0}}}{2} }+{ \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos nx + {b_n}\sin nx} \right)} .}$

If the derivative $$f’\left( x \right)$$ of this function is also piecewise continuous and the function $$f\left( x \right)$$ satisfies the periodicity conditions

${f\left( { – \pi } \right) = f\left( \pi \right),\;\;\;}\kern-0.3pt{f’\left( { – \pi } \right) = f’\left( \pi \right),}$

then the Fourier series expansion of the derivative $$f’\left( x \right)$$ is expressed by the formula

${f’\left( x \right) \text{ = }}\kern0pt{ \sum\limits_{n = 1}^\infty {\left( {n{b_n}\cos nx – n{a_n}\sin nx} \right)} }.$

### Integration of Fourier Series

Let $$g\left( x \right)$$ be a $$2\pi$$-periodic piecewise continuous function on the interval $$\left[ { – \pi ,\pi } \right].$$ Then this function can be integrated term by term on this interval. The Fourier series for $$g\left( x \right)$$ is given by

${g\left( x \right) = \frac{{{a_0}}}{2} }+{ \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos nx + {b_n}\sin nx} \right)} .}$

Consider the function

${G\left( x \right) = \int\limits_0^x {g\left( t \right)dt} } \sim {\frac{{{A_0}}}{2} }+{ \sum\limits_{n = 1}^\infty {\left( {{A_n}\cos nx + {B_n}\sin nx} \right)}}$

where $${A_n} = – {\large\frac{{{b_n}}}{n}\normalsize},$$ $${B_n} = {\large\frac{{{a_n}}}{n}\normalsize}.$$

By setting $$x = 0,$$ we see that

${G\left( 0 \right) = 0 }={ \frac{{{A_0}}}{2} + \sum\limits_{n = 1}^\infty {{A_n}} }={ \frac{{{A_0}}}{2} – \sum\limits_{n = 1}^\infty {\frac{{{b_n}}}{n}} \;\;\text{or}\;\;}\kern-0.3pt {\frac{{{A_0}}}{2} = \sum\limits_{n = 1}^\infty {\frac{{{b_n}}}{n}} .}$

Hence, the Fourier series expansion of the function $$G\left( x \right)$$ is defined by

${G\left( x \right) = \int\limits_0^x {g\left( t \right)dt} } = {{\int\limits_0^x {\frac{{{a_0}}}{2}dx} \text{ + }}}\kern0pt{{ \sum\limits_{n = 1}^\infty {\int\limits_0^x {\left( {{a_n}\cos nx + {b_n}\sin nx} \right)dx} } }} = {{\frac{{{a_0}x}}{2} \text{ + }}\kern0pt{ \sum\limits_{n = 1}^\infty {\frac{{{a_n}\sin nx + {b_n}\left( {1 – \cos nx} \right)}}{n}}}}$

where the series on the right-hand side is obtained by the formal term-by-term integration of the Fourier series for $$g\left( x \right).$$

Because of the presence of the term depending on $$x$$ on the right-hand side, this is not clearly a Fourier series expansion of the integral of $$g\left( x \right).$$ The result can be rearranged to be a Fourier series expansion of the function

${\Phi \left( x \right) }={ \int\limits_0^x {g\left( t \right)dt} – \frac{{{a_0}x}}{2}.}$

The Fourier series of the function $$\Phi\left( x \right)$$ is given by the expression

${\Phi \left( x \right) = \int\limits_0^x {g\left( t \right)dt} – \frac{{{a_0}x}}{2} } = {\frac{{{A_0}}}{2} \text{ + }}\kern0pt{ \sum\limits_{n = 1}^\infty {\left( {{A_n}\cos nx + {B_n}\sin nx} \right)} ,}$

where the Fourier coefficients are defined by the relationships:

${\frac{{{A_0}}}{2} = \sum\limits_{n = 1}^\infty {\frac{{{b_n}}}{n}} ,\;\;\;}\kern0pt {{A_n} = – \frac{{{b_n}}}{n},\;\;\;}\kern0pt {{B_n} = \frac{{{a_n}}}{n}.}$

• ## Solved Problems

Click a problem to see the solution.

### Example 1

Find the Fourier series of the sign function
${f\left( x \right) = \text{sign}\,x }= {\begin{cases} -1, & -\pi \le x \le 0 \\ 1, & 0 \lt x \le \pi \end{cases},}$
knowing that the Fourier series expansion of the function $$F\left( x \right) = \left| x \right|$$ on the interval $$\left[ { – \pi ,\pi } \right]$$ is given by
${F\left( x \right) = \left| x \right| }={ \frac{\pi }{2} – \frac{4}{\pi }\sum\limits_{n = 0}^\infty {\frac{{\cos \left( {2n + 1} \right)x}}{{{{\left( {2n + 1} \right)}^2}}}}.\;}$

### Example 2

Find the Fourier series expansion of the function $$f\left( x \right) = {x^2}$$ knowing that
${x = 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{n}\sin nx} \;\;\;}\kern-0.3pt {\text{for}\; – \pi \le x \le \pi .}$

### Example 3

Find the Fourier series of the function $$f\left( x \right) = {x^3}$$ knowing that
${{x^2} = \frac{{{\pi ^2}}}{3} }+{ 4\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\cos nx} \;\;\;}\kern-0.3pt {\text{for}\; – \pi \le x \le \pi .}$

### Example 4

Investigate the process of differentiating term by term the Fourier series expansion of the function $$f\left( x \right) = x$$ defined on the interval $$\left[ { – \pi ,\pi } \right].$$

### Example 1.

Find the Fourier series of the sign function
${f\left( x \right) = \text{sign}\,x }= {\begin{cases} -1, & -\pi \le x \le 0 \\ 1, & 0 \lt x \le \pi \end{cases},}$
knowing that the Fourier series expansion of the function $$F\left( x \right) = \left| x \right|$$ on the interval $$\left[ { – \pi ,\pi } \right]$$ is given by
${F\left( x \right) = \left| x \right| }={ \frac{\pi }{2} – \frac{4}{\pi }\sum\limits_{n = 0}^\infty {\frac{{\cos \left( {2n + 1} \right)x}}{{{{\left( {2n + 1} \right)}^2}}}}.\;}$

Solution.

As $$f\left( x \right) = F’\left( x \right)$$ for all $$x \ne 0,$$ we obtain

${f\left( x \right) = \frac{d}{{dx}}\Big[ {\frac{\pi }{2} \text{ − }}}\kern0pt{{ \frac{4}{\pi }\sum\limits_{n = 0}^\infty {\frac{{\cos \left( {2n + 1} \right)x}}{{{{\left( {2n + 1} \right)}^2}}}} } \Big] }$

or

$f\left( x \right) = \frac{4}{\pi }\sum\limits_{n = 0}^\infty {\frac{{\sin\left( {2n + 1} \right)x}}{{2n + 1}}} .$

The graphs of the given function and its Fourier approximation are shown in Figure $$1.$$

### Example 2.

Find the Fourier series expansion of the function $$f\left( x \right) = {x^2}$$ knowing that
${x = 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{n}\sin nx} \;\;\;}\kern-0.3pt {\text{for}\; – \pi \le x \le \pi .}$

Solution.

As the function $$f\left( x \right)$$ is piecewise continuous on the interval $$\left[ { – \pi ,\pi } \right],$$ we may integrate its Fourier series term by term to obtain

${\int\limits_{ – \pi }^x {tdt} \text{ = }}\kern0pt{ 2\sum\limits_{n = 1}^\infty {\int\limits_{ – \pi }^x {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{n}\sin nt\,dt} } .}$

Consequently,

${\frac{{{x^2}}}{2} – \frac{{{\pi ^2}}}{2} \text{ = }}\kern0pt{ 2\sum\limits_{n = 1}^\infty {{{\left( { – 1} \right)}^{n + 1}}\left[ {\left. {\left( { – \frac{{\cos nt}}{{{n^2}}}} \right)} \right|_{ – \pi }^x } \right]} ,\;\;}\Rightarrow {{\frac{{{x^2}}}{2} – \frac{{{\pi ^2}}}{2} \text{ = }}}\kern0pt{{ 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\left[ {\cos nx }\right.}-{\left.{ \cos \left( { – \pi n} \right)} \right]} ,\;\;}}\Rightarrow {{\frac{{{x^2}}}{2} – \frac{{{\pi ^2}}}{2} }={ 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\cos nx} }}-{{ 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}{{\left( { – 1} \right)}^n}}}{{{n^2}}}} ,\;\;}}\Rightarrow {{\frac{{{x^2}}}{2} – \frac{{{\pi ^2}}}{2} }={ 2\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\cos nx} }}-{{ 2\sum\limits_{n = 1}^\infty {\frac{1}{{{n^2}}}} .}}$

We know from Example $$1$$ on the page Bessel’s Inequality and Parseval’s Theorem that $$\zeta \left( 2 \right) = \sum\limits_{n = 1}^\infty {\large\frac{1}{{{n^2}}}\normalsize}$$ $$= {\large\frac{{{\pi ^2}}}{6}\normalsize}.$$ Then we get

${{x^2} – {\pi ^2} }={ 4\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\cos nx} }-{ \frac{{2{\pi ^2}}}{3}}$

or

${{x^2} = \frac{{{\pi ^2}}}{3} }+{ 4\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^n}}}{{{n^2}}}\cos nx} .}$

Page 1
Problems 1-2
Page 2
Problems 3-4