Antiderivative Of tan(x) And cot(x)

For tan(x), we will use the identity:

Lets say [u = cos(x)], which means [du/dx = -sin(x)]:

Evaluating the integral:

And we know what u is:

If we use the logarithmic rule:

For \(cot(x)\), We will use the cotangent identity:

\[ cot(\theta ) = \frac{cos(\theta )}{sin(\theta )}\]

Since \((sin(\theta))' = cos(\theta)\), it would make sense to use the substitution rule with \(u = sin(\theta)\):

\[\int \frac{cos(\theta )}{sin(\theta )} d\theta = \int \frac{du}{u}\]

Evaluating the integral:

\[ln \left( \left| \frac{1}{u} \right|\right) +C = ln \left( \left| \frac{1}{sin(\theta)} \right|\right) +C \]