Lecture 4: Piecewise Cubic Interpolation

Similar documents
Lecture 4: Piecewise Cubic Interpolation

DCDM BUSINESS SCHOOL NUMERICAL METHODS (COS 233-8) Solutions to Assignment 3. x f(x)

INTERPOLATION(1) ELM1222 Numerical Analysis. ELM1222 Numerical Analysis Dr Muharrem Mercimek

Lecture 36. Finite Element Methods

Polynomial Regression Models

THE COMBINED SHEPARD ABEL GONCHAROV UNIVARIATE OPERATOR

Scatterplot Smoothing

Principle Component Analysis

Pyramid Algorithms for Barycentric Rational Interpolation

International Journal of Pure and Applied Sciences and Technology

UNIVERSITY OF IOANNINA DEPARTMENT OF ECONOMICS. M.Sc. in Economics MICROECONOMIC THEORY I. Problem Set II

6 Roots of Equations: Open Methods

Rank One Update And the Google Matrix by Al Bernstein Signal Science, LLC

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

The Schur-Cohn Algorithm

Nice plotting of proteins II

7.2 Volume. A cross section is the shape we get when cutting straight through an object.

NUMERICAL DIFFERENTIATION

4. Eccentric axial loading, cross-section core

( ) [ ( k) ( k) ( x) ( ) ( ) ( ) [ ] ξ [ ] [ ] [ ] ( )( ) i ( ) ( )( ) 2! ( ) = ( ) 3 Interpolation. Polynomial Approximation.

Convexity preserving interpolation by splines of arbitrary degree

Jens Siebel (University of Applied Sciences Kaiserslautern) An Interactive Introduction to Complex Numbers

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

Many-Body Calculations of the Isotope Shift

Fitting a Polynomial to Heat Capacity as a Function of Temperature for Ag. Mathematical Background Document

CISE 301: Numerical Methods Lecture 5, Topic 4 Least Squares, Curve Fitting

Review of linear algebra. Nuno Vasconcelos UCSD

Remember: Project Proposals are due April 11.

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

Applied Statistics Qualifier Examination

Katholieke Universiteit Leuven Department of Computer Science

8. INVERSE Z-TRANSFORM

Introduction to Numerical Integration Part II

Lecture 2: Numerical Methods for Differentiations and Integrations

Online Appendix to. Mandating Behavioral Conformity in Social Groups with Conformist Members

Two Coefficients of the Dyson Product

More metrics on cartesian products

Modelli Clamfim Equazioni differenziali 7 ottobre 2013

Chemical Reaction Engineering

Partially Observable Systems. 1 Partially Observable Markov Decision Process (POMDP) Formalism

Multiple view geometry

Modelli Clamfim Equazioni differenziali 22 settembre 2016

ALGORITHM FOR THE CALCULATION OF THE TWO VARIABLES CUBIC SPLINE FUNCTION

Chemical Reaction Engineering

LOCAL FRACTIONAL LAPLACE SERIES EXPANSION METHOD FOR DIFFUSION EQUATION ARISING IN FRACTAL HEAT TRANSFER

Math 497C Sep 17, Curves and Surfaces Fall 2004, PSU

1 Matrix representations of canonical matrices

Physics 5153 Classical Mechanics. Principle of Virtual Work-1

Modeling curves. Graphs: y = ax+b, y = sin(x) Implicit ax + by + c = 0, x 2 +y 2 =r 2 Parametric:

An Introduction to Support Vector Machines

Modelli Clamfim Equazione del Calore Lezione ottobre 2014

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES

Reproducing Kernel Hilbert Space for. Penalized Regression Multi-Predictors: Case in Longitudinal Data

Demand. Demand and Comparative Statics. Graphically. Marshallian Demand. ECON 370: Microeconomic Theory Summer 2004 Rice University Stanley Gilbert

Economics 130. Lecture 4 Simple Linear Regression Continued

Point-based methods for estimating the length of a parametric curve

GAUSS ELIMINATION. Consider the following system of algebraic linear equations

LAPLACE TRANSFORM SOLUTION OF THE PROBLEM OF TIME-FRACTIONAL HEAT CONDUCTION IN A TWO-LAYERED SLAB

Haddow s Experiment:

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

Module 3: Element Properties Lecture 1: Natural Coordinates

18.7 Artificial Neural Networks

PART 1: VECTOR & TENSOR ANALYSIS

ON SIMPSON S INEQUALITY AND APPLICATIONS. 1. Introduction The following inequality is well known in the literature as Simpson s inequality : 2 1 f (4)

8.1 Arc Length. What is the length of a curve? How can we approximate it? We could do it following the pattern we ve used before

PHYS 705: Classical Mechanics. Calculus of Variations II

INTRODUCTION TO COMPLEX NUMBERS

Least squares cubic splines without B-splines S.K. Lucas

Statistics 423 Midterm Examination Winter 2009

ON A DETERMINATION OF THE INITIAL FUNCTIONS FROM THE OBSERVED VALUES OF THE BOUNDARY FUNCTIONS FOR THE SECOND-ORDER HYPERBOLIC EQUATION

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

CHI-SQUARE DIVERGENCE AND MINIMIZATION PROBLEM

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1

Professor Terje Haukaas University of British Columbia, Vancouver The Q4 Element

Quiz: Experimental Physics Lab-I

HAMILTON-JACOBI TREATMENT OF LAGRANGIAN WITH FERMIONIC AND SCALAR FIELD

4. More general extremum principles and thermodynamic potentials

10-801: Advanced Optimization and Randomized Methods Lecture 2: Convex functions (Jan 15, 2014)

The Quadratic Trigonometric Bézier Curve with Single Shape Parameter

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Variable time amplitude amplification and quantum algorithms for linear algebra. Andris Ambainis University of Latvia

Study of Trapezoidal Fuzzy Linear System of Equations S. M. Bargir 1, *, M. S. Bapat 2, J. D. Yadav 3 1

90 S.S. Drgomr nd (t b)du(t) =u()(b ) u(t)dt: If we dd the bove two equltes, we get (.) u()(b ) u(t)dt = p(; t)du(t) where p(; t) := for ll ; t [; b]:

Zbus 1.0 Introduction The Zbus is the inverse of the Ybus, i.e., (1) Since we know that

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Canonical transformations

6.6 The Marquardt Algorithm

Dennis Bricker, 2001 Dept of Industrial Engineering The University of Iowa. MDP: Taxi page 1

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

APPENDIX A Some Linear Algebra

Jean Fernand Nguema LAMETA UFR Sciences Economiques Montpellier. Abstract

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Numerical Heat and Mass Transfer

Lecture notes. Fundamental inequalities: techniques and applications

FTCS Solution to the Heat Equation

Calculus of Variations Basics

Numerical Analysis: Trapezoidal and Simpson s Rule

Georgia Tech PHYS 6124 Mathematical Methods of Physics I

Computation of Fifth Degree of Spline Function Model by Using C++ Programming

Transcription:

Lecture notes on Vrtonl nd Approxmte Methods n Appled Mthemtcs - A Perce UBC Lecture 4: Pecewse Cubc Interpolton Compled 6 August 7 In ths lecture we consder pecewse cubc nterpolton n whch cubc polynoml pproxmton s ssumed over ech subntervl In order to obtn suffcent nformton to determne these coeffcents, we requre contnuty of the nterpoltng polynomls n neghborng ntervls s well s the contnuty of number of dervtves Dependng on the number of dervtves tht we requre to be contnuous t the sttchng ponts we obtn dfferent pproxmton schemes n whch ddtonl dt bout the functon fx beng pproxmted mght hve to be furnshed n order tht there s suffcent dt to determne the coeffcents of the cubc polynomls Key Concepts: Pecewse cubc nterpolton, Cubc Splnes, Cubc Hermte Interpolton 4 Pecewse Cubc Interpolton 4 Degree of freedom nlyss of pecewse cubc nterpolnts Consder the domn [, b] tht s prttoned nto N ntervls hvng N + nodes nd N nternl nodes In ech of these subntervls ssume tht dfferent cubc polynoml s to be constructed Let p 3,N x be the combnton of ll these cubc polynomls We now dscuss the lterntve pproxmton schemes tht one obtns dependng on the dfferent schemes of constrnt Schemes of constrnt: Pecewse Cubc Hermte polynomls: p 3,N x nd p 3,N x re contnuous t nteror nodes There re four unknown coeffcents for ech of the N ntervls nd N constrnts due to the contnuty requrements on p 3,N x nd p 3,N x DOF : 4N N = N + specfy functon vlue nd ts dervtve t ll N + nodes Hve to specfy f & f t ll N + nodes! Cubc Splne: p 3,N x, p 3,N x, nd p 3,N x re ll contnuous t nteror ponts DOF : 4N 3N = N + 3 = N + }{{} + specfy f t ll N + nodes nd mpose EXTRA CONDITIONS The extr condtons re up to the user to prescrbe dependng on the pplcton, eg p 3x = = p 3x N whcs clled the nturl splne

4 Pecewse Cubc Hermte polynomls x = x x N = L DOF: 4N N = N + prescrbe fx nd f x t =,, N Representton of f n terms of Hermte bss functons h x nd h x: N N fx hx = fx h x + f x h x where h d x j = δ j nd dx h x j = δ j d dx h x j = h x j = Constructng bss functons on the cnoncl ntervl [, ]: = = } We use the lner Lgrnge bss functons N ξ = +ξ ξ : N ξ b = δ b, ξ,b = ± h h h Let h ξ = α ξ + β [N ξ] ; h ξ = α ξ + β[n ξ] h ξ = γ ξ + δ [N ξ] ; h ξ = γ ξ + δ [N ξ] - h ξ To fnd α, β, γ nd δ we mpose the condtons : = h = β α = h = α + β α = α β α = nd β = h ξ = 4 + ξ ξ Smlrly h ξ = 4 ξ + ξ For the dervtve bss functons = h = δ γ = h = γ δ } Smlrly h ξ = 4 ξ + ξ δ = γ = h ξ = 4 + ξ ξ

