To determine the quotient q and the remainder r when dividing a = 2X4 + X by b = X2 + 1 in Q[X] we need the following steps.
From this step we conclude that 2X2 will be a term of the quotient q. We now have
Since the degree of -2X2 + X is not less than that of b we need a further step.
The resulting polynomial has degree less than deg(b), so the division stops here. We conclude that
You easily check the identity a = qb + r, i.e.,