Un método alternativo de integración que consiste en multiplicar el numerador y el denominador por $1-\sin x$: esto le da $$\begin{align*} \int \frac{1}{1+\sin x} \, dx &= \int \frac{1 - \sin x}{1 - \sin^2 x} \, dx \\ &= \int \frac{1 - \sin x}{\cos^2 x} \, dx \\ &= \int \sec^2 x - \frac{\sin x}{\cos^2 x} \, dx \\ &= \tan x - \int \frac{-du}{u^2}, \quad u = \cos x, du = -\sin x \, dx \\ &= \tan x - \frac{1}{u} + C \\ &= \tan x - \sec x + C. \end{align*}$$ To see the equivalence of this form with the expression $$-\frac{2}{1+\tan \frac{x}{2}} + C,$$ consider their difference, with $\theta = x/2$: $$\begin{align*} \tan x - \sec x + \frac{2}{1 + \tan \frac{x}{2}} &= \frac{\sin 2\theta - 1}{\cos 2\theta} + \frac{2}{1 + \tan \theta} \\ &= \frac{\sin 2\theta - 1}{\cos 2\theta} + \frac{2 \cos \theta}{\sin \theta + \cos \theta} \\ &= \frac{\sin 2\theta - 1 + 2 \cos\theta(\cos \theta - \sin \theta)}{\cos 2\theta} \\ &= \frac{2 \cos^2 \theta - 1}{\cos 2\theta} \\ &= 1. \end{align*}$$ por Lo tanto, su diferencia es constante, y ambos son antiderivatives.