Cubic Spline Interpolation by Solving a Recurrence Equation Instead of a Tridiagonal Matrix

Similar documents
Ilona V. Tregub, ScD., Professor

Chapter 3 Savings, Present Value and Ricardian Equivalence

AN IMPLEMENTATION OF BINARY AND FLOATING POINT CHROMOSOME REPRESENTATION IN GENETIC ALGORITHM

Lecture 10: What is a Function, definition, piecewise defined functions, difference quotient, domain of a function

2 r2 θ = r2 t. (3.59) The equal area law is the statement that the term in parentheses,

PHYSICS 111 HOMEWORK SOLUTION #13. May 1, 2013

Chapter 22. Outside a uniformly charged sphere, the field looks like that of a point charge at the center of the sphere.

Mechanics 1: Motion in a Central Force Field

MATHEMATICAL SIMULATION OF MASS SPECTRUM

ON THE (Q, R) POLICY IN PRODUCTION-INVENTORY SYSTEMS

An Introduction to Omega

Problem Set # 9 Solutions

TORQUE AND ANGULAR MOMENTUM IN CIRCULAR MOTION

Questions & Answers Chapter 10 Software Reliability Prediction, Allocation and Demonstration Testing

Deflection of Electrons by Electric and Magnetic Fields

Math 113 HW #5 Solutions

Financing Terms in the EOQ Model

STUDENT RESPONSE TO ANNUITY FORMULA DERIVATION

PY1052 Problem Set 8 Autumn 2004 Solutions

Voltage ( = Electric Potential )

Spirotechnics! September 7, Amanda Zeringue, Michael Spannuth and Amanda Zeringue Dierential Geometry Project

Continuous Compounding and Annualization

FXA Candidates should be able to : Describe how a mass creates a gravitational field in the space around it.

Exam 3: Equation Summary

Trading Volume and Serial Correlation in Stock Returns in Pakistan. Abstract

Displacement, Velocity And Acceleration

CLASS XI CHAPTER 3. Theorem 1 (sine formula) In any triangle, sides are proportional to the sines of the opposite angles. That is, in a triangle ABC

Instantaneous Rate of Change:

AMB111F Financial Maths Notes

2 Limits and Derivatives

INITIAL MARGIN CALCULATION ON DERIVATIVE MARKETS OPTION VALUATION FORMULAS

Research on Risk Assessment of the Transformer Based on Life Cycle Cost

Software Engineering and Development

HEALTHCARE INTEGRATION BASED ON CLOUD COMPUTING

Model Question Paper Mathematics Class XII

Section 3.3. Differentiation of Polynomials and Rational Functions. Difference Equations to Differential Equations

UNIT CIRCLE TRIGONOMETRY

Tracking/Fusion and Deghosting with Doppler Frequency from Two Passive Acoustic Sensors

Experiment 6: Centripetal Force

A Capacitated Commodity Trading Model with Market Power

The LCOE is defined as the energy price ($ per unit of energy output) for which the Net Present Value of the investment is zero.

Physics 235 Chapter 5. Chapter 5 Gravitation

The transport performance evaluation system building of logistics enterprises

Vector Calculus: Are you ready? Vectors in 2D and 3D Space: Review

The Role of Gravity in Orbital Motion

Gauss Law. Physics 231 Lecture 2-1

Semipartial (Part) and Partial Correlation

Supplementary Material for EpiDiff

An application of stochastic programming in solving capacity allocation and migration planning problem under uncertainty

Risk Sensitive Portfolio Management With Cox-Ingersoll-Ross Interest Rates: the HJB Equation

Development of Canned Cycle for CNC Milling Machine

est using the formula I = Prt, where I is the interest earned, P is the principal, r is the interest rate, and t is the time in years.

(a) The centripetal acceleration of a point on the equator of the Earth is given by v2. The velocity of the earth can be found by taking the ratio of

On Some Functions Involving the lcm and gcd of Integer Tuples

Tangent Lines and Rates of Change

Valuation of Floating Rate Bonds 1

