Step 1: Identify constants $ a $ , $ b $ and $ c $.
$ a $ is a number in front of the $ x^2 $ term $ b $ is a number in front of the $ x $ term and $ c $ is a constant. In this case:
Step 2: Multiply the leading coefficient $\color{blue}{ a = 4 }$ by the constant term $\color{blue}{c = 21} $.
$$ a \cdot c = 84 $$Step 3: Find out two numbers that multiply to $ a \cdot c = 84 $ and add to $ b = 31 $.
Step 4: All pairs of numbers with a product of $ 84 $ are:
| PRODUCT = 84 | |
| 1 84 | -1 -84 |
| 2 42 | -2 -42 |
| 3 28 | -3 -28 |
| 4 21 | -4 -21 |
| 6 14 | -6 -14 |
| 7 12 | -7 -12 |
Step 5: Find out which factor pair sums up to $\color{blue}{ b = 31 }$
| PRODUCT = 84 and SUM = 31 | |
| 1 84 | -1 -84 |
| 2 42 | -2 -42 |
| 3 28 | -3 -28 |
| 4 21 | -4 -21 |
| 6 14 | -6 -14 |
| 7 12 | -7 -12 |
Step 6: Replace middle term $ 31 x $ with $ 28x+3x $:
$$ 4x^{2}+31x+21 = 4x^{2}+28x+3x+21 $$Step 7: Apply factoring by grouping. Factor $ 4x $ out of the first two terms and $ 3 $ out of the last two terms.
$$ 4x^{2}+28x+3x+21 = 4x\left(x+7\right) + 3\left(x+7\right) = \left(4x+3\right) \left(x+7\right) $$