Additional exercises with Numerieke Analyse

Size: px
Start display at page:

Download "Additional exercises with Numerieke Analyse"

Transcription

1 Additional exercises with Numerieke Analyse March 10, (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 ) = y i, i = 0, 1,, p (x 1 ) = z 1. (b) Construct this p in the form p(x) = p (x)+α(x x 0 )(x x 1 )(x x ) with p being the Langange interpolation polynomial of degree corresponding to the set {(x i, y i ) : i = 0, 1, }. (c) Let f be four times differentiable. Show that for the polynomial p P 3 with p(x i ) = f(x i ), i = 0, 1,, p (x 1 ) = f (x 1 ) and any x [a, b], there exists a ξ = ξ(x) (a, b) with f(x) p(x) = (x x 0 )(x x 1 ) (x x ) f (4) (ξ). 4!. (a) Find weights w 0, w 0, w 1, w 1 such that b a for any f P 3. f(x)dx = w 0 f(a) + w 0 f (a) + w 1 f(b) + w 1 f (b) (b) Show that for f C 4, the error in this quadrature formula, i.e., true integral minus its approximation, is of the form C(b a) 5 f (4) (ξ) for some ξ [a, b], and give the constant C. (c) Splitting the interval into m equal subintervals, give the resulting composite quadrature formula. (d) Show that the error in this composite formula is equal to C (b a)5 f (4) (ξ) m 4 for some ξ [a, b]. 3. For a < b, {x 0,..., x n } R, show that there are unique weights w 0,..., w n such that n i=0 w if(x i ) = b f(x)dx for all f P a n. 1

2 4. (Runge phenomenon). Let f(x) = 1/(1 + x ). (a) For n = 1, 4, 8, 1 make plots on [ 5, 5] of the Lagrange interpolation polynomial p n with interpolation points x (n) k = k/n, k = 0,..., n, and of f p n. Use e.g. the MATLAB functions polyfit, poly and polyval. Where is the interpolation error large? (b) For n as above, approximate max x [ 5,5] f(x) p n (x) by evaluating this absolute error on say 150 equally distributed points. What do you notice? (c) Repeat the previous questions for the Chebychev roots x (n) 5 cos( (k+ 1 )π ), k = 0,..., n and compare the results. n+1 k = (d) Compare max x [ 5,5] (x x (n) 0 )... (x x (n) n ) for both sets of interpolation points and draw a conclusion. Hand in: For n = 8 and both choices of the interpolation points the values of max x [ 5,5] (x x (n) 0 )... (x x (n) n ) and plots of f p n, and the m-files you used to generate these results. 5. (Adaptive quadrature) Given a function f, let T [c,d] (m) be the result of the approximation of d f(x)dx by means of the composite trapezium c rule on m equal subintervals. Assuming that f is sufficiently smooth, we know that d c f(x)dx T [c,d] (m) = 1 (d c) [f (d) f (c)] + O(m 4 ) 1 m (a) Approximate the integral of x 3 over [a, b] = [ 1, 100] by the composite trapezium rule T [a,b] (m) for m = k. Find the smallest k, 10 such that the exact error is less than ε = Explain the slow convergence. To improve the convergence rate of the above problem we may use an adaptive strategy: instead of dividing an interval into m equal subintervals, we can try to recursively subdivide only those subintervals where the trapezium rule makes a large error. For this we need to estimate the error of the trapezium rule on a given interval.

