Download - 03. Root Finding Methods
![Page 1: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/1.jpg)
Root finding
![Page 2: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/2.jpg)
Roots of Equations• Formulation f(x)=0• Solution (root)– existence– uniqueness–multiplicity
• Bracketing vs open methods• Polynomial vs general (transcendent)
![Page 3: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/3.jpg)
![Page 4: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/4.jpg)
Bracketing Methods• 1. Bisection (interval halving)– finding an initial bracket– number of steps needed (known)
• 2. False position– finding an initial bracket (is the same)– number of steps needed (basically not
known)
![Page 5: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/5.jpg)
1. Bisection method• 1. Bracket the root (find values of x that are too
high and too low)• 2. Choose the next x in the middle of the bracket,
xk+1 = (xlow + xhigh) / 2
• 3. Evaluate f(xk+1) and adjust the bracket• 4. Estimate maximum error from each bracket
![Page 6: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/6.jpg)
2. False-Position method
• Combines of two concepts: –bracketing–straight line approximation of f(x)
![Page 7: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/7.jpg)
2. False Position method
• 1. Bracket the root (find values of x that are too high and too low)
• 2. Assume a straight line between the points to find xk+1
• 3. Evaluate f(xk+1) and adjust the bracket• 4. Estimate maximum error from each bracket
lowhigh
lowhighlow
klow
k
xxxfxf
xfx
)()(/)(x 1
![Page 8: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/8.jpg)
First order Taylor polynomial - Straight line
• Equation of a straight line though the two points of the bracket:
y = b + mx• Find the location where the line
crosses the x-axis
![Page 9: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/9.jpg)
• Equation of a straight line y = mx + b
• Slope and intercept m and b
• Finding the location where the line crosses the x-axis
0 = m xroot + b
![Page 10: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/10.jpg)
• Equation of a straight line passing through one given point, with known slope
y - y1 = m (x-x1)• Equation of a straight line passing through
two given points is the same, but with
• (Note: y-y2 = m (x-x2)is also good!)
• Finding the step necessary to take to cross the x-axis: 0- y1 = m (x-x1) = m x
12
12
xxyym
m)(f
myΔx 11 x
![Page 11: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/11.jpg)
False Position method
12
12
xxyym
m)(f
myΔx 11 x
.,x 1 etcxx klow
k
1
2
![Page 12: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/12.jpg)
Open Methods• 3. Newton (Newton-Raphson)– Evaluate f’(x) at last point– Extrapolate tangent to x-axis
4. Direct (Simple) Substitution – Use a simple function, g(x)– Estimate xk+1 from g(x)
![Page 13: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/13.jpg)
3. Newton method
• 1. Evaluate f '(xk) • 2. Extrapolate tangent to x-axis, assuming a straight
line
• 3. Evaluate f’(xk+1) 4. Estimate maximum error from each bracket
)(/)(x 1 kkkk xfxfx
![Page 14: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/14.jpg)
3. Newton method
)(x'f)f(x
m)f(xΔx
1
11
.,x 11 etcxx kk
![Page 15: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/15.jpg)
3. Newton method
• 1. Requires that f '(xk) can be evaluated• 2. Can converge rapidly, depending on f(x)
and the starting value of x• 3. May not converge in some cases
![Page 16: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/16.jpg)
Newtonunfavorable
Newtonfavorable
Bisection is always safe
![Page 17: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/17.jpg)
Problems with Newton method
![Page 18: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/18.jpg)
4. Direct (Simple) Substitution method
• 1. From f(x), manipulate to the form:x= g(x)
• 2. Calculate the next x with xk+1 = g(xk)• 3. May not converge in some cases
![Page 19: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/19.jpg)
4. Direct (Simple) Substitution method
)(ˆ xgx
0)( xf
![Page 20: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/20.jpg)
Four basic cases
Graphical representation
)(' xgThe role of
![Page 21: 03. Root Finding Methods](https://reader034.vdocument.in/reader034/viewer/2022051503/577cce551a28ab9e788dc737/html5/thumbnails/21.jpg)
Characteristics of the methods1. Bisection 2. False
position3. Newton’s 4. Direct
substitution
Method type Bracketing Bracketing Open Open
Reliable X X
Can be unstable
X X
Estimate error
X X
Fast, when works
X
Simple to code
X