Polynomial Long Division with Multiple Variables

© 2005 by Karl Hahn
KCT logo (click for Home Page)

Example of Dividing Polynomials that have More Than One Variable

      (click here to see about the easier case of polynomial long division with just one variable)

In high school you learn about a polynomial being a sum of powers of a single variable, usually x, and you learn how to use polynomial long division to find quotients and remainders of such expressions. So using that you could, for example, divide  x2 - x - 1  by  x + 1  and get a quotient of  x - 2  with a remainder of 1. You undoubtedly already know how to do that.

The polynomials in the example above had the single variable, x. But there is a wider class of polynomials that have multiple variables. For example,  x2 + xy + 2y - 1  is an example of a polynomial in two varables. So the question arises, can you use polynomial long division to divide polynomials such as these? I have received several emails asking about that. The answer is yes, and I will show an example here with the steps explained.

The example has three variables, x, y, and z. It is to divide  x3 + y3 + z3 - 3xyz  by  x + y + z.  So start out by laying it out the same way you would any other division problem. List the dividend terms in decreasing order of powers (which they already are).

            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
Step 1: Divide x from the divisor into x3, which is the leading term of the dividend:
              x2
            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
Step 2: Divide y from the divisor into y3:
              x2  +  y2
            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
                     y3                                  +  xy2  +  y2z
                                                                      
                            z3  -  3xyz  -  x2y  -  x2z  -  xy2  -  y2z
Step 3: Divide z from the divisor into z3:
              x2  +  y2  +  z2
            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
                     y3                                  +  xy2  +  y2z
                                                                      
                            z3  -  3xyz  -  x2y  -  x2z  -  xy2  -  y2z
                            z3                                           +  xz2  +  yz2
                                                                                      
                                  -3xyz  -  x2y  -  x2z  -  xy2  -  y2z  -  xz2  -  yz2
Step 4: Rearrange to put the higher powers first (always need to divide into higher powers first):
              x2  +  y2  +  z2
            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
                     y3                                  +  xy2  +  y2z
                                                                      
                            z3  -  3xyz  -  x2y  -  x2z  -  xy2  -  y2z
                            z3                                           +  xz2  +  yz2
                                                                                      
                                           -x2y  -  x2z  -  xy2  -  y2z  -  xz2  -  yz2  -  3xyz
Step 5: You have two terms with x2 left. Divide x into -x2y - x2z (this is a shortcut that generates two quotient terms at once. We can do this because we have two remaining terms that share the highest power in x):
              x2  +  y2  +  z2            -  xy  -  xz
            _____________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
                     y3                                  +  xy2  +  y2z
                                                                      
                            z3  -  3xyz  -  x2y  -  x2z  -  xy2  -  y2z
                            z3                                           +  xz2  +  yz2
                                                                                      
                                           -x2y  -  x2z  -  xy2  -  y2z  -  xz2  -  yz2  -  3xyz
                                           -x2y  -  x2z  -  xy2          -  xz2          -  2xyz
                                                                                               
                                                                 -  y2z          -  yz2  -   xyz
Step 6: You have only one term with y2 left. Divide y into -y2z:
              x2  +  y2  +  z2            -  xy  -  xz           -  yz
            ____________________________________________________________________________________
  x + y + z ) x3  +  y3  +  z3  -  3xyz
              x3                         +  x2y  +  x2z
                                                      
                     y3  +  z3  -  3xyz  -  x2y  -  x2z
                     y3                                  +  xy2  +  y2z
                                                                      
                            z3  -  3xyz  -  x2y  -  x2z  -  xy2  -  y2z
                            z3                                           +  xz2  +  yz2
                                                                                      
                                           -x2y  -  x2z  -  xy2  -  y2z  -  xz2  -  yz2  -  3xyz
                                           -x2y  -  x2z  -  xy2          -  xz2          -  2xyz
                                                                                               
                                                                   -y2z          -  yz2  -   xyz
                                                                   -y2z          -  yz2  -   xyz
                                                                                                
                                                                                              0

As you can see, this divides out to a quotient of  x2 + y2 + z2 - xy - xz - yz,  with no remainder. You can verify the quotient, as always, by multiplying it by the divisor and adding the remainder (which is zero in this case) to the result. You should end up with the original dividend.


Return to Polynomial Long Division Notes

You can email me by clicking this button:

  Use your own emailer     Use form