Let
\[
I=\int_0^a \frac {\f(x)}{\f(x)+\f(a-x)} \, \d x\,.
\]
Use a substitution to show that
\[
I =
\int_0^a \frac {\f(a-x)}{\f(x)+\f(a-x)} \, \d x\,
\]
and hence evaluate \(I\) in terms of \(a\).
Use this result to evaluate the integrals
\[
\int_0^1 \frac{\ln (x+1)}{\ln (2+x-x^2)}\, \d x
\ \ \ \ \ \ \text{ and }\ \ \ \ \
\int_0^{\frac\pi 2} \frac{\sin x } {\sin(x+\frac \pi 4 )} \, \d x
\,.
\]