Skip to main content
Physics LibreTexts

1.3: Quadratic Equations

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    Any reader of this book will know that the solutions to the quadratic Equation

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


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

    and will have no difficulty in finding that the solutions to

    \[2.9x^2 - 4.7x + 1.7 = 0 \nonumber\]


    \[x = 1.0758 \text{ or } 0.5449. \nonumber\]

    We are now going to look, largely for fun, at two alternative iterative numerical methods of solving a quadratic Equation. One of them will turn out not to be very good, but the second will turn out to be sufficiently good to merit our serious attention.

    In the first method, we re-write the quadratic Equation in the form

    \[x = \frac{-\left(ax^2 + c \right)}{b} \nonumber\]

    We guess a value for one of the solutions, put the guess in the right hand side, and hence calculate a new value for \(x\). We continue iterating like this until the solution converges.

    For example, let us guess that a solution to the Equation \(2.9x^2 − 4.7x + 1.7 = 0\) is \(x = 0.55\). Successive iterations produce the values

    \begin{array}{c c}
    0.54835 & 0.54501 \\
    0.54723 & 0.54498 \\
    0.54648 & 0.54496 \\
    0.54597 & 0.54495 \\
    0.54562 & 0.54494 \\
    0.54539 & 0.54493 \\
    0.54524 & 0.54493 \\
    0.54513 & 0.54494 \\
    0.54506 & 0.54492 \\

    We did eventually arrive at the correct answer, but it was very slow indeed even though our first guess was so close to the correct answer that we would not have been likely to make such a good first guess accidentally.

    Let us try to obtain the second solution, and we shall try a first guess of 1.10, which again is such a good first guess that we would not be likely to arrive at it accidentally. Successive iterations result in

    1.10830 \\
    1.11960 \\
    1.13515 \\

    and we are getting further and further from the correct answer!

    Let us try a better first guess of 1.05. This time, successive iterations result in

    1.04197 \\
    1.03160 \\
    1.01834 \\

    Again, we are getting further and further from the solution.

    No more need be said to convince the reader that this is not a good method, so let us try something a little different.

    We start with

    \[ax^2 + bx = -c \label{1.3.3}\]

    Add \(ax^2\) to each side:

    \[2ax^2 + bx = ax^2 - c \label{1.3.4}\]

    or \[(2ax + b)x = ax^2 - c \label{1.3.5}\]

    Solve for \(x\): \[x = \frac{ax^2-c}{2ax+b} \label{1.3.6}\]

    This is just the original Equation written in a slightly rearranged form. Now let us make a guess for \(x\), and iterate as before. This time, however, instead of making a guess so good that we are unlikely to have stumbled upon it, let us make a very stupid first guess, for example \(x = 0\). Successive iterations then proceed as follows.

    0.00000 \\
    0.36170 \\
    0.51751 \\
    0.54261 \\
    0.54491 \\
    0.54492 \\

    and the solution converged rapidly in spite of the exceptional stupidity of our first guess. The reader should now try another very stupid first guess to try to arrive at the second solution. I tried \(x = 100\), which is very stupid indeed, but I found convergence to the solution \(1.0758\) after just a few iterations.

    Even although we already know how to solve a quadratic Equation, there is something intriguing about this. What was the motivation for adding \(ax^2\) to each side of the Equation, and why did the resulting minor rearrangement lead to rapid convergence from a stupid first guess, whereas a simple direct iteration either converged extremely slowly from an impossibly good first guess or did not converge at all?

    1.3: Quadratic Equations is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Jeremy Tatum via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?