De La Salle Lipa College of Information Technology and Engineering Electrical Engineering Department
De La Salle Lipa College of Information Technology and Engineering Electrical Engineering Department
HOMEWORK #1
(LAGRANGE INTERPOLATION)
V3A
NUMMETH
LAGRANGE INTERPOLATION
i. DEFINITION
1. What is Interpolation?
Interpolation is a technique for adding new data points within a
range of a set of known data points. You can use interpolation to fill-in
missing data, smooth existing data, make predictions, and more. Also it is the
problem of constructing a function which goes through a given set of data
points. In some applications, these data points are obtained by sampling a
function or process.
The goal of interpolation is to find a linear combination of n known
functions to fit a set of data that imposes n constraints, thus guaranteeing a
unique solution that fits the data exactly, rather than approximately.
Interpolation, The simplest kind of interpolation, in which most
development has been made, is interpolation by means of univariate
polynomials. Multiple formulae for polynomial interpolation have been
given, notably those of Newton and Lagrange
START
Read n, x
sum = 0
for i=0 to n
prod = 0
for i=0 to n
Is j=i
Next j
Next i
Print sum, x
END
iii. SAMPLE
Graphs:
Source: photos from
http://www1.maths.leeds.ac.uk/~kersale/2600/Notes/appendix_E.pdf