0

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.

Math1000
  • 36,983
A1g
  • 13
  • 2
    This looks like a "do it for me" question. What have you tried? What part do you need help? – Alain Remillard Oct 18 '19 at 17:09
  • I am confused, this looks like a odd function to me hence i think i don't have to calculate a(0) and a(n) as they will be 0 and will only need to find b(n) using (π-x) is that correct assumption? – A1g Oct 18 '19 at 17:18
  • I assume this is a periodic function with period $2\pi$, that is, $f(x+2\pi)=f(x)$ for all $x\in\mathbb R$)? – Math1000 Oct 18 '19 at 18:40
  • Also, you are not correct in that this is an odd function. Certainly we do not have $f(-x)=-f(x)$ for all $x$. – Math1000 Oct 18 '19 at 18:43

1 Answers1

0

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. $$

Math1000
  • 36,983