Let g1,…,gs∈R[X1,…,Xn,Y] and S={(x¯,y)∈Rn+1|g1(x¯,y)≥0,…,gs(x¯,y)≥0} be a non-empty, possibly unbounded, subset of a cylinder in Rn+1. Let f∈R[X1,…,Xn,Y] be a polynomial which is positive on S. We prove that, under certain additional assumptions, for any non-constant polynomial q∈R[Y] which is positive on R, there is a certificate of the non-negativity of f on S given by a rational function having as numerator a polynomial in the quadratic module generated by g1,…,gs and as denominator a power of q.