Lecture 17 - Newtons Method Need to compute f(x You may...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Newton’s Method Need to compute f (x) You may have to do this numerically Open Method – Convergence depends on the initial guess (not guaranteed) However, Newton method can converge
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Newton’s Method Example : f (x) = 3x + sin(x) - exp(x) Solution : derivative f ' (x) = 3 + cos(x) – exp(x) start with x 0 = 0 f ( 0 ) = 0 + 0 -1 = -1 f ' ( 0 ) = 3 +1-1 = 3 x 1 = x 0 - f 0 / f 0 ' = 0 - (-1)/3 = 0.33333 f (0.33333) = -0.068417728 &
Background image of page 2
Newton’s Method Example : f(x) = 3x + sin(x) - exp(x) Iter. # x n f(x n ) e n =x n -r 1 0.333333333 -6.84E-02 2.71E-02 2 0.360170714 -6.28E-04 2.52E-04 0.346 3 0.360421681 -5.63E-08 2.25E-08 0.354 4 0.360421703 -6.66E-16 e n /e 2 n-1 Comments: * It may not converge if x 0 is too far from x = r. * If x 0 is close to r, Newton's method converges very fast. x 0 = 0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Newton’s Method --Matlab code >> newtraph(@(x) 3*x+sin(x)-exp(x), @(x) 3+cos(x)-exp(x),1) ans = 0.360421702960200
Background image of page 4
Newton’s Method Quadratic convergence: = constant e n /e 2 n-1 Illustration of quadratic convergence: 1.E-11 1.E-09 1.E-07 1.E-05 1.E-03 1.E-01 1.E+01 1 10 |r-xn| n parabola linear
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Newton-Raphson Method Examples of poor convergence or failure
Background image of page 6
Secant Method Use secant line instead of tangent line at f ( x i )
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Secant Method The formula for the secant method is Notice that this is very similar to the false
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 20

Lecture 17 - Newtons Method Need to compute f(x You may...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online