Step 1: Understanding the Question:
The problem presents an indefinite trigonometric integral. We need to simplify the inverse trigonometric composition inside the integrand before applying basic integration rules.
Step 2: Key Formula or Approach:
We use standard trigonometric identities to convert the internal term $(\sec x + \tan x)$ into a simpler tangent function expression to cancel out the external $\tan^{-1}$ operator.
Step 3: Detailed Explanation:
Let's isolate and simplify the inner term, $I_{\text{inner}} = \sec x + \tan x$:
$$ \sec x + \tan x = \frac{1}{\cos x} + \frac{\sin x}{\cos x} = \frac{1 + \sin x}{\cos x} $$
Using the half-angle identities where $1 = \cos^2\left(\frac{x}{2}\right) + \sin^2\left(\frac{x}{2}\right)$ and $\sin x = 2\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)$:
$$ 1 + \sin x = \left(\cos\frac{x}{2} + \sin\frac{x}{2}\right)^2 $$
Similarly, expressing $\cos x$ via the difference of squares identity:
$$ \cos x = \cos^2\left(\frac{x}{2}\right) - \sin^2\left(\frac{x}{2}\right) = \left(\cos\frac{x}{2} - \sin\frac{x}{2}\right)\left(\cos\frac{x}{2} + \sin\frac{x}{2}\right) $$
Substituting these back into our fraction gives:
$$ \frac{1 + \sin x}{\cos x} = \frac{\left(\cos\frac{x}{2} + \sin\frac{x}{2}\right)^2}{\left(\cos\frac{x}{2} - \sin\frac{x}{2}\right)\left(\cos\frac{x}{2} + \sin\frac{x}{2}\right)} = \frac{\cos\frac{x}{2} + \sin\frac{x}{2}}{\cos\frac{x}{2} - \sin\frac{x}{2}} $$
Dividing both the numerator and denominator by $\cos\left(\frac{x}{2}\right)$ yields:
$$ \frac{1 + \tan\frac{x}{2}}{1 - \tan\frac{x}{2}} = \tan\left(\frac{\pi}{4} + \frac{x}{2}\right) $$
Now, substitute this simplified expression back into our original integral:
$$ \int \tan^{-1}\left[\tan\left(\frac{\pi}{4} + \frac{x}{2}\right)\right] dx $$
Since $\tan^{-1}(\tan \theta) = \theta$:
$$ = \int \left(\frac{\pi}{4} + \frac{x}{2}\right) dx $$
Integrating term by term with respect to $x$:
$$ = \frac{\pi}{4} \cdot x + \frac{1}{2} \cdot \left(\frac{x^2}{2}\right) + c = \frac{\pi x}{4} + \frac{x^2}{4} + c $$
Step 4: Final Answer:
The value of the integral is $\frac{\pi x}{4} + \frac{x^2}{4} + c$, which corresponds to option (A).