Let $R$ be the ring of functions that are polynomials in $\cos t$ and $\sin t$ with real coefficients.
Prove that $R$ is isomorphic to $\mathbb R[x,y]/(x^2+y^2-1)$.
Prove that $R$ is not a unique factorization domain.
Prove that $S=\mathbb C[x,y]/(x^2+y^2-1)$ is a principal ideal domain and hence a unique factorization domain.
Determine the units of the rings $S$ and $R$. (Hint: Show that $S$ is isomorphic to the Laurent polynomial ring $\mathbb C[u,u^{-1}]$.)