Order of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n

Size: px
Start display at page:

Download "Order of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n"

Transcription

1 Week 3 Jack Carl Kiefer (94-98) Jack Kiefer was an American statistician. Much of his research was on the optimal design of eperiments. However, he also made significant contributions to other areas of statistics and optimization, including the introduction of golden section search (his master s thesis work) and the Dvoretzky-Kiefer-Wolfowitz inequality. Question: How fast does n converge to zero? To answer this question, we study the order of convergence. Order of convergence Let be a fied point of g (also a root of f ). We have n g n g Suppose n g n converges to. Let e n n. We have g e n g e n n g n g * Note: If we use mean value theorem, then g ng g n n between n and g n. *. It is hard to evaluate We apply the Taylor epansion of g e n g e n g g e n ==> e n g e n g! Notations (Big O and small o): If at : g e n o e n! e n o e n Fh C as h, then we say Fh Oh p as h h p ( Fh is big O of p h or Fh is of order p h ) If Fh h p as h, then we say Fh oh p as h and n is somewhere - -

2 Definition of order of convergence If g, then we have e n g e n ==> e n g e n This is called linear convergence (first order convergence) If g but g, then we have e n g ==> e n e n g e n This is called quadratic convergence (second order convergence), then we have If g g p but g p e n g p p! p e n ==> e n g p p! e n This is called p-th order convergence. p See NL_solvers/newton_convg.m (which shows Newton s method converges quadratically) and NL_solvers/iter_convg.m (which shows the linear convergence of the iteration n n e for solving e ). Multiplicity of a root Recall that is a root of f if f. Taylor epansion of f around : f f Definition: If f but f! f f, then is called a simple root (a root of multiplicity ). - -

3 If f f but f, then is called a double root (a root of multiplicity ). If f f f p but f p, then is called a root of multiplicity p. Order of convergence of Newton s method Newton s method: n g n, f f f g If is a simple root ( g g f f f ), then we have ==> At least quadratic convergence Conclusion: At a simple root, Newton s method has at least quadratic convergence.. If is a root of multiplicity p (p > ), then we use Taylor epansion to calculate g (You can skip the following derivation since it has been shown before.) f f f p but f p ==> ==> ==> f p f p! f f p p! f f p p p g f f p p Comparing with the Taylor epansion of g g we obtain that g at - 3 -

4 g p ==> Linear convergence. Conclusion: At a root of multiplicity p >, Newton s method has linear convergence. Question: How to regain quadratic convergence at a root of multiplicity p >? Schroder s method: Suppose we know the multiplicity p of the root. Then we use the iterative method n g n, g p f f This is called Schroder s method. For Schroder s method g p f f p p p p O ==> g p p O ==> It has at least quadratic convergence. Note: Schroder s method requires that we know the multiplicity p of the root. Remark: There are other variations of Newton s method. For eample, the secant method uses a finite difference to estimate the derivative: n n f n n n f f f n n, given two values, that are near the root. The bisection method can only be used to solve a single equation. Newton s method can be etended to solve a system of nonlinear equations

5 Newton s method for solving non-linear system f Notations: N Definition: * f If Newton s method f f f f N,,, N,,, N,,, N, then we say * is a solution of f Suppose f is differentiable. We start with a point. The goal is to find one solution of f. Taylor epansion of f around : f f f where f is the Jacobi matri of f f f f N f f f f N f N f N f N N Near, f is well approimated by f f Strategy: Start with Instead of solving f directly, we solve f f. Let be the solution of f f. Let. We have f f f f f \ f in MATLAB ==> ==> where is the solution of f f. Take as the new starting point and repeat the process

6 where is the solution of f f n n n If n tol, then stop. Norm of a vector u u,u,,u N T where n is the solution of f n n f n -norm: -norm: def u N u j j def / N u j u j def infinity-norm: u p-norm: u p def mau j j N p u j j /p Several issues about Newton s method for solving f : ) Calculating n requires the solution of a linear system A b, A f n, b f n ) In Matlab, to solve A b, we use A \ b. 3) Cost of calculating A f n is ON. 4) Cost of solving A b is ON 3. Talk about Assignment 3, NL_sys_solver/run_newton.m, which is similar to problem in Assignment

7 The Golden search method for minimization Definition: If f attains the minimum at, then we define argmin min def f f def f The golden search method Suppose f is concave up and has a minimum in a, b. The goal is to find argmin a,b f (the value of at which f attains the minimum). Note: To find a maimum, consider f instead and search its minimum. Strategy: Start with a, b (Draw the graph of a concave up f to show that it is not possible to determine which sub-interval contains the minimum if we only consider c a b ) Consider r a b a g, r a b ag,.5 g a b Note that r is on the left of the mid-point r while r is on the right of the midpoint r a b. (Draw the graph of a concave up f with a, b, r, r ) If f r f, r repeat the process with a, r. Otherwise, repeat the process with r, b. If the size of interval < tol, stop. The number of function evaluations per iteration =. Question: How to reduce it to? Suppose we repeat the process with a, r. a a, b r, b a r a b ag ==> r a b a g a b ag g, - 7 -

