Concept:
Differentiate \(\log x\) repeatedly and identify the pattern.
ip
Step 1: Write the first few derivatives.
\[
\frac{d}{dx}(\log x)=\frac{1}{x}
\]
\[
\frac{d^2}{dx^2}(\log x)=-\frac{1}{x^2}
\]
\[
\frac{d^3}{dx^3}(\log x)=\frac{2!}{x^3}
\]
\[
\frac{d^4}{dx^4}(\log x)=-\frac{3!}{x^4}
\]
ip
Step 2: Observe the general pattern.
The sign alternates as:
\[
+,-,+,-,\dots
\]
and the factorial pattern is:
\[
(n-1)!
\]
So,
\[
\frac{d^n}{dx^n}(\log x)=(-1)^{n-1}\frac{(n-1)!}{x^n}
\]
ip
Hence, the correct answer is:
\[
\boxed{(D)\ (-1)^{n-1}\frac{(n-1)!}{x^n}}
\]