To factor a trinomial like \(5x^2 -34x +24\), I was offered several times the following recipe.
The recipe works, but the instructions are unfortunate. An explanation.
The underlying mathematical tool is a proper substitution. Remember: If a variable in an expression comes in a package wherever it shows up, as in \[
\tfrac{1 -2\sin x}{1 +2\sin x} +2\sin x\,,
\] one can substitute a new variable \(z\) for the package (\(2\sin x\)) to get a less complicated, auxiliary expression \(\frac{1-z}{1+z}+z\). In our case \[
5x^2 -34x +24 = 5x \cdot x -34x +24\,,
\] we would like to substitute the package \((5x)\). To pack all occurrences of \(x\), we multiply the expression by \(5\), which changes its values! \[
5\cdot (5x^2 -34x +24) = (5x)\cdot (5x) -34(5x) +120\,.
\] Factor the auxiliary expression and replace \(z\) by its original meaning, \[
\begin{aligned}
z^2 -34z +120 = (z -30)(z -4) &= 5(x -6)(5x -4)\,.
\end{aligned}
\] In a last step, we divide the expression by \(5\) to restore its values: \[
5x^2 -34x +24 = (x -6)(5x -4)\,.
\]
The tool can be used to complete the square in a quadratic equation. To solve \[
6x^2 +x -3 = 0\,,
\] we multiply by \(6\) and make the substitution \(z = 6x\). \[
\begin{aligned}
z^2 +z -18 &= 0\\
z^2 +z &= 18
\end{aligned}
\] Using \((z +\frac{1}{2})^2 = z^2 +z +\frac{1}{4}\), we get \[
\begin{aligned}
18 +\tfrac{1}{4} &= z^2 +z +\tfrac{1}{4}= (z +\tfrac{1}{2})^2\\
\pm \sqrt{\tfrac{73}{4}} &= z +\tfrac{1}{2}\\
z &= -\tfrac{1}{2} \pm \tfrac{1}{2}\sqrt{73}\,.
\end{aligned}
\] Therefore, since \(z = 6x\), the solutions are \(x = -\tfrac{1}{12} \pm \tfrac{1}{12}\sqrt{73}\).
Going back to the packing stage, one realizes that multiplying by \(24\) instead of \(6\) would benefit the whole calculation (why, and why not \(12\)?).