Example 3 Let the logarithmic equation be $\lg (a x)=2 \lg (x-1)$, discuss the range of values for $a$ such that the equation has a solution, and find its solution.
Analysis First, based on the domain of $f(x)=\lg x$, derive the conditions that $a$ and $x$ must satisfy, then transform the logarithmic equation into a general equation and solve it, and finally, the solution must be verified.

Solution From the original equation, we know that $a x>0$ and $x-1>0$, thus it is necessary that $x>1$ and $a>0$. For $a>0, x>1$, the original equation can be transformed into $\lg (a x)=\lg (x-1)^{2}$, hence we get $a x=(x-1)^{2}$, which is $x^{2}-(2+a) x+1=0$. Since $a>0$, we have $(2+a)^{2}-4=a^{2}+4 a>0$, solving this yields $x=$ $\frac{1}{2}\left(2+a \pm \sqrt{a^{2}+4 a}\right)$. When $a>0$, $\frac{1}{2}\left(2+a+\sqrt{a^{2}+4 a}\right)$ is always greater than 1, while $\frac{1}{2}(2+$ $a-\sqrt{a^{2}+4 a}$ is always less than 1, so when $a>0$, the original logarithmic equation has one and only one solution, which is $x=$ $\frac{1}{2}\left(2+a+\sqrt{a^{2}+4 a}\right)$.