3 (b) Verify that the error estimate d c f(x)dx T [c,d] (m) T [c,d](m) T [c,d] (m) 3 is exact when the O(m 4 ) and O((m) 4 ) terms can be ignored. The right hand side is computable, and thus can be used for an estimate. An adaptive strategy now is: Compute T [a,b] (), and accept it as an approximation when the estimated error is less or equal to a desired tolerance ε. Otherwise, apply the procedure to b+a b b+a f(x)dx with tolerances ε/. a f(x)dx and (c) Write a recursive MATLAB function that implements the adaptive strategy. (d) Apply the adaptive routine to the function x 3 with a, b, ε as before. What is the exact error in the obtained approximation? How do the number of function evaluations that are required compare to that with the strategy used in (a)? Hand in m-files that you have used in (5a) and (5c), and the answers to the questions posed in (5d). 6. Let a < b, m N, h := b a m, x i := a + ih for i {0,..., m}, and for n {1,,...}, let S n := {s C n 1 (a, b) : s (xi 1,x i ) P n (1 i m)}. Furthermore, let I 1 : C[a, b]) S 1 the continuous piecewise linear interpolator, and let I 3 : C 1 [a, b]) S 3 the complete cubic spline interpolator defined by s(x i ) = f(x i ) (i {0,..., m}), (1) s (x 0 ) = f (x 0 ), s (x m ) = f (x m ). () where s is here a shorthand notation for I 3 (f). The aim of this exercise is to show that f I 3 (f) = O(h 4 ) when f is sufficiently smooth. From formula (11.5) from the book, we know that each s S 3 can be written as s [xi 1,x i ](x) = (x i x) 3 6h σ i 1 + (x x i 1) 3 σ i + α i (x x i 1 ) + β i (x i x), 6h 3

4 for some scalars α 1,..., α m, β 1,..., β m and, for i {0,..., m}, with σ i = s (x i ). By imposing (1) we obtain α i = f(x i) h h 6 σ i, β i = f(x i 1) h h 6 σ i 1. (a) By using the continuity of s in x 1,..., x m 1 and (), show that A[σ 0... σ m ] = b, where A R (m+1) (m+1) is defined by A =..., and b R m+1 by b i = 1 [ f (x m) h 1 [ f(x 1 ) f(x 0 ) f (x 0 )] h h 6 f(x i+1) f(x i )+f(x i 1 ) when i = 0, ] h when i {1,..., m 1}, f(xm) f(x m 1) h when i = m. Elementary linear algebra shows that A is invertible, and that A 1 1, i.e., that max i (A 1 x) i 1 max i x i (Indeed, writing A = 4(I (I 1 4 A)) and using that I 1 4 A = 1, shows that A 1 1 ), (b) Show that I 3 (f) 3 f. (Hint: Show that s = max 0 i m σ i and that max 0 i m b i 6 f.) (c) Show that I 3 is a projector, i.e., that I 3 (s) = s for any s S 3. (d) Show that for any p S 1 there exists a s S 3 with s = p. (e) Let s S 3 be such that s = I 1 (f ). Show that f I 3 (f) = f s I 3 (f s), and with that, show that f I 3 (f) 4 f s 1 h f (4). 4

5 n=0 n=1 n= n=3 n=4 0 h h 3h 4h 5h Figure 1: The functions S (n,0) for n = 0,..., 4. (f) Show that I 1 (f I 3 (f)) = 0, and with that show that as well as for some constant C > 0. f I 3 (f) 1 16 h4 f (4), f I 3 (f) Ch 3 f (4) 7. Let a < b, m N, n N 0 := N {0}, h := b a m and S n := {s C n 1 (a, b) : s (a+(i 1)h,a+ih) P n (1 i m)}, being the spline space of degree n w.r.t. the subdivision of [a, b] in m equal subintervals (and with C 1 (a, b) being the space of bounded functions on [a, b]). For convenience, we take a = 0. With n+1 ( ) n + 1 S (n) (x) := ( 1) k (x kh) n k +, k=0 we define S (n,l) (x) := S (n) (x lh) for l Z. (a) Show that S (n,l) [0,b] S n. (b) Show that supp S (n,l) [lh, (l + n + 1)h]. (c) Show that dim S n = m + n = #{l Z : S (n,l) [0,b] 0}. (d) Show that S (n+1,l) (x) = (n+1)(s (n,l)(x) S (n,l+1) (x)) (when n = 0 only for x hz). (e) From Exercise 11.6, we know that S (n+1,l) (x) = (x lh)s (n,l) (x) + ((n + + l)h x)s (n,l+1) (x). 5

