Let $f\in C^{\infty}(\mathbb{R})$ be a periodic function of period $2L$. Define $$a_n=\dfrac{1}{2L}\int_{-L}^Lf(x)e^{-in\pi x/L}dx$$ Show by change of variables that $$f(x)=\sum_{n=-\infty}^\infty a_ne^{i\pi nx/L}$$
I'm quite confused about what "change of variables" refers to here.
Edit: Following mathematician's hint: the sum can be rearranged as
$$\dfrac{1}{2L}\sum_{n=-\infty}^\infty \left(\int_{-L}^Lf(y)e^{in\pi (x-y)/L}dy\right)$$
But what can we do next? How can we get that this above thing is equal to $f(x)$?
Start with $\sum_{-\infty}^\infty (\frac{1}{2L}\int_{-L}^L f(y)e^{-in\pi x/L} dy ) e^{i\pi nx/L}$ with the goal of showing this equals $f(x)$. The use of two different variables is necessary because the $y$ is being "integrated away" to get the constant $a_n$. Change of variables may be used once you move the infinite sum and $e^{i\pi nx/L}$ inside the integral (which you can do by linearity plus some convergence theorem e.g. the dominated cvgce theorem).