SlideShare a Scribd company logo
1
Interpolation
2
Polynomial Interpolation
Given: n+1 data points (x0, y0), (x1, y1), … (xn, yn)
Find: a0, a1, …, an so that
Two data points: a line
Three data points: a quadratic
Four data points: a degree-3 polynomial
…
n+1 data points: a degree-n polynomial
  n
n x
a
x
a
x
a
a
x
f 



 
2
2
1
0
0
2
2
1
0
2
2
2
2
2
1
2
0
1
1
2
2
1
1
1
a
y
a
x
a
x
a
x
a
y
a
x
a
x
a
x
a
y
a
x
a
x
a
x
n
n
n
n
n
n
n
n
n
n















...
...
...

Is there a better way than solving this system of equations?
3
Newton’s Divided-Difference Interpolating Polynomials
Linear Interpolation
Connecting two data points with a straight line
f1(x) designates a first-order interpolating
polynomial.
)
(
)
(
)
(
)
(
0
1
0
1
0
0
1
x
x
x
f
x
f
x
x
x
f
x
f





Linear-interpolation
formula
Slope
)
(
)
(
)
(
)
(
)
( 0
0
1
0
1
0
1 x
x
x
x
x
f
x
f
x
f
x
f 




4
Linear Interpolation
   
   
 
0
0
1
0
1
0
1 x
x
x
x
x
f
x
f
x
f
x
f 




Given: two points (x0, y0), (x1, y1)
Find: a line that goes through the two points.
Example: f(x) = ln x
x0 = 1 and x1 = 6:
f1(2) = 0.3583519
x0 = 1 and x1 = 4
f1(2) = 0.4620981
ln 2 = 0.6931472
The closer the interval the better interpolation result!
5
   
   
 
0
0
1
0
1
0
1 x
x
x
x
x
f
x
f
x
f
x
f 




6
7
8
Quadratic Interpolation
 
   
       
0
2
0
1
0
1
1
2
1
2
2
0
1
0
1
1
0
0
x
x
x
x
x
f
x
f
x
x
x
f
x
f
b
x
x
x
f
x
f
b
x
f
b











      
1
0
2
0
1
0
2 x
x
x
x
b
x
x
b
b
x
f 





Given: three points (x0, y0), (x1, y1), (x2,y2)
Find: a quadratic f2(x) = a0 + a1x + a2x2 that goes through the three points.
Example: f(x) = ln x
Data points:
b0 = 0
b1 = (1.386294 – 0)/(4 – 1) = 0.4620981
b2 = [(1.791759 – 1.386294)/(6-4) – 0.4620981]/(6-1)
= -0.0518731
f2(2) = 0.5658444
ln 2 = 0.6931472
9
General Newton’s Interpolation Polynomial
 
 
 
0
1
1
0
1
1
0
0
x
x
x
x
f
b
x
x
f
b
x
f
b
n
n
n ,
,
,
,






           
1
1
0
1
0
2
0
1
0 










 n
n
n x
x
x
x
x
x
b
x
x
x
x
b
x
x
b
b
x
f 
...
     
j
i
j
i
j
i
x
x
x
f
x
f
x
x
f



,
Given: n+1 points (x0, y0), (x1, y1), …, (xn, yn) (yi = f(xi), i=0,1,…,n)
Find: fn(x) = a0 + a1x + a2x2 + … + anxn that goes through the n+1 points.
where
     
k
i
k
j
j
i
k
j
i
x
x
x
x
f
x
x
f
x
x
x
f



,
,
,
,
     
0
0
2
1
1
1
0
1
1
x
x
x
x
x
f
x
x
x
f
x
x
x
x
f
n
n
n
n
n
n
n


 



,
,
,
,
,
,
,
Bracket function, the first divide difference
between the values of f(X1) and f(X0)
Divided
difference
polynomial
10
Example of Newton’s Interpolation Polynomial
Given: (1, 0), (4, 1.386294), (6, 1.791759), (5, 1.609438) (of function ln x)
Find: estimate ln 2 with a third-order Newton’s interpolation
= b1
= b0 = b1 = b2 = b3
= b2
= b3
11
Example of Newton’s Interpolation Polynomial
x0
x1
x3
x2
12
13
14
Lagrange Interpolation Polynomials
where
Product
15
16
17
Miscellaneous problems #1
18
19
Miscellaneous problems #2
20
21
Miscellaneous problems #3
22
23
24
A mechanical engineering study indicates that fluid flow through a pipe is
related to pipe diameter and slope (by the data as given below).
Suppose it is already known that Q, S, and D are related by the power relation
Use log-transformation + multiple linear regression to analyze this data. Then use the
resulting model to predict the flow for a pipe with a diameter of 2.5 ft and slope of 0.025 ft/ft.
2
1
a
a
0 S
D
a
Q 
Miscellaneous problems #4
25
The laws of logarithms
26
Multiple Linear Regression
Given: n points 3D (y1, x11, x12) (y2, x12, x22), …, (yn, x1n, x2n)
Find: a plane y = a0 + a1x1 + a2x2 that minimizes
27
Analysis of Experimental Data
2
2
1
1 z
a
z
a
loga
y 0 


    /s
ft
0.025
2.5
55.9
Q 3
0.54
2.62
1
84.


y = log Q, z1 = log D, z2 = log S
Multi-linear regression on y – (z1, z2)
28
Special Problem 6
29
Homework
1-
2-
3-
30
4-
5-

More Related Content

PDF
Newton's Forward/Backward Difference Interpolation
PPT
Interpolation functions
PPTX
Circle generation algorithm
PPT
Numerical method
PPTX
Bisection method
PPTX
Volumes of solids of revolution dfs
PPT
Lu decomposition
PPTX
Dijkstra s algorithm
Newton's Forward/Backward Difference Interpolation
Interpolation functions
Circle generation algorithm
Numerical method
Bisection method
Volumes of solids of revolution dfs
Lu decomposition
Dijkstra s algorithm

What's hot (20)

PPTX
Bresenham's line drawing algorithm
PPT
NUMERICAL METHODS -Iterative methods(indirect method)
PPTX
Numerical differentiation
PDF
Fixed point iteration
PPTX
Gaussian Elimination Method
PPTX
The False-Position Method
PPTX
Gauss jordan and Guass elimination method
PPTX
Echelon and reduced echelon form & Filters
PPT
numerical methods
PPTX
Runge Kutta Method
PDF
2D Rotation- Transformation in Computer Graphics
PPTX
Numerical analysis ppt
PPTX
Polygon filling algorithm
PPTX
Dijkstra’S Algorithm
PPT
Composite transformations
PDF
Longest common subsequence
PPTX
LU FACTORIZATION METHOD
PPT
Ellipses drawing algo.
PPTX
Dijkstra
PPTX
Euler and improved euler method
Bresenham's line drawing algorithm
NUMERICAL METHODS -Iterative methods(indirect method)
Numerical differentiation
Fixed point iteration
Gaussian Elimination Method
The False-Position Method
Gauss jordan and Guass elimination method
Echelon and reduced echelon form & Filters
numerical methods
Runge Kutta Method
2D Rotation- Transformation in Computer Graphics
Numerical analysis ppt
Polygon filling algorithm
Dijkstra’S Algorithm
Composite transformations
Longest common subsequence
LU FACTORIZATION METHOD
Ellipses drawing algo.
Dijkstra
Euler and improved euler method
Ad

Viewers also liked (20)

PDF
interpolation
PPT
08 interpolation lagrange
PPT
Numerical integration
PDF
Interpolation Generalized
PDF
Interpolation Methods
PDF
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
PPTX
Newton's forward difference
PDF
Finite difference & interpolation
PPTX
Presentation2
PPT
07 interpolation
PDF
Interpolation
PPTX
Newton’s Divided Difference Formula
PPT
Spline Interpolation
PPTX
Interpolation and extrapolation
PPTX
معادلة لاغرانج
PPTX
PPTX
Lagrange’s interpolation formula
PPT
Lagrange's Theorem
ODP
Numerical Integration
PPTX
Numerical integration
interpolation
08 interpolation lagrange
Numerical integration
Interpolation Generalized
Interpolation Methods
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
Newton's forward difference
Finite difference & interpolation
Presentation2
07 interpolation
Interpolation
Newton’s Divided Difference Formula
Spline Interpolation
Interpolation and extrapolation
معادلة لاغرانج
Lagrange’s interpolation formula
Lagrange's Theorem
Numerical Integration
Numerical integration
Ad

Similar to Applied numerical methods lec9 (20)

PDF
me310_6_interpolation.pdf for numerical method
PDF
Computational methods for engineering...
PPT
Chap_18.ppt on interpolation basics undersatanding
PPT
lagrange and newton divided differences.ppt
PPT
interpolacrcrdcrdrcrdctctfct frfctfction.ppt
PPTX
Interpolation
PPTX
interpolation-190605141327 (1).pptx
PPTX
interpolation-190605141327 (1).pptx
PPTX
Interpolation.pptx
PPTX
Numerical method (curve fitting)
PPT
NUMERICAL ANALYSIS CH4CISE301-Topic5.ppt
PPTX
Interpolation
PDF
Fortran chapter 2.pdf
PDF
Intro. to computational Physics ch2.pdf
PDF
Interpolation(2) Numerical methods to CE Problems).pdf
PPTX
numericai matmatic matlab uygulamalar ali abdullah
PDF
PDF
Interpolation techniques - Background and implementation
PDF
Lecture about interpolation
PPTX
Chapter 5 - Interpolation(newton's diff)
me310_6_interpolation.pdf for numerical method
Computational methods for engineering...
Chap_18.ppt on interpolation basics undersatanding
lagrange and newton divided differences.ppt
interpolacrcrdcrdrcrdctctfct frfctfction.ppt
Interpolation
interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptx
Interpolation.pptx
Numerical method (curve fitting)
NUMERICAL ANALYSIS CH4CISE301-Topic5.ppt
Interpolation
Fortran chapter 2.pdf
Intro. to computational Physics ch2.pdf
Interpolation(2) Numerical methods to CE Problems).pdf
numericai matmatic matlab uygulamalar ali abdullah
Interpolation techniques - Background and implementation
Lecture about interpolation
Chapter 5 - Interpolation(newton's diff)

More from Yasser Ahmed (15)

PPT
Artificial reefs
PDF
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
PDF
Applied numerical methods lec14
PDF
Applied numerical methods lec13
PDF
Applied numerical methods lec12
PDF
Applied numerical methods lec11
PDF
Applied numerical methods lec10
PDF
Applied numerical methods lec8
PDF
Applied numerical methods lec7
PDF
Applied numerical methods lec6
PDF
Applied numerical methods lec5
PDF
Applied numerical methods lec4
PDF
Applied numerical methods lec3
PDF
Applied numerical methods lec2
PDF
Applied numerical methods lec1
Artificial reefs
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Applied numerical methods lec14
Applied numerical methods lec13
Applied numerical methods lec12
Applied numerical methods lec11
Applied numerical methods lec10
Applied numerical methods lec8
Applied numerical methods lec7
Applied numerical methods lec6
Applied numerical methods lec5
Applied numerical methods lec4
Applied numerical methods lec3
Applied numerical methods lec2
Applied numerical methods lec1

Recently uploaded (20)

PPTX
Construction Project Organization Group 2.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
web development for engineering and engineering
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Geodesy 1.pptx...............................................
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PDF
PPT on Performance Review to get promotions
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
OOP with Java - Java Introduction (Basics)
Construction Project Organization Group 2.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
CH1 Production IntroductoryConcepts.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
web development for engineering and engineering
Embodied AI: Ushering in the Next Era of Intelligent Systems
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Geodesy 1.pptx...............................................
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Internet of Things (IOT) - A guide to understanding
UNIT 4 Total Quality Management .pptx
PPT on Performance Review to get promotions
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)

