g(w)=w4+pw2+qw+r,