<s>[INST] How to factor $2x^3 + 21x^2 +27x$ I am having trouble with factoring $2x^3 + 21x^2 +27x$. The answer is $x(x+9)(2x+3)$ but not sure how that was done. Obviously I factored out the $x$ to get $x(2x^2+21x+27)$ then from there I am lost. I tried the AC method and grouping. Can someone show the steps? Thanks! 
 [/INST] $$2x^3+21x^2+27x\\=x(2x^2+21x+27)\\=\dfrac{x}{2}(4x^2+42x+54)\\=\dfrac{x}{2}(2x+18)(2x+3)\\=x(x+9)(2x+3)$$for factorizing $4x^2+42x+54$ we know that it must in form of $(2x+a)(2x+b)$. So:$$4x^2+42x+54=(2x+a)(2x+b)=4x^2+(a+b)2x+ab$$which implies$$ab=54\\a+b=21$$clearly the only numbers satisfying those equalities are $a=18$ and $b=3$ or vice versa.
Another way to attain such numbers when guessing them is not that easy is to solve the following equation$$4x^2+42x+54=0$$or$$2x^2+21x+27=0$$which leads to $$x=\dfrac{-21\pm\sqrt{{21^2-4\times 2\times 27}}}{4}=\dfrac{-21\pm 15}{4}$$therefore$$x_1=\dfrac{-21-15}{4}=-9\\x_2=-\dfrac{3}{2}$$so$$2x^2+21x+27=2(x+9)(x+\dfrac{3}{2})=(x+9)(2x+3)$$
</s>