SlideShare a Scribd company logo
1 of 20
Download to read offline
St. John's University of Tanzania
MAT210 NUMERICAL ANALYSIS
2013/14 Semester II
INTERPOLATION
Splines
Kaw, Chapter 5.05
MAT210 2013/14 Sem II 2 of 20
● Direct, Newton Divided Difference &
Lagrangian Interpolation
●
Two approaches for finding the same nth order
polynomial fit for all points in an data set
● Is splines just another way to do the same
●
NO!
● It is Piecewise polynomial interpolation
● Each piece can be linear, quadratic or cubic
Introduction
MAT210 2013/14 Sem II 3 of 20
How do we avoid this?
MAT210 2013/14 Sem II 4 of 20
By observing
● This function has distinct regions
●
The interval from x ≈ -1 to -0.5
● The interval from x ≈ -0.5 to -0.1
● The interval from x ≈ -0.1 to +0.1
● The interval from x ≈ 0.1 to 0.5
● The interval from x ≈ 0.5 to 1
Though there is some symmetry...
● It would be better to fit different functions
to different intervals
MAT210 2013/14 Sem II 5 of 20
Piecewise Polynomials
Rather than interpolating n+1 points with a
single polynomial of degree n, put different
polynomials on each interval
S(x)=
{
s0
(x) , x∈[x0
,x1)
s1
(x) , x∈[x1,
x2)
⋮
sn−1
(x) , x∈[xn−1
, xn]}where the sj are polynomials of (usually) small degree
MAT210 2013/14 Sem II 6 of 20
Interpretation
● Piecewise linear = connect the dots
●
Piecewise quadratic
= parabolas between the dots
● But wait
●
Two points uniquely define a line
– linear is understandable
●
Three points are needed for a parabola
– How is the other degree of freedom set?
MAT210 2013/14 Sem II 7 of 20
Splines
● In the connect the dots linear case,
the curve is not “smooth”
●
Add “smoothness” into the requirement
● Draftsmen achieved this smoothness with
splines - a flexible strip of metal or wood
MAT210 2013/14 Sem II 8 of 20
Splines
● In the connect the dots linear case,
the curve is not “smooth”
●
Add “smoothness” into the requirement
● Draftsmen achieved this smoothness with
splines - a flexible strip of metal or wood
●
Mathematicians achieve it by matching
derivatives at the end points of the intervals
MAT210 2013/14 Sem II 9 of 20
Linear Splines
MAT210 2013/14 Sem II 10 of 20
Linear Splines
Slope between points
MAT210 2013/14 Sem II 11 of 20
v(16) … Again
The linear case is unchanged
No surprise there
MAT210 2013/14 Sem II 12 of 20
Quadratic Splines
● Now things get interesting
● How to find all the coefficients?
●
3n coefficients, n equations, n continuity at
end points, whence the other n?
MAT210 2013/14 Sem II 13 of 20
2n from continuity
Each curve must pass through both endpoints
MAT210 2013/14 Sem II 14 of 20
n-1 from smoothness
a1
x
2
+b1
x+c1
⇒2a1
x+b1
a2
x2
+b2
x+c2
⇒2a2
x+b2
Must match at n-1 interior points
2 a1
xi
+b1
=2a2
xi
+b2
∀ i ∈ [1 ,n−1]
MAT210 2013/14 Sem II 15 of 20
One more assumption
● This is 3n unknowns and 3n -1 equations
●
Need to set one more condition
● Generally set the first spline to be linear
● a1 = 0
●
Now use any technique to solve
simultaneous linear equations
MAT210 2013/14 Sem II 16 of 20
Revisiting the Rocket
MAT210 2013/14 Sem II 17 of 20
The continuous derivatives
The draftsman is bending his spline!
MAT210 2013/14 Sem II 18 of 20
The Final Matrix
MAT210 2013/14 Sem II 19 of 20
The Solution
MAT210 2013/14 Sem II 20 of 20
Going Deeper
● The overall curve is smooth and the
accuracy can be quite good
●
Cubic is better, more common
– See that next time
● What about finding the distance traveled?
●
From 11 to 14s?
● From 11 to 16s?
● From 0 to 30s?

More Related Content

What's hot

