# What is the antiderivative of (cos^2x) / sinx?

May 22, 2016

$= \cos \left(x\right) + \setminus \ln | \tan \left(\frac{x}{2}\right) |$

#### Explanation:

$\setminus \int \setminus \frac{\setminus {\cos}^{2} \left(x\right)}{\setminus \sin \setminus \left(x\right)} \mathrm{dx}$

We know,
$\setminus {\cos}^{2} \left(x\right) = 1 - \setminus {\sin}^{2} \left(x\right)$

$= \setminus \int \setminus \frac{1 - \setminus {\sin}^{2} \left(x\right)}{\setminus \sin \left(x\right)} \mathrm{dx}$

Applying sum rule,
$\setminus \int f \left(x\right) \setminus \pm g \left(x\right) \mathrm{dx} = \setminus \int f \left(x\right) \mathrm{dx} \setminus \pm \setminus \int g \left(x\right) \mathrm{dx}$

$= \setminus \int \setminus \frac{1}{\setminus \sin \left(x\right)} \mathrm{dx} - \setminus \int \setminus \frac{\setminus {\sin}^{2} \left(x\right)}{\setminus \sin \left(x\right)} \mathrm{dx}$

Also,we know,
$\setminus \int \setminus \frac{1}{\setminus \sin \left(x\right)} \mathrm{dx} = \setminus \ln | \setminus \tan \setminus \left(\setminus \frac{x}{2}\right) \setminus |$

$\setminus \int \setminus \frac{\setminus {\sin}^{2} \left(x\right)}{\setminus \sin \setminus \left(x\right)} \mathrm{dx} = - \setminus \cos \left(x\right)$

now,
$= \setminus \ln | \setminus \tan \left(\setminus \frac{x}{2}\right) | - \setminus \left(- \setminus \cos \left(x\right)\right)$

simplifying it,
$= \cos \left(x\right) + \setminus \ln | \tan \left(\frac{x}{2}\right) |$