---------------------

x^3 + x^2 | x^3 + 2x^2 + 3x + 1

How many times does x^3 go into x^3?

1

---------------------

x^3 + x^2 | x^3 + 2x^2 + 3x + 1

Now multiply that 1 by (x^3 + x^2) and subtract

1

---------------------

x^3 + x^2 | x^3 + 2x^2 + 3x + 1

-(x^3 + x^2)

= x^2 + 3x + 1

Seeing as x^3 doesn't go nicely into this next term, we just leave it as the remainder.

So $\displaystyle 1 + \frac{x^2 + 3x + 1}{x^3 + x^2}$

We could, however, continue to break it up if you'd like:

$\displaystyle 1 + \frac 1{x+1} + \frac 2x + \frac 1{x^2}$