# Adding to factorized polynomials

It's there an easy formula to find the factorization of: $$(a-x)(b-x)(c-x)+d$$

or is there no other way than to write the formula to the form $$ex^3 + fx^2 + gx + h$$ and then refactor again?

For your edited new question: No, in general there isn't an easy formula. For example, $$(x-1)(x-2)(x-3)+1$$ is irreducible over $$\Bbb Q$$, i.e., cannot be factored in a nontrivial way.

$$(x-1)(x-2)(x-3)+1=x^3 - 6x^2 + 11x - 5.$$

• Yeah, i realised i made a mistake and changed it. What is the correct thing to do? Ask a new question, and the wrong one as is. Or should i have deleted it? – Jonas Nov 13 '19 at 10:37

The equation you have written is wrong.
Substitute $$3$$ for $$x$$ on both sides and see what you get.
One way to quickly verify such formulas is to check roots.

The correct equation would be

$$(3-x)(6-x)(9-x)+4x-12=(3-x)(5-x)(10-x)$$

in which case you can reduce the work a little as follows:

\begin{align} (3-x)(6-x)(9-x)+4x-12 &= (3-x)(6-x)(9-x)-4(3-x)\\ &= (3-x)\bigl[(6-x)(9-x)-4\bigr]\\ &= (3-x)\bigl[(54-15x+x^2)-4\bigr]\\ &= (3-x)(50-15x+x^2)\\ &= (3-x)(5-x)(10-x) \end{align}

Similar shortcuts can often be found; however, I don't believe there is any general method for factoring an expression of the form

$$(a_1-b_1x)(a_2-b_2x) \cdots (a_n-b_nx)\,+\,p(x)$$

without fully expanding the brackets.