Newton's Method to Find Zeros of a Function

Newton's method is a numerical technique that uses the first derivative to approximate zeros of functions. Below are detailed examples demonstrating its application. You can verify results using this Newton's method calculator.

Newton's Method

Newton's (or Newton-Raphson) method is based on the recursive formula:

\[ x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}, \quad n = 0, 1, 2, \ldots \]

Begin by selecting a starting point near the zero of the function. Then iterate using the formula above. This method is widely used and easily implemented in most programming languages.

Example 1

Use Newton's method to approximate the largest zero of:

\[ f(x) = x^2 + 3x + 1 \]

Solution to Example 1

The zeros of this quadratic function can be found analytically, but we will use Newton’s method for comparison. By graphing \( f \), we observe two negative zeros. The larger zero is closer to 0. Let’s take \( x_0 = 0 \) as the initial approximation.

Newton's Method Example 1

The derivative is:

\[ f'(x) = 2x + 3 \]

Starting at \( x_0 = 0 \): \[ x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = 0 - \frac{0^2 + 3(0) + 1}{2(0) + 3} = -\frac{1}{3} \] \[ x_2 = -\frac{1}{3} - \frac{f(-1/3)}{f'(-1/3)} \approx -0.38095238 \] \[ x_3 \approx -0.38196555, \quad x_4 \approx -0.38196601, \quad x_5 \approx -0.38196601 \]

Compare this to the exact root using the quadratic formula: \[ z_2 = \frac{-3 + \sqrt{5}}{2} \approx -0.38196601125\ldots \] Newton’s method gives accuracy to 8 decimal places.

Checking accuracy: \[ f(x_5) \approx 2.8 \times 10^{-9} \] This confirms that \( x_5 \) is a very accurate approximation.

Note: Example 1 was chosen to compare Newton’s approximation with an exact solution. Newton’s method is most useful for equations that lack an analytical solution, as in the next examples.

Example 2

Solve the equation \( e^{x-3} = -x + 2 \) using Newton’s method.

Solution to Example 2

Rewrite the equation as: \[ f(x) = e^{x - 3} + x - 2 = 0 \] Then: \[ f'(x) = e^{x - 3} + 1 \]

The graph suggests a zero near \( x = 2 \), so let \( x_0 = 2 \). Then: \[ x_1 = 2 - \frac{e^{-1}}{e^{-1} + 1} \approx 1.73105857 \] \[ x_2 \approx 1.72154537, \quad x_3 \approx 1.72153545, \quad x_4 \approx 1.72153545 \] Since \( x_4 = x_3 \) to 8 decimals, the process stops.

Verification: \[ f(x_4) \approx -9.3 \times 10^{-9} \] \[ \text{Left: } e^{x_4 - 3} \approx 0.278464540 \quad \text{Right: } -x_4 + 2 \approx 0.278464550 \] Hence, \( x_4 = 1.72153545 \) is an excellent approximation.

Newton's Method Example 2

Example 3

Approximate \( \sqrt[3]{5} \) using Newton’s method.

Solution to Example 3

The cube root of 5 solves \( x = \sqrt[3]{5} \Rightarrow x^3 = 5 \), or: \[ f(x) = x^3 - 5 = 0, \quad f'(x) = 3x^2 \] From the graph, a good starting point is \( x_0 = 2 \).

\[ x_1 = 2 - \frac{2^3 - 5}{3 \cdot 2^2} = 1.75 \] \[ x_2 = 1.71088435, \quad x_3 = 1.70997642, \quad x_4 = x_5 = 1.70997594 \] Thus, \( \sqrt[3]{5} \approx 1.70997594 \).

Newton's Method Example 3

Explore More Applications

Applications of Differentiation