SlideShare a Scribd company logo
INTERPOLATION OF
POLYNOMIALS
INTRODUCTION
Allows us to find INTERMEDIATE VALUES between known
points
LAGRANGE
INTERPOLATION
LAGRANGE POLYNOMIAL INTERPOLATION
𝒋=𝟏
𝒏
[𝒚𝒋 𝒌=𝟏
𝒌≠𝒋
𝒏 𝒙−𝒙𝒌
𝒙𝒋
−𝒙𝒌
]
Degree of Polynomial, n = 1
n = no. of data points
j = term iteration
K = product notation iteration counter
LAGRANGE POLYNOMIAL INTERPOLATION
Allows us to find INTERMEDIATE VALUES between known
points
1st Order LAGRANGE POLYNOMIAL
INTERPOLATION
Example: Find y at x = 2.2
# Find 1st order Lagrange Polynomial Equation
# Plug in data and Simplify, and Validate
# Plug in given data to newly found function
f(x) =
𝒙−𝒙𝟐
𝒙𝟏−𝒙𝟐
y1 +
𝒙−𝒙𝟏
𝒙𝟐−𝒙𝟏
y2
*** Short Cut
X Y
2 5
3 10
2nd Order LAGRANGE POLYNOMIAL
INTERPOLATION
Example: Find y at x = 2.5
n=3 thus 2nd order Lagrange
# Find General order Lagrange Polynomial Equation
# Plug in data and Simplify; then Validate
# Plug in given data to newly found function
f(x) =
(𝒙−𝒙𝟐)(𝒙−𝒙𝟑)
𝒙𝟏
−𝒙𝟐
(𝒙𝟏
−𝒙𝟑
)
y1 +
(𝒙−𝒙𝟏)(𝒙−𝒙𝟑)
𝒙𝟐
−𝒙𝟏
(𝒙𝟐
−𝒙𝟑
)
y2 +
(𝒙−𝒙𝟏)(𝒙−𝒙𝟐)
𝒙𝟑
−𝒙𝟏
(𝒙𝟑
−𝒙𝟐
)
y3
X Y
1 4
3 8
7 10
2nd Order LAGRANGE POLYNOMIAL
INTERPOLATION
Example: Find y at x = 2.5
n=3 thus 2nd order Lagrange
f(x) =
(𝒙−𝒙𝟐
)(𝒙−𝒙𝟑
)
𝒙𝟏
−𝒙𝟐
(𝒙𝟏
−𝒙𝟑
)
y1 +
(𝒙−𝒙𝟏
)(𝒙−𝒙𝟑
)
𝒙𝟐
−𝒙𝟏
(𝒙𝟐
−𝒙𝟑
)
y2 +
(𝒙−𝒙𝟏
)(𝒙−𝒙𝟐
)
𝒙𝟑
−𝒙𝟏
(𝒙𝟑
−𝒙𝟐
)
y3
= - 0.25 x2 + 3x + 1.25
if x = 2.5, then y should be 7.1875.
X Y
1 4
3 8
7 10
3rd Order LAGRANGE POLYNOMIAL
INTERPOLATION
Example: Find y at x = 3
n=4 thus 3rd order Lagrange
f(x) =
(𝒙−𝒙𝟐
)(𝒙−𝒙𝟑
)(𝒙−𝒙𝟒
)
𝒙𝟏
−𝒙𝟐
(𝒙𝟏
−𝒙𝟑
)(𝒙𝟏
−𝒙𝟒
)
y1 +
(𝒙−𝒙𝟏
)(𝒙−𝒙𝟑
)(𝒙−𝒙𝟒
)
𝒙𝟐
−𝒙𝟏
(𝒙𝟐
−𝒙𝟑
)(𝒙𝟐
−𝒙𝟒
)
y2 +
(𝒙−𝒙𝟏
)(𝒙−𝒙𝟐
)(𝒙−𝒙𝟒
)
𝒙𝟑
−𝒙𝟏
(𝒙𝟑
−𝒙𝟐
)(𝒙𝟑
−𝒙𝟒
)
y3 +
(𝒙−𝒙𝟏
)(𝒙−𝒙𝟐
)(𝒙−𝒙𝟑
)
𝒙𝟒
−𝒙𝟏
(𝒙𝟒
−𝒙𝟐
)(𝒙𝟒
−𝒙𝟑
)
y4
= 0.25 x3 – 1.5833x2 + 5x + 0.333
if x = 3, then y should be 7.833.
X Y
1 4
2 6
4 11
5 17
NEWTON’S DIVIDED
DIFFERENCE
NEWTON’S DIVIDED DIFFERENCE &
POLYNOMIAL INTERPOLATION
DIVIDED DIFFERENCE INTERPOLATION  Numerical Interpolation
method to find the coefficients of a curve fitting polynomial
Newton’s polynomial  polynomials that we use to interpolate for a specified
set of data. Advantage: faster, recursive, better
NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL
INTERPOLATION
NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL
INTERPOLATION
Example: Find y at x = 2
# n=2, thus 1st order Equation
f(x) = [f0] + [f0,1] (X – X0)
X Y
1 3
4 8
NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL
INTERPOLATION
2nd Order DIVIDED DIFFERENCE
POLYNOMIAL INTERPOLATION
Example: Find y at x = 2
n=3 thus 2nd order
X Y
1 2
3 6
7 5
2nd Order DIVIDED DIFFERENCE
POLYNOMIAL INTERPOLATION
Example: Find y at x = 2
n=3 thus 2nd order
X Y
1 2
3 6
7 5
If x=2, y=4.375
GLOBAL INTERPOLATION
VS
LOCAL INTERPOLATION
GLOBAL VS LOCAL INTERPOLATION
Interpolation  used to find continuous (& ideally smooth) functions from discrete data
points Interpolating function f(x)
Discrete data points
Interpolation Process:
Given data set
Fit interpolating function for the given data set
Use newly found function to find the output for any input (within domain)
Y
X
GLOBAL VS LOCAL INTERPOLATION
GLOBAL INTERPOLATION LOCAL INTERPOLATION
Uses all supplied data to create the interpolating
function; Single/Higher order polynomial
Uses only a subset of all supplied data points
Consists of lower order polynomials
E.g. Lagrange Polynomials, Divided Difference E.g. Spline Interpolation
Must use all data; Always gives the same answer Local Interpolation can use all or little of our supplied
data (must all be continuous and connecting)
Problem: Increase polynomial order = Increase error
at edges of our equal distance input points
Y
X
Global Polynomial
364th Order
Local Polynomial
1st or 2nd
Order
SPLINE INTERPOLATIONS
TYPES OF SPLINE INTERPOLATIONS
1ST Order – Linear Spline 2nd Order – Cubic Spline
More widely used
Y
Y1
Y0, Y2
X0 X1 X2 X
Y
Y1
Y0, Y2
X0 X1 X2 X
LINEAR SPLINE INTERPOLATIONS
1ST Order – Linear Spline
These often lead to knots/sharp changes in our function which
is un-ideal as we want to smooth continuous functions
P2(x)
P1(x) We assume our function to be linear
** How de we go about finding P1(x) and a point along it?
EACH SEGMENT IS SIMPLY A STRAIGHT LINE EQUATION
Gen. Equation of Line: y = mx + b
 P1(x) = Y1 +
