You are on page 1of 16

LECTURE 4 OF 4

7.2 SOLUTIONS OF
NON-LINEAR EQUATIONS

OBJECTIVES
Use the Iteration and Newton-
Raphson methods to find the
approximate root of an equation.
OBJECTIVES

Use the Iteration and


Newton-Raphson methods to
find the approximate root of
an equation.
EXAMPLE 1

Show that the equations 2 sin x – x = 0


has a root between x = 1 rad and x= 2 rad.
Find the root of the equation by using
iteration method and Newton Raphson
method, giving your answer to two
decimal places.
SOLUTION

f(x) = 2 sin x – x

f(1) = 2 sin 1 – 1 = 0.6829 > 0


f(2) = 2 sin 2 – 2 = -0.1814 < 0

Since f(1) > 0 and f(2) < 0,


f(x) has a root between x=1 rad
and
x=2 rad
Iteration method:
2 sin x – x
=0
x = 2 sin x

g(x) = 2 sin x

g(x) = 2 cos x

g '(1 . 5 ) = | 2 cos 1.5 | = 0.1415 (<1 )


So,the iteration function : g(x) = 2 sinx
g(x) = 2 sin x
x1 = 1.5
x2 = 2sin 1.5 = 1.9950
x3 = 2 sin 1.9950 = 1.8227
x4 = 2 sin 1.8227 = 1.9369
x5 = 2 sin 1.9369 = 1.8675
x6 = 1.9126
x7 = 1.8843
x8 = 1.9025
x9 = 1.8910
x10 = 1.8984
x11 = 1.8937
x12 = 1.8967
x13 = 1.89474
x14 = 1.89597
x15 = 1.89519

Thus, the root is 1.90 ( two


decimal places ).
Newton Raphson
method:
f(x) = 2 sin x - x f ( xn)
f’(x) = 2 cos x – xn 1 xn 
f ' ( xn )
1
2 sin x  x
x n  1 x n 
2 cos x  1
x1 = 1.5
2 sin1.5  1.5
x 2  1.5  = 2.0766
2 cos1.5  1
2sin 2.0766  2.0766
x 3  2.0766 
2 cos 2.0766  1
 1.9105
2sin1.9105  1.9105
x 4  1.9105 
2 cos1.9105  1
 1.8956
2sin1.8956  1.8956
x 4  1.8956 
2 cos1.8956  1
 1.8955

Thus, the root is


1.90 ( 2d.p).
EXAMPLE 2

Sketch the graph of y = ex and y = 2 – x


on the same axes. Get the first
approximation, x0 for the equation ex = 2 – x
where 0 < xo < 1. Hence, by using Newton-
Raphson method , solve the equation of
1
e-x = 2  x to three decimal places.
y

1
2 x

0<x0<2

Let x0= 0.4


Newton-Raphson
method:
1
e-x =
2x
1
x = 2 – x
e
ex = 2 – x  e x – 2 + x = 0

f(x) = ex - 2+x
f ’(x) = ex + 1
x0 = 0.4 ( from
graph )
f ( xn)
xn 1 xn 
f ' ( xn )

x0 = 0.4
e  2  0.4
0.4
x1  0.4  =0.44341
e 1
0.4

e 0.44341
 2  0.44341
x2  0.44341  =0.44285
e 0.44341
1

Thus, x=0.443 ( 3d.p )


EXAMPLE 3 (PAST YEAR 2006)
(a) Use the trapezoidal rule with n = 4 to
1
dx
approximate  1 x . Using definite
0
1
dx
Integration, find the value of  .
0
1 x

Compare the answers and give a reason for


the difference. [7 MARKS]

(b)Approximate 7 by using Newton-Raphson


3

method and initial value 2, up to the 2nd


iteration. [3 MARKS]
1
(a) h =
4
1
dx 1 1 1 1 1 0.2
0 1  x  [1  0  2(1.25  1.5  1.75  2.0 )]( 2 )  0.697
1
1
0 1  xdx  ln x  1 0  ln 2  ln1  0.693
1

Value , , By trapezoidal rule, n is very small.


(b) Let x = 3
7  x  7 x 7  0
3 3

f ( x)  x  7
3

f ( x)  3x
' 2

23  7
x1  2  2
 1.9167
3(2)
3
 23 
  7
23  12 
x2    1.91294
12 23 2
3( )
12
Thus, x = 1.91 ( 3s.f )

You might also like