Step 1: Understanding the Concept
Divide the numerator and denominator by \(\cos^{2}x\): \(\frac{\sec^{2}x\,dx}{(\tan x+1)(2+\tan x)}\).
Step 2: Substitute
Let \(t=\tan x\), so \(dt=\sec^{2}x\,dx\). The integral is \(\int\frac{dt}{(t+1)(t+2)}\).
Step 3: Partial fractions
\(\frac{1}{(t+1)(t+2)}=\frac{1}{t+1}-\frac{1}{t+2}\).
Step 4: Calculation
\(\int=\log|t+1|-\log|t+2|+c=\log\left|\frac{\tan x+1}{\tan x+2}\right|+c\).
Final Answer:
The integral is log of the modulus of (tan x + 1) over (tan x + 2), plus c.
\[ \boxed{\text{(D) }\log\left|\dfrac{\tan x+1}{\tan x+2}\right|+c} \]