FourierSinSeries[Piecewise[{{1,4<x<5}}],x,n,FourierParameters->{1,Pi/10}]