SlideShare a Scribd company logo
1 of 7
Download to read offline
CONFERENCE ON
NUMERICAL METHODS IN ENGINEERING PROBLEMS.
INTEVEP Headquarters. Los Teques, July 15-17. 1991.
Edo. Miranda, Venezuela.
FREE ORDER POLYNOMIAL INTERPOLATION ALGORITHM
ANDRES L. GRANADOS M.
INTEVEP, S.A. Production Department (EPPR/32).
Venezuela Government Research Facility for Petroleum Industry.
Los Teques, Estado Miranda. Venezuela.
ABSTRACT.-
A polynomial interpolation algorithm is developed using the Newton’s divided-difference inter-
polating polynomials. The definition of monotony of a function is then used to define the least degree
of the polynomial to make efficient and consistent the interpolation in the discrete given function. The
relation between the order of monotony of a particular function and the degree of the interpolating poly-
nomial is justified, analyzing the relation between the derivatives of such function and the truncation
error expression. In this algorithm there is not matter about the number and the arrangement of the
data points, neither if the points are regularly spaced or not. The algorithm thus defined can be used
to make interpolations in functions of one and several dependent variables. The algoritm automatically
select the data points nearest to the point where an interpolation is desired, following the criterion of
symmetry. Indirectly, the algorithm also select the number of data points, which is a unity higher than
the order of the used polynomial, following the criterion of monotony. Finally, the complete algoritm is
presented and subroutines in fortran code is exposed as an addendum. Notice that there is not the degree
of the interpolating polynomial within the arguments of such subroutines.
INTRODUCTION
It has been developed an interpolation algorithm using polynomy of Newton in divided differ-
ences. To increase the efficiency of interpolation it has been used two criteria that make the interpolation
the most consistent possible with the given discrete points. These criterions are symmetry and Monotony,
when applied accordingly, permits to determine the order of the optimum polynomy used during a inter-
polation.
POLYNOMIAL OF INTERPOLATION
Let be (x0, f(x0)), (x1, f(x1)), (x2, f(x2)) until (xn, f(xn)) the n+1 discrete points that represent
a function y = f(x). As is well known, there exist a unique polynomial y = Pn(x) of n-degree, which pass
over the n+1 mentioned points. These polynomials are adequate to perform estimartions of the function
y = f(x) for any value x belonging to the interval [x0, x1, x2, x3, . . . , xn] containing all the points, being
the values xi not necessarily ordered, nor having repeted values. We name to this process “Interpolation”.
If the value of x is outside of the interval of points the process is named “Extrapolation”.
Divided Difference
The divided differences [Carnahan et al.,1969] symbolized by f[ · ] is defined in a recurrent
manner in the following form
f[x0] = f(x0) (1.a)
f[x1, x0] =
f[x1] − f[x0]
x1 − x0
(1.b)
f[x2, x1, x0] =
f[x2, x1] − f[x1, x0]
x2 − x0
(1.c)
f[x3, x2, x1, x0] =
f[x3, x2, x1] − f[x2, x1, x0]
x3 − x0
(1.d)
f[xn, xn−1, . . . , x1, x0] =
f[xn, xn−1, . . . , x2, x1] − f[xn−1, xn−2, . . . , x1, x0]
xn − x0
(1.e)
The divided differences satisfy the property
f[xn, xn−1, . . . , x1, x0] = f[x0, x1, . . . , xn−1, xn] ∀n ∈ N (2)
This property, expressed for any n, what means is that, regardless the ordering of these values xi within
the argument of a divided difference, the result is always the same. Said in concise form, the divide
2
difference is invariant after permutations of its arguments. This property made it adequated for the
calculations, as we shall see later.
A way to express every posible divided difference generated by, for example, the set of four
points (x0, f(x0)), (x1, f(x1), (x2, f(x2)), (x3, f(x3)) and (x4, f(x4)), not necessarily ordered, is what
we denominate Lozenge Diagram of divided differences. For our proposed example, we have the lozenge
diagram represented as
x0 f[x0]
f[x0, x1]
x1 f[x1] f[x0, x1, x2]
f[x1, x2] f[x0, x1, x2, x3]
x2 f[x2] f[x1, x2, x3] f[x0, x1, x2, x3, x4]
f[x2, x3] f[x1, x2, x3, x4]
x3 f[x3] f[x2, x3, x4]
f[x3, x4]
x4 f[x4]
(3)
One may observe that for obtaining every divided difference located in a vertex of an imaginary triangle, is
sufficient to calculate the difference of the contiguous divided differences and divide them by the difference
of the extreme values of x in the base of such triangle.
Algebraic Manipulation of differences of increasing orders results, by mean of induction, in a
similar symetrical form for the k-divided-difference, in terms of its arguments and the functional values
f(xi). This symetrical form may be described in a compact manner by
f[x0, x1, x2, . . . , xk−1, xk] =
k
i=0
f(xi)
k
j=0
j=i
(xi − xj)
(4)
For regular intervals in x, where the values xi are ordered, we define the forward difference ∆k
fi,
such that
∆k
fi = k! hk
f[xi, xi+1, xi+2, . . . , xi+k−1, xi+k] (5)
where h is the size of the interval in x for consecutive points (h = xi+1 − xi). They are ordered in a
lozenge diagram as before, but they are not divided, that is why the factor k! hk
.
Newton Polynomials
The Newton polynomials Pn(x) of degree n in divided differenes [Carnahan et al.,1969], as said
before, permit to make estimations of the function y = f(x) of intermediate points by the formula
f(x) = Pn(x) + Rn(x) (6)
3
where Pn(x) is the polynomial of degree n
Pn(x) =f[x0] + (x − x0) f[x0, x1] + (x − x0)(x − x1) f[x0, x1, x2] + · · ·
+ (x − x0)(x − x1)(x − x2) · · · (x − xn−1) f[x0, x1, x2, . . . , xn−1, xn]
=
n
k=0
k−1
j=0
(x − xj) f[x0, x1, x2, . . . , xk−1, xk] (7)
and the function Rn(x) is the error committed in the interpolation
Rn(x) =
n
j=0
(x − xj) f[x0, x1, x2, . . . , xn−1, xn, x]
=
n
j=0
(x − xj)
f(n+1)
(ξ)
(n + 1)!
ξ ∈ [x0, x1, . . . , xn−1, xn] (8)
being ξ the value between the lower and the higher of the values {x0, x1, . . . , xn−1, xn}. Naturaly Rn(xi) =
0 for i = 1, 2, 3, . . ., n, since the polynomial pass over every one of the points (xi, f(xi)). When high limit
of a producto is less than the low limit, as occur in the first therm of (7), the result is one.
A simple example is the parabola that pass over three points (a, f(a)), (b, f(b)) y (c, f(c))
P2(x) = f[a] + (x − a)f[a, b] + (x − a)(x − b)f[a, b, c] (9)
where f[a, b] if the slope between points a y b and f[a, b, c] is the curvature of the parabola, if positive is
upward opened, if negative is downward opened.
For regular intervals, the polynomial of Newton in divided difference (7) becomes in
Pn(x) =
n
k=0
s
k
∆k
f0 (10)
denominated forward Newton-Gregory polynomial and where the combinatorial number means
s
k
=
Γ(s + 1)
Γ(s − k + 1) Γ(k + 1)
s =
x − x0
h
(11)
4
Particularly, Γ(k + 1) = k! for k being a positive integer and, although the function Γ(s) is not always a
factorial, it is satisfied Γ(s+1)/Γ(s−k+1) = s(s−1)(s−2) . . . (s−k +1) [Gerald,1970]. The expression
(10) was obtained by substitution of
k−1
j=0
(x − xj) = hk Γ(s + 1)
Γ(s − k + 1)
= k! hk s
k
(12)
and (5), solving f[ · ] for i = 0, in (7).
For regular intervals, the error (8) becomes in
Rn(x) =
s
n + 1
hn+1
f(n+1)
(ξ) ξ ∈ [x0, x1, . . . , xn−1, xn] (13)
being ξ the same as before. The polynomials for regular intervals are shown here only for reference. In
general, the data used for interpolation are not ordered, nor are regular. At last we use polynomials in
divided difference for the reason aditionally justified in continuation.
Lagrange Polynomials
The polynomial of Lagrange [Hildebrand,1956] is other form to express the same polynomial
Pn(x) from the equation (7), but through (4). In such a way we have [Carnahan et al.,1969]
Pn(x) =
n
i=0
Li(x) f(xi) (14)
where
Li(x) =
n
j=0
j=i
(x − xj)
(xi − xj)
(15)
The error Rn(x) continuous being the same as expresion (8). Every functional value f(xi) included in the
expresion (14) es multiplied by Li(x), which are all polynomials of degree n. For this reason receive the
name of Lagrange multiplier. An inconvenience that have these Lagrange polynomials is that, to increase
the degree in one unit, implies a cumbersome process of appending an additional factor for each multiplier
(products), and then calculate all again. This inconvenience is not presented in Newton polynomials,
where to increase the degree one unit, involves only to add a point and calculate a additional term (sums),
and all the calculations done before may be reused.
5
CRITERIA FOR INTERPOLATION
In continuation there are decribed two criteria used in the algorithm: symmetry and monotony.
Then is formulated how they are coupled in the algorithm.
symmetry
El criterion of symmetry consist in choosing the distribution of points as simetrically as possible,
around where a interpolation is desired. This may be done in two ways: by the number of points, or
the distance of influence, at each side of the target. In the case of irregular interval, the second option
becomes in a criterion of proximity. In the case of regular intervals one of the ways implies the other.
In any way, the number of proximate points is determined by the criterion of monotony describe below.
In the extreme of the interval containing the points, sometimes it is imposible to follow the criterion of
symmetry estrictly, then it is necessary in its place to follow the criterion of proximity, if you want to
reach a higher order of monotony as is explained below.
The criterion of symmetry has another advantage. For example, in the finite difference central
scheme the presented formulations have a lower error, than when they are not, inclusively using the same
number of points.
Monotony
The criterion of monotony is based in the definition of monotony of a funtion: A function is said
to have a monotony of order m, in a determined interval, if all the derivatives up to that order conserve
always its sign in such an interval. In others words, a continuous function y = f(x) is monotonic of order
m in an interval [a, b], if
f (x) = 0 f (x) = 0 f (x) = 0 · · · f(m)
(x) = 0 for all x ∈ [a, b]
f(m+1)
(x) = 0 for some x ∈ [a, b]
(16)
In the example shown in (9), la parabola has monotony of order 2 in the intervals (−∞, v) and (v, ∞),
separately, where v = 1
2 { a + b − f[a, b]/f[a, b, c] } is the location of the vertex of that parabola.
The divided difference are proportional to the derivatives in its surround, as it is indicated in
the next relation coming from (8)
f[x0, x1, x2, . . . , xn−1, xn, x] =
f(n+1)
(ξ)
(n + 1)!
ξ ∈ [x0, x1, . . . , xn−1, xn, x] (17)
6
For this, the criterion of monotony implies to choose the highest order in the divided difference with equal
sign by columns in the lozenge diagram. The last divided difference to avoid from here, together with the
last point that originates it, should have the opposite sign of all the rest of divided difference of the same
order (same column) in the vicinity. This means that the criterion of monotony accepts polynomials up
to degree m. The lack of monotony in the interpolations implies that it may be produced undesirable
oscillations of the functions around or within the given points. As the last added point is the farest, there
is not inconvenience to leave it (not recommended), since the calculations are already done and are of the
last order in the error. As more similar are the monotony of the dicrete function and the interpolation
polynomial, as in the same weight the interpolation will be more consistent.
Algorithm
The criteria of symmetry and monotony are complementary to indicate which points and how
many of them must be used in the interpolation. In any way, the degree of the polynomial will be a unit
less than the number of used points. The algorithm may be resumed in the following manner: select the
nearest points where the interpolation is desired in a simetrical (or proximate) number (distance), one by
one (calculating every time all the diagonal of divided difference up to the vertex), until such a number
of point, reflected in the divided difference, conserve the maximum possible order of monotony of the
interpolation polynomial equal to the monotony of the dicrete function.
The aforementioned explained algorithm may be used to do interpolations in one or several
dimensions. Also permits the interpolation without the necessity of pre-ordering the used points or pre-
select their number. In several dimensions the only requirement is that the function values will be for
the same and for all the discrete points in each dimension. The algorithm neither need to select a degree
of polynomial anticipatively, during the process of interpolation. The algorithm decides the optimum
degree of the polynomial that guarantees the satisfaction of the critera of symmetry and monotony.
REFERENCES
• Carnahan, B.; Luther, H. A.; Wilkes, J. O. Applied Numerical Methods. John Wiley &
Sons (New York), 1969.
• Gerald, C. F. Applied Numerical Analysis, 2nd
Edition. Addison-Wesley (New York), 1970.
• Hildebrand, F. B. Introduction to Numerical Analysis. McGraw-Hill (New York),1956.
ADDENDUM
Please ask for the FORTRAN code at e-mails: agrana@usb.ve granados.al@gmail.com
7

More Related Content

What's hot

Presentation on Matlab pde toolbox
Presentation on Matlab pde toolboxPresentation on Matlab pde toolbox
Presentation on Matlab pde toolboxSolaman Badsha
 
Probability mass functions and probability density functions
Probability mass functions and probability density functionsProbability mass functions and probability density functions
Probability mass functions and probability density functionsAnkit Katiyar
 
A Geometric Note on a Type of Multiple Testing-07-24-2015
A Geometric Note on a Type of Multiple Testing-07-24-2015A Geometric Note on a Type of Multiple Testing-07-24-2015
A Geometric Note on a Type of Multiple Testing-07-24-2015Junfeng Liu
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Asad Ali
 
Problem_Session_Notes
Problem_Session_NotesProblem_Session_Notes
Problem_Session_NotesLu Mao
 
Polynomial functions modelllings
Polynomial functions modelllingsPolynomial functions modelllings
Polynomial functions modelllingsTarun Gehlot
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlabZunAib Ali
 
Discrete Random Variables And Probability Distributions
Discrete Random Variables And Probability DistributionsDiscrete Random Variables And Probability Distributions
Discrete Random Variables And Probability DistributionsDataminingTools Inc
 
Applications of Differentiation
Applications of DifferentiationApplications of Differentiation
Applications of DifferentiationJoey Valdriz
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equationsvansi007
 

What's hot (19)

Presentation on Matlab pde toolbox
Presentation on Matlab pde toolboxPresentation on Matlab pde toolbox
Presentation on Matlab pde toolbox
 
Probability mass functions and probability density functions
Probability mass functions and probability density functionsProbability mass functions and probability density functions
Probability mass functions and probability density functions
 
A Geometric Note on a Type of Multiple Testing-07-24-2015
A Geometric Note on a Type of Multiple Testing-07-24-2015A Geometric Note on a Type of Multiple Testing-07-24-2015
A Geometric Note on a Type of Multiple Testing-07-24-2015
 
Probability distributionv1
Probability distributionv1Probability distributionv1
Probability distributionv1
 
Chapter 3 roots of equations
Chapter 3 roots of equationsChapter 3 roots of equations
Chapter 3 roots of equations
 
Estimationtheory2
Estimationtheory2Estimationtheory2
Estimationtheory2
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
Problem_Session_Notes
Problem_Session_NotesProblem_Session_Notes
Problem_Session_Notes
 
Polynomial functions modelllings
Polynomial functions modelllingsPolynomial functions modelllings
Polynomial functions modelllings
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlab
 
Numerical Method 2
Numerical Method 2Numerical Method 2
Numerical Method 2
 
Linear regression
Linear regressionLinear regression
Linear regression
 
patel
patelpatel
patel
 
Frobenious theorem
Frobenious theoremFrobenious theorem
Frobenious theorem
 
Discrete Random Variables And Probability Distributions
Discrete Random Variables And Probability DistributionsDiscrete Random Variables And Probability Distributions
Discrete Random Variables And Probability Distributions
 
Applications of Differentiation
Applications of DifferentiationApplications of Differentiation
Applications of Differentiation
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equations
 
Presentation aust final
Presentation aust finalPresentation aust final
Presentation aust final
 

Viewers also liked

A tale of two factors: MFA with CAS
A tale of two factors: MFA with CASA tale of two factors: MFA with CAS
A tale of two factors: MFA with CASMisagh Moayyed
 
CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015Misagh Moayyed
 
CAS State of the Project 2016
CAS State of the Project 2016CAS State of the Project 2016
CAS State of the Project 2016Misagh Moayyed
 

Viewers also liked (6)

CAS IU Presentation
CAS IU PresentationCAS IU Presentation
CAS IU Presentation
 
A tale of two factors: MFA with CAS
A tale of two factors: MFA with CASA tale of two factors: MFA with CAS
A tale of two factors: MFA with CAS
 
CAS MFA 2014 Update
CAS MFA 2014 UpdateCAS MFA 2014 Update
CAS MFA 2014 Update
 
CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015
 
CAS State of the Project 2016
CAS State of the Project 2016CAS State of the Project 2016
CAS State of the Project 2016
 
Single Sign-On Best Practices
Single Sign-On Best PracticesSingle Sign-On Best Practices
Single Sign-On Best Practices
 

Similar to Paper06

Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementationQuasar Chunawala
 
this materials is useful for the students who studying masters level in elect...
this materials is useful for the students who studying masters level in elect...this materials is useful for the students who studying masters level in elect...
this materials is useful for the students who studying masters level in elect...BhojRajAdhikari5
 
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdfa) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdfpetercoiffeur18
 
