Validation for scientific computations Error analysis

Similar documents
Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Bindel, Spring 2017 Numerical Analysis (CS 4220) Notes for

Numerical Algorithms. IE 496 Lecture 20

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Elements of Floating-point Arithmetic

Topics. Review of lecture 2/11 Error, Residual and Condition Number. Review of lecture 2/16 Backward Error Analysis The General Case 1 / 22

Elements of Floating-point Arithmetic

1 Error analysis for linear systems

1 Backward and Forward Error

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Accurate Solution of Triangular Linear System

Scientific Computing

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Numerical Analysis FMN011

Notes on Conditioning

We first repeat some well known facts about condition numbers for normwise and componentwise perturbations. Consider the matrix

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6

Lecture 9. Errors in solving Linear Systems. J. Chaudhry (Zeb) Department of Mathematics and Statistics University of New Mexico

ECS 231 Computer Arithmetic 1 / 27

Structured Condition Numbers of Symmetric Algebraic Riccati Equations

Compute the behavior of reality even if it is impossible to observe the processes (for example a black hole in astrophysics).

Lecture 7. Gaussian Elimination with Pivoting. David Semeraro. University of Illinois at Urbana-Champaign. February 11, 2014

Index. book 2009/5/27 page 121. (Page numbers set in bold type indicate the definition of an entry.)

Numerical Linear Algebra

A Backward Stable Hyperbolic QR Factorization Method for Solving Indefinite Least Squares Problem

Lecture 7. Floating point arithmetic and stability

Condition number and matrices

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 3: Wednesday, Jan 9

The numerical stability of barycentric Lagrange interpolation

ERROR AND SENSITIVTY ANALYSIS FOR SYSTEMS OF LINEAR EQUATIONS. Perturbation analysis for linear systems (Ax = b)

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization /36-725

Direct Methods for solving Linear Equation Systems

Conditioning of linear-quadratic two-stage stochastic programming problems

Outline. Math Numerical Analysis. Errors. Lecture Notes Linear Algebra: Part B. Joseph M. Mahaffy,

Scientific Computing: Dense Linear Systems

Lecture notes to the course. Numerical Methods I. Clemens Kirisits

LIMITS AT INFINITY MR. VELAZQUEZ AP CALCULUS

AMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC

Convergence of Rump s Method for Inverting Arbitrarily Ill-Conditioned Matrices

Errors. Intensive Computation. Annalisa Massini 2017/2018

Stability of Feedback Solutions for Infinite Horizon Noncooperative Differential Games

ECO Class 6 Nonparametric Econometrics

On The Belonging Of A Perturbed Vector To A Subspace From A Numerical View Point

Floating Point Arithmetic and Rounding Error Analysis

FINITE DIFFERENCES. Lecture 1: (a) Operators (b) Forward Differences and their calculations. (c) Backward Differences and their calculations.

Computation of the error functions erf and erfc in arbitrary precision with correct rounding

Homework 2 Foundations of Computational Math 1 Fall 2018

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

FUNCTIONAL ANALYSIS LECTURE NOTES: WEAK AND WEAK* CONVERGENCE

On condition numbers for the canonical generalized polar decompostion of real matrices

Lecture 2: Numerical linear algebra

Conditioning and Stability

Organization. I MCMC discussion. I project talks. I Lecture.

Since the determinant of a diagonal matrix is the product of its diagonal elements it is trivial to see that det(a) = α 2. = max. A 1 x.

Accurate polynomial evaluation in floating point arithmetic

Lecture 28 The Main Sources of Error

Numerical behavior of inexact linear solvers

1 Floating point arithmetic

Limits and Continuity

Structured Condition Numbers and Backward Errors in Scalar Product Spaces

Dense LU factorization and its error analysis

Linear Algebra Massoud Malek

For δa E, this motivates the definition of the Bauer-Skeel condition number ([2], [3], [14], [15])

Introduction to Numerical Analysis

1. Definition of a Polynomial

1 Finding and fixing floating point problems

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 9

OPTIMAL SCALING FOR P -NORMS AND COMPONENTWISE DISTANCE TO SINGULARITY

6.1 Polynomial Functions

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

CHAPTER 2 POLYNOMIALS KEY POINTS

Lecture 5: Single Step Methods

UNIVERSITY OF CAPE COAST REGULARIZATION OF ILL-CONDITIONED LINEAR SYSTEMS JOSEPH ACQUAH

Characteristic polynomials and pseudospectra

Exercise List: Proving convergence of the Gradient Descent Method on the Ridge Regression Problem.

Hermite Interpolation

WHEN MODIFIED GRAM-SCHMIDT GENERATES A WELL-CONDITIONED SET OF VECTORS

Error Bounds for Iterative Refinement in Three Precisions

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.

general perturbations

Lecture Notes 7, Math/Comp 128, Math 250

MATH 423 Linear Algebra II Lecture 3: Subspaces of vector spaces. Review of complex numbers. Vector space over a field.