8 r a b a g a b ag If we select g such that g g, then we have r r, f r f r This reduces the number of function evaluations per iteration to. Solving g g, we obtain g 5.68 This number is called the golden ratio. The method is called the golden search method. 4 Eample: Use the golden search method to find a minimum of f e sin in,. First, try the following MATLAB code to see roughly where the minimum point lies: =[:.:]; y=ep(/4)-sin(); plot(,y) Go to Golden_search/golden_.m Matlab code (minimizing f()) clear; a = ; b = ; tol =.e; n = ; % g=(sqrt(5))/; r=a+(ba)*(g); f=f(r); r=a+(ba)*g; f=f(r); - 8 -

9 % while (b-a) > tol, n = n+; if f < f, b=r; r=r; f=f; r=a+(ba)*(g); f=f(r); else a=r; r=r; f=f; r=a+(ba)*g; f=f(r); end end = (a+b)/; In a separate file named f.m function [y]=f() y=ep(/4)sin(); Remark: One can use MATLAB built-in function to do the job. FMINSEARCH Multidimensional unconstrained nonlinear minimization (Nelder-Mead). X = FMINSEARCH(FUN,X) starts at X and attempts to find a local minimizer X of the function FUN. FUN is a function handle. FUN accepts input X and returns a scalar function value F evaluated at X. X can be a scalar, vector or matri. format long fminsearch(@() ep(/4)-sin(),) - 9 -

10 Golden_.m is similar to problem 3 in homework assignment. For our homework problem we cannot use fminsearch since there is no analytical epression for our function. Note: The golden search method is guaranteed to converge. In each iteration step, the size of interval is multiplied by a factor of g.68. r a a b ag a b ag b r b a b a g b ag Let N be the number of iterations needed to reach the error tolerance. ==> b ag N tol N g b a tol ==> N log g log b a tol log b a tol ==> N log g Eample: a, b, tol log b a tol ==> N log 49.3 g ==> N 5 Use Newton s method for minimization problems Solving Solving arg min arg min G G is equivalent to solving The gradient of G is defined as G. is equivalent to solving G. - -

11 G G G G N N The bonus problem in Assignment 3 asks you to use Newton s method to find the optimal value c of the parameters abc,, such that error between the fitting function g e cosa band the data from data.tt is minimized. Numerical analysis uses computers a lot. Question: How are real numbers stored in computers? Floating point representation and round-off error Floating point representation In computers, a non-zero real number is represented as fl.a a a t p = is the base of the number system. is fied. = + or is the sign. It depends on, and occupies bit..a a a t is called the mantissa. It depends on. t : the number of bits in the mantissa. t is fied. Mathematically.a a a t a a a t t a i, i,,, t = ==> a i or a i We can always make a. If a but a, then fl.a a 3 a t ==> a ==> We do not need to store a! ==> The mantissa occupies only (t-) bits. p - -

12 p is the eponent. p depends on, and occupies k bits. p is stored as k k pbias bk bk b bkbk b, bi integer k : the number of bits used to store p. k is fied. bias : the bias to make p bias positive. bias is fied. The range of p is determined by k. L p U Note: L is negative and U is positive. fl occupies t k t k bits. t k t k sign mantissa eponent Eample: Machine precision In the floating point representation system,. The smallest number larger than is. t t For this reason, t is called the machine precision. (Draw the real ais with and t ) Round-off error Round-off error is the error in the floating point representation. We first consider the simple case where we do truncating. - -

13 ==> ==>.a a a a p t t p.a a a t fl fl. t a t a t p.a a p t t t The absolute error (if we do truncating) is.a a t t fl p t p t Here we have used the fact that note a a i t at. at a t. The relative error (if we do truncating) is fl.a t a t p t.a a a t a t Here we have used.a a a t a t If we do rounding, we have fl p t p p t t (machine precision) p. since a a a at,,,,, fl t A quick eample: p, t, rounding pt fl fl truncating fl pt fl l rounding pt fl fl truncating fl pt

14 A more convenient form of fl Let fl. We can write fl as fl, t (if we do rounding) t (if we do truncating) Note: This form of fl is very useful in error analysis. Eample: IEEE double precision floating point representation fl.a a a t p p biasbk bk b, L p U integer, t 53, k bias 3, L, U 3 MATLAB uses the IEEE-754 Double Precision Floating-point Standard to store data and perform arithmetical operations. Several issues: fl occupies 53 + = 64 bits or 8 bytes ( byte = 8 bits). Machine precision: t 5. 6 Round-off error: fl, t The range of p is p 3 ==> p 3 46 p is stored as p 3 b b b ==> and represents (the real number zero). 47 are not used for storing p

