# Problem with integrating $\int_0^{\pi/2}\frac{\cos^6x}{\cos^6x+\sin^6x}dx$ [duplicate]

Someone told me there is an equation $$\int_0^{\pi/2}f(sinx)dx=\int_0^{\pi/2}f(cosx)dx$$ With this equation, it's easy to get the answer$$\frac{\pi}{4}$$. What I want to know is why we have this equation, and if there is an alternative way to integrate it?

• math.stackexchange.com/questions/439851/… May 18 '19 at 6:51
• In case it's still not clear why this equation is true, try substituting $x=\pi/2-t$. May 18 '19 at 12:00

That's because $$\int_a^b f(x)dx = \int_a^b f(a+b-x)dx$$.

• Why is sometimes called "King's Rule". May 18 '19 at 7:25

Because after using substitution $$x=\frac{\pi}{2}-t$$ we obtain: $$\int\limits_{0}^{\frac{\pi}{2}}\frac{\cos^6x-\sin^6x}{\cos^6x+\sin^6x}dx=\int\limits_{0}^{\frac{\pi}{4}}\frac{\cos^6x-\sin^6x}{\cos^6x+\sin^6x}dx+\int\limits_{\frac{\pi}{4}}^{\frac{\pi}{2}}\frac{\cos^6x-\sin^6x}{\cos^6x+\sin^6x}dx=$$ $$=\int\limits_{0}^{\frac{\pi}{4}}\frac{\cos^6x-\sin^6x}{\cos^6x+\sin^6x}dx+\int\limits_{\frac{\pi}{4}}^{0}\frac{\sin^6t-\cos^6t}{\sin^6t+\cos^6t}(-dt)=0.$$

We have a rule of definite integral

$$\int_0^a f(x) dx = \int _ 0^a f(a-x) dx$$

So by this rule

$$\int_0^{\pi/2} f(\sin x) dx = \int_0^{\pi/2} f(\sin ({\pi/2}-x)) dx = \int _ 0^{\pi/2} f(\cos x) dx$$

$$I=\int_0^{\pi/2}\frac{\cos^6x}{\cos^6x+\sin^6x}dx=\int_0^{\pi/2}\frac{\cos^6({\frac{\pi}{2}}-x)}{\cos^6({\frac{\pi}{2}}-x)+\sin^6({\frac{\pi}{2}}-x)x}dx =\int_0^{\pi/2}\frac{\sin^6x}{\sin^6x+\cos^6x}dx$$
$$2I=I+I=\int_0^{\pi/2}\frac{\cos^6x}{\cos^6x+\sin^6x}dx+\int_0^{\pi/2}\frac{\sin^6x}{\sin^6x+\cos^6x}dx=\int_0^{\pi/2}\frac{\sin^6x+\cos^6x}{\sin^6x+\cos^6x}dx=\frac{\pi}{2}$$
$$\implies 2I=\frac{\pi}{2}\implies I= \frac{\pi}{4}$$