M(0) = 1 M(1) = 2 M(h) = M(h 1) + M(h 2) + 1 (h > 1)

How To Find The Optimal Stategy For Buying Life Insuance

SAT Subject Math Level 1 Facts & Formulas

Sections 3.1/3.2: Introducing the Derivative/Rules of Differentiation

Uniform Rectilinear Motion

PAN STABILITY TESTING OF DC CIRCUITS USING VARIATIONAL METHODS XVIII - SPETO pod patronatem. Summary

The Detection of Obstacles Using Features by the Horizon View Camera

Geometric Stratification of Accounting Data

An Epidemic Model of Mobile Phone Virus

ACT Math Facts & Formulas

Multiple choice questions [70 points]

A framework for the selection of enterprise resource planning (ERP) system based on fuzzy decision making methods

4a 4ab b (count number of places from first non-zero digit to

FI3300 Corporate Finance

Lab #7: Energy Conservation

1D STEADY STATE HEAT

Lecture 16: Color and Intensity. and he made him a coat of many colours. Genesis 37:3

1.6. Analyse Optimum Volume and Surface Area. Maximum Volume for a Given Surface Area. Example 1. Solution

Problems of the 2 nd and 9 th International Physics Olympiads (Budapest, Hungary, 1968 and 1976)

Financial Derivatives for Computer Network Capacity Markets with Quality-of-Service Guarantees

Gravitation. AP Physics C

The Electric Potential, Electric Potential Energy and Energy Conservation. V = U/q 0. V = U/q 0 = -W/q 0 1V [Volt] =1 Nm/C

Coordinate Systems L. M. Kalnins, March 2009

Voltage ( = Electric Potential )

Optimal Capital Structure with Endogenous Bankruptcy:

YARN PROPERTIES MEASUREMENT: AN OPTICAL APPROACH

STABILITY ANALYSIS IN MILLING BASED ON OPERATIONAL MODAL DATA 1. INTRODUCTION

Chapter 7 Numerical Differentiation and Integration

Reduced Pattern Training Based on Task Decomposition Using Pattern Distributor

Symmetric polynomials and partitions Eugene Mukhin

Modal Characteristics study of CEM-1 Single-Layer Printed Circuit Board Using Experimental Modal Analysis

9:6.4 Sample Questions/Requests for Managing Underwriter Candidates

PORTFOLIO OPTIMIZATION WHEN ASSET RETURNS HAVE THE GAUSSIAN MIXTURE DISTRIBUTION

Memory-Aware Sizing for In-Memory Databases

30 H. N. CHIU 1. INTRODUCTION. Recherche opérationnelle/operations Research

12. Rolling, Torque, and Angular Momentum

12.1. FÖRSTER RESONANCE ENERGY TRANSFER

Transcription:

Matematical Metods in Science and Engineeing Cubic Spline Intepolation by Solving a Recuence Equation Instead of a Tidiagonal Matix Pete Z Revesz Depatment of Compute Science and Engineeing Univesity of Nebaska-Lincoln Lincoln, Nebaska 68588-0115 Email: evesz@cseunledu ttp://cseunledu/evesz Telepone: 1+ 40 47 488 Abstact Te cubic spline intepolation metod is pobably te most widely-used polynomial intepolation metod fo functions of one vaiable Howeve, te cubic spline metod equies solving a tidiagonal matix-vecto equation wit an On computational time complexity wee n is te numbe of data measuements Even an On time complexity may be too muc in some time-ciitical applications, suc as continuously estimating and updating te fligt pats of moving objects Tis pape sows tat unde cetain bounday conditions te tidiagonal matix solving step of te cubic spline metod could be entiely eliminated and instead te coefficients of te unknown cubic polynomials can be found by solving a single ecuence equation in muc faste time I INTRODUCTION Cubic spline intepolation is a widely-used polynomial intepolation metod fo functions of one vaiable [] Cubic splines can be descibed as follows Let f be a function fom R to R Suppose we know about f only its value at locations x 0 < < x n Let fx i = a i Piecewise cubic spline intepolation of f is te poblem of finding te b i, c i and d i coefficients of te cubic polynomials S i fo 0 i n 1 witten in te fom: S i x = a i + b i x x i + c i x x i + d i x x i 1 wee eac piece S i intepolates te inteval [x i, x i+1 ] and fits te adjacent pieces by satisfying cetain smootness conditions Taking once and twice te deivative of Equation 1 yields, espectively te equations: S ix = b i + c i x x i + d i x x i S i x = c i + 6d i x x i Equations 1- imply tat S i x i = a i, S i x i = b i and S i x i = c i Fo a smoot fit between te adjacent pieces te cubic spline intepolation equies tat te following conditions old fo 0 i n : S i x i+1 = S i+1 x i+1 = a i+1, 4 S ix i+1 = S i+1x i+1 = b i+1 5 S i x i+1 = S i+1x i+1 = c i+1 6 Tis pape is oganized as follows Section II eview te usual solution fo cubic splines by solving a tidiagonal matix Section?? II THE TRIDIAGONAL MATRIX-BASED SOLUTION In tis section we eview te usual tidiagonal matix-based solution fo cubic splines Let i = x i+1 x i Substituting Equations 1- into Equations 4-6, espectively, yields: a i + b i i + c i i + d i i = a i+1 7 b i + c i i + d i i = b i+1 8 c i + d i i = c i+1 9 Equation 9 yields a value fo d i, wic we can substitute into Equations 7-8 Hence Equations 7-9 can be ewitten as: a i+1 a i = b i i + c i + c i+1 i 10 b i+1 b i = c i + c i+1 i 11 d i = 1 i c i+1 c i 1 Solving Equation 10 fo b i yields: b i = a i+1 a i 1 c i + c i+1 i 1 i wic implies fo j n te condition: 1 b i+1 = a i+ a i+1 c i+1 + c i+ i+1 14 i+1 ISBN: 978-1-61804-56-9 1

Matematical Metods in Science and Engineeing Substituting into Equation 11 te values fo b i and b i+1 fom Equations 1-14 yields: a i+1 a i 1 c i + c i+1 i i + c i + c i+1 i = 1 a i+ a i+1 c i+1 + c i+ i+1 i+1 Te above can be ewitten as: i c i + i + i+1 c i+1 + i+1 c i+ = a i + a i+1 + a i+ i i i+1 i+1 Te above olds fo 0 i n Howeve, canging te index downwad by one te following olds fo 1 j n : i 1 c i 1 + i 1 + i c i + i c i+1 = a i 1 + a i + a i+1 15 i 1 i 1 i i Te above is a system of n 1 linea equations fo te unknowns c i fo 0 i n By Equation S 0 x 0 = and by extending Equation 6 to j = n 1, S n 1x n = c n Te cubic spline intepolation allows us to specify seveal possible bounday conditions egading te values of, c n A commonly used bounday condition called a natual cubic spline assumes tat = c n = 0, wic is equivalent to setting te second deivative of te splines at te ends to zeo Altenatively, in te clamped cubic spline intepolation, te assumed bounday condition is b 0 = f x 0 and b n = f x n wee te deivatives of te f at x 0 and x n ae known constants In addition, in sovling a cubic spline a unifom sampling is also commonly assumed and available, tat is, eac i as te same constant value Ten dividing Equation 15 by yields: c i 1 + 4c i + c i+1 = a i 1 a i + a i+1 16 Since te values of a i ae known, te values of c i can be found by solving te tidiagonal matix-vecto equation Ax = B Unde te natual cubic spline intepolation, we ave: 1 0 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 1 te vecto of unknowns is: c 1 x = c n and te vecto of constants is: 0 a 0 a 1 + a B = a n a n 1 + a n 0 Similaly, unde te clamped spline intepolation we ave: 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 te same vecto of unknowns: c 1 x = c n and te following vecto of constants: a 1 a 0 f x 0 a 0 a 1 + a B = a n a n 1 + a n f x n a n a n 1 Bot te natual cubic spline and te clamped cubic spline bounday conditions yield a system of n + 1 linea equations wit only n + 1 unknowns Suc a system nomally yields a unique solution except in some special cases Moeove, eite system is a tidiagonal matix sytem tat can be solved in On time Once te c i values ae found, te d i and te b i values also can be found by Equations 1 and 1, espectively Computating te b i and d i coefficients can be done also witin On time III A NEW RECURRENCE EQUATION-BASED SOLUTION In ou solution to te cubic spline intepolation poblem, we cose a bounday condition tat equies solving te following tidiagonal system wee x i ae ational vaiables, d i ae ational constants and 0 is a ational constant, and A is: ISBN: 978-1-61804-56-9

Matematical Metods in Science and Engineeing 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 1 Futemoe, x = x 1 x x n 1 x n and b = e 1 e e n 1 e n A Relationsip to Clamped and Natual Cubic Splines Ou new matix is closely elated to clamped cubic splines Conside te fist equation fo te clamped cubic spline, wic can be witten as: + c 1 = a 1 a 0 f x 0 Te above equation becomes te following afte multiplying by /: + c 1 = a 1 a 0 f x 0 Adding 1 /c 1 yields: + c 1 = a 1 a 0 f x 0 + 1 c 1 Hence te fist ow of ou new matix A is equivalent to fist ow of te clamped cubic spline fo any 0 if e 1 is: e 1 = a 1 a 0 f x 0 + 1 c 1 wee c 1 is an estimate fo te value of c 1 Te last ow of te new matix allows fixing te value of c n Tis is a genealization of natual cubic spline wic fixes te value to be 0 B A Recuence Equation-Based Solution In tis section, we solve te new system using te value = + 7 In tat case, te fist tee equations can be witten as: x 1 + x = e 1 x 1 + 4x + x = e x + 4x + x 4 = e Multiplying te second ow by, subtacting fom it te fist ow, and ten dividing it by gives: x 1 + x = e 1 x + x = e e 1 x + 4x + x 4 = e Multiplying now te tid ow by, subtacting fom it te second ow, and ten dividing it by gives: x 1 + x = e 1 x + x = e e 1 x + x 4 = e e + e 1 Continuing tis pocess until te last ow, we get: x n + x n = e n en 4 x n + x n 1 = e n en x n 1 + x n = e n 1 en x n = e n + en 5 n 4 e1 + 1 n 4 + en 4 n e1 + 1 n + en n e1 + 1 n Dividing eac ow except te last one by yields: x n + xn x n + xn 1 x n 1 + xn x n = en = en = en 1 = e n en 4 n 4 e1 + + 1 n en en + en 4 n e1 + 1 n + en n e1 + 1 n 1 Note tat eac ow 1 i n 1 will be te following: x i + x i 1 = 1 k e i k k+1 0 k i 1 We define te values fo α 0, α i fo 1 < i n 1, and α n, espectively, as follows: α 0 = 0 α i = e i α i 1 = 0 k i 1 1 k e i k k+1 α n = e n 17 Te solution to te linea equation system can be descibed in tems of te α constants as follows: ISBN: 978-1-61804-56-9

Matematical Metods in Science and Engineeing x n = α n α n x n = α n α n 1 x n 1 = α n 1 α n x n = α n + α n 1 + α n α n Teefoe, x i fo eac ow 1 i n will be: x n = α n 18 x i = α i 1 x i+1 Te above can be solved in closed fom as follows: x i = 0 k n i k 1 α i+k 19 Note tat no matte wat exactly ae te initial values fo e, we ave pe-solved te system Tis can lead to a faste evaluation of te cubic spline tan solving te tidiagonal system eac time We need only On multiplications and subtactions to compute te values of all te x i Moeove, wen any new measuement is made, te conventional tidiagonal matix-based algoitm equies a complete edo of te entie computation in On time In contast, Equation 18 leads to a faste update because to eac x i fo i n we need to add only te tem: n+1 i 1 α n+1 We also need to make x n+1 = α n+1 Aftewad updating te ote α i constants can be done also similaly efficiently C A Moving Object Example Suppose tat an object is eleased fom a eigt of 400 feet wit zeo initial velocity Suppose also tat we measue te object s position to be 84, 6 and 56 feet fom eat at one, two and tee seconds afte elease We also suspect tat te object is in fee fall wit a gavitational acceleation of ft/sec at one second afte elease and at tee seconds afte elease Find a cubic spline appoximation fo te object s position at all times fom te elease to tee seconds afte We will measue te distance taveled fom te elease point Te cubic polynomials we need to find fo te intevals [0, 1], [1, ] and [, ] can be expessed as follows: S 0 x = a 0 + b 0 x + x + d 0 x S 1 x = a 1 + b 1 x 1 + c 1 x 1 + d 1 x 1 S x = a + b x + c x + d x We ave n = 4, a 0 = 400, a 1 = 84, a = 6, a = 56 and te unifom step size is = 1 By ou assumptions of zeo initial velocity f 0 = 0 and fee fall at one second c 1 = 16 and fee fall at fou seconds c = 16, wic implies e 4 = 16 Te matix A and te vectos x and B ae: 1 0 0 1 4 1 0 0 1 4 1, x = 0 0 0 1 because B = e 1 e e e 4 By Equation 17, we ave: c 1 c c and B = 16 16 96 96 16 1 16 + 16 = 400 84 + 6 84 6 + 56 16 α 1 = e 1 α = e α 1 α = e α = 16 16 α 4 = e 4 = 16 = 16 16 = 16 16 By Equation 18 we also ave wen calculating in evese ode: c = α 4 = 16 c = α c = 16 c 1 = α c = 16 = α 1 c 1 = 16 Solving fo te b i coefficients by Equation 1 gives: ISBN: 978-1-61804-56-9 4

Matematical Metods in Science and Engineeing b 0 = 1 1 84 400 1 16 = 0 b 1 = 1 1 6 84 1 16 = b = 1 1 56 6 1 16 = 64 Solving fo te d i coefficients by Equation 1 gives: d 0 = 1 16 16 = 0 d 1 = 1 16 16 = 0 d = 1 16 16 = 0 Te above values sow tat an object in fee fall as an inceasing velocity but its acceleation emains constant Using te above values, te cubic spine intepolation can be descibed as: S 0 x = 400 16x S 1 x = 84 x 1 16x 1 = 400 16x S x = 6 64x 16x = 400 16x Hence in eac piece te cubic spline intepolation gives 400 16x, wic agees wit te expected pysics equation fo te position of a moving object tat stats wit zeo velocity fom an elevation of 400 feet and feely falls downwad wit an acceleation of ft/sec IV CONCLUSION Te geneal metod descibed in tis pape can be used in a wide vaiety of applications wic equie intepolation of a function of one vaiable Fo example, intepolation of measuement data can geneate constaint databases tat can be efficiently queied using constaint quey languages [5], [6] Te simple one-vaiable function intepolation can be also extended to ige dimensions yielding intepolations of ige-dimensional functions tat descibe sufaces [4] and tee-dimensional spatio-tempoal o moving objects [1], [] Tis extension emains an inteesting futue wok REFERENCES [1] S Andeson and P Z Revesz, Efficient MaxCount and tesold opeatos of moving objects, Geoinfomatica, 1 4, 55 96, 009 [] R L Buden and J D Faies, Numeical Analysis, 9t ed New Yok, USA: Spinge, 014 [] J Comicki and P Z Revesz, Constaint-based inteopeability of spatiotempoal databases, Geoinfomatica,, 11-4, 1999 [4] L Li and P Z Revesz, Intepolation metods fo spatio-tempoal geogapic data, Computes, Envionment and Uban Systems, 8, 01-7, 004 [5] P C Kanellakis, G M Kupe and P Z Revesz, Constaint quey languages, Jounal of Compute and System Sciences, 51 1, 6-5, 1995 [6] P Z Revesz, Intoduction to Databases: Fom Biological to Spatio- Tempoal, New Yok, USA: Spinge, 010 ISBN: 978-1-61804-56-9 5