If you define you make a periodic function.

The Fourier series shall be only of cosines since is even.

Thus, it would look like, where the coefficients are determined by formula.

If is a large number then will approximate .

Take something like and see how the curves approximate the function.