Example 6 Given $P=\left[\frac{1}{2}, 2\right], Q=\left\{x \mid a x^{2}-2 x+2>0\right\}$.
(1) If $P \cap Q \neq \varnothing$, find the range of $a$;
(2) If $R=\left\{x \mid a x^{2}-2 x+2=0\right\}$, and $P \cap R \neq \varnothing$, find the range of $a$.

保留了原文的换行和格式。
Analysis We find that the discussion of the distribution of roots is quite common, can we separate the parameters?

Solution (1) $P \cap Q \neq \varnothing$, it is sufficient that there exists $x \in\left[\frac{1}{2}, 2\right]$ such that $a x^{2}-2 x+2>0$, i.e., $a>\frac{2-2 x}{x^{2}}=2\left(\frac{1}{x}\right)^{2}-2\left(\frac{1}{x}\right)$. Let $f(x)=2\left(\frac{1}{x}\right)^{2}-2\left(\frac{1}{x}\right)$, then the range of $f(x)$ is $\left[-\frac{1}{2}, 4\right]$, so it is sufficient that $a>-\frac{1}{2}$.
(2) $P \cap R \neq \varnothing$. It is sufficient that there exists $x \in\left[\frac{1}{2}, 2\right]$ such that $a x^{2}-2 x+2=0$,

From (1), we know that $a \in\left[-\frac{1}{2}, 4\right]$.