Hier kommt der erweiterter euklidischer Algorithmus zur Anwendung.
Zur besseren Lesbarkeit sei das Argument bei  P  und  Q  ausgelassen.
(1)  Q:P = (x4 + x + 1):x2 = x2  Rest  (x + 1)
⇔ (x +1) = (x4 + x + 1) - x2·x2 = Q - x2·P.
(2)  P:(x + 1) = x2:(x + 1) = x  Rest  (-x)
⇔ (-x) = P - x·(x + 1) = P - x·(Q - x2·P) = ( x3 + 1)·P - x·Q.
(3)  (x + 1):(-x) = (-1)  Rest  1  (hieraus folgt bereits, dass  P  und  Q  teilerfremd sind)
⇔ 1 = (x + 1) - (-1)·(-x) = (Q - x2·P) - (-1)·[(x3 + 1)·P - x·Q] = (-x + 1)·Q + (x3 - x2 + 1)·P.
Damit gilt  PR + QS = 1, wobei  R(x) = x3 - x2 + 1  und  S(x) = -x + 1  ist.