What's the fourier series for the function #f(x)= {2 , (0, Pi) and -2 , (-Pi ,0)} # ?

1 Answer
Feb 14, 2018

#f(x) = 8/pi sum_(n=0)^oo sin((2n+1)x)/(2n+1)#

Explanation:

As the function is odd, the series will be in the form:

#f(x) = sum_(n=1)^oo b_k sin kx#

where:

#b_k = 1/pi int_-pi^pi f(x)sinkxdx#

#b_k = 1/pi (int_-pi^0 f(x)sinkxdx + int_0^pi f(x)sinkxdx)#

#b_k = 1/pi (-int_-pi^0 2sinkxdx + int_0^pi 2sinkxdx)#

#b_k = 2/pi (-int_-pi^0 sinkxdx + int_0^pi sinkxdx)#

Now substitute #t=-x# in the first integral:

#int_-pi^0 sinkxdx = int_pi^0 sin(-kt)d(-t) = - int_0^pi sinkt dt#

so:

#b_k = 4/pi int_0^pi sinkxdx#

#b_k = 4/(kpi) int_0^pi sinkx d(kx)#

#b_k = 4/(kpi) [ -coskx]_0^pi#

So. for #k# even we have #k=2n# and:

#b_(2n) = 2/(npi) (1-cos (2pin)) = 0#

while for #k# odd we have #k= 2n+1# and:

#b_(2n+1) = 4/((2n+1)pi) (1-cos (2pin+pi)) = 4/((2n+1)pi) (1-cos (pi)) = 8/((2n+1)pi)#

In conclusion:

#f(x) = 8/pi sum_(n=0)^oo sin((2n+1)x)/(2n+1)#