I am trying to solve the integral:
$$I=\int_0^{\pi/2}\frac{1}{1+\tan^{n}x}dx$$
I have tried several methods shown below:
$$I(n)=\int_0^{\pi/2}\frac{1}{1+\tan^nx}dx$$$x=\arctan(u)$$$I(n)=\int_0^\infty\frac{1}{1+u^n}\frac{1}{1+u^2}du$$
but this does not seem to lead anywhere. I also tried:
$$I(a)=\int_0^{\pi/2}\frac{1}{1+\tan^ax}dx$$$$I'(a)=\int_0^{\pi/2}\frac{\ln(\tan x)}{\left(1+\tan^ax\right)^2}dx$$
but this just seems to complicate it more.

I also see that it can be expressed as:
$$I(b)=\int_0^{\pi/2}\frac{1}{1+\tan^b(x)}dx=\int_0^{\pi/2}\frac{\cos^b(x)}{\cos^b(x)+\sin^b(x)}dx$$
a final thought is using the identity:
$$\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$$
so:
$$\int_0^{\pi/2}\frac{\cos^b(x)}{\cos^b(x)+\sin^b(x)}dx=\int_0^{\pi/2}\frac{\sin^b(x)}{\sin^b(x)+\cos^b(x)}$$
and therefore:
$$2I(b)=\int_0^{\pi/2}1dx=\pi/2$$$$I(b)=\pi/4$$$$I=\pi/4$$
does this work? Thanks

$\begingroup$I've nominated to reopen this because I challenge the duplicate. The two questions are amenable to the same solution technique, but the problems themselves are very different. Besides which, good luck finding the unique oldest problem on here solvable that way.$\endgroup$
– J.G.Oct 7 '18 at 20:29