Notes: Introduction to Numerical Methods

Size: px
Start display at page:

Download "Notes: Introduction to Numerical Methods"

Transcription

1 Notes: Introduction to Numerical Methods J.C. Chrispell Department of Mathematics Indiana University of Pennsylvania Indiana, PA, 15705, USA February 26, 2018

2 ii

3 Preface These notes will serve as an introduction to numerical methods for scientific computing. From the IUP course catalog the course will contain: Algorithmic methods for function evaluation, roots of equations, solutions to systems of linear equations, function interpolation, numerical differentiation; and use spline functions for cure fitting. Focus on managing and measuring errors in computation. Also offered as COSC 250; either COSC 250 or MATH 250 may be substituted for the other and may be used interchangeably for D or F repeats but may not be counted for duplicate credit. Material presented in the course will tend to follow the presentation of Cheney and Kincaid in their text: Numerical Mathematics and Computing (seventh edition) [2]. Relevant course material will start in chapter 1 of the text and selected chapters will be covered as time in the course permits. I will supplement the Winston text with additional material from other popular books on numerical methods: Scientific Computing: An Introduction Survey by Heath [3] Numerical Analysis by Burden and Faires [1] My Apologies in advance for any typographical errors or mistakes that are present in this document. That said, I will do my very best to update and correct the document if I am made aware of these inaccuracies. -John Chrispell iii

4 iv

5 Contents 1 Introduction and Review Errors Accurate and Precise Horner s Algorithm Floating Point Representation Activities Taylor s Theorem Taylor s Theorem using h Gaussian Elimination Assessment of Algorithm Improving Gaussian Elimination Methods for Finding Zeros Bisection Algorithm Newton s Method Numerical Integration Trapezoid Rule Appendices 29 Bibliography 31 v

6 Chapter 1 Introduction and Review I have never listened to anyone who criticized my taste in space travel, sideshows or gorillas. When this occurs, I pack up my dinosaurs and leave the room. Ray Bradbury, Zen in the Art of Writing What is Scientific Computing? The major theme of this class will be solving scientific problems using computers. Many of the examples considered will be smaller parts that can be thought of as tools for implementing or examining larger computational problems of interest. We will take advantage of replacing a difficult mathematical problem with simpler problems that are easier to handle. Using the smaller parts insight will be gained into the larger problem of interest. In this class the methods and algorithms underlying computational tools you already use will be examined. Scientific Computing: Deals with computing continuous quantities in science and engineering (time, distance, velocity, temperature, density, pressure, stress) that can not be solved exactly or analytically in a finite number of steps. Typically we are numerically solving problems that involve integrals, derivatives, and nonliterary. Numerical Analysis: An area of mathematics where concern is placed on the design and implementation of algorithms to solve scientific problems. In general for solving a problem you will: Develop a model (expressed by equations) for a phenomenon or system of interest. Find/Develop an algorithm to solve the the system. Develop a Computational Implementations. 1

7 Run your implementation. Post process your results (Graphs Tables Charts). Interpret validate your results. Problems are well posed provided: 1. A solution to the problem of interest exists. 2. The solution is unique. 3. The solution depends continuously on the data. The last item here is important as problems that are ill conditioned have large changes in output with small changes in the initial conditions or data. This can be troubling for numerical methods, and is not always avoidable. In general we will use some standard techniques to attack problems presented. Replacing an unsolvable problem by a problem that is close to it in some sense and then looking at the closely related solution. Replace infinite dimensional spaces with finite ones. Infinite processes with Finite processes: Integrals with Sums Derivatives with Finite Differences Nonlinear Problems with Linear Ones Complicated Functions with Simple Ones (polynomials). General Matrices with Simpler Matrices. With all of this replacement and simplification the sources of error and approximation need to be accounted for. How good is the approximated solution? Significant Digits The significant digits in a computation start with the left most non zero digit in a computation, and end with the right most correct digit (including final zeros that are correct). Example: Lets consider calculating the surface area of the Earth. The area of a sphere is: A = 4πr 2 2

8 The radius of the Earth (r 6370 km). The value for π rounded at some point. The numerical computation will be rounded at some point. All of these assumptions will come into play at some point. How many digits are significant? Figure 1.0.1: Here the intersection of two parallel lines is compared with an error range given of size ɛ. Note the closer the two lines are to parallel the more ill conditioned finding the intersection will become. Example: Consider solving the following system of equations x y = x y = However you can only keep three significant digits. Keeping only three significant digits in all computations an answer of Solving the problem using sage: x 29.0 and y 19.0 x and y Note that the example in the Cheney text is far more dramatic, and the potential for error when truncating grows dramatically if the two lines of interest are nearly parallel. 3

9 1.1 Errors If two values are considered one taken to be true and the other an approximation then the Error is given by: Error = True Approximation The Absolute Error of using the Approximation is Absolute Error = True Approximation and we denote Relative Error = True Approximation True The Relative Error is usually more useful than the Absolute Error. The Relative Error is not defined if the true value we are looking for is zero. Example: Consider the case where we are approximating and have: Here we have the following: True = and Approximation = Error = 0.01 Absolute Error = 0.01 Relative Error = Note that the approximation has 4 significant digits. Example: Consider the case where we are approximating and have: Here we have the following: True = and Approximation = Error = Absolute Error = Relative Error = 1 Here relative error is a much better indicator of how well the approximation fits the true value. 4

