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$$
Asked
Active
Viewed 4.0k times
6

Thomas Andrews
- 177,126

bar
- 71
-
Please do pay attention to your typing before you post your question... – DonAntonio Oct 21 '13 at 18:28
-
Hint: $|\sin x|\cos (nx)$ is even, so this is twice the integral over $[0,\pi]$.. – Julien Oct 21 '13 at 18:33
-
Shouldn't it be $\frac{1}{2\pi}$? Also, I added $n$ to $\cos(nx)$ in the definition of $a_n$... – Thomas Andrews Oct 21 '13 at 18:34
-
@ThomasAndrews I saw in lecture 1/pi – bar Oct 21 '13 at 18:35
-
$\frac{1}{\pi}$ it is. – Julien Oct 21 '13 at 18:37
-
1@julien if its even I can make it 2*integral [0,pi]? – bar Oct 21 '13 at 18:37
-
Yes, exactly. Where $|\sin x|=\sin x$. – Julien Oct 21 '13 at 18:39
-
but how do I handle cos(nx)? never saw it before – bar Oct 21 '13 at 18:40
-
1$\sin a \cos b= $... – Julien Oct 21 '13 at 18:41
-
Doesn't that identity transpasses the problem from cosine to sines, @julien ? – DonAntonio Oct 21 '13 at 18:45
-
@DonAntonio It transforms the integrand (product of sine and cosine) into a sum of sines which have easy antiderivatives. – Julien Oct 21 '13 at 18:47
-
Oh, of course! I forgot what we were trying to do here. Nice. +1 – DonAntonio Oct 21 '13 at 18:48
1 Answers
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)\ .$$

Christian Blatter
- 226,825
-
-
@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