Answer is: option4
\( -\ln |\cos x| + C \)Solution:
\[ \tan x = \frac{\sin x}{\cos x} \]
So the integral becomes:
\[ \int \frac{\sin x}{\cos x} \, dx \]
Using substitution: Let \( u = \cos x \)
\[ \Rightarrow \, du = -\sin x \, dx \]
We need \( \sin x \, dx \), so:
\[ -du = \sin x \, dx \]
\[ \int \frac{\sin x}{\cos x} \, dx = \int \frac{1}{u}(-du) = - \int \frac{1}{u} \, du \]
\[ - \int \frac{1}{u} \, du = - \ln |u| + C \]
Now, substitute back \( u = \cos x \):
\[ - \ln |\cos x| + C \]
This confirms that choice (D) is correct.