How to get a function if you have the Fourier coefficients So I have $$H(e^{i\omega})=\sum_{n=-\infty}^\infty C_ne^{i\omega n}$$ and I know that: $$C_n = \frac{2}{\pi n}\sin^2\left(\frac{\pi n}{2}\right)$$ How can I work out the function that this makes? I know I have to use $$C_n=\int_{-\pi}^{\pi}f(x)e^{-inx}dx$$ but I don't understand how to get the answer.  
 A: Hints:
1) use the identity

$$\sin x = \frac{e^{ix} -e^{ -ix} }{2i}$$

2) you need the geometric series

$$ \sum_{k=1}^{\infty} x^{k-1} = \frac{1}{1-x} \implies  \sum_{k=1}^{\infty} \frac{x^{k}}{k}=\ln(1-x). $$

Added: Here is a start. Notice that $C_0=0$ from the formula $C_n$ so we have
$$ S = \sum_{n=-\infty}^\infty C_n\,e^{i\omega n} = \sum_{n=-\infty}^{-1} C_n\,e^{i\omega n} + \sum_{n=1}^{\infty} C_n\,e^{i\omega n} =\sum_{n=1}^{\infty} C_{-n}e^{-i\omega n} + \sum_{n=1}^{\infty} C_n\,e^{i\omega n} $$

$$\implies S = -\sum_{n=1}^{\infty} C_{n}e^{-i\omega n} + \sum_{n=1}^{\infty} C_n\,e^{i\omega n} $$

since $C_{-n} =- C_n $. I think you can advance now.
A: The integral you have written down is for the computation of the $C_n \ (n\in{\mathbb Z})$ when a periodic function $f$ is given explicitly. But your problem is the converse: We have to sum a series to a "closed expression" $f$  when the $C_n \ (n\in{\mathbb Z})$ are given explicitly.
In the case at hand note that
$$\pi n\>C_n=2\sin^2{\pi n\over2}=1-\cos(\pi n)=\left\{\eqalign{&0\quad(n\ {\rm even}) \cr
&2\quad(n\ {\rm odd}) \cr}\right.\ .$$
It follows that the given series ($=:f(\omega)$) can be written as
$$f(\omega)={2\over\pi}\sum_{m=1}^\infty{1\over 2m-1}\left(e^{i\omega(2m-1)}-e^{-i\omega(2m-1)}\right)={4i\over\pi}\sum_{m=1}^\infty{1\over 2m-1}\sin\bigl((2m-1)\omega\bigr)\ .$$
Now it is well known (Gibb's phenomenon) that the $2\pi$-periodic jump function
$$J(t):={\pi -t\over2}\quad(0<t<2\pi),\quad J(t+2\pi)=J(t)\qquad(t\in{\mathbb R})$$
possesses the Fourier expansion
$$J(t)=\sum_{k=1}^\infty{\sin(k t)\over k}\ .\tag{1}$$
Since the Fourier expansion of $f$ contains the odd summands appearing in $(1)$ it follows that $f$ can be written in terms of $J$ as follows:
$$f(\omega)={4i\over\pi}\left(J(\omega)-{1\over2}J(2\omega)\right)\ .$$
It is not difficult to compose the graph of $f$ from the known graph of the periodic function $J$. The resulting $f$ is a very simple step function.
In order to check whether the $f$ found in this way actually has the given Fourier expansion, compute the Fourier coefficients of $f$ using your integral formula and check whether they coincide with the given $C_n$.
A: If your working with nice spaces then the following holds: $$f(x)=\int e^{2\pi ix\cdot \xi}\hat
f(\xi)\ d\xi.$$
This expresses the funcion $f$ in terms of its Fourier coefficients. Take a looked in any book dealing with Fourier analysis for the conditions for this to hold.
