06-Open Methods

# 06-Open Methods - 6 Roots of Equations Open Methods Chapter...

This preview shows pages 1–12. Sign up to view the full content.

6: Roots of Equations: 6: Roots of Equations: Open Methods Open Methods

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

View Full Document
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 2 Chapter Objectives Recognize difference between bracketing and open methods. Know how to use Newton-Raphson method. Know how to use secant and modified secant method. Know how to use MATLAB's fzero() function. Know how to determine roots of polynomials with MATLAB.
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 3 Bracketing vs Open Methods bracketing needs 2 start pts on either side of a root bracketing methods are convergent each iteration improves estimate open methods start with 1 or 2 pts not necessarily a bracket E.G. Newton-Raphson, in (b) and (c) use 1 pt + slope to predict root open methods often converge faster methods may diverge estimates worsen, as in (b) Figure 6.1

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

View Full Document
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 4 6.2: Newton-Raphson Given one estimate: tangent extrapolated to x -axis: Figure 6.4 x i , f x i , f ' x i f ' x i  = f x i − 0 x i x i 1 x i x i 1 = f x i f ' x i x i 1 = x i f x i f ' x i (6.6)
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 5 Example 6.2 Find a root of: First derivative: Starting value: Iteration 1: f x  = e x x f ' x  =− e x 1 x 0 = 0 f x 0  = f 0  = e 0 0 = 1 f ' x 0  = f ' 0  =− e 0 1 =− 2 x 1 = x 0 f 0 f ' 0 = 0 1 2 = 0.5 a = x 1 x 0 x 1 × 100 % = 0.5 0 0.5 × 100 % = 100 %

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

View Full Document
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 6 Example 6.2 (contd.) Iteration 2: a = x 2 x 1 x 2 × 100 % = 0.566311 0.5 0.566311 × 100 % = 11.7 % f x 1  = f 0.5  = e 0.5 0.5 = 0.106531 f ' x 1  = f ' 0.5  =− e 0.5 1 =− 1.606531 x 2 = x 1 f x 1 f ' x 1 = 0.5 0.106531 1.606531 = 0.566311 i 0 0.000000 1.000000 -2.000000 1 0.500000 0.106531 -1.606531 100 2 0.566311 0.001305 -1.567616 11.7 3 0.567143 0.000000 -0.567143 0.15 4 0.567143 2.20E-005 x i f(x i ) f''(x i ) a |,% Summary:
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 7 Example 6.2 (contd.) Observations: convergence is rapid from Chapra and Canale: error is proportional to square of previous error when previous E is small, new E is very small this is quadratic convergence. E t ,i 1 = f ' ' x r 2 f ' x r E t ,i 2 (6.7)

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

View Full Document
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 8 Newton-Raphson Newton-Raphson can have slow convergence: Figure 6.3
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 9 Newton-Raphson Newton-Raphson can: diverge : oscillate: miss roots: Figure 6.6

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

View Full Document
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 10 Matlab (1) function root = newtraph(func,dfunc,xr,es,maxit) % root = newtraph(func,dfunc,xguess,es,maxit): % uses Newton-Raphson method to find the root of a function % input: % func = function % dfunc = derivative of function % xguess = initial guess % es = (optional) stopping criterion (%) % maxit = (optional) maximum allowable iterations % output: % root = real root % if necessary, assign default values if nargin<5, maxit=50; end %if maxit blank set to 50 if nargin<4, es=0.001; end %if es blank set to 0.001
Oct 13, 2006 16:32 ECOR2606 -- Hassan & Holtz 11 Matlab (2) % Newton-Raphson iter = 0; while (1) xrold = xr; xr = xr - func(xr)/dfunc(xr);

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern