Brief Note:
A Demonstration of Polynomial Long Division

You should have had this in high school algebra or college algebra, but just in case you're rusty, here's how we did the division in problem 4 of Practice Problems 4. We have an advantage in that we know what our final expression should look like; we know what the factors should be. Solving a cubic equation when you don't know the factors is possible, but more difficult.

Our polynomial is: 2n3 + 9n2 + 13n + 6.
We know that the factors should be n + 1, n + 2, and 2n + 3. In this case, we can simply test out our factors directly. If (n+1)(n+2)(2n+3) = 2n3 + 9n2 + 13n + 6 (and it does), we're done.

But we won't always know the factors in advance. We may suspect that there's an n+1 lurking in there somewhere, but not be sure. What then?

Work it one step at a time, basing your value for the quotient on the highest power of n in the expression you're dealing with. Then bring terms down from the dividend in order to process the next term.
 

                 2n+ 7n +   6
               ___________________
     n+1 )    2n3 + 9n2 + 13n + 6
                 2n3 + 2n2
                ------------
                         7n2  + 13n
                         7n2  + 7n
                        ------------
                                   6n + 6
                                   6n + 6
                                  ---------

So   2n3 + 9n2 + 13n + 6 = (n+1)(2n2 + 7n + 6).  Factoring the quadratic expression should be a cakewalk, but here's the worked example just in case:

        __2n_+__3____
n+2 ) 2n2 + 7n + 6
         2n2 + 4n
        ----------
                  3n + 6
                  3n + 6
                 --------

Practice Problems 4 Answer Key

SI - CS 191 Homepage