CE324 Lecture 8
CE324 Lecture 8
Metran
Licensed Geodetic Engineer
Geodetic Engineering Department
College of Engineering and Architecture
CE324 Module 8
CURVE FITTING
- INTERPOLATION
CURVE FITTING
• It is the method of constructing a curve or a derived function that will “fit” to
the set of data subject to constraints to obtain intermediate estimates.
Least-squares regression
Interpolation
CURVE FITTING
• Interpolation
It is a process of estimating a value between the data points which are known to be
precise and directly pass by the fitted curve or series of curves.
• Linear Interpolation
• Quadratic Interpolation
𝑓1 𝑥 −𝑓 𝑥0 𝑓 𝑥1 −𝑓 𝑥0
• =
𝑥−𝑥0 𝑥1 −𝑥0
𝒇 𝒙𝟏 −𝒇 𝒙𝟎
• 𝒇𝟏 𝒙 = 𝒇 𝒙𝟎 + 𝒙 − 𝒙𝟎
𝒙𝟏 −𝒙𝟎
• 𝑓1 𝑥 = 𝑎0 + 𝑎1 𝑥
𝑓 𝑥1 −𝑓 𝑥0
• 𝑓1 𝑥 = 𝑓 𝑥0 − 𝑥0 +
𝑥1 −𝑥0
𝑓 𝑥1 −𝑓 𝑥0
𝑥
𝑥1 −𝑥0
INTERPOLATION
• Quadratic Interpolation
• 𝑓2 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 + 𝑏2 𝑥 − 𝑥0 𝑥 − 𝑥1
• 𝑓2 𝑥 = 𝑏0 − 𝑏1 𝑥0 + 𝑏2 𝑥0 𝑥1 + 𝑏1 − 𝑏2 𝑥0 − 𝑏2 𝑥1 𝑥 + 𝑏2 𝑥 2
• 𝑏0 = 𝑓 𝑥0
𝑓 𝑥1 −𝑓 𝑥0
• 𝑏1 =
𝑥1 −𝑥0
𝑓 𝑥2 −𝑓 𝑥1 𝑓 𝑥1 −𝑓 𝑥0
−
𝑥2 −𝑥1 𝑥1 −𝑥0
• 𝑏2 =
𝑥2 −𝑥0
INTERPOLATION
• General form of Newton’s Divided-Difference Interpolation
Fitting an 𝑛th order of polynomial to n+1 data points using finite divided difference
𝑓𝑛 𝑥 = 𝑏0 + 𝑏1 𝑥 − 𝑥0 + 𝑏2 𝑥 − 𝑥0 𝑥 − 𝑥1 + ⋯ + 𝑏𝑛 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ 𝑥 −
INTERPOLATION
• Finite Divided Difference
𝑏0 = 𝑓 𝑥0
𝑓 𝑥1 −𝑓 𝑥0
𝑏1 = 𝑓 𝑥1 , 𝑥0 =
𝑥1 −𝑥0
•
•
•
𝑓𝑛 𝑥 = 𝐿0 𝑥 𝑓 𝑥0 + 𝐿1 𝑥 𝑓 𝑥1 + 𝐿2 𝑥 𝑓 𝑥2 + ⋯ + 𝐿𝑛 𝑥 𝑓 𝑥𝑛
First-order version
𝑥−𝑥1 𝑥−𝑥0
𝑓1 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1
𝑥0 −𝑥1 𝑥1 −𝑥0
Second-order version
𝑥−𝑥1 𝑥−𝑥2 𝑥−𝑥0 𝑥−𝑥2 𝑥−𝑥0 𝑥−𝑥1
𝑓2 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1 + 𝑓 𝑥2
𝑥0 −𝑥1 𝑥0 −𝑥2 𝑥1 −𝑥0 𝑥1 −𝑥2 𝑥2 −𝑥0 𝑥2 −𝑥1
INTERPOLATION
• SAMPLE PROBLEM: Find the polynomial that interpolates the points (1, 2) and
(4, 5). Evaluate p(1/2)
INTERPOLATION
• SAMPLE PROBLEM: Using Newton’s divided-difference, determine the parabolic
equation of the given data points.
x 0 1 2
y 1 4 9
INTERPOLATION
• SAMPLE PROBLEM: using Newton’s form, show that the interpolating
1 3
polynomial of the points (-1, 3), (0, 2), (2, 0), and (4, -1) is 𝑝 𝑥 = 𝑥 −
40
1 2 21
𝑥 − 𝑥 +2
40 20
INTERPOLATION
• SAMPLE PROBLEM: Solve problem no. 3 using Lagrange’s Interpolation
THANK YOU