Newton-Raphson method
In a nutshell
The Newton-Raphson method is a way to quickly find a root. It uses differentiation and tangential lines to locate roots. The method is quick when it works, but runs into issues if the starting point x0 is not chosen carefully.
Newton-Raphson diagram
The method uses tangent lines to find the root. Below is the function f(x)=0.25x3−0.5x2−x−3.
To construct the diagram, you take an x0 value and find the point (x0,f(x0)). You then create a tangent line to y=f(x) at the point (x0,f(x0)). This line will have the slope f′(x). The point where this line intersects the x-axis becomes x1. You then take a tangent to y=f(x) at the point (x1,f(x1)) and repeat until you find the root. Below is what the diagram should look like.
Newton-Raphson formula
The Newton-Raphson formula is xn+1=xn−f′(xn)f(xn). This formula will allow you to find subsequent xn values as they become closer to the root.
Procedure
1. | Differentiate f(x) to find f′(x).
|
2.
| Choose a value to be x0.
|
3.
| Use x0 to find x1 with the formula x1=x0−f′(x0)f(x0)
|
4.
| Use x1 to find x2, and repeat until you find the root.
|
Failures of the Newton-Raphson method
You have to be careful picking x0 values for the Newton-Raphson method to work. If your chosen x0 value is too close to a turning point on the curve, the slope of the tangent f′(x) will be close to zero. The subsequent x1 value will be far away from the root.
Another issue arises if a value chosen for x0, or if any value for xn at all, is directly on the turning point. The method fails, as to complete f′(xn) would result in a division by zero. The tangent at a turning point will not intersect with the x-axis and will not facilitate the finding of a root.
Example 1
Use the Newton-Raphson method on the function f(x)=1.5x3+2x2−8x−4 to find a root rounded to 3 d.p. Take x0=5 as your starting point.
First, find f′(x) by differentiation.
f(x)f′(x)f′(x)=1.5x3+2x2−8x−4=(3)(1.5)x3−1+(2)(2)x2−1−(1)(8)x1−1−(0)(4)=4.5x2+4x−8
Use the Newton-Raphson method to find the root.
xn+1f(x)f′(x)x0x1x1x1x2x3x4x5x6=xn−f′(xn)f(xn)=1.5x3+2x2−8x−4=4.5x2+4x−8=5=5−f′(5)f(5)=5−4.5(5)2+4(5)−81.5(5)3+2(5)2−8(5)−4=3.4458=3.4458−f′(3.4458)f(3.4458)=2.5414=2.5414−f′(2.5414)f(2.5414)=2.1185=2.1185−f′(2.1185)f(2.1185)=2.0077=2.0077−f′(2.0077)f(2.0077)=2.0000=2−f′(2)f(2)=2
The root of f(x) is 2.