Evaluation of $\int_{0}^{\frac{\pi}{2}}\frac{\sin (2015x)}{\sin x+\cos x}dx$

Evaluate the definite integral $$I=\int_{0}^{\pi/2}\frac{\sin (2015x)}{\sin x+\cos x}\;dx$$

My Attempt:

Using the identity

$$\int_{0}^{a}f(x)\;dx = \int_{0}^{a}f(a-x)\;dx$$

Exchange $\left(\frac{\pi}{2}-x\right)$ for $x$ in the integral to get

\begin{align} \int_0^{\pi/2}\frac{\sin (2015x)}{\sin x+\cos x}\;dx &= \int_0^{\pi/2}\frac{\sin \left(\frac{2015\pi}{2}-2015 x\right)}{\cos x+\sin x}\;dx\\ &= \int_0^{\pi/2}\frac{\cos (2015x)}{\sin x+\cos x}\;dx \end{align}

How can I complete the solution from this point?

• Is this a question from an on-going contest? – Joel Reyes Noche Mar 17 '15 at 3:13

Related question. As I mentioned there in a comment, using the substitution $t=x-\pi/4$ you can rewrite your integral as $$I=\sqrt{2}\sin\frac{2015\pi}{4}\int_0^{\pi/4}\frac{\cos 2015x}{\cos x}\,dx=-\int_0^{\pi/4}\frac{\cos 2015x}{\cos x}\,dx=-I_{2015},$$ where $$I_n=\int_0^{\pi/4}\frac{\cos nx}{\cos x}\,dx.$$ Now let us recall the identity $\cos nx=2\cos x\cos (n-1)x-\cos(n-2)x$, i.e. $$\frac{\cos nx}{\cos x}=2\cos (n-1)x-\frac{\cos(n-2)x}{\cos x}.$$ For $n=2015$ we have $$I_{2015}=\int_0^{\pi/4}\frac{\cos 2015x}{\cos x}\,dx=\frac{2}{2014}\sin\frac{2014\pi}{4}-I_{2013}=-\frac{1}{1007}-\frac{2}{2012}\sin\frac{2012\pi}{2}+I_{2011}=$$ $$=-\frac{1}{1007}+\frac{1}{1005}-I_{2009}=\ldots=\sum_{k=1}^{504} \frac{(-1)^{k+1}}{2k-1}-I_1,$$ where $I_1=\pi/4$. So $$I=-I_{2015}=\frac{\pi}{4}-\sum_{k=1}^{504} \frac{(-1)^{k+1}}{2k-1}.$$ Noting that $\frac{\pi}{4}=\sum\limits_{k=1}^\infty \frac{(-1)^{k+1}}{2k-1}$, you can also write it in the form $$I=\sum_{k=505}^\infty \frac{(-1)^{k+1}}{2k-1}\approx 0.0004960312578\ldots$$