Fourier Series of $f(x) = (π-x)\mathsf 1_{(0,\pi)}$

2.4k Views Asked by At

I need to determine the Fourier series of the following function,

$$ f(x) = \begin{cases} 0,& \text{ if $-\pi<x<0$}\\ \pi-x,& \text{ if $0<x<\pi$}. \end{cases} $$ Also how to plot it.

1

There are 1 best solutions below

0
On BEST ANSWER

Recall the expression for the Fourier series: $$ S(x) = \frac{a_0}2 + \sum_{n=1}^\infty a_n\cos(2\pi nx/L) + \sum_{n=1}^\infty b_n\sin(2\pi nx/L), $$ where $L$ is the period of the function (in this case $L=2\pi$. We compute the coefficients: $$ a_0 = \int_0^\pi (\pi-x)\ \mathsf dx = \frac{\pi^2}2 $$ $$ a_n = \int_0^\pi (\pi-x) \cos nx\ \mathsf ds = \frac{1-\cos \pi n}{n^2} $$ $$ b_n = \int_0^\pi (\pi-x) \sin nx\ \mathsf ds = \frac{\pi n - \sin \pi n}{n^2}, $$ and hence

$$ S(x) = \frac{\pi^2}4 + \sum_{n=1}^\infty \frac{1-\cos \pi n}{n^2}\cos nx + \sum_{n=1}^\infty\frac{\pi n - \sin \pi n}{n^2}\sin nx. $$