Numarical values
Numarical valuesNumarical values
Numarical valuesAmanSaeed11
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlightedAmanSaeed11
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Interpolation
InterpolationInterpolation
InterpolationCAALAAA
 
Probability and Statistics
Probability and StatisticsProbability and Statistics
Probability and StatisticsMalik Sb
 
Module 2 Lesson 2 Notes
Module 2 Lesson 2 NotesModule 2 Lesson 2 Notes
Module 2 Lesson 2 Notestoni dimella
 
Function an old french mathematician said[1]12
Function an old french mathematician said[1]12Function an old french mathematician said[1]12
Function an old french mathematician said[1]12Mark Hilbert
 
Doe02 statistics
Doe02 statisticsDoe02 statistics
Doe02 statisticsArif Rahman
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlabsheetslibrary
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Statistical Inference Part II: Types of Sampling Distribution
Statistical Inference Part II: Types of Sampling DistributionStatistical Inference Part II: Types of Sampling Distribution
Statistical Inference Part II: Types of Sampling DistributionDexlab Analytics
 
Probability distribution
Probability distributionProbability distribution
Probability distributionManoj Bhambu
 

Similar to Paper06 (20)

Es272 ch5b
Es272 ch5bEs272 ch5b
Es272 ch5b
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementation
 
Lagrange’s interpolation formula
Lagrange’s interpolation formulaLagrange’s interpolation formula
Lagrange’s interpolation formula
 