15 represents Inf, Inf, NaN, Eample: Toy model Assume bias. negative positive t 3 k What is this number? p. where p bias p bias p Overflow and underflow In the double precision floating point representation, p, L p U fl.a a a t The largest number is B. U U 3 38 The smallest non-zero number is b. L L 38 Overflow: If B, then set fl inf Note: overflow is a fatal error. Underflow: If b, then set fl Note: underflow is a non-fatal error. Summary: Double precision floating point representation fl.a a a t p p bias b b b k k, L p U, t 53, k bias 3, L, U 3-5 -

16 Machine precision: t 5. 6 Round-off error: fl, t Overflow and underflow: The largest number is B. U U 3 38 If B, then set fl inf (overflow is a fatal error). The smallest non-zero number is b. L L 38 If b, then set fl (underflow is a non-fatal error). Eample To fully understand the floating point representation system, let us see a very simple eample. Suppose t 3, k,, bias=, p, p bias. Then a real number is represented by fl.a a where a, a a and a or. p All the numbers that can be represented by this simple system are b positive sign a a3 b - 6 -

17 and,,,,,,,, plus and inf, -inf, NaN,. The last two are represented as follows. First, the eponent p (where p ) is stored as pbias pbias while represents the real number zero and represents inf, -inf, NaN,. In this eample, the machine precision is and the represented numbers are NOT 4 uniformly distributed on the number line (even though the distribution is uniform in each subinterval). The numbers represented by the simple floating point system. t Also, note that in this system cannot be represented. If one increases the range of the eponent, then one can be represented and the smallest number that is bigger than one will be (one+machine precision). Furthermore, the smallest positive number in this system is 4 (same as the machine precision, which is a coincidence) and the largest positive number is 7. Give me 8 any number now and we can decide how it is represented in this system. Let us pick. Since 7, it is represented as inf. How about 8 8 or? Since, this is underflow and we set them as zero

18 Eample In order to see that the smallest positive number is not necessarily the same as the machine precision, let us consider the case where t, k,,bias=, p. Then the machine precision is.. 4 t but the smallest positive number now is still You can play with more simple cases to gain better understanding. Four Sources of error Eample: Consider a model for wild salmon population. The goal of modeling is to do predictions. Let yt be the population. y ry y p Hy,t K Eponential Growth Effect of Harvest limited resource Error source #: error in the mathematical model The effect of limited resource may not be y p K ; Error source #: error in the parameters The estimated values of r, K and p are not eact. Error source #3: discretization error To predict the population, we need to solve: y Fy,t, y y where Fy,t ry y p K Hy,t Let t n n t. yt n yt n t y t n Fyt,t n n ==> yt n yt tf n yt n,t n Euler s method: y n y n tfy n,t n y n satisfies - 8 -

19 y n yt n O t Error source #4: round-off error Error due to discretization For most real numbers, fl. Loss of accuracy due to numerical cancellation Consider the calculation of A B where A > and B >. fla A, ~ 6 flb B, ~ 6 ==> fla flb A B The absolute error: A B A B Eact value Absolute error A A B B A B Eact value Relative error A B A B 3, 3 ~ 6 The relative error: A B A B A B A B 3, 3 ~ 6 That is, in the calculation of A B, the round-off error is magnified by a factor of A B A B. When A is close to B, the factor A B is large and we lose accuracy. A B When A B A B ~6, the relative error is 6 3 ~ O and there is no accuracy. Eample: Solving a b c for a 8, b 8, c.3 8 r b b 4 ac a Numerical formula #: r = (b+sqrt(b^4*a*c))/(*a) numerical cancellation occurs! - 9 -

20 Numerical result: r =.745 (not a good solution since 7 ar brc ) Now let us find a good numerical formula. Multiplying both the numerator and denominator by b r b b 4acb b 4ac 4 ac b b 4ac a b b 4ac a c b b 4ac b 4 ac, we have Numerical formula #: r = -*c/(b+sqrt(b^4*a*c)) Numerical result: r =.3 (a good solution since ar br c ) 8.49 See Codes\Num_Cancel\Num_cancel_.m. What is wrong with Numerical formula #? We identify r b b 4 ac a A b 4 ac, B b a 8, b 8, c.3 8 ==> A B b 4 ac b 8 4 ac ==> A B b 4 ac b b 4 ac b ==> A B A B ==> The relative error = A B A B ~ O - -

