Prove that for any continuous on $[0,1]$ the following equality holds: $$ \int_0^{\pi\over2}f(\sin x)\,dx = \int_0^{\pi\over2}f(\cos x)\,dx $$
I've basically used the King's rule, namely: $$ \int_a^b f(x)\,dx= \int_a^bf(a+b - x)\,dx $$ So: $$ \int_0^{\pi\over2}f(\sin x)\,dx = \int_0^{\pi\over2}f\left(\sin \left({\pi\over 2} - x\right)\right)\,dx $$ But: $$ \sin \left({\pi\over 2} - x\right) = \cos(x) $$ Thus: $$ \int_0^{\pi\over2}f\left(\sin \left({\pi\over 2} - x\right)\right)\,dx = \int_0^{\pi\over2}f(\cos x)\,dx $$
I get why we need $f(x)$ to be continuous, however, I don't really understand why we require $f(x)$ to be continuous specifically on the range $[0, 1]$. Could you please explain that?
If $0\le x\le \frac \pi 2$ then $0\le\cos x\le 1$ and $0\le \sin x \le 1.$