Step 1: Understanding the Concept
Use \(1 + \cos x = 2\cos^2\dfrac{x}{2}\), so \(\dfrac{1}{1+\cos x} = \dfrac{1}{2}\sec^2\dfrac{x}{2}\).
Step 2: Integrate
\(\displaystyle\int \dfrac{1}{2}\sec^2\dfrac{x}{2}\,dx = \tan\dfrac{x}{2}\).
Step 3: Apply the Limits
\(I = \tan\dfrac{3\pi}{8} - \tan\dfrac{\pi}{8}\).\n\(\tan\dfrac{3\pi}{8} = \sqrt{2}+1\) and \(\tan\dfrac{\pi}{8} = \sqrt{2}-1\).\n\(I = (\sqrt{2}+1) - (\sqrt{2}-1) = 2\).
Final Answer:
The value of the integral is 2.
\[ \boxed{\text{(B) }2} \]