Extracting variable from a couple of rational functions Let $P$ and $Q$ be two rational functions of $z$ (coefficients over $\mathbb{C}$). How can one decide whether $z = R(P(z), Q(z))$ for some rational function $R$ of two variables, and if it is the case how can one find $R$ explicitely?
I'm interested in the particular case $P(z) = (z-1)^3/z^2$ and $Q(z) = (z-c)^3/z$ for $c \in \mathbb{C}$. I have been able to express $z$ in terms of $P$ and $Q$ using cubic and square roots, but I don't know how to proceed to find the rational expression.
 A: You are asking both a general question and a particular question.  For the general question: for an algebraic variety $X$, e.g., the affine line, and for a collection of rational functions $P_1,\dots,P_n$ on $X$, if the rational map $$(P_1,\dots,P_n):X \dashrightarrow \mathbb{A}^n$$ is generically injective, and if the derivative of this map is injective at a single smooth point of $X$, then the elements $P_1,\dots,P_n$ generate the function field of $X$.  Thus every rational function $S$ on $X$ can be expressed in terms of $P_1,\dots,P_n$.  Abstractly, you can form the extended rational map $$(P_1,\dots,P_n,S):X\dashrightarrow \mathbb{A}^{n+1},$$ use implicitization to find the defining equations of the Zariski closure of the image, and then use elimination theory or Gröbner bases methods to eliminate the final variable modulo the ideal generated by these defining equations.
However, in your particular case, there is an easier ad hoc argument (you can read much more about this in Appendix A of "Geometry of Algebraic Curves, Vol. I", Arbarello, Cornalba, Griffiths, Harris.  The  pairs $(z,w)$ of distinct elements such that $(P(z),Q(z))=(P(w),Q(w))$ have elementary symmetric functions $(s_1,s_2) = (z+w,zw)$ that satisfy the polynomial equations $$ s_2^2-3s_2+s_1 = 0, \ \ s_1s_2-3cs_2+c^3 = 0.$$  You can use the first equation to eliminate $s_1$, $s_1 = -s_2^2+3s_2$, and then this leaves a cubic equation in $s_2$, $$ s_2^3-3s_2^2+3cs_2-c^3 = 0.$$  Because the polynomial is cubic, in principle you can solve this equation using radicals of rational functions in $c$, although I am not going to try to carry that out explicitly.  Let us denote the three solutions are $(s_{1,a},s_{2,a})$, $(s_{1,b},s_{2,b})$, and $(s_{1,c},s_{2,c})$.  Let us denote the original pairs by $(z_a,w_a)$, $(z_b,w_b)$, and $(z_c,w_c)$.  
Now compute the points $(p_a,q_a) = (P(z_a),Q(z_a))$, $(p_b,q_b) = (P(z_b),Q(z_b))$, and $(p_c,q_c) = (P(z_c),Q(z_c))$.  Also, for one of these three points, say $z_c$, compute the derivative, $$(p_c + p'_c\epsilon,q_c + q'_c\epsilon) = (P(z_c + \epsilon),Q(z_c+\epsilon)) \ \left(\text{mod} \ \epsilon^2 \right).$$  Now consider all quadratic polynomials in $p$ and $q$, $$B(p,q) = B_{0,0,2} + B_{1,0,1}p + B_{0,1,1}q + B_{2,0,0}p^2 + B_{1,1,0}pq + B_{0,2,0}q^2.$$ Among the 6 coefficients, consider the three linear conditions, $$ B(p_a,q_a) = 0, \ B(p_b,q_b) = 0, \ B(p_c,q_c) = 0.$$  Finally, consider the one linear condition that $B$ has the same tangent line at $(p_c,q_c)$ as the tangent line from above, i.e., $$q'_c \frac{\partial B}{\partial p}(p_c,q_c) - p'_c\frac{\partial B}{\partial q}(p_c,q_c) = 0.$$  Altogether, these are 4 linear conditions on the 6 coefficients of $B$.  The solution space will be $2$-dimensional.  Let $B_1(p,q)$ and $B_2(p,q)$ be a basis.  Then I claim that $B_1(P(z),Q(z))/B_2(P(z),Q(z))$ will be a quotient of linear polynomials in $z$.  It is straightforward to invert a linear fractional transformation, and this will give you an expression for $z$ as a rational function in $P(z)$ and $Q(z)$.
