Lesson Explainer: Newton–Raphson Method | Nagwa Lesson Explainer: Newton–Raphson Method | Nagwa

# Lesson Explainer: NewtonโRaphson Method Mathematics

In this explainer, we will learn how to use the NewtonโRaphson method to approximate the solutions of equations of the form .

Often, it is not easy (or even possible) to determine the exact values of roots of certain functions. This is one reason it is useful to develop numerical techniques to approximate these values to any degree of accuracy that is necessary. Another reason is that computers are becoming faster, and so developing more efficient algorithms can aid us in finding approximations.

In this explainer, we will explore a method for approximating the roots of differentiable functions named after Isaac Newton and Joseph Raphson. The idea of the method is to use tangent lines to find the roots. First of all, it is necessary to choose a value that is a โcloseโ first approximation to the root we want to find, which we usually denote by . Then, there is an iterative process for any greater than or equal to 0 that we can use:

1. Find the tangent line to at .
2. Find the point of intersection between the tangent line and the , denoted by .
3. Repeat this process for and so on.

Using this process from a given estimate, , to a root, we can find , , and so on, with the process (hopefully) converging to the root in question.

We can represent this process graphically by sketching tangent lines. For instance, consider the following graph of , with as our first approximation. We find the tangent line to at by differentiating to find that . So, the slope of the tangent line is .

We get the following tangent line with equation .

We can apply this process again starting at , the -intercept of the tangent, to obtain the following.

If we keep applying this process, then we see that successive iterations will approach the root of the function.

We can find the exact equation of a tangent line at by noting it passes through the point and has a slope of . We recall that the equation of a line passing through with a slope of has the equation , so the tangent line has the equation

The -intercept of this line occurs when . We can substitute and into the equation and rearrange to get provided we can differentiate and is nonzero.

We now have an equation where on the right-hand side, we can substitute in the previous value in the iteration, , and on the left-hand side, we will get the new value, .

It is worth noting that we should not choose a starting value close to a turning point of or any point with slope close to 0 since that will make the term very large or undefined. Graphically, the tangent line will run parallel to the and therefore will never intersect it.

We also ideally want to choose a starting value that is close to the root we want to find since it will take more iterations to converge if the root is further away. And if there are multiple roots, then the algorithm could potentially converge to a different root.

This iterative formula is known as the NewtonโRaphson method for approximating the roots of , and we can define the method formally as follows.

### Theorem: NewtonโRaphson Method for Approximation of Roots

If is a differentiable function, then the NewtonโRaphson method for approximating the roots of is the given by iterative formula

We should choose the starting value, , such that the slope is not close to 0 so that the term is not too large (or undefined).

In our first example, we will use a graph of a function to identify which of a list of five given points are suitable stating points for a NewtonโRaphson approximation of a specific root of the function.

### Example 1: Explaining Why It Is Important to Be Careful When Picking the Starting Value in the NewtonโRaphson Method

The diagram shows the graph of the equation , where . The function has a root in the interval . Which of the points on the graph are suitable first approximations to when applying the NewtonโRaphson method to ?

1. Only , , and
2. Only and
3. Only and
4. Only , , and
5. Any of the points are suitable.

The NewtonโRaphson method of approximating the root of an equation is often a very quick way of approximating the roots of functions that we can differentiate. However, we need to be careful when choosing our starting values. The NewtonโRaphson method uses lines of tangency to choose the next iteration. This means that choosing initial points where the curve has a slope close to 0 can cause the process to fail.

For instance, on points and , the slope of the curve appears to be 0. We can see that this means tangent lines at these points will not intersect the , which means the NewtonโRaphson method will fail to define the next value in the iteration .

We can also see this by recalling that the NewtonโRaphson method is the iterative formula

If , then the expression is not defined since we cannot divide by zero. Similarly, if is close to zero, then will be very large. So, it is a good idea not to choose the initial value close to any turning point.

The other three points all have a slope that is not close to zero, so they should be good points to start with in this method. However, we should check that they will approach root . But since is the only root, there is no chance that it will converge to a different root.

Hence, only points , , and are suitable choices, and points and are not suitable. We see that this is given by choice A.

In our next example, we will apply the NewtonโRaphson method to a given function at a given starting value in order to approximate a root of the function.

### Example 2: Using the NewtonโRaphson Method to Approximate the Root of an Equation

Given that and that a root to denoted by lies in the interval , find the second approximation to given a first approximation of .

We first recall that the NewtonโRaphson method for approximating the roots of a function is given by the iterative formula

We want to apply this formula with . To do this, we need to find an expression for . We can differentiate each term of separately using the power rule for differentiation for the first term and recalling that . Therefore,

It is worth noting that to apply this derivative result we need the angles to be measured in radians.

We can substitute this expression for and the given expression for into the iterative formula to obtain

We can now substitute and into the formula and evaluate to get

We should be careful to evaluate the trigonometric functions in radians since we used differentiation to find this approximation and there is no root in when the angle is measured in degrees.

Since is our first approximation, is our second approximation. We can round this to three decimal places to obtain .

In our next example, we will apply the NewtonโRaphson method to a given function involving an exponential function at a given starting value in order to approximate a root of the function.

