The Fourier series of $f(x)=x$ in the interval $-2<x<2$ with $f(x+4)=f(x)$ is given by
$$f(x)=\frac{4}{\pi}\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{n}\sin\left(\frac{n\pi x}{2}\right)$$
The Fourier Convergence Theorem says that
$$\frac{4}{\pi}\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{n}\sin\left(\frac{n\pi x}{2}\right)= \begin{cases} f(x) & \text{for all $x$ where $f$ is continuous} \\ \frac{1}{2} & \text{for $x$ where $f$ is discontinuous} \end{cases}$$
How to show the above piece wise equality holds?
Here is the graphical representation of the original function $f(x)=x$ (green) and its Fourier series (red),

The Fourier Convergence Theorem
Theorem: Suppose $f$ and $f^{'}$ are piecewise continuous on the interval $−L \leq x \leq L$. Further, suppose that $f$ is defined elsewhere so that it is periodic with period $2L$. Then $f$ has a Fourier series whose coefficients are given by the Euler-Fourier formulas. The Fourier series converge to $f (x)$ at all points where $f$ is continuous, and to $$\frac{1}{2}\left[\lim_{x\rightarrow c^{-}} f(x)+\lim_{x\rightarrow c^{+}}f(x)\right]$$ at every point $c$ where $f$ is discontinuous.
Note that $f$ is continuous on $(-2,2)$ and $\lim_{x \uparrow 2} f(x) = 2$, $\lim_{x \downarrow 2} f(x) = -2$, so the series converges to $x$ for $x \in (-2,2)$ and converges to $0 $ for $x = \pm 2$.