## Problema 2

Să se calculeze $\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{2} x+\sin x}{\sin x+\cos x+1} d x$.


## Problema 2

Făcând schimbarea de variabilă $\quad x=\frac{\pi}{2}-t$ obținem $\quad$ egalitatea integralelor $\quad I$ și $\quad J$

$$
\begin{aligned}
& I=\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{2} x+\sin x}{\sin x+\cos x+1} \mathrm{dx}=-\int_{\frac{\pi}{2}}^{0} \frac{\sin ^{2}\left(\frac{\pi}{2}-t\right)+\sin \left(\frac{\pi}{2}-t\right)}{\sin \left(\frac{\pi}{2}-t\right)+\cos \left(\frac{\pi}{2}-t\right)+1} d t=\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{2} t+\cos t}{\sin t+\cos t+1} \mathrm{~d} t=J \\
& \Rightarrow 2 I=\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{2} x+\sin x+\cos ^{2} x+\cos x}{\sin x+\cos x+1} \mathrm{dx}=\int_{0}^{\frac{\pi}{2}} \frac{1+\sin x+\cos x}{\sin x+\cos x+1} \mathrm{dx}=\int_{0}^{\frac{\pi}{2}} 1 d x=\frac{\pi}{2} \Rightarrow I=\frac{\pi}{4}
\end{aligned}
$$

