Finding the reason behind the value of the integral.

I was just trying to find $$\int_{0}^{\pi / 2}\frac{\sin{9x}}{\sin{x}}\,dx $$ using an online integral calculator. And surprisingly I found that if I replace $9x$ by $ x,3x,5x$ which are some odd multiples of $x$ the value of integral came out to be $\dfrac \pi 2$.

I can't figure out the reason and would like to know why this is happening.


Edit: It can also be noted that $$\int_{a{\pi}}^{b\pi }\frac{\sin{9x}}{\sin{x}}\,dx =(b-a){\pi}$$ where $a,b$ are integers.


Hint

Consider $I(n)=\int_{0}^{\pi/2} \frac{\sin(nx)}{\sin x} dx$

$$I(2m+1)-I(2m-1)=\int_{0}^{\pi/2} \frac{\sin(2m+1)x-\sin(2m-1)x}{\sin{x}} dx=\int_{0}^{\pi/2} \frac{2\sin(x)\cos(2mx)}{\sin{x}} dx$$ $$\implies 2\int_{0}^{\pi/2} \cos(2mx)dx.......(1)$$ Now think what happens to this integral when $m$ is an integer. And also try to use the fact $I(1)=\frac{\pi}{2}$.

Edit (As OP has changed the question a bit)

Now consider$I(n)=\int_{a\pi}^{b\pi} \frac{\sin(nx)}{\sin x} dx$

From(1) $$\implies 2\int_{a\pi}^{b\pi} \cos(2mx)dx=2\bigg[\frac{\sin(2mx)}{2m}\bigg]_{a\pi}^{b\pi}$$ $$\implies I(2m+1)-I(2m-1)=\frac{1}{n} \bigg[\sin(2\pi bx)-\sin(2\pi ax)\bigg]=0$$ Provided ${a,b} \in \mathbb{Z} $ $$\implies I(2m+1)=I(2m-1)$$ Now As $I(1)=(b-a)\pi$

Hence

$$ \bbox[5px,border:2px solid blue] {\int_{a\pi}^{b\pi} \frac{\sin(nx)}{\sin x} dx=(b-a)\pi } $$ When n is odd.