Now, Z L nπx
an = f (x) cos dx
−L L
is zero because the integrand is odd. As the function f (x) is odd and cos(nπx/L) is even,
the product f (x) cos(nπx/L) must be odd, and the integral of any odd function between
symmetric limits is always zero. We can show this mathematically as follows,
Z L nπx
an = f (x) cos dx,
−L L
Z 0 Z L
nπx nπx
= f (x) cos dx + f (x) cos dx,
−L L 0 L
nπ(−x0 )
Z 0 ! Z L
nπx
0
= f (−x ) cos (−dx0 ) + f (x) cos dx,
L L 0 L
(2)
where, in the second line we split the integration range, and in the third line we changed
variable from x to x0 = −x in the firstR integral on the right hand side. Now, f (−x0 ) = −f (x0 ),
0 RL
cos(nπ(−x )/L) = cos(nπx /L) and L ...dx = − 0 ...dx0 . Then
0 0 0
nπx0
!
Z L Z L
nπx
0 0
an = − f (x ) cos dx + f (x) cos dx,
0 L 0 L
= 0.
(3)
Clearly, Z L
ao = f (x)dx
−L
is also zero. To derive this result we could follow the same procedure as above, or again, we
can simply think about the symmetry of the integrand. Imagine plotting a graph of f (x)
against x. As f (x) is odd, the areas under the graph between −L ≤ x ≤ 0 and between
0 ≤ x ≤ L are equal and opposite.