Factoring by trial and error: #[Example][Ejemplo]#
#[Let us factor][Factorizemos]# $x^2 - 6x + 5.$
Solution
Find ways to factor the first and last terms:
First term: \t $x^2$ has factors $\color{#0ea05e}{x}$ #[and][y]# $\color{#de6c00}{x}$ \t $\color{slateblue}{x \cdot x = x^2}$
\\ Last term: \t $5$ has factors $\color{#c1026f}{5}$ #[and][y]# $\color{#026fc1}{1}$ \t $\color{slateblue}{5 \cdot 1 = 5}$
#[Group them together and make an attempt.][Agrúpalos juntos y haz un intento]#:
$(\color{#0ea05e}{x} + \color{#c1026f}{5})(\color{#de6c00}{x} + \color{#026fc1}{1}) = x^2 + 6x + 5$
This is fine, except for the sign of the middle term. But notice that we can also get the $5$ by multiplying $\color{#c1026f}{(-5)}$ and $\color{#026fc1}{(-1)}.$ In other words, $5$ also has factors $\color{#c1026f}{(-5)}$ and $\color{#026fc1}{(-1)}.$ Using these instead gives
$(\color{#0ea05e}{x} \color{#c1026f}{- 5})(\color{#de6c00}{x} \color{#026fc1}{- 1}) = x^2 - 6x + 5,$
so we have found the correct factorization.