𝑌2
−𝑌1
𝑋2
−𝑋1
(X – X1)
 P2(x) = Y2 + 𝑌3
−𝑌2
𝑋3
−𝑋2
(X – X2)
Y
Y1
Y0, Y2
X0 X1 X2 X
LINEAR SPLINE INTERPOLATIONS
Given
Find the necessary interpolating functions
Find the outputs at x = 2, 5 and 10
P2(x)
P1(x)
Gen. Equation of Line: y = mx + b
 P1(x) = 2 + 8−2
6−1
(X – 1) = 1.2x + 0.8
1 ≤ 𝑥 ≤ 6
 P2(x) = 10 +
14−10
12−9 (X – 9) = 4
3
𝑥 - 2 @ x=2, use P1(x) y=3.2
9 ≤ 𝑥 ≤ 12 @ x=5, use P1(x) y=6.8
@ x=10, use P2(x) y=11.3333
X Y
1 2
6 8
7 6
9 10
12 14
20 41
Y
X
QUADRATIC SPLINE INTERPOLATIONS
Given
Find the necessary interpolating functions
Find the outputs at x = 2, 4 and 7
P3(x)
*** 3n equations P2(x)
3 splines = 9 unknowns P1(x)
Write out General polynomials
Identify unknowns
Solve unknowns
Plug in X-inputs
X Y
1 2
3 3
5 9
8 10
Y
X
QUADRATIC SPLINE INTERPOLATIONS
X Y
1 2
3 3
5 9
8 10
Y
X
P2(x)
P1(x)
P3(x)
(1) Polynomials to find:
P1(x) = a1 X2 + b1 X + c1
P2(x) = a2 X2 + b2 X + c2
P3(x) = a3 X2 + b3 X + c3
(2) 9 unknowns a1, b1, c1, a2, b2, c2, a3, b3, c3
QUADRATIC SPLINE INTERPOLATIONS
X Y
1 2
3 3
5 9
8 10
Y
X
P2(x)
P1(x)
P3(x)
(3) At known points: 2n equations
P1(x1) = y1  a1 (1)2 + b1 (1) + c1 = 2  a1 + b1 + c1 = 2 [1]
P1(x2) = y2  a1 (3)2 + b1 (3) + c1 = 3  9a1 + 3b1 + c1 = 3 [2]
P2(x2) = y2  a2 (3)2 + b2 (3) + c2 = 3  9a2 + 3b2 + c2 = 3 [3]
P2(x3) = y3  a2 (5)2 + b2 (5) + c2 = 9  25a1 + 5b1 + c1 = 9 [4]
P3(x3) = y3  a3 (5)2 + b3 (5) + c3 = 9  25a1 + 5b1 + c1 = 9 [5]
P3(x4) = y4  a3 (8)2 + b3 (8) + c3 = 10  64a1 + 8b1 + c1 = 10 [6]
QUADRATIC SPLINE INTERPOLATIONS
X Y
1 2
3 3
5 9
8 10
Y
X
P2(x)
P1(x)
P3(x)
(4) At interior data points: n-1 equations
𝑑P1(x)
𝑑𝑥
|x=x2 =
𝑑P2(x)
𝑑𝑥
|x=x2
𝑑
𝑑𝑥
(a1 X2 + b1 X + c1)|x=x2 =
𝑑
𝑑𝑥
(a2 X2 + b2 X + c2)|x=x2
6a1 + b1 – 6a2 – b2 = 0 [7]
𝑑P2(x)
𝑑𝑥
|x=x3 =
𝑑P3(x)
𝑑𝑥
|x=x3
𝑑
𝑑𝑥
(a2 X2 + b2 X + c2)|x=x3 =
𝑑
𝑑𝑥
(a3 X2 + b3 X + c3)|x=x3
10a2 + b2 – 10a3 – b3 = 0 [8]
QUADRATIC SPLINE INTERPOLATIONS
X Y
1 2
3 3
5 9
8 10
Y
X
P2(x)
P1(x)
P3(x)
(5) Make an assumption: 1 equation
𝑑2P1(x)
𝑑𝑥
|x=x1 = 0
𝑑
𝑑𝑥
(2a1 X + b1)|x=x1
2a1 = 0 [9]
QUADRATIC SPLINE INTERPOLATIONS
1 1 1
9 3 1
0 0 0
0 0 0
0 0 0
9 3 1
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
6 1 0
0 0 0
2 0 0
25 5 1
0 0 0
0 0 0
−6 −1 1
10 1 0
0 0 0
0 0 0
25 5 1
64 8 1
1 1 1
9 3 1
0 0 0
a1
b1
c1
a2
b2
c2
a3
b3
c3
=
2
3
3
9
9
10
0
0
0
a1
b1
c1
a2
b2
c2
a3
b3
c3
=
0
0.5
1.5
1.25
-7
12.75
-1.72
22.72
-61.5
Solving for x=2, 4, 7
P1(x) = 0 X2 + 0.5 X + 1.5 1 ≤ 𝑥 ≤ 3
P2(x) = 1.25 X2 - 7 X + 12.75 3 ≤ 𝑥 ≤ 5
P3(x) = -1.72 X2 + 22.72 X - 61.5 5 ≤ 𝑥 ≤ 8
P1(2) = 0.5 (2) + 1.5 = 2.5
P2(4) = 1.25 (4)2 – 7 (4)+ 12.75 = 4.75
P3(x) = -1.72 (7)2 + 22.72 (7) – 61.5 = 13.15
ATA [B] = AT [C]
=
= =
f(x) = -5 + 5X = Y
@ X=2.2 … Y = 6
LEAST SQUARE APPROXIMATIONS
f(x) = b0 + b1 X = Y
b0 + 2b1 = 5
b0 + 3b1 = 10
f(x) = Ax = y  No Solution!
Thus, ATA [B] = AT [C]
b0 + 2b1 = 5
b0 + 3b1 = 10
1 2
1 3
=
X Y
2 5
3 10
Y
X
b0
b1
5
10
1 2
1 3
b0
b1
5
10
1 1
2 3
1 1
2 3
2 5
5 13
b0
b1
15
40
b0
b1
-5
5
Interpolation.pptx

