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$.

  • $\begingroup$ 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$. $\endgroup$ Jan 23, 2013 at 0:36
  • $\begingroup$ 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)$ $\endgroup$
    – user51327
    Jan 23, 2013 at 0:52
  • 1
    $\begingroup$ The extension is discontinuous: $f(x)=\cos x$ on $(0,\pi]$, $f(0)=0$, $f(x)=-\cos x$ on $[-\pi,0)$. $\endgroup$ Jan 23, 2013 at 1:23

1 Answer 1


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. $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .