$$I = \int_0^\frac{\pi}{2}g(x)\,dx = \int_0^\frac{\pi}{2}{\frac{\cos x}{\cos x + \sin x}}\,dx$$
This is part of a 3-part exercise where I was given $f, g:[0,\frac{\pi}{2}] \to \mathbb R \,\,\, $, $\,\,f(x)=\frac{\sin x}{\cos x+\sin x} \,\,\,$ , $\,\,g(x)=\frac{\cos x}{\sin x+\cos x} $
And these are the two things that I had to prove previously:
$(1)$ $\int_0^\frac{\pi}{2}\big({f(x)+g(x)\big)}dx = \frac{\pi}{2}$
$(2)$ $h:[0,\frac{\pi}{2}] \to \mathbb R\,\,\, $, $\,\,h(x)=\ln(\sin x + \cos x)$ is a primitive of $g-f$
I am sure that I need to use one or both of the relations above to solve this integral but I can't figure it out. I can see that $(1)$ is equivalent to $\int_0^\frac{\pi}{2}{g(x)} \, dx = \frac{\pi}{2} - \int_0^\frac{\pi}{2}f(x) \, dx $
I tried to solve the integral using u-sub and integration by parts and also tried to rewrite the integral using trigonometric identities but I had no succes so I am certain we need to make use of $(1)$ or/and $(2)$.