Annual MIT Integration Bee - Year Change in Integral Problem $18$ in the Annual MIT Integration Bee cleverly uses the year $2017$  
$$\int_0^{\pi/2} \frac 1 {1+\tan^{2017} x} \, dx = \dfrac{\pi}{4}$$
There is a solution on MSE at MIT Integration Bee 2017 problem:$\int_0^{\pi/2}\frac 1 {1+\tan^{2017} x} \, dx$ : Need hints
My question is if it is possible to always get such a clean solution by modifying the year to the current year (each year) and by changing the limits of integration?
Can a general form be found to meet that criteria?
 A: If you follow through the linked solution the fact that the exponent is $2017$ is not used at all.  For any real $a$ we have $\int_0^{\pi/2} \frac 1{1+tan^a(x)}dx=\frac \pi 4$.  It does depend on the limits of integration being $0$ and $\frac \pi 2$ so the reflection works.
A: Substitute the following definition of $\tan x$ as the quotient of $\sin x$ and $\cos x$ into the integral. $$\tan x=\dfrac{\sin x}{\cos x}\implies I=\int_{0}^{\pi/2} \dfrac{\cos^{2017} x}{\sin^{2017} x + \cos^{2017} x} dx \tag1$$ Now use the reflective property of Integrals stated as follows $$\int_a^b f(x)dx =\int_a^b f(a+b-x) dx \tag2$$ to obtain the equivalent of $I$ as $$I=\int_0^{\pi/2} \dfrac{\sin^{2017} x}{\sin^{2017} x +\cos^{2017} x}dx \tag3$$ Add Equations $(1)$ and $(3)$ to get $2I=\int_{0}^{\pi/2} dx$ which gives you the value of $I$ as $\frac{\pi}{4}$.

My question is if it is possible to always get such a clean solution by modifying the year to the current year (each year) and by changing the limits of integration?

Sure, but here's some more neatness to this integral, you need not even change the limits of integration each year to get the ${\pi}/{4}$. In fact one might as well prove that the integral denoted $I_n=\int_{a}^{b} \frac{1}{1+\tan^n x} dx$ is independent of $n$.
In fact while setting an integral like this you might wanna experiment with the limits of integration to get even more elegant results. But for the reflective property i.e. equation $(2)$ to hold, the following needs to hold true: $a+b=\pi/2$
Exercise


*

*Evaluate $\int_{a}^{b} \frac{1}{1+\tan^n x} dx$ in terms of $a$ and $b$ where $a+b=\pi/2$.

*(Bonus) Judge whether $\int_{\pi/2-\pi^{e}}^{\pi^e} \frac{1}{1+\tan^n x} dx$ is negative or positive.

A: $$\int_0^{\pi/2} \frac 1 {1+\tan^{2017} x} \, dx = \dfrac{\pi}{4}$$
This uses the transformation
$$I=\int_a^bf(x) dx = \int_a^bf(a+b-x) dx$$
Then, when they are added, 
$$2I = \int_a^b1 dx=b-a$$
$$I=\frac{b-a}{2} \text{, as long as } a+b =\pi/2$$
As another example
$$\int_{\pi/6}^{\pi/3} \frac 1 {1+\tan^{2017} x} \, dx = \pi/12$$
Note that the year, or the power to which $\tan(x)$ is raised to, doesn't matter.
