Strategy while solving quadratics by splitting the middle term While solving a quadratic equation in one variable by "splitting the middle term", sometimes I just can't arrive at the two numbers I need and it takes a lot of time.

For eg: $x^2 -124x+1344 = 0$

For solving the above equation by splitting the middle term, I first multiplied the coefficient of $x$ which is $1$ in this case by $1340$ (the constant term). I prime factorised the product, and now I have to pick a group of two numbers such that their sum is $-124$ (coefficient of $x$).
Do we always have to pick random numbers? If only hit and trial works here, what must be our thinking process for picking the other pair of number if the former pair of number doesn't work?

Eg: $x^2 -124x+1344 = 0$
Two numbers from the prime factorization of ($1 \cdot 1344$) is $-64$ and $-21$ but they do not add up to $-124$. What should be my strategy to pick a different pair of numbers?

(I know about the quadratic formula, but it becomes too lengthy sometimes)
 A: You need to find two numbers $a$ and $b$ such that
\begin{align}
a+b &= -124 \\
a \times b &= 1344 \, .
\end{align}
If you want a way of doing this that doesn't require trial and error, then let $a=-62+k$ and $b=-62-k$ for some constant $k$ (this step involves halving the number that $a$ and $b$ need to add up to, in this case $-124$). Notice that
$$
a+b=(-62+k)+(-62-k)=-124 \, .
$$
Furthermore,
$$
a \times b= (-62+k)(-62-k)=1344 \, ,
$$
and so
\begin{align}
62^2-k^2 &= 1344 \\
3844-k^2 &= 1344 \\
k^2 &= 2500 \\
k &= 50 \, .
\end{align}
Hence, $a=-62+50=-12$ and $b=-62-50=-112$. We find that
$$
x^2-124x+1344  = (x+a)(x+b)=(x-12)(x-112)
$$
and so $x=12$ or $x=112$.
A: As suggested by Z Ahmed you can use quadratic formula. You will get the two values of x as  $$ x = \frac{-(-124)\pm\sqrt{(-124)^2-4(1)(1344)}}{2(1)} $$
After simplification you will get x as $$ x = \frac{124\pm 100}{2} $$
You will get x as 12 and 112
Simplify this and get your answer
A: As previously mentioned, you need to find two integers $a,b$ such that $a+b=124, ab = 1344$ due to Vieta's formulas. Now $124$ is divisible by $4$ and $1344$ is divisible by $4^2 = 16$, so we can write $a/4 + b/4 = 124/4, \frac{a}{4} \frac{b}{4} = 1344/4$, and changing variables $m = a/4, n = b/4$ gives $m + n = 31, mn=84$.
If you check the factor pairs of $84$ systematically, for example $(m,n) = (84, 1) = (42, 2)$ and compute their sum, you will find that $m = 28, n = 3$ or vice versa. Thus convert back to the roots by multiplying by $4$ to get $x = 112, 12$.
A: As you know, the factors of $\space 1344\space$ are $\space{1, 2, 3, 4, 6, 7, 8, 12, 14, 16, 21, 24, 28, 32, 42, 48, 56,\\ 64, 84, 96, 112, 168, 192, 224, 336, 448, 672, 1344}$
You should work down the largest factor where  $x<124$ because "it" and its cofactor must add up to $124$.  It happens on the first try here that
$\quad 112+12=124\quad\land\quad  112\times 12=1344\quad$ so there you have it. If you did not find a "pair" by the time the factor became less than the cofactor, then the solution(s) would be rational or irrational, possibly complex, but not integers.
A: In fact, we can do even better as $1344 = 2^6 \times 3 \times 7$. Dividing $x^2 - 124x + 1344$ by $2^6 = 64$ gives:
$$\frac{x^2}{64} - \frac{124x}{64} + \frac{1344}{64} = 0$$
$$\Rightarrow \left(\frac{x}{8} \right)^2 - \frac{124}{8}\frac{x}{8} + 21 =0 $$
$$\Rightarrow u = x/8: u^2 - \frac{31}{2}u + 21 = 0$$
$$\Rightarrow 2u^2 - 31u + 42 = 0$$
Factor this as $(2u+a)(u+b)$ since $2$ is prime, and the possibilities are limited as $42$ does not have that many divisors. By inspection, this factors as $(2u-3)(u-14) =0 \Rightarrow u = \frac{3}{2}, 14$, and converting back to $x$ with $u = x/8$, $x = 12, 112$.
This method is effectively the AC method in reverse, where we divide the coefficients by a convenient number and use a substitution to obtain a non-monic polynomial.
