Thanks!
Please see the documentation on FourierSeries, which has examples of how to do this:
http://reference.wolfram.com/language/ref/FourierSeries.html