SlideShare a Scribd company logo
1 of 15
Download to read offline
St. John's University of Tanzania
MAT210 NUMERICAL ANALYSIS
2013/14 Semester II
INTERPOLATION
Introduction and Direct Method
Kaw, Chapter 5.01-5.02
MAT210 2013/14 Sem II 2 of 15
● Interpolation
● Approximating data points within the range of a discrete set of known
data points (wikipedia)
● Example: Boiling point of water (BP)
– 102.3C@110kPa, 111.4C@150kPa
– BP@130kPa is about 1/2 way between, i.e. 106.8C
– Actually it is 107.1C, εt = 0.3%... not bad
● Interpolation of functions
● Approximating a complex or unknown function with a simpler function
– simpler function usually a polynomial
● sometimes use exponential or trigonometric functions
Introduction
MAT210 2013/14 Sem II 3 of 15
Some background
● Approximating a function is more useful than
approximating a value
● Why?
● Function yields value, but also any other value in the range
● Function can be
– Differentiated
– Integrated
– Used in advanced methods, such as solving differential equations
MAT210 2013/14 Sem II 4 of 15
Why a polynomial?
● Easy to evaluate
● Easy to differentiate
● Easy to integrate
● … and what is the Taylor Series?
A POLYNOMIAL!
f (x) = ∑
i=0
n
ai x
i
f ' (x) = ∑
i=1
n
i ai xi−1
∫ f (x)dx = ∑
i=0
n
ai x
i+1
i+1
+C
MAT210 2013/14 Sem II 5 of 15
Interpolation vs Extrapolation
● Interpolation approximating inside range
● Extrapolation is outside
● Interpolation
● Error can be bounded or approximated
● “Safe”
● Extrapolation
● “Dangerous”
● More on this later
MAT210 2013/14 Sem II 6 of 15
Methods
● Linear, quadratic, cubic functions (f)
● Rarely go beyond cubic (why?)
● Fitting a single f on the entire range
● Direct
● Newton Divided Difference
● Lagrangian
● Fitting multiple f on subsets of the range
● Splines
MAT210 2013/14 Sem II 7 of 15
Direct Method
● With n+1 points, fit an nth order polynomial
● 1st order: A line has two parameters, so there must be
two equations – two points – to find them both
● And so on
● The method is simply solving n+1 simultaneous
linear equations
● It is linear algebra, which you know
● If not, read Kaw, Chapter 4 for a refresher
MAT210 2013/14 Sem II 8 of 15
Thoughts on points and order
● It is not necessary to use all the points in a range to
determine the polynomial
● Choosing points and the order is a bit of an “art”
but looking at a graph of the data, or knowing
something about the underlying model of the
phenomena can help
● “A picture is worth a thousand words”
MAT210 2013/14 Sem II 9 of 15
Example: Velocity
MAT210 2013/14 Sem II 10 of 15
Graphical View
MAT210 2013/14 Sem II 11 of 15
Linear
MAT210 2013/14 Sem II 12 of 15
Find v(16)
● Two closest points t=15 and t=20
MAT210 2013/14 Sem II 13 of 15
Quadratic
MAT210 2013/14 Sem II 14 of 15
Find a better v(16)
● Use t=10,15,20 (Why?)
MAT210 2013/14 Sem II 15 of 15
How much better?
● Use relative approximate error (Why?)
● The assumption is that quadratic is more accurate
than linear
|ϵa|=
|vquadratic−vlinear
vquadratic
|

More Related Content

Similar to SJUT/Mat210/Interpolation/Direct 2013-14S2

12 boundary value problem
12 boundary value problem12 boundary value problem
12 boundary value problem
Mohammad Tawfik
 

Similar to SJUT/Mat210/Interpolation/Direct 2013-14S2 (8)

SJUT/MAT210/Interpolation/Splines 2013-14S2
SJUT/MAT210/Interpolation/Splines 2013-14S2SJUT/MAT210/Interpolation/Splines 2013-14S2
SJUT/MAT210/Interpolation/Splines 2013-14S2
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14
 
MAT210/DiffEq/Runge-Kutta 2nd Order 2013-14
MAT210/DiffEq/Runge-Kutta 2nd Order 2013-14MAT210/DiffEq/Runge-Kutta 2nd Order 2013-14
MAT210/DiffEq/Runge-Kutta 2nd Order 2013-14
 
