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:
Therefore:
\[\int \tan (x) \ dx = - \ln | \cos (x)| +C = \ln | \sec(x)| +C \]
For \( \cot(x)\), We will use the cotangent identity:
\[ \cot(x) = \frac{ \cos(x)}{\sin(x)}\]
Since \(( \sin(x))' = \cos(x)\), it would make sense to use the substitution rule with \(u = sin(x)\):
\[\int \frac{ \cos(x)}{ \sin(x )} dx = \int \frac{du}{u}\]
Evaluating the integral:
\[\int \cot (x) \ dx = \ln |u| +C = \ln | \sin(x)| +C \]