Example 1 Find the domain of the following functions:
(1) $y=\frac{\sqrt{x(3-x)}}{\lg (x-3)^{2}}$;
(2) $y=\frac{1}{\sqrt{a^{x}-k \cdot b^{x}}}(a>0, b>0, a \neq 1, b \neq 1)$.
Solution: (1) For $y$ to be meaningful, we have
$$
\left\{\begin{array}{l}
x(3 - x) \geqslant 0 \\
(x - 3)^2 > 0 \\
(x - 3)^2 \neq 1
\end{array} \text {, i.e., } \left\{\begin{array}{l}
0 \leqslant x \leqslant 3 \\
x \neq 3 \\
x \neq 2 \text { and } x \neq 4
\end{array}\right.\right.
$$

Thus, the domain is $[0,2) \cup(2,3)$.
(2) According to the problem, the range of values for the independent variable $x$ is
$a^x - k b^x > 0$, which means $\left(\frac{a}{b}\right)^x > k$. Given $a>0, b>0, a \neq 1, b \neq 1$, then
$1^{\circ}$ When $a > b > 0, k > 0$, the domain is $\left\{x \left\lvert\, x > \log_{\frac{a}{b}} k\right.\right\}$;
$2^{\circ}$ When $b > a > 0, k > 0$, the domain is $\left\{x \left\lvert\, x < \log_{\frac{a}{b}} k\right.\right\}$;
$3^{\circ}$ When $0 < a = b \neq 1$, and $0 < k < 1$, the domain is $\mathbb{R}$;
$4^{\circ}$ When $k \leqslant 0$, the domain is $\mathbb{R}$.