<s>[INST] Calculate the value of the following integral: $ \int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)} $ 

The question is show that $$ \int_0^{a} f(x) dx  = \int_0^{a} f(a-x) dx $$
Hence or otherwise, calculate the value of the following integral 
$$ \int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)} $$



What I have done for the first part 
$$ \int_0^{a} f(x) dx  = \int_0^{a} f(a-x) dx $$ 
$$ \left[F(x) \right]^a_0  dx  = \left[-F(a-x) \right]^a_0 $$
$$ F(a) - F(0) =  \left[-F(a-a) - -F(a-0) \right] $$
$$ F(a) - F(0) =F(a) - F(0)   $$
$$ LHS =  RHS $$

Now I am stuck applying this to the integral. I have attempted this:
$$ \int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)} $$
Because $ \int_0^{a} f(x) dx  = \int_0^{a} f(a-x) dx $ The integral is transformed to 
$$ \int^{\frac{\pi}{2}}_0 \frac{\sin^n(\frac{\pi}{2}-x)}{\sin^n(\frac{\pi}{2}-x) + \cos^n(\frac{\pi}{2}-x)} $$
Which then becomes 
$$ \int^{\frac{\pi}{2}}_0 \frac{\cos^n(x)}{\cos^n(x) + \sin^n(x)} $$
Now I am stuck...
 [/INST] So you have shown that:
$\int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)} dx= \int^{\frac{\pi}{2}}_0 \frac{\cos^n(x)}{\cos^n(x) + \sin^n(x)}dx$
$2\int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)}dx =$$\int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x)}dx + \int^{\frac{\pi}{2}}_0 \frac{\cos^n(x)}{\cos^n(x) + \sin^n(x)}dx\\
\int^{\frac{\pi}{2}}_0 \frac{\sin^n(x)+cos^n(x)}{\sin^n(x) + \cos^n(x)}dx\\\pi/2$
</s>