3. a) Calculate $\int\left[\frac{x}{(x+1)^{2}} \sin x+\frac{x+2}{(x+1)^{2}} \cos x\right] \mathrm{d} x, x \in(-1, \infty)$.

b) Calculate $\int\left[\frac{x}{(x+1)^{2}} f(x)+\frac{x+2}{(x+1)^{2}} g(x)\right] \mathrm{d} x, x \in(-1, \infty)$, where $f, g:(-1, \infty) \rightarrow \mathbb{R}$ are two differentiable functions with $f^{\prime}(x)=g(x)$ and $g^{\prime}(x)=-f(x), \forall x \in(-1, \infty)$.

Adela Dimov, professor, Brăila
Solution. We provide the solution for the requirement corresponding to point b). The other requirement results as a direct consequence of this. We have:
$\int\left[\frac{x}{(x+1)^{2}} f(x)+\frac{x+2}{(x+1)^{2}} g(x)\right] \mathrm{d} x=\int\left(-\frac{1}{x+1}\right)^{\prime}[x f(x)+(x+2) g(x)] \mathrm{d} x=$

$=-\frac{1}{x+1}[x f(x)+(x+2) g(x)]+\int \frac{1}{x+1}\left[f(x)+x f^{\prime}(x)+g(x)+(x+2) g^{\prime}(x)\right] \mathrm{d} x=$

$=-\frac{x f(x)+(x+2) g(x)}{x+1}+\int \frac{1}{x+1}[f(x)+x g(x)+g(x)-(x+2) f(x)] \mathrm{d} x=$

$=-\frac{x f(x)+(x+2) g(x)}{x+1}+\int \frac{1}{x+1}[-(x+1) f(x)+(x+1) g(x)] \mathrm{d} x=$

$=-\frac{x f(x)+(x+2) g(x)}{x+1}+\int[-f(x)+g(x)] \mathrm{d} x=$

$=-\frac{x f(x)+(x+2) g(x)}{x+1}+g(x)+f(x)+\mathcal{C}=$

$=\frac{-x f(x)-(x+2) g(x)+(x+1) g(x)+(x+1) f(x)}{x+1}+\mathcal{C}=\frac{f(x)-g(x)}{x+1}+\mathcal{C}$.

a) In the above, we take $f(x)=\sin x, g(x)=\cos x$ and obtain:

$\int\left[\frac{x}{(x+1)^{2}} \sin x+\frac{x+2}{(x+1)^{2}} \cos x\right] \mathrm{d} x=\frac{\sin x-\cos x}{x+1}+\mathcal{C}$.