Let $\chi_{[a,b]}:[-\pi,\pi] \to \mathbb R$ be the indicator function for $-\pi < a < b <\pi$. I've managed to find that the Fourier series is:
$$ \frac{b-a}{2\pi}+\sum_{0 \neq n = -\infty}^{\infty}\frac{e^{-ina}-e^{-inb}}{2\pi in}e^{inx}$$
by finding the Fourier coefficients.
Now I'm struggling to prove this series is convergent for all $x \in [-\pi, \pi]$. I'm trying to use Dirichlet's test but I'm having trouble proving one of the criteria of the test:
Define $a_n = \frac{1}{2 \pi n}$ and $b_n=\frac{e^{-ina}-e^{-inb}}{ i}e^{inx}$.
Clearly $a_n$ is monotonically decreasing and converges to zero. So all it takes is to prove $|\sum b_n|$ is bounded. For all $N \in \mathbb N$ we have:
$$| \sum_{n=1}^{N}\frac{e^{-ina}-e^{-inb}}{i}e^{inx}|\leq| \sum_{n=1}^{N}e^{-ina}|+| \sum_{n=1}^{N}e^{-inb}|$$
And these two are geometric series' (which can be proven to be bounded). But if $a=0$ or $b=0$ then they sum up to $N$, which is not bounded. This is where I'm stuck and would appreciate any help.