21 b e b 8 Eample: Compute directly for b.3. Numerical cancellation occurs and we b get.856 from the direct computation. For small value of b, we use the Taylor series epansion for 3 4 b b b b b b e b! 3! 4! b b.5 b b 6 4 See Codes\Num_Cancel\Num_cancel_.m. b e to avoid cancellation: - -

Chapter 6. Nonlinear Equations. 6.1 The Problem of Nonlinear Root-finding. 6.2 Rate of Convergence

Chapter 6. Nonlinear Equations. 6.1 The Problem of Nonlinear Root-finding. 6.2 Rate of Convergence Chapter 6 Nonlinear Equations 6. The Problem of Nonlinear Root-finding In this module we consider the problem of using numerical techniques to find the roots of nonlinear equations, f () =. Initially we

More information

Numerical Methods. Root Finding

Numerical Methods. Root Finding Numerical Methods Solving Non Linear 1-Dimensional Equations Root Finding Given a real valued function f of one variable (say ), the idea is to find an such that: f() 0 1 Root Finding Eamples Find real

More information

Nonlinear Equations. Chapter The Bisection Method

Nonlinear Equations. Chapter The Bisection Method Chapter 6 Nonlinear Equations Given a nonlinear function f(), a value r such that f(r) = 0, is called a root or a zero of f() For eample, for f() = e 016064, Fig?? gives the set of points satisfying y

More information

Notes for Chapter 1 of. Scientific Computing with Case Studies

Notes for Chapter 1 of. Scientific Computing with Case Studies Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What

More information

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

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460 Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how

More information

MAT 460: Numerical Analysis I. James V. Lambers

MAT 460: Numerical Analysis I. James V. Lambers MAT 460: Numerical Analysis I James V. Lambers January 31, 2013 2 Contents 1 Mathematical Preliminaries and Error Analysis 7 1.1 Introduction............................ 7 1.1.1 Error Analysis......................

More information

Example 1: What do you know about the graph of the function

Example 1: What do you know about the graph of the function Section 1.5 Analyzing of Functions In this section, we ll look briefly at four types of functions: polynomial functions, rational functions, eponential functions and logarithmic functions. Eample 1: What

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu

More information

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods Optimization Last time Root inding: deinition, motivation Algorithms: Bisection, alse position, secant, Newton-Raphson Convergence & tradeos Eample applications o Newton s method Root inding in > 1 dimension

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

SOLVING EQUATIONS OF ONE VARIABLE

SOLVING EQUATIONS OF ONE VARIABLE 1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999 2 Today s lecture

More information

Introduction to Numerical Analysis

Introduction to Numerical Analysis Introduction to Numerical Analysis S. Baskar and S. Sivaji Ganesh Department of Mathematics Indian Institute of Technology Bombay Powai, Mumbai 400 076. Introduction to Numerical Analysis Lecture Notes

More information

Chapter 1: Preliminaries and Error Analysis

Chapter 1: Preliminaries and Error Analysis 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

More information

Numerical Analysis and Computing

Numerical Analysis and Computing Numerical Analysis and Computing Lecture Notes #02 Calculus Review; Computer Artihmetic and Finite Precision; and Convergence; Joe Mahaffy, mahaffy@math.sdsu.edu Department of Mathematics Dynamical Systems

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Applied Mathematics 205. Unit 0: Overview of Scientific Computing. Lecturer: Dr. David Knezevic

Applied Mathematics 205. Unit 0: Overview of Scientific Computing. Lecturer: Dr. David Knezevic Applied Mathematics 205 Unit 0: Overview of Scientific Computing Lecturer: Dr. David Knezevic Scientific Computing Computation is now recognized as the third pillar of science (along with theory and experiment)

More information

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. Dmitriy Leykekhman Fall 2008 Goals Learn about different methods for the solution of f(x) = 0, their advantages and disadvantages. Convergence

More information

Computer Problems for Taylor Series and Series Convergence

Computer Problems for Taylor Series and Series Convergence Computer Problems for Taylor Series and Series Convergence The two problems below are a set; the first should be done without a computer and the second is a computer-based follow up. 1. The drawing below

More information

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

More information

Unconstrained Multivariate Optimization

Unconstrained Multivariate Optimization Unconstrained Multivariate Optimization Multivariate optimization means optimization of a scalar function of a several variables: and has the general form: y = () min ( ) where () is a nonlinear scalar-valued

More information

CISE-301: Numerical Methods Topic 1:

CISE-301: Numerical Methods Topic 1: CISE-3: Numerical Methods Topic : Introduction to Numerical Methods and Taylor Series Lectures -4: KFUPM Term 9 Section 8 CISE3_Topic KFUPM - T9 - Section 8 Lecture Introduction to Numerical Methods What

More information

AP Calculus AB Summer Assignment

