Trying to compute the fourier series for $f(x)=|x|$ for $f$ on $[- \pi, \pi]$ using the trig method. I have a question as to the absolute value function.
I'm using the definition of absolute value where $|x|=x$ if $x \ge 0$, and $|x|=-x$ if $x <0 $. Therefore, $$a_0=\int_{-\pi}^{\pi}f(t) dt=\int_{-\pi}^0-t dt+\int_0^{\pi}tdt$$
I want to ask if this is the correct approach because I'm not getting the numerical series $\frac{\pi^4}{96}$ when I use the parseval identity so either I'm doing an arithmetic mistake with this tideous problem or my limits of integration are wrong therefore my $a_n$ and $b_n$ are wrong. Any help is greatly appreciated. Thank you.