10 1.1.1 Accurate and Precise When a computation is accurate to n decimal places then we can trust n digits to the right of the decimal place. Similar when a computation is said to be accurate to n significant digits then the computation is meaningful for n places beginning with the leftmost nonzero digit given. The classic example here is a meter stick. The user can consider it accurate to the level of graduation on the meter stick. A second example would be the mileage on your car. It usually displays in tenth of a mile increments. You could use your car to measure distances accurate withing two tenths of a mile. Precision is a different game. Consider adding the following values: = 9.07 The second digit in 3.4 could be from rounding any of the following: 3.41, , 3.44, 3.36, 3.399, 3.38 to two significant digits. So there can only be two signifigant digits in the answer. The results from multiplication and division can be even more misleading. Computers will in some cases allow a user to decide if they would like to use rounding or chopping. Note there may be several different schemes for rounding values (especially when it comes to rounding values ending with a 5) Horner s Algorithm In general it is a good idea to complete most computation using a minimum number of floating point operations. Consider evaluating polynomials. For example given f(x) = a 0 + a 1 x + a 2 x 2 + a n 1 x n 1 + a n x n It would not be wise to compute x 2, then x 3 and so on. Writing the polynomial as: f(x) = a 0 + x(a 1 + x(a 2 + x( x(a n 1 + x(a n )) )) will efficiently evaluate the polynomial without ever having to use exponentiation. Note efficient evaluation of polynomials in this is Horner s Algorithm and is accomplished using synthetic division. 5

11 1.2 Floating Point Representation Numbers when entered into a computational machine are typically broken into two parts: An integer portion. A fractional portion. with these two parts being separated by a decimal point , A second form that is used is normalized scientific notation, or normalized floating-point representation. Here the decimal point is shifted so it is written as a fraction multiplied by some power of 10. Note the leading digit of the fraction is nonzero = Any decimal in the floating point system may be written in this manner. x = ±0.d 1 d 2 d n with d 1 not equal to zero. More generally we write x = ±r 10 n with ( ) 1 10 r < 1. Here r is the mantissa and n is the exponent. If we are looking at numbers in a binary system then ( ) 1 x = ±q 2 n with 2 q < 1. Computers work exactly like this; however, on a computer we have the issue of needing to use finite word length (No more... ). This means a couple of things: No representation for irrational numbers. No representation for numbers that do not fit into a finite format. 6

12 Activity Numbers that can be expressed on a computer are called its Machine Numbers, and they very depending on the computational system being used. If we consider a binary computational system where numbers must be expressed using normalized scientific notation in the form: x = ±(0.b 1 b 2 b 3 ) 2 2 ±k where the values of b 1, b 2, b 3, and k {0, 1}. what are all the possible numbers in this computational system? What additional observations can be made about the system? We shall consider here only the positive numbers: (0.100) = 1 4 (0.100) = 1 4 (0.100) = 1 2 (0.100) = 1 (0.101) = 5 16 (0.101) = 5 8 (0.101) = 5 4 (0.110) = 3 8 (0.110) = 3 4 (0.110) = 3 2 (0.111) = 7 16 (0.111) = 7 8 (0.111) = 7 4 Note there is a hole in the number system near zero. Note there is also uneven spacing of the numbers we do have. Numbers smaller than the smallest representable number are considered underflow and typically treated as zero. Numbers larger than the largest representable number are considered overflow and will typically through an error. 7

13 For number representations on computers we actually use the IEEE-754 standard has been accepted. Precision Bits Sign Exponent Mantissa Single Double Long Double Note that gives us the ballpark for machine precision when a computation is done using a given number of bits. 8

14 1.3 Activities The limit ( e = lim ) n n n defines the number e in calculus. Estimate e by taking the value of this expression for n = 8, 8 2, 8 3,..., Compare with e obtained from the exponential function on your machine. Interpret the results. 9

15 1.4 Taylor s Theorem There are several useful forms of Taylor s Theorem and it can be argued that it is the most important theorem for the study of numerical methods. Theorem If the function f possess continuous derivatives of orders 0, 1, 2,..., (n+1) in a closed interval I = [a, b] then for any c and x in I, f(x) = n k=0 f (k) (c) (x c) k + E n+1 k! where the error tem E n+1 can be given in the form of E n+1 = f (n+1) (η) (n + 1)! (x c)n+1. Here η is a point that lies between c and x and depends on both. Note we can use Taylor s Theorem to come up with useful series expansions. Example: Use Taylor s Theorem to find a series expansion for e x. Here we need to evaluate the n th derivative of e x. We also need to pick a point of expansion or value for c. We will choose c to be zero, and recall that the derivative of e x is such that Thus, for Taylor s Theorem we need: So we then have: e x = f(0) 0! d dx ex = e x. f(0) = e 0 = 1 f (0) = e 0 = 1 f (0) = e 0 = 1 I see a pattern! (x) 0 + f (0) 1! (x) 1 + f (0) 2! = 1 0! + x 1! x + x2 2! + x3 3! +... x k = for x <. k! k=0 (x) 2 + f (0) (x) ! Note we should be a little more careful here, and prove that the series truly does converge to e x by using the full definition given in Taylor s Theorem. 10

16 In this case we have: e x = n k=0 e k k! + e η (n + 1)! xn+1 (1.4.1) which incorporates the error term. We now look at values of x in some interval around the origin, consider a x a. Then η a and we know e η e a Then the remainder or error term is such that: lim e η n (n + 1)! xn+1 lim e a n (n + 1)! an+1 = 0 Then when the limit is taken of both sides of (1.4.1) it can be seen that: e x = k=0 e k k! Taylor s theorem can be useful to find approximations to hard to compute values: Example: Use the first five terms in a Taylor s series expansion to approximate the value of e. e = Example: In the special case of n = 0 Taylors theorem is known as the Mean Value Theorem. Theorem If f is a continuous function on the closed interval [a, b] and possesses a derivative at each point in the open interval (a, b), then for some η in (a, b). Notice that this can be rearranged so that: f(b) = f(a) + (b a)f (η) f (η) = f(b) f(a) b a The right hand side here is an approximation of the derivative for any x (a, b). 11

17 1.4.1 Taylor s Theorem using h Their is a more useful form of Taylor s Theorem: Theorem If the function f possesses continuous derivatives of order 0, 1, 2,..., (n+1) in a closed interval I = [a, b], then for any x in I, f(x + h) = f(x) + f (x)h f (x)h f (x)h E n+1 = n f (k) (x) h k + E n+1 k! k=0 where h is any value such that x + h is in I and where for some η between x and x + h. E n+1 = f (n+1) (η) (n + 1)! hn+1 Note that the error term E n+1 will depend on h in two ways. Explicitly on h with the h n+1 presence. The point η generally depends on h. Note as h converges to zero we see the Error Term converges to zero at a rate proportional to h n+1. Thus, we typically write: as h goes to zero. This is short hand for: where C is an upper bounding constant. E n+1 = O(h n+1 ) E n+1 C h n+1 We additionally note that Taylor s Theorem in terms of h may be written down specifically for any value of n, and thus represents a family of theorems, each with a specific order of h approximation. f(x + h) = f(x) + O(h) f(x + h) = f(x) + f (x)h + O(h 2 ) f(x + h) = f(x) + f (x)h f (x)h 2 + O(h 3 ) 12

18 1.5 Gaussian Elimination In the previous section we considered the numbers that are available for our use on a computer. We made note that their are many numbers (especially near zero) that are not machine numbers, and when used in a computation these numbers result in numerical roundoff error. As the computation will use the closest available machine number. Lets now look at how this roundoff error can come into play when we are solving the familiar linear equation system: Ax = b The normal approach would be to compute A 1 and then use that to find x. However, there are other questions that can come into play: How do we store a large system of this form on a computer? How do we know that the answer we receive is correct? Can the algorithm we use fail? How long will it take to compute the answer? What is the operation count for computing the answer? Will the algorithm be unstable for certain systems of equations? Can we modify the algorithm to control instabilities? What is the best algorithm for the task at hand? Matrix Conditioning Issues? Lets start by considering the system of equations: Ax = b with and the right hand side be such that n n 1 A = n n + 1 n n + 1 n 1 b i = n j=1 A i,j is the sum of any given row. Note then here the solution to the system will trivially be a column of ones. Here A is a well know and poorly conditioned Vandermonde matrix. 13

19 It may be useful to use the sum of a geometric series when coding this so that any row i would look like: n (1 + i) j 1 x j = 1 i ((1 + i)n 1) j=1 The following is pseudo code for a Gaussian elimination procedure. Much like you would do by hand, our goal will be to implement and test this in MATLAB. % Forward Elimination. f o r k = 1 to (n 1) f o r i = ( k+1) to n xmult = A( i, k )/A( k, k ) ; A( i, k ) = xmult ; f o r end end Listing 1.1: Straight Gaussian Elimination j = ( k+1) to n A( i, j ) = A( i, j ) ( xmult ) A( k, j ) ; end b ( i, 1 ) = b ( i, 1 ) ( xmult ) b(k, 1 ) ; % Backward S u b s t i t u t i o n. x (n, 1 ) = b (n, 1 ) /A(n, n ) ; f o r i = (n 1) to 1 sum = b ( i, 1 ) ; end f o r j = ( i +1) to n sum = sum A( i, j ) x ( j, 1 ) ; end x ( i, 1 ) = sum/a( i, i ) ; Write a piece of code that implements this algorithm. 14

20 1.5.1 Assessment of Algorithm In order to see how well our algorithm was performing the error can be considered. There are several ways of computing the error of a vector solution. The first is to consider a straight forward vector of the difference between the computed solution and the true solution: e = x h x. A second method that is used when the true solution to a given problem is unknown is to consider a residual vector. r = Ax h b Note the residual vector will be all zeros when the true solution is obtained. In order to get a handle on the size of either the residual vector or the error vector norms are often used. A vector norm is any mapping from R n to R that satisfies the following properties: x > 0 if x 0. αx = α x. x + y x + y. (triangle inequality). where x and y are vectors in R n, and α R. Examples of vector norms include: The l 1 vector norm: The Euclidean/ l 2 -vector norm: x 1 = n x i i=1 x 2 = ( n x 2 i i=1 ) 1/2 l p -vector norm: x p = ( n x p i i=1 ) 1/p Note there are also norms for Matrices. More on this when condition number for matrices is discussed. Different norms of the residual and error vectors allow for a single value to be assessed rather than an entire vector. 15

21 1.6 Improving Gaussian Elimination For notes here we will follow Cheney s presentation. The algorithm that we have implemented will not always work! To see this consider the following example: 0x 1 + x 2 = 1 x 1 + x 2 = 2 The solution to this system is clearly x 1 = 1 and x 2 = 1; However, our Gaussian Elimination algorithm will fail! (Division by zero.) When algorithms fail this tells us to be skeptical of the results for values near the failure. If we apply the Gaussian Elimination Algorithm to the following system what happens? ɛx 1 + x 2 = 1 x 1 + x 2 = 2 After step one: ɛx 1 + x 2 = 1 +(1 ɛ 1 )x 2 = 2 ɛ 1 Doing the back solve yields: x 2 = 2 ɛ 1 1 ɛ 1 However we make note that the value of ɛ is very small, and thus and ɛ 1 is very large x 2 = 2 ɛ 1 1 ɛ 1 1 x 1 = ɛ 1 (1 x 2 ) 0. These values are not correct as we would expect in the real world to obtain values of How could we fix the system/algorithm? x 1 = 1 1 ɛ 1 and x 2 = 1 2ɛ 1 ɛ 1 Note that if we had attacked the problem considering the second equation first there would have been no difficulty with division by zero. A second issue comes from the coefficient ɛ being very small compared with the other coefficients in the row. 16

22 At the kth step in the gaussian elimination process. The entry a k k is known as the pivot element or pivot. The process of interchanging rows or columns of a matrix is known as pivoting and alters the pivot element. We aim to improve the numerical stability of the numerical algorithm. Many different operations may be algebraically equivalent; however, produce different numerical results when implemented numerically. The idea becomes to swap the rows of the system matrix so that the entry with the largest value is used to zero out the entries in the column associated with that variable during Gaussian Elimination. This is known as partial pivoting and is accomplished by interchanging two rows in the system. Gaussian Elimination with full pivoting or complete pivoting would select the pivot entry to be the largest entry in the sub-matrix of the system and reorder both rows and columns to make that element the pivot element. Seeking the largest value possible hopes to make the pivot element as numerically stable as possible. This makes the process less susceptible to roundoff errors. However, the large amount of work is usually not seen as worth the extra effort when compared with partial pivoting. An even more sophisticated method would be scaled partial pivoting. Here the largest entry in each row s i is used when picking the initial pivot equation. The pivot entry is selected by dividing current column entries (for the current variable) by the scaling value s i for each row, and taking the largest as the pivot row (see the Cheney text for an example and the Pseudocode). Simulates full pivoting by using an index vector containing information about the relative sizes of elements in each row. The idea here as that these changes to the Gaussian Elimination algorithm will allow for zero pivots and small pivots to be avoided. Gaussian Elimination is numerically stable for diagonally dominant matrices or matrices that are symmetric positive definite. The Matlab backslash operator attempts to use the best or most numerically stable algorithm available. 17

23 18

24 Chapter 2 Methods for Finding Zeros Four quiet hours is a resource that I can put to good use. Two slabs of time, each two hours long, might add up to the same four hours., but are not nearly as productive as an unbroken four. If I know that I am going to be interrupted, I can t concentrate, and if I suspect that I might be interrupted, I can t do anything at all. â Neal Stephenson, Why I m a Bad Correspondent There are lots of different methods for going about finding the roots or zeros of a function. More methods than could probably be listed in a reasonable space. The importance of finding zeros of functions can be seen by considering that any equation may be written an an equivalent form with a zero on one side of the equal sign. In general methods for finding the roots of a function make a couple of assumptions. We will assume that the domain of the function over which the root is to be found that: The function is continuous. The function is also differentiatable on the domain considered. With these assumptions we can now look at several method to find the roots of functions numerically that are especially useful when analytic methods for finding roots are not possible. In order to find a zero of a function most root finding methods make use of the intermediate value theorem. For a continuous function, f, and real values a < b such that there will be a root in the interval (a, b). f(a)f(b) < 0 19

25 2.0.1 Bisection Algorithm The bisection method looks for the root between the end points of the search interval a and b by: 1. Looking at the midpoint c = a + b 2 2. Computing f(c). 3. Seeing if f(a)f(c) < 0 and if so looking in the interval (a, c). 4. Else seeing if f(b)f(c) < 0 and if so looking in the interval form (c, b). Class coding Exercise: Write a piece of code that can be used to find the root of a specified function on a given interval in SAGE, Python, or MATLAB. Convergence Analysis At this junction it would be a good idea to take stock of how well the bisection algorithm is performing. After the n th iteration of the algorithm the distance from the root r to the center of the interval considered will be: r c n < b n a n 2 b a 2 n+1 < ɛ tol. (2.0.1) The denominator in (2.0.1) has a factor of 2 n+1 as the guess for the root will be at the center of the new interval (a, b). How many iterations will it take for the error to be less than a given tolerance? a b 2 < ɛ n+1 tol = a b < 2 n 2ɛ ( tol ) a b = ln < n ln(2) 2ɛ tol ( ) a b ln 2ɛ tol = n > ln(2) The bisection method works in the same manner as a binary search method that some may have seen in a data structures course. 20

26 False Position Method A modification of the bisection method that can be use to find the zeros of a function is the method false position method. Here instead of using the midpoint of the interval (a, b) as the new end point of the search interval. A secant line between (a, f(a)) and (b, f(b)) is constructed. and the point at which the secant line crosses the x-axis is considered the new decision point. 21

27 Using the slope of the line segments it can be seen that: c = a(f(a) f(c)) (f(a) f(b)) and the algorithm would carry on in the same manner as the bisection method did Newton s Method Newton s method or Newton-Raphson iterations are a second way to find the root of a function. Note that presented here is Newton s method for a single variable function; however, more general versions of Newton s method may be used to solve systems of equations. As with the bi-section method Newton s method assumes that our function f is continuous. Additionally it is assumed that the function f is differentable. Using the fact that the function is differentiable allows for use of the tangent line at a given point to find an approximate value for the root of the function. Consider the following figure: The initial guess for the root, x 0, of function f is updated to x 1 using the zero of the tangent line of f at the point x 0. Using point slope form of a line gives y = f (x 0 )(x x 0 ) + f(x 0 ) (2.0.2) as the equation of the tangent line of the function f at x 0. Solving (2.0.2) for its root gives x 1 a hopefully better approximation for the root of f. 0 = f (x 0 )(x 1 x 0 ) + f(x 0 ) = f(x 0 ) = f (x 0 )x 1 x 0 f (x 0 ) = f(x 0 ) + x 0 f (x 0 ) = f (x 0 )x 1 = x 1 = x 0 f(x 0) f (x 0 ) 22

28 Extending this to successive values allows for a sequence of approximations to the root of f(x) to be found where x n+1 is found from x n as: x n+1 = x n f(x n) f (x n ) The algorithm should terminate when successive approximating values become within a defined tolerance of one another. We should examine whether or not for r the root of f. lim x n = r n Coding Exercise Use Newtons Method to find the root f(x) = sin(x) between 2 and 4. Note this will approximate pi. 23

29 24

30 Chapter 3 Numerical Integration On Monday in math class Mrs. Fibonacci says, You know, you can think of almost everything as a math problem. On Tuesday I start having problems. Jon Scieszka and Lane Smith, MATH CURSE In Calculus one of the fundamental topics discussed is integration. The indefinite integral of a function is also a function of class of functions. The definite integral of a function over a fixed interval is a number. Example: Consider the function f(x) = x 3 Indefinite Integral: F (x) = x 3 dx = x4 4 + C Definite Integral: 3 0 x 3 dx = x = 81 4 Example: Consider finding the Indefinite Integral of f(x) = e x2. That is, e x2 dx =? 25

31 Using u-substitution doesn t work, and computational algebra-systems like sage give answers such as: e x2 dx = ( 1/2)i πerf(ix) as no elementary function of x has a derivative that is simply e x2. The definite integral b a f(x) dx is representation of the area under the f(x) curve between a and b. There should be a way to get a handle on this value for f(x) = e x2. Consider the interval of interest to be between 0 and 1. Then, 1 0 e x2 dx = Area How do we find the Area when we don t know the function F needed in the Fundamental Theorem of Calculus? Theorem (Fundamental Theorem of Calculus) If f is continuous on the interval [a, b] and F is an antiderivative of f, then b a f(x) dx = F (b) F (a) 26

32 3.1 Trapezoid Rule Consider dividing the domain of interest [a, b] into sections such that: a = x 0 x 1 x 2 x n = b Then the area under the curve f on each of the sub-intervals [x i, x i+1 ] is approximated using a trapezoid with a base of x i+1 x i and average height of Thus, xi (f(x i) + f(x i+1 )) x i f(x) dx 1 2 (x i+1 x i ) (f(x i ) + f(x i+1 )) and the full definite integral is approximated as: b a f(x) dx 1 n 1 (x i+1 x i ) (f(x i ) + f(x i+1 )) 2 i=0 Note if a uniform spacing of the sub-intervals of size h is used the above estimate of the definite integral simplifies to: b a f(x) dx h n 1 (f(x i ) + f(x i+1 )) 2 and several computations may be saved if the definite integral is written as: b a i=0 f(x) dx h 2 (f(x n 1 0) + f(x n )) + h f(x i ) i=1 Computational Exercise Using the Trapezoid Rule and a uniformly spaced set of points of distance h apart estimate the following definite integral: 1 ( ) sin(x) dx x 0 Assuming that the true solution to the definite integral is compute an estimate for the convergence rate of the Trapezoid Rule with respect to refinement of the mesh spacing h. 27

33 28

34 Chapter 4 Appendices 29

35 30

36 Bibliography [1] R. Burden and J. Faires. Numerical Analysis. Brooks/Cole, Boston, ninth edition edition, [2] W. Cheney and D. Kincaid. Numerical Mathematics and Computing. Brooks/Cole, Boston, seventh edition, [3] M.T. Heath. Scientific Computing: An Introductory Survey, 2nd Edition. McGraw-Hill, New York,

37 Index Dirichlet Boundary Conditions, 24 Forward Euler, 24 full pivoting, 17 intermediate value theorem, 29 Laplace Operator, 20 partial pivoting, 17 predator-prey problems, 47 scientific notation, 10 32

Notes: Introduction to Numerical Methods

Notes: Introduction to Numerical Methods Notes: Introduction to Numerical Methods J.C. Chrispell Department of Mathematics Indiana University of Pennsylvania Indiana, PA, 15705, USA E-mail: john.chrispell@iup.edu http://www.math.iup.edu/~jchrispe

More information

Notes: Introduction to Numerical Methods

Notes: Introduction to Numerical Methods Notes: Introduction to Numerical Methods J.C. Chrispell Department of Mathematics Indiana University of Pennsylvania Indiana, PA, 15705, USA E-mail: john.chrispell@iup.edu http://www.math.iup.edu/~jchrispe

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

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

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim Introduction - Motivation Many phenomena (physical, chemical, biological, etc.) are model by differential equations. Recall the definition of the derivative of f(x) f f(x + h) f(x) (x) = lim. h 0 h Its

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

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 MATHEMATICS & COMPUTING 7th Edition

NUMERICAL MATHEMATICS & COMPUTING 7th Edition NUMERICAL MATHEMATICS & COMPUTING 7th Edition Ward Cheney/David Kincaid c UT Austin Engage Learning: Thomson-Brooks/Cole wwwengagecom wwwmautexasedu/cna/nmc6 October 16, 2011 Ward Cheney/David Kincaid

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

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

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu

More information

MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices

MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices We will now switch gears and focus on a branch of mathematics known as linear algebra. There are a few notes worth making before

More information

Chapter 1 Computer Arithmetic

Chapter 1 Computer Arithmetic Numerical Analysis (Math 9372) 2017-2016 Chapter 1 Computer Arithmetic 1.1 Introduction Numerical analysis is a way to solve mathematical problems by special procedures which use arithmetic operations

More information

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

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise: Math 2250-004 Week 4 notes We will not necessarily finish the material from a given day's notes on that day. We may also add or subtract some material as the week progresses, but these notes represent

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

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

Solution of Algebric & Transcendental Equations

Solution of Algebric & Transcendental Equations Page15 Solution of Algebric & Transcendental Equations Contents: o Introduction o Evaluation of Polynomials by Horner s Method o Methods of solving non linear equations o Bracketing Methods o Bisection

More information

NUMERICAL MATHEMATICS & COMPUTING 6th Edition

NUMERICAL MATHEMATICS & COMPUTING 6th Edition NUMERICAL MATHEMATICS & COMPUTING 6th Edition Ward Cheney/David Kincaid c UT Austin Engage Learning: Thomson-Brooks/Cole www.engage.com www.ma.utexas.edu/cna/nmc6 September 1, 2011 2011 1 / 42 1.1 Mathematical

More information

2 Systems of Linear Equations

2 Systems of Linear Equations 2 Systems of Linear Equations A system of equations of the form or is called a system of linear equations. x + 2y = 7 2x y = 4 5p 6q + r = 4 2p + 3q 5r = 7 6p q + 4r = 2 Definition. An equation involving

More information

1.4 Techniques of Integration

1.4 Techniques of Integration .4 Techniques of Integration Recall the following strategy for evaluating definite integrals, which arose from the Fundamental Theorem of Calculus (see Section.3). To calculate b a f(x) dx. Find a function

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

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

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 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

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

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

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

1 What is numerical analysis and scientific computing?

1 What is numerical analysis and scientific computing? Mathematical preliminaries 1 What is numerical analysis and scientific computing? Numerical analysis is the study of algorithms that use numerical approximation (as opposed to general symbolic manipulations)

More information

X. Numerical Methods

X. Numerical Methods X. Numerical Methods. Taylor Approximation Suppose that f is a function defined in a neighborhood of a point c, and suppose that f has derivatives of all orders near c. In section 5 of chapter 9 we introduced

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... Introduce the topic of numerical methods Consider the Error analysis and sources of errors Introduction A numerical method which

More information

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 = Chapter 5 Sequences and series 5. Sequences Definition 5. (Sequence). A sequence is a function which is defined on the set N of natural numbers. Since such a function is uniquely determined by its values

More information

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative

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

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

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES No. of Printed Pages : 5 BCS-054 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 058b9 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES Time : 3 hours Maximum Marks

More information

Weekly Activities Ma 110

Weekly Activities Ma 110 Weekly Activities Ma 110 Fall 2008 As of October 27, 2008 We give detailed suggestions of what to learn during each week. This includes a reading assignment as well as a brief description of the main points

More information

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative

More information

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

Number Systems III MA1S1. Tristan McLoughlin. December 4, 2013 Number Systems III MA1S1 Tristan McLoughlin December 4, 2013 http://en.wikipedia.org/wiki/binary numeral system http://accu.org/index.php/articles/1558 http://www.binaryconvert.com http://en.wikipedia.org/wiki/ascii

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

8.5 Taylor Polynomials and Taylor Series

8.5 Taylor Polynomials and Taylor Series 8.5. TAYLOR POLYNOMIALS AND TAYLOR SERIES 50 8.5 Taylor Polynomials and Taylor Series Motivating Questions In this section, we strive to understand the ideas generated by the following important questions:

More information

Math Precalculus I University of Hawai i at Mānoa Spring

Math Precalculus I University of Hawai i at Mānoa Spring Math 135 - Precalculus I University of Hawai i at Mānoa Spring - 2014 Created for Math 135, Spring 2008 by Lukasz Grabarek and Michael Joyce Send comments and corrections to lukasz@math.hawaii.edu Contents

More information

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0. 3.1 Introduction Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x 3 +1.5x 1.5 =0, tan x x =0. Practical existence test for roots: by intermediate value theorem, f C[a, b] & f(a)f(b)

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

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

Finite Mathematics : A Business Approach

Finite Mathematics : A Business Approach Finite Mathematics : A Business Approach Dr. Brian Travers and Prof. James Lampes Second Edition Cover Art by Stephanie Oxenford Additional Editing by John Gambino Contents What You Should Already Know

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

MA 8019: Numerical Analysis I Solution of Nonlinear Equations

MA 8019: Numerical Analysis I Solution of Nonlinear Equations MA 8019: Numerical Analysis I Solution of Nonlinear Equations Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

Math Precalculus I University of Hawai i at Mānoa Spring

Math Precalculus I University of Hawai i at Mānoa Spring Math 135 - Precalculus I University of Hawai i at Mānoa Spring - 2013 Created for Math 135, Spring 2008 by Lukasz Grabarek and Michael Joyce Send comments and corrections to lukasz@math.hawaii.edu Contents

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

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

Math 0031, Final Exam Study Guide December 7, 2015

Math 0031, Final Exam Study Guide December 7, 2015 Math 0031, Final Exam Study Guide December 7, 2015 Chapter 1. Equations of a line: (a) Standard Form: A y + B x = C. (b) Point-slope Form: y y 0 = m (x x 0 ), where m is the slope and (x 0, y 0 ) is a

More information

An Introduction to Numerical Analysis. James Brannick. The Pennsylvania State University

An Introduction to Numerical Analysis. James Brannick. The Pennsylvania State University An Introduction to Numerical Analysis James Brannick The Pennsylvania State University Contents Chapter 1. Introduction 5 Chapter 2. Computer arithmetic and Error Analysis 7 Chapter 3. Approximation and

More information

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

Lecture 7. Gaussian Elimination with Pivoting. David Semeraro. University of Illinois at Urbana-Champaign. February 11, 2014 Lecture 7 Gaussian Elimination with Pivoting David Semeraro University of Illinois at Urbana-Champaign February 11, 2014 David Semeraro (NCSA) CS 357 February 11, 2014 1 / 41 Naive Gaussian Elimination

More information

15 Nonlinear Equations and Zero-Finders

15 Nonlinear Equations and Zero-Finders 15 Nonlinear Equations and Zero-Finders This lecture describes several methods for the solution of nonlinear equations. In particular, we will discuss the computation of zeros of nonlinear functions f(x).

More information

1 Lecture 8: Interpolating polynomials.

1 Lecture 8: Interpolating polynomials. 1 Lecture 8: Interpolating polynomials. 1.1 Horner s method Before turning to the main idea of this part of the course, we consider how to evaluate a polynomial. Recall that a polynomial is an expression

More information

printing Three areas: solid calculus, particularly calculus of several

printing Three areas: solid calculus, particularly calculus of several Math 5610 printing 5600 5610 Notes of 8/21/18 Quick Review of some Prerequisites Three areas: solid calculus, particularly calculus of several variables. linear algebra Programming (Coding) The term project

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

5 Finding roots of equations

5 Finding roots of equations Lecture notes for Numerical Analysis 5 Finding roots of equations Topics:. Problem statement. Bisection Method 3. Newton s Method 4. Fixed Point Iterations 5. Systems of equations 6. Notes and further

More information

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

Math 471. Numerical methods Root-finding algorithms for nonlinear equations

Math 471. Numerical methods Root-finding algorithms for nonlinear equations Math 471. Numerical methods Root-finding algorithms for nonlinear equations overlap Section.1.5 of Bradie Our goal in this chapter is to find the root(s) for f(x) = 0..1 Bisection Method Intermediate value

More information

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS chapter MORE MATRIX ALGEBRA GOALS In Chapter we studied matrix operations and the algebra of sets and logic. We also made note of the strong resemblance of matrix algebra to elementary algebra. The reader

More information

Getting Started with Communications Engineering

Getting Started with Communications Engineering 1 Linear algebra is the algebra of linear equations: the term linear being used in the same sense as in linear functions, such as: which is the equation of a straight line. y ax c (0.1) Of course, if we

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

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

Next topics: Solving systems of linear equations

Next topics: Solving systems of linear equations Next topics: Solving systems of linear equations 1 Gaussian elimination (today) 2 Gaussian elimination with partial pivoting (Week 9) 3 The method of LU-decomposition (Week 10) 4 Iterative techniques:

More information

Introduction CSE 541

Introduction CSE 541 Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter 5 Nonlinear Equations Copyright c 2001 Reproduction permitted only for noncommercial, educational

More information

LU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b

LU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b AM 205: lecture 7 Last time: LU factorization Today s lecture: Cholesky factorization, timing, QR factorization Reminder: assignment 1 due at 5 PM on Friday September 22 LU Factorization LU factorization

More information

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers.

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers. 2 VECTORS, POINTS, and LINEAR ALGEBRA. At first glance, vectors seem to be very simple. It is easy enough to draw vector arrows, and the operations (vector addition, dot product, etc.) are also easy to

More information

Infinite series, improper integrals, and Taylor series

Infinite series, improper integrals, and Taylor series Chapter 2 Infinite series, improper integrals, and Taylor series 2. Introduction to series In studying calculus, we have explored a variety of functions. Among the most basic are polynomials, i.e. functions

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA Not The Not-Formula Book for C Everything you need to know for Core that won t be in the formula book Examination Board: AQA Brief This document is intended as an aid for revision. Although it includes

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

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 5 Nonlinear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Review of matrices. Let m, n IN. A rectangle of numbers written like A = Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an

More information

Review Questions REVIEW QUESTIONS 71

Review Questions REVIEW QUESTIONS 71 REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of

More information

5. Hand in the entire exam booklet and your computer score sheet.

5. Hand in the entire exam booklet and your computer score sheet. WINTER 2016 MATH*2130 Final Exam Last name: (PRINT) First name: Student #: Instructor: M. R. Garvie 19 April, 2016 INSTRUCTIONS: 1. This is a closed book examination, but a calculator is allowed. The test

More information

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) Autumn Session UNIT 1 Numerical analysis is the study of algorithms that uses, creates and implements algorithms for obtaining numerical solutions to problems

