Coefficient in the Fourier transformation for cosx

58 Views Asked by At

Problem statement: Suppose f(x) = cosx in the interval $\left[-\frac\pi2, \frac\pi2\right]$. Determine $a_0$ of the Fourier expansion of f(x).

What I think: Fourier expansion should be for a periodic function of $2\pi$. Fourier expansion for any function $f$ integrable between $\left(-\pi, \pi\right)$:

$$()=_0 + \sum_{n=1}^\infty a_n\cos(nx) + \sum_{n=1}^\infty b_n\sin(nx) $$

So, integrating both sides from $\left[-\frac\pi2, \frac\pi2\right]$. should give:

$$\int_{-\pi}^\pi f()dx=_0\int_{-\pi}^\pi dx + \sum_{n=1}^\infty \left(\int_{-\pi}^\pi a_n\cos(nx)\,dx + \int_{-\pi}^\pi b_n\sin(nx)\,dx\right) $$ Now, $$\int_{-\pi}^\pi a_n\cos(nx)\,dx = 0$$ $$\int_{-\pi}^\pi b_n\sin(nx)\,dx = 0$$ which gives: $$a_0 = \frac1 {2\pi} \int_{-\pi}^\pi f()\,dx$$

My doubt: What will change due to the given range $\left[-\frac\pi2, \frac\pi2\right]$? The above expansion is valid for $\left[-\pi, \pi\right]$, will the answer obtained from it hold true for the range $\left[-\frac\pi2, \frac\pi2\right]$ too?