Numerical Analysis - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Numerical Analysis

Description:

Historically, numerical analysis was one of the first areas of interest in ... 5. Quadratic Equation. This is well known from algebra. ax2 bx c = 0. has roots at ... – PowerPoint PPT presentation

Number of Views:579
Avg rating:3.0/5.0
Slides: 16
Provided by: vancou
Category:

less

Transcript and Presenter's Notes

Title: Numerical Analysis


1
Numerical Analysis
  • The information is not in the course textbook.
  • The last couple of decades have seen research
    focused on non-numeric research
  • Historically, numerical analysis was one of the
    first areas of interest in computer science
    including
  • Interpolation and extrapolation algorithms
  • Solving algebraic and transcendental equations
  • Simultaneous linear equations
  • Initial-value, characteristic-value, and
    boundary-value problems
  • Partial differential equations

2
Numerical analysis
  • Approximate computations are greatly affected by
    errors
  • Numerical errors arise from different causes and
    affect results in different ways
  • Round-off errors are due to the representation of
    a number by a finite number of decimal digits.
    (Clearly, an irrational number cannot be
    precisely represented by a finite of digits)
  • Truncation errors are when a function f(x) is
    represented by an infinite series but the series
    is cut off after a finite number of terms.
  • Accumulated errors are errors that build up
    during some sequence of operations. If the rate
    of accumulation decreases, the error is bounded
    and said to be stable. If it is unstable, it
    renders the solution meaningless.
  • Absolute and relative errors need to be taken
    into account.

3
Numerical Analysis
  • Since we are dealing with approximations to the
    real values, it is important to distinguish
    between absolute error and relative error, of
    representing a number ? by its approximation
    ?absolute error ? - ?,
    ? - ?relative error ----------
    ?

4
Numerical Analysis-finding roots
  • Methods of finding roots of an equation given as
    f(x) 0. We wish to determine x such that the
    above equation is true.
  • Quadratic equation only for 2 roots
  • Bisection method converges slowly
  • Newton-Raphson converges rapidly but may
    diverge.

5
Quadratic Equation
  • This is well known from algebra
  • ax2 bx c 0
  • has roots at

6
Quadratic Equation
  • In general, we cannot solve equations exactly and
    need approximation algorithms to do so.
  • We cannot solve square roots exactly
  • We do not have formulas for polynomials above
    degree 4, but even the 3rd and 4th degree
    equations are too cumbersome to be of value
  • In fact, Paolo Ruffini (1765-1822) in 1799
    discovered that there can be no general formula
    for their roots involving only the coefficients,
    arithmetic operations, and taking square roots.

7
Bisection Method
  • This method is based upon the observation that a
    graph of a continuous function must intersect
    with the x-axis between two points a and b at
    least once if the functions values have opposite
    signs at these two points.
  • See the next slide for an illustration

8
(No Transcript)
9
Bisection Method
  • Since we cannot expect the algorithm to stumble
    on the exact root, we need a criterion for
    stopping the algorithm.
  • We can stop the algorithm after the interval
    a,b bracketing some root x becomes so small
    that we can guarantee that the absolute error of
    approximating the root x by xn, the middle point
    of the interval, is smaller than some small
    pre-selected number, say ?gt0. Since xn is the
    midpoint of a,b and x lies within this
    interval, we have

10
  • Hence, we can stop the algorithm as soon as

or, equivalently, when
11
Bisection Method
  • The previous slide implies that the sequence of
    approximations can be made as close to root x as
    we with by choosing n large enough. In other
    words, xn converges to x.
  • Note, however, that because any digital computer
    represents extremely small values by zero, the
    convergence assertion is true in theory, but not
    necessarily in practice.
  • In fact, if we choose ? below a certain
    machine-dependent threshold, the algorithm may
    never stop!
  • Another potential complication is round-off
    errors in evaluating the function in question.
    Therefore, in practice, we usually limit the
    bisection algorithm to a certain maximum number
    of iterations.

12
Newton-Raphson
  • This is one of the most important general
    algorithms for solving equations. The general
    analytical formula looks like

13
(No Transcript)
14
(No Transcript)
15
Newton-Raphson
  • In most cases, Newtons algorithm guarantees
    convergence of the sequence if an initial
    approximation is close enough to the root.
    However, as shown on the previous slide, it may
    not converge for certain situations.
  • Newtons method generally converges much faster
    than bisection.
  • Note that Newtons method requires an evaluation
    of the function and the derivative of the
    function whereas bisection requires only an
    evaluation of the function.
  • A possible criterion for stopping Newtons
    algorithm is simply when two successive guesses
    are lt ? apart, or when xn xn-1 lt ?
Write a Comment
User Comments (0)
About PowerShow.com