Documente Academic
Documente Profesional
Documente Cultură
RAPHSON METHOD
Compiled by Dr EL Voges, Soshanguve South
OUTCOME
Implement the Newton-Raphson method in suitable situations to determine numerical
solutions of equations.
ASSESSMENT CRITERIA
After studying this module you must be able to:
1. Solve a given equation using the Newton-Raphson method;
2. Perform a specified number of iterations of the Newton-Raphson method;
3. "Guess" a first approximation to the solutions
3.1 sing a sketch and/or
3.2 using the remainder theorem; and
3. Discuss the limitations of the Newton-Raphson method.
PREREQUISITES
In order to perform the tasks/calculations in this module, you must know and be able to
implement the following:
1. Differentiation techniques learnt so far; and
2. The remainder theorem.
TERMINOLOGY
At the end of this module you must be able to explain and use the following concepts.
First approximation Initial guess Iteration
Iterative process Newton-Raphson method Remainder theorem
APPROXIMATE TIME
Two hours in theory class.
You should spend at least three hours of your study time doing the exercises in
the textbook and on WebCT!
ASSESSMENT
You will come across questions on the contents of this module in the exam, in the first
major test and in class tests.
1
IN THE TEXTBOOK
pp. 351-356
PRACTISE
Textbook: Exercise 7(h), pp. 355-356; Miscellaneous Exercise 7, pp. 358, #20
The complete solutions to all the exercises in the textbook are available on the
web at www.palgrave.com/science/engineering/singh.
f (rn )
rn+1 = rn − .
f '(rn )
When asked for an answer with three decimal places, round all intermediate
approximations off to four decimal places.
Example 1
Solve cos x − x = 0 the Newton-Raphson method and initial guess r1 = 1 . Work
accurately to four decimal places.
2
SOLUTION
f ( x) = cos x − x ⇒ f '( x) = − sin x − 1
cos rn − rn (cos rn − rn )
Thus, the Newton-Raphson formula is rr +1 = rn − = rn + .
− sin rn − 1 (sin rn + 1)
4. Using Derive
The Derive command: NEWTON(u,x,x0,n)
where
• u is a univariate expression, that is, an expression in
one variable
• x is the variable
3
• x0 is the initial guess
• n+1 iterations will be done
Practice with Derive by answering all the questions in the additional exercises at
the end of this document.
Example 2
Newton invented his version of the Newton-Raphson method while trying to solve the
equation x 3 − 2 x − 5 = 0 . (Burden & Faires, 2005:63;Edwards & Penny, 2002:179).
Determine the solution of this equation close to 2 accurately to four decimal places.
SOLUTION
xn 3 − 2 xn − 5
f ( x) = x − 2 x − 5 ⇒ f '( x) = 3 x − 2
3 2
∴ xn +1 = xn − 2
3 xn − 2
SOLVE
• Enter the original equation
ALPHA X SHIFT x3 – 2 ALPHA X – 5 ALPHA = 0 You'll see the
equation
• Solve the equation
SHIFT SOLVE 2 =
CALC
• Enter the iterative formula – remember the ALPHA
X 3 − 2X − 5
X − 2
3X − 2
• Determine the values of x
4
21
CALC 2 = See = 2.1
10
11761
CALC 2.1 = See = 2.094568121
5615
CALC 2.09457 See 2.094551482
CALC 2.09455 See 2.094551482
∴ x ≈ 2.0946
Example 3
Use numerical methods to solve for x if x3 − x − 1 = 0 and the indicated initial value. Give
the answer correct to four decimal places.
a) r1 = 1 b) r1 = 0.6 c) r1 = 0.5
SOLUTION
f ( x) = x3 − x − 1 ⇒ f '( x) = 3 x 2 − 1
a) r1 = 1 b) r1 = 0.6 c) r1 = 0.5
r2 = 1.5 r2 = 17.9 r2 = −5.0
r3 ≈ 1.34783 r3 ≈ 11.94680 r3 ≈ −3.36486
r4 ≈ 1.32520 r4 ≈ 7.98552 r4 ≈ −2.28095
r5 ≈ 1.32472 r5 ≈ 5.35691 M
r6 ≈ 1.32472 r6 ≈ 3.62540 r7 ≈ −0.561403
∴ x ≈ 1.3247 r7 ≈ 2.50559 r8 ≈ −11.85980
r8 ≈ 1.82013 M
r9 ≈ 1.46104 r20 ≈ 1.32472
r10 ≈ 1.33932 r21 ≈ 1.32472
r11 ≈ 1.32491 ∴ x ≈ 1.3247 Υ
r12 ≈ 1.32472
r13 ≈ 1.32472
∴ x ≈ 1.3247
Note the 0 in r8 ≈ −11.85980 . Leaving out this zero will imply four decimal
places.
5
Why did we need so many iterations in (b) and 20 in (c) to reach the required
accuracy?
y 0.5
x
-1 -0.5 0 0.5 1 1.5 2
0
f
1
-0.5
-1
f
0. 6
f
0. 5
-1.5
Turning point
3
Figure 1 The graph of f ( x ) = x − x − 1
• Consider the graph of f ( x) given in Figure 1. From the graph we see that
the equation x3 − x − 1 = 0 has only one root between 1 and 1.5. Thus,
choosing r1 = 1 will converge to the correct answer relatively quickly
while r1 = 0.6 , which is further away from the actual solution, will require
more steps.
• One turning point of f ( x) is at x = 3 3 ≈ 0.57735 . Thus, the actual root is
to the right of this turning point. But 0.5 is to the left of this turning point
and hence choosing r1 = 0.5 will require even more steps.
Example 4
Use Derive to determine the root of f (b) = (b 2 − 1) sin b − 2b cos b , b ≥ 0 , with the
indicated initial approximations.
a) r1 = 7 b) r1 = 8
SOLUTION
a) r1 = 7
In Derive: NEWTON((b - 1)·SIN(b) - 2·b·COS(b), b, 7, 7)
The answer: [7, 6.604697609, 6.584733220, 6.584620046, 6.584620042,
6.584620042, 6.584620042, 6.584620042]
b) r1 = 8
In Derive: NEWTON((b^2-1)*sin(b)-2b*cos(b), b, 8, 7)
6
The answer: [8, 5.162145435, 1.844325061, 1.371290831, 1.309318149,
1.306548196, 1.306542374, 1.306542374]
Consider the graph in Figure 2 to see the reason for the different answers.
50
g
8
25
x
0
0 2 4 6 8 10
-25
2
Figure 2 The graph of f (b) = (b − 1) sin b − 2b cos b
Some limitations
• The initial guess must be relatively close the root to limit the number of iterations
required. However, with computer technology such as Derive the approximate
root may be obtained in the blink of the eye.
• The initial guess must be close enough to the root to prohibit convergence to a
different root, as was the case in Example 4.
We strongly recommend that you do all the exercises in the textbook and
additional exercises using your calculator and Derive.
7
NUMERICAL METHODS: THE NEWTON-
RAPHSON METHOD
Compiled by Dr EL Voges, Soshanguve South
ADDITIONAL EXERCISES
The answers to these questions are given at the end of this document.
1. Use the Newton-Raphson method to determine roots close to the initial guesses.
Give the answers rounded off to four decimal places.
1.1 2 sin x = x, r1 = 2 1.2 2 sin x = x, r1 = −2
1.3 x3 = 4 x − 1, r1 = 2 1.4 x3 = 4 x − 1, r1 = −2
1.5 2 cos x = 2 − x, r1 = 3.5 1.6 x5 − 10 = 0, r1 = 1.5
1.7 3 x − 1 = x, r1 = 1.1 1.8 x3 − 2 x + 1 = 0, r1 = −2
1.9 3ln x − x = 0, r1 = 2 1.10 x3 = 5cos 2 x, r1 = 0.5
The following questions are from Finney, Weir & Giordano, 2003:303-304.
3. Explain why the following four statements ask for the same information:
a) Determine the roots of f ( x) = x3 − 3 x − 1 .
b) Determine the x coordinates of the intersections of the curve y = x3 with the
line y = 3 x + 1 .
c) Determine the x-coordinates of the points where the curve y = x3 − 3 x crosses
the horizontal line y = 1 .
d) Determine the values of x where the derivative of g ( x) = 14 x 4 − 32 x 2 − x − 5
equals zero.
8
4.2 Use Newton's method (the Newton-Raphson method) to determine all the roots
accurately to six decimal places.
9
NUMERICAL METHODS: THE NEWTON-
RAPHSON METHOD
Compiled by Dr EL Voges, Soshanguve South
ANSWERS
1.1 1.8955 1.2 -1.8955 1.3 1.8608 1.4 -2.1149
1.5 3.6982 1.6 1.5849 1.7 1.1459 1.8 -1.6180
1.9 1.8572 1.10 0.74414 2.1 1.41421 2.2 2 ≈ 1.41421
3. Discussion 4.1 3 4.2 -1.026173; 0.350035; 1.237996
5.1 Proof 5.2 2.45 5.3 2.45 × 10 −4
Back
10