Let $f(x,y)$ be an irreducible polynomial, in the two variables $x$ and $y$. It sometimes happens that a “lucky” change of variables $x=g(t)$, where $g$ is a non constant polynomial, transforms our irreducible equation in a nice completely factored equation : in other words, if $d$ is the degree of $f$ in $y$, there are univariate polynomials $c,h_1, \ldots ,h_d$ in $t$ such that the identity
$ f(g(t),y)=c(t)\prod_{k=1}^d (y-h_k(t)) $
holds. Is an algorithm known to decide if such a $g$ exists, or even better, to compute it explicitly ?
Update 20 :00 As noted in a comment below, the answer probably depends on the field. But I believe that this dependence is not very strong and I’m basically interested in an answer over any (zero characteristic) field.