Chapter 1: Preliminaries and Error Analysis

Similar documents
Chapter 1 Mathematical Preliminaries and Error Analysis

Mathematical preliminaries and error analysis

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Numerical Analysis and Computing

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Introduction CSE 541

Chapter 1: Introduction and mathematical preliminaries

MAT 460: Numerical Analysis I. James V. Lambers

Euler s Method and Logistic Growth (BC Only)

Notes on floating point number, numerical computations and pitfalls

Chapter 1 Error Analysis

Topics Covered in Calculus BC

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

Midterm Review. Igor Yanovsky (Math 151A TA)

Introduction to Numerical Analysis

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Math Practice Exam 3 - solutions

Chapter 1 Mathematical Preliminaries and Error Analysis

Introductory Numerical Analysis

Math 180, Final Exam, Fall 2007 Problem 1 Solution

Introduction and mathematical preliminaries

Section 10.7 Taylor series

Numerical Methods - Preliminaries

MATHEMATICS AP Calculus (BC) Standard: Number, Number Sense and Operations

Week 1: need to know. November 14, / 20

Notes for Chapter 1 of. Scientific Computing with Case Studies

Infinite series, improper integrals, and Taylor series

8.5 Taylor Polynomials and Taylor Series

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460

Floating-point Computation

Advanced Calculus Math 127B, Winter 2005 Solutions: Final. nx2 1 + n 2 x, g n(x) = n2 x

Numerical Analysis. Yutian LI. 2018/19 Term 1 CUHKSZ. Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41

Academic Content Standard MATHEMATICS. MA 51 Advanced Placement Calculus BC

Chapter 2: Approximating Solutions of Linear Systems

Elements of Floating-point Arithmetic

Chapter 5 - Integration

Homework 2. Matthew Jin. April 10, 2014

MA 113 Calculus I Fall 2016 Exam Final Wednesday, December 14, True/False 1 T F 2 T F 3 T F 4 T F 5 T F. Name: Section:

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods

This practice exam is intended to help you prepare for the final exam for MTH 142 Calculus II.

Elements of Floating-point Arithmetic

Advanced Placement Calculus II- What Your Child Will Learn

CHAPTER 1. INTRODUCTION. ERRORS.

MATH 1242 FINAL EXAM Spring,

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Mathematics for Engineers. Numerical mathematics

Correlation with College Board Advanced Placement Course Descriptions

How do computers represent numbers?

Numerical Mathematical Analysis

1. Taylor Polynomials of Degree 1: Linear Approximation. Reread Example 1.

hexadecimal-to-decimal conversion

MATH 408N PRACTICE FINAL

Tangent Lines Sec. 2.1, 2.7, & 2.8 (continued)

Math 1310 Final Exam

Math 122L. Additional Homework Problems. Prepared by Sarah Schott

1 What is numerical analysis and scientific computing?

UNIT 3: DERIVATIVES STUDY GUIDE

Math 128A: Homework 2 Solutions

Round-off Errors and Computer Arithmetic - (1.2)

Math 2413 t2rsu14. Name: 06/06/ Find the derivative of the following function using the limiting process.

Tuesday, Feb 12. These slides will cover the following. [cos(x)] = sin(x) 1 d. 2 higher-order derivatives. 3 tangent line problems

Core Mathematics 2 Algebra

ECS 231 Computer Arithmetic 1 / 27

Chapter 8: Taylor s theorem and L Hospital s rule

IF you participate fully in this boot camp, you will get full credit for the summer packet.

Infinite series, improper integrals, and Taylor series

a x a y = a x+y a x a = y ax y (a x ) r = a rx and log a (xy) = log a (x) + log a (y) log a ( x y ) = log a(x) log a (y) log a (x r ) = r log a (x).

TEST CODE: PMB SYLLABUS

Day 2 Notes: Riemann Sums In calculus, the result of f ( x)

New York City College of Technology, CUNY Mathematics Department. MAT 1575 Final Exam Review Problems. 3x (a) x 2 (x 3 +1) 3 dx (b) dx.

AP Calculus BC Scope & Sequence

B L U E V A L L E Y D I S T R I C T C U R R I C U L U M & I N S T R U C T I O N Mathematics AP Calculus BC

Numerical Methods in Physics and Astrophysics

Math 122 Fall Unit Test 1 Review Problems Set A

Tangent Lines and Derivatives

Learning Objectives for Math 166

