Newtons method Newtons method 1 / 8 Newtons method Objective: - - PowerPoint PPT Presentation

newton s method
SMART_READER_LITE
LIVE PREVIEW

Newtons method Newtons method 1 / 8 Newtons method Objective: - - PowerPoint PPT Presentation

Newtons method Newtons method 1 / 8 Newtons method Objective: solving a non-linear problem f ( x ) = 0 Newtons method 2 / 8 Newtons method Objective: solving a non-linear problem f ( x ) = 0 Starting with an initial guess x 1 ,


slide-1
SLIDE 1

Newton’s method

Newton’s method 1 / 8

slide-2
SLIDE 2

Newton’s method

Objective: solving a non-linear problem f (x) = 0

Newton’s method 2 / 8

slide-3
SLIDE 3

Newton’s method

Objective: solving a non-linear problem f (x) = 0 Starting with an initial guess x1, approximate f (x) by the tangent line, L and use that to obtain a new approximate, x2,

Newton’s method 2 / 8

slide-4
SLIDE 4

A formula for the approximations

The slope of the line L is f ′(x1), so the point slope formula is y − f (x1) = f ′(x1)(x − x1)

Newton’s method 3 / 8

slide-5
SLIDE 5

A formula for the approximations

The slope of the line L is f ′(x1), so the point slope formula is y − f (x1) = f ′(x1)(x − x1) x2 is the x-intercept of L so (x2, 0) is on L, therefore 0 − f (x1) = f ′(x1)(x2 − x1)

Newton’s method 3 / 8

slide-6
SLIDE 6

A formula for the approximations

The slope of the line L is f ′(x1), so the point slope formula is y − f (x1) = f ′(x1)(x − x1) x2 is the x-intercept of L so (x2, 0) is on L, therefore 0 − f (x1) = f ′(x1)(x2 − x1) Then assuming that f ′(x1) = 0, we can solve for x2, x2 = x1 − f (x1) f ′(x1)

Newton’s method 3 / 8

slide-7
SLIDE 7

A formula for the approximations

The slope of the line L is f ′(x1), so the point slope formula is y − f (x1) = f ′(x1)(x − x1) x2 is the x-intercept of L so (x2, 0) is on L, therefore 0 − f (x1) = f ′(x1)(x2 − x1) Then assuming that f ′(x1) = 0, we can solve for x2, x2 = x1 − f (x1) f ′(x1) x2 is our second approximation and is closer to the root, r.

Newton’s method 3 / 8

slide-8
SLIDE 8

Repeat!

x3 = x2 − f (x2) f ′(x2)

Newton’s method 4 / 8

slide-9
SLIDE 9

Repeat!

x3 = x2 − f (x2) f ′(x2) x4 = x3 − f (x3) f ′(x3)

Newton’s method 4 / 8

slide-10
SLIDE 10

Convergence

We obtain a sequence of approximations x1, x2, x3, . . ., where xn+1 = xn − f (xn) f ′(xn) provided f ′(xn) = 0

Newton’s method 5 / 8

slide-11
SLIDE 11

Convergence

We obtain a sequence of approximations x1, x2, x3, . . ., where xn+1 = xn − f (xn) f ′(xn) provided f ′(xn) = 0 If the f ∈ C 2( i.e has continuous f ′ and f ′′) and if x1 is chosen sufficiently close to r then lim

n→∞ xn = r

Newton’s method 5 / 8

slide-12
SLIDE 12

Convergence

We obtain a sequence of approximations x1, x2, x3, . . ., where xn+1 = xn − f (xn) f ′(xn) provided f ′(xn) = 0 If the f ∈ C 2( i.e has continuous f ′ and f ′′) and if x1 is chosen sufficiently close to r then lim

n→∞ xn = r

We can quantify how fast the convergence occurs (see MA 427).

Newton’s method 5 / 8

slide-13
SLIDE 13

Newton’s method may fail

The initial guess needs to be sufficiently close to r

Newton’s method 6 / 8

slide-14
SLIDE 14

Implementing Newton’s method: Stopping criterion

We Loop until we are satisfied by the approximation xn+1 to r. In most practical cases the true solution is not known so |xn+1 − r| cannot be computed, so we approximate the error: |xn+1 − xn| ≈ |xn+1 − r| Given an error tolerance, ǫ, stop the loop when |xn+1 − xn| ≤ ǫ

Newton’s method 7 / 8

slide-15
SLIDE 15

Implementing Newton’s method: Stopping criterion

We Loop until we are satisfied by the approximation xn+1 to r. In most practical cases the true solution is not known so |xn+1 − r| cannot be computed, so we approximate the error: |xn+1 − xn| ≈ |xn+1 − r| Given an error tolerance, ǫ, stop the loop when |xn+1 − xn| ≤ ǫ Other stopping criteria: |f (xn+1)| ≤ ǫ or

  • xn+1 − xn

xn

  • ≤ ǫ

Newton’s method 7 / 8

slide-16
SLIDE 16

Implementing Newton’s method

>>[r, its] = newton_solver(f,x1,espilon) Input: initial guess and f Output: root r and number of iterations,its while ((|xn+1 − xn| > ǫ) and (its < MAX ITS)) do xn+1 = xn − f (xn) f ′(xn) its = its +1 end Algorithm 1: Newton’s method Use the MATLAB Symbolic Package to find and evaluate the derivative of f.

Newton’s method 8 / 8