MAT210/DiffEq/ODE/Euler 2013-14
MAT210/DiffEq/ODE/Euler 2013-14MAT210/DiffEq/ODE/Euler 2013-14
MAT210/DiffEq/ODE/Euler 2013-14
 
12 boundary value problem
12 boundary value problem12 boundary value problem
12 boundary value problem
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applications
 
MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14
 
論文輪読資料「Gated Feedback Recurrent Neural Networks」
論文輪読資料「Gated Feedback Recurrent Neural Networks」論文輪読資料「Gated Feedback Recurrent Neural Networks」
論文輪読資料「Gated Feedback Recurrent Neural Networks」
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

SJUT/Mat210/Interpolation/Direct 2013-14S2

  • 1. St. John's University of Tanzania MAT210 NUMERICAL ANALYSIS 2013/14 Semester II INTERPOLATION Introduction and Direct Method Kaw, Chapter 5.01-5.02
  • 2. MAT210 2013/14 Sem II 2 of 15 ● Interpolation ● Approximating data points within the range of a discrete set of known data points (wikipedia) ● Example: Boiling point of water (BP) – 102.3C@110kPa, 111.4C@150kPa – BP@130kPa is about 1/2 way between, i.e. 106.8C – Actually it is 107.1C, εt = 0.3%... not bad ● Interpolation of functions ● Approximating a complex or unknown function with a simpler function – simpler function usually a polynomial ● sometimes use exponential or trigonometric functions Introduction
  • 3. MAT210 2013/14 Sem II 3 of 15 Some background ● Approximating a function is more useful than approximating a value ● Why? ● Function yields value, but also any other value in the range ● Function can be – Differentiated – Integrated – Used in advanced methods, such as solving differential equations
  • 4. MAT210 2013/14 Sem II 4 of 15 Why a polynomial? ● Easy to evaluate ● Easy to differentiate ● Easy to integrate ● … and what is the Taylor Series? A POLYNOMIAL! f (x) = ∑ i=0 n ai x i f ' (x) = ∑ i=1 n i ai xi−1 ∫ f (x)dx = ∑ i=0 n ai x i+1 i+1 +C
  • 5. MAT210 2013/14 Sem II 5 of 15 Interpolation vs Extrapolation ● Interpolation approximating inside range ● Extrapolation is outside ● Interpolation ● Error can be bounded or approximated ● “Safe” ● Extrapolation ● “Dangerous” ● More on this later
  • 6. MAT210 2013/14 Sem II 6 of 15 Methods ● Linear, quadratic, cubic functions (f) ● Rarely go beyond cubic (why?) ● Fitting a single f on the entire range ● Direct ● Newton Divided Difference ● Lagrangian ● Fitting multiple f on subsets of the range ● Splines
  • 7. MAT210 2013/14 Sem II 7 of 15 Direct Method ● With n+1 points, fit an nth order polynomial ● 1st order: A line has two parameters, so there must be two equations – two points – to find them both ● And so on ● The method is simply solving n+1 simultaneous linear equations ● It is linear algebra, which you know ● If not, read Kaw, Chapter 4 for a refresher
  • 8. MAT210 2013/14 Sem II 8 of 15 Thoughts on points and order ● It is not necessary to use all the points in a range to determine the polynomial ● Choosing points and the order is a bit of an “art” but looking at a graph of the data, or knowing something about the underlying model of the phenomena can help ● “A picture is worth a thousand words”
  • 9. MAT210 2013/14 Sem II 9 of 15 Example: Velocity
  • 10. MAT210 2013/14 Sem II 10 of 15 Graphical View
  • 11. MAT210 2013/14 Sem II 11 of 15 Linear
  • 12. MAT210 2013/14 Sem II 12 of 15 Find v(16) ● Two closest points t=15 and t=20
  • 13. MAT210 2013/14 Sem II 13 of 15 Quadratic
  • 14. MAT210 2013/14 Sem II 14 of 15 Find a better v(16) ● Use t=10,15,20 (Why?)
  • 15. MAT210 2013/14 Sem II 15 of 15 How much better? ● Use relative approximate error (Why?) ● The assumption is that quadratic is more accurate than linear |ϵa|= |vquadratic−vlinear vquadratic |