Numerical Marine Hydrodynamics

Similar documents
Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

BSM510 Numerical Analysis

3.1 Interpolation and the Lagrange Polynomial

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

Preliminary Examination in Numerical Analysis

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

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

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.

Numerical Methods. King Saud University

CS 323: Numerical Analysis and Computing

Function approximation

Advanced Math Quiz Review Name: Dec Use Synthetic Division to divide the first polynomial by the second polynomial.

Interpolation and Approximation

b) since the remainder is 0 I need to factor the numerator. Synthetic division tells me this is true

Polynomial Interpolation

Introduction Linear system Nonlinear equation Interpolation

Curve Fitting and Interpolation

Numerical Analysis: Interpolation Part 1

Math Numerical Analysis Mid-Term Test Solutions

Lecture 10 Polynomial interpolation

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

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

Lectures 9-10: Polynomial and piecewise polynomial interpolation

CS 323: Numerical Analysis and Computing

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

Review all the activities leading to Midterm 3. Review all the problems in the previous online homework sets (8+9+10).

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review

Neville s Method. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Neville s Method

UNIT-II INTERPOLATION & APPROXIMATION

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

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

Curve Fitting. Objectives

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.

Interpolation Theory

Numerical Marine Hydrodynamics Summary

1 Lecture 8: Interpolating polynomials.

Chapter 3 Interpolation and Polynomial Approximation

Downloaded from

Math 578: Assignment 2

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

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

LEAST SQUARES APPROXIMATION

2.29 Numerical Fluid Mechanics Fall 2009 Lecture 13

Polynomial Interpolation Part II

ROOT FINDING REVIEW MICHELLE FENG

Scientific Computing

SYSTEMS OF NONLINEAR EQUATIONS

A first order divided difference

x 2 + 6x 18 x + 2 Name: Class: Date: 1. Find the coordinates of the local extreme of the function y = x 2 4 x.

Chapter 4: Interpolation and Approximation. October 28, 2005

Midterm Review. Igor Yanovsky (Math 151A TA)

Newton s Method and Linear Approximations

Interpolation and the Lagrange Polynomial

Examination paper for TMA4215 Numerical Mathematics

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

3 What is the degree of the polynomial function that generates the data shown below?

November 20, Interpolation, Extrapolation & Polynomial Approximation

3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.

ISSUED BY KENDRIYA VIDYALAYA - DOWNLOADED FROM Chapter - 2. (Polynomials)

CHAPTER 4. Interpolation

Scientific Computing: An Introductory Survey

1 Review of Interpolation using Cubic Splines

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)

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

( ) y 2! 4. ( )( y! 2)

CHAPTER 2 POLYNOMIALS KEY POINTS

MAT137 Calculus! Lecture 45

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

Applied Numerical Analysis Quiz #2

Physics 331 Introduction to Numerical Techniques in Physics

Math 110 Midterm 1 Study Guide October 14, 2013

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

MA3457/CS4033: Numerical Methods for Calculus and Differential Equations

ADDITONAL MATHEMATICS

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Newton s Method and Linear Approximations

Optimization. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30

, a 1. , a 2. ,..., a n

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

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.

Lesson 7.1 Polynomial Degree and Finite Differences

MA2501 Numerical Methods Spring 2015

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

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

Newton s Method and Linear Approximations 10/19/2011

Convergence Rates on Root Finding

Numerical Methods I: Polynomial Interpolation

Interpolation and Polynomial Approximation I

Polynomial Review Problems

S56 (5.1) Polynomials.notebook August 25, 2016

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

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

How fast can we add (or subtract) two numbers n and m?

Solution of Algebric & Transcendental Equations

Module 5 : Linear and Quadratic Approximations, Error Estimates, Taylor's Theorem, Newton and Picard Methods

Name: Class: Date: ID: A

The standard form for a general polynomial of degree n is written. Examples of a polynomial in standard form

