The following animation shows the Fourier-approximation for k up to 6.
With frame
Fourier series
© J. Carstensen (Math for MS)