More information

Solutions to Math 41 First Exam October 18, 2012

Solutions to Math 41 First Exam October 18, 2012 Solutions to Math 4 First Exam October 8, 202. (2 points) Find each of the following its, with justification. If the it does not exist, explain why. If there is an infinite it, then explain whether it

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

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

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

Lecture 28 The Main Sources of Error

Lecture 28 The Main Sources of Error Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations

More information

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline

More information

Numerical Methods. Dr Dana Mackey. School of Mathematical Sciences Room A305 A Dana Mackey (DIT) Numerical Methods 1 / 12

Numerical Methods. Dr Dana Mackey. School of Mathematical Sciences Room A305 A   Dana Mackey (DIT) Numerical Methods 1 / 12 Numerical Methods Dr Dana Mackey School of Mathematical Sciences Room A305 A Email: Dana.Mackey@dit.ie Dana Mackey (DIT) Numerical Methods 1 / 12 Practical Information The typed notes will be available

More information

Calculus I Review Solutions

Calculus I Review Solutions Calculus I Review Solutions. Compare and contrast the three Value Theorems of the course. When you would typically use each. The three value theorems are the Intermediate, Mean and Extreme value theorems.

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

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra The two principal problems in linear algebra are: Linear system Given an n n matrix A and an n-vector b, determine x IR n such that A x = b Eigenvalue problem Given an n n matrix

