Difference between revisions of "Quadratic formula"

(General Solution For A Quadratic by Completing the Square)
(General Solution For A Quadratic by Completing the Square)
Line 2: Line 2:
  
 
===General Solution For A Quadratic by Completing the Square===
 
===General Solution For A Quadratic by Completing the Square===
Let the quadratic be in the form <math>ax^2+bx+c=0</math>. Moving <math>c</math> to the other side, we obtain
+
We start with
  
<cmath>ax^2+bx=-c.</cmath>
+
<cmath>ax^{2}+bx+c=0</cmath>
  
Dividing by <math>{a}</math> and adding <math>\frac{b^2}{4a^2}</math> to both sides yields
+
Divide by <math>a</math>:
  
<cmath>x^2+\frac{b}{a}x+\frac{b^2}{4a^2}=-\frac{c}{a}+\frac{b^2}{4a^2}.</cmath>
+
<cmath>x^{2}+\frac{b}{a}x+\frac{c}{a}=0</cmath>
  
Completing the square on the left-hand side gives
+
Add <math>\frac{b^{2}}{4a^{2}}</math> to both sides in order to complete the square:
  
<cmath>\left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}.</cmath>
+
<cmath>\left(x^{2}+\frac{b}{a}x+\frac{b^{2}}{4a^{2}}\right)+\frac{c}{a}=\frac{b^{2}}{4a^{2}}</cmath>
  
As described above, an equation in this form can be solved, yielding
+
Complete the square:
  
<cmath>{x=\frac{-b \pm \sqrt{b^2-4ac}}{2a}}.</cmath>
+
<cmath>\left(x+\frac{b}{2a}\right)^{2}+\frac{c}{a}=\frac{b^{2}}{4a^{2}}</cmath>
  
This formula is also called the quadratic formula. Given the values <math>{a},{b},{c},</math> we can find all [[real]] and [[complex number|complex]] solutions to the quadratic equation.
+
Move <math>\frac{c}{a}</math> to the other side:
 +
 
 +
<cmath>\left(x+\frac{b}{2a}\right)^{2}=\frac{b^{2}}{4a^{2}}-\frac{c}{a}=\frac{ab^{2}-4a^{2}c}{4a^{3}}=\frac{b^{2}-4ac}{4a^{2}}</cmath>
 +
 
 +
Take the square root of both sides:
 +
 
 +
<cmath>x+\frac{b}{2a}=\pm\sqrt{\frac{b^{2}-4ac}{4a^{2}}}=\frac{\pm\sqrt{b^{2}-4ac}}{2a}</cmath>
 +
 
 +
Finally, move the <math>\frac{b}{2a}</math> to the other side:
 +
 
 +
<cmath>x=-\frac{b}{2a}+\frac{\pm\sqrt{b^{2}-4ac}}{2a}=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}</cmath>
 +
 
 +
This is the quadratic formula, and we are done.
  
 
=== Variation ===
 
=== Variation ===

Revision as of 05:38, 29 June 2022

The quadratic formula is a general expression for the solutions to a quadratic equation. It is used when other methods, such as completing the square, factoring, and square root property do not work or are too tedious.

General Solution For A Quadratic by Completing the Square

We start with

\[ax^{2}+bx+c=0\]

Divide by $a$:

\[x^{2}+\frac{b}{a}x+\frac{c}{a}=0\]

Add $\frac{b^{2}}{4a^{2}}$ to both sides in order to complete the square:

\[\left(x^{2}+\frac{b}{a}x+\frac{b^{2}}{4a^{2}}\right)+\frac{c}{a}=\frac{b^{2}}{4a^{2}}\]

Complete the square:

\[\left(x+\frac{b}{2a}\right)^{2}+\frac{c}{a}=\frac{b^{2}}{4a^{2}}\]

Move $\frac{c}{a}$ to the other side:

\[\left(x+\frac{b}{2a}\right)^{2}=\frac{b^{2}}{4a^{2}}-\frac{c}{a}=\frac{ab^{2}-4a^{2}c}{4a^{3}}=\frac{b^{2}-4ac}{4a^{2}}\]

Take the square root of both sides:

\[x+\frac{b}{2a}=\pm\sqrt{\frac{b^{2}-4ac}{4a^{2}}}=\frac{\pm\sqrt{b^{2}-4ac}}{2a}\]

Finally, move the $\frac{b}{2a}$ to the other side:

\[x=-\frac{b}{2a}+\frac{\pm\sqrt{b^{2}-4ac}}{2a}=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}\]

This is the quadratic formula, and we are done.

Variation

In some situations, it is preferable to use this variation of the quadratic formula:

\[\frac{2c}{-b\pm\sqrt{b^2-4ac}}\]

See Also