An Introduction to the Quality of Computed Solutions 1

Physics 331 Introduction to Numerical Techniques in Physics

1) The line has a slope of ) The line passes through (2, 11) and. 6) r(x) = x + 4. From memory match each equation with its graph.

CORRESPONDENCE BETWEEN ELLIPTIC CURVES IN EDWARDS-BERNSTEIN AND WEIERSTRASS FORMS

Accurate and Efficient Matrix Computations with Totally Positive Generalized Vandermonde Matrices Using Schur Functions

ADDITONAL MATHEMATICS

Math 3 Variable Manipulation Part 3 Polynomials A

2-4 Zeros of Polynomial Functions

Preliminary Examination, Numerical Analysis, August 2016

Chapter 12 Block LU Factorization

Lecture 4: Linear Algebra 1

Radius Theorems for Monotone Mappings

Lecture 2: Computing functions of dense matrices

One Dimensional Dynamical Systems

Notes for Chapter 1 of. Scientific Computing with Case Studies

Scientific Computing: Solving Linear Systems

Pseudoinverse and Adjoint Operators

Computing Machine-Efficient Polynomial Approximations

Transcription:

Validation for scientific computations Error analysis Cours de recherche master informatique Nathalie Revol Nathalie.Revol@ens-lyon.fr 20 octobre 2006

References for today s lecture Condition number: Ph. Langlois: HDR (LIP, 2001) and chapter in A. Barraud et al.: Outils d analyse numérique pour l automatique, Hermes, 2002 N.H. Higham: Accuracy and stability of numerical algorithms, SIAM, 1996 (1st edition) P. Lascaux and R. Théodor: Analyse numérique matricielle appliquée à l art de l ingénieur, Masson, 1993 (2nd edition) Validation in scientific computing - Nathalie Revol 1 20-10-2006

Forward and backward analyses: Ph. Langlois: HDR (LIP, 2001) and chapter in A. Barraud et al.: Outils d analyse numérique pour l automatique, Hermes, 2002 N.H. Higham: Accuracy and stability of numerical algorithms, SIAM, 1996 (1st edition) A. Neumaier: Introduction to numerical analysis, Cambridge University Press, 2001 Validation in scientific computing - Nathalie Revol 2 20-10-2006

Definition of well-posed problem and ill-posed problem Problem P: compute where x: input, y: output or result. It can also be given implicitely: y = f(x) F (x, y) = 0 or x = F (y). Validation in scientific computing - Nathalie Revol 3 20-10-2006

Definition of well-posed problem and ill-posed problem Well-posed problem P: y = f(x) exists, is unique and depends continuously of x. If the problem is given as x = F (y), this means that F 1 (x) exists, is unique and F 1 is continuous. If the problem is not well-posed, then it is ill-posed. In what follows, we assume that every problem is well-posed. Validation in scientific computing - Nathalie Revol 4 20-10-2006

Relative error, absolute error If R, ˆx is an approximation of x and x = ˆx x absolute error on x: x = ˆx x relative error on x, if x 0: x x = ˆx x x If x R n, absolute error on x: x a = ˆx x relative error on x, if x 0: normwise: x r = x x = ˆx x x componentwise: x r = max 1 i n x i x i Validation in scientific computing - Nathalie Revol 5 20-10-2006

Definition of condition number In french: conditionnement ou nombre de condition. Problem P: compute y = f(x) with If x and y do not vanish, κ(p, x) = lim δ 0 f : D R. D. R sup x D x D δ y R / y R x D / x D Validation in scientific computing - Nathalie Revol 6 20-10-2006

Definition of condition number Problem P: compute y = f(x) with f : D R. D. R If x or y vanish, one uses absolute errors instead of relative errors and one gets an absolute condition number: κ(p, x) = lim δ 0 sup x D δ y R x D Validation in scientific computing - Nathalie Revol 7 20-10-2006

Interpretation of condition number The condition number is the factor of amplification (or reduction) of the error: f x y x K(f,x). x x+ x f y+ y Validation in scientific computing - Nathalie Revol 8 20-10-2006

Well-conditioned, ill-conditioned problem A problem is well-conditioned if its condition number is small, i.e., close to 1, it is ill-conditioned if its condition number is large, i.e., 1. It is a qualitative notion... Validation in scientific computing - Nathalie Revol 9 20-10-2006

Condition number: subtraction y = x 1 x 2 Let us consider ˆx 1 = x 1 (1 + δ 1 ) ˆx 2 = x 2 (1 + δ 2 ), and ŷ = y + y = x 1 (1 + δ 1 ) x 2 (1 + δ 2 ), thus y r = y y = x 1δ 1 x 2 δ 2 x 1 x 2 x 1 + x 2 x 1 x 2 max( δ 1, δ 2 ). If we use the componentwise relative error, κ(, (x 1, x 2 )) = lim δ 0 sup x: x r δ y / y x 1 + x 2 x r x 1 x 2 and there is an equality, when x 1.x 2 0 and when δ 1 = δ 2. Validation in scientific computing - Nathalie Revol 10 20-10-2006