this materials is useful for the students who studying masters level in elect...
this materials is useful for the students who studying masters level in elect...this materials is useful for the students who studying masters level in elect...
this materials is useful for the students who studying masters level in elect...
 
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdfa) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
 
Numarical values
Numarical valuesNumarical values
Numarical values
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlighted
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Interpolation
InterpolationInterpolation
Interpolation
 
Probability and Statistics
Probability and StatisticsProbability and Statistics
Probability and Statistics
 
stochastic notes
stochastic notes stochastic notes
stochastic notes
 
Module 2 Lesson 2 Notes
Module 2 Lesson 2 NotesModule 2 Lesson 2 Notes
Module 2 Lesson 2 Notes
 
Congress
Congress Congress
Congress
 
Function an old french mathematician said[1]12
Function an old french mathematician said[1]12Function an old french mathematician said[1]12
Function an old french mathematician said[1]12
 
Doe02 statistics
Doe02 statisticsDoe02 statistics
Doe02 statistics
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlab
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Statistical Inference Part II: Types of Sampling Distribution
Statistical Inference Part II: Types of Sampling DistributionStatistical Inference Part II: Types of Sampling Distribution
Statistical Inference Part II: Types of Sampling Distribution
 
Probability distribution
Probability distributionProbability distribution
Probability distribution
 
