# [SOLVED] Fourier series help

• November 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?
• November 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 $\sin x$ as a cosine series on $(0,\pi)$. Extend $\sin x$ to $(-\pi, \pi)$ in an even manner. So $f(-x) = \sin x$ for $x\in (0,\pi)$. Then this will be a cosine series if exteneded periodically by $2\pi$. The coefficients are:
$\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$.