Verify that $\int_0^{\pi/2} f(\sin 2x)\cos x\mathrm dx=\int_0^{\pi/2}f(\cos^2 x)\cos x\mathrm dx$ 
Let $f\in C([0,1],\Bbb R)$. Verify that $\int_0^{\pi/2} f(\sin 2x)\cos x\mathrm dx=\int_0^{\pi/2}f(\cos^2 x)\cos x\mathrm dx$
Hint: observe $\int_{\pi/4}^{\pi/2}f(\sin 2x)\cos x\mathrm dx=\int_0^{\pi/4}f(\sin 2x)\sin x\mathrm dx$, and make the change of variable $\sin 2x=\cos^2 t$.

Im stuck in this exercise. Following the hint I did
$$\int_0^{\pi/2}f(\sin 2x)\cos x\mathrm dx=\int_0^{\pi/4}f(\sin 2x)(\sin x+\cos x)\mathrm dx$$
but I dont know how to continue from here. I get the identities
$$\sin x+\cos x=\sqrt 2\sin(x+\pi/4),\quad \mathrm dx=\sqrt{\frac{\cos^2 t}{1+\cos^2 t}}\mathrm dt$$
but I dont see how to transform $\sin x+\cos x$ to something related to the change of variable $\sin 2x=\cos^2 t$. Some help will be appreciated, thank you.
 A: I solved it. Observe that for $x\in[0,\pi/4]$ the function $\sin 2x$ is injective and positive, so the change of variable $\sin 2x=\cos^2 t$ is easy to handle in this interval and
$$\sin 2x=\cos^2 t\implies \sin 2x+1=(\cos x+\sin x)^2=\cos^2 t+1$$
then
$$\mathrm d(\cos x+\sin x)^2=2(\cos x+\sin x)(\cos x-\sin x)\mathrm dx=-2\cos t\sin t\mathrm dt=\mathrm d(\cos^2 t+1)$$
what implies that
$$-\frac{(\cos x+\sin x)(\cos x-\sin x)}{\sin t}\mathrm dx=\cos t\mathrm dt$$
Now observe that for $t\in[0,\pi/2]$ we have that $\sin t\ge 0$, hence
$$\begin{align}\frac{(\cos x+\sin x)(\cos x-\sin x)}{\sin t}&=\frac{(\cos x+\sin x)(\cos x-\sin x)}{\sqrt{1-(\cos t)^2}}\\&=\frac{(\cos x+\sin x)(\cos x-\sin x)}{\sqrt{1-\sin 2x}}\\&=\frac{(\cos x+\sin x)(\cos x-\sin x)}{\sqrt{\cos^2 x+\sin^2 x-\sin 2x}}\\&=\frac{(\cos x+\sin x)(\cos x-\sin x)}{|\cos x-\sin x|}\\&=\cos x+\sin x,\quad\text{for }x\in[0,\pi/4]\end{align}$$
Hence
$$(\cos x+\sin x)\mathrm dx=-\cos t\mathrm dt,\quad x\in[0,\pi/4], t\in[0,\pi/2]$$
Then making the substitution we finally have that
$$\int_0^{\pi/4}f(\sin 2x)(\cos x+\sin x)\mathrm dx=\int_{\pi/2}^0 f(\cos^2 x)(-\cos x)\mathrm dx=\int_0^{\pi/2} f(\cos^2 x)\cos x\mathrm dx$$
