Step 1: Observe the structure of the integrand.
The given integral is
\[
\int \frac{1-k\cos^2 x}{\sin^k x\cos^2 x}\,dx
\]
We need to identify a function whose derivative gives this expression.
From the options, consider
\[
\frac{\tan x}{\sin^k x}
\]
Step 2: Rewrite the expression.
Let
\[
y=\frac{\tan x}{\sin^k x}
\]
Since
\[
\tan x=\frac{\sin x}{\cos x},
\]
we get
\[
y=\frac{\sin x}{\cos x\sin^k x}
\]
So,
\[
y=\frac{1}{\cos x\sin^{k-1}x}
\]
Step 3: Differentiate using product form.
Write
\[
y=\sec x\sin^{1-k}x
\]
Now differentiate:
\[
\frac{dy}{dx}=\sec x\tan x\sin^{1-k}x+\sec x(1-k)\sin^{-k}x\cos x
\]
Since
\[
\sec x\cos x=1,
\]
we get
\[
\frac{dy}{dx}=\sec x\tan x\sin^{1-k}x+(1-k)\sin^{-k}x
\]
Now,
\[
\sec x\tan x=\frac{\sin x}{\cos^2 x}
\]
So,
\[
\sec x\tan x\sin^{1-k}x
=
\frac{\sin x}{\cos^2 x}\cdot \sin^{1-k}x
\]
\[
=\frac{\sin^{2-k}x}{\cos^2 x}
\]
Also,
\[
(1-k)\sin^{-k}x=\frac{1-k}{\sin^k x}
\]
Step 4: Take common denominator.
Thus,
\[
\frac{dy}{dx}
=
\frac{\sin^{2-k}x}{\cos^2 x}+\frac{1-k}{\sin^k x}
\]
Taking common denominator \(\sin^k x\cos^2 x\),
\[
\frac{dy}{dx}
=
\frac{\sin^2 x+(1-k)\cos^2 x}{\sin^k x\cos^2 x}
\]
Using
\[
\sin^2 x=1-\cos^2 x,
\]
we get
\[
\frac{dy}{dx}
=
\frac{1-\cos^2 x+(1-k)\cos^2 x}{\sin^k x\cos^2 x}
\]
\[
\frac{dy}{dx}
=
\frac{1-k\cos^2 x}{\sin^k x\cos^2 x}
\]
Step 5: Match with the integrand.
Therefore,
\[
\frac{d}{dx}\left(\frac{\tan x}{\sin^k x}\right)
=
\frac{1-k\cos^2 x}{\sin^k x\cos^2 x}
\]
Hence,
\[
\int \frac{1-k\cos^2 x}{\sin^k x\cos^2 x}\,dx
=
\frac{\tan x}{\sin^k x}+C
\]
Step 6: Final conclusion.
Therefore,
\[
\boxed{\frac{\tan x}{\sin^k x}+C}
\]