Example 3 Find all pairs $(x, y)$ that satisfy the system of equations $\left\{\begin{array}{l}\frac{\cos x}{\cos y}=2 \cos ^{2} y \\ \frac{\sin x}{\sin y}=2 \sin ^{2} y\end{array}\right.$, where $x$, $y \in\left(0, \frac{\pi}{2}\right)$.
Solving the two equations by adding them yields $\frac{\cos x \sin y+\sin x \cos y}{\cos y \sin y}=2$, which simplifies to $\sin (x+y)=\sin 2 y$, hence $\sin \left(\frac{x-y}{2}\right) \cos \left(\frac{x+3 y}{2}\right)=0$. Since $x, y \in\left(0, \frac{\pi}{2}\right)$, we have $x+3 y=\pi$ or $x=y$. Subtracting the two original equations gives $\frac{\sin (y-x)}{\sin 2 y}=\cos 2 y$, which simplifies to $\sin (y-x)=\frac{1}{2} \sin 4 y$. If $x=y$, then $\sin 4 y=0$, so $y=\frac{\pi}{4}$, and thus $x=y=\frac{\pi}{4}$. If $x=\pi-3 y$, then $\sin (4 y-\pi)=\frac{1}{2} \sin 4 y$, which simplifies to $-\sin 4 y=\frac{1}{2} \sin 4 y$. Therefore, $\sin 4 y=0$, so $x=\frac{\pi}{4}$, $y=\frac{\pi}{4}$. Verification confirms that these are indeed solutions to the equations.