More Related Content

Similar to Interpolation.pptx

Interpolation
InterpolationInterpolation
Interpolation
Brijesh Padhiyar
 
Derivatives
DerivativesDerivatives
Derivatives
Nisarg Amin
 
MAT 2B SR DI M01 INTRO(26 May 2016).ppt
MAT 2B SR DI M01 INTRO(26 May 2016).pptMAT 2B SR DI M01 INTRO(26 May 2016).ppt
MAT 2B SR DI M01 INTRO(26 May 2016).ppt
sudha794786
 
SlidesL28.pdf
SlidesL28.pdfSlidesL28.pdf
SlidesL28.pdf
UmarMuhammadDauda1
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
hasnulslides
 
Factor theorem
Factor theoremFactor theorem
Factor theorem
Department of Education
 
Higher Maths 1.2.1 - Sets and Functions
Higher Maths 1.2.1 - Sets and FunctionsHigher Maths 1.2.1 - Sets and Functions
Higher Maths 1.2.1 - Sets and Functionstimschmitz
 
Higher Maths 121 Sets And Functions 1205778086374356 2
Higher Maths 121 Sets And Functions 1205778086374356 2Higher Maths 121 Sets And Functions 1205778086374356 2
Higher Maths 121 Sets And Functions 1205778086374356 2
Niccole Taylor
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
Tarun Gehlot
 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdf
IILSASTOWER
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
منتدى الرياضيات المتقدمة
 
Grph quad fncts
Grph quad fnctsGrph quad fncts
Grph quad fncts
Edrian Gustin Camacho
 
Module 3 quadratic functions
Module 3   quadratic functionsModule 3   quadratic functions
Module 3 quadratic functions
dionesioable
 
Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)
Mohammed Matar
 
Higher Maths 2.1.1 - Polynomials
Higher Maths 2.1.1 - PolynomialsHigher Maths 2.1.1 - Polynomials
Higher Maths 2.1.1 - Polynomialstimschmitz
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
OlooPundit
 
Bahan ajar kalkulus integral
Bahan ajar kalkulus integralBahan ajar kalkulus integral
Bahan ajar kalkulus integral
grand_livina_good
 

Similar to Interpolation.pptx (17)

Interpolation
InterpolationInterpolation
Interpolation
 
Derivatives
DerivativesDerivatives
Derivatives
 
MAT 2B SR DI M01 INTRO(26 May 2016).ppt
MAT 2B SR DI M01 INTRO(26 May 2016).pptMAT 2B SR DI M01 INTRO(26 May 2016).ppt
MAT 2B SR DI M01 INTRO(26 May 2016).ppt
 
SlidesL28.pdf
SlidesL28.pdfSlidesL28.pdf
SlidesL28.pdf
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
 
Factor theorem
Factor theoremFactor theorem
Factor theorem
 
Higher Maths 1.2.1 - Sets and Functions
Higher Maths 1.2.1 - Sets and FunctionsHigher Maths 1.2.1 - Sets and Functions
Higher Maths 1.2.1 - Sets and Functions
 
Higher Maths 121 Sets And Functions 1205778086374356 2
Higher Maths 121 Sets And Functions 1205778086374356 2Higher Maths 121 Sets And Functions 1205778086374356 2
Higher Maths 121 Sets And Functions 1205778086374356 2
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdf
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
 
Grph quad fncts
Grph quad fnctsGrph quad fncts
Grph quad fncts
 
Module 3 quadratic functions
Module 3   quadratic functionsModule 3   quadratic functions
Module 3 quadratic functions
 
Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)
 
Higher Maths 2.1.1 - Polynomials
Higher Maths 2.1.1 - PolynomialsHigher Maths 2.1.1 - Polynomials
Higher Maths 2.1.1 - Polynomials
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
 
Bahan ajar kalkulus integral
Bahan ajar kalkulus integralBahan ajar kalkulus integral
Bahan ajar kalkulus integral
 

