I watched a YouTube video on factoring (namely, 100 trinomial factoring (Dedicated to Mr. Hill) by blackpenredpen) and was curious about the math behind the method he first shows around 12:15. Is there anything wrong with my logic or any ways I can improve my understanding?
We are trying to factor $ax^2+bx+c$, where $a,b,c\in\mathbb{Z}\setminus\{0\}$ such that $\gcd(a,b,c)=1$.
Consider $x^2+bx+ac$, which factors into $(x+q)(x+s)$, where $q+s=b$ and $qs=ac$.
Put $a$ in front of both of the $x$ variables.
\begin{align}
(ax+q)(ax+s)&=a^2x^2+aqx+asx+qs\\
&=a^2x^2+ax(q+s)+qs\\
&=a^2x^2+abx+ac\\
&=a(ax^2+bx+c)
\end{align}
Define $t$ where $\gcd(a,q)=t$. $a$ is a factor of $(ax+q)(ax+s)$, so $\gcd(a,s)=\frac{a}{t}$.
\begin{align}
\frac{(ax+q)(ax+s)}{t\cdot\frac{a}{t}}&=(\frac{ax+q}{t})(\frac{ax+s}{\frac{a}{t}})\\
&=(\frac{ax+q}{t})((ax+s)\frac{t}{a})\\
&=(\frac{ax}{t}+\frac{q}{t})(\frac{atx}{a}+\frac{st}{a})\\
&=(\frac{ax}{t}+\frac{q}{t})(tx+\frac{st}{a})\\
&=\frac{atx^2}{t}+\frac{qtx}{t}+\frac{astx}{at}+\frac{qst}{at}\\
&=ax^2+qx+sx+\frac{qs}{a}\\
&=ax^2+(q+s)x+\frac{qs}{a}\\
&=ax^2+bx+\frac{ac}{a}\\
&=ax^2+bx+c\\
\end{align}
$(\frac{ax}{t}+\frac{q}{t})(tx+\frac{st}{a})$ is the completely factored form of the original polynomial.
Step 1: consider your polynomial following the given conditions
$ax^2+bx+c \rightarrow 4x^2+12x-7$
Step 2: consider the polynomial
$x^2+bx+ac \rightarrow x^2+12x-28$
Step 3: this is familiar territory; much easier to deal with, factor as normal
$(x+q)(x+s) \rightarrow (x+14)(x-2)$
Step 4: put $a$'s in front of both $x$'s
$(ax+q)(ax+s) \rightarrow (4x+14)(4x-2)$
Step 5: divide $(a, q)$ and $(a, s)$ by their greatest common divisors within the term
the gcd of (4, 14) is 2 and the gcd of (4, 2) is also 2
$(\frac{4x+14}{2})(\frac{4x-2}{2})=(2x+7)(2x-1)$
Two more examples:
\begin{equation}
\begin{split}
3x^2-25x-18\\
x^2-25x-54\\
(x-27)(x+2)\\
(3x-27)(3x+2)\\
(x-9)(3x+2)
\end{split}
\quad\quad\quad\quad
\begin{split}
21x^2-20x+4\\
x^2-20x+84\\
(x-14)(x-6)\\
(21x-14)(21x-6)\\
(3x-2)(7x-2)
\end{split}
\end{equation}
We can also show the solutions to $ax^2+bx+c=0$ are the solutions to $x^2+bx+ac=0$ multiplied by $\frac{1}{a}$.
\begin{equation}
\begin{split}
x^2+bx+ac=0\\
(x+q)(x+s)=0\\
x=-q,-s
\end{split}
\quad\quad\quad\quad
\begin{split}
ax^2+bx+c=0\\
a(ax^2+bx+c)=0\\
(ax+q)(ax+s)=0\\
x=-\frac{q}{a},-\frac{s}{a}
\end{split}
\end{equation}
$-q(\frac{1}{a})=-\frac{q}{a}, -s(\frac{1}{a})=-\frac{s}{a}$.