More information

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero Chapter Limits of Sequences Calculus Student: lim s n = 0 means the s n are getting closer and closer to zero but never gets there. Instructor: ARGHHHHH! Exercise. Think of a better response for the instructor.

More information

Errors. Intensive Computation. Annalisa Massini 2017/2018

Errors. Intensive Computation. Annalisa Massini 2017/2018 Errors Intensive Computation Annalisa Massini 2017/2018 Intensive Computation - 2017/2018 2 References Scientific Computing: An Introductory Survey - Chapter 1 M.T. Heath http://heath.cs.illinois.edu/scicomp/notes/index.html

More information

AP Calculus AB. Limits & Continuity.

AP Calculus AB. Limits & Continuity. 1 AP Calculus AB Limits & Continuity 2015 10 20 www.njctl.org 2 Table of Contents click on the topic to go to that section Introduction The Tangent Line Problem Definition of a Limit and Graphical Approach

More information

1 Backward and Forward Error

1 Backward and Forward Error Math 515 Fall, 2008 Brief Notes on Conditioning, Stability and Finite Precision Arithmetic Most books on numerical analysis, numerical linear algebra, and matrix computations have a lot of material covering

More information

MATH 1902: Mathematics for the Physical Sciences I

MATH 1902: Mathematics for the Physical Sciences I MATH 1902: Mathematics for the Physical Sciences I Dr Dana Mackey School of Mathematical Sciences Room A305 A Email: Dana.Mackey@dit.ie Dana Mackey (DIT) MATH 1902 1 / 46 Module content/assessment Functions

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2018

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2018 ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 2017/2018 DR. ANTHONY BROWN 1. Arithmetic and Algebra 1.1. Arithmetic of Numbers. While we have calculators and computers

More information

Chapter 2 Solutions of Equations of One Variable

Chapter 2 Solutions of Equations of One Variable Chapter 2 Solutions of Equations of One Variable 2.1 Bisection Method In this chapter we consider one of the most basic problems of numerical approximation, the root-finding problem. This process involves

More information

Prepared by Sa diyya Hendrickson. Package Summary

Prepared by Sa diyya Hendrickson. Package Summary Introduction Prepared by Sa diyya Hendrickson Name: Date: Package Summary Defining Decimal Numbers Things to Remember Adding and Subtracting Decimals Multiplying Decimals Expressing Fractions as Decimals

More information

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

Numerical Analysis. Yutian LI. 2018/19 Term 1 CUHKSZ. Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41 Numerical Analysis Yutian LI CUHKSZ 2018/19 Term 1 Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41 Reference Books BF R. L. Burden and J. D. Faires, Numerical Analysis, 9th edition, Thomsom Brooks/Cole,

More information

1.1.1 Algebraic Operations

1.1.1 Algebraic Operations 1.1.1 Algebraic Operations We need to learn how our basic algebraic operations interact. When confronted with many operations, we follow the order of operations: Parentheses Exponentials Multiplication

More information