Expressons for bss functons on n rbtrry ntervl [x, x + ] Interpolton 3 Use the lner trnsformton xξ = x N ξ + x +N ξ = x ξ + x + + ξ x + x + = + x + x ξ The nverse trnsformton s: ξx = x x + x + x + x = x x + x + x + ξ = x + x + x x x + = x x x + x x + x + ξ = x + x x x ξ = x + x ξ = x + x + x x + x x Here x = x + x nd observe tht h x = [ x + x x ] x + x x 3 4 h + x = [ x + x + x] x x x 3 4 h x = x x x + x x 43 h + x = x + xx x x 44 d dξ ξ = d dx ξx dx dξ = d dx ξx x Error nvolved: For functon vlues the error s gven by: whle for dervtves the error s : fx hx f 4 x 4 384 f x h x f 4 3 x 3 6

4 43 Pecewse Cubc Splne nterpolton NDOF: 4N 3N = N + + specfy fx t x,, x N + extr condtons 43 Dervton usng Cubc Herme nterpolton Snce we hve smlr pecewse cubc polynomls to the Pecewse Cubc Hermte polynomls on ech subntervl but wth ddtonl contnuty requred t the N nteror nodes, our strtng pont s the Hermte cubc bss expnson We then mpose ddtonl condtons to mke up for the dervtves f x whch re not known or requred n the cse of splnes On [x k, x k+ ] x k x k x k+ [ x k + x x k ] x k+ x [ x k + x k+ x] x x k sx = f k x k 3 + f k+ x k 3 +s x x k x k+ x k x k + s x x k+ x x k k+ x k where the f k nd f k+ from the Hermte expnson hve been replced by the unknown qunttes s k nd s k+ whch re to be determned by system of equtons whch ensure tht x s contnuous t nternl nodes The frst nd second dervtves of sx must be contnuous t the ntereor ponts x j, j = N Contnuty of the frst dervtve s lredy obtned by our choce of bss functons So we pply contnuty of x to get equtons for the coeffcents s k Tht s, we clculte s x on the two ntervls [x k, x k ] nd [x k, x k+ ] nd requre contnuty t x k After some lgebr x k s k + x k + x k s k + x k s k+ = 3f[x k, x k+ ] x k + f[x k, x k ] x k We hve N equtons nd N + unknowns s, s,, s N so we need more condtons Sy we specfy I f = s nd s N = f N then on unform mesh x k = x: 4 s 4 s 4 4 s N = 3 f[x, x ] + f[x, x ] f[x, x 3 ] + f[x, x ] f[x N, x N ] + f[x N, x N ] s s N A trdgonl system of equtons esy to solve!

