Function that sends $\sum_{i=0}^n x^i$ to $\sum_{i=0}^n x^{-i}$? Is there a known function $f(S,x)$ that takes  
$$S=1+x+x^2+x^3+x^4+\dots + x^n$$
and $x$ as its input and returns
$$S'=1+\frac{1}{x}+\frac{1}{x^2}+\frac{1}{x^3}+\frac{1}{x^4}+\dots+\frac{1}{x^n} \ $$
for $x \in$ R, $x>0$ and $n>0$?
Edit: Simply evaluating $S(\frac{1}{x})$ is disallowed, as mentioned in the comments. I am looking for a more elegant formula, which does not require knowledge of $n$.

The following formula inverts the terms of the geometric series $\displaystyle{S=\sum_{i=0}^nx^i}$ independent of n:
$$S'=\frac{x}{\frac{1}{S}+x-1}.$$
As should be clear,
$$S'=\sum_{i=0}^nx^{-i}=\frac{S}{x^n}.$$
Since $S$ is a geometric series, $S=\frac{1-x^n}{1-x}$ and
$$
\begin{align}
1-x^n &= (1-x)S \\
x^n &= 1-S+xS \\
n &= \log_x(1-S+xS).
\end{align}
$$
Therefore,
$$
\begin{align}
S' &=\frac{S}{x^n} \\
&=\frac{S}{x^{\log_x(1-S+xS)}} \\
&= \frac{S}{1-S+xS} \\
&= \frac{x}{\frac{1}{S}+x-1}
\end{align}
$$
for $x \in$ R and $x>0, n\geq 0$.
