# Factoring Quadratics
## Factoring Monic Quadratics Using Vieta's Formulas
![[Vieta's Formulas#Use for solving monic quadratics]]
## The AC Method (a.k.a. Factorying By Grouping)
1. Find two numbers j and k such that $kj=ac$ and $k+j=b$
2. Rewrite as $ax^2+bx+c=ax^2+kx+jk+c$
3. Group the four monomials into two groups of two terms and factor out common terms
## The OIOI Method
This method is referred to as the OI OI method by Neil Does Math, alluding to the last step of the factorization and to how two binomials are multiplied together (outer inner + outer inner). Although this method seems to be the more complicated then the AC method, in practice it is much faster.
Any quadratic with integer coefficients and rational roots can be factored using this method as it uses the [[Rational Root Theorem]] at its core: any quadratic with integer coefficients can be written in form $(q_1x \pm p_1)(q_2x \pm p_2)=0$ where $q_1$ and $q_2$ are factors of the leading coefficient, and $p_1$ and $p_2$ are factors of the constant term.
Example: factor $12x^2-29x-60=0$.
We'll start by looking at the factors of the leading coefficient. All of those factors are possible $q$ values:
$
\begin{align}
1 &, 12 \\
2 &, 6 \\
3 &, 4
\end{align}
$
A good tactic is to always start with the two values that are closest together, so we'll start with 3 and 4.
$(3x \pm p_1)(4x \pm p_2) = 0$
Because $p_1$ and $p_2$ are integer factors of the constant term, we now need to look at factors of 60:
$
\begin{align}
1 &, 60 \\
2 &, 30 \\
3 &, 10 \\
4 &, 15 \\
5 &, 6 \\
\end{align}
$
As before we'll start with the two values that are closest together so 5 and 6. We need to determine which of these two values correspond to $p_1$ and which to $p_2$, and their respective signs. Because 6 and 3 have a common factor, 6 cannot be $p_1$ so:
$(3x \pm 5)(4x \pm 6) = 0$
If this factorization is correct there will exist a single pair of signs that will yield $\pm q_1p_2 \pm q_2 p_1 = b$. In this case no combination of signs would result in $\pm 3x \cdot 6 \pm 4x \cdot 5 = -29x$ so either we made a bad assumption for $q$ values, or a bad one for $p$ values.
Let's keep inspecting $p$ values. The next values are 4 and 15. 15 cannot be in the first place because that would yield a common factor of 5 with $3x$, so it must be in the second place.
$(3x \pm 4)(4x \pm 15) = 0$
Because $3x \cdot 15 - 4 \cdot 4x = 29x$ our factored out quadratic is:
$(3x - 4)(4x + 15) = 0$
## By turning the leading coefficient into 1
If you're just trying to find the roots you can simply divide by $a$ and carry on, but if you're trying to actually factor the quadratic you can't simply divide both sides as you'll end up with $\frac{y}{a}$ on one side, as opposed to $\frac{0}{a}$, which isn't useful). Instead do the following:
$
\begin{align}
f(x) &= ax^2 + bx + c && \text{Multiply by } \frac 1 a a \\
&= \frac 1 a a (ax^2 + bx + c) && \text{Distribute }a \\
&= \frac 1 a ((ax)^2 + b(ax) + ac) && \text{Factor inner} \\
&= \frac 1 a (ax + j) (ax + k) && \text{Multiply first two terms} \\
&=\left (x+\frac j a \right ) (ax+k)
\end{align}
$
Example:
$
\begin{align}
7x^2+12x-4 &= \frac 1 7 ((7x)^2 + 12(7x) - 28) \\
&= \frac 1 7 (7x+14)(7x-2) \\
&= (x+2)(7x-2)
\end{align}
$