Interpolton 5 43 Alterntve cubc splne dervton for dervtve prmry vrbles y y + Y x x x + Let Y x = x x 3 + b x x + c x x + d Y x = 3 x x + b x x + c Y x = 6 x x + b y = Y x = d y + = Y x + = h 3 + b h + c + y where = x + x Let s = Y x = c s + = Y x + = 3 h + b + s Y x = b = Y x = 6 + b [ ] [ ] [ h 3 h y+ y 3h = s h ] b s + s / / = y + y s h 4 s + s h h 4 6 y { b = h 3 s + s 3h y + y s } / h 4 y+ y = h 3 + s + + s h y+ y s b = 3 + + s h s + + s = y + 6 s + s + 6 y s + s 6 y + y = s + + 4 s + 4 s + s s + + + s + s = 3f[x, x ] + f[x, x + ]

6 433 Another splne dervton wth y y y + s prmry vrbles Y x Y x Y + x x x x + Let Y x = x x 3 + b x x + c x x + d Y x = 3 x x + b x x + c Y x = 6 x x + b t x : y = Y x = d nterpoltes the functon t x 45 y + = Y x + = h 3 + b h + c + y enforce contnuty 46 Introduce prmry vrble : = Y x = b b = / 47 Buld n contnuty of Y + = Y x + = 6 + = s Impose contnuty of frst dervtves: c = y + s s + Y x = s x x 3 + s 6 x x + c x x + y s + y + = s h 3 + s 6 + c + y y+ y s + c = s s 6 h = y s + + s 6 s Y + + s 6 Y x = 3 x x + b x x + c = c x = 3 h + b + c s = 3 s 6 h + + { y 6 48 s + s 6 } or 3 + 6 + + + + = 6 y y + + + + = 6 y y =, N EXTRA CONDITIONS N EQ