Lecture Notes In Algebra
Lecture Notes In AlgebraLecture Notes In Algebra
Lecture Notes In Algebra
 

Recently uploaded

Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Recently uploaded (20)

Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

Paper06

  • 1. CONFERENCE ON NUMERICAL METHODS IN ENGINEERING PROBLEMS. INTEVEP Headquarters. Los Teques, July 15-17. 1991. Edo. Miranda, Venezuela. FREE ORDER POLYNOMIAL INTERPOLATION ALGORITHM ANDRES L. GRANADOS M. INTEVEP, S.A. Production Department (EPPR/32). Venezuela Government Research Facility for Petroleum Industry. Los Teques, Estado Miranda. Venezuela. ABSTRACT.- A polynomial interpolation algorithm is developed using the Newton’s divided-difference inter- polating polynomials. The definition of monotony of a function is then used to define the least degree of the polynomial to make efficient and consistent the interpolation in the discrete given function. The relation between the order of monotony of a particular function and the degree of the interpolating poly- nomial is justified, analyzing the relation between the derivatives of such function and the truncation error expression. In this algorithm there is not matter about the number and the arrangement of the data points, neither if the points are regularly spaced or not. The algorithm thus defined can be used to make interpolations in functions of one and several dependent variables. The algoritm automatically select the data points nearest to the point where an interpolation is desired, following the criterion of symmetry. Indirectly, the algorithm also select the number of data points, which is a unity higher than the order of the used polynomial, following the criterion of monotony. Finally, the complete algoritm is presented and subroutines in fortran code is exposed as an addendum. Notice that there is not the degree of the interpolating polynomial within the arguments of such subroutines.
  • 2. INTRODUCTION It has been developed an interpolation algorithm using polynomy of Newton in divided differ- ences. To increase the efficiency of interpolation it has been used two criteria that make the interpolation the most consistent possible with the given discrete points. These criterions are symmetry and Monotony, when applied accordingly, permits to determine the order of the optimum polynomy used during a inter- polation. POLYNOMIAL OF INTERPOLATION Let be (x0, f(x0)), (x1, f(x1)), (x2, f(x2)) until (xn, f(xn)) the n+1 discrete points that represent a function y = f(x). As is well known, there exist a unique polynomial y = Pn(x) of n-degree, which pass over the n+1 mentioned points. These polynomials are adequate to perform estimartions of the function y = f(x) for any value x belonging to the interval [x0, x1, x2, x3, . . . , xn] containing all the points, being the values xi not necessarily ordered, nor having repeted values. We name to this process “Interpolation”. If the value of x is outside of the interval of points the process is named “Extrapolation”. Divided Difference The divided differences [Carnahan et al.,1969] symbolized by f[ · ] is defined in a recurrent manner in the following form f[x0] = f(x0) (1.a) f[x1, x0] = f[x1] − f[x0] x1 − x0 (1.b) f[x2, x1, x0] = f[x2, x1] − f[x1, x0] x2 − x0 (1.c) f[x3, x2, x1, x0] = f[x3, x2, x1] − f[x2, x1, x0] x3 − x0 (1.d) f[xn, xn−1, . . . , x1, x0] = f[xn, xn−1, . . . , x2, x1] − f[xn−1, xn−2, . . . , x1, x0] xn − x0 (1.e) The divided differences satisfy the property f[xn, xn−1, . . . , x1, x0] = f[x0, x1, . . . , xn−1, xn] ∀n ∈ N (2) This property, expressed for any n, what means is that, regardless the ordering of these values xi within the argument of a divided difference, the result is always the same. Said in concise form, the divide 2
  • 3. difference is invariant after permutations of its arguments. This property made it adequated for the calculations, as we shall see later. A way to express every posible divided difference generated by, for example, the set of four points (x0, f(x0)), (x1, f(x1), (x2, f(x2)), (x3, f(x3)) and (x4, f(x4)), not necessarily ordered, is what we denominate Lozenge Diagram of divided differences. For our proposed example, we have the lozenge diagram represented as x0 f[x0] f[x0, x1] x1 f[x1] f[x0, x1, x2] f[x1, x2] f[x0, x1, x2, x3] x2 f[x2] f[x1, x2, x3] f[x0, x1, x2, x3, x4] f[x2, x3] f[x1, x2, x3, x4] x3 f[x3] f[x2, x3, x4] f[x3, x4] x4 f[x4] (3) One may observe that for obtaining every divided difference located in a vertex of an imaginary triangle, is sufficient to calculate the difference of the contiguous divided differences and divide them by the difference of the extreme values of x in the base of such triangle. Algebraic Manipulation of differences of increasing orders results, by mean of induction, in a similar symetrical form for the k-divided-difference, in terms of its arguments and the functional values f(xi). This symetrical form may be described in a compact manner by f[x0, x1, x2, . . . , xk−1, xk] = k i=0 f(xi) k j=0 j=i (xi − xj) (4) For regular intervals in x, where the values xi are ordered, we define the forward difference ∆k fi, such that ∆k fi = k! hk f[xi, xi+1, xi+2, . . . , xi+k−1, xi+k] (5) where h is the size of the interval in x for consecutive points (h = xi+1 − xi). They are ordered in a lozenge diagram as before, but they are not divided, that is why the factor k! hk . Newton Polynomials The Newton polynomials Pn(x) of degree n in divided differenes [Carnahan et al.,1969], as said before, permit to make estimations of the function y = f(x) of intermediate points by the formula f(x) = Pn(x) + Rn(x) (6) 3
  • 4. where Pn(x) is the polynomial of degree n Pn(x) =f[x0] + (x − x0) f[x0, x1] + (x − x0)(x − x1) f[x0, x1, x2] + · · · + (x − x0)(x − x1)(x − x2) · · · (x − xn−1) f[x0, x1, x2, . . . , xn−1, xn] = n k=0 k−1 j=0 (x − xj) f[x0, x1, x2, . . . , xk−1, xk] (7) and the function Rn(x) is the error committed in the interpolation Rn(x) = n j=0 (x − xj) f[x0, x1, x2, . . . , xn−1, xn, x] = n j=0 (x − xj) f(n+1) (ξ) (n + 1)! ξ ∈ [x0, x1, . . . , xn−1, xn] (8) being ξ the value between the lower and the higher of the values {x0, x1, . . . , xn−1, xn}. Naturaly Rn(xi) = 0 for i = 1, 2, 3, . . ., n, since the polynomial pass over every one of the points (xi, f(xi)). When high limit of a producto is less than the low limit, as occur in the first therm of (7), the result is one. A simple example is the parabola that pass over three points (a, f(a)), (b, f(b)) y (c, f(c)) P2(x) = f[a] + (x − a)f[a, b] + (x − a)(x − b)f[a, b, c] (9) where f[a, b] if the slope between points a y b and f[a, b, c] is the curvature of the parabola, if positive is upward opened, if negative is downward opened. For regular intervals, the polynomial of Newton in divided difference (7) becomes in Pn(x) = n k=0 s k ∆k f0 (10) denominated forward Newton-Gregory polynomial and where the combinatorial number means s k = Γ(s + 1) Γ(s − k + 1) Γ(k + 1) s = x − x0 h (11) 4
  • 5. Particularly, Γ(k + 1) = k! for k being a positive integer and, although the function Γ(s) is not always a factorial, it is satisfied Γ(s+1)/Γ(s−k+1) = s(s−1)(s−2) . . . (s−k +1) [Gerald,1970]. The expression (10) was obtained by substitution of k−1 j=0 (x − xj) = hk Γ(s + 1) Γ(s − k + 1) = k! hk s k (12) and (5), solving f[ · ] for i = 0, in (7). For regular intervals, the error (8) becomes in Rn(x) = s n + 1 hn+1 f(n+1) (ξ) ξ ∈ [x0, x1, . . . , xn−1, xn] (13) being ξ the same as before. The polynomials for regular intervals are shown here only for reference. In general, the data used for interpolation are not ordered, nor are regular. At last we use polynomials in divided difference for the reason aditionally justified in continuation. Lagrange Polynomials The polynomial of Lagrange [Hildebrand,1956] is other form to express the same polynomial Pn(x) from the equation (7), but through (4). In such a way we have [Carnahan et al.,1969] Pn(x) = n i=0 Li(x) f(xi) (14) where Li(x) = n j=0 j=i (x − xj) (xi − xj) (15) The error Rn(x) continuous being the same as expresion (8). Every functional value f(xi) included in the expresion (14) es multiplied by Li(x), which are all polynomials of degree n. For this reason receive the name of Lagrange multiplier. An inconvenience that have these Lagrange polynomials is that, to increase the degree in one unit, implies a cumbersome process of appending an additional factor for each multiplier (products), and then calculate all again. This inconvenience is not presented in Newton polynomials, where to increase the degree one unit, involves only to add a point and calculate a additional term (sums), and all the calculations done before may be reused. 5
  • 6. CRITERIA FOR INTERPOLATION In continuation there are decribed two criteria used in the algorithm: symmetry and monotony. Then is formulated how they are coupled in the algorithm. symmetry El criterion of symmetry consist in choosing the distribution of points as simetrically as possible, around where a interpolation is desired. This may be done in two ways: by the number of points, or the distance of influence, at each side of the target. In the case of irregular interval, the second option becomes in a criterion of proximity. In the case of regular intervals one of the ways implies the other. In any way, the number of proximate points is determined by the criterion of monotony describe below. In the extreme of the interval containing the points, sometimes it is imposible to follow the criterion of symmetry estrictly, then it is necessary in its place to follow the criterion of proximity, if you want to reach a higher order of monotony as is explained below. The criterion of symmetry has another advantage. For example, in the finite difference central scheme the presented formulations have a lower error, than when they are not, inclusively using the same number of points. Monotony The criterion of monotony is based in the definition of monotony of a funtion: A function is said to have a monotony of order m, in a determined interval, if all the derivatives up to that order conserve always its sign in such an interval. In others words, a continuous function y = f(x) is monotonic of order m in an interval [a, b], if f (x) = 0 f (x) = 0 f (x) = 0 · · · f(m) (x) = 0 for all x ∈ [a, b] f(m+1) (x) = 0 for some x ∈ [a, b] (16) In the example shown in (9), la parabola has monotony of order 2 in the intervals (−∞, v) and (v, ∞), separately, where v = 1 2 { a + b − f[a, b]/f[a, b, c] } is the location of the vertex of that parabola. The divided difference are proportional to the derivatives in its surround, as it is indicated in the next relation coming from (8) f[x0, x1, x2, . . . , xn−1, xn, x] = f(n+1) (ξ) (n + 1)! ξ ∈ [x0, x1, . . . , xn−1, xn, x] (17) 6
  • 7. For this, the criterion of monotony implies to choose the highest order in the divided difference with equal sign by columns in the lozenge diagram. The last divided difference to avoid from here, together with the last point that originates it, should have the opposite sign of all the rest of divided difference of the same order (same column) in the vicinity. This means that the criterion of monotony accepts polynomials up to degree m. The lack of monotony in the interpolations implies that it may be produced undesirable oscillations of the functions around or within the given points. As the last added point is the farest, there is not inconvenience to leave it (not recommended), since the calculations are already done and are of the last order in the error. As more similar are the monotony of the dicrete function and the interpolation polynomial, as in the same weight the interpolation will be more consistent. Algorithm The criteria of symmetry and monotony are complementary to indicate which points and how many of them must be used in the interpolation. In any way, the degree of the polynomial will be a unit less than the number of used points. The algorithm may be resumed in the following manner: select the nearest points where the interpolation is desired in a simetrical (or proximate) number (distance), one by one (calculating every time all the diagonal of divided difference up to the vertex), until such a number of point, reflected in the divided difference, conserve the maximum possible order of monotony of the interpolation polynomial equal to the monotony of the dicrete function. The aforementioned explained algorithm may be used to do interpolations in one or several dimensions. Also permits the interpolation without the necessity of pre-ordering the used points or pre- select their number. In several dimensions the only requirement is that the function values will be for the same and for all the discrete points in each dimension. The algorithm neither need to select a degree of polynomial anticipatively, during the process of interpolation. The algorithm decides the optimum degree of the polynomial that guarantees the satisfaction of the critera of symmetry and monotony. REFERENCES • Carnahan, B.; Luther, H. A.; Wilkes, J. O. Applied Numerical Methods. John Wiley & Sons (New York), 1969. • Gerald, C. F. Applied Numerical Analysis, 2nd Edition. Addison-Wesley (New York), 1970. • Hildebrand, F. B. Introduction to Numerical Analysis. McGraw-Hill (New York),1956. ADDENDUM Please ask for the FORTRAN code at e-mails: agrana@usb.ve granados.al@gmail.com 7