
Quadratic equations are equations of the second degree. The solution of quadratic equations has a long history in mathematics going back several thousand years to the geometric solutions produced by the Babylonian culture. The Indian mathematician Brahmagupta used "rhetorical algebra" (algebra written out in words) in the 7 th century to produce solutions to quadratic equations and Arab mathematicians of 9 th and 10 th centuries followed simlar methods. Leonardo of Pisa (also known as Fibonacci) included information on the Arab approach to solving quadratic equations in his book Liber Abaci, published in 1202

The quadratic formula is generally used to solve quadratic equations in standard form: $$a x^{2}+b x+c=0 .$$ The solutions for this are:
$x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a}$
Now, the question is - why does this formula give solutions to the standard quadratic equation? We can proceed as we normally do in solving linear equations - that is, by getting the $$x$$ by itself. The only problem here is that instead of just $$x,$$ there are also terms involving $$x^{2} .$$ This is where the process of completing the square comes in handy.

We can begin with the quadratic equation in standard form:
$a x^{2}+b x+c=0$
Just as it is easier to factor a quadratic trinomial if the leading coefficient is $$1,$$ this process of completing the square is also easier if the leading coefficient is $$1 . \mathrm{So}$$ next we will divide through on both sides of this equation by $$a$$.
$\begin{array}{c} \frac{a x^{2}+b x+c}{a}=\frac{0}{a} \\ \frac{a x^{2}}{a}+\frac{b x}{a}+\frac{c}{a}=\frac{0}{a} \\ x^{2}+\frac{b}{a} x+\frac{c}{a}=0 \end{array}$

Then, we will move the $$\frac{c}{a}$$ to the other side of the equation to clear out some room for completing the square:
$\begin{array}{c} x^{2}+\frac{b}{a} x+\frac{c}{a}=0 \\ -\frac{c}{a}=-\frac{c}{a} \\ x^{2}+\frac{b}{a} x=-\frac{c}{a} \end{array}$
Now we need to complete the square. If you are already familiar with this process, you may wish to skip the following explanation.

If we look at what happens when we square a binomial like $$(x+3)^{2}$$, we will begin to notice a pattern.
$\begin{array}{c} (x+3)^{2}=(x+3)(x+3)=x^{2}+6 x+9 \\ (x+4)^{2}=(x+4)(x+4)=x^{2}+8 x+16 \\ (x+5)^{2}=(x+5)(x+5)=x^{2}+10 x+25 \\ (x+6)^{2}=(x+6)(x+6)=x^{2}+12 x+36 \end{array}$
Our goal in the derivation of the Quadratic Formula is to rewrite the expression $$x^{2}+\frac{b}{a} x$$ as a perfect square in the form $$(x+\quad)^{2}$$. The reason that we want to do this is that writing an expression as a binomial squared eliminates the problem of having both an $$x$$ and an $$x^{2},$$ which was preventing us from getting the $$x$$ by itself in the standard quadratic equation.

If we can figure out what should take the place of the blanks in the statement:
$x^{2}+\frac{b}{a} x+\quad=(x+\quad)^{2}$
then we will be well on our way to deriving the quadratic formula.

If we re-examine the sample perfect binomial squares from the previous page, we note a useful pattern. This is that the blank in the parentheses $$(x+\quad)^{2}$$ is filled by a number that is one-half the value of the linear coefficient - or the coefficient of the $$x^{1}$$ term. Notice that in $$x^{2}+6 x+9=(x+3)^{2}, 3$$ is half of $$6,$$ in $$x^{2}+8 x+16=$$ $$(x+4)^{2},$$ the 4 is half of $$8,$$ and so on. If we want to write $$x^{2}+\frac{b}{a} x+\quad$$ as a perfect square in the form $$(x+\quad)^{2}$$, the blank in the parentheses should be filled by:
$\frac{1}{2} * \frac{b}{a}=\frac{b}{2 a}$
Now, it's not true that $$x^{2}+\frac{b}{a} x+\quad=\left(x+\frac{b}{2 a}\right)^{2}$$

We're missing the constant term on the left. However, if we return to our perfect square examples, we can see that the constant term is always the square of the term inside inside the parentheses. So, we can restate our problem now as:
$\begin{array}{c} x^{2}+\frac{b}{a} x+\left(\frac{b}{2 a}\right)^{2}=\left(x+\frac{b}{2 a}\right)^{2} \\ x^{2}+\frac{b}{a} x+\frac{b^{2}}{4 a^{2}}=\left(x+\frac{b}{2 a}\right)^{2} \end{array}$

So, if we return to our originial problem, we were saying that:
$\begin{array}{c} x^{2}+\frac{b}{a} x+\frac{c}{a}=0 \\ -\frac{c}{a}=-\frac{c}{a} \\ x^{2}+\frac{b}{a} x=-\frac{c}{a} \end{array}$