Solving Quadratics by Completing the Square
Solving Quadratics by Completing the SquareSolving Quadratics by Completing the Square
Solving Quadratics by Completing the Square
swartzje
 
March 31, 2014
March 31, 2014March 31, 2014
March 31, 2014
khyps13
 
February 3, 2015
February 3, 2015February 3, 2015
February 3, 2015
khyps13
 
Multiplying polynomials
Multiplying polynomialsMultiplying polynomials
Multiplying polynomials
41326204
 
5.5 parallel perp lines
5.5 parallel perp lines5.5 parallel perp lines
5.5 parallel perp lines
cageke
 
7 1solve By Graphing
7 1solve By Graphing7 1solve By Graphing
7 1solve By Graphing
taco40
 
Slope and y intercept
Slope and y interceptSlope and y intercept
Slope and y intercept
billingssr
 

What's hot (20)

Solving Quadratics by Completing the Square
Solving Quadratics by Completing the SquareSolving Quadratics by Completing the Square
Solving Quadratics by Completing the Square
 
March 31, 2014
March 31, 2014March 31, 2014
March 31, 2014
 
Math1000 section2.2
Math1000 section2.2Math1000 section2.2
Math1000 section2.2
 
Completing the square
Completing the squareCompleting the square
Completing the square
 
Diapositivas yahir villamizar
Diapositivas yahir villamizarDiapositivas yahir villamizar
Diapositivas yahir villamizar
 
N queen puzzle
N queen puzzleN queen puzzle
N queen puzzle
 
1.3.2C Equations of Lines
1.3.2C Equations of Lines1.3.2C Equations of Lines
1.3.2C Equations of Lines
 
Identifying slope and y intercept
Identifying slope and y interceptIdentifying slope and y intercept
Identifying slope and y intercept
 
Writing linear equations
Writing linear equationsWriting linear equations
Writing linear equations
 
Diapositivas yahir villamizar
Diapositivas yahir villamizarDiapositivas yahir villamizar
Diapositivas yahir villamizar
 
February 3, 2015
February 3, 2015February 3, 2015
February 3, 2015
 
Multiplying polynomials
Multiplying polynomialsMultiplying polynomials
Multiplying polynomials
 
Mod 4 Project by Mateo C
Mod 4 Project by Mateo CMod 4 Project by Mateo C
Mod 4 Project by Mateo C
 
5.5 parallel perp lines
5.5 parallel perp lines5.5 parallel perp lines
5.5 parallel perp lines
 
Equations of graphs
Equations of graphsEquations of graphs
Equations of graphs
 
Graphing lines using slopeintercept
Graphing lines using slopeinterceptGraphing lines using slopeintercept
Graphing lines using slopeintercept
 
Algebraic expressions
Algebraic expressionsAlgebraic expressions
Algebraic expressions
 
7 1solve By Graphing
7 1solve By Graphing7 1solve By Graphing
7 1solve By Graphing
 
Synthetic Division
Synthetic DivisionSynthetic Division
Synthetic Division
 
Slope and y intercept
Slope and y interceptSlope and y intercept
Slope and y intercept
 

Similar to SJUT/MAT210/Interpolation/Splines 2013-14S2

SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2
John Ham
 

Similar to SJUT/MAT210/Interpolation/Splines 2013-14S2 (7)

SJUT/Mat210/Regression/Linear 2013-14S2
SJUT/Mat210/Regression/Linear 2013-14S2SJUT/Mat210/Regression/Linear 2013-14S2
SJUT/Mat210/Regression/Linear 2013-14S2
 
SJUT/Mat210/Interpolation/Direct 2013-14S2
SJUT/Mat210/Interpolation/Direct 2013-14S2SJUT/Mat210/Interpolation/Direct 2013-14S2
SJUT/Mat210/Interpolation/Direct 2013-14S2
 
SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14
 
MAT210/DiffEq/ODE/FiniteDiff 2013-14
MAT210/DiffEq/ODE/FiniteDiff 2013-14MAT210/DiffEq/ODE/FiniteDiff 2013-14
MAT210/DiffEq/ODE/FiniteDiff 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
 
ohu.pptx
ohu.pptxohu.pptx
ohu.pptx
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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...
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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
 
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
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.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
 

