Step 1: Differentiating each option instead:
Check option D by differentiating: \(\dfrac{d}{dx}(\tan x+\cot x)=\sec^2x-\text{cosec}^2x\).
Step 2: Rewriting in sin, cos:
\(\sec^2x-\text{cosec}^2x=\dfrac{1}{\cos^2x}-\dfrac{1}{\sin^2x}=\dfrac{\sin^2x-\cos^2x}{\sin^2x\cos^2x}\), which is exactly the given integrand.
Step 3: Confirming:
Since differentiating option D reproduces the integrand exactly, it is the correct antiderivative.
Final Answer:
\[ \boxed{\tan x+\cot x+C} \]