Example 4. A moving circle is externally tangent to the circle $x^{2}+y^{2}=2 a x$ $(a>0)$, and is also tangent to the y-axis. Find the equation of the locus of the center of the moving circle.
Solve As shown in Figure 5, given the center of the circle $\mathrm{O}_{1}(\mathrm{a}, 0)$, with radius $a$, the equation is: $(x-a)^{2}+y^{2}=a^{2}$. Let the center of the moving circle be $\mathrm{O}_{2}(\mathrm{x}, \mathrm{y})$. Introduce a fixed line $\mathrm{x}=-\mathrm{a}$, then, $\left|\mathrm{O}_{1} \mathrm{O}_{2}\right|=\mathrm{O}_{2}$ is the distance from the fixed line $\mathrm{x}=-\mathrm{a}$.

Therefore, the trajectory of $\mathrm{O}_{2}$ is a parabola, its vertex is $(0,0)$, the focal parameter $\mathrm{p}=2 \mathrm{a}$, the focus $(\mathrm{a}, 0)$, the trajectory equation of $\mathrm{O}_{2}$ is:
$$
\mathrm{y}^{2}=4 a x .(\mathrm{x} \geqslant 0)
$$

When the center of the moving circle is on the negative half-axis of the $x$-axis, it also meets the conditions, so $y=0 \quad(x<0)$ is also its equation. Therefore, the trajectory equation of the center of the moving circle is:
$$
y=\left\{\begin{array}{ll} 
\pm 2 \sqrt{\mathrm{ax}}, & (x \geq 0) ; \\
0, & (x<0) .
\end{array}\right.
$$