SJUT/MAT210/Interpolation/Splines 2013-14S2

  • 1. St. John's University of Tanzania MAT210 NUMERICAL ANALYSIS 2013/14 Semester II INTERPOLATION Splines Kaw, Chapter 5.05
  • 2. MAT210 2013/14 Sem II 2 of 20 ● Direct, Newton Divided Difference & Lagrangian Interpolation ● Two approaches for finding the same nth order polynomial fit for all points in an data set ● Is splines just another way to do the same ● NO! ● It is Piecewise polynomial interpolation ● Each piece can be linear, quadratic or cubic Introduction
  • 3. MAT210 2013/14 Sem II 3 of 20 How do we avoid this?
  • 4. MAT210 2013/14 Sem II 4 of 20 By observing ● This function has distinct regions ● The interval from x ≈ -1 to -0.5 ● The interval from x ≈ -0.5 to -0.1 ● The interval from x ≈ -0.1 to +0.1 ● The interval from x ≈ 0.1 to 0.5 ● The interval from x ≈ 0.5 to 1 Though there is some symmetry... ● It would be better to fit different functions to different intervals
  • 5. MAT210 2013/14 Sem II 5 of 20 Piecewise Polynomials Rather than interpolating n+1 points with a single polynomial of degree n, put different polynomials on each interval S(x)= { s0 (x) , x∈[x0 ,x1) s1 (x) , x∈[x1, x2) ⋮ sn−1 (x) , x∈[xn−1 , xn]}where the sj are polynomials of (usually) small degree
  • 6. MAT210 2013/14 Sem II 6 of 20 Interpretation ● Piecewise linear = connect the dots ● Piecewise quadratic = parabolas between the dots ● But wait ● Two points uniquely define a line – linear is understandable ● Three points are needed for a parabola – How is the other degree of freedom set?
  • 7. MAT210 2013/14 Sem II 7 of 20 Splines ● In the connect the dots linear case, the curve is not “smooth” ● Add “smoothness” into the requirement ● Draftsmen achieved this smoothness with splines - a flexible strip of metal or wood
  • 8. MAT210 2013/14 Sem II 8 of 20 Splines ● In the connect the dots linear case, the curve is not “smooth” ● Add “smoothness” into the requirement ● Draftsmen achieved this smoothness with splines - a flexible strip of metal or wood ● Mathematicians achieve it by matching derivatives at the end points of the intervals
  • 9. MAT210 2013/14 Sem II 9 of 20 Linear Splines
  • 10. MAT210 2013/14 Sem II 10 of 20 Linear Splines Slope between points
  • 11. MAT210 2013/14 Sem II 11 of 20 v(16) … Again The linear case is unchanged No surprise there
  • 12. MAT210 2013/14 Sem II 12 of 20 Quadratic Splines ● Now things get interesting ● How to find all the coefficients? ● 3n coefficients, n equations, n continuity at end points, whence the other n?
  • 13. MAT210 2013/14 Sem II 13 of 20 2n from continuity Each curve must pass through both endpoints
  • 14. MAT210 2013/14 Sem II 14 of 20 n-1 from smoothness a1 x 2 +b1 x+c1 ⇒2a1 x+b1 a2 x2 +b2 x+c2 ⇒2a2 x+b2 Must match at n-1 interior points 2 a1 xi +b1 =2a2 xi +b2 ∀ i ∈ [1 ,n−1]
  • 15. MAT210 2013/14 Sem II 15 of 20 One more assumption ● This is 3n unknowns and 3n -1 equations ● Need to set one more condition ● Generally set the first spline to be linear ● a1 = 0 ● Now use any technique to solve simultaneous linear equations
  • 16. MAT210 2013/14 Sem II 16 of 20 Revisiting the Rocket
  • 17. MAT210 2013/14 Sem II 17 of 20 The continuous derivatives The draftsman is bending his spline!
  • 18. MAT210 2013/14 Sem II 18 of 20 The Final Matrix
  • 19. MAT210 2013/14 Sem II 19 of 20 The Solution
  • 20. MAT210 2013/14 Sem II 20 of 20 Going Deeper ● The overall curve is smooth and the accuracy can be quite good ● Cubic is better, more common – See that next time ● What about finding the distance traveled? ● From 11 to 14s? ● From 11 to 16s? ● From 0 to 30s?