Let p(x)=x5+2x4+3x3+5x2+2
q(x)=x2+x+1, degree q(x)=2
Given degree q(x)= degree r(x)
On dividing x5+2x4+3x3+5x2+2 by x2+x+1, we get
Here g(x)=3+2++
r(x)=x2-x+
degree of r(x)=
Degree of g(x) = Degree of r(x)