Numerical Analysis: Interpolation Part 1

Size: px
Start display at page:

Download "Numerical Analysis: Interpolation Part 1"

Transcription

1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 1 / 50

2 1 2 Analyzing the Error in BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 2 / 50

3 Definition (a polynomial (from R to R)) A polynomial, from R R, is a function of the form n P n (x) = a j x j = a n x n + a n 1 x n a 1 x + a 0 j=0 where n is a nonnegative integer and (a j ) n j=0 are real numbers. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 3 / 50

4 Using Polynomials for Representing/Approximating Functions The importance of polynomials, for representing/approximating functions stems from the ease of computations of d x P n (x), dx P n(x) and P n (x) dx and from the fact they (uniformly) approximate continuous functions (see Theorem below) BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 4 / 50

5 Theorem (Weierstrass) Every continuous function defined on a closed interval can be uniformly approximated as closely as desired by a polynomial function. More formally, let f C([a, b]). Then for every ε > 0 there exists a polynomial, P n, such that, for every x [a, b], f(x) P n (x) < ε. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 5 / 50

6 The fundamental problem: Definition (the polynomial interpolation problem) Given (n + 1) points, ((x i, y i )) n i=0 x i R, y i R i {0, 1,..., n} such that the x i s are distinct, namely, i j x i x j, find a polynomial, P (x), of minimal degree, such that P interpolates the data ; i.e. P (x i ) = y i i {0, 1,..., n}. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 6 / 50

7 Example Assume the setting from the previous slide with the additional assumption that y i = c for every i, where c R is some constant. The zeroth-order polynomial, interpolates the data. P (x) c, Since its degree is zero, it is also minimal. Clearly, if c R is some other constant, with c c, then the zeroth-order polynomial Q(x) c does not interpolate the data, since, for every i, Q(x i ) = c c = y i. It follows that P (x) c is the the unique polynomial that satisfies the requirements. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 7 / 50

8 Some Observations from that Example In the definition of polynomial interpolation, only the x i s are required to be distinct, not the y i s. We just saw, in that particular example, existence and uniqueness of the interpolation polynomial. As will see, the interpolation polynomial always exists and is always unique, not just in that example. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 8 / 50

9 Theorem Given ((x i, y i )) n i=0, with x i x j whenever i j, there exists a unique polynomial P n, of degree no greater than n, such that P (x i ) = y i i {0, 1,..., n}. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 9 / 50

10 Proof uniqueness. A proof by contradiction. Suppose there are two different polynomials, P n and Q n, such that P n (x i ) = y i = Q n (x i ) i {0, 1,..., n}. Thus, defining a third polynomial by S(x) = P n (x) Q n (x) we get S(x i ) = P n (x i ) Q n (x i ) = 0 i {0, 1,..., n}. This implies that S has at least n + 1 distinct roots. By construction, the degree of S is no higher than n. By the fundamental theorem of algebra, a polynomial of degree n has exactly n roots (including complex roots, and including multiplicities), unless it is the zero polynomial. It follows that S(x) 0, and thus P n Q n, a contradiction. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 10 / 50

11 [Proof existence] A proof by induction. Base. n = 0, given (x 0, y 0 ). Choose P 0 (x) C 0 y 0. Assumption. Suppose there exists a polynomial, P k 1, of degree no higher than k 1, such that it interpolates the first k points: P k 1 (x i ) = y i i {0, 1,..., k 1}. Step. We will now build a polynomial, P k, of degree no higher than k, that interpolates the first k + 1 points: (continue to next slide) P k (x i ) = y i i {0, 1,..., k}. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 11 / 50

