I've stumbled across this integral: $$\int_{0}^{\pi/2} \left(\frac{\sin5x}{\sin x}\right)^2 \,dx $$
I was on a time limit and my intuition told me: $$\int_{0}^{\pi/2} \left(\frac{\sin5x}{\sin x}\right)^2 \,dx = \int_{0}^{\pi/2}5dx= 5x\Big|_0^{\pi/2}=\frac{5\pi}{2}$$
which turned out to be the right answer.
I'd like to know the correct way of integrating such a function. I've tried several techniques and all of them failed (just started integrals in my calc 1 class).
And is it just a coincidence that the first equality sign above hold or is there some explanation to it?