Ignoring the constant offset of , this gives an

We then apply the difference formula backward to get:

valid for integer values of , small compared to , but with . (To get the second form of the expression we plugged in and .)

This analysis doesn't give us the DC component , because we would have had to divide by . Instead, we can evaluate the DC term directly as the sum of all the points of the waveform: it's approximately zero by symmetry.

To get a Fourier series in terms of familiar real-valued sine and cosine functions,
we combine corresponding terms for negative and positive values of . The
first harmonic () is:

and similarly the th harmonic is

so the entire Fourier series is: