TITLE: How to know that $2n^3+9n^2+13n+6$ factors into $(n+1)(n+2)(2n+3)$?
QUESTION [7 upvotes]: Apologies in advance, my math is very rusty.
I'm slowly working my way through Schaum's Outline of Discrete Math for some self-study, occasionally filling in large knowledge gaps in my grasp on algebra. In one of the supplementary questions I'm asked to prove (by induction) that:
$$
\sum^n_{i=1}i^2 = \frac{n(n+1)(2n+1)}{6}
$$
In the inductive step I add $(n+1)^2$ to either side and then try to work my way through, multiplying out the factors:
$$
\frac{n(n+1)(2n+1)}{6} + (n+1)^2 \\
= \frac{n(n+1)(2n+1)+6(n+1)^2}{6} \\
= \frac{(n^2+n)(2n+1)+6(n+1)^2}{6} \\
= \frac{2n^3+n^2+2n^2+n+6(n^2+2n+1)}{6} \\
= \frac{2n^3+n^2+2n^2+n+6n^2+12n+6}{6} \\
= \frac{2n^3+9n^2+13n+6}{6}
$$
I think everything up to this point is pretty trivial, but it's around this point that I get a bit lost. I know I need to factor the terms in the 3-degree polynomial in the numerator somehow, but I'm having a hard time with the actual mechanics given the lack of obvious common factors & the fact that 13 is prime.
I'm pretty sure the final result should look something like:
$$
\frac{(n+1)((n+1)+1)(2(n+1)+1)}{6} \\
= \frac{(n+1)(n+2)(2n+3)}{6}
$$
Multiplying the expected result out I can see the two statements are equal and I'm confident that
$$
\frac{2n^3+9n^2+13n+6}{6} = \frac{(n+1)(n+2)(2n+3)}{6}
$$
but I'm just not quite sure how to factor the polynomial myself to arrive at the final result.
Any hints on how to proceed from here, or what I need to be reading up on to get my head around this?

REPLY [4 votes]: Recall (in your question) the line ...
$$=\frac{(n^2+n)(2n+1)+6(n+1)^2}{6}$$
What followed, however was a missed opportunity, for $n^2+n$ factors as $n(n+1)$, so your expression becomes
$$\begin{align}
\frac{(n^2+n)(2n+1)+6(n+1)^2}{6} &= \frac{n(n+1)(2n+1)+6(n+1)^2}{6}\\
&= \frac{(n+1)\bigg(n(2n+1)+6(n+1)\bigg)}{6}\\
&= \frac{(n+1)(2n^2+n+6n+6)}{6}\\
&= \frac{(n+1)(2n^2+7n+6)}{6}\\
\end{align}
$$
and all that remains to do is to factor the quadratic $2n^2+7n+6$, and you're done. :-)