(:title Quadratic formula:) >>nav_bar<<%reg%Mathcasts         %exa%Examples      %pra%Practice%%    %mor%More      %up%[[glossary/Q]] >><< [[<<]] ---- [table border=1 cellpadding=5 width=98%] [row] []>>&<< %def b%Definition:%% With the %red% quadratic formula %% we solve the quadratic equation: {${ ax^2+bx+c=0}$}.>>&<< >>&<< (:div style="margin-left:40px":) The formula is:%c14% {$x_1,x_2 = {{ - b \,\pm\, \sqrt {b^2 \,-\, 4 \cdot a \cdot c} } \over {2 \cdot a}}$}%% (:divend:) >>&<<%reg b%Rules%% * The formula can give 0, 1 or 2 real number solutions (only real numbers exist on a graph!). * If there are two different solutions they are written {$x_1$} and {$x_2$} * The symbol {$\pm$} means that for {$x_1$} we use the + sign and for {$x_2$} we use the - sign. >>-<< (:div style="margin-left:30px":) The %red b% discriminant %% is: {$D=b^2-4\cdot a\cdot c$} (the expression inside the square root). (:divend:) >>-<< (:showhide init=hide div=div21 lshow='+' lhide='-':) %exa b%Example%% (:div21 id=div21 class="pra_bar2" :) Solve the equation: %exa%{$x^2-2x-3=0$} for {$x$}.%% (:div211 class="lindent":) %sol a6% Solution:%% Here {$а=1 \quad b=-2 \quad c=-3$}    ([[glossary/quadraticFormulaex1|%sol s9 u%other examples]]) >>&<< {$x_1 ,\,x_2 =\,$}%c12%{${{ - ( - 2) \,\pm\, \sqrt {( - 2)^2 - 4 \cdot 1 \cdot ( - 3)} } \over {2 \cdot 1}} = {{2 \,\pm\, \sqrt {4 + 12} } \over 2} = {{2 \,\pm\, 4} \over 2}$}%% >>&<< %def c11%{$x_1 = {{2 + 4} \over 2} = {6 \over 2} = 3$} and %mor c11%{$x_2 = {{2 - 4} \over 2} = {{ - 2} \over 2} = - 1$} >>&<< %ans% Answer: %ref%{$x_1=3$}%% and %mor%{$x_2=-1$}%% are the two solutions to the equation {$f(x)=x^2-2x-3=0$} (see the left graph below!). >>&<< (:div211end:) (:div21end:) >>-<< [tableend] [table border=1 cellpadding=5 width=98%] [row] []>>&<< %reg b%Rules%% %s9%(:showhide init=hide div=div22 lshow='+' lhide='-':) Explanation%% (:div22 id=div22 class="pra_bar2" :) Depending on the function, the discriminant can be %exa%positive%%, %pra%zero%% or %mor%negative%%. * If the discriminant is %exa%positive%%, the formula gives %exa%two distinct numbers%%: {$x_1$} and {$x_2$}. %sol s8%In the above example, the discriminant was 16 (positive) and so the quadratic function {$f(x)=x^2-2x-3$} has two distinct roots. This means the graph of the function has two x-intercepts {$x_1=3$} and {$x_2=-1$}. See left graph below.%% * If the discriminant is %pra%zero%%, the formula give %pra%one root%% and the function "touches" the {$x$}-axis at this one point. %sol s8%See middle graph below.%% * If the discrimnant is %mor%negative%%, the formula has %mor%no '''real''' solution%% and since graphs are "real", the graph cannot cross or touch the {$x$}-axis. %sol s8%See right graph below.%% (:div22end:) >>-<< >>le20 a6<< [table border=2 bordercolor=#ddddff cellspacing=0 cellpadding=5 bgcolor=#eeeeff style='color:#000066; font-size:1em;'] [row] [c] %exa% The discriminant {$D>0$}%% [c] %pra% The discriminant {$D=0$}%% [c] %up% The discriminant {$D<0$}%% [row] [c] %exa% {$D>0$} - the parabola crosses the x-axis in two distinct points%% [c] %pra% {$D=0$} - the parabola touches the x-axis at a unique point%% [c] %up% {$D<0$} - the parabola doesn't cross or touch the x-axis%% [row] [c] {gg width=200; height=200; xmin=-5; xmax=5; xscl=1; axes(); stroke="#660000"; strokewidth=2; plot("x^2-2x-3");stroke="#990099";dot([-1,0],"open"); c=text([-1,0],"root",aboveleft); stroke="#000099"; dot([3,0],"open"); c=text([3,0],"root",aboveright) gg} [c] {gg width=200; height=200; xmin=-5; xmax=5; xscl=1; axes(); stroke="#006600"; strokewidth=2; plot("x^2-4x+4");dot([2,0],"open"); c=text([2,0],"root",below) gg} [c] {gg width=200; height=200; xmin=-5; xmax=5; xscl=1; axes(); stroke="#660099"; strokewidth=2; plot("2*x^2+1"); c=text([0,1],"no roots",belowright) gg} [row] [c] sample function:\\ %exa%{$f(x)=x^2-2x-3$}%% [c] sample function: \\ %pra%{$f(x)=x^2-4x+4$}%% [c] sample function: \\ %up%{$f(x)=2x^2+1$}%% [row] [c] We solve: {$x^2-2x-3=0$} [c] We solve: {$x^2-4x+4=0$} [c] We solve: {$2x^2+1=0$} [row] [c] %exa%{$D= ( - 2)^2 - 4 \cdot 1 \cdot ( - 3)=16>0$}%% [c] %pra%{$D= ( - 4)^2 - 4 \cdot 1 \cdot 4=0$}%% [c] %up%{$D= ( 0)^2 - 4 \cdot 2 \cdot 2=-8<0$}%% [row width=15] [c] two different roots [c] one unique root [c] no roots [row] [c] {$x_1=3$} and {$x_2=-1$} [c] {$x_1=x_2=2$} [c] {$x_1$} and {$x_2$} %red%do not exist!%% >>&<< [tableend] >><< (:div1end:) [tableend] >>&<< ------------- >>&<< %rel%Related topics: * [[quadratic function]] * Quadratic formula and complex numbers * [[root]] of a function, [[x-intercept]] * [[y-intercept]] * [[linear function]], [[polynom]] (polynomial function) * [[function]] >>&<< ---- (:showhide3 init=hide div=box4 lshow='Add comment' lhide='Close':) >>id=box4<< (:commentbox:) >><< [table width=100%] [row] [][[glossary/Q| Attach:main/tri_purple_up_a.gif ]] [[glossary/Q| Up one level]] [r](:html:) (:htmlend:) [tableend]