# How do I solve a quadratic equation?

To solve a quadratic equation we need to find the value of x for which a*x^{2}+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*(x^{2}+(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*(x^{2}+(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)=x^{2}-x(s+t)+s*t,and must be equal with our equation(we divide by a),so:

x^{2}-x(s+t)+s*t=x^{2}+(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 s^{2}+t^{2}+2*s*t=b^{2}/a^{2}.We subtract 4*s*t=4*c/a and get:

(s-t)^{2}=s^{2}+t^{2}-2*s*t=b^{2}/a^{2}-4*c/a.=b^{2}/a^{2}-4*a*c/a^{2}(we amplified a/c with a). So :

(s-t)^{2}=(b^{2}-4*a*c)/a^{2},so if we take the square root of this we get:

|s-t|=(b^{2}-4*a*c)^{1/2}/a. The expression b^{2}-4*a*c got the name of determinant and is noted with a triangle. However,I'll note it with p.So, s-t = p^{1/2}/a or s-t = -p^{1/2}/a.

For the first case :

If we add s+t=-b/a,we obtain:

s=(-b+p^{1/2})/(2*a). and t=(-b-p^{1/2})/(2*a). Make yourself the calculations and find that

s=(-b-p^{1/2})/2*a and t+(-b+p^{1/2})/2*a for the seond case as well. This is in fact the same case.(As both tells us the same thing, x^{2}+(b/a)*x+c/a=( x- (-b-p^{1/2}) / (2*a) ) ( x- ( b - p^{1/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.

REMEMBER:

The solutions are: s=(-b+p^{1/2}) / (2*a). and

t=(-b-p^{1/2}) / (2*a) , where p=b^{2}-4*a*c.(Only in the case where this solutions exist and are real)

Challenge: Use this to solve the following:

1.) x^{2}+8*x+7=0

2.)x^{2}+11*x+28=0

Good luck!

Solutions:

1.) The solutions are -1 and -7.

2.) The solutions are -4 and -7.