# Closed form of $\displaystyle\int_{0}^{\pi/4}\int_{\pi/2}^{\pi}\frac{(\cos x-\sin x)^{y-2}}{(\cos x+\sin x)^{y+2}}\, dy\, dx$

Can the following double integral be evaluated analytically

$$I=\int_{0}^{\Large\frac{\pi}{4}}\int_{\Large\frac{\pi}{2}}^{\large\pi}\frac{(\cos x-\sin x)^{y-2}}{(\cos x+\sin x)^{y+2}}\, dy\, dx$$

This integral comes from Quora. Either this problem is a serious one or only a joke but it looks challenging on its own so I decide to ask it on Math S.E. Does anyone here wanna give a shot? 😃

• My guess is that it can be calculated but I have no idea how. – Peter Nov 1 '14 at 23:01

We have: $$\int_{0}^{\pi/4}\frac{(\cos x-\sin x)^{y-2}}{(\cos x+\sin x)^{y+2}}\,dx = \frac{y}{2(y^2-1)}$$ hence:
$$I = \int_{\pi/2}^{\pi}\frac{y\,dy}{2(y^2-1)}=\frac{1}{4}\left(\log 4+\log(\pi^2-1)-\log(\pi^2-4)\right).$$
To prove the result given by Jack D'Aurizio, start with the substitution $x\mapsto \pi/4-x$, i.e $$\int_0^{\pi/4} \frac{(\cos x-\sin x)^{y-2}}{(\cos x+\sin x)^{y+2}}\,dx=\frac{1}{4}\int_0^{\pi/4} \frac{(\sin x)^{y-2}}{(\cos x)^{y+2}}\,dx=\frac{1}{4}\int_0^{\pi/4}(\tan x)^{y-2}\sec^{4}x\,dx$$ With the substitution $\tan x \mapsto x$, the resulting integral is easy to evaluate.