Factor 8x^3 + 16x^2 + 8x + 16
With factors (A + B) * (C + D) we get AC + AD + BC + BD
coefficients: 8 16 8 16
x terms: x^3 x^2 x
AC = 8x^3, AD = 16x^2, BC = 8x, BD = 16
A and C will be x factors. AC has x^3, AD has x^2 and BC has x,
so it would seem that A has an x^2 and C has an x.
B and D are integers. AC and BC have 8 as the coefficient. If C (common
to both) has 8 as a coefficient and integer B is 1, AC would be 8x^3
and BC would be 8x.
AD and BD have 16 as a coefficient. If integer D (common to both)
is 16 and integer B is 1, AD would be 16x^2 and BD would be 16.
Note that B is 1 in both suppositions.
A = x^2
B = 1
C = 8x
D = 16
So the answer is (x^2 + 1) * (8x + 16)