How do you find the Fourier series of $f(x) = x - [x]$, where $[x] = n \in Z$ s.t. $n \leq x < n+1$?
I am familiar with Fourier series and use the following definition to solve them:
$f(x) = \displaystyle\frac{a_{0}}{2} + \sum_{k=1}^{\infty}a_{n}\cos\left(\frac{n\pi x}{L}\right) + b_{n}\sin\left(\frac{n\pi x}{L}\right)$ where the interval is $[-L,L]$.
$a_{0} = \displaystyle\frac{1}{L}\int_{-L}^{L}f(x)dx$
$a_{n} = \displaystyle\frac{1}{L}\int_{-L}^{L}f(x)\cos\left(\frac{n\pi x}{L}\right)dx$
$b_{n} = \displaystyle\frac{1}{L}\int_{-L}^{L}f(x)\sin\left(\frac{n\pi x}{L}\right)dx$
In a similar manner, if the interval was from $[0,2L]$ the integrals would just run from $0$ to $2L$.
I am unsure how to set up my $a_{0}$, $a_{n}$, and $b_{n}$ for this specific question. I do not want the answer to the Fourier series. I can do that on my own. I just want to know what my $a_{0},a_{n},b_{n}$ would look like in terms of the way I defined them above.
The function $$f(x):=x-\lfloor x\rfloor={\rm fractional\ part\ of}\ x$$ is periodic with period $1$; whence $L={1\over2}$ in your notation. Furthermore it is allowed (also by you) to take the interval $[0,2L]$ as fundamental interval instead of $[{-L},L]$. But in the interval $[0,2L[=[0,1[\ $ the function $f$ is given by $$f(x)=x\qquad(0\leq x<1)\ .\tag{1}$$ Therefore you can just plug $(1)$ into your formulas, with integration running over $[0,1]$.
An inspection of the graph of $f$ shows that $x\mapsto f(x)-{1\over2}$ is an odd function. Therefore you will obtain $a_0=1$, and all $a_n$ with $n\geq1$ are zero.