# [SOLVED] Fourier series help

• Nov 25th 2007, 06:14 AM
fdddd
[SOLVED] Fourier series help
Let f(x) = sin x for 0 < x < pi . Let a0 + summation from n = 1 to infinity an cosnx be the fourier cosine series which represents f(x) find the value of the coefficient a4.

when i attempted this question when integrating from -pi to pi f(x) cosnx, i treated f(x) to be 0 from x= -pi to 0 since its not defined. however, in the solution, they extended f(x) to be an even function on -pi to pi. why is it that they can do that?
• Nov 25th 2007, 07:12 AM
ThePerfectHacker
Quote:

Originally Posted by fdddd
Let f(x) = sin x for 0 < x < pi . Let a0 + summation from n = 1 to infinity an cosnx be the fourier cosine series which represents f(x) find the value of the coefficient a4.

when i attempted this question when integrating from -pi to pi f(x) cosnx, i treated f(x) to be 0 from x= -pi to 0 since its not defined. however, in the solution, they extended f(x) to be an even function on -pi to pi. why is it that they can do that?

You want to exand $\displaystyle \sin x$ as a cosine series on $\displaystyle (0,\pi)$. Extend $\displaystyle \sin x$ to $\displaystyle (-\pi, \pi)$ in an even manner. So $\displaystyle f(-x) = \sin x$ for $\displaystyle x\in (0,\pi)$. Then this will be a cosine series if exteneded periodically by $\displaystyle 2\pi$. The coefficients are:
$\displaystyle \pi a_0 = 2\int_0^{\pi}\sin x dx, \ \pi a_n = 2\int_0^{\pi}\sin x \cos nx dx, \ b_n = 0 \mbox{ for }n\geq 1$.