Calculating the square root of a

From testwiki
Revision as of 08:52, 31 January 2024 by imported>MathXplore (added Category:Square root using HotCat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In this learning project, we learn how to approximate the square root of a number numerically.

Newton's method

File:Newton iteration.svg

Newton's method is a basic method in numerical approximations. The idea of Newton's method is to "follow the tangent line" to try to get a better approximation. For more details, see w:Newton's method

Try your hand on Newton's method

Step-by-step

Cut and paste the following wikitext into the sandbox, and enter your favourite number and a first (non-zero!) approximation of its square root. See what happen after multiple edit-and-saves:

{{subst:square root|number|first approximation}}

Sandbox

{{subst:square root|17|4.1231056256177}}
4.1231056256177
4.1231056256177
4.1231056256177
4.1231056256177
4.1231056256177
4.1231056256177
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310562562
4.12310877528
4.1282051282
4.33333333333
3


What is going on

Our calculator-template Template:Tl implements the formula xn+1=(xn+a/xn)/2, which is an instant of the general formula for Newton's method xn+1=xnf(xn)f(xn) in the case when the function f(x) is given by f(x)=x2a. It solves the equation x2a=0 numerically, by successive approximations.


Template:Mathematics-stub