# Thread: Show the Fourier series of a function

1. ## Show the Fourier series of a function

Hello,

I can't solve the following problem involving the Fourier series of a function and need som guidance. I appriciate any suggestion. Thank you kindly.

2. The even function in $[-\pi,\pi]$ is...

$\displaystyle f(x)=\left\{\begin{array}{ll}2-x ,\,\,0 < x < 2\\{}\\0 ,\,\, 2 < x< \pi\end{array}\right.$ (1)

... and its cosine Fourier coefficients are...

$\displaystyle a_{n} = \frac{2}{\pi} \int_{0}^{2} (2-x)\ \cos nx \ dx =$

$\displaystyle = \frac{4}{\pi} |\frac{\sin n x }{n}|_{0}^{2} - \frac{2}{\pi} |\frac{n x \sin nx + \cos nx}{n^{2}}|_{0}^{2} =$

$\displaystyle = \frac{2}{\pi} \frac{1- \cos 2n}{n^{2}} = \frac{4}{\pi} \frac{\sin^{2} n}{n^{2}}$ (2)

Kind regards

$\chi$ $\sigma$

3. So when can the rule: odd function times an even function becomes zero, applies when solving for Fourier coefficients??

4. Originally Posted by 4Math
So when can the rule: odd function times an even function becomes zero, applies when solving for Fourier coefficients??
Please, can You explain with other words the question?...

Kind regards

$\chi$ $\sigma$

5. Originally Posted by chisigma
Please, can You explain with other words the question?...

Kind regards

$\chi$ $\sigma$
When solving for $a_{n}$ :

$\displaystyle a_{n} = \frac{2}{\pi} (({2}\int_{0}^{2} cos nx \ dx)-(\int_{0}^{2} x\ \cos nx \ dx))$

the second integral:

$-(\int_{0}^{2} x\ \cos nx \ dx)$

$x$ is an odd function and $cos nx$ is an even function. And the result of that is an odd function times an even function becomes zero.

Why can this not be applied here?

By the way, thank you kindly for your response.

6. Originally Posted by 4Math
When solving for $a_{n}$ :

$\displaystyle a_{n} = \frac{2}{\pi} (({2}\int_{0}^{2} cos nx \ dx)-(\int_{0}^{2} x\ \cos nx \ dx))$

the second integral:

$-(\int_{0}^{2} x\ \cos nx \ dx)$

$x$ is an odd function and $cos nx$ is an even function. And the result of that is an odd function times an even function becomes zero. Why can this not be applied here?...
Because the integral is from 0 to 2 and not from -a to +a...

Kind regards

$\chi$ $\sigma$