Let $f\left(x\right)=\begin{cases} 1,& \text{if } 0<x<\pi\\ 0, & \text{if } \pi<x<2\pi \end{cases}$
$f\left(x+2\pi\right)=f\left(x\right)$
I have worked out that $a_{0}=\dfrac{1}{2}$ and that $a_{n}=0$.
For $b_{n}$, I so far know that $b_{n}=\dfrac{1}{\pi}\int^{\pi}_{-\pi} f\left(x\right)\sin(nx) dx$ however I am not sure where to go from here?
Use the definition of $f$: $$b_n=\frac1\pi \int_0^\pi \sin(nx) dx=\frac1{\pi n}(1-(-1)^n) $$