# int (1+sinx)/(sinx * (1+cosx))dx ?

Apr 3, 2018

$\frac{1}{4} {\left(\tan \left(\frac{x}{2}\right)\right)}^{2} + \tan \left(\frac{x}{2}\right) + \frac{1}{2} L n \left(\tan \left(\frac{x}{2}\right)\right) + C$

#### Explanation:

$\int \frac{1 + \sin x}{\sin x \cdot \left(1 + \cos x\right)} \cdot \mathrm{dx}$

After using $y = \tan \left(\frac{x}{2}\right)$, $\mathrm{dx} = \frac{2 \mathrm{dy}}{{y}^{2} + 1}$, $\sin x = \frac{2 y}{{y}^{2} + 1}$ and $\cos x = \frac{1 - {y}^{2}}{{y}^{2} + 1}$ transforms, this integral became

$\int \frac{1 + \frac{2 y}{{y}^{2} + 1}}{\frac{2 y}{{y}^{2} + 1} \left(1 + \frac{1 - {y}^{2}}{{y}^{2} + 1}\right)} \cdot \frac{2 \mathrm{dy}}{{y}^{2} + 1}$

=$\int \frac{\frac{{y}^{2} + 2 y + 1}{{y}^{2} + 1}}{\frac{2 y}{{y}^{2} + 1} \frac{2}{{y}^{2} + 1}} \cdot \frac{2 \mathrm{dy}}{{y}^{2} + 1}$

=$\int \frac{\left({y}^{2} + 2 y + 1\right) \cdot \mathrm{dy}}{2 y}$

=$\frac{1}{2} \int y \cdot \mathrm{dy} + \int \mathrm{dy} + \frac{1}{2} \int \frac{\mathrm{dy}}{y}$

=${y}^{2} / 4 + y + \frac{1}{2} L n y + C$

=$\frac{1}{4} {\left(\tan \left(\frac{x}{2}\right)\right)}^{2} + \tan \left(\frac{x}{2}\right) + \frac{1}{2} L n \left(\tan \left(\frac{x}{2}\right)\right) + C$