This note is one of many taken during 2026
On Newton’s Method
May 22nd 2026
Newton’s method allows finding the ‘root’ of a function (where it is zero), given conditions expressed in the wikipedia article no doubt.
More than this however, it can be used to find the inverse of a function. The common example is
2 \sqrt{2} 2 . If you know
x x x where
x 2 − 2 = 0 x^2-2=0 x 2 − 2 = 0 , then you know
2 \sqrt{2} 2 .
The rough gist of the algorithm is as follows.
Take a function like
f ( x ) = x 2 − 2 f(x) = x^2-2 f ( x ) = x 2 − 2
Make an arbitrary guess on the value of
x x x where
f ( x ) = 0 f(x)=0 f ( x ) = 0 ,
g 0 g_0 g 0
Evaluate
f ( x ) f(x) f ( x ) at
g 0 g_0 g 0 and find the line tangent to
f ( x ) f(x) f ( x ) at
g 0 g_0 g 0
Find the x-intercept of the tangent line. This x-intercept value is
g 1 g_1 g 1
Repeat steps 2…5 (incrementing
n n n throughout) until a satisfactory precision is obtained.
Algebraically, we start with the function and its derivative:
f ( x ) = x 2 − 2 f ′ ( x ) = 2 x
\begin{aligned}
f(x)&=x^2-2 & f'(x)&=2x
\end{aligned}
f ( x ) = x 2 − 2 f ′ ( x ) = 2 x And make a guess
g 0 g_0 g 0 and create the tangent line at that guess location on
f ( x ) f(x) f ( x )
y = f ′ ( g 0 ) x + b
y = f'(g_0)x + b
y = f ′ ( g 0 ) x + b find
b b b by evaluating at
g 0 g_0 g 0 :
f ′ ( g 0 ) g 0 + b = f ( g 0 )
f'(g_0)g_0 + b = f(g_0)
f ′ ( g 0 ) g 0 + b = f ( g 0 )
b = f ( g 0 ) − f ′ ( g 0 ) g 0
b = f(g_0) - f'(g_0)g_0
b = f ( g 0 ) − f ′ ( g 0 ) g 0 Which finishes the line equation as:
y = f ′ ( g 0 ) x + f ( g 0 ) − f ′ ( g 0 ) g 0
y = f'(g_0)x + f(g_0) - f'(g_0)g_0
y = f ′ ( g 0 ) x + f ( g 0 ) − f ′ ( g 0 ) g 0 Next, find the x-coordinate by evaluating at
y = 0 y=0 y = 0
0 = f ′ ( g 0 ) x + f ( g 0 ) − f ′ ( g 0 ) g 0 f ′ ( g 0 ) g 0 − f ( g 0 ) = f ′ ( g 0 ) x g 0 − f ( g 0 ) f ′ ( g 0 ) = x
\begin{aligned}
0 &= f'(g_0)x + f(g_0) - f'(g_0)g_0\\
f'(g_0)g_0-f(g_0) &= f'(g_0)x\\
g_0 - \frac{f(g_0)}{f'(g_0)} &= x
\end{aligned}
0 f ′ ( g 0 ) g 0 − f ( g 0 ) g 0 − f ′ ( g 0 ) f ( g 0 ) = f ′ ( g 0 ) x + f ( g 0 ) − f ′ ( g 0 ) g 0 = f ′ ( g 0 ) x = x As stated above, this
x x x value is actually
g 1 g_1 g 1 , or generally
g n + 1 = g n − f ( g n ) f ′ ( g n )
g_{n+1} = g_n - \frac{f(g_n)}{f'(g_n)}
g n + 1 = g n − f ′ ( g n ) f ( g n ) Going back the case of
2 \sqrt{2} 2 , we substitute in the function
g n + 1 = g n − g n 2 − 2 2 g n
g_{n+1} = g_n - \frac{{g_n}^2-2}{2g_n}
g n + 1 = g n − 2 g n g n 2 − 2 With
g n = 5 g_n=5 g n = 5 we see the first four approximations as:
g 0 = 5 g 1 = 2.7 g 2 ≈ 1.7204 g 3 ≈ 1.4415 g 4 ≈ 1.4145
\begin{array}{ccc}
g_0 &= &5\\
g_1 &= &2.7\\
g_2 &\approx &1.7204\\
g_3 &\approx &1.4415\\
g_4 &\approx &1.4145\\
\end{array}
g 0 g 1 g 2 g 3 g 4 = = ≈ ≈ ≈ 5 2.7 1.7204 1.4415 1.4145
As a tip, these recursive equations are easy to evaluate on a calculator by using the previous calculations value. In TI calculator parlance, spam:
ans − ans 2 − 2 2 ans
\text{ans} - \frac{\text{ans}^2-2}{2\text{ans}}
ans − 2 ans ans 2 − 2
Generally…
This process is easily generalized to finding inverses instead of roots — just as in the
2 \sqrt{2} 2 example.
f ( x ) f(x) f ( x ) was previously defined as
x 2 − 2 x^2-2 x 2 − 2 , but more generically is described as
f ( x ) = x 2 f(x)=x^2 f ( x ) = x 2 . Then, inside the recursive equation, the
− 2 -2 − 2 is placed outside the function
g n + 1 = g n − f ( g n ) − 2 f ′ ( g n )
g_{n+1} = g_n - \frac{f(g_n) - 2}{f'(g_n)}
g n + 1 = g n − f ′ ( g n ) f ( g n ) − 2 The above
g n + 1 g_{n+1} g n + 1 approximates
f − 1 ( 2 ) f^{-1}(2) f − 1 ( 2 ) . the
2 2 2 is replaced with some constant
c c c to find
f − 1 ( c ) f^{-1}(c) f − 1 ( c ) :
lim n → ∞ g n = f − 1 ( c ) where g n + 1 = g n − f ( g n ) − c f ′ ( g n )
\begin{aligned}
\lim_{n\to\infty} {g_n} &= f^{-1}(c) \\
\text{where}\>\>\> g_{n+1} &= g_n - \frac{f(g_n) - c}{f'(g_n)}
\end{aligned}
n → ∞ lim g n where g n + 1 = f − 1 ( c ) = g n − f ′ ( g n ) f ( g n ) − c
Casually extracting
2 2 2 from the function and replacing it with
c c c is a bit handwavey, but I assure you the algebra checks out. I’ve omitted it for brevity.
The generic case for
c \sqrt{c} c then is:
g n + 1 = g n − g n 2 − c 2 g n
g_{n+1} = g_{n} - \frac{{g_n}^2 -c}{2g_n}
g n + 1 = g n − 2 g n g n 2 − c Or
g n + 1 = g n − g n 2 − c 2 g n lim n → ∞ g n = c
\begin{aligned}
g_{n+1} &= g_n - \frac{{g_n}^2-c}{2g_n}\\
\lim_{n \to \infty} {g_{n}} &= \sqrt{c}
\end{aligned}
g n + 1 n → ∞ lim g n = g n − 2 g n g n 2 − c = c One way to loosely verify this is to: consider that when
n n n approaches
∞ \infty ∞ , the differences between
g n g_n g n and
g n + 1 g_{n+1} g n + 1 will grow increasingly smaller (assuming the limit does indeed converge) and indeed will be come so close that we can consider them to be equal. So, we set
g n + 1 = g n = x g_{n+1} = g_n = x g n + 1 = g n = x and solve:
x = x − x 2 − c 2 x x 2 − c 2 x = 0 x 2 = c x = c
\begin{aligned}
x &= x - \frac{x^2-c}{2x}\\
\frac{x^2-c}{2x} &= 0 \\
x^2 &= c\\
x &= \sqrt{c}
\end{aligned}
x 2 x x 2 − c x 2 x = x − 2 x x 2 − c = 0 = c = c Other inverses
This method can be extended to other functions. Some examples:
ln ( x ) ⇒ g n + 1 = g n − 1 + x e g n log 2 ( x ) ⇒ g n + 1 = g n − 1 + x 2 g n ln ( 2 ) x ⇒ g n + 1 = g n − g n + x
\begin{array}{rcl}
\ln(x) & \Rightarrow & g_{n+1} = g_n - 1 + \frac{x}{e^{g_n}} \\
\log_2(x) & \Rightarrow & g_{n+1} = g_n - 1 + \frac{x}{2^{g_n}\ln(2)} \\
x & \Rightarrow & g_{n+1} = g_n - g_n + x
\end{array}
ln ( x ) log 2 ( x ) x ⇒ ⇒ ⇒ g n + 1 = g n − 1 + e g n x g n + 1 = g n − 1 + 2 g n l n ( 2 ) x g n + 1 = g n − g n + x
The following would make quite a good math competition problem.
What does the following limit evaluate to?
lim n → ∞ g n = ? where g n + 1 = g n + c e g n − 1
\begin{aligned}
\lim_{n\to\infty} {g_n} &= \phantom{}? \\
\text{where}\>\>\> g_{n+1} &= g_n + \frac{c}{e^{g_n}} - 1
\end{aligned} n → ∞ lim g n where g n + 1 = ? = g n + e g n c − 1 a. Does not exist
b.
e c e^c e c
c.
ln ( c ) \ln(c) ln ( c )
d.
0 0 0
The answer is, of course,
ln ( c ) \ln(c) ln ( c )
Approximate Functions
By expanding the recursion a few steps, we can create an obnoxious approximation for
ln ( x ) \ln(x) ln ( x ) :
ln ( x ) ≈ x e 1 − x + x e − x e 1 − x − x + 2 + x e − x e 1 − x − x e − x e 1 − x − x + 2 − x + 3 + x − 4
\ln(x) \approx
x e^{1 - x} + x e^{- x e^{1 - x} - x + 2} + x e^{- x e^{1 - x} - x e^{- x e^{1 - x} - x + 2} - x + 3} + x - 4
ln ( x ) ≈ x e 1 − x + x e − x e 1 − x − x + 2 + x e − x e 1 − x − x e − x e 1 − x − x + 2 − x + 3 + x − 4
And one for
x \sqrt{x} x :
x ≈ 0.0625 x 4 + 1.75 x 3 + 4.375 x 2 + 1.75 x + 0.0625 0.5 x 3 + 3.5 x 2 + 3.5 x + 0.5
\sqrt{x}\approx\frac{0.0625 x^{4} + 1.75 x^{3} + 4.375 x^{2} + 1.75 x + 0.0625}{0.5 x^{3} + 3.5 x^{2} + 3.5 x + 0.5}
x ≈ 0.5 x 3 + 3.5 x 2 + 3.5 x + 0.5 0.0625 x 4 + 1.75 x 3 + 4.375 x 2 + 1.75 x + 0.0625
In a way, this approximation for
x \sqrt{x} x is quite reasonably constructed.
It has plenty of detail around the origin, but as it goes further the higher-order polynomial components divide out and all that is left is the slope asymptote.
These examples were generated with the Python library SymPy. (I got exhausted of writing it by hand around third recursion)
View Code
from sympy import symbols , simplify , print_latex
x = symbols ( "x" )
expr = 1
for i in range ( 0 , 3 ):
expr = 0.5 * expr + x / ( 2 * expr )
print_latex ( simplify ( expr ))
This note is one of many taken during 2026