Step 1: Understanding the Concept:
The integrand is a ratio of two expressions in \( \cos 2x \). A double-angle identity turns both the numerator and the denominator into squares of a single sine or cosine, so the fraction simplifies a lot before we integrate.
Step 2: Key Formula or Approach:
1. \( 1-\cos 2x = 2\sin^2 x \).
2. \( 1+\cos 2x = 2\cos^2 x \).
3. \( \frac{\sin^2 x}{\cos^2 x} = \tan^2 x \) and \( \tan^2 x = \sec^2 x - 1 \).
4. \( \int \sec^2 x\,dx = \tan x + k \).
Step 3: Simplify the integrand.
Put the identities from Step 2 into the fraction.
\[ \frac{1-\cos 2x}{1+\cos 2x} = \frac{2\sin^2 x}{2\cos^2 x} = \tan^2 x \]
The factor \( 2 \) cancels, and the rest is \( \tan^2 x \).
Step 4: Integrate.
We cannot integrate \( \tan^2 x \) directly, so rewrite it as \( \sec^2 x - 1 \).
\[ \int \tan^2 x\,dx = \int (\sec^2 x - 1)\,dx = \int \sec^2 x\,dx - \int 1\,dx \]
\[ = \tan x - x + k \]
Check by differentiating: \( \frac{d}{dx}(\tan x - x) = \sec^2 x - 1 = \tan^2 x \), which is the simplified integrand.
Step 5: Why the other options are wrong.
Option (1), \( \tan x + x + k \): its derivative is \( \sec^2 x + 1 \), which is \( \tan^2 x + 2 \). The sign of \( x \) is wrong.
Option (3), \( x - \tan^2 x + k \): its derivative is \( 1 - 2\tan x\sec^2 x \), which has nothing to do with \( \tan^2 x \).
Option (4), \( \tan\frac{x}{2} + k \): its derivative is \( \frac{1}{2}\sec^2\frac{x}{2} \), which is not \( \tan^2 x \).
Final Answer:
The integral equals \( \tan x - x + k \), which is option (2).
\[ \boxed{\tan x - x + k} \]