Skip to main content
Physics LibreTexts

13.2: Example- Square Roots

  • Page ID
    92196
  • \( \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}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    When the first electronic calculators became available in the mid-1970s, many of them were simple "fourfunction" calculators that could only add, subtract, multiply, and divide. The author's father, L.L. Simpson (Ref. [11]), showed him how he could calculate square roots on one of these calculators using Newton's method, as described here.

    To calculate the square root of a number \(k\), we wish to find the number \(x\) in the equation

    \[x=\sqrt{k} \text {. }\]

    Squaring both sides then subtracting \(k\) from both sides, we get a function of the form of Eq. (13.1.1):

    \[f(x)=x^{2}-k=0 .\]

    The values of \(x\) that satisfy this equation are the desired square roots of \(k\). Newton's method for finding square roots is then Eq. (10.2.2) with this \(f(x)\) (and with \(f^{\prime}(x)=2 x\) ):

    \[x_{n+1}=x_{n}-\frac{x_{n}^{2}-k}{2 x_{n}}\]

    For example, to calculate \(\sqrt{5}\), set \(k=5\). Make an initial estimate of the answer-say \(x_{0}=2\). Then we calculate several iterations of Newton's method (Eq. \(\PageIndex{3}\) to get better and better estimates of \(\sqrt{5}\) :

    \[
    \begin{align}
    & x_{0}=2 \\[6pt]
    & x_{1}=x_{0}-\frac{x_{0}^{2}-5}{2 x_{0}}=2-\frac{2^{2}-5}{2 \times 2}=2.2500 \\[6pt]
    & x_{2}=x_{1}-\frac{x_{1}^{2}-5}{2 x_{1}}=2.2500-\frac{2.2500^{2}-5}{2 \times 2.2500}=2.2361 \\[6pt]
    & x_{3}=x_{2}-\frac{x_{2}^{2}-5}{2 x_{2}}=2.2361-\frac{2.2361^{2}-5}{2 \times 2.2361}=2.2361
    \end{align}
    \]

    After just a few iterations, the solution has converged to four decimal places: we have \(\sqrt{5}=2.2361\).

    There are actually two square roots of 5 . To find the other solution, we choose a different initial estimate, one that is closer to the other root. If we take the initial estimate \(x_{0}=-2\), we get
    \[
    \begin{align}
    & x_{0}=-2 \\
    & x_{1}=x_{0}-\frac{x_{0}^{2}-5}{2 x_{0}}=-2-\frac{(-2)^{2}-5}{2 \times(-2)}=-2.2500 \\[6pt]
    & x_{2}=x_{1}-\frac{x_{1}^{2}-5}{2 x_{1}}=-2.2500-\frac{(-2.2500)^{2}-5}{2 \times(-2.2500)}=-2.2361 \\[6pt]
    & x_{3}=x_{2}-\frac{x_{2}^{2}-5}{2 x_{2}}=-2.2361-\frac{(-2.2361)^{2}-5}{2 \times(-2.2361)}=-2.2361
    \end{align}
    \]

    So to four decimals, the other square root of 5 is -2.2361 .

    L.L. Simpson notes that Eq. \(\PageIndex{3}\) for computing square roots was typically used in the equivalent form

    \[x_{n+1}=\frac{1}{2}\left(x_{n}+\frac{k}{x_{n}}\right) \text {, }\]

    so that you repeatedly find the average of \(x_{n}\) and \(k / x_{n}\). For the above example of finding \(\sqrt{5}\), this gives:

    Initial est   = 2
    1st iteration: Average of 2 and 5/2 = 2.25
    2nd iteration: Average of 2.25 and 5/2.25 = 2.2361
    3rd iteration: Average of 2.2361 and 5/2.2361 = 2.2361 (converged)

    13.2: Example- Square Roots is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?