Integral with parameter: $\int_{0}^{\pi/2}\frac{\sin \left ( ax \right )}{\sin x\ +\ \cos x}\, {\rm d}x $ 
Is it possible to express in a closed form the integral $$\int_{0}^{\pi/2}\frac{\sin \left ( ax \right )}{\sin x+\cos x}\, {\rm d}x,\,\,\, a\in \mathbb{N}\quad?$$

Well, I find it very difficult. Well, I know how to express the integral
$$\int_{0}^{\pi/2}\frac{\sin x}{\sin x+\cos x}\,{\rm d}x \;=\; \int_{0}^{\pi/2}\frac{\cos x}{\sin x+\cos x}\, {\rm d}x\;=\;\frac{\pi}{4}$$
by applying the substitution $u=\frac{\pi}{2}-x$, but in general I don't have a clue.
If someone could help me, that would be nice!
 A: If you are really interested in a closed form formula then let's consider the integral 

$$ I = \int_{0}^{\pi/2} \frac{e^{inx}}{\cos(x)+\sin(x)}dx $$

where your integral equals to the imaginary part of $I$. $I$ can have the closed form in terms of the Lerch zeta function 

$$ I = \frac{(1-i) e^{\frac{i\pi n}{2}}} {2}\left( \Phi \left( -i,1,\frac{n+1}{2}\right) - \Phi \left( i,1, \frac{n+1}{2} \right ) \right)   . $$

Note: 

1) Maple $17$ can not give an answer for this integral! I do not know about Maple 18. Already a different form for the answer, computed by Mathematica $9$, was posted.

2) The real part of $I$ evaluates the integral

$$ \int_{0}^{\pi/2}\frac{\cos(nx)}{\cos(x)+\sin(x)}dx. $$

A: This is
$$
-\Biggl(\left(\frac{1}{2}+\frac{i}{2}\right) e^{-\frac{1}{2} i \pi  n} \biggl(e^{\frac{i \pi  n}{2}} \biggl((n-1) \biggl(e^{\frac{i \pi  n}{2}} \, _2F_1\biggl(1,\frac{n+1}{2};\frac{n+3}{2};-i\biggr)\\+i \, _2F_1\biggl(1,\frac{n+1}{2};\frac{n+3}{2};i\biggr)\biggr)+i (n+1) \, _2F_1\biggl(1,\frac{1-n}{2};\frac{3-n}{2};i\biggr)\biggr)\\+(n+1) \, _2F_1\biggl(1,\frac{1-n}{2};\frac{3-n}{2};-i\biggr)\biggr)\Biggr)/(n^2-1)
$$
according to Wolfram Mathematica$^{TM}$ 9
A: You have an answer from Vladimir but I had fun computing the integral for some values of $n$ and I let that for your curiosity.
Let $$I_n=\int_{0}^{\pi/2}\frac{\sin \left ( ax \right )}{\sin x+\cos x}\, {\rm d}x$$ $$I_1=\frac{\pi }{4}$$ $$I_2=2-\sqrt{2} \tanh ^{-1}\left(\frac{1}{\sqrt{2}}\right)$$ $$I_3=1-\frac{\pi }{4}$$ $$I_4=0$$ $$I_5=1-\frac{\pi }{4}$$ $$I_6=\sqrt{2} \tanh ^{-1}\left(\frac{1}{\sqrt{2}}\right)-\frac{14}{15}$$ $$I_7=\frac{\pi }{4}-\frac{2}{3}$$ $$I_8=0$$ $$I_9=\frac{\pi }{4}-\frac{2}{3}$$ $$I_{10}=\frac{454}{315}-\sqrt{2} \tanh ^{-1}\left(\frac{1}{\sqrt{2}}\right)$$ $$I_{11}=\frac{13}{15}-\frac{\pi }{4}$$ $$I_{12}=0$$ We can understand that the general formula must be far away from simple.
A: Rewrite the integral with $x=t+\frac\pi4$
$$I_a=\int_{0}^{\pi/2}\frac{\sin ax }{\sin x+\cos x}dx= \sqrt2 \sin\frac{a\pi}4\int_0^{\frac\pi4}\frac{\cos a t}{\cos t}dt
$$
and note that $\frac{\cos a t}{\cos t} =2\cos(a-1)t-\frac{\cos (a-2) t}{\cos t}  $, which affords recursive integration to result in the following general close-forms for either odd $a=2n+1$ or even $a=2n$
\begin{align}
&I_{2n+1}=(-1)^{[\frac{n+1}2]}\bigg(\frac\pi4+\sum_{k=1}^{[\frac{n+1}2]}\frac{(-1)^k}{2k-1}\bigg)\\
&I_{2n}=-\sin\frac{n\pi}2\bigg(\sqrt2\coth^{-1}\sqrt2+\sum_{k=1}^n\frac{2(-1)^{ [\frac k2+1]}}{2k-1}\bigg)
\end{align}