### Example 3: Using the NewtonโRaphson Method to Approximate the Root of an Equation

Let . If we were to apply the NewtonโRaphson method to find the solution to taking as a first approximation, then what would be to 3 decimal places?

We first recall that the NewtonโRaphson method for approximating the roots of a function is given by the iterative formula

We want to apply this formula with . To do this, we need to find an expression for . We can do this using the power rule for differentiation and the rule that for any real constant .

This allows to differentiate term by term as follows:

We can substitute this expression for and the given expression for into the iterative formula to obtain

We can now substitute and into the formula and evaluate to get

Since is our first approximation, is our second approximation. We can round this to three decimal places to obtain 1.087.

Until now, we have just used the NewtonโRaphson method to find a second approximation given a first one. But inevitably, we will need to ask how accurate these approximations are and when we can stop the process. To answer these, recall that given a function , we can check that an approximation to the solution is accurate by considering the values on either side of the approximation.

For instance, if we find an approximation of and that and have opposite signs, then this would prove that the root lies in the interval . We can also note that all values in this interval round to give , so this would show that is an accurate approximation of the root to one decimal place.

In our next example, we will apply the NewtonโRaphson method and this process to approximate the root of a function to three decimal places of accuracy.

### Example 4: Using the NewtonโRaphson Method to Approximate the Root of an Equation

Let . Let us take a first approximation of 2.1 to the root of , where .

1. Apply the NewtonโRaphson method once to find a second approximation. Give your answer to 3 decimal places.
2. By considering the change of the sign of over an appropriate interval, determine whether this answer is accurate to 3 decimal places.

Part 1

We first recall that the NewtonโRaphson method for approximating the roots of a function is given by the iterative formula

We want to apply this formula with . To do this, we need to find an expression for . We can do this using the product rule, which tell us if , then provided and are differentiable. We then recall that and . This allows to differentiate as follows:

It is worth noting that to apply this derivative result we need the angle to be measured in radians.

We can substitute this expression for and the given expression for into the iterative formula to obtain

We can now substitute and into the formula and evaluate to get

We should be careful to evaluate the trigonometric functions in radians since we used differentiation to find this approximation.

Since is our first approximation, is our second approximation. We can round this to three decimal places to obtain 2.069.

Part 2

We can recall that if a function is continuous and the function changes sign between two input values and , then the function must have a root between these values. This is useful for bounding the possible values where a root can occur.

We want to check if our approximation is accurate to three decimal places. For the approximation to be accurate to three decimal places, root must round to this value, so we must have .

We can check if is in this interval by checking if the function changes sign between these values:

Since both of these outputs are negative and there is a single root in the interval , we know that this is not the correct interval for the root.

Although it is not necessary, we can find that the sign of changes between 2.0695 and 2.0705; so, to three decimal places, we note that .

Hence, we can say that it is not accurate to three decimal places.

In our final example, we will apply the NewtonโRaphson method to approximate the root of a function and then we will consider the change of the sign of the function on an appropriate interval to check the accuracy of this approximation.

Recall that if is a continuous function and changes sign between and , then has a root between these values.

### Example 5: Using the NewtonโRaphson Method to Approximate the Root of an Equation

Given that and that a root of lies within the interval , answer the following questions.

1. Use the NewtonโRaphson method with the first approximation 0.8 to to find a second approximation. Give your answer to 3 decimal places.
2. By considering the change of the sign of over an appropriate interval, determine whether this answer is accurate to 3 decimal places.
1. Yes, it is accurate.
2. No, it is not accurate.

Part 1

We first recall that the NewtonโRaphson method for approximating the roots of a function is given by the iterative formula

We want to apply this iteration a single time with an initial value of . To do this, we first need to differentiate with respect to . We could do this by applying the chain rule; however, it is easier to rewrite using the power rule for logarithms. We have

We can now differentiate each term separately to get

We can use this expression for and the given expression for to apply one iteration of the NewtonโRaphson method:

Rounding this value to three decimal places yields 0.806.

Part 2

We can recall that if a continuous function changes sign between two input values and , then the function must have a root between these values. This is useful for bounding the possible values where a root can occur.

We want to check if our approximation is accurate to three decimal places. For the approximation to be accurate to three decimal places, root must round to this value, so we must have .

We can check if is in this interval by checking if the function changes sign between these values:

Since the function changes sign between and , we know that the root lies between these values. Any value of between these values rounds to three decimal places to give 0.806.

Hence, we can say that it is accurate to three decimal places.

Letโs finish by recapping some of the important points from this explainer.

### Key Points

• The NewtonโRaphson method is the iterative formula for approximating the roots of . We start by choosing a starting approximation as close to the root as possible and putting it into the right-hand side of the equation to get the next value in the iteration. We need to be able to differentiate to apply this formula, and we should also choose starting values where the slope is not close to 0 so that the term is not too large (or undefined).
• We can recall that if a continuous function changes sign between two input values and , then the function must have a root between these values. This is useful for bounding the possible values where a root can occur. We can also use this to determine the accuracy of our approximations by checking for sign changes.