AP Calculus AB Summer Assignment AP Calculus AB Summer Assignment Name: When you come back to school, it is my epectation that you will have this packet completed. You will be way behind at the beginning of the year if you haven t attempted

More information

November 13, 2018 MAT186 Week 8 Justin Ko

November 13, 2018 MAT186 Week 8 Justin Ko 1 Mean Value Theorem Theorem 1 (Mean Value Theorem). Let f be a continuous on [a, b] and differentiable on (a, b). There eists a c (a, b) such that f f(b) f(a) (c) =. b a Eample 1: The Mean Value Theorem

More information

Mathematical preliminaries and error analysis

Mathematical preliminaries and error analysis Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan September 12, 2015 Outline 1 Round-off errors and computer arithmetic

More information

Further factorising, simplifying, completing the square and algebraic proof

Further factorising, simplifying, completing the square and algebraic proof Further factorising, simplifying, completing the square and algebraic proof 8 CHAPTER 8. Further factorising Quadratic epressions of the form b c were factorised in Section 8. by finding two numbers whose

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors Roundoff errors and floating-point arithmetic

More information

Paul Heckbert. Computer Science Department Carnegie Mellon University. 26 Sept B - Introduction to Scientific Computing 1

Paul Heckbert. Computer Science Department Carnegie Mellon University. 26 Sept B - Introduction to Scientific Computing 1 Paul Heckbert Computer Science Department Carnegie Mellon University 26 Sept. 2 5-859B - Introduction to Scientific Computing aerospace: simulate subsonic & supersonic air flow around full aircraft, no

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic

More information

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Jim Lambers MAT 610 Summer Session Lecture 2 Notes Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the

More information

Limits: How to approach them?

Limits: How to approach them? Limits: How to approach them? The purpose of this guide is to show you the many ways to solve it problems. These depend on many factors. The best way to do this is by working out a few eamples. In particular,

More information

Lecture 7. Floating point arithmetic and stability

Lecture 7. Floating point arithmetic and stability Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating

More information

Numerical Methods - Preliminaries

Numerical Methods - Preliminaries Numerical Methods - Preliminaries Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Preliminaries 2013 1 / 58 Table of Contents 1 Introduction to Numerical Methods Numerical

More information

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

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods Numerical Methods - Lecture 1 Numerical Methods Lecture. Analysis o errors in numerical methods Numerical Methods - Lecture Why represent numbers in loating point ormat? Eample 1. How a number 56.78 can

More information

AP Calculus AB Summer Assignment

AP Calculus AB Summer Assignment AP Calculus AB Summer Assignment Name: When you come back to school, you will be epected to have attempted every problem. These skills are all different tools that you will pull out of your toolbo this

More information

Polynomial Functions of Higher Degree

Polynomial Functions of Higher Degree SAMPLE CHAPTER. NOT FOR DISTRIBUTION. 4 Polynomial Functions of Higher Degree Polynomial functions of degree greater than 2 can be used to model data such as the annual temperature fluctuations in Daytona

More information

Solution of nonlinear equations

Solution of nonlinear equations Chapter 1 Solution of nonlinear equations This chapter is devoted the problem of locating roots of equations (or zeros functions). The problem occurs frequently in scientific work. In this chapter we are

More information

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight Applied Numerical Analysis (AE0-I) R. Klees and R.P. Dwight February 018 Contents 1 Preliminaries: Motivation, Computer arithmetic, Taylor series 1 1.1 Numerical Analysis Motivation..........................

More information

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that Chapter 4 Nonlinear equations 4.1 Root finding Consider the problem of solving any nonlinear relation g(x) = h(x) in the real variable x. We rephrase this problem as one of finding the zero (root) of a

More information

Math 411 Preliminaries

Math 411 Preliminaries Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon s method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector

More information

Example - Newton-Raphson Method

