Fourier Series of what appears to be a sawtooth series 
Find the Fourier series of

\begin{equation} 
f(x)=\begin{cases} x-[x] \quad &\text{if $x$ is not an integer} \\ \frac{1}{2} \quad &\text{if $x$ is an integer} \end{cases}
\end{equation}
I fail to see what interval I should integrate over in order to find its Fourier series. 
 A: Here's a picture:

from which we can see it is period 1. So just work the problem on $[0,1]$.

Edit/update: Since you want a full Fourier series, you want to work with a symmetric interval about the origin, say $-1<x<1$ here. The plot of $f(x)$ there would look like

Then, the (complex form) of the full Fourier series is given by
$$
\sum_{n=-\infty}^\infty c_n \exp(in\pi x) \quad\text{where}\quad
c_n={1\over 2}\int_{-1}^{1} f(x)\exp(-in\pi x)\,dx.
$$
Here's a plot taking the partial sum ranging over $n=-10$ to $n=10$ (red) along with the graph of $f(x)$ (black):

A: \begin{equation} 
f(x)=\begin{cases} x-[x] \quad &\text{if $x$ is not an integer} \\ \frac{1}{2} \quad &\text{if $x$ is an integer} \end{cases}
\end{equation}
The question doesn't seem to be so much about finding the Fourier series as about figuring out what this function looks like.  Let's try a few values:
$$
\begin{array}{c|c}
x & f(x) \\
\hline
0.1 & 0.1 \\
0.3 & 0.3 \\
0.5 & 0.5 \\
0.7 & 0.7 \\
0.9 & 0.9 \\
1.1 & 0.1 \\
1.3 & 0.3 \\
1.5 & 0.5 \\
1.7 & 0.7 \\
1.9 & 0.9 \\
2.1 & 0.1 \\
2.3 & 0.3 \\
2.5 & 0.5 \\
2.7 & 0.7 \\
2.9 & 0.9 \\
3.1 & 0.1 \\
3.3 & 0.3 \\
3.5 & 0.5 \\
3.7 & 0.7 \\
3.9 & 0.9
\end{array}
$$
There is a pattern here! You WILL see the pattern if you carefully graph these points.  Don't worry about Fourier series before you've seen this basic point.  Any putative attempt to think about the Fourier series of this function would be phoney if you haven't seen this simple pattern.
