A polynomial that sends a finite amount of units to their inverse Let $R$ be a commutative ring, and suppose $S\subset R$ is a finite set of units from $R$. I want to prove that there exists a polynomial $f\in R[X]$ such that $f(s)=s^{-1}$ for all $s\in S$. I've actually found a formula for such $f$ which should work, but it's terribly long and I'm not getting the impression that I'm supposed to look for such a long formula because of it. Also, it is a nightmare to prove that it is correct, so can anyone help me with a proof without trying to get such a large formula? I don't really know where to start.
 A: Here is a simple formula:
$$f(X) = \frac{1}{X} \left( 1- \prod_{s \in S}(1-s^{-1}X)\right)$$
Note that this is an actual polynomial in $R[X]$. Indeed, denote by
$$g(X)=1- \prod_{s \in S}(1-s^{-1}X) \in R[X]$$
From $g(0)=0$ you can deduce that $g(X)$ is a multiple of $X$, in other words
$$g(X)=Xf(X)$$
for some $f \in R[X]$.
Finally, for all $s \in S$ you have $$sf(s) = g(s) = 1-0=1$$
i.e. $f(s)=s^{-1}$.
A: Thanks to some helpful comments, I got the answer (hopefully):
We can solve this problem using induction on the cardinality of $S$. If $S=\{s\}$ for some unit $s\in R$, then the polynomial $f(x)=s^{-1}$ is a solution.
Now let $n\in\mathbb{Z}_{> 1}$ and by the induction hypotheses assume that for every finite set $T\subset R$ consisting of $n-1$ units there exists a polynomial $g$ such that $g(t)=t^{-1}$ for all $t\in T$. Now let $S=\{s_1,...,s_n\}\subset R$ be a subset of units. Define $g\in R[X]$ such that $g(s)=s^{-1}$ holds for all $s\in S\setminus \{s_n\}$. Also define $f\in R[X]$ by: $f(x)=-s_n^{-1}g(x)x+s_n^{-1}+g(x)$. This is well-defined and for all $i=1,...,n$ we have $f(s_i)=s_i^{-1}$ (For this part it is necessary that $R$ is commutative). Hence, it is also possible for $n$ elements and the induction is complete.