Solutions to Second Midterm(pineapple)

Ch 7 Summary - POLYNOMIAL FUNCTIONS

AP Calculus BC Syllabus Course Overview

OCR A2 Level Mathematics Core Mathematics Scheme of Work

Integration and antiderivatives

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Chapter 0 Preliminaries

The max flow problem. Ford-Fulkerson method. A cut. Lemma Corollary Max Flow Min Cut Theorem. Max Flow Min Cut Theorem

Topic Subtopics Essential Knowledge (EK)

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

CHAPTER 10 Zeros of Functions

Number Systems III MA1S1. Tristan McLoughlin. December 4, 2013

Chapter 1 Computer Arithmetic

MTH101 Calculus And Analytical Geometry Lecture Wise Questions and Answers For Final Term Exam Preparation

Greenwich Public Schools Mathematics Curriculum Objectives. Calculus

The Mean Value Theorem. Oct

Homework. Basic properties of real numbers. Adding, subtracting, multiplying and dividing real numbers. Solve one step inequalities with integers.

Section 8.7. Taylor and MacLaurin Series. (1) Definitions, (2) Common Maclaurin Series, (3) Taylor Polynomials, (4) Applications.

Advanced Placement Calculus I - What Your Child Will Learn

Practice problems from old exams for math 132 William H. Meeks III

Dr. Sophie Marques. MAM1020S Tutorial 8 August Divide. 1. 6x 2 + x 15 by 3x + 5. Solution: Do a long division show your work.

Decimal Addition: Remember to line up the decimals before adding. Bring the decimal straight down in your answer.

Antiderivatives! Outline. James K. Peterson. January 28, Antiderivatives. Simple Fractional Power Antiderivatives

Calculus I: Practice Midterm II

Transcription:

Chapter 1: Error Analysis Peter W. White white@tarleton.edu Department of Tarleton State University Summer 2015 / Numerical Analysis

Overview

We All Remember Calculus Derivatives: limit definition, sum and difference rule, product rule, quotient rule, power rule and chain rule. Derivatives: instantaneous rates of change, related rates, differentials, slopes of tangents. Integrals: Riemann Sums, anti-derivatives, definite integrals, improper integrals. Taylor Series: Taylor polynomials, remainder formula, radius of convergence.

Taylor Series Theorem 1 Let I be an open interval centered at a. If f C n+1 (I), then f (x) = P n (x) + R n (x) where P n (x) = n k=0 f (k) (a) (x a) k k! is the n th -degree Taylor Polynomial centered at a and R n (x) = f (n+1) (ξ) (x a)n+1 (n + 1)! for some ξ between x and a is the remainder.

Example: Taylor Series Example 2 Find the Taylor Polynomial centered at a = 1 that approximates f (x) = ln(x) accurate to three decimal digits on the interval ( 1 2, 3 2 ). Example 3 Establish a theoretical error bound for P 3 (x) centered at a = 0 in approximating f (x) = sin(x) on the interval ( π 6, π 6 ).

What Is Numerical Analysis? Definition 4 Numerical Analysis is the branch of mathematics that deals with the development and use of numerical methods for approximating the solutions of problems. Definition 5 A numerical method is a complete and unambiguous set of procedures for the solution of a problem, together with computable error estimates.

Overview

What is Round-off Error Definition 6 Round-off Error is the difference between an approximation of a number used in computation and its exact (correct) value. Example 7 π is irrational. Thus, π cannot be written in decimal form. But we can approximate π out to say six decimal places by 3.141593 with a round-off error bounded by 5 10 7.

Absolute and Relative Error Definition 8 Let p be an exact number and ˆp be an approximation to p. Then the absolute error in the approximation is given by p ˆp and the relative error is given by p ˆp p. Example 9 Find the absolute and relative error when p = 1, 005, 862 and ˆp = 1, 000, 000.

Binary Machine Numbers Definition 10 A binary number system represents a signed floating-point number as ( 1) s 2 c d (1 + f ) where s is the sign bit, c is the n-bit characteristic, f is the m-bit mantissa and d = 2 n 1 1. The binary number with all bits set to 0 is zero. Example 11 In a one byte floating-point number system with a 3 bit characteristic and a 4 bit mantissa, then the binary number 01001011 (s = 0, c = 100, and f = 1011) is 3.375 in bas 10. What are the largest and smallest positive numbers that can be represented in this system?

