Step 1: Set up with the chain rule:
Let $u = x^n$, so the function is $\log u$. We can differentiate it directly without opening up the power, by using $\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$.
Step 2: Differentiate the outer function:
For $y = \log u$ we have $\frac{dy}{du} = \frac{1}{u} = \frac{1}{x^n}$.
Step 3: Differentiate the inner function:
For $u = x^n$ the power rule gives $\frac{du}{dx} = n x^{n-1}$.
Step 4: Multiply the two results:
\[ \frac{dy}{dx} = \frac{1}{x^n} \cdot n x^{n-1} = n \cdot x^{n-1-n} = n x^{-1} = \frac{n}{x} \]
Compare with the options. (A) has no factor $n$, (B) has no $x$ in the denominator, (C) has no $n$. Only (D) matches.
Final Answer:
The derivative is $\frac{n}{x}$, option (D).
\[ \boxed{\frac{n}{x}} \]