Example - Newton-Raphson Method Eample - Newton-Raphson Method We now consider the following eample: minimize f( 3 3 + -- 4 4 Since f ( 3 2 + 3 3 and f ( 6 + 9 2 we form the following iteration: + n 3 ( n 3 3( n 2 ------------------------------------

More information

Examples MAT-INF1100. Øyvind Ryan

Examples MAT-INF1100. Øyvind Ryan Examples MAT-INF00 Øyvind Ryan February 9, 20 Example 0.. Instead of converting 76 to base 8 let us convert it to base 6. We find that 76//6 = 2 with remainder. In the next step we find 2//6 = 4 with remainder.

More information

(One Dimension) Problem: for a function f(x), find x 0 such that f(x 0 ) = 0. f(x)

(One Dimension) Problem: for a function f(x), find x 0 such that f(x 0 ) = 0. f(x) Solving Nonlinear Equations & Optimization One Dimension Problem: or a unction, ind 0 such that 0 = 0. 0 One Root: The Bisection Method This one s guaranteed to converge at least to a singularity, i not

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

Lesson #33 Solving Incomplete Quadratics

Lesson #33 Solving Incomplete Quadratics Lesson # Solving Incomplete Quadratics A.A.4 Know and apply the technique of completing the square ~ 1 ~ We can also set up any quadratic to solve it in this way by completing the square, the technique

More information

Exact and Approximate Numbers:

Exact and Approximate Numbers: Eact and Approimate Numbers: The numbers that arise in technical applications are better described as eact numbers because there is not the sort of uncertainty in their values that was described above.

More information

Taylor Series and Series Convergence (Online)

Taylor Series and Series Convergence (Online) 7in 0in Felder c02_online.te V3 - February 9, 205 9:5 A.M. Page CHAPTER 2 Taylor Series and Series Convergence (Online) 2.8 Asymptotic Epansions In introductory calculus classes the statement this series

More information

Pure Core 2. Revision Notes

Pure Core 2. Revision Notes Pure Core Revision Notes June 06 Pure Core Algebra... Polynomials... Factorising... Standard results... Long division... Remainder theorem... 4 Factor theorem... 5 Choosing a suitable factor... 6 Cubic

More information

Introduction to Finite Di erence Methods

Introduction to Finite Di erence Methods Introduction to Finite Di erence Methods ME 448/548 Notes Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@pdx.edu ME 448/548: Introduction to Finite Di erence Approximation

More information

Chapter 1 Mathematical Preliminaries and Error Analysis

Chapter 1 Mathematical Preliminaries and Error Analysis Numerical Analysis (Math 3313) 2019-2018 Chapter 1 Mathematical Preliminaries and Error Analysis Intended learning outcomes: Upon successful completion of this chapter, a student will be able to (1) list

More information

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1 Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the

More information

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1 Lectures - Week 11 General First Order ODEs & Numerical Methods for IVPs In general, nonlinear problems are much more difficult to solve than linear ones. Unfortunately many phenomena exhibit nonlinear

More information

1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS

1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS Chapter 1 NUMBER REPRESENTATION, ERROR ANALYSIS 1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS Floating-point representation x t,r of a number x: x t,r = m t P cr, where: P - base (the

More information

1. Find the domain of the following functions. Write your answer using interval notation. (9 pts.)

1. Find the domain of the following functions. Write your answer using interval notation. (9 pts.) MATH- Sample Eam Spring 7. Find the domain of the following functions. Write your answer using interval notation. (9 pts.) a. 9 f ( ) b. g ( ) 9 8 8. Write the equation of the circle in standard form given

More information

Chapter 1: Introduction and mathematical preliminaries

Chapter 1: Introduction and mathematical preliminaries Chapter 1: Introduction and mathematical preliminaries Evy Kersalé September 26, 2011 Motivation Most of the mathematical problems you have encountered so far can be solved analytically. However, in real-life,

More information

Chapter 1 Error Analysis

Chapter 1 Error Analysis Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of

More information

Answers for NSSH exam paper 2 type of questions, based on the syllabus part 2 (includes 16)

Answers for NSSH exam paper 2 type of questions, based on the syllabus part 2 (includes 16) Answers for NSSH eam paper type of questions, based on the syllabus part (includes 6) Section Integration dy 6 6. (a) Integrate with respect to : d y c ( )d or d The curve passes through P(,) so = 6/ +

More information

Lecture V. Numerical Optimization

Lecture V. Numerical Optimization Lecture V Numerical Optimization Gianluca Violante New York University Quantitative Macroeconomics G. Violante, Numerical Optimization p. 1 /19 Isomorphism I We describe minimization problems: to maximize

More information

Using the TI-92+ : examples

Using the TI-92+ : examples Using the TI-9+ : eamples Michel Beaudin École de technologie supérieure 1100, rue Notre-Dame Ouest Montréal (Québec) Canada, H3C 1K3 mbeaudin@seg.etsmtl.ca 1- Introduction We incorporated the use of the

More information

Brief Revision Notes and Strategies

Brief Revision Notes and Strategies Brief Revision Notes and Strategies Straight Line Distance Formula d = ( ) + ( y y ) d is distance between A(, y ) and B(, y ) Mid-point formula +, y + M y M is midpoint of A(, y ) and B(, y ) y y Equation

More information

Numerical Integration (Quadrature) Another application for our interpolation tools!

Numerical Integration (Quadrature) Another application for our interpolation tools! Numerical Integration (Quadrature) Another application for our interpolation tools! Integration: Area under a curve Curve = data or function Integrating data Finite number of data points spacing specified

More information

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy, Outline Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research

More information

MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li

MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li 1 L Hospital s Rule Another useful application of mean value theorems is L Hospital s Rule. It helps us to evaluate its of indeterminate

More information

Math Numerical Analysis

Math Numerical Analysis Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center

More information

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This

More information

3x 2. x ))))) and sketch the graph, labelling everything.

3x 2. x ))))) and sketch the graph, labelling everything. Fall 2006 Practice Math 102 Final Eam 1 1. Sketch the graph of f() =. What is the domain of f? [0, ) Use transformations to sketch the graph of g() = 2. What is the domain of g? 1 1 2. a. Given f() = )))))