434 Extr Condtons y y y n x h x x h n x N X N Nturl Splne: = = N two extr condtons Interpolton 7 h + h h h h + h h h N h N h N + h N N = 6 y y h y y h y 3 y h y y h y N y N h N y Ny N h N Clmped Splne: Specfed frst dervtves Gven f x = A nd f x n = B A = Y x = c = y y h h s + h 6 = A h + h = 6 y y h A B = Y Nx n = 3 n h n + b n h n + c n sn s n = 3 h n + s n h n + y n y n hn n + h n n 6h n h n 6 6 B y n y n = 3h n n 3h n n + 6h n n h n n h n n h n 6 B y ny n h n = h n n + h n n But h + h + h + h = 6 {[f [x, x ] f [x, x ]} h h h h + h h h n h n + h n h n h n h n N N = 6 y y /h A y y /h y y h y n y n /h n y n y n /h n B ynyn y h n

8 3 Qudrtc boundry ntervl representton = s s 6h qudrtc = N = N = n = s N s N 6h N qudrtc 3h + h h h h + h h 4 Lner extrpolton h N3 + h N h N h N h N + 3h N N = 6 f[x, x ] f[x, x ] f[x N, x N f[x N, x N ] S x S S S x x x = h + h h h = s = h h h h + h + h + h = 6f[x, x ] f[x, x ] h h + h h + h h + h + h = RHS h h h h + h h h + h + h = RHS h h +h h h h + h h h h h h + h h h h

Interpolton 9 5 Not--knot condton Y x Y x Y N x Y N x Unknowns = 4N Constrnts = 3N 3 4N 3N 3 = N + unknowns the vlues t x,, x N + + + + = 6f[x, x ] f[x, x ] Y x = x x 3 + b x x + c x x + d Y x = 3 x x + b x x + c Y x = 6 x x + b, x x = h s = Y x = 6 x x + 6h / = h + h = h + h h h h But h + h + h + h = 6f[x, x ] f[x, x ] + h h + h + h h h Also + h N h N + h N N + h N h N h N h + h = 6f[x, x ] f[x, x ] h N + h N N = 6f[x N, x N ] f[x N, x N ] + h h h + h h h h + h h h + h h 6 A perodc splne: h N h N h N + h N x + = x N x + = x N h N + h N h N h N + h N N N

III Smoothness property of nturl splne x = = x N In order to mpose ths condton t s convenent to consder the k s unknowns n whch cse the equtons become: x k k + x k + x k+ k + x k+ k+ = 6f[x k, x k+ ] f[x k, x k ] k =,, N NOTE: Importnt dentty: y [y + ] = y y + = y Let yx be ny other nterpolnt of fx t x,, x N then y dx Now dx = y dx = y s y dx + = y s = y s b b b N y dx x k y s dx = const on ech subntervl k= x k N x k c k y s botnterpolnts k= If we choose s : = = b for exmple or f y nd s botnterpolte f t nd b then y dx = y dx + x k dx dx Thus s s the nterpolnt wth the MINIMUM CURVATURE e smoothest Error nvolved n splne nterpolton: fx = sx f 4 5 x4 384 f x s x f 4 x 3 4 f x s x f 5 x 4 6 y dx = x = mx x : for nonunform ponts nd ll x [x, x N ] for nonunform ponts nd ll x [x, x N ] for unform smple ponts x cubc splne provdes n excellent technque for NUMERICAL DIFFERENTIATION

Interpolton How do we solve for the { k }? d c d c 3 d 3 d n c n n d n x x x n = b b n d d x + c x = b 4 d x + d x + c x 3 = b 4 d c x + c x 3 = b b d d d x + c x 3 = b d = d d c b = b d b Smlrly d k+x k+ + c k+ x k+ = b k+ 43 where d k+ = d k+ k+ d k c k b k+ = b k+ k+ d b k 44 k d c d c d n c n d n x x n = b b b n Bck Substtuton x n = b n/d n x n = b n c n x/d n x n = b n/d n 45 x k = b k c k x k+ /d k k = n,, 46

Note, f we let m k = k d k then A = m m n d c c n d n LU = LU Forwrd Ly = b y = L b Bck Ux = y Substtuton