MIT Integration Bee 2017 problem:$\int_0^{\pi/2}\frac 1 {1+\tan^{2017} x} \, dx$ : Need hints [duplicate]

Try using $$\int_a^b f(x) \, dx = \int_a^b f(a+b-x) \, dx$$

and the fact that $\tan(\frac{\pi}{2}-x) = \cot(x)$ to convert to get the following: $$I = \int_0^{\pi / 2} \frac 1 {1+ \tan^{2017}(x)} \, dx = \int_0^{\pi / 2} \frac 1 {1+ \tan^{2017}(\pi/2-x)} \, dx \\ = \int_0^{\pi / 2} \frac 1 {1+ \cot^{2017}(x)} \, dx = \int_0^{\pi / 2} \frac{\tan^{2017}(x)}{1+ \tan^{2017}(x)} \, dx$$

Hence

$$2I = \int_{0}^{\pi / 2} dx = \frac{\pi}{2}$$


Setting the change of variable: $u=\frac\pi2-x $ and since, $\tan x =\cot(\frac\pi2 -x)$ we have, \begin{align} & \int_0^{\frac\pi2}\frac{1}{1+\tan^{2017} x} \, dx = \int_0^{\frac\pi2}\frac{1}{1+\tan^{2017} (\frac\pi2-u) } \, du \\[10pt] = {} & \int_0^{\frac\pi2}\frac{1}{1+\cot^{2017}u} \, du = \int_0^{\frac\pi2}\frac{\tan^{2017} u}{1+\tan^{2017} u} \, du \color{red}{= \frac{\pi}{2} -\int_0^{\frac\pi2}\frac{1}{1+\tan^{2017} u} \, du} \end{align}

That is $$\int_0^{\frac\pi2}\frac{1}{1+\tan^{2017} x} \, dx =\frac\pi4$$