The dividend is
.
The divisor is
.
Rewrite the expression in long division form
.
\
Divide the first term of the dividend by the first term of the divisor :
.
So, the first term of the quotient is
.
Multiply
by
and subtract.

Divide the first term of the last row by first term of the divisor :
.
So, the second term of the quotient is
.

\
The remainder is the last entry in the last row.
\\
Therefore, the remainder
.
From this division the polynomial function can be written as 
.

.