Anda di halaman 1dari 6

Newton's Method

THE CONCEPT
Newton's Method is used to find where f(x) crosses the x-axis.

This value of x, labelled r in the drawing, is called the root of f(x). This means that f(r) = 0

This root is found be a series of approximations.

As drawn, the root of f(x), occurs at ( x, y ) = ( r, 0 ) and is approached by the points { x , x , x , . . . } which are the x-intercepts of the t a n g e n t
o 1 2

l i n e s to the curve. Start with an initial guess x


o

and move up to the point ( x , f ( x


o 1

) ) on

the curve. Through this point, draw a tangent line and mark as x crosses the x-axis. Next, move up from x
1

where it

to the point ( x , f ( x
1

) ) on the curve. Through where it crosses the x-axis. ) ) on the curve


3

this point, draw a tangent line and mark as x Next, move vertically up from x

to the point ( x , f ( x
2

and through this point, draw another tangent line and mark as x crosses the x-axis

where it

By repeating this process over and over, the values x , x , x , x


0 1 2

will get

closer and closer to r, which is the root of f(x)

Mathematical Description If x
o

is some initial guess to the solution of f(x) = 0


o o

then, according to the graph, the tangent line through ( x , f ( x slope f'( x ) =
f ( x
1

) ) has

) f ( x x
1

However, this line has a y-value of zero, which means that f'( x ) =
0 f ( x x
1 o

This can be solved for x


f ( x f'( x ) )

to give

= x

o o

Similarly, the tangent line through ( x , f ( x


1 f ( x ) f ( x x
2

) ) has slope

f'( x

) =

and since this line has a y-value of zero, then f'( x ) =


0 f ( x x
2 1

This can be solved for x


f ( x f'( x ) )

to give

= x

1 1

As you can see from the graph, the numbers { x , x , x , . . . } get closer
o 1 2

and closer to the root r which represents the solution to f(x) = 0 Calculating these successive values of x is termed iterations ( meaning repetition ) and the general term for x which can be calculated from the
i + 1

previous value of x

can be obtained by
) )

i + 1

= x

f ( x f'( x

i i

where { x

} = { x

, x

, x

, x

, x

, . . . } are successive values that

get closer and closer to the root of f(x).

EXAMPLES
1. Suppose you wish to use Newton's method to solve f(x) = 0 for f(x) = ( x 2 ) To this end we use f'(x) = 2( x 2 ) and write
x
i + 1

= x

f ( x f'( x

i i

) )

= x = x

( x

i i

2 )

2( x ( x
i

2 )

2 ) 2

= =

2x 2 2x

( x

2 ) 2

( x 2

2 )

+ 2 2

which means that x

i + 1

+ 2 2
2

This equation can be used to GENERATE the solution to f(x) = ( x 2 ) = 0 Putting an INITIAL GUESS of x = 5 into this GENERATOR equation will give you
o

x x x x x x x x x x

= = = = = = = = = =

+ 2 2

= = = = = = = = = =

5 + 2 2

= 3.5 = 2.75 = 2.375 = 2.1875 = 2.09375 = 2.046875 = 2.0234375 = 2.01171875 = 2.005859375 = 2.002929688
th

+ 2 2

3.5 + 2 2 2.75 + 2 2

+ 2 2

+ 2 2

2.375 + 2 2 2.1875 + 2 2

+ 2 2

+ 2 2

2.09375 + 2 2 2.046875 + 2 2

+ 2 2

+ 2 2

2.0234375 + 2 2 2.01171875 + 2 2

+ 2 2

+ 2 2

2.005859375 + 2 2

10

which means that after the 10 After the 20


th

iteration, you will get x


20

10

= 2.002929688

iteration, you will get x

= 2.000001431

Had you started with an initial guess of x


{ x
1

= 1 you would get


20

= 1.5, x

= 1.75, . . . , x

10

= 1.999023438, . . . , x
o

= 1.999999046 }

Had your started with an initial guess of x


{ x
1

= 5 you would get


20

= -1.5, x

= 0.25, . . . , x

10

= 1.993164, . . . , x

= 1.999993324 }

It appears not to matter what your initial guess is, you get the same answer after many interations. You may wonder what all the fuss is about. We know the solution to f(x) = ( x 2 )
2

= 0 is 2

The thing is that Newton's Method can be used to give a numerical approximation to any equation of the form f(x) = 0

2. A handy tool to use when using Newton's Method is the spreadsheet. Here is how it works. If you are new to spreadsheets, jump to our link to spreadsheets before continuing. Suppose you need to find the roots to x
5

2x

x = 5

SOLUTION: Newton's Method requires that the equation to solve must be of the form f(x) = 0 This means that we need to write
f(x) = x
5

2x

x 5
) )

After substituting f(x) into


x
i + 1

= x

f ( x f'( x

i i

we obtain our generator equation x

i + 1

4x 5x

5 4

i i

4x 6x

3
i

+ 5 1

2
i

Before proceeding, lets create a plot of f(x) :

If you put an initial guess of x

= 1.5 the generator equation would give a

solution of 1.78625242 after 7 iterations.

To obtain a solution using a spreadsheet, enter the initial value of 1.5 into cell A1, then enter the formula
= ( 4*A1^5 4*A1&3 + 5 ) / ( 5*A1^4 6*A1^2 1 )

into cell A2. If you drag this down to about A9 you will obtain these formulas

What you see are the numbers generated by these formulas

The purpose of entering the formulas into column B is to check to see when x 2x
3

x = 5 is true.

WARNING: not all initial guesses will give you a good answer. For example, had you made an initial guess of x ), you would get nonsense
0

= 1 ( ie: setting cell A1 to 1

The reason for this is that for Newtons Method to work, you need to use the equation
x
i + 1

= x

f ( x f'( x

i i

) )

which implies that the slope function ( you know if you are about to make a bad ANSWER: look at a graph of the function not have to cross a point where f'( x )

f'( x ) ) should NEVER be zero. How will guess? and check that your initial guess does = 0.

3. Here is how you would solve the above problem using any calculate ( such as the TI-83 series ) which utilizes the Ans key. We wish to solve
f(x) = x
5

2x

x 5
) )

After substituting f(x) into


x
i + 1

= x

f ( x f'( x

i i

we obtain our generator equation x

i + 1 o

4x 5x

5 4

i i

4x 6x

3
i

+ 5 1

2
i

Now start with our initial guess ( x and pressing ENTER Next enter the following
( 4Ans^5 4Ans^3 + 5 ) (5 Ans^4 6Ans^2 1 ) then press ENTER to get then press ENTER to get then press ENTER to get then press ENTER to get then press ENTER to get then press ENTER to get then press ENTER to get

= 1 ) by entering 1 into the calculator

then press ENTER to get 4.036 650 975

2.023 121 387 1.846 017 469 1.791 124 495 1.786 287 837 1.786 252 423 1.786 252 421 1.786 252 421
which seems to be unchanging at 9 decimals

Now verify by storing the last number into variable A and entering A which equals 5 as it should.

2A

Anda mungkin juga menyukai