Direct Factorisation.
If you can spot a direct factorisation then this is the quickest way to do this question.
For this example we have the factorisation
\[\simplify{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d} = ({a} * x + { -c}) * ({b} * x + { -d})}\]
Factorisation by finding the roots.
For if $x=r$ and $x=s$ and are the roots then $q(x)=a(x-r)(x-s)$ where $a$ is the coefficient of $x^2$.
There are several methods of finding the roots – here are the main methods.
Finding the roots of a quadratic using the standard formula.
We can use the following formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$
The two roots are
\[ x = \frac{-b +\sqrt{b^2-4ac}}{2a}\mbox{ and } x = \frac{-b -\sqrt{b^2-4ac}}{2a}\]
there are three main types of solutions depending upon the value of the discriminant $\Delta=b^2-4ac$
1. $\Delta \gt 0$. The roots are real and distinct
2. $\Delta=0$. The roots are real and equal. Their common value is $-\frac{b}{2a}$
3. $\Delta \lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.
For this question the discriminant of $\simplify{{a*b}x^2+{-b*c-a*d}x+{c*d}}$ is $\Delta = \simplify{{-(b*c+a*d)}^2-4*{a*b}*{c*d}={disc}}$
The roots exist and are distinct. .
So the roots are:
\[\begin{eqnarray} x = \frac{\var{n1} + \sqrt{\var{disc}}}{\var{n3}} &=& \frac{\var{n1} + \var{n4} }{\var{n3}} &=& \simplify{{n1 + n4}/ {n3}}\\ x = \frac{\var{n1} - \sqrt{\var{disc}}}{\var{n3}} &=& \frac{(\var{n1} - \var{n4}) }{\var{n3}} &=& \simplify{{n1 - n4}/ {n3}} \end{eqnarray}\]
So we see that:
\[q(x)=\simplify{{a*b}}\left(\simplify{x-{n1 + n4}/ {n3}}\right)\left(\simplify{x-{n1 - n4}/ {n3}}\right)=\simplify{({b} * x + { -d}) * ({a} * x + { -c})}\]
Completing the square.
First we complete the square for the quadratic expression $\simplify{{a*b}x^2+{-n1}x+{c*d}}$
\[\begin{eqnarray} \simplify{{a*b}x^2+{-n1}x+{c*d}}&=&\var{n5}\left(\simplify{x^2+({-n1}/{a*b})x+ {c*d}/{a*b}}\right)\\ &=&\var{n5}\left(\left(\simplify{x+({-n1}/{2*a*b})}\right)^2+ \simplify{{c*d}/{a*b}-({-n1}/({2*a*b}))^2}\right)\\ &=&\var{n5}\left(\left(\simplify{x+({-n1}/{2*a*b})}\right)^2 -\simplify{ {n2^2}/{4*(a*b)^2}}\right) \end{eqnarray} \]
So to solve $\simplify{{a*b}x^2+{-n1}x+{c*d}}=0$ we have to solve:
\[\begin{eqnarray} \left(\simplify{x+({-n1}/{2*a*b})}\right)^2&\phantom{{}}& -\simplify{ {n2^2}/{4*(a*b)^2}}=0\Rightarrow\\ \left(\simplify{x+({-n1}/{2*a*b})}\right)^2&\phantom{{}}&=\simplify{ {n2^2}/{4*(a*b)^2}=({abs(n2)}/{2*a*b})^2} \end{eqnarray}\]
So we get the two solutions:
\[\begin{eqnarray} \simplify{x+({-n1}/{2*a*b})}&=&\simplify{{abs(n2)}/{2*a*b}} \Rightarrow &x& = \simplify{({abs(n2)+n1}/{2*a*b})}\\ \simplify{x+({-n1}/{2*a*b})}&=&\simplify{-({abs(n2)}/{2*a*b})} \Rightarrow &x& = \simplify{({n1-abs(n2)}/{2*a*b})} \end{eqnarray}\]
Finding these roots then gives the factorisation as before.