Source: http://mx.nthu.edu.tw/~cghsu/courses/bss/note2015/TT_FourierSeries.pdf