x-59-x

Reorder 9 and -x.

x-5-x+9

Set up the polynomials to be divided. If there is not a term for every exponent, insert one with a value of 0.

– | x | + | 9 | x | – | 5 |

Divide the highest order term in the dividend x by the highest order term in divisor -x.

– | 1 | ||||||

– | x | + | 9 | x | – | 5 |

Multiply the new quotient term by the divisor.

– | 1 | ||||||

– | x | + | 9 | x | – | 5 | |

+ | x | – | 9 |

The expression needs to be subtracted from the dividend, so change all the signs in x-9

– | 1 | ||||||

– | x | + | 9 | x | – | 5 | |

– | x | + | 9 |

After changing the signs, add the last dividend from the multiplied polynomial to find the new dividend.

– | 1 | ||||||

– | x | + | 9 | x | – | 5 | |

– | x | + | 9 | ||||

+ | 4 |

The final answer is the quotient plus the remainder over the divisor.

-1+4-x+9

Divide (x-5)/(9-x)