To solve a quadratic equation we need to find the value of x for which a*x2+b*x+c=0,where a,b,c are constants.There are some well known formulas which you should get accustomed with.However,in this answer,I'll try to make you understand where from this formulas actually come from,and make you understand how to solve a quadratic equation.
If we take the common factor a,we get a*(x2+(b/a)*x+c/a)=0.(Note that a must be different from 0,otherwise the equation becomes b*x+c)
We try to write this equation of order 2 as a product of two equations of order 1.
Therefore,a*(x2+(b/a)*x+c/a)=a*(x-t)(x-s)=0. If we can find s and t for which the first equality holds true, we solved the initial equation,and we would have solutions s and t.
So (x-s)(x-t)=x2-x(s+t)+s*t,and must be equal with our equation(we divide by a),so:
x2-x(s+t)+s*t=x2+(b/a)*x+c/a. If we are able to find s and t such that s+t=-b/a and s*t=c/a then the equality mult be true and we solved our initial equation.(This 2 relations are also called Vieté relations.)
So we square the first relation and get s2+t2+2*s*t=b2/a2.We subtract 4*s*t=4*c/a and get:
(s-t)2=s2+t2-2*s*t=b2/a2-4*c/a.=b2/a2-4*a*c/a2(we amplified a/c with a). So :
(s-t)2=(b2-4*a*c)/a2,so if we take the square root of this we get:
|s-t|=(b2-4*a*c)1/2/a. The expression b2-4*a*c got the name of determinant and is noted with a triangle. However,I'll note it with p.So, s-t = p1/2/a or s-t = -p1/2/a.
For the first case :
If we add s+t=-b/a,we obtain:
s=(-b+p1/2)/(2*a). and t=(-b-p1/2)/(2*a). Make yourself the calculations and find that
s=(-b-p1/2)/2*a and t+(-b+p1/2)/2*a for the seond case as well. This is in fact the same case.(As both tells us the same thing, x2+(b/a)*x+c/a=( x- (-b-p1/2) / (2*a) ) ( x- ( b - p1/2) / ( 2*a) ) ) with the first one.
Now we can verify it by calculations,and get that the equality is indeed true.(a necessary step as we made a lot of assumptions along the way.However,as long as we can verify this by direct calculation,nothing else matters anymore.)
Therefore,we found out the values of s and t in terms of a,b and c,so therefore we found the solutions we were looking for.
The solutions are: s=(-b+p1/2) / (2*a). and
t=(-b-p1/2) / (2*a) , where p=b2-4*a*c.(Only in the case where this solutions exist and are real)
Challenge: Use this to solve the following:
1.) The solutions are -1 and -7.
2.) The solutions are -4 and -7.