Finding $E_4$ after minimizing $E_m$

17 Views Asked by At

When approximating an even function with period $2\pi$ by a Fourier-cosine-Series with $m$ terms, it has the error $$E_m=\int_{-\pi}^\pi \left[f(x)-\frac{a_0}{2}-\sum_{n=1}^m a_n \cos(nx)\right]^2 dx$$

Now I have to find the $a_n$'s which minimize this error. I got to the point where: $$a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx) dx$$

Now using a_n, E_m has to be minimized. Given that $$|\sin{x}|=\frac{2}{\pi}-\frac{4}{\pi}\sum_{n=1}^\infty\frac{\cos{2nx}}{4n^2-1}$$ for $$-\pi\leq x\leq\pi$$

I need to find $E_4$

I tried plugging in $a_n$ into $E_m$ but I don't know what $f(x)$ is.