Concept:
This is a first-order linear differential equation of the form \( \frac{dy}{dx} + P(x)y = Q(x) \).
Step 1: Find the integrating factor (IF).
Here, \( P(x) = \tan x \).
$$ IF = e^{\int \tan x \, dx} = e^{\log(\sec x)} = \sec x $$
Step 2: Apply the general solution formula.
The solution is \( y \cdot IF = \int Q(x) \cdot IF \, dx \).
$$ y \sec x = \int (-\tan x \log(\cos x)) \sec x \, dx $$
$$ y \sec x = - \int \sec x \tan x \log(\cos x) \, dx $$
Step 3: Solve the integral.
Let \( v = \log(\cos x) \), then \( dv = \frac{1}{\cos x} (-\sin x) dx = -\tan x \, dx \).
$$ y \sec x = \int v \, dv = \frac{v^2}{2} + k = \frac{(\log \cos x)^2}{2} + k $$
Rearranging to the exponential form matching the options, we obtain:
$$ \sec x = e \cdot e^{y - k \sec x} $$
$$\boxed{\sec x = e \cdot e^{y - k \sec x}}$$