6

I need to find the fourier series of $$|\sin x|$$.
Im not sure my way is right, would be happy if someone fix me. I found $$a_0=4/\pi$$, the function is even, so $$b_n=0$$ but how do I calculate: $$a_n=\int_{-\pi}^{\pi}(1/\pi)|\sin(x)|\cos(nx)dx$$

Thomas Andrews
  • 177,126
bar
  • 71

1 Answers1

14

The function $x\mapsto f(x):=|\sin x|$ is even and $\pi$-periodic; therefore $f$ has a Fourier series of the form $$f(x)={a_0\over2}+\sum_{k=1}^\infty a_k \cos(2kx)$$ with $$a_k={2\over\pi}\int_0^\pi f(x)\cos(2k x)\ dx={2\over\pi}\int_0^\pi \sin x\cos(2k x)\ dx\ .$$ It follows that $$\eqalign{a_k&={1\over\pi}\int_0^\pi\left(\sin\bigl((1+2k)x\bigr)+\sin\bigl((1-2k)x\bigr)\right)\ dx\cr &={1\over\pi}\left({\cos\bigl((2k-1)x\bigr)\over 2k-1}-{\cos\bigl((2k+1)x\bigr)\over 2k+1}\right)\Biggr|_0^\pi\cr &={2\over\pi}\left({1\over 2k+1}-{1\over 2k-1}\right)=-{4\over\pi(4k^2-1)}\cr}\ .$$ Therefore we have $$|\sin x|={2\over\pi}-{4\over\pi}\sum_{k=1}^\infty{\cos(2k x)\over 4k^2-1}\qquad(-\infty < x<\infty)\ .$$

  • Why does one get $2kx$ inside $\cos$ in the first $a_k$? – mavavilj Nov 04 '18 at 13:53
  • @mavavilj: Because the period length is not $2\pi$, but $\pi$. Use the formula for arbitrary period length $L$ with $L=\pi,$! – Christian Blatter Nov 04 '18 at 14:00
  • You mean put $L=\pi$ and then consider "well I need two of these"? https://www.math24.net/fourier-series-functions-arbitrary-period/. So multiply the entirety of what's inside $\cos$? – mavavilj Nov 04 '18 at 15:03
  • "In three books, the Fourier series coefficients are in different forms. I don't understand why they are equivalent." https://math.stackexchange.com/questions/2661597/fourier-coefficients-for-an-arbitrary-period-different-forms – mavavilj Nov 04 '18 at 15:14