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 = 40 }$ by the constant term $\color{blue}{c = -40} $.
$$ a \cdot c = -1600 $$Step 3: Find out two numbers that multiply to $ a \cdot c = -1600 $ and add to $ b = -39 $.
Step 4: All pairs of numbers with a product of $ -1600 $ are:
PRODUCT = -1600 | |
-1 1600 | 1 -1600 |
-2 800 | 2 -800 |
-4 400 | 4 -400 |
-5 320 | 5 -320 |
-8 200 | 8 -200 |
-10 160 | 10 -160 |
-16 100 | 16 -100 |
-20 80 | 20 -80 |
-25 64 | 25 -64 |
-32 50 | 32 -50 |
-40 40 | 40 -40 |
Step 5: Find out which factor pair sums up to $\color{blue}{ b = -39 }$
PRODUCT = -1600 and SUM = -39 | |
-1 1600 | 1 -1600 |
-2 800 | 2 -800 |
-4 400 | 4 -400 |
-5 320 | 5 -320 |
-8 200 | 8 -200 |
-10 160 | 10 -160 |
-16 100 | 16 -100 |
-20 80 | 20 -80 |
-25 64 | 25 -64 |
-32 50 | 32 -50 |
-40 40 | 40 -40 |
Step 6: Replace middle term $ -39 x $ with $ 25x-64x $:
$$ 40x^{2}-39x-40 = 40x^{2}+25x-64x-40 $$Step 7: Apply factoring by grouping. Factor $ 5x $ out of the first two terms and $ -8 $ out of the last two terms.
$$ 40x^{2}+25x-64x-40 = 5x\left(8x+5\right) -8\left(8x+5\right) = \left(5x-8\right) \left(8x+5\right) $$