MA2501 Numerical Methods Spring 2015

Similar documents
MA2501 Numerical Methods Spring 2015

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

12.0 Properties of orthogonal polynomials

Section 6.6 Gaussian Quadrature

COURSE Numerical integration of functions

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

Romberg Integration and Gaussian Quadrature

8.3 Numerical Quadrature, Continued

Fixed point iteration and root finding

Examination paper for TMA4215 Numerical Mathematics

3.1 Interpolation and the Lagrange Polynomial

APPM/MATH Problem Set 6 Solutions

Preliminary Examination in Numerical Analysis

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Math Numerical Analysis

Chapter 3 Interpolation and Polynomial Approximation

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

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

5 Numerical Integration & Dierentiation

Additional exercises with Numerieke Analyse

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

Numerical Methods. King Saud University

Chapter 4: Interpolation and Approximation. October 28, 2005

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Lösning: Tenta Numerical Analysis för D, L. FMN011,

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

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

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.

NUMERICAL ANALYSIS PROBLEMS

Scientific Computing

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Numerical Analysis: Interpolation Part 1

Chapter 2 notes from powerpoints

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n

MA 3021: Numerical Analysis I Numerical Differentiation and Integration

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

April 15 Math 2335 sec 001 Spring 2014

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016

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

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Introduction Linear system Nonlinear equation Interpolation

Applied Numerical Analysis Quiz #2

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

Exam in TMA4215 December 7th 2012

Polynomial Interpolation Part II

Engg. Math. II (Unit-IV) Numerical Analysis

In numerical analysis quadrature refers to the computation of definite integrals.

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)

Interpolation Theory

Mathematics for Engineers. Numerical mathematics

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

MA2501 Numerical Methods Spring 2015

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

Math Numerical Analysis Mid-Term Test Solutions

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

On the positivity of linear weights in WENO approximations. Abstract

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Analytic Number Theory Solutions

Exam in Numerical Methods (MA2501)

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Key Words: cardinal B-spline, coefficients, moments, rectangular rule, interpolating quadratic spline, hat function, cubic B-spline.

Examination paper for TMA4125 Matematikk 4N

Assignment 6, Math 575A

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Errata List Numerical Mathematics and Computing, 7th Edition Ward Cheney & David Kincaid Cengage Learning (c) March 2013

Power Series Solutions to the Legendre Equation

Applied Numerical Analysis Homework #3

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

Orthogonal Polynomials, Quadratures & Sparse-Grid Methods for Probability Integrals

PHYS-4007/5007: Computational Physics Course Lecture Notes Appendix G

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V

Math-3315 & CSE-3365, exam 2 answer sheet

On orthogonal polynomials for certain non-definite linear functionals

Math 4310 Solutions to homework 7 Due 10/27/16

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

MATH 1014 Tutorial Notes 8

Solutions Serie 1 - preliminary exercises

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

3. Numerical Quadrature. Where analytical abilities end...

Integer-Valued Polynomials

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Numerical Programming I (for CSE)

Preliminary Examination, Numerical Analysis, August 2016

BSM510 Numerical Analysis

MT804 Analysis Homework II

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

Interpolation & Polynomial Approximation. Hermite Interpolation I

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

1 Review of Interpolation using Cubic Splines

Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points

1 Lecture 8: Interpolating polynomials.

n f(k) k=1 means to evaluate the function f(k) at k = 1, 2,..., n and add up the results. In other words: n f(k) = f(1) + f(2) f(n). 1 = 2n 2.

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Scientific Computing: Numerical Integration

Approximation theory

Solutions 2. January 23, x x

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Transcription:

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 Simpson s rule from the textbook implemented in Matlab with ɛ = 5 6 and max recursion level dept equal to 6. Compare the actual error with ɛ. a b / dx + x x xdx The procedure has been implemented in the Matlab function adsimpson.m available on the course home page. The exact value of both integrals is π.59... a The procedure gives the approximation.59 to the digits given. The actual absolute error is about 6., well below ɛ. b The procedure gives the approximation.59 to the digits given. The actual absolute error is about., again well below ɛ. As a continuation of Exercise in Exercise set, compute a numerical approximation of the definite integral e x sinx dx, using the composite Gauss Legendre rule with n = and two subintervals, i.e. h =. You may want to use Matlab for the computations. The second Gauss Legendre rule with h = yields Qf,,, = 5 f + f + 5 + 5 f f + + f + 5 f +.. March 7, 5 Page of 5