Recently uploaded

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 

Recently uploaded (20)

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 

Interpolation.pptx

  • 2. INTRODUCTION Allows us to find INTERMEDIATE VALUES between known points
  • 4. LAGRANGE POLYNOMIAL INTERPOLATION 𝒋=𝟏 𝒏 [𝒚𝒋 𝒌=𝟏 𝒌≠𝒋 𝒏 𝒙−𝒙𝒌 𝒙𝒋 −𝒙𝒌 ] Degree of Polynomial, n = 1 n = no. of data points j = term iteration K = product notation iteration counter
  • 5. LAGRANGE POLYNOMIAL INTERPOLATION Allows us to find INTERMEDIATE VALUES between known points
  • 6. 1st Order LAGRANGE POLYNOMIAL INTERPOLATION Example: Find y at x = 2.2 # Find 1st order Lagrange Polynomial Equation # Plug in data and Simplify, and Validate # Plug in given data to newly found function f(x) = 𝒙−𝒙𝟐 𝒙𝟏−𝒙𝟐 y1 + 𝒙−𝒙𝟏 𝒙𝟐−𝒙𝟏 y2 *** Short Cut X Y 2 5 3 10
  • 7. 2nd Order LAGRANGE POLYNOMIAL INTERPOLATION Example: Find y at x = 2.5 n=3 thus 2nd order Lagrange # Find General order Lagrange Polynomial Equation # Plug in data and Simplify; then Validate # Plug in given data to newly found function f(x) = (𝒙−𝒙𝟐)(𝒙−𝒙𝟑) 𝒙𝟏 −𝒙𝟐 (𝒙𝟏 −𝒙𝟑 ) y1 + (𝒙−𝒙𝟏)(𝒙−𝒙𝟑) 𝒙𝟐 −𝒙𝟏 (𝒙𝟐 −𝒙𝟑 ) y2 + (𝒙−𝒙𝟏)(𝒙−𝒙𝟐) 𝒙𝟑 −𝒙𝟏 (𝒙𝟑 −𝒙𝟐 ) y3 X Y 1 4 3 8 7 10
  • 8. 2nd Order LAGRANGE POLYNOMIAL INTERPOLATION Example: Find y at x = 2.5 n=3 thus 2nd order Lagrange f(x) = (𝒙−𝒙𝟐 )(𝒙−𝒙𝟑 ) 𝒙𝟏 −𝒙𝟐 (𝒙𝟏 −𝒙𝟑 ) y1 + (𝒙−𝒙𝟏 )(𝒙−𝒙𝟑 ) 𝒙𝟐 −𝒙𝟏 (𝒙𝟐 −𝒙𝟑 ) y2 + (𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 ) 𝒙𝟑 −𝒙𝟏 (𝒙𝟑 −𝒙𝟐 ) y3 = - 0.25 x2 + 3x + 1.25 if x = 2.5, then y should be 7.1875. X Y 1 4 3 8 7 10
  • 9. 3rd Order LAGRANGE POLYNOMIAL INTERPOLATION Example: Find y at x = 3 n=4 thus 3rd order Lagrange f(x) = (𝒙−𝒙𝟐 )(𝒙−𝒙𝟑 )(𝒙−𝒙𝟒 ) 𝒙𝟏 −𝒙𝟐 (𝒙𝟏 −𝒙𝟑 )(𝒙𝟏 −𝒙𝟒 ) y1 + (𝒙−𝒙𝟏 )(𝒙−𝒙𝟑 )(𝒙−𝒙𝟒 ) 𝒙𝟐 −𝒙𝟏 (𝒙𝟐 −𝒙𝟑 )(𝒙𝟐 −𝒙𝟒 ) y2 + (𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 )(𝒙−𝒙𝟒 ) 𝒙𝟑 −𝒙𝟏 (𝒙𝟑 −𝒙𝟐 )(𝒙𝟑 −𝒙𝟒 ) y3 + (𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 )(𝒙−𝒙𝟑 ) 𝒙𝟒 −𝒙𝟏 (𝒙𝟒 −𝒙𝟐 )(𝒙𝟒 −𝒙𝟑 ) y4 = 0.25 x3 – 1.5833x2 + 5x + 0.333 if x = 3, then y should be 7.833. X Y 1 4 2 6 4 11 5 17
  • 11. NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL INTERPOLATION DIVIDED DIFFERENCE INTERPOLATION  Numerical Interpolation method to find the coefficients of a curve fitting polynomial Newton’s polynomial  polynomials that we use to interpolate for a specified set of data. Advantage: faster, recursive, better
  • 12. NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL INTERPOLATION
  • 13. NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL INTERPOLATION
  • 14. Example: Find y at x = 2 # n=2, thus 1st order Equation f(x) = [f0] + [f0,1] (X – X0) X Y 1 3 4 8 NEWTON’S DIVIDED DIFFERENCE & POLYNOMIAL INTERPOLATION
  • 15. 2nd Order DIVIDED DIFFERENCE POLYNOMIAL INTERPOLATION Example: Find y at x = 2 n=3 thus 2nd order X Y 1 2 3 6 7 5
  • 16. 2nd Order DIVIDED DIFFERENCE POLYNOMIAL INTERPOLATION Example: Find y at x = 2 n=3 thus 2nd order X Y 1 2 3 6 7 5 If x=2, y=4.375
  • 18. GLOBAL VS LOCAL INTERPOLATION Interpolation  used to find continuous (& ideally smooth) functions from discrete data points Interpolating function f(x) Discrete data points Interpolation Process: Given data set Fit interpolating function for the given data set Use newly found function to find the output for any input (within domain) Y X
  • 19. GLOBAL VS LOCAL INTERPOLATION GLOBAL INTERPOLATION LOCAL INTERPOLATION Uses all supplied data to create the interpolating function; Single/Higher order polynomial Uses only a subset of all supplied data points Consists of lower order polynomials E.g. Lagrange Polynomials, Divided Difference E.g. Spline Interpolation Must use all data; Always gives the same answer Local Interpolation can use all or little of our supplied data (must all be continuous and connecting) Problem: Increase polynomial order = Increase error at edges of our equal distance input points Y X Global Polynomial 364th Order Local Polynomial 1st or 2nd Order
  • 21. TYPES OF SPLINE INTERPOLATIONS 1ST Order – Linear Spline 2nd Order – Cubic Spline More widely used Y Y1 Y0, Y2 X0 X1 X2 X Y Y1 Y0, Y2 X0 X1 X2 X
  • 22. LINEAR SPLINE INTERPOLATIONS 1ST Order – Linear Spline These often lead to knots/sharp changes in our function which is un-ideal as we want to smooth continuous functions P2(x) P1(x) We assume our function to be linear ** How de we go about finding P1(x) and a point along it? EACH SEGMENT IS SIMPLY A STRAIGHT LINE EQUATION Gen. Equation of Line: y = mx + b  P1(x) = Y1 + 𝑌2 −𝑌1 𝑋2 −𝑋1 (X – X1)  P2(x) = Y2 + 𝑌3 −𝑌2 𝑋3 −𝑋2 (X – X2) Y Y1 Y0, Y2 X0 X1 X2 X
  • 23. LINEAR SPLINE INTERPOLATIONS Given Find the necessary interpolating functions Find the outputs at x = 2, 5 and 10 P2(x) P1(x) Gen. Equation of Line: y = mx + b  P1(x) = 2 + 8−2 6−1 (X – 1) = 1.2x + 0.8 1 ≤ 𝑥 ≤ 6  P2(x) = 10 + 14−10 12−9 (X – 9) = 4 3 𝑥 - 2 @ x=2, use P1(x) y=3.2 9 ≤ 𝑥 ≤ 12 @ x=5, use P1(x) y=6.8 @ x=10, use P2(x) y=11.3333 X Y 1 2 6 8 7 6 9 10 12 14 20 41 Y X
  • 24. QUADRATIC SPLINE INTERPOLATIONS Given Find the necessary interpolating functions Find the outputs at x = 2, 4 and 7 P3(x) *** 3n equations P2(x) 3 splines = 9 unknowns P1(x) Write out General polynomials Identify unknowns Solve unknowns Plug in X-inputs X Y 1 2 3 3 5 9 8 10 Y X
  • 25. QUADRATIC SPLINE INTERPOLATIONS X Y 1 2 3 3 5 9 8 10 Y X P2(x) P1(x) P3(x) (1) Polynomials to find: P1(x) = a1 X2 + b1 X + c1 P2(x) = a2 X2 + b2 X + c2 P3(x) = a3 X2 + b3 X + c3 (2) 9 unknowns a1, b1, c1, a2, b2, c2, a3, b3, c3
  • 26. QUADRATIC SPLINE INTERPOLATIONS X Y 1 2 3 3 5 9 8 10 Y X P2(x) P1(x) P3(x) (3) At known points: 2n equations P1(x1) = y1  a1 (1)2 + b1 (1) + c1 = 2  a1 + b1 + c1 = 2 [1] P1(x2) = y2  a1 (3)2 + b1 (3) + c1 = 3  9a1 + 3b1 + c1 = 3 [2] P2(x2) = y2  a2 (3)2 + b2 (3) + c2 = 3  9a2 + 3b2 + c2 = 3 [3] P2(x3) = y3  a2 (5)2 + b2 (5) + c2 = 9  25a1 + 5b1 + c1 = 9 [4] P3(x3) = y3  a3 (5)2 + b3 (5) + c3 = 9  25a1 + 5b1 + c1 = 9 [5] P3(x4) = y4  a3 (8)2 + b3 (8) + c3 = 10  64a1 + 8b1 + c1 = 10 [6]
  • 27. QUADRATIC SPLINE INTERPOLATIONS X Y 1 2 3 3 5 9 8 10 Y X P2(x) P1(x) P3(x) (4) At interior data points: n-1 equations 𝑑P1(x) 𝑑𝑥 |x=x2 = 𝑑P2(x) 𝑑𝑥 |x=x2 𝑑 𝑑𝑥 (a1 X2 + b1 X + c1)|x=x2 = 𝑑 𝑑𝑥 (a2 X2 + b2 X + c2)|x=x2 6a1 + b1 – 6a2 – b2 = 0 [7] 𝑑P2(x) 𝑑𝑥 |x=x3 = 𝑑P3(x) 𝑑𝑥 |x=x3 𝑑 𝑑𝑥 (a2 X2 + b2 X + c2)|x=x3 = 𝑑 𝑑𝑥 (a3 X2 + b3 X + c3)|x=x3 10a2 + b2 – 10a3 – b3 = 0 [8]
  • 28. QUADRATIC SPLINE INTERPOLATIONS X Y 1 2 3 3 5 9 8 10 Y X P2(x) P1(x) P3(x) (5) Make an assumption: 1 equation 𝑑2P1(x) 𝑑𝑥 |x=x1 = 0 𝑑 𝑑𝑥 (2a1 X + b1)|x=x1 2a1 = 0 [9]
  • 29. QUADRATIC SPLINE INTERPOLATIONS 1 1 1 9 3 1 0 0 0 0 0 0 0 0 0 9 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 1 0 0 0 0 2 0 0 25 5 1 0 0 0 0 0 0 −6 −1 1 10 1 0 0 0 0 0 0 0 25 5 1 64 8 1 1 1 1 9 3 1 0 0 0 a1 b1 c1 a2 b2 c2 a3 b3 c3 = 2 3 3 9 9 10 0 0 0 a1 b1 c1 a2 b2 c2 a3 b3 c3 = 0 0.5 1.5 1.25 -7 12.75 -1.72 22.72 -61.5 Solving for x=2, 4, 7 P1(x) = 0 X2 + 0.5 X + 1.5 1 ≤ 𝑥 ≤ 3 P2(x) = 1.25 X2 - 7 X + 12.75 3 ≤ 𝑥 ≤ 5 P3(x) = -1.72 X2 + 22.72 X - 61.5 5 ≤ 𝑥 ≤ 8 P1(2) = 0.5 (2) + 1.5 = 2.5 P2(4) = 1.25 (4)2 – 7 (4)+ 12.75 = 4.75 P3(x) = -1.72 (7)2 + 22.72 (7) – 61.5 = 13.15
  • 30. ATA [B] = AT [C] = = = f(x) = -5 + 5X = Y @ X=2.2 … Y = 6 LEAST SQUARE APPROXIMATIONS f(x) = b0 + b1 X = Y b0 + 2b1 = 5 b0 + 3b1 = 10 f(x) = Ax = y  No Solution! Thus, ATA [B] = AT [C] b0 + 2b1 = 5 b0 + 3b1 = 10 1 2 1 3 = X Y 2 5 3 10 Y X b0 b1 5 10 1 2 1 3 b0 b1 5 10 1 1 2 3 1 1 2 3 2 5 5 13 b0 b1 15 40 b0 b1 -5 5