Question 366527
Given a function f(x) , we shall write the Fourier series of this.
There are series in complex exponential, sine or cosine. Let f(x) a function which is 2Pi periodic
 
{{{ f(x)=sum( a[n] cos(nx), n=0, +infinity ) }}} is the series in cosine, 
 
with {{{ a[n] = (1/pi) int( f(x)cos(nx), dx, 0, 2*pi )}}}
 
since cos(mx) and cos(nx) are orthogonal functions. 
 
 
 
Consider an even function like cos(x)^3, only cosine (even) terms will appear.
 
 
However without doing the integration, we can write cos(x) with complex numbers : cos(x) = (exp(ix)+exp(-ix))/2
 
then cos(x)^3 = 1/8*(exp(i3x)+3exp(ix)+3exp(-ix)+exp(-i3x))
 
= cos(3x)/4 + 3/4*cos(x)
  
 
 We can now show that this corresponds to the definition above :

  {{{a[1]=(2/pi) int( cos^3(x)cos(x), dx, 0, pi )= (2/pi)*(cos(x)^3sin(x)+3*int( sin(x)^2cos(x)^2, dx, 0, pi)) = (6/pi)*int(1-cos(x)^4, dx, 0, pi )  }}}

hence {{{ 8*a[1] = 6*pi/pi -> a[1] = 3/4 }}}
 
The same can be shown for : 
 
{{{ (1/pi) int( cos^3(x)cos(3x), dx, 0, 2*pi )= (1/pi)*(1/8)*2*pi = 1/4}}}
 
 
 
the similar calculation can be done with sin(x) = (exp(ix) - exp(-ix))/(2i)
 
sin(x)^3 = (exp(3ix) - 3exp(ix) + 3exp(-ix) - exp(-i3x))/(2i)^3
 
= (- sin(3x) + 3sin(x))/4