I want to calculate the Fourier series for the $2\pi$ periodic function $f(x) = \sqrt{1 - \cos x}$ for $-\pi \leq x \leq \pi$
The Fourier series is given by: $$f(x) = \frac{a_{0}}{2} + \sum\limits_{n = 1}^{\infty}a_{n}\cos nx + \sum\limits_{n = 1}^{\infty}b_{n}\sin nx$$
Where:
$a_{0} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)dx$
$a_{n} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x) \cos nxdx$
$b_{n} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x) \sin nxdx$
I know how to go about these questions and have no problem with the integration.
My question is do we need to split up the integrals into $0 \leq x \leq \frac{\pi}{2}$ and $\frac{\pi}{2} \leq x \leq \pi$ to account for the graphs on each side of the origin? Or can we just compute directly from the equations I wrote above with $-\pi \leq x \leq \pi$? Also I don't think we would, but would you consider odd/even functions?
Any help on understanding what to do would be great thank you
$\cos x \le 1$, so $f(x)$ is well defined everywhere. You don't need to split it.
$f(x)$ is even, so $b_n=0$ for all $n$. You can thus also write:
$$a_0 = \frac{2}{\pi} \int_0^\pi f(x) \, dx$$
$$a_n = \frac{2}{\pi} \int_0^\pi f(x) \cos n x \, dx$$