Applied numerical methods lec9

  • 2. 2 Polynomial Interpolation Given: n+1 data points (x0, y0), (x1, y1), … (xn, yn) Find: a0, a1, …, an so that Two data points: a line Three data points: a quadratic Four data points: a degree-3 polynomial … n+1 data points: a degree-n polynomial   n n x a x a x a a x f       2 2 1 0 0 2 2 1 0 2 2 2 2 2 1 2 0 1 1 2 2 1 1 1 a y a x a x a x a y a x a x a x a y a x a x a x n n n n n n n n n n                ... ... ...  Is there a better way than solving this system of equations?
  • 3. 3 Newton’s Divided-Difference Interpolating Polynomials Linear Interpolation Connecting two data points with a straight line f1(x) designates a first-order interpolating polynomial. ) ( ) ( ) ( ) ( 0 1 0 1 0 0 1 x x x f x f x x x f x f      Linear-interpolation formula Slope ) ( ) ( ) ( ) ( ) ( 0 0 1 0 1 0 1 x x x x x f x f x f x f     
  • 4. 4 Linear Interpolation           0 0 1 0 1 0 1 x x x x x f x f x f x f      Given: two points (x0, y0), (x1, y1) Find: a line that goes through the two points. Example: f(x) = ln x x0 = 1 and x1 = 6: f1(2) = 0.3583519 x0 = 1 and x1 = 4 f1(2) = 0.4620981 ln 2 = 0.6931472 The closer the interval the better interpolation result!
  • 5. 5           0 0 1 0 1 0 1 x x x x x f x f x f x f     
  • 6. 6
  • 7. 7
  • 8. 8 Quadratic Interpolation               0 2 0 1 0 1 1 2 1 2 2 0 1 0 1 1 0 0 x x x x x f x f x x x f x f b x x x f x f b x f b                   1 0 2 0 1 0 2 x x x x b x x b b x f       Given: three points (x0, y0), (x1, y1), (x2,y2) Find: a quadratic f2(x) = a0 + a1x + a2x2 that goes through the three points. Example: f(x) = ln x Data points: b0 = 0 b1 = (1.386294 – 0)/(4 – 1) = 0.4620981 b2 = [(1.791759 – 1.386294)/(6-4) – 0.4620981]/(6-1) = -0.0518731 f2(2) = 0.5658444 ln 2 = 0.6931472
  • 9. 9 General Newton’s Interpolation Polynomial       0 1 1 0 1 1 0 0 x x x x f b x x f b x f b n n n , , , ,                   1 1 0 1 0 2 0 1 0             n n n x x x x x x b x x x x b x x b b x f  ...       j i j i j i x x x f x f x x f    , Given: n+1 points (x0, y0), (x1, y1), …, (xn, yn) (yi = f(xi), i=0,1,…,n) Find: fn(x) = a0 + a1x + a2x2 + … + anxn that goes through the n+1 points. where       k i k j j i k j i x x x x f x x f x x x f    , , , ,       0 0 2 1 1 1 0 1 1 x x x x x f x x x f x x x x f n n n n n n n        , , , , , , , Bracket function, the first divide difference between the values of f(X1) and f(X0) Divided difference polynomial
  • 10. 10 Example of Newton’s Interpolation Polynomial Given: (1, 0), (4, 1.386294), (6, 1.791759), (5, 1.609438) (of function ln x) Find: estimate ln 2 with a third-order Newton’s interpolation = b1 = b0 = b1 = b2 = b3 = b2 = b3
  • 11. 11 Example of Newton’s Interpolation Polynomial x0 x1 x3 x2
  • 12. 12
  • 13. 13
  • 15. 15
  • 16. 16
  • 18. 18
  • 20. 20
  • 22. 22
  • 23. 23
  • 24. 24 A mechanical engineering study indicates that fluid flow through a pipe is related to pipe diameter and slope (by the data as given below). Suppose it is already known that Q, S, and D are related by the power relation Use log-transformation + multiple linear regression to analyze this data. Then use the resulting model to predict the flow for a pipe with a diameter of 2.5 ft and slope of 0.025 ft/ft. 2 1 a a 0 S D a Q  Miscellaneous problems #4
  • 25. 25 The laws of logarithms
  • 26. 26 Multiple Linear Regression Given: n points 3D (y1, x11, x12) (y2, x12, x22), …, (yn, x1n, x2n) Find: a plane y = a0 + a1x1 + a2x2 that minimizes
  • 27. 27 Analysis of Experimental Data 2 2 1 1 z a z a loga y 0        /s ft 0.025 2.5 55.9 Q 3 0.54 2.62 1 84.   y = log Q, z1 = log D, z2 = log S Multi-linear regression on y – (z1, z2)