What is the ideal class group of the ring $\mathbb{R}[x,y]/(x^2+y^2-1)$?

$$A=\Bbb{R}[x,y]/(x^2+y^2-1) = \Bbb{R}\left[\frac{1-t^2}{1+t^2},\frac{2t}{1+t^2}\right], \qquad \mathrm{Frac}(A) = \Bbb{R}\left(\frac{\frac{2t}{1+t^2}}{\frac{1-t^2}{1+t^2}-1}\right)=\Bbb{R}(t).$$

For $f(t) \in \Bbb{R}(t)$ if its only pole is at $t= \pm i$ of order $k$ then $$f(t) = (a\pm ib) (t\pm i)^{-k}+O( (t\pm i)^{1-k}) \implies f(t) - \frac{a}2\frac{1-t^2}{1+t^2}+\frac{b}2\frac{2t}{1+t^2}=O( (t \pm i)^{1-k})$$

thus by induction on $k$ there is $g(t) \in A$ such that $f(t)-g(t)\in \Bbb{R}(t)$ has no poles which means $f(t)-g(t) \in \Bbb{R}, f(t) \in A$. Whence $A$ is the subring of $\Bbb{R}(t)$ of rational functions with poles only at $\pm i$.

Its maximal ideals are $$m_p= \{ f(t) \in \Bbb{R}(t): f(p) = 0\} \text{ for each } \ p \in (\Bbb{R}\cup \infty - (\pm i)) / \mathrm{Gal}(\Bbb{C/R})$$ Moreover $m_p^2= (h_p(t))$ is principal: for $p \in \Bbb{R}, h_p(t)= \frac{(t-p)^2}{t^2+1}$, for $p \in \Bbb{C}-(\pm i), h_p(t)= \frac{(t-p)^2(t-\overline{p})^2}{(t^2+1)^2}$, for $p = \infty$, $h_p(t) = \frac1{1+t^2}$.

Thus every maximal ideal is invertible and $A$ is a Dedekind domain.

For two maximal ideals $m_p,m_q$ there exists $u(t),v(t)\in A$ such that $u(t) m_p = v(t)m_q$ iff $p,q$ are both real or both complex. If $p$ is real and $q$ is complex then $um_p^2 = vm_q$.

Thus the ideal class group is $$\mathrm{Cl}(A)=\{ m_q,m_p\}\cong \Bbb{Z}/2\Bbb{Z}$$ Every non-zero ideal is invertible thus the fractional ideals form a group $\mathcal{I}(A)$ which is isomorphic to $\mathrm{Div}(\Bbb{P^1_R}) / \left<\pm i\right>$ where $\Bbb{P^1_R}=(\Bbb{R}\cup \infty)/ \mathrm{Gal}(\Bbb{C/R})$ and $\mathrm{Div}(\Bbb{P^1_R})=\mathrm{Div}(\Bbb{P^1_C})^{\mathrm{Gal}(\Bbb{C/R})}$ and $\mathrm{Cl}(A)=\mathcal{I}(A)/\mathcal{P}(A)$ is isomorphic to $\mathrm{Pic}(\Bbb{P^1_R}) / \left<\pm i\right>$.


To see that the class group is nontrivial is pretty easy: I claim that $\langle x-1, y \rangle$ is not principal. If $\langle x-1,y \rangle = \langle f \rangle$ for some polynomial $f(x,y)$, then $f(\cos \theta, \sin \theta)$ would vanish with multiplicity $1$ at $\theta =0$ and not at any $0 < \theta < 2 \pi$. But a periodic smooth function always has an even number of zeroes (counted with multiplicity).

Working a little harder, it is easy to see that there is a surjection from the class group to $\mathbb{Z}/(2 \mathbb{Z})$, sending ideals of the form $\langle x-\cos \theta, y - \sin \theta \rangle$ to $1$ and all other maximal ideals to $0$. Again, this map vanishes on principal ideals because a periodic smooth function always has an even number of zeroes.

I don't know how to check, without getting your hands dirty as in reuns answer, that this surjection is an isomorphism. I believe that all maximal ideals of $A$ are either of the form $\langle x-\cos \theta, y - \sin \theta \rangle$ or of the form $\langle (\cos \theta) x + (\sin \theta) y - r \rangle$ with $r>1$ (in which case the ideal is principal, and $A/\mathfrak{m} \cong \mathbb{C}$), but I don't know a slick proof of this.