Ring of trigonometric functions with real coefficients 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}]$.)

Let me complete  YACP's excellent answer  by  describing the units of $S=\mathbb{C}[X,Y]/(X^2+Y^2-1)=\mathbb C[x,y]$.
We will use the isomorphism $\mathbb C[U,U^{-1}]\cong \mathbb C[x,y]:U\mapsto x+iy$
First note that the units of $\mathbb C[U,U^{-1}]$ constitute  the set $(\mathbb C[U,U^{-1}])^{\times}=\bigcup _{n\in \mathbb Z} \mathbb C^*U^n$ of non zero monomials.
Translating back to $S=\mathbb C[x,y]$ we obtain $$S^{\times}=\mathbb C[x,y]^{\times}=\bigcup _{n\in \mathbb Z} \mathbb C^*(x+iy)^n$$
[Don't forget that  $ ((x+iy)^n)^{-1}=(x-iy)^n$ since $(x+iy)(x-iy)=x^2+y^2=1$]
Edit: graded rings
It might be of some interest to put the problem in a  more general perspective.
In a $\mathbb Z$-graded domain  $R=\oplus_{n\in \mathbb Z} R_n$ it is immediate that units are homogeneous and from there it is obvious that  the units of $\mathbb C[U,U^{-1}]=\oplus_{n\in \mathbb Z} \mathbb CU^n$ are $(\mathbb C[U,U^{-1}])^{\times}=\bigcup _{n\in \mathbb Z} \mathbb C^*U^n$, as stated  above.
Similarly one would compute that the units of $\mathbb Z[U,U^{-1}]=\oplus_{n\in \mathbb Z} \mathbb ZU^n$ are given by $(\mathbb Z[U,U^{-1}])^{\times}=\bigcup _{n\in \mathbb Z} \mathbb \lbrace U^n,-U^n\rbrace  $.
However in a graded ring with zero divisors, units needn't be homogeneous : for example in  the ring of dual numbers $D=\mathbb C[X]/(X^2)=\mathbb C\oplus \mathbb C[\epsilon]$, the element $1+\epsilon$ is invertible (with inverse $1-\epsilon$) although it is not homogeneous.