More information

CS412: Introduction to Numerical Methods

CS412: Introduction to Numerical Methods CS412: Introduction to Numerical Methods MIDTERM #1 2:30PM - 3:45PM, Tuesday, 03/10/2015 Instructions: This exam is a closed book and closed notes exam, i.e., you are not allowed to consult any textbook,

More information

1 Floating point arithmetic

1 Floating point arithmetic Introduction to Floating Point Arithmetic Floating point arithmetic Floating point representation (scientific notation) of numbers, for example, takes the following form.346 0 sign fraction base exponent

More information

Math 120 Handouts. Functions Worksheet I (will be provided in class) Point Slope Equation of the Line 3. Functions Worksheet III 15

Math 120 Handouts. Functions Worksheet I (will be provided in class) Point Slope Equation of the Line 3. Functions Worksheet III 15 Math 0 Handouts HW # (will be provided to class) Lines: Concepts from Previous Classes (emailed to the class) Parabola Plots # (will be provided in class) Functions Worksheet I (will be provided in class)

More information

A BRIEF REVIEW OF ALGEBRA AND TRIGONOMETRY

A BRIEF REVIEW OF ALGEBRA AND TRIGONOMETRY A BRIEF REVIEW OF ALGEBRA AND TRIGONOMETR Some Key Concepts:. The slope and the equation of a straight line. Functions and functional notation. The average rate of change of a function and the DIFFERENCE-

More information

INTRODUCTION TO COMPUTATIONAL MATHEMATICS

INTRODUCTION TO COMPUTATIONAL MATHEMATICS INTRODUCTION TO COMPUTATIONAL MATHEMATICS Course Notes for CM 271 / AMATH 341 / CS 371 Fall 2007 Instructor: Prof. Justin Wan School of Computer Science University of Waterloo Course notes by Prof. Hans

More information

8 Numerical methods for unconstrained problems

8 Numerical methods for unconstrained problems 8 Numerical methods for unconstrained problems Optimization is one of the important fields in numerical computation, beside solving differential equations and linear systems. We can see that these fields

More information

SOLVING QUADRATICS. Copyright - Kramzil Pty Ltd trading as Academic Teacher Resources

SOLVING QUADRATICS. Copyright - Kramzil Pty Ltd trading as Academic Teacher Resources SOLVING QUADRATICS Copyright - Kramzil Pty Ltd trading as Academic Teacher Resources SOLVING QUADRATICS General Form: y a b c Where a, b and c are constants To solve a quadratic equation, the equation

More information

Pre-Cal Review 13.2 Parent Functions and Their Domain

Pre-Cal Review 13.2 Parent Functions and Their Domain Pre-Cal Review. Parent Functions and Their Domain Name: Date: Per: Parent functions are used to identif available domain and ranges. If ou can quickl think of what the function looks like, ou can quickl

More information

Lecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico

Lecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico Lecture 5 September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico 1 Review: Office hours at regularly scheduled times this week Tuesday: 9:30am-11am Wed: 2:30pm-4:00pm

More information

ECS 231 Computer Arithmetic 1 / 27

ECS 231 Computer Arithmetic 1 / 27 ECS 231 Computer Arithmetic 1 / 27 Outline 1 Floating-point numbers and representations 2 Floating-point arithmetic 3 Floating-point error analysis 4 Further reading 2 / 27 Outline 1 Floating-point numbers

More information

Sections 5.1: Areas and Distances

Sections 5.1: Areas and Distances Sections.: Areas and Distances In this section we shall consider problems closely related to the problems we considered at the beginning of the semester (the tangent and velocity problems). Specifically,

More information

Economics 205 Exercises

Economics 205 Exercises Economics 05 Eercises Prof. Watson, Fall 006 (Includes eaminations through Fall 003) Part 1: Basic Analysis 1. Using ε and δ, write in formal terms the meaning of lim a f() = c, where f : R R.. Write the

More information

Numerical Methods Lecture 3

Numerical Methods Lecture 3 Numerical Methods Lecture 3 Nonlinear Equations by Pavel Ludvík Introduction Definition (Root or zero of a function) A root (or a zero) of a function f is a solution of an equation f (x) = 0. We learn

More information

Finding Slope. Find the slopes of the lines passing through the following points. rise run

