I'm working on the following problem for my PDE's class as study for a test.
Sketch the Fourier series of $$ f(x) = 2x^2$$ On the interval of $[-1,1]$.
My professors answer key states that the Fourier series for this function is $2x^2$ repeated over the interval $[-1,1]$ (I'd post the graph, but I'm not sure how.)
My understanding of the Fourier series is that for any function $f(x)$ is given by
$$ A_0 + \sum_{n=1}^\infty A_n \cos\bigg(\frac{n \pi x}{L} \bigg ) + \sum_{n=1}^\infty B_n \sin\bigg(\frac{n \pi x}{L} \bigg ) \tag{1}\label{1} $$
Where $$ A_0 = \frac{1}{2L} \int_{-L}^L f(x) dx$$ $$ A_n = \frac{1}{L} \int_{-L}^L f(x) \cos\bigg(\frac{n \pi x}{L} \bigg )dx$$ $$ B_n = \frac{1}{L} \int_{-L}^L f(x) \sin\bigg(\frac{n \pi x}{L} \bigg )dx$$
There are easier techniques to graphing the Fourier series of some function, but in attempting to solve this problem the hard way I find that
$$ A_0 = \frac{2}{3} $$ $$ A_n = \frac{8}{(n \pi)^2} (-1)^n $$ $$ B_n = 0 $$
When you plug these coefficients into $(\ref{1})$, you do not get $2x^2$ as my professor states.
I've worked this problem three times now and cannot seem to find my mistake. So my question, what are the correct coefficients for $f(x)$ along the interval $[-1,1]$?