Suppose we choose interpolation points in the interval [, ]: x = x = x = Remember that we obtain a quadrature formula by interpolating a function f at those points, and integrating exactly the resulting interpolation polynomial. The resulting formula has the format fxdx If = A k fx k a Explain why this quadrature formula integrates exactly polynomials of degree up to degree. Does it depend on the choice of x, x, x? b Using the preceding fact on the polynomials, x and x to find directly the weights A k. c Write down the Lagrange polynomials l, l and l for the interpolation points x k and compute the integrals A k = l kxdx. Do you find the same values of A k? If so, why? d Show that the quadrature formula integrates exactly polynomials of degree, but not. Hint: use the quadrature formula on the polynomials and. e Show that the quadrature formula is exact for the polynomial 5. Does this mean that the formula is exact for polynomials of degree 5? f Write the quadrature formula scaled to an arbitrary interval [a, b], in order to approximate b a fxdx. k= a This result does not depend on the choice of x, x, x as long as they are distinct. For any distinct points the interpolation polynomial must equal f, when f is a polynomial of degree at most. This follows from the uniqueness theorem of interpolating polynomials. Since the rule is generated by integrating the polynomial precisely, it also integrates f precisely in this case. b Using the fact that, x and x should be integrated exactly, gives the three equations: = = = dx = A + A + A dx = A + A dx = 6 A + A The second equation gives A = A, from the third we then get A = A = / and finally from the first A = /. March 7, 5 Page of 5

c From the definition we can immediately write down the Lagrange polynomials. l = = x x + l = l = 6 which are trivially integrated to give A = A = A = l dx = = 6x + 6 = x 6x + l dx = l dx = x x + dx = / 6x + 6 dx = / x 6x + dx = / so the resulting weights are the same. This must be the case. As discussed in a, since the functions, and are all polynomials of degree less than or equal to they match their interpolating polynomial through x, x, x. Consequently they will be integrated exactly when the weights are chosen as in c. However this was precisely the requirement we directly imposed in b, and since the resulting linear system had a unique solution, those weights must match those found in c. Note also that, and clearly form a basis for all polynomials of degree less than or equal to, i.e. any such polynomial can be written as a linear combination of these three functions. The linearity of integration and the quadrature rule then implies that the requirement in b is equivalent to the requirement that all polynomials of degree less than or equal to be integrated exactly. d We use the hint and check = = dx = 6 dx 56 + + = 9 Since,, and clearly form a basis for all polynomials of degree less than or equal to. It again follows from linearity of integration and the quadrature rule that the formula is exact for all such polynomials. Because is a polynomial of degree, the formula is clearly not exact for all polynomials of degree. e We use the hint and check = 5 dx = + March 7, 5 Page of 5

In fact it is readily observed that the formula will be exact for all n+ with n some nonnegative integer, since it will be exact for all f /, where fx is an odd function. This does not mean the formula is exact for general polynomials of degree 5. Suppose it were exact for one such polynomial px. Then px + k for some constant k would also be a polynomial of degree 5. However, since the formula is not exact for it follows from linearity that the quadrature rule will not be exact for this new polynomial. f A linear transformation gives b with A k and x k as before. a fxdx If = b a A k f a + b ax k k= Show that the quadrature formula constructed using the n + nodes x, x,..., x n can not possibly have degree of precision n+, i.e. integrate exactly all polynomials of degree up to and including n+. This implies that the degree of precision, n+, obtained by Gaussian quadrature is optimal. Hint: Consider the polynomial M, with Mx = x x x n Call the interval this quadrature formula applies to for [a, b], where we exclude the trivial case a = b and assume without loss of generality that b > a. Now, following the hint it is readily observed that M x = x x x n, is at all the nodes x, x,..., x n. This implies that for a quadrature formula n If = A k fx k, k= IM =. However M is obviously positive at all points except the nodes and continuous, and so the actual integral of M must be positive, i.e. b a M x dx >. Thus M will not be integrated exactly by the quadrature formula. The proof now follows from the realization that M is a polynomial of degree n +. 5 Cf. Cheney and Kincaid, Exercise 6..9 Assume that you are interpolating the function fx = sinx on the interval [, π] with a linear spline on a uniformly spaced grid. Estimate how many grid points will be required in order to guarantee that the interpolation error is smaller than? March 7, 5 Page of 5

Denote by S the interpolating linear spline with grid size h = π/n. Then we have the estimate h max Sx fx x [,π] max f x. x [,π] Now, and therefore Thus f x = sinx, max f x =. x [,π] max Sx fx x [,π] h. As a consequence, the error is guaranteed to be smaller than, if h <, which, since h = π/n, is equivalent to the estimate n > 6 π. March 7, 5 Page 5 of 5