6 Using induction to n, from this show that S (n,l) (x) = h n n!. l Z Now we are going to show that for all p Z, c l S (n,l) (ph,(p+1)h) = 0 = c l = 0 for p n 1 < l < p + 1. (3) l Z (f) Show that (3) holds for n = 0. (g) Now let (3) be valid for some n N 0. Let l Z c ls (n+1,l) and so l Z c ls (n+1,l) vanish on (ph, (p + 1)h). Using (7d), show that this implies that for some constant c R, c l = c for all p n < l < p + 1, and with that c l S (n+1,l) (ph,(p+1)h) = c S (n+1,l) (ph,(p+1)h) = ch n+1 (n + 1)! l Z l Z Conclude that (3) is valid for n + 1, and so for any n N 0. (h) Using (7a), (7c), and (3), show that { S(n,l) [0,b] : l { n,..., m 1} } is a basis for S n. 8. Consider the initial value problem(ivp): { y (x) = f(x, y(x)) 0 x 1 y(0) = 0 where f(x, y) = (1 + x)(1 + y ). (a) Verify that the exact solution is given by y(x) = tan(x + x /). A possible implementation of the Forward Euler method (FE) for solving this IVP is given below. 6

7 function Euler(N) % N is the number of the time steps f=@(x,y)(1+x)*(1+y.^); % defines the function f y=@(x) tan(x+x.^/); % defines exact solution h=1/n; % time step x=0:h:1; xfine=0:0.01:1 FE=zeros(1,N+1); % Forward Euler approximation solution err=zeros(1,n+1); % Error values of Forward Euler method FE(1)=0; for i=1:n FE(i+1)=FE(i)+h*f(x(i),FE(i)); end for i=1:n+1 err(i)=y(x(i))-fe(i); end plot(xfine,y(xfine)); hold on; plot(x,fe); (b) Run Forward Euler with h 1 = N = 10, 0, 40, 80, 160 and compare the errors. (c) To compare the error of FE with other numerical methods, solve the problem with the modified Euler method: { yi+1 = y i + 1 (k 1 + k ) where k 1 = hf(x i, y i ), k = hf(x i + h, y i + k 1 ) and the following Runge-Kutta scheme: y i+1 = y i + h(k k + k 3 + k 4 ) where k 1 = f(x i, y i ), k = f(x i + h, y i + h k 1 ), k 3 = f(x i + h, y i + h k ), k 4 = f(x i + h, y i + hk 3 ) (d) Plot the error in the point 1 vs. N for the three methods, and estimate the order of the methods. To do this, it is most convenient to use a log-log plot. 9. To illustrate the numerical solution of a so-called stiff ODE, consider the IVP { y (x) = λ(sin(x) y) + cos(x) 0 x 1, λ 1 y(0) = 0 7

8 with exact solution y(x) = sin(x). (a) Apply the FE method to this problem with λ = 00 and h 1 = N = 10, 90, 100, 105, (b) Implement the Backward Euler method (BE): y i+1 = y i + hf(x i+1, y i+1 ) and run it with the same values of h and λ. Compare the results. (c) With x i = ih, define the truncation error of the Backward Euler method by T (BE) i = y(x i+1) y(x i ) f(x i+1, y(x i+1 )) h and show that T (BE) i = h y (ξ) for some ξ [x i, x i+1 ]. Similarly, let T (FE) i = y(x i+1) y(x i ) f(x h i, y(x i )), which is known to be of the form h y (η) for some η [x i, x i+1 ]. (d) With e i := y(x i ) y e i and e (BE) i i+1 = (1 hλ)e i + ht e (BE) i+1 = e(be) i + ht (BE) i 1 + hλ := y(x i ) y (BE) i, show that. i, Show that for 1 i h 1, e (BE) i 1 h y, and, when h 1, 100 e i 1 h y. Explain the behaviour of the error of FE when N < 100. Is there a contradiction with the result of Theorem 1. applied to FE? 10. For x 0 < x 1 < < x n, where n, and k N, consider the spline space S (k) = {s C k 1 (x 0, x n ) : s (xi,x i+1 ) P k, i = 0,..., n}. (a) Show that the only s S (1) with s(x 0 ) = s(x n ) = 0 and such that for any i 0, j, i + j n, s (xi,x i+j ) has j 1 zeros, is the zero function. (Hint: Show that if s 0, then there exists i and j as above with s(x i ) = 0 and s(x i+j ) = 0 and s(x i+1 ) 0,..., s(x i+j 1 ) 0, and derive a contradiction.) 8

9 (b) Show that the only p P 3 (a, b) with p(a) = p(b) = 0 and p 0 is the zero polynomial. (c) Show that there exists at most one natural cubic spline interpolant, i.e., an t S (3) with t (x 0 ) = t (x n ) = 0 that for some given y 0,..., y n satisfies t(x i ) = y i (0 i n). (Hint: suppose two, and consider the difference.) 11. Archimedes (50 v. Chr.) obtained upper and lower bounds for π by measuring the perimeter of regular inscribed or circumscribed polygons for a circle with radius 1. In this exercise we consider inscribed polygons only. (a) Let T 0 (h) be the perimeter of regular inscribed polygon with n sides, where nh = 1. Show that T 0 (h) = h 1 sin(πh). (b) Show that there exist constants (c i ) such that m N π T 0 (h) = m c i h i + O(h m+ ) (h 0). i=1 (c) Determine α 1, β 1 such that T 1 (h/) := α 1 T 0 (h/) + β 1 T 0 (h) satisfies π T 1 (h/) = O(h 4 ) (h 0). Huygens used this idea already in Archimes measurements went to n = 96. Assuming that Huygens used these measurements, which we assume to be exact, what were the errors in the best approximations that they both obtained? (d) Improve Huygens, i.e., determine α, β such that T (h/4) := α T 1 (h/4) + β T 1 (h/) satisfies π T (h/4) = O(h 6 ) (h 0). What is the error in T (1/96)? 9

10 Figure : The inscribed regular polygons for h = 1/8 and h = 1/ To approximate a (a > 0) we apply the Newton scheme to f(x) = x a = 0. (a) Verify that this yields the following iteration: x i+1 = 1 (x i + a x i ). (b) Show that for any x 0 > a, the sequence (x i ) i 0 is monotone decreasing. (c) Show that for any 0 < x 0 < a, the sequence (x i ) i 1 is monotone decreasing. Now we consider the Newton iteration with x 0 = 1 (1 + a). (d) Show that x 0 is the result of one step of Newton iteration starting with x 1 = 1, and thus that x 0 > a. (e) Show that if for some i 0, x i x i+1 < ɛ, that then x i+1 a < ɛ, which provides a useful stopping criterion. 13. Skipped 10

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

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

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

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

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177 Second Order ODEs Often physical or biological systems are best described by second or higher-order ODEs. That is, second or higher order derivatives appear in the mathematical model of the system. For

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

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, 1 Interpolation 11 Introduction In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, {x i, y i = f(x i ) i = 1 n, obtained,

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

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

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

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

Exam in TMA4215 December 7th 2012

Exam in TMA4215 December 7th 2012 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed

More information

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 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,

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

SPLINE INTERPOLATION

SPLINE INTERPOLATION Spline Background SPLINE INTERPOLATION Problem: high degree interpolating polynomials often have extra oscillations. Example: Runge function f(x = 1 1+4x 2, x [ 1, 1]. 1 1/(1+4x 2 and P 8 (x and P 16 (x

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

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

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

Part IB Numerical Analysis

Part IB Numerical Analysis Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after

More information

COURSE Numerical integration of functions

COURSE Numerical integration of functions COURSE 6 3. Numerical integration of functions The need: for evaluating definite integrals of functions that has no explicit antiderivatives or whose antiderivatives are not easy to obtain. Let f : [a,

More information

Newton's forward interpolation formula

Newton's forward interpolation formula Newton's Interpolation Formulae Interpolation is the process of approximating a given function, whose values are known at N + 1 tabular points, by a suitable polynomial, P N (x) of degree N which takes

More information

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.

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. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

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

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 Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

Numerical Programming I (for CSE)

Numerical Programming I (for CSE) Technische Universität München WT / Fakultät für Mathematik Prof. Dr. M. Mehl B. Gatzhammer February 7, Numerical Programming I (for CSE) Repetition ) Floating Point Numbers and Rounding a) Let f : R R

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Spring 2012 Introduction to numerical analysis Class notes. Laurent Demanet

Spring 2012 Introduction to numerical analysis Class notes. Laurent Demanet 18.330 Spring 2012 Introduction to numerical analysis Class notes Laurent Demanet Draft February 28, 2012 2 Preface Good additional references are Burden and Faires, Introduction to numerical analysis

More information

Mini project ODE, TANA22

Mini project ODE, TANA22 Mini project ODE, TANA22 Filip Berglund (filbe882) Linh Nguyen (linng299) Amanda Åkesson (amaak531) October 2018 1 1 Introduction Carl David Tohmé Runge (1856 1927) was a German mathematician and a prominent

More information

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

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration. Unit IV Numerical Integration and Differentiation Numerical integration and differentiation quadrature classical formulas for equally spaced nodes improper integrals Gaussian quadrature and orthogonal

More information

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS The general form of a first order differential equations is = f(x, y) with initial condition y(a) = y a We seek the solution y = y(x) for x > a This is shown

More information

Numerical Differential Equations: IVP

Numerical Differential Equations: IVP Chapter 11 Numerical Differential Equations: IVP **** 4/16/13 EC (Incomplete) 11.1 Initial Value Problem for Ordinary Differential Equations We consider the problem of numerically solving a differential

More information

Spring 2012 Introduction to numerical analysis Class notes. Laurent Demanet

Spring 2012 Introduction to numerical analysis Class notes. Laurent Demanet 18.330 Spring 2012 Introduction to numerical analysis Class notes Laurent Demanet Draft April 25, 2014 2 Preface Good additional references are Burden and Faires, Introduction to numerical analysis Suli

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

Solutions Preliminary Examination in Numerical Analysis January, 2017

Solutions Preliminary Examination in Numerical Analysis January, 2017 Solutions Preliminary Examination in Numerical Analysis January, 07 Root Finding The roots are -,0, a) First consider x 0 > Let x n+ = + ε and x n = + δ with δ > 0 The iteration gives 0 < ε δ < 3, which

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

Preliminary Examination, Numerical Analysis, August 2016

Preliminary Examination, Numerical Analysis, August 2016 Preliminary Examination, Numerical Analysis, August 2016 Instructions: This exam is closed books and notes. The time allowed is three hours and you need to work on any three out of questions 1-4 and any

More information

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

Chapter 1 Numerical approximation of data : interpolation, least squares method

Chapter 1 Numerical approximation of data : interpolation, least squares method Chapter 1 Numerical approximation of data : interpolation, least squares method I. Motivation 1 Approximation of functions Evaluation of a function Which functions (f : R R) can be effectively evaluated

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

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018) MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018) COURSEWORK 3 SOLUTIONS Exercise ( ) 1. (a) Write A = (a ij ) n n and B = (b ij ) n n. Since A and B are diagonal, we have a ij = 0 and

More information

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

Examination paper for TMA4125 Matematikk 4N

Examination paper for TMA4125 Matematikk 4N Department of Mathematical Sciences Examination paper for TMA45 Matematikk 4N Academic contact during examination: Anne Kværnø a, Louis-Philippe Thibault b Phone: a 9 66 38 4, b 9 3 0 95 Examination date:

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

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

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes Root finding: 1 a The points {x n+1, }, {x n, f n }, {x n 1, f n 1 } should be co-linear Say they lie on the line x + y = This gives the relations x n+1 + = x n +f n = x n 1 +f n 1 = Eliminating α and

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

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Professor Dr. E F Toro Laboratory of Applied Mathematics University of Trento, Italy eleuterio.toro@unitn.it http://www.ing.unitn.it/toro September 19, 2014 1 / 55 Motivation

More information

Chapter 5: Numerical Integration and Differentiation

Chapter 5: Numerical Integration and Differentiation Chapter 5: Numerical Integration and Differentiation PART I: Numerical Integration Newton-Cotes Integration Formulas The idea of Newton-Cotes formulas is to replace a complicated function or tabulated

More information

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations MA3457/CS4033: Numerical Methods for Calculus and Differential Equations Course Materials P A R T II B 14 2014-2015 1 2. APPROXIMATION CLASS 9 Approximation Key Idea Function approximation is closely related

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

Lecture Notes on Introduction to Numerical Computation 1

Lecture Notes on Introduction to Numerical Computation 1 Lecture Notes on Introduction to Numerical Computation 1 Wen Shen Fall 2012 1 These notes are provided to students as a supplement to the textbook. They contain mainly examples that we cover in class.

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

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

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

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

Interpolation (Shape Functions)

Interpolation (Shape Functions) Mètodes Numèrics: A First Course on Finite Elements Interpolation (Shape Functions) Following: Curs d Elements Finits amb Aplicacions (J. Masdemont) http://hdl.handle.net/2099.3/36166 Dept. Matemàtiques

More information

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

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 PRACTICE PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations

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

(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

NUMERICAL ANALYSIS I. MARTIN LOTZ School of Mathematics The University of Manchester. May 2016

NUMERICAL ANALYSIS I. MARTIN LOTZ School of Mathematics The University of Manchester. May 2016 NUMERICAL ANALYSIS I by MARTIN LOTZ School of Mathematics The University of Manchester May 06 Contents Contents ii Week. Computational Complexity....................... Accuracy...............................

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

1 Ordinary Differential Equations

1 Ordinary Differential Equations Ordinary Differential Equations.0 Mathematical Background.0. Smoothness Definition. A function f defined on [a, b] is continuous at ξ [a, b] if lim x ξ f(x) = f(ξ). Remark Note that this implies existence

More information

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

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018 Numerical Analysis Preliminary Exam 0.00am.00pm, January 9, 208 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs 2013 1 / 43 Outline 1 Initial Value

More information

Theory, Solution Techniques and Applications of Singular Boundary Value Problems

Theory, Solution Techniques and Applications of Singular Boundary Value Problems Theory, Solution Techniques and Applications of Singular Boundary Value Problems W. Auzinger O. Koch E. Weinmüller Vienna University of Technology, Austria Problem Class z (t) = M(t) z(t) + f(t, z(t)),

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

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

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems

More information

Numerical Methods for Ordinary Differential Equations

Numerical Methods for Ordinary Differential Equations Numerical Methods for Ordinary Differential Equations Answers of the exercises C Vuik, S van Veldhuizen and S van Loenhout 08 Delft University of Technology Faculty Electrical Engineering, Mathematics

More information

Introduction to the Numerical Solution of IVP for ODE

Introduction to the Numerical Solution of IVP for ODE Introduction to the Numerical Solution of IVP for ODE 45 Introduction to the Numerical Solution of IVP for ODE Consider the IVP: DE x = f(t, x), IC x(a) = x a. For simplicity, we will assume here that

More information

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

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation See your notes. 1. Lagrange Interpolation (8.2) 1 2. Newton Interpolation (8.3) different form of the same polynomial as Lagrange

More information

AM205: Assignment 3 (due 5 PM, October 20)

AM205: Assignment 3 (due 5 PM, October 20) AM25: Assignment 3 (due 5 PM, October 2) For this assignment, first complete problems 1, 2, 3, and 4, and then complete either problem 5 (on theory) or problem 6 (on an application). If you submit answers

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

Curve Fitting and Interpolation

Curve Fitting and Interpolation Chapter 5 Curve Fitting and Interpolation 5.1 Basic Concepts Consider a set of (x, y) data pairs (points) collected during an experiment, Curve fitting: is a procedure to develop or evaluate mathematical

More information

Computational Methods in Civil Engineering

Computational Methods in Civil Engineering City University of New York (CUNY) CUNY Academic Works Open Educational Resources City College of New York 2018 Computational Methods in Civil Engineering Nir Krakauer CUNY City College How does access

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

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

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

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

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

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

More information

NUMERICAL ANALYSIS PROBLEMS

NUMERICAL ANALYSIS PROBLEMS NUMERICAL ANALYSIS PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations Problem.

More information

November 20, Interpolation, Extrapolation & Polynomial Approximation

November 20, Interpolation, Extrapolation & Polynomial Approximation Interpolation, Extrapolation & Polynomial Approximation November 20, 2016 Introduction In many cases we know the values of a function f (x) at a set of points x 1, x 2,..., x N, but we don t have the analytic

More information

Numerical and Statistical Methods

Numerical and Statistical Methods F.Y. B.Sc.(IT) : Sem. II Numerical and Statistical Methods Time : ½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q. Attempt any THREE of the following : [5] Q.(a) What is a mathematical model? With

More information

Numerical and Statistical Methods

Numerical and Statistical Methods F.Y. B.Sc.(IT) : Sem. II Numerical and Statistical Methods Time : ½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q. Attempt any THREE of the following : [5] Q.(a) What is a mathematical model? With

More information

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error In this method we assume initial value of x, and substitute in the equation. Then modify x and continue till we

More information

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000:

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000: MATH4414.01 ASSIGNMENT 07 SOLUTIONS 8.1 Following is census data showing the population of the US between 1900 and 2000: Years after 1900 Population in millions 0 76.0 20 105.7 40 131.7 60 179.3 80 226.5

More information

x n+1 = x n f(x n) f (x n ), n 0.

x n+1 = x n f(x n) f (x n ), n 0. 1. Nonlinear Equations Given scalar equation, f(x) = 0, (a) Describe I) Newtons Method, II) Secant Method for approximating the solution. (b) State sufficient conditions for Newton and Secant to converge.

More information

Computing Integrals. Lectures INF2320 p. 1/48

Computing Integrals. Lectures INF2320 p. 1/48 Computing Integrals Lectures INF2320 p. 1/48 Lectures INF2320 p. 2/48 Bagels We study a simple example of scientific computing. Assume that you run a Bagel&Juice cafè Each night you have to decide how

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

Initial Value Problems

Initial Value Problems Numerical Analysis, lecture 13: Initial Value Problems (textbook sections 10.1-4, 10.7) differential equations standard form existence & uniqueness y 0 y 2 solution methods x 0 x 1 h h x 2 y1 Euler, Heun,

More information

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

MATHEMATICAL METHODS INTERPOLATION

MATHEMATICAL METHODS INTERPOLATION MATHEMATICAL METHODS INTERPOLATION I YEAR BTech By Mr Y Prabhaker Reddy Asst Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad SYLLABUS OF MATHEMATICAL METHODS (as per JNTU

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

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

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

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

Fundamentals of Numerical Mathematics. Charles University Prague Faculty of Mathematics and Physics Czech Republic

Fundamentals of Numerical Mathematics. Charles University Prague Faculty of Mathematics and Physics Czech Republic Fundamentals of Numerical Mathematics Vít Dolejší Charles University Prague Faculty of Mathematics and Physics Czech Republic dolejsi@karlin.mff.cuni.cz December 18, 2017 Preface These lecture notes more

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

M.SC. PHYSICS - II YEAR

M.SC. PHYSICS - II YEAR MANONMANIAM SUNDARANAR UNIVERSITY DIRECTORATE OF DISTANCE & CONTINUING EDUCATION TIRUNELVELI 627012, TAMIL NADU M.SC. PHYSICS - II YEAR DKP26 - NUMERICAL METHODS (From the academic year 2016-17) Most Student

More information

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University Interpolation Sanzheng Qiao Department of Computing and Software McMaster University January, 2014 Outline 1 Introduction 2 Polynomial Interpolation 3 Piecewise Polynomial Interpolation 4 Natural Cubic

More information

Interpolation. P. Sam Johnson. January 30, P. Sam Johnson (NITK) Interpolation January 30, / 75

Interpolation. P. Sam Johnson. January 30, P. Sam Johnson (NITK) Interpolation January 30, / 75 Interpolation P. Sam Johnson January 30, 2015 P. Sam Johnson (NITK) Interpolation January 30, 2015 1 / 75 Overview One of the basic ideas in Mathematics is that of a function and most useful tool of numerical

More information

The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1

The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1 The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1 1 School of Electronics and Information, Northwestern Polytechnical

More information

Differential Equations

Differential Equations Differential Equations Definitions Finite Differences Taylor Series based Methods: Euler Method Runge-Kutta Methods Improved Euler, Midpoint methods Runge Kutta (2nd, 4th order) methods Predictor-Corrector

More information