Newton's forward interpolation formula

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

Transcription:

Numerical Marine Hydrodynamics Interpolation Lagrange interpolation Triangular families Newton s iteration method Equidistant Interpolation Spline Interpolation Numerical Differentiation Numerical Integration Error of numerical integration

Given: Find for Purpose of numerical Interpolation 1. Compute intermediate values of a sampled function 2. Numerical differentiation foundation for Finite Difference and Finite Element methods 3. Numerical Integration

Polynomial Interpolation Polynomial Interpolation Coefficients: Linear System of Equations x Interpolation Interpolation function

Numerical Interpolation Polynomial Interpolation Examples x x Linear Interpolation Quadratic Interpolation Numerical Marine Hydrodynamics Lecture 11

Polynomial Interpolation Taylor Series Remainder p(x) Requirement Ill-conditioned for large n x Polynomial is unique, but how do we calculate the coefficients? Numerical Marine Hydrodynamics Lecture 11

Lagrange Polynomials 1 k-3 k-2 k-1 k k+1 k+2 x Difficult to program Difficult to estimate errors Divisions are expensive Important for numerical integration

Triangular Families of Polynomials Ordered Polynimials Special form convenient for interpolation where Coefficients found by recursion

Triangular Families of Polynomials Polynomial Evaluation Horner s Scheme Remainder Interpolation Error

Standard triangular family of polynomials Numerical Interpolation Newton s Iteration Formula Newton s Computational Scheme Divided Differences 2 3

Newton s Iteration Formula 1 2 3 4 x 0 1 x Numerical Marine Hydrodynamics Lecture 11

Equidistant Newton Interpolation Equidistant Sampling Divided Differences Stepsize Implied

Newton s Iteration Formula function[a] = interp_test(n) %n=2 h=1/n xi=[0:h:1] f=sqrt(1-xi.*xi).* (1-2*xi +5*(xi.*xi)); %f=1-2*xi+5*(xi.*xi)-4*(xi.*xi.*xi); c=newton_coef(h,f) m=101 x=[0:1/(m-1):1]; fx=sqrt(1-x.*x).* (1-2*x +5*(x.*x)); %fx=1-2*x+5*(x.*x)-4*(x.*x.*x); y=newton(x,xi,c); hold off; b=plot(x,fx,'b'); set(b,'linewidth',2); hold on; b=plot(xi,f,'.r') ; set(b,'markersize',30); b=plot(x,y,'g'); set(b,'linewidth',2); yl=lagrange(x,xi,f); b=plot(x,yl,'xm'); set(b,'markersize',5); b=legend('exact','samples','newton','lagrange') b=title(['n = ' num2str(n)]); set(b,'fontsize',16); function[y] = newton(x,xi,c) % Computes Newton polynomial % with coefficients c n=length(c)-1 m=length(x) y=c(n+1)*ones(1,m); for i=n-1:-1:0 cc=c(i+1); xx=xi(i+1); y=cc+y.*(x-xx); end function[c] = newton_coef(h,f) % Computes Newton Coefficients % for equidistant sampling h n=length(f)-1 c=f; c_old=f; fac=1; for i=1:n fac=i*h; for j=i:n c(j+1)=(c_old(j+1)-c_old(j))/fac; end c_old=c; end Numerical Marine Hydrodynamics Lecture 11

Splines Linear Splines x Global Interpolation Local Interpolation Cubic Splines

Splines Quadratic Splines 3n coefficients Continuity 2(n-1) conditions End Conditions Derivatives 2 conditions 2n total n-1 conditions 3n-1 total 1 condition 3n total Non-Unique!

Splines Quadratic Splines 4n unknowns x Continuity Conditions 1. Continuity 2n-2 conditions 2. End conditions 2 conditions 3. Continuous 1 st derivatives n-1 conditions 4. Continuous 2 nd derivatives n-1 conditions 5. Second derivatives at end points 2 conditions