12 Proof existence. We do this by setting P k (x) = P k 1 (x) + C k k 1 j=0 (x x j). Now, k 1 j=0 (x x j) is a polynomial, of degree k, that vanishes on (x j ) k 1 So P k interpolates the first k points, and its degree is no higher than k. We still need it to interpolate (x k, y k ), the (k + 1)-th point. As for C k : y k required = P k (x k ) = P k 1 (x k ) + C k k 1 j=0 (x k x j ) }{{} 0 C k = y k P k 1 (x k ) k 1 j=0 (x k x j ) j=0. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 12 / 50

13 The proof for existence was also constructive, in the sense that it gave a concrete formulate for the interpolation polynomial: BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 13 / 50

14 Definition (Newton s form of the interpolation polynomial) The form we saw in the proof, P k (x) =C 0 + C 1 (x x 0 ) + C 2 (x x 0 )(x x 1 ) C k (x x 0 ) (x x k 1 ), is called Newton s form of the interpolation polynomial. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 14 / 50

15 { C 0 k = 0 P k (x) = P k 1 (x) + C k 1 k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n}, y k P k 1 (x k ) k 1 j=0 (x k x j ) Example (n = 0 (a single point)) Given a single point, (x 0, y 0 ), the interpolation polynomial is P 0 (x) = C 0 = y 0 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 15 / 50

16 { C 0 k = 0 P k (x) = P k 1 (x) + C k 1 k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n}, Example (n = 1 (two points)) y k P k 1 (x k ) k 1 j=0 (x k x j ) Given two points, ((x i, y i )) 1 i=0, the interpolation polynomial is (the line) P 1 (x) = C 0 + C 1 (x x 0 ) = C 0 {}}{ y 0 + P 1 (x 0 ) = y 0 + y 1 y 0 x 1 x 0 (x 0 x 0 ) = y 0 P 1 (x 1 ) = y 0 + y 1 y 0 x 1 x 0 (x 1 x 0 ) = y 1 C 1 {}}{ y 1 y 0 x 1 x 0 (x x 0 ) BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 16 / 50

17 The Interpolation Polynomial by Solving a Linear System Here is another way to derive the interpolation polynomial. The n + 1 equations, n P n (x i ) = a j x j i = [ 1 x i x 2 i... xn i ] j=0 are linear w.r.t. the a i s: n j=0 a jx j 0 n j=0 a jx j 1. = n j=0 a jx j n 0 1 a 2. a n 1 x 0 x x n 0 1 x 1 x x n 1. 1 x n x 2 n... x n n = y i, i = 0, 1,..., n a 0 a 1 a 2. a n = y 0 y 1. y n BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 17 / 50

18 1 x 0 x x n 0 1 x 1 x x n 1. 1 x n x 2 n... x n n }{{} V :(n+1) (n+1) a 0 a 1 a 2. a n }{{} a:(n+1) 1 = y 0 y 1. y n }{{} y:(n+1) 1 So can solve via a = V 1 y. V is called the Vandermonde Matrix. Assuming the x i s are distinct, we know that V is guaranteed (by the theorem) to be invertible. By uniqueness, we know the solution will coincide with Newton s form. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 18 / 50

19 Problem with This Method Computationally expensive. Matrix inversion is expensive; that said, in the reminder of the course we will study practical methods to solve a linear system without inversion. Ill-conditioned. The values of a = [ a 0 a 1 a 2... a n ] T might be determined inaccurately. We will later see how to characterize the condition number of a linear system. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 19 / 50

20 Uniqueness We again emphasize that the interpolation polynomial is unique: regardless whether it is expressed via 1 2 or it is the same polynomial. P n (x) = P n (x) = C 0 + n k=1 n a j x j i j=1 (x x j ) C k k 1 j=0 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 20 / 50

21 Remark Recall that one advantage of polynomials is the ease of their evaluations. By inspection of P n (x) = n j=0 a jx j i, it seems that x P n(x) requires n additions and n j=1 j = n n+1 2 multiplications. This is O(n 2 ). It is possible, however, to reduce the # of operations to O(n), using Horner s rule (see next slide). BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 21 / 50

22 Horner s Rule (AKA Nested Polynomials) Set b n a n, and then, iteratively, set b k 1 a k 1 + b k x till obtaining b 0 = a 0 + b 1 x and this is equal to P n (x). Example P 4 (x) = 4 {}}{ a jx j = a 0 + x (a 1 + x (a 2 + x (a 3 + a 4 x)) ) j=0 }{{} b 1 {}}{ b 3 b 4 }{{} } {{ } b 0 b 2 This gives O(n) additions and O(n) multiplications (instead of O(n) and O(n 2 )). BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 22 / 50

23 Returning to the Uniqueness of the Interpolation Polynomial Since the interpolation polynomial is unique, if the n + 1 points were sampled from a polynomial of degree n, then we will recover that polynomial. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 23 / 50

24 Example Let P (x) = 2x 3 + 3x 2 4x 5. Consider the following 4 sampled points. i = 0 i = 1 i = 2 i = 3 x i y i Reminder: Newton s form { C 0 k = 0 P k (x) = k 1 P k 1 (x) + C k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n} y k P k 1 (x k ) k 1 j=0 (x k x j) P 0 (x) C 0 = y 0 = 0 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 24 / 50

25 Example (continued) Let P (x) = 2x 3 + 3x 2 4x 5. Consider the following 4 sampled points. i = 0 i = 1 i = 2 i = 3 x i y i Reminder: Newton s form { C 0 k = 0 P k (x) = k 1 P k 1 (x) + C k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n} y k P k 1 (x k ) k 1 j=0 (x k x j) P 0 (x) 0 (saw in the previous slide) C 1 = y1 P0(x1) x 1 x 0 = = 5 P 1 (x) = P 0 (x) + C 1 (x x 0 ) = 0 5(x + 1) = 5x 5 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 25 / 50

26 Example (continued) Let P (x) = 2x 3 + 3x 2 4x 5. Consider the following 4 sampled points. i = 0 i = 1 i = 2 i = 3 x i y i Reminder: Newton s form { C 0 k = 0 P k (x) = k 1 P k 1 (x) + C k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n} y k P k 1 (x k ) k 1 j=0 (x k x j) P 1 (x) = 5x 5 (saw in the previous slide) C 2 = y2 P1(x2) (x = 15 ( 10 5) 2 x 0)(x 2 x 1) (2+1)(2) = 30 6 = 5 P 2 (x) = P 1 (x) + C 2 (x x 0 )(x x 1 ) = 5x 2 5 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 26 / 50

27 Example (continued) Let P (x) = 2x 3 + 3x 2 4x 5. Consider the following 4 sampled points. i = 0 i = 1 i = 2 i = 3 x i y i Reminder: Newton s form { C 0 k = 0 P k (x) = k 1 P k 1 (x) + C k j=0 (x x j) k {1,..., n} { y 0 k = 0 where C k = k {1,..., n} P 2 (x) = 5x 2 5 (saw in the previous slide) C 3 = y k P k 1 (x k ) k 1 j=0 (x k x j) y 3 P 2(x 3) (x 3 x 0)(x 3 x 1)(x 3 x 2) = 64 (5 9 5) (3+1)(3)(3 2) = = 2 P 3 (x) = P 2 (x) + C 3 (x x 0 )(x x 1 )(x x 2 ) = 5x (x + 1)(x)(x 2) = 5x (2x 2 + 2x)(x 2) = 5x x 3 + 2x 2 4x 2 4x = 2x 3 + 3x 2 4x 5 as expected. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 27 / 50

28 P n (x) as a Linear combination of Basis Functions An alternative way to represent the interpolation polynomial is as the following linear combination of basis functions. P n (x) = n y i L i (x) i=0 where (L i (x)) n i=0 are polynomials that depend on the values of x i s but not on the values of the y i s. Since we can t control the y i s, the most general constraint on L i (x) is: L i (x j ) = δ ij { 0 i j 1 i = j (Kronecker delta) together with the restriction that L i (x) is a polynomial of degree no higher than n. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 28 / 50

29 P n (x) as a Linear combination of Basis Functions P n (x) = n y i L i (x) i=0 The constraint i j L i (x j ) = 0 implies the following form: L i (x) = C i (x x j ) j:j i where the value of C i is found via L i (x i ) = 1 = C i (x i x j ) C i = (x i x j ) 1 j:j i j:j i BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 29 / 50

30 P n (x) as a Linear combination of Basis Functions In other words, we have just derived the family of the basis functions, (L i (x)) n i=0 : n x x j i 1 L i (x) = = x x j n x x j x i x j x i x j x i x j j=0,j i j=0 And as mentioned earlier, the polynomial j=i+1 P n (x) = n y i L i (x) = i=0 n i=0 y i n j=0,j i x x j x i x j satisfies P n (x i ) = y i so by uniqueness of the interpolation polynomial, it is the same polynomial we saw in other forms. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 30 / 50

31 This is Lagrange s form of the interpolation polynomial. It is often called Lagrange Approximation, but of course if the data came from a polynomial (of degree no higher than n) then it is exact. Remark: This form is easy to construct by is expensive to evaluate. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 31 / 50

32 Example Again let P (x) = 2x 3 + 3x 2 4x 5 and consider i = 0 i = 1 i = 2 i = 3 x i y i Lagrange s form of the interpolation polynomial is given by P n (x) = 3 y i L i (x) = 0 L 0 (x) 5L 1 (x) + 15L 2 (x) + 64L 3 (x) i=0 L 0 (x) = don t bother since y 0 = 0 L 1 (x) = (x+1)(x 2)(x 3) (0+1)(0 2)(0 3) = 1 6 (x + 1)(x 2)(x 3) L 2 (x) = (x+1)x(x 3) (2+1)(2 0)(2 3) = 1 6 (x + 1)x(x 3) L 3 (x) = (x+1)x(x 2) (3+1)(3 0)(3 2) = 1 12 (x + 1)x(x 2) P n (x) = 5 6 (x + 1)(x 2)(x 3) 15 6 (x + 1)x(x 3) (x + 1)x(x 2) =... = 2x 3 + 3x 2 4x 5 as expected. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 32 / 50

33 Analyzing the Error in The Interpolation Polynomial s Error Our examples so far involved the (exact) recovering of a polynomial. Polynomial interpolation, however, can also be used to approximate non-polynomials. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 33 / 50

34 Analyzing the Error in Example (approximating sin(x)) Let f(x) = sin(x). It is easy to evaluate f in several key points. i = 0 i = 1 i = 2 i = 3 i = 4 x i π π/2 0 π/2 π y i Can now apply the tools we learned to find a polynomial, of degree 4, that approximates sin(x) on [ π, π]. We will get the following result: Exercise Verify this at home. P 4 (x) = 8 3π 3 x π x A natural question: how good is this approximation? BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 34 / 50

35 Error Analysis Analyzing the Error in More generally, how can we quantify the interpolation error? Can we derive an upper bound on it? BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 35 / 50

36 Analyzing the Error in Theorem Let f C n+1 [a, b] and let P n (x) be the interpolation polynomial of f at nodes (x i ) n i=0 [a, b]. Then, the interpolation error at x [a, b] is given by for some ξ [a, b]. E n (x) f(x) P n (x) = f (n+1) (ξ) (n + 1)! n (x x i ) i=0 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 36 / 50

37 Analyzing the Error in Before the Proof... E n (x) f(x) P n (x) = f (n+1) (ξ) (n + 1)! n (x x i ) i=0 This theoretical result is of paramount importance since it lets us known, a-priori, the expected maximal error and enables us to design an interpolation polynomial to meet a given accuracy criterion. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 37 / 50

38 Analyzing the Error in Example Find the degree of the interpolation polynomial, P n (x) that will guarantee that approximation error will be 10 5 for f(x) = sin(x) on [ π, π] (even w/o knowing the nodes, (x i ) n i=1 ). Solution: E n (x) = f (n+1) (ξ) (n + 1)! f (n+1) (ξ) (n + 1)! n (x x i ) i=0 (2π)n+1 (2π)n+1 (n + 1)! required 10 5 By search we can find E 25 (x) M Note, however, that by using a better placement of the nodes, we will be able to get the desired accuracy using a much smaller n. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 38 / 50

39 Analyzing the Error in Before the proof of the theorem, we need a lemma. Lemma If g C k 1 [a, b] has k roots in [a, b] then g (k 1) has at least one root in [a, b]. Proof of the lemma. By the Mean Value Theorem: g has at least k 1 roots in [a, b]. g has at least k 2 roots in [a, b].. g k 1 has at least one rootin [a, b] (note that k (k 1) = 1). BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 39 / 50

40 Analyzing the Error in Proof of the theorem If x = x i, then the claim holds. We only need to prove it for the case where x x i, i = {0, 1,..., n}. Define a new function whose argument is t [a, b], and for which x is a constant parameter: t g(t; x) = E n (t) }{{} f(t) P n(t) E n (x) }{{} n j=0 f(x) P n(x) t x j x x j Note that t g(t; x) C n+1 [a, b]. This g was designed to satisfy the following property: it has n + 2 distinct roots. To see that, take t = x: g(x; x) = E n (x) E n (x) n j=0 x x j x x j = E n (x) E n (x) = 0. Thus, x is a root of t g(t; x). Moreover, each of the x i s is a root: (the proof continues on the next slide) BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 40 / 50

41 Analyzing the Error in Proof of the theorem continued. g(x i ; x) = E n (x i ) E n (x) n j=0 x i x j x x j = 0 E n (x) 0 = 0. Together, this means g has n + 2 distinct roots. By the lemma, g (n+1) has at least one root: ξ [a, b] such that g (n+1) (ξ; x) = 0. Inspect this derivative: g (n+1) (t; x) = E n (n+1) (t) E n (x) dn+1 n t x j dt n+1 j=0 x x j = f (n+1) (t) P n (n+1) 1 (t) E n (x) }{{} n j=0 (x x j) 0 = f (n+1) (n + 1)! (t) E n (x) n j=0 x x j d n+1 tn+1 dtn+1 0 = g (n+1) (ξ; x) = f (n+1) (n + 1)! (ξ) E n (x) n j=0 (x x j) E n (x) = f (n+1) (ξ) (n + 1)! n j=0 (x x j) BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 41 / 50

42 Analyzing the Error in Connection to Taylor s Expansion The expression, E n (x) = f (n+1) (ξ) (n + 1)! n is similar to the error from Taylor s expansion: f (n+1) (ξ) (n + 1)! (x x 0) n+1 j=0 (x x j) Taylor s expansion approximates a function using a single point (while here we use n + 1 points). Thus, we can interpret the Taylor expansion as taking the limits of the distances between all our n + 1 points to zero, collapsing them to a single point. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 42 / 50

43 Analyzing the Error in Bounding the Error We are now in a position to discuss a bound on the error. Clearly, the theorem is useful only if we can bound f (n+1) (x). If we can assume, or prove, a bound on f (n+1) (x) (as we could in the example with f(x) = sin(x)), then f (n+1) (x) < M n+1 x [a, b] E n (x) = f(x) P n (x) M n+1 (n + 1)! max x [a,b] n x x j j=0 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 43 / 50

44 Analyzing the Error in Bounding the Error However, we can t always assume or prove such a bound! Thus, in such cases, there is no guarantee that increasing n will decrease a bound on the error. In fact, can t even guarantee that lim n E n = 0. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 44 / 50

45 Analyzing the Error in Evenly-spaced Nodes Often, it is convenient to sample the function at evenly-spaced points: x i = x 0 + i h i = 1,..., n In which case, it is possible to derive more convenient error bounds. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 45 / 50

46 Analyzing the Error in Example Consider a quadratic interpolation on [a, b], where x 0 = a, x 1 = a + h, and x 2 = a + 2h = b. By the theorem, if M 3 is an upper bound on f (3) (x), E 2 (x) M 3 (3)! max (x x 0)(x x 1 )(x x 2 ) M 3 x [a,b] 3! H(x) = (x x 0 )(x x 1 )(x x 2 ) = max H(x) x [a,b]... = x 3 x 2 (x 0 + x 1 + x 2 ) x(x 0 x 1 + x 0 x 2 + x 1 x 2 ) x 0 x 1 x 2 Looking for the extremum, we set H (x) = 3x 2 2x(x 0 + x 1 + x 2 ) (x 0 x 1 + x 0 x 2 + x 1 x 2 ) = 0. Now substitute x i = x 0 + i h and obtain 0 = 3x 2 6x(x 0 + h) + 3(x x 0 h h2 ) x max = 6(x 0 + h) ± 36(x 0 + h) 2 36(x x 0h h2 ) = x 0 + h ± 6 = x 0 + h(1 ± 1 ) (continue next slide) h2 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 46 / 50

47 Analyzing the Error in Example (continued) Going back to max x [a,b] H(x), we get H max = (x max x 0 )(x max x 0 h)(x max x 0 2h) = h(1 ± 1 )h(± 1 )h(± 1 1) = h = h3 E 2 (x) M 3 3! max H(x) = x [a,b] h3 9 3 M 3 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 47 / 50

48 Analyzing the Error in More generally: Theorem Let f C n+1 ([a, b]) and let P n (x) be its interpolation polynomial for the evenly-spaced nodes x i = X 0 + ih, i = 0, 1,..., n. If then f (n+1) (x) M n+1 x [a, b] E n (x) = f(x) P n (x) O(h n+1 )M n+1 We omit the proof. Some particular cases: E 0 (x) hm 1 E 1 (x) 1 8 h2 M 2 E 2 (x) h3 M 3 E 3 (x) 1 24 h4 M 4 BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 48 / 50

49 Analyzing the Error in Reminder: increasing the number of nodes does not guarantee convergence of P n (x) to f(x). This is true even if the points are evenly spaced, despite the fact that E n (x) O(h n+1 )M n+1 since M n+1, the bound on f (n+1) (x), might increase faster than the decrease of O(h n+1 ) so the error might, in fact, in crease. This is the notorious Runge s phenomenon, expressed via sharp oscillations near the interval s endpoints. BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 49 / 50

50 Version Log Analyzing the Error in 11/11/2018, ver BGU CS Interpolation (ver. 1.00) AY 2018/2019, Fall Semester 50 / 50

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1

More information

BSM510 Numerical Analysis

BSM510 Numerical Analysis BSM510 Numerical Analysis Polynomial Interpolation Prof. Manar Mohaisen Department of EEC Engineering Review of Precedent Lecture Polynomial Regression Multiple Linear Regression Nonlinear Regression Lecture

More information

Polynomial Interpolation Part II

Polynomial Interpolation Part II Polynomial Interpolation Part II Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term 2016 Exercise Session

More information

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Polynomial Interpolation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 24, 2013 1.1 Introduction We first look at some examples. Lookup table for f(x) = 2 π x 0 e x2

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

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45 Two hours MATH20602 To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER NUMERICAL ANALYSIS 1 29 May 2015 9:45 11:45 Answer THREE of the FOUR questions. If more

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

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

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Hermite Interpolation

Hermite Interpolation Jim Lambers MAT 77 Fall Semester 010-11 Lecture Notes These notes correspond to Sections 4 and 5 in the text Hermite Interpolation Suppose that the interpolation points are perturbed so that two neighboring

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning 76 Chapter 7 Interpolation 7.1 Interpolation Definition 7.1.1. Interpolation of a given function f defined on an interval [a,b] by a polynomial p: Given a set of specified points {(t i,y i } n with {t

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Review I: Interpolation

Review I: Interpolation Review I: Interpolation Varun Shankar January, 206 Introduction In this document, we review interpolation by polynomials. Unlike many reviews, we will not stop there: we will discuss how to differentiate

More information

Interpolation Theory

Interpolation Theory Numerical Analysis Massoud Malek Interpolation Theory The concept of interpolation is to select a function P (x) from a given class of functions in such a way that the graph of y P (x) passes through the

More information

Interpolation and Approximation

Interpolation and Approximation Interpolation and Approximation The Basic Problem: Approximate a continuous function f(x), by a polynomial p(x), over [a, b]. f(x) may only be known in tabular form. f(x) may be expensive to compute. Definition:

More information

MA2501 Numerical Methods Spring 2015

MA2501 Numerical Methods Spring 2015 Norwegian University of Science and Technology Department of Mathematics MA5 Numerical Methods Spring 5 Solutions to exercise set 9 Find approximate values of the following integrals using the adaptive

More information

f (r) (a) r! (x a) r, r=0

f (r) (a) r! (x a) r, r=0 Part 3.3 Differentiation v1 2018 Taylor Polynomials Definition 3.3.1 Taylor 1715 and Maclaurin 1742) If a is a fixed number, and f is a function whose first n derivatives exist at a then the Taylor polynomial

More information

ROOT FINDING REVIEW MICHELLE FENG

ROOT FINDING REVIEW MICHELLE FENG ROOT FINDING REVIEW MICHELLE FENG 1.1. Bisection Method. 1. Root Finding Methods (1) Very naive approach based on the Intermediate Value Theorem (2) You need to be looking in an interval with only one

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

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Polynomial Interpolation

Polynomial Interpolation Chapter Polynomial Interpolation. Introduction Suppose that we have a two sets of n + real numbers {x i } n+ i= and {y i} n+ i=, and that the x i are strictly increasing: x < x < x 2 < < x n. Interpolation

More information

An idea how to solve some of the problems. diverges the same must hold for the original series. T 1 p T 1 p + 1 p 1 = 1. dt = lim

An idea how to solve some of the problems. diverges the same must hold for the original series. T 1 p T 1 p + 1 p 1 = 1. dt = lim An idea how to solve some of the problems 5.2-2. (a) Does not converge: By multiplying across we get Hence 2k 2k 2 /2 k 2k2 k 2 /2 k 2 /2 2k 2k 2 /2 k. As the series diverges the same must hold for the

More information

1 Directional Derivatives and Differentiability

1 Directional Derivatives and Differentiability Wednesday, January 18, 2012 1 Directional Derivatives and Differentiability Let E R N, let f : E R and let x 0 E. Given a direction v R N, let L be the line through x 0 in the direction v, that is, L :=

More information

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005 4 Interpolation 4.1 Polynomial interpolation Problem: LetP n (I), n ln, I := [a,b] lr, be the linear space of polynomials of degree n on I, P n (I) := { p n : I lr p n (x) = n i=0 a i x i, a i lr, 0 i

More information

8. Limit Laws. lim(f g)(x) = lim f(x) lim g(x), (x) = lim x a f(x) g lim x a g(x)

8. Limit Laws. lim(f g)(x) = lim f(x) lim g(x), (x) = lim x a f(x) g lim x a g(x) 8. Limit Laws 8.1. Basic Limit Laws. If f and g are two functions and we know the it of each of them at a given point a, then we can easily compute the it at a of their sum, difference, product, constant

More information

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27 Chapter 11 Taylor Series Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27 First-Order Approximation We want to approximate function f by some simple function. Best possible approximation

More information

11.10a Taylor and Maclaurin Series

11.10a Taylor and Maclaurin Series 11.10a 1 11.10a Taylor and Maclaurin Series Let y = f(x) be a differentiable function at x = a. In first semester calculus we saw that (1) f(x) f(a)+f (a)(x a), for all x near a The right-hand side of

More information

CALCULUS JIA-MING (FRANK) LIOU

CALCULUS JIA-MING (FRANK) LIOU CALCULUS JIA-MING (FRANK) LIOU Abstract. Contents. Power Series.. Polynomials and Formal Power Series.2. Radius of Convergence 2.3. Derivative and Antiderivative of Power Series 4.4. Power Series Expansion

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

Section 3.1. Best Affine Approximations. Difference Equations to Differential Equations

Section 3.1. Best Affine Approximations. Difference Equations to Differential Equations Difference Equations to Differential Equations Section 3.1 Best Affine Approximations We are now in a position to discuss the two central problems of calculus as mentioned in Section 1.1. In this chapter

More information

Chapter 8: Taylor s theorem and L Hospital s rule

Chapter 8: Taylor s theorem and L Hospital s rule Chapter 8: Taylor s theorem and L Hospital s rule Theorem: [Inverse Mapping Theorem] Suppose that a < b and f : [a, b] R. Given that f (x) > 0 for all x (a, b) then f 1 is differentiable on (f(a), f(b))

More information

Introduction Linear system Nonlinear equation Interpolation

Introduction Linear system Nonlinear equation Interpolation Interpolation Interpolation is the process of estimating an intermediate value from a set of discrete or tabulated values. Suppose we have the following tabulated values: y y 0 y 1 y 2?? y 3 y 4 y 5 x

More information

Differentiation. Table of contents Definition Arithmetics Composite and inverse functions... 5

Differentiation. Table of contents Definition Arithmetics Composite and inverse functions... 5 Differentiation Table of contents. Derivatives................................................. 2.. Definition................................................ 2.2. Arithmetics...............................................

More information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

More information

CHAPTER 4. Interpolation

CHAPTER 4. Interpolation CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given

More information

Interpolation & Polynomial Approximation. Hermite Interpolation I

Interpolation & Polynomial Approximation. Hermite Interpolation I Interpolation & Polynomial Approximation Hermite Interpolation I Numerical Analysis (th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011

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

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

Numerical Methods for Differential Equations Mathematical and Computational Tools

Numerical Methods for Differential Equations Mathematical and Computational Tools Numerical Methods for Differential Equations Mathematical and Computational Tools Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 Part 1. Vector norms, matrix norms and logarithmic

More information

Lecture 32: Taylor Series and McLaurin series We saw last day that some functions are equal to a power series on part of their domain.

Lecture 32: Taylor Series and McLaurin series We saw last day that some functions are equal to a power series on part of their domain. Lecture 32: Taylor Series and McLaurin series We saw last day that some functions are equal to a power series on part of their domain. For example f(x) = 1 1 x = 1 + x + x2 + x 3 + = ln(1 + x) = x x2 2

More information

Math Numerical Analysis

Math Numerical Analysis Math 541 - Numerical Analysis Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center San Diego State University

More information

Do not turn over until you are told to do so by the Invigilator.

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE612B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0 Numerical Analysis 1 1. Nonlinear Equations This lecture note excerpted parts from Michael Heath and Max Gunzburger. Given function f, we seek value x for which where f : D R n R n is nonlinear. f(x) =

More information

Bisection Method. and compute f (p 1 ). repeat with p 2 = a 2+b 2

Bisection Method. and compute f (p 1 ). repeat with p 2 = a 2+b 2 Bisection Method Given continuous function f (x) on the interval [a, b] with f (a) f (b) < 0, there must be a root in (a, b). To find a root: set [a 1, b 1 ] = [a, b]. set p 1 = a 1+b 1 2 and compute f

More information

ON A WEIGHTED INTERPOLATION OF FUNCTIONS WITH CIRCULAR MAJORANT

ON A WEIGHTED INTERPOLATION OF FUNCTIONS WITH CIRCULAR MAJORANT ON A WEIGHTED INTERPOLATION OF FUNCTIONS WITH CIRCULAR MAJORANT Received: 31 July, 2008 Accepted: 06 February, 2009 Communicated by: SIMON J SMITH Department of Mathematics and Statistics La Trobe University,

More information

11.8 Power Series. Recall the geometric series. (1) x n = 1+x+x 2 + +x n +

11.8 Power Series. Recall the geometric series. (1) x n = 1+x+x 2 + +x n + 11.8 1 11.8 Power Series Recall the geometric series (1) x n 1+x+x 2 + +x n + n As we saw in section 11.2, the series (1) diverges if the common ratio x > 1 and converges if x < 1. In fact, for all x (

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

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

MATH. 4548, Autumn 15, MWF 12:40 p.m. QUIZ 1 September 4, 2015 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points.

MATH. 4548, Autumn 15, MWF 12:40 p.m. QUIZ 1 September 4, 2015 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points. MATH. 4548, Autumn 15, MWF 12:40 p.m. QUIZ 1 September 4, 2015 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points. 1. Let f : (, 0) IR be given by f(x) = 1/x 2. Prove

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

Lecture 04: Secret Sharing Schemes (2) Secret Sharing

Lecture 04: Secret Sharing Schemes (2) Secret Sharing Lecture 04: Schemes (2) Recall: Goal We want to Share a secret s Z p to n parties, such that {1,..., n} Z p, Any two parties can reconstruct the secret s, and No party alone can predict the secret s Recall:

More information

Notes on generating functions in automata theory

Notes on generating functions in automata theory Notes on generating functions in automata theory Benjamin Steinberg December 5, 2009 Contents Introduction: Calculus can count 2 Formal power series 5 3 Rational power series 9 3. Rational power series

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

3.1 Interpolation and the Lagrange Polynomial

3.1 Interpolation and the Lagrange Polynomial MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate

More information

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright cs416: introduction to scientific computing 01/9/07 Unit : Solving Scalar Equations Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright 1 Introduction We now

More information

3 Interpolation and Polynomial Approximation

3 Interpolation and Polynomial Approximation CHAPTER 3 Interpolation and Polynomial Approximation Introduction A census of the population of the United States is taken every 10 years. The following table lists the population, in thousands of people,

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

AP Calculus Testbank (Chapter 9) (Mr. Surowski)

AP Calculus Testbank (Chapter 9) (Mr. Surowski) AP Calculus Testbank (Chapter 9) (Mr. Surowski) Part I. Multiple-Choice Questions n 1 1. The series will converge, provided that n 1+p + n + 1 (A) p > 1 (B) p > 2 (C) p >.5 (D) p 0 2. The series

More information

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations 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

MA2501 Numerical Methods Spring 2015

MA2501 Numerical Methods Spring 2015 Norwegian University of Science and Technology Department of Mathematics MA2501 Numerical Methods Spring 2015 Solutions to exercise set 7 1 Cf. Cheney and Kincaid, Exercise 4.1.9 Consider the data points

More information

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1 ath 651 Introduction to Numerical Analysis I Fall 2010 SOLUTIONS: Homework Set 1 1. Consider the polynomial f(x) = x 2 x 2. (a) Find P 1 (x), P 2 (x) and P 3 (x) for f(x) about x 0 = 0. What is the relation

More information

Chapter 11 - Sequences and Series

Chapter 11 - Sequences and Series Calculus and Analytic Geometry II Chapter - Sequences and Series. Sequences Definition. A sequence is a list of numbers written in a definite order, We call a n the general term of the sequence. {a, a

More information

Chapter 3a Topics in differentiation. Problems in differentiation. Problems in differentiation. LC Abueg: mathematical economics

Chapter 3a Topics in differentiation. Problems in differentiation. Problems in differentiation. LC Abueg: mathematical economics Chapter 3a Topics in differentiation Lectures in Mathematical Economics L Cagandahan Abueg De La Salle University School of Economics Problems in differentiation Problems in differentiation Problem 1.

More information

are continuous). Then we also know that the above function g is continuously differentiable on [a, b]. For that purpose, we will first show that

are continuous). Then we also know that the above function g is continuously differentiable on [a, b]. For that purpose, we will first show that Derivatives and Integrals Now suppose f : [a, b] [c, d] IR is continuous. It is easy to see that for each fixed x [a, b] the function f x (y) = f(x, y) is continuous on [c, d] (note that f x is sometimes

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

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

Mathematical Olympiad Training Polynomials

Mathematical Olympiad Training Polynomials Mathematical Olympiad Training Polynomials Definition A polynomial over a ring R(Z, Q, R, C) in x is an expression of the form p(x) = a n x n + a n 1 x n 1 + + a 1 x + a 0, a i R, for 0 i n. If a n 0,

More information

8.3 Numerical Quadrature, Continued

8.3 Numerical Quadrature, Continued 8.3 Numerical Quadrature, Continued Ulrich Hoensch Friday, October 31, 008 Newton-Cotes Quadrature General Idea: to approximate the integral I (f ) of a function f : [a, b] R, use equally spaced nodes

More information

Higher Order Taylor Methods

Higher Order Taylor Methods Higher Order Taylor Methods Marcelo Julio Alvisio & Lisa Marie Danz May 6, 2007 Introduction Differential equations are one of the building blocks in science or engineering. Scientists aim to obtain numerical

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

Polynomial Interpolation with n + 1 nodes

Polynomial Interpolation with n + 1 nodes Polynomial Interpolation with n + 1 nodes Given n + 1 distinct points (x 0, f (x 0 )), (x 1, f (x 1 )),, (x n, f (x n )), Interpolating polynomial of degree n P(x) = f (x 0 )L 0 (x) + f (x 1 )L 1 (x) +

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

, applyingl Hospital s Rule again x 0 2 cos(x) xsinx

, applyingl Hospital s Rule again x 0 2 cos(x) xsinx Lecture 3 We give a couple examples of using L Hospital s Rule: Example 3.. [ (a) Compute x 0 sin(x) x. To put this into a form for L Hospital s Rule we first put it over a common denominator [ x 0 sin(x)

More information

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods by Hae-Soo Oh Department of Mathematics, University of North Carolina at Charlotte, Charlotte, NC 28223 June

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

Differentiation. f(x + h) f(x) Lh = L.

Differentiation. f(x + h) f(x) Lh = L. Analysis in R n Math 204, Section 30 Winter Quarter 2008 Paul Sally, e-mail: sally@math.uchicago.edu John Boller, e-mail: boller@math.uchicago.edu website: http://www.math.uchicago.edu/ boller/m203 Differentiation

More information

TAYLOR AND MACLAURIN SERIES

TAYLOR AND MACLAURIN SERIES TAYLOR AND MACLAURIN SERIES. Introduction Last time, we were able to represent a certain restricted class of functions as power series. This leads us to the question: can we represent more general functions

More information

REVIEW OF DIFFERENTIAL CALCULUS

REVIEW OF DIFFERENTIAL CALCULUS REVIEW OF DIFFERENTIAL CALCULUS DONU ARAPURA 1. Limits and continuity To simplify the statements, we will often stick to two variables, but everything holds with any number of variables. Let f(x, y) be

More information

Orthogonal Polynomials and Gaussian Quadrature

Orthogonal Polynomials and Gaussian Quadrature Orthogonal Polynomials and Gaussian Quadrature 1. Orthogonal polynomials Given a bounded, nonnegative, nondecreasing function w(x) on an interval, I of the real line, we consider the Hilbert space L 2

More information

Ma 530 Power Series II

Ma 530 Power Series II Ma 530 Power Series II Please note that there is material on power series at Visual Calculus. Some of this material was used as part of the presentation of the topics that follow. Operations on Power Series

More information

FIXED POINT ITERATIONS

FIXED POINT ITERATIONS FIXED POINT ITERATIONS MARKUS GRASMAIR 1. Fixed Point Iteration for Non-linear Equations Our goal is the solution of an equation (1) F (x) = 0, where F : R n R n is a continuous vector valued mapping in

More information

FIXED POINT ITERATION

FIXED POINT ITERATION FIXED POINT ITERATION The idea of the fixed point iteration methods is to first reformulate a equation to an equivalent fixed point problem: f (x) = 0 x = g(x) and then to use the iteration: with an initial

More information

Assignment-10. (Due 11/21) Solution: Any continuous function on a compact set is uniformly continuous.

Assignment-10. (Due 11/21) Solution: Any continuous function on a compact set is uniformly continuous. Assignment-1 (Due 11/21) 1. Consider the sequence of functions f n (x) = x n on [, 1]. (a) Show that each function f n is uniformly continuous on [, 1]. Solution: Any continuous function on a compact set

More information

Additional exercises with Numerieke Analyse

Additional exercises with Numerieke Analyse Additional exercises with Numerieke Analyse March 10, 017 1. (a) Given different points x 0, x 1, x [a, b] and scalars y 0, y 1, y, z 1, show that there exists at most one polynomial p P 3 with p(x i )

More information

Scientific Computing: An Introductory Survey

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

More information

100 CHAPTER 4. SYSTEMS AND ADAPTIVE STEP SIZE METHODS APPENDIX

100 CHAPTER 4. SYSTEMS AND ADAPTIVE STEP SIZE METHODS APPENDIX 100 CHAPTER 4. SYSTEMS AND ADAPTIVE STEP SIZE METHODS APPENDIX.1 Norms If we have an approximate solution at a given point and we want to calculate the absolute error, then we simply take the magnitude

More information

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

Advanced Calculus Math 127B, Winter 2005 Solutions: Final. nx2 1 + n 2 x, g n(x) = n2 x . Define f n, g n : [, ] R by f n (x) = Advanced Calculus Math 27B, Winter 25 Solutions: Final nx2 + n 2 x, g n(x) = n2 x 2 + n 2 x. 2 Show that the sequences (f n ), (g n ) converge pointwise on [, ],

More information

Math 321 Final Examination April 1995 Notation used in this exam: N. (1) S N (f,x) = f(t)e int dt e inx.

Math 321 Final Examination April 1995 Notation used in this exam: N. (1) S N (f,x) = f(t)e int dt e inx. Math 321 Final Examination April 1995 Notation used in this exam: N 1 π (1) S N (f,x) = f(t)e int dt e inx. 2π n= N π (2) C(X, R) is the space of bounded real-valued functions on the metric space X, equipped

More information

Order of convergence

Order of convergence Order of convergence Linear and Quadratic Order of convergence Computing square root with Newton s Method Given a > 0, p def = a is positive root of equation Newton s Method p k+1 = p k p2 k a 2p k = 1

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Discretization of Boundary Conditions Discretization of Boundary Conditions On

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

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

Integer-Valued Polynomials

Integer-Valued Polynomials Integer-Valued Polynomials LA Math Circle High School II Dillon Zhi October 11, 2015 1 Introduction Some polynomials take integer values p(x) for all integers x. The obvious examples are the ones where

More information

Chapter 3 Interpolation and Polynomial Approximation

Chapter 3 Interpolation and Polynomial Approximation Chapter 3 Interpolation and Polynomial Approximation Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Polynomial Interpolation

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

MATH 409 Advanced Calculus I Lecture 16: Mean value theorem. Taylor s formula.

MATH 409 Advanced Calculus I Lecture 16: Mean value theorem. Taylor s formula. MATH 409 Advanced Calculus I Lecture 16: Mean value theorem. Taylor s formula. Points of local extremum Let f : E R be a function defined on a set E R. Definition. We say that f attains a local maximum

More information

Picard s Existence and Uniqueness Theorem

Picard s Existence and Uniqueness Theorem Picard s Existence and Uniqueness Theorem Denise Gutermuth 1 These notes on the proof of Picard s Theorem follow the text Fundamentals of Differential Equations and Boundary Value Problems, 3rd edition,

More information