Really challenging integral question My teacher gave me this question as a challenge:
$$
\int_{0}^{\pi/2}\frac1{1+\tan^a(x)}  \,dx
$$
It took me several days, but I did manage to solve this question using the King Property, by substituting $t=\frac{\pi}{2}-x$.
However, apparently there is an 'easier' way of doing this according to my teacher, which of you can represent the function in terms of $a$ (I am not even sure if I am saying this correctly) and show that the result will always be constant no matter what $a$ is. Essentially, if you can find an easier or simpler solution to this, I'd like to hear it. Thank you in advance.
I will put my own solution below.
 A: Use the substitution $t=\frac\pi2-x$
Hence $dx=-dt$
Substituting this into the question,
$$
\int_{\pi/2}^{0}\frac1{1+tan^a(\frac\pi2-t)}(-dt)=\int_{0}^{\pi/2}\frac1{1+tan^a(\frac\pi2-t)}dt
$$
Using the identity (can be proven using unit circle or addition formula)
$$
tan(\frac\pi2-\theta)=\frac1{tan\theta}
$$
We can simplify the integral further:
$$
\int_0^{\pi/2}\frac1{1+\frac1{tan^a(t)}}dt=\int_0^{\pi/2}\frac{tan^a(t)}{1+tan^a(t)}dt
$$
Using the same concept as polynomial division,
$$
\int_0^\frac\pi2(1-\frac1{1+tan^a(t)})dt=\int_0^\frac\pi2dt-\int_{0}^{\pi/2}\frac1{1+tan^a(t)}dt
$$
If we let the original integral to be $I$,
$$
I=[t]_0^{\pi/2}-I
$$
$$
2I=\frac\pi2
$$
Therefore
$$
I=\frac\pi4
$$
A: I'm not sure that this is really "easier" than the alternative, but if you let $$f(a)=\int_0^{\pi/2} \frac{dx}{1+(\tan x)^a}$$ then by differentiating under the integral with respect to $a$, we have $$f'(a)=-\int_0^{\pi/2} \frac{\tan^a x}{(1+\tan^a x)^2}\cdot \ln(\tan x) \cdot dx$$ Then, by substituting $x\mapsto \pi/2-x$, as in your answer, you can easily find that $f'(a)=-f'(a)$, since the term $\tfrac{\tan^a x}{(1+\tan^a x)^2}$ is unchanged by this transformation, but the term $\ln(\tan x)$ has its sign flipped. From this, we can conclude that $f'(a)=0$ everywhere, and therefore that $f(a)$ is a constant function of $a$, as stated in the question.
Is this the route you're looking for?
