Given $$ f(x) = \begin{cases}x+1,&-1<x<0\\x,& 0<x<1\end{cases} $$ and $$ f(x+2)=f(x), $$
I am asked to find the formula for $f(x)$ in the intervals $1<x<2$ and $8<x<9$.
I made an attempt.
I got $a_0=1$, $a_n = 2/(n\pi)^2$, and $b_n=-2/(n\pi)$
I'm not sure if these are right, but they gave me: $$f(x)=1/2+\sum_{n=1}^{\infty}[2/(n\pi)^2\cos(n\pi x)-2/(n\pi)\sin(n\pi x)]$$ I don't know where to go from here.
The given solutions are:
$f(x)=x-1\quad in \quad 1<x<2$
$f(x)=x-8\quad in \quad 8<x<9$
Thanks for any help.