200 likes | 285 Views
Chapter 4 Roots of Equations. The values of x that satisfy the condition are termed the roots of the function; these roots are the solution to the equation f(x) = 0 . The general second-order polynomial: Solutions (roots):.
E N D
Chapter 4 Roots of Equations The values of x that satisfy the condition are termed the roots of the function; these roots are the solution to the equation f(x) = 0. • The general second-order polynomial: Solutions (roots):
The roots for third-order polynomial can also be found analytically. No generalsolution exists for other higher-order polynomials. • It is more difficult to obtain analytical roots of nonpolynomial, nonlinear fucntions. E.g. cannot be solved analytically.
Roots of Some Selected Functions (a) No Roots (b) One Root
Two Roots Three Roots
Bisection Method Step 1: For the interval of x from the starting point xs to the end point xe, locate the midpoint xm at the center of the interval.
Step 2: Evaluate the values of f(xs), f(xm), and f(xe). Step 3: Compute f(xs)f(xm) and f(xm)f(). If f(xs)f(xm) <0, then xs < root < xm. If f(xm)f(xe) <0, then xm < root <xe. Step 4: . Check for convergence. If the convergence criterion (that is, tolerance) is satisfied, then use xm as the final estimate of the root. Otherwise, go to Step 1. • The bisection method will always converge on the root, provided that only one root lie within the starting interval for x.
Error Analysis and Convergence Criterion The absolute value of thedifference (d) The relative percent error (r) The true error (t) in the ith iteration
Example: Bisection Method • We are interested in finding the roots within the interval 3.75 x 5.00 to a relative accuracy as an absolute value between successive iterations of 0.01. • The absolute value of the error is given in the last column of Table 4-2. • The final estimate of the root is 3.994.
Table 4-2 Example Polynomial Solved Using the Bisection Method • The true root=4 • The true accuracy of the estimated root is 0.006 or, in relative terms, 0.15%.
Newton-Raphson Iteration • The Newton-Raphson iteration method is a faster method for converging on a single root of a function. • It uses the linear portion of a Taylor series:
Example: Newton-Raphson Method The derivative: Assume an initial estimate of the root x0=6.0.
Error Analysis (xt: true root) • For this case, the convergence criterion xi - xi-1 yeilds a conservative estimate of the true error. • The solution should be checked by substituting the calculated root into the function.
Secant Method • The secant method is similar to the Newton-Raphson method, with the difference that the derivative f’(x) is numerically evaluated, rather than computed analytically. • The secant method requires two initial estimates of a root.
Example: Secant Method Two initial estimates of x0 = 0 and x0 = 1. The method converges to a root of 0.703467.