Condition number: subtraction y = x 1 x 2 κ(, (x 1, x 2 )) = x 1 + x 2 x 1 x 2 This condition number can be arbitrarily large when x 1 and x 2 are close, i.e., when x 1 x 2 x 1 + x 2. This means that, if x 1 and x 2 are computed results with some uncertainty, this uncertainty is magnified by this subtraction: catastrophic cancellation. Validation in scientific computing - Nathalie Revol 11 20-10-2006

Condition number: subtraction y = x 1 x 2 Cancellation is not always a bad thing: no problem when x 1 and x 2 are error-free, cf. divided difference schemes; cancellation may be a symptom of intrinsic ill-conditioning and may therefore be unavoidable; the result may be harmless, for instance in (x 1 x 2 ) + x 3 x 3 x 1 x 2. when Validation in scientific computing - Nathalie Revol 12 20-10-2006

Condition number: division y = x 1 /x 2 Let us consider ˆx 1 = x 1 (1 + δ 1 ) ˆx 2 = x 2 (1 + δ 2 ), and ŷ = y + y = x 1 (1+δ 1 ) x 2 (1+δ 2 ), ı.e., y = x 1 x 2. δ 1 δ 2 1+δ 2, thus y r = y y = δ 1 δ 2 1 + δ 2 2 max( δ 1, δ 2 ). 1 δ 2 If we use the componentwise relative error, κ(, (x 1, x 2 )) = lim δ 0 sup x: x r δ i.e., the division is always well-conditioned. y / y x r 2 Validation in scientific computing - Nathalie Revol 13 20-10-2006

Condition number: evaluation of p(x) Let p(x) = n i=0 a ix i a polynomial. Let us evaluate ˆp in x, where ˆp(x) = n i=0 (a i + a i )x i : y = ˆp(x) p(x) = n a i x i i=0 and thus y y = n i=0 a ix i n i=0 a ix i n i=0 a i. x i n i=0 a ix i a r n i=0 a i. x i n i=0 a ix i and there is an equality if a i = sign(a i x i ). a r. Validation in scientific computing - Nathalie Revol 14 20-10-2006

Condition number: evaluation of p(x) This implies κ(p(x), p) = n i=0 a i. x i. p(x) In other words, the evaluation of a polynomial p at x can be arbitrarily ill-conditioned when x is close to a root of p. Validation in scientific computing - Nathalie Revol 15 20-10-2006

Condition number: solving the linear system Ax = b A = 10 7 8 7 7 5 6 5 8 6 10 9 7 5 9 10 solution of Ax = b: x = (1 1 1 1) t. If the system is perturbed in A + A = b = 32 23 33 31 10 7 8.1 7.2 7.08 5.04 6 5 8 5.98 9.89 9 6.99 4.99 9 9.98, the solution of (A + A)x = b is ( 81 137 34 22) t. Validation in scientific computing - Nathalie Revol 16 20-10-2006

Condition number: solving the linear system Ax = b If x is the solution of Ax = b and ˆx is the solution of Ax = b + b, A x = b x = A 1 b x = A 1 b A 1. b We also have Ax = b Ax = b A. x b A b 1 x and thus x x A. A 1 b b Validation in scientific computing - Nathalie Revol 17 20-10-2006

Validation in scientific computing - Nathalie Revol 18 20-10-2006

Condition number: solving the linear system Ax = b κ(a) = A. A 1 It also holds that, if x + x is the solution of (A + A)x = b, x x κ(a). A A and if x + x is the solution of (A + A)x = b + b, [ x x κ(a) A 1 κ(a). A A + b ] b A. Validation in scientific computing - Nathalie Revol 19 20-10-2006

Condition number: link with a first-order analysis Problem P: compute y = f(x). and thus i.e., y + y = f(x + x) f(x) + f (x). x + O( x 2 ) y y f (x). x f(x) = f (x). x. x f(x) x κ(p, x) f (x).x f(x). Validation in scientific computing - Nathalie Revol 20 20-10-2006

Condition number: link with a first-order analysis When x and y are not scalars, but vectors: the absolute condition number is κ a (P, x) = f (x) it can also be interpreted as the Lipschitz constant for f, and the relative condition number is κ(p, x) = f (x). x. f(x) Validation in scientific computing - Nathalie Revol 21 20-10-2006

Condition number: remarks 1. the choice of the norms. D and. R modifies the condition number; the choice of the authorized perturbations x as well: one may preserve the structure of the problem and restrict x (sparsity of a matrix... ) 2. quite often, the condition number measures the inverse of the distance to the nearest singular problem (or ill-posed problem) 3. the condition number depends only on the problem P and not on the algorithm that solves it 4. only small perturbations are considered here, for large perturbations consider interval arithmetic. Validation in scientific computing - Nathalie Revol 22 20-10-2006