Let p(x) = x3 − 3x2 − 9x − 5
All the factors of 5 have to be considered. These are ±1, ± 5.
By trial method,
p(−1) = (−1)3 − 3(−1)2 − 9(−1) − 5
= − 1 − 3 + 9 − 5 = 0
Therefore, x + 1 is a factor of this polynomial.
Let us find the quotient on dividing x3 + 3x2 − 9x − 5 by x + 1.
By long division,

It is known that,
Dividend = Divisor × Quotient + Remainder
∴ x3 − 3x2 − 9x − 5 = (x + 1) (x2 − 4x − 5) + 0 = (x + 1) (x2 − 5x + x − 5)
= (x + 1) [(x (x − 5) +1 (x − 5)] = (x + 1) (x − 5) (x + 1)
= (x − 5) (x + 1) (x + 1)