Finding Slope. Find the slopes of the lines passing through the following points. rise run Finding Slope Find the slopes of the lines passing through the following points. y y1 Formula for slope: m 1 m rise run Find the slopes of the lines passing through the following points. E #1: (7,0) and

More information

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

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le Floating Point Number Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview Real number system Examples Absolute and relative errors Floating point numbers Roundoff

More information

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

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

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

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Computer Representation of Numbers Counting numbers (unsigned integers) are the numbers 0,

More information

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

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b. CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how

More information

Introduction to Scientific Computing

Introduction to Scientific Computing (Lecture 2: Machine precision and condition number) B. Rosić, T.Moshagen Institute of Scientific Computing General information :) 13 homeworks (HW) Work in groups of 2 or 3 people Each HW brings maximally

More information

Numerical Solution of f(x) = 0

Numerical Solution of f(x) = 0 Numerical Solution of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@pdx.edu ME 350: Finding roots of f(x) = 0 Overview Topics covered in these slides

More information

CHAPTER 10 Zeros of Functions

CHAPTER 10 Zeros of Functions CHAPTER 10 Zeros of Functions An important part of the maths syllabus in secondary school is equation solving. This is important for the simple reason that equations are important a wide range of problems

More information

arb where a A, b B and we say a is related to b. Howdowewritea is not related to b? 2Rw 1Ro A B = {(a, b) a A, b B}

arb where a A, b B and we say a is related to b. Howdowewritea is not related to b? 2Rw 1Ro A B = {(a, b) a A, b B} Functions Functions play an important role in mathematics as well as computer science. A function is a special type of relation. So what s a relation? A relation, R, from set A to set B is defined as arb

More information

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 Petros Koumoutsakos Gerardo Tauriello (Last update: July 2, 2015) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

Core Connections Algebra 2 Checkpoint Materials

Core Connections Algebra 2 Checkpoint Materials Core Connections Algebra 2 Note to Students (and their Teachers) Students master different skills at different speeds. No two students learn eactly the same way at the same time. At some point you will

More information

Methods for Advanced Mathematics (C3) Coursework Numerical Methods

Methods for Advanced Mathematics (C3) Coursework Numerical Methods Woodhouse College 0 Page Introduction... 3 Terminolog... 3 Activit... 4 Wh use numerical methods?... Change of sign... Activit... 6 Interval Bisection... 7 Decimal Search... 8 Coursework Requirements on

More information

Higher Tier - Algebra revision

Higher Tier - Algebra revision Higher Tier - Algebra revision Contents: Indices Epanding single brackets Epanding double brackets Substitution Solving equations Solving equations from angle probs Finding nth term of a sequence Simultaneous

More information

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom Central Limit Theorem and the Law of Large Numbers Class 6, 8.5 Jeremy Orloff and Jonathan Bloom Learning Goals. Understand the statement of the law of large numbers. 2. Understand the statement of the

More information

Line Search Methods. Shefali Kulkarni-Thaker

Line Search Methods. Shefali Kulkarni-Thaker 1 BISECTION METHOD Line Search Methods Shefali Kulkarni-Thaker Consider the following unconstrained optimization problem min f(x) x R Any optimization algorithm starts by an initial point x 0 and performs

More information

= 1 2 x (x 1) + 1 {x} (1 {x}). [t] dt = 1 x (x 1) + O (1), [t] dt = 1 2 x2 + O (x), (where the error is not now zero when x is an integer.

= 1 2 x (x 1) + 1 {x} (1 {x}). [t] dt = 1 x (x 1) + O (1), [t] dt = 1 2 x2 + O (x), (where the error is not now zero when x is an integer. Problem Sheet,. i) Draw the graphs for [] and {}. ii) Show that for α R, α+ α [t] dt = α and α+ α {t} dt =. Hint Split these integrals at the integer which must lie in any interval of length, such as [α,

More information

Floating-point Computation

Floating-point Computation Chapter 2 Floating-point Computation 21 Positional Number System An integer N in a number system of base (or radix) β may be written as N = a n β n + a n 1 β n 1 + + a 1 β + a 0 = P n (β) where a i are

More information

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k.

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k. Problem du jour Week 6: Monday, Mar 7 Show that for any initial guess x 0 > 0, Newton iteration on f(x) = x 2 a produces a decreasing sequence x 1 x 2... x n a. What is the rate of convergence if a = 0?

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

NUMERICAL METHODS FOR SOLVING EQUATIONS

NUMERICAL METHODS FOR SOLVING EQUATIONS Mathematics Revision Guides Numerical Methods for Solving Equations Page of M.K. HOME TUITION Mathematics Revision Guides Level: AS / A Level AQA : C3 Edecel: C3 OCR: C3 NUMERICAL METHODS FOR SOLVING EQUATIONS

More information