ChE 250 Numeric Methods - PowerPoint PPT Presentation

About This Presentation
Title:

ChE 250 Numeric Methods

Description:

The second method is to linearize the system. Linear methods are then used for a solution. Systems of Nonlinear Equations. Linearize a system of equations ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 26
Provided by: christi183
Category:

less

Transcript and Presenter's Notes

Title: ChE 250 Numeric Methods


1
ChE 250 Numeric Methods
  • Lecture 6, Chapra Chapter 6
  • 20070129

2
Open Methods
  • Open methods do not require previous knowledge of
    the range where the root is located
  • The algorithm must have a starting point provided
    up front, and often success depends on how good
    the starting point is
  • Open methods converge (or diverge) more quickly
    than bracket methods

3
Open Methods
  • Fixed Point Iteration
  • Convergence
  • Newton-Raphson
  • Pitfalls
  • Secant Method
  • Multiple Roots
  • System of Non-Linear Equations

4
Fixed Point Iteration
  • The simplest approach is to reformulate the
    equation in terms of xi and xi1
  • Find the root of f(x)e-x-x
  • f(x)0
  • xe-x
  • xi1e-xi

5
Fixed Point Iteration
  • Find the root of f(x)ex-x-2
  • f(x)0
  • xex-2
  • xi1exi-2

6
Fixed Point Iteration
  • Find the root of f(x)ex-x-2
  • f(x)0
  • xln(x2)
  • xi1ln(xi2)

7
Fixed Point Iteration
  • If the right side of the equation is graphed
    against f(x)x, the intersection would be the
    root
  • For convergence, the absolute value of the
    derivative of the right side (evaluated at xi
    must be less than 1

8
Fixed Point Iteration
  • Advantages
  • Only one starting guess required
  • Easy to visualize and understand
  • Disadvantages
  • Sensitive the formulation of the problem as well
    as initial guess
  • Not particularly fast
  • Questions?

9
Newton-Raphson Method
  • Most widely used root location method
  • Only need xi, f(xi), and f(xi)
  • Use the slope of the function to find the next
    approximation

10
Newton-Raphson Method
  • The Newton-Raphson formula is easily used to
    iterate a root solution

11
Newton-Raphson Method
  • Example 6.3
  • Find the root of f(x)e-x-x
  • Start at x00 same as previous example
  • f(x0)1, f(x0)-2
  • x1.5
  • Converges fast

12
Newton-Raphson Method
  • Pitfalls!
  • Because this method uses the derivative, it is
    likely to fail or stall out with functions that
    have
  • High curvature
  • Asymptotes
  • Local maxima, minima
  • Any program should check for
  • f(x) close to zero
  • Divergence
  • oscillation
  • jumps

13
Newton-Raphson Method
  • Example for multiple roots
  • f(x)x4-1
  • Four possible roots
  • Extra credit
  • Determine roots
  • Use Newtons method to solve for the roots, and
    give at least one starting value that finds each
    root
  • Submit algorithm and a table showing starting
    value, and root value

14
Secant Method
  • What if f(x) is not known or very hard to
    compute?
  • The Newton-Raphson Method can be modified to use
    a finite difference instead of a derivative
  • This requires two initial guesses, x-1, x0 to
    begin the iteration, however unlike a bracket
    method, we do not require that f(x1) and f(x0) be
    opposite signs

15
Secant Method
  • The Secant Method formula used to iterate a root
    solution based on two initial guesses

16
Secant Method
  • Example 6.6
  • Find the root of f(x)e-x-x
  • Start at x01, but now we also need x-10
  • f(x-1)1, f(x0)-.632
  • x1.6127
  • The first iteration
  • Closer than Newton
  • However, in the second
  • Newton was faster

17
Method Comparison
  • Fixed Point is simple and easy to implement
  • Newtons method is very fast and works well for
    systems where the pitfall areas are know and can
    be avoided
  • Secant method is useful if the derivative is not
    easily calculated
  • Questions?

18
Multiple Roots
  • Functions having multiple roots present a problem
    because they will have a a derivative that
    approaches zero as the function value approaches
    zero
  • This sometimes causes the Newton-Raphson and
    Secant methods to blow up, so in writing an
    algorithm, the value of the derivative must be
    monitored and a modified subroutine called to
    solve in this situation

19
Multiple Roots
  • Triple and other odd multiple roots can be
    found using bracket methods
  • But even multiple roots must be found with open
    methods

20
Multiple Roots
  • When Newton is applied, the result depends on the
    starting guess, x0.
  • Some starting values find the root 3, some find
    1, but if f(x)0 an error will be generated even
    thought the solution has been found!

21
Multiple Roots
  • The starting guess determines the final result,
    and the number iterations required

22
Multiple Roots
  • Recognizing and avoiding the pitfall is most
    important to prevent oscillation and blowups
  • Questions

23
Preparation for Jan 31st
  • Reading
  • Chapra Chapter 7 Roots of Polynomials
  • Homework set 2 is due at the beginning of class
    on Wednesday

24
Systems of Nonlinear Equations
  • There are basically two ways to solve nonlinear
    equations
  • The first is to use a fixed point method where
    the equations are manipulated to calculate the
    next iteration
  • This method is subject to constraints on the
    formulation of the equations
  • The method is sensitive to the initial guesses
  • The second method is to linearize the system
  • Linear methods are then used for a solution

25
Systems of Nonlinear Equations
  • Linearize a system of equations
Write a Comment
User Comments (0)
About PowerShow.com