See next comment on fourier series:
Find the Fourier series of abs[x] \[f=\frac{a_0}{2}+\sum_{n=1}^{\infty}[a_ncos(nx)+b_nsin(nx)]\]\[a_0=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)dx\]\[a_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)cos(nx)dx\]\[b_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)sin(nx)dx\] I found:\[a_0=0\]\[b_n=0\] Since they are odd functions integrated on symmetric bounds. But for bn: \[b_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}|x|\cos(nx)dx=\frac{2}{\pi}(\frac{|x|}{n}\sin(nx)+\frac{1}{n^2}\cos(nx))|_{0}^{\pi}\] I got simplified to: \[\frac{2(-1)^n-2}{\pi n^2}\] So:\[\sum_{n=1}^{\infty}\frac{2(-1)^n-2}{\pi n^2}\cos(nx)\] But this is wrong, notice in attached plot the series is shifted down too far.
I solve it again.
Already saw my mistake hehe, \[a_0=\pi\]
I calculated it as pi then forgot thinking it was 0...
|dw:1341957910257:dw|
Join our real-time social learning platform and learn together with your friends!