g(x)=x odd and even expansions I'm studying book about digital filter by Richard Hamming. And there is exercise to get odd and even expansion of g(x)=x where x is from 0 to $\pi$. I understood even expansion, but can't get into odd expansion:
$\pi$ - $2$*(${\rm sin} x$ +  $\frac{1}{2}$${\rm sin} 2x$ + $\frac{1}{3}$${\rm sin} 3x$...)

Can anybody explain odd expansion of this function g(x)=x?

Thanks in advance.

UPDATE:
Let me be more clear. The exersise is: show that g(x) = x has two expansions (0 &lt; x &lt; $\pi$)

$x$ =$\begin{cases}\pi - 2*(\sin(x)+\sin(2x)/2+\sin(3x)/3+...)
\\\pi/2 - 4/\pi*(\cos(x)+\cos(3x)/3^2+\cos(5x)/5^2+...)\end{cases}$

I merely understand cosine expansion, but I don't understand sine expansion...
We want to find a representation in terms of sines and cosines for the function
$g(x)$ which has value $x$ for $x \in [0,\pi]$. We don't really care if this
representation does not work well outside the interval $[0,\pi]$, but 
inside the interval, the representation better work perfectly.  This seems
to be crying out for a Fourier series approach, and so that's what we will
use.  The standard approach begins with functions that are periodic with
period $2\pi$ and so let us extend the definition of $g(x)$ to cover
one period $[0,2\pi]$.  


If we choose $g(x)$ to have value $2\pi-x$ for
$x \in [\pi, 2\pi]$, then, when repeated periodically,
this extended $g(x)$ is an even function of $x$ with average value $\pi/2$.
Furthermore, as is the case with all even functions, the sine terms all 
have $0$ coefficients.  Thus, the Fourier series works out to 
have only cosines in it, and the DC term is $\pi/2$.
If we choose $g(x)$ to have value $x$ for $x \in [\pi, 2\pi]$, then
when repeated periodically,
this extended $g(x)$ is not an odd function of $x$, but nonetheless
it is true that all the cosine terms in the Fourier series
turn out to be $0$ except the DC term which has value $\pi$.