Divide polynomials with full long-division steps, quotient and remainder.
Input
Answer
Steps
Why it works
Polynomial long division works like numerical long division: at each step you cancel the leading term of the remainder by multiplying the whole divisor by the right monomial. Because the degree drops every step, the process must finish, leaving a quotient and a remainder whose degree is lower than the divisor.