TITLE: Evaluate $\int_0^\pi\frac{1}{1+(\tan x)^\sqrt2}\ dx$
QUESTION [8 upvotes]: How can we evaluate $$\int_0^\pi\frac{1}{1+(\tan x)^\sqrt2}\ dx$$ Can you keep this at Calculus 1 level please? Please include a full solution if possible. I tried this every way I knew and I couldn't get it.

REPLY [9 votes]: Indeed this was a Putnam question. The $\sqrt{2}$ is pretty much irrelevant. Notice
$$I=\int_0^\pi\frac{dx}{1+\tan(x)^{\sqrt2}}=\int_\pi^0\frac{d(\frac{\pi}{2}-u)}{1+(\tan(\frac{\pi}{2}-u))^{\sqrt2}}=\int_0^\pi\frac{du}{1+\cot(u)^{\sqrt2}}$$
and
$$\frac{1}{1+\tan(x)^{\sqrt2}}=\frac{\cos(x)^{\sqrt2}}{\cos(x)^{\sqrt2}+\sin(x)^{\sqrt2}},\qquad\frac{1}{1+\cot(u)^{\sqrt2}}=\frac{\sin(u)^{\sqrt2}}{\sin(u)^{\sqrt2}+\cos(u)^{\sqrt2}}.$$
so
$$2I=\int_0^\pi\frac{dv}{1+\tan(v)^{\sqrt2}}+\int_0^\pi\frac{dv}{1+\cot(u)^{\sqrt2}}$$ 
$$=\int_0^\pi\left[\frac{\cos(v)^{\sqrt2}}{\cos(v)^{\sqrt2}+\sin(v)^{\sqrt2}}+\frac{\sin(v)^{\sqrt2}}{\sin(v)^{\sqrt2}+\cos(v)^{\sqrt2}}\right]dv=\int_0^\pi\frac{\cos(v)^{\sqrt2}+\sin(v)^{\sqrt2}}{\cos(v)^{\sqrt2}+\sin(v)^{\sqrt2}}dv $$
which is $\int_0^\pi1dv=\pi$. Ultimately, this is a symmetry argument.