In order to derive the coefficient c0, we take the integral of both sides of (2) over one period.

∫τf⁢(t)⁢𝑑t=

⁢∫τc0⁢𝑑t+∫τa1⁢cos⁡(ω1⁢t)⁢𝑑t+∫τa2⁢cos⁡(ω2⁢t)⁢𝑑t+…+∫τak⁢cos⁡(ωk⁢t)⁢𝑑t+…

+∫τb1⁢sin⁡(ω1⁢t)⁢𝑑t+∫τb2⁢sin⁡(ω2⁢t)⁢𝑑t+…+∫τbk⁢sin⁡(ωk⁢t)⁢𝑑t+…

where τ=[t0,t0+T]. After evaluating the above equation, all the integrals on the right side with a sine or a cosine term drop out (since the integral of a sine or cosine over one period is zero) and we get

∫τf⁢(t)⁢𝑑t=

⁢c0⁢∫τ𝑑t

⇒∫τf⁢(t)⁢𝑑t=

⁢c0⁢(T)

⇒c0=

⁢1T⁢∫τf⁢(t)⁢𝑑t=1T⁢∫t0t0+Tf⁢(t)⁢𝑑t

Now, in order to find ak, we multiply both sides of (2) by cos⁡(ωk⁢t) and we arrive at