Underflow and Overflow Underflow - a number smaller than the smallest representable number is set to zero. Overflow - a number larger than the largest representable number causes problems. Repeated subtraction or division could cause underflow. Repeated addition or multiplication could cause overflow.

Addition (in base 10) Example 12 Add the following three numbers using a 3-digit calculater: 1.08, 9.59 10 3, and 9.03 10 3.

Significant Digits Definition 13 The number ˆp is said to approximate p to t significant digits if t is the largest non-negative integer for which p ˆp p < 5 10 t. Example 14 Let p = π and ˆp = 3.141, then p ˆp p 5.07 10 4 < 5 10 3. So t = 3.

Significant Digits II Example 15 p = 0.d 1 d 2 d 3...d k d k+1 d k+2... 10 n ˆp = 0.d 1 d 2 d 3...d k 10 n then p ˆp = 0.d k+1 d k+2 d k+3 10 n k and p ˆp p = 0.d k+1d k+2 d k+3 10 n k 0.d 1 d 2 d 3 10 n Since the minimum value of d 1 is 1 and the maximum value of d k+1 is 9, then p ˆp p 1 0.1 10 k = 10 k+1. Similarly, k digit rounding produces a relative error bounded by 0.5 10 k+1. So k 1 significant digits.

Operations and Errors Do the mathematical operations +, -,, and magnify error? Suppose x and y are exact values represented in a machine by x + x and y + y. Let S = x + y, M = x y, T = xy, and Q = x. In the machine these are y represented by S + S, M + M, T + T, and Q + Q where S ds = dx + dy x + y, M dm = dx dy x y, T dt = xdy + ydx x y + y x, Q dq = ydx xdy y 2 x y x y y 2.

Operations and Errors (Answer) S and M are of the same size as x and y, so addition and subtraction do not exacerbate errors in representation of the components of these operations. However, T and Q also depend on the size of x and y, so multiplication and division can magnify round-off errors in representation.

Homework Homework assignment 1, due: TBA

Overview

Definitions Definition 16 Algorithm: unambiguous procedure or steps to follow in a specified order. Pseudo-code: a description of an algorithm including inputs and the form of the output. Loops: steps to be repeated with possible changes to variables based on a counting index. Conditional statements: If... then... else... Condition controlled loops: loop who s termination is based on a condition (While... do...), (Repeat... until...).

Example of Pseudo-code Example 17 Generate pseudo-code for the the following problem: Given a function f (x) is integrable on the interval [a, b] approximate the definite integral of f (x), over [a, b], using the Midpoint Method on N uniform subintervals.

Characterizing Algorithms One criteria imposed on an algorithm (whenever possible) is that small changes in the initial input produce correspondingly small changes in the final results. In this case the algorithm is said to be stable; otherwise it is unstable. Some algorithms are stable only for certain choices of input and are called conditionally stable.

Growth in Error Definition 18 Suppose that E 0 > 0 denotes an error introduced at some stage in the calculations and E n represents the magnitude of the error after n subsequent operations. If E n CnE 0, where C is a constant independent of n, then the growth of error is said to be linear. If E n C n E 0, for some C > 1, then the error is called exponential. Linear growth of error is usually unavoidable, and when C and E 0 are small, the results are generally acceptable. (Stable) Exponential growth of error is bad! (Unstable)

Iterative Techniques Example 19 Approximate the definite integral of f (x), over the interval [a, b], using the Midpoint Method (as above) for N = 1, 2, 4, 8,... until the difference between successive iterations differ by no more than 10 4.

Rate of Definition 20 Suppose {β n } n=1 is a sequence known to converge to zero and {α n } n=1 converges to a number α. If a positive constant K exists with α n α K β n, for large n, then we say that {α n } n=1 converges to α with rate (or order) of convergence O(β n ) and we write α n α + O(β n ).

Rate of Example Example 21 x sin(x) 0 as x 0. Find the rate of convergence.

Homework Homework assignment 2, due: TBA

Overview

Command Line and Basic Constructs Example 22 Graph sin(x) and cos(x) for 0 x 2π using different styles and various partitions in.

M-files: Functions and Scripts Example 23 Generate a program that has as input constants a, b and n 1 and produces as output the Midpoint Method b approximation on n subintervals to f (x) dx where the function f is given by a specified M-file. a Then generate a script that calls this program with n = 2 k for k = 0, 1, 2,..., 10 and graphs the approximations to 3 (1 + sin(3x 2 )) dx vs. k. 0