I've been told to construct a Fourier Series for the odd function that has period $2\pi$ and is equal to $\cos(x)$ for $x \in (0,\pi]$. For $f$ that is $2\pi$ period I have a formula
$$b_n=\int_{-\pi}^\pi f(x)\sin(nx) \, dx.$$
I don't know what this question is asking, I thought it wanted $f(x)=\cos(x)$ but when substituting in the equation, that would give an odd integrand so it would just be $0$.

-
First define $f(x) := \cos(x)$ for $x \in (0,\pi]$, then extend it to $[-\pi,0]$ in such a way that $f(x)$ is an odd function. Next extend it to a periodic function with period $2 \pi$. Now find the Fourier series of this $f$. – MichaelNgelo Jan 23 '13 at 0:36
This makes sense, but how would you extend $\cos(x)$ to $[-\pi,0]$ so that f(x) is an odd function since at $x=0$, $\cos(x)$ is not $0$? Don't odd functions have to pass through $(0,0)$ – user51327 Jan 23 '13 at 0:52
The extension is discontinuous: $f(x)=\cos x$ on $(0,\pi]$, $f(0)=0$, $f(x)=-\cos x$ on $[-\pi,0)$. – David Moews Jan 23 '13 at 1:23

Since $f(x)$ is odd and equals $\cos x$ on $(0,\pi]$, it equals $-\cos (-x)=-\cos x$ on $[-\pi,0)$. So, $$b_n:=\int_{-\pi}^\pi f(x) \sin nx \, dx$$ $$= \int_{-\pi}^0 (-\cos x) \sin nx \, dx + \int_{0}^\pi (\cos x) \sin nx \, dx.$$