We can add $$\frac{b^{2}}{4 a^{2}}$$ to both sides of this equation and then restate the left hand side as a perfect square of a binomial:
$\begin{array}{c} x^{2}+\frac{b}{a} x \quad=-\frac{c}{a} \\ +\frac{b^{2}}{4 a^{2}}=+\frac{b^{2}}{4 a^{2}} \\ x^{2}+\frac{b}{a} x+\frac{b^{2}}{4 a^{2}}=-\frac{c}{a}+\frac{b^{2}}{4 a^{2}} \\ \left(x+\frac{b}{2 a}\right)^{2}=-\frac{c}{a}+\frac{b^{2}}{4 a^{2}} \end{array}$

The last tricky bit of this derivation is adding the two fractions on the right hand side. The common denominator for these fractions is $$4 a^{2}$$, so we'll need to multiply the $$-\frac{c}{a}$$ by $$\frac{4 a}{4 a}$$ to get $$-\frac{4 a c}{4 a^{2}} .$$ Then the right hand side will be $$\frac{b^{2}-4 a c}{4 a^{2}}$$
$\left(x+\frac{b}{2 a}\right)^{2}=\frac{b^{2}-4 a c}{4 a^{2}}$
Then, we can take the square root of both sides and get the $$x$$ by itself:
$\begin{array}{c} \sqrt{\left(x+\frac{b}{2 a}\right)^{2}}=\pm \sqrt{\frac{b^{2}-4 a c}{4 a^{2}}} \\ x+\frac{b}{2 a}=\frac{\pm \sqrt{b^{2}-4 a c}}{\sqrt{4 a^{2}}} \\ x+\frac{b}{2 a}=\frac{\pm \sqrt{b^{2}-4 a c}}{2 a} \end{array}$

Subtracting $$\frac{b}{2 a}$$ from both sides is easy since we already have a common denominator:
$\begin{array}{c} x+\frac{b}{2 a}=\frac{\pm \sqrt{b^{2}-4 a c}}{2 a} \\ -\frac{b}{2 a}=-\frac{b}{2 a} \\ x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \end{array}$
At the College Algebra level, it is often useful to program the quadratic formula onto a graphing calculator both for easy use and also to learn a little bit about programming. The following program is a simple example of this for the TI84 series of graphing calculators. Graphing calculators also often have built-in polynomial solver feature that can be used to solve quadratics.

Press the "prgm" key in the top middle of the calculator keypad. This will bring up a screen that shows EXEC EDIT NEW across the top. Arrow over across the top to "NEW," and then select 1: Create New.

This will bring up a screen asking you to name the program. You should see PROGRAM and then underneath it, "Name=". The alpha lock is on automatically, so any key you press will type the letter associated with it. Name your program and press ENTER. You should see PROGRAM: Name, with whatever name you've chosen for your program. Underneath this you will se a colon:
This is where you will enter the commands for the program.

First we need to enter the values for $$A, B$$ and $$C$$ from the quadratic equation into the calculator. To do this, press the "prgm" key again. Across the top of the screen you should see CTL I/O COLOR EXEC.

Arrow over to I/O. This is the "input/output" menu. Choose number 2:Prompt. This will return you to the program screen where you will see :Prompt under the name of the program. After :Prompt, type $$A, B, C .$$ You'll need to use the "alpha" key to access the letters and the comma is right above the 7 key.

PROGRAM: Name (whatever name you've chosen should show here) :Prompt $$A, B, C$$
On the next line of the program, we will take the values of $$\mathrm{A}, \mathrm{B}$$ and $$\mathrm{C}$$ and use them to calculate the values of the roots of the equation. Type in the following:
PROGRAM: Name :Prompt $$\mathrm{A}, \mathrm{B}, \mathrm{C}$$
$$:(-B+\sqrt{\left(B^{2}-4 A C\right)}) /(2 A) \rightarrow R$$
$$:(-B-\sqrt{\left(B^{2}-4 A C\right)}) /(2 A) \rightarrow S$$

In typing these two lines it's important that when you type $$-B$$, you use the negative key next to the decimal point, rather than the subtraction key. The calculator is very picky about this. When you're typing the $$B^{2}-4 A C$$, you'll need to use the subtraction key on the far right of the keypad.

Also notice the double parentheses - one set for the numerator of the fraction and one set for the square root. If you don't type this in correctly it will produce Wrong answers. The arrow in the formula stores the values of the answer in the variables $$\mathrm{R}$$ and $$\mathrm{S}$$, and the arrow is produced by the "sto $$\rightarrow "$$ key just above the ON button in the lower left of the keyboard.

Now that we've given the calculator the values for $$\mathrm{A}, \mathrm{B}$$ and $$\mathrm{C}$$ and then had the calculator find the roots of the eqatiuon, we need to display the answers. If you press the prgm key and arrow over to the I/O menu again, you can choose 3:Disp. This will Display the answers that we've stored as $$\mathrm{R}$$ and $$\mathrm{S}$$.

PROGRAM: Name :Prompt $$A, B, C$$ $$:(-B+\sqrt{B^{2}-4 A C})) /(2 A) \rightarrow R$$
$$:(-B-\sqrt{B^{2}-4 A C})) /(2 A) \rightarrow S$$
: Disp $$R, S$$
Now we can test the program with some simple equations. To run the program, press the program key and choose the program you've created either by selecting it and pressing enter, or by pressing the number for the program in the list. This should bring you back to the calculation screen, where you can run the program by pressing enter. The calculator should then ask you for the values of $$\mathrm{A}, \mathrm{B}$$ and
$$C$$

Solve for $$x: \quad 2 x^{2}-x-1=0$$
In this example the values for $$A, B$$ and $$C$$ are:
$$A=2$$
$$B=-1$$
$$C=-1$$
Again, it's important that you use the negative sign key next to the decimal point for the values of any negative coefficients and not the subtraction key. The calculator should return values of 1 and -0.5 as the solutions.

Solve for
$$x: \quad x^{2}+x+1=0$$
In this example the values for $$\mathrm{A}, \mathrm{B}$$ and $$\mathrm{C}$$ are:
$$A=1$$
$$B=1$$
$$C=1$$
The calculator should return values of $$-0.5 \pm 0.8660254038 i$$ as solutions.

If you get an error message saying "NONREAL AnswerS," you'll need to adjust the calculator setting to allow for complex valued answers. You can do this by presing the "mode" key in the top left of the keypad and arrowing down to the line that reads "REAL a+bi $$\operatorname{re}^{\wedge}(\theta i) .^{\prime \prime}$$ You can then arrow over to "a+bi" and press enter. This will allow the calculator to compute complex valued answers.
Something very important to remember about the quadratic formula is that the equation must be in standard form in order to identify the values of $$\mathrm{A}, \mathrm{B}$$ and $$\mathrm{C}$$ to use in the formula. For example in the equation:
$3 x^{2}-7=2 x$
it is important to understand that the values of $$\mathrm{A}, \mathrm{B}$$ and $$\mathrm{C}$$ come from the standard form of the equation and not the present form of the equation. There are several pitfalls to watch out for in this equation. First of all, the $$2 x$$ is on the opposite side of the equation from the other terms. That means that the value of $$B$$ IS $$\mathrm{NOT}+2 .$$ Also, if we were to move the $$2 x$$ to the other side to put the equation in standard form, it is not the order of the terms, but degree of the variable that determines whether a coefficient is identified as $$\mathrm{A}, \mathrm{B}$$ or $$\mathrm{C}$$

In moving the $$2 x$$ to the other side of the equation, I have seen students put the term they're adding to that side as the last term. There is nothing wrong about this, but if you do that, you must be careful about identifying the values of $$\mathrm{A}, \mathrm{B}$$ and $$C$$
\begin{aligned} 3 x^{2}-7 &=2 x \\ -2 x &=-2 x \\ 3 x^{2}-7-2 x &=0 \end{aligned}
There is nothing wrong about the way the equation above is written depsite the fact that it is not in "standard form." The important thing to remember is that "A" is not the coefficient of whichever term is listed first. It is the coefficient of the quradratic, or $$x^{2}$$ term. Likewise, "B" is not the coefficient of the second term, but rather the coefficient of the linear, or $$x^{1}$$ term. And "C" is not whichever number comes last, but rather the value of the constant term. So in the equation above, however it is written, the value of $$\mathrm{A}$$ is $$+3, \mathrm{B}$$ is -2 and $$\mathrm{C}$$ is -7

Exercises $$\PageIndex{1}$$

Solve for $$x$$ in each equation. Round any irrational values to the nearest 1000 th.

1) $$\quad x^{2}+7 x=2$$
2) $$\quad 5 x^{2}-3 x=4$$
3) $$\quad \frac{3}{4} x^{2}=\frac{7}{8} x+\frac{1}{2}$$
4) $$\quad \frac{2}{3} x^{2}-\frac{1}{3}=\frac{5}{9} x$$
5) $$\quad 2 x^{2}+(\sqrt{5}) x-3=0$$
6) $$\quad 3 x^{2}+x-\sqrt{2}=0$$
7) $$\quad 2.58 x^{2}-3.75 x-2.83=0$$
8) $$\quad 3.73 x^{2}+9.74 x+2.34=0$$
9) $$\quad 5.3 x^{2}+7.08 x+1.02=0$$
10) $$\quad 3.04 x^{2}+1.35 x+1.234=0$$
11) $$\quad 7 x(x+2)+5=3 x(x+1)$$
12) $$\quad 5 x(x-1)-7=4 x(x-2)$$
13) $$\quad 14(x-4)-(x+2)=(x+2)(x-4)$$
14) $$\quad 11(x-2)+(x-5)=(x+2)(x-6)$$

1) $$\quad x \approx 0.275,-7.275$$
3) $$\quad x \approx 1.587,-0.420$$
5) $$\quad x \approx 0.787,-1.905$$
7) $$\quad x \approx-0.548,2.002$$
9) $$\quad x \approx-0.164,-1.172$$
11) $$\quad x \approx-0.575,-2.175$$
13) $$\quad x=10,5$$