Pemodelan dan Metode Numerik (Modeling and Numerical Methods) http://www.unhas.ac.id/amil/S2TE/pmn_2014/
L #3 Open Methods Amil Ahmad Ilham
Open Method • Bracketing methods: – The root is located within an interval prescribed by a lower and an upper bound. – Repeated application of these methods always results in closer estimates of the true value of the root. Such methods are said to be convergent because they move closer to the truth as the computation progresses .
• Open methods: – are based on formulas that require only a single starting value of x or two starting values that do not necessarily bracket the root. – they sometimes diverge or move away from the true root as the computation progresses. – When the open methods converge, they usually do so much more quickly than the bracketing methods. 2
Bracketing vs. Open Method •
•
•
The fundamental difference between the (a) bracketing and (b) and (c) open methods for root location. In (a), which is the bisection method, the root is constrained within the interval prescribed by xl and xu. The open method depicted in (b) and (c), a formula is used to project from xi to xi+1 in an iterative fashion. • The method can either (b) diverge or (c) converge rapidly, depending on the value of the initial guess.
3
SIMPLE FIXED-POINT ITERATION • A simple fixed-point iteration (one-point iteration or successive substitution): – rearranging the function f (x) = 0 so that x is on the left-hand side of the equation:
• Given an initial guess at the root xi, a new estimate xi+1 is expressed by the iterative formula: 4
SIMPLE FIXED-POINT ITERATION • f (x) = 0 => x = g(x) • Example: =>
• xi+1 = g(xi) 2
xi + 3 xi +1 = 2 5
SIMPLE FIXED-POINT ITERATION • Use simple fixed-point iteration to locate the root of f(x) = e−x − x. Starting with an initial guess of x0 = 0.
x=e
−x
x i +1 = e − xi
6
THE NEWTON-RAPHSON METHOD • The most widely used of all root-locating formulas is the NewtonRaphson equation – If the initial guess at the root is xi, a tangent can be extended from the point [xi, f (xi)]. – The point where this tangent crosses the x axis usually represents an improved estimate of the root.
=> 7
THE NEWTON-RAPHSON METHOD • Use the Newton-Raphson method to estimate the root of f(x) = e−x − x, employing an initial guess of x0 = 0.
8
THE SECANT METHOD • A potential problem in implementing the Newton-Raphson method is the evaluation of the derivative. • There are certain functions whose derivatives may be extremely difficult or inconvenient to evaluate.
9
THE SECANT METHOD • Use the secant method to estimate the root of f(x) = e−x − x . Start with initial estimates of x−1 = 0 and x0 = 1.0.
10
THE SECANT METHOD • Use the secant method to estimate the root of f(x) = e−x − x . Start with initial estimates of x−1 = 0 and x0 = 1.0.
11
Algorithm for Fixed-Point Iteration
12
Group Assignment #2 1. Determine the highest real root of
Group Assignment #2 2. Determine the root of the following function,
f(x) = 5 − 5x − e0.5x Perform iterations until εa < 2%. a. Use a bracketing method (Bisection), use initial guesses of xl = 0 and xu = 2. b. Use the Newton-Raphson, use an initial guess of xi = 0.7. c. Use the secant method, use initial guesses of xi−1 = 0 and xi = 2. 14
Group Assignment #2 • Solve problem no. 1 manually. • Develop a user-friendly program to solve problem no. 1 and no. 2. • Prepare for demo! • Work in pairs (1 group = 2 members)
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.