> In this instance F, opt = poly_from_expr(cancel(simplify(f)), f.gens[0]) comes handy.

I'm not sure.