$$\int\frac{\cos\ x}{1+\cos\ x}dx$$
$-\tan(\frac{x}{2})+x+С$
$-\frac{\mathrm{d}}{\mathrm{d}x}(\tan(\frac{x}{2}))+1$