Step 1: Rewrite the denominator:
Expand the square and use \( \sin^2 x + \cos^2 x = 1 \) together with \( 2\sin x\cos x = \sin 2x \):
\[ (\sin x + \cos x)^2 = 1 + \sin 2x \]
So the integral becomes $\displaystyle \int \frac{\cos 2x}{1 + \sin 2x}\,dx$.
Step 2: Substitute:
Let $u = 1 + \sin 2x$. Then $du = 2\cos 2x\,dx$, so $\cos 2x\,dx = \tfrac{1}{2}du$.
\[ \int \frac{\cos 2x}{1+\sin 2x}\,dx = \frac{1}{2}\int \frac{du}{u} = \frac{1}{2}\log|u| + k \]
Step 3: Go back to x:
Since $u = (\sin x + \cos x)^2$, we get
\[ \frac{1}{2}\log\left|(\sin x + \cos x)^2\right| + k = \frac{1}{2}\cdot 2\log|\sin x + \cos x| + k = \log|\sin x + \cos x| + k \]
Step 4: Choose the option:
This is option (B), written without the modulus sign in the paper. Option (A) is twice as big. Options (C) and (D) do not differentiate back to the given integrand, so they are not antiderivatives of it.
Final Answer:
The answer is $\log(\sin x + \cos x) + k$, option (B).
\[ \boxed{\log|\sin x + \cos x| + k} \]