## SUBJECT II (7 p)

a) Calculate $\int \frac{\sin x+2 \cos x}{2 \sin x+\cos x} d x$, for $x \in\left(0 ; \frac{\pi}{2}\right)$.

b) Calculate $\int_{-1}^{1} \frac{x^{2}}{1+e^{x}} d x$.
## Solution:

a) $\int \frac{\sin x+2 \cos x}{2 \sin x+\cos x} d x=\frac{4}{5} \int \frac{2 \sin x+\cos x}{2 \sin x+\cos x} d x+\frac{3}{5} \int \frac{2 \cos x-\sin x}{2 \sin x+\cos x} d x=\frac{4}{5} x+\frac{3}{5} \ln |2 \sin x+\cos x|+C$

b) Use the substitution $y=-x$