Step 1: Use the definition of hyperbolic tangent.
We know that
\[
\tanh t=\frac{e^t-e^{-t}}{e^t+e^{-t}}
\]
Let
\[
t=\log x
\]
Then
\[
\tanh(\log x)
=
\frac{e^{\log x}-e^{-\log x}}
{e^{\log x}+e^{-\log x}}
\]
Step 2: Simplify the exponential terms.
Since
\[
e^{\log x}=x
\]
and
\[
e^{-\log x}=\frac{1}{x},
\]
we get
\[
\tanh(\log x)
=
\frac{x-\frac1x}{x+\frac1x}
\]
Step 3: Remove the fractions.
Multiplying numerator and denominator by \(x\),
\[
\tanh(\log x)
=
\frac{x^2-1}{x^2+1}
\]
Step 4: Final conclusion.
Therefore,
\[
\boxed{\tanh(\log x)=\frac{x^2-1}{x^2+1}}
\]
Hence, the correct option is
\[
\boxed{(3)}
\]