SlideShare a Scribd company logo
1 of 9
Download to read offline
Cubic Spline Interpolation
Dr. Varun Kumar
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 1 / 9
Outlines
1 Introduction to Splines
2 Cubic splines
3 Example
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 2 / 9
Introduction to Splines
Important points
⇒ Quality of interpolation increases with increasing degree n of the
polynomial used.
⇒ Above statement is not absolutely true for very large n.
⇒ For various function, the corresponding interpolation polynomials may
tend to oscillate more between the nodes causes numerical instability.
Figure: Runge’s example f (x) = 1
1+x2 and interpolation polynomial P10(x)
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 3 / 9
Continued–
⇒ Such oscillations are avoided by the method of splines.
⇒ Given f (x) on J, we partition J uniformly
a = x0 < x1.....xn = b (1)
⇒ We require the function g(x), which will interpolate f (x) on J.
⇒ Thus g(x0) = f (x0), ...., g(xn) = f (xn)
⇒ Obtained g(x) is called spline.
⇒ If f (x) is given on a 5 x 5 b and a partition (1) has been chosen, we
obtain a cubic spline g(x) that approximate f (x) by acquiring that
g(x0) = f (x0) = f0, g(x1) = f (x1) = f1, g(xn) = f (xn) = fn, (2)
g0
(x0) = k0 g0
(xn) = kn (3)
⇒ Note: k0 and kn are given number
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 4 / 9
Cubic splines
Theorem 1: Let f (x) be defined on the interval a 5 x 5 b, let a partition
(1) be given, and let k0 and kn be any two given numbers. Then there
exists one and only one cubic spline g(x) corresponding to (1) and
satisfying (2) and (3)
Important Results:
(1) cj−1kj−1 + 2(cj−1 + cj )kj + cj kj+1 = 3
h
c2
j−1∇fj + c2
j ∇fj+1
i
(2) Determination of splines for equidistant nodes
kj−1 + 4kj + kj+1 =
3
h
(fj+1 − fj−1)
(3) Determination of splines
pj (x) = aj0 + aj1(x − xj ) + aj2(x − xj )2
+ aj3(x − xj )3
∀ xj 5 x 5 xj+1
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 5 / 9
Continued–
(4) aj0 = pj (xj ) = fj
(5) aj1 = p0
j (xj ) = kj
(6) aj2 = 1
2p00
j (xj ) = 3
h2 (fj+1 − fj ) − 1
h (kj+1 + 2kj )
(7) aj3 = 1
6p000
j (xj ) = 2
h3 (fj − fj+1) + 1
h2 (kj+1 + kj )
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 6 / 9
Example:
Q Interpolate f (x) = x4 on the interval −1 5 x 5 1 by cubic spline
g(x) corresponding to the partition x0 = −1, x1 = 0, x2 = 1 and
satisfying the clamped conditions g0(−1) = f 0(−1), g0(1) = f 0(1)
Ans According to question
f0 = f (−1) = 1, f1 = f (0) = 0, f2 = f (1) = 1. The given interval is
partitioned into n = 2 parts and h = 1. Hence spline g consists of
n = 2 polynomial.
p0(x) = a00 + a01(x + 1) + a02(x + 1)2
+ a03(x + 1)3
− 1 5 x 5 0
p1(x) = a10 + a11x + a12x2
+ a13x3
0 5 x 5 1
Step 1: Our goal is to determine p0(x) and p1(x). Since n = 2, let j = 1 then
k0 + 4k1 + k2 =
3
1
(f2 − f0)
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 7 / 9
Continued–
Now p0
0(x0) = k0 and p0
1(x2) = k2. But g = p0 at x0 = −1 and g = p1 at
x2 = 1. Hence, as given (g0 = f 0 at ±1)
f 0
(−1) = −4 = g0
(−1) = p0
0(−1) = k0, f 0
(1) = 4 = g0
(1) = p0
1(1) = k2
Substitution of k0 = −4 and k2 = 4 ⇒ k1 = 0
Step 2: We can now obtain the coefficient of p0.
a00 = f0 = 1, a01 = k0 = −4
a02 = 3
12 (f1 − f0) − 1
1(k1 + 2k0) = 5
a03 = 2
13 (f0 − f1) + 1
12 (k1 + k0) = −2
Similarly a10 = f1 = 0, a11 = k1 = 0, a12 = −1, a13 = 2
This gives the polynomial
p0(x) = 1 − 4(x + 1) + 5(x + 1)2
− 2(x + 1)3
= −x2
− 2x3
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 8 / 9
Continued–
p1(x) = −x2
+ 2x3
or
g(x) = −x2
− 2x3
if − 1 5 x 5 0
= −x2
+ 2x3
if 0 5 x 5 1
Figure: Function f (x) = x4
and cubic spline g(x)
Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 9 / 9

More Related Content

What's hot

Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
Complex Numbers and Functions. Complex Differentiation
Complex Numbers and Functions. Complex DifferentiationComplex Numbers and Functions. Complex Differentiation
Complex Numbers and Functions. Complex DifferentiationHesham Ali
 
introduction to Numerical Analysis
introduction to Numerical Analysisintroduction to Numerical Analysis
introduction to Numerical AnalysisGhulam Mehdi Sahito
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applicationsRinkuMonani
 
Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference FormulationSohaib H. Khan
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical AnalysisMohammad Tawfik
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Minhas Kamal
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson MethodJigisha Dabhi
 
Lu decomposition
Lu decompositionLu decomposition
Lu decompositiongilandio
 
Regula Falsi (False position) Method
Regula Falsi (False position) MethodRegula Falsi (False position) Method
Regula Falsi (False position) MethodIsaac Yowetu
 
Numerical integration
Numerical integrationNumerical integration
Numerical integrationSunny Chauhan
 

What's hot (20)

Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
newton raphson method
newton raphson methodnewton raphson method
newton raphson method
 
Inverse laplace transforms
Inverse laplace transformsInverse laplace transforms
Inverse laplace transforms
 
Complex Numbers and Functions. Complex Differentiation
Complex Numbers and Functions. Complex DifferentiationComplex Numbers and Functions. Complex Differentiation
Complex Numbers and Functions. Complex Differentiation
 
introduction to Numerical Analysis
introduction to Numerical Analysisintroduction to Numerical Analysis
introduction to Numerical Analysis
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applications
 
Bisection method
Bisection methodBisection method
Bisection method
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Lagrange’s interpolation formula
Lagrange’s interpolation formulaLagrange’s interpolation formula
Lagrange’s interpolation formula
 
Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference Formulation
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
 
Bisection method
Bisection methodBisection method
Bisection method
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
 
Lu decomposition
Lu decompositionLu decomposition
Lu decomposition
 
Regula Falsi (False position) Method
Regula Falsi (False position) MethodRegula Falsi (False position) Method
Regula Falsi (False position) Method
 
Fourier series and transforms
Fourier series and transformsFourier series and transforms
Fourier series and transforms
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 

Similar to Cubic Spline Interpolation

Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference InterpolationVARUN KUMAR
 
Newton's Divide and Difference Interpolation
Newton's Divide and Difference InterpolationNewton's Divide and Difference Interpolation
Newton's Divide and Difference InterpolationVARUN KUMAR
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdfTessydee
 
Gaussian Numerical Integration
Gaussian Numerical IntegrationGaussian Numerical Integration
Gaussian Numerical IntegrationVARUN KUMAR
 
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
 
Sbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSaidatina Khadijah
 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdfIILSASTOWER
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONshahzadebaujiti
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Maths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdfMaths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdfAnuBajpai5
 
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA Gautham Rajesh
 
Aieee 2012 Solved Paper by Prabhat Gaurav
Aieee 2012 Solved Paper by Prabhat GauravAieee 2012 Solved Paper by Prabhat Gaurav
Aieee 2012 Solved Paper by Prabhat GauravSahil Gaurav
 

Similar to Cubic Spline Interpolation (20)

Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
 
final15
final15final15
final15
 
Maths05
Maths05Maths05
Maths05
 
Newton's Divide and Difference Interpolation
Newton's Divide and Difference InterpolationNewton's Divide and Difference Interpolation
Newton's Divide and Difference Interpolation
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdf
 
Gaussian Numerical Integration
Gaussian Numerical IntegrationGaussian Numerical Integration
Gaussian Numerical Integration
 
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
 
final19
final19final19
final19
 
Sbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSbma 4603 numerical methods Assignment
Sbma 4603 numerical methods Assignment
 
Ece3075 a 8
Ece3075 a 8Ece3075 a 8
Ece3075 a 8
 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdf
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTION
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Maths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdfMaths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdf
 
Maths04
Maths04Maths04
Maths04
 
Maths 301 key_sem_1_2009_2010
Maths 301 key_sem_1_2009_2010Maths 301 key_sem_1_2009_2010
Maths 301 key_sem_1_2009_2010
 
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA
CBSE XII MATHS SAMPLE PAPER BY KENDRIYA VIDYALAYA
 
Aieee 2012 Solved Paper by Prabhat Gaurav
Aieee 2012 Solved Paper by Prabhat GauravAieee 2012 Solved Paper by Prabhat Gaurav
Aieee 2012 Solved Paper by Prabhat Gaurav
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 

More from VARUN KUMAR

Distributed rc Model
Distributed rc ModelDistributed rc Model
Distributed rc ModelVARUN KUMAR
 
Electrical Wire Model
Electrical Wire ModelElectrical Wire Model
Electrical Wire ModelVARUN KUMAR
 
Interconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignInterconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignVARUN KUMAR
 
Introduction to Digital VLSI Design
Introduction to Digital VLSI DesignIntroduction to Digital VLSI Design
Introduction to Digital VLSI DesignVARUN KUMAR
 
Challenges of Massive MIMO System
Challenges of Massive MIMO SystemChallenges of Massive MIMO System
Challenges of Massive MIMO SystemVARUN KUMAR
 
E-democracy or Digital Democracy
E-democracy or Digital DemocracyE-democracy or Digital Democracy
E-democracy or Digital DemocracyVARUN KUMAR
 
Ethics of Parasitic Computing
Ethics of Parasitic ComputingEthics of Parasitic Computing
Ethics of Parasitic ComputingVARUN KUMAR
 
Action Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionAction Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionVARUN KUMAR
 
Geneva Plan of Action
Geneva Plan of ActionGeneva Plan of Action
Geneva Plan of ActionVARUN KUMAR
 
Fair Use in the Electronic Age
Fair Use in the Electronic AgeFair Use in the Electronic Age
Fair Use in the Electronic AgeVARUN KUMAR
 
Software as a Property
Software as a PropertySoftware as a Property
Software as a PropertyVARUN KUMAR
 
Orthogonal Polynomial
Orthogonal PolynomialOrthogonal Polynomial
Orthogonal PolynomialVARUN KUMAR
 
Patent Protection
Patent ProtectionPatent Protection
Patent ProtectionVARUN KUMAR
 
Copyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawCopyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawVARUN KUMAR
 
Property Right and Software
Property Right and SoftwareProperty Right and Software
Property Right and SoftwareVARUN KUMAR
 
Investigating Data Trials
Investigating Data TrialsInvestigating Data Trials
Investigating Data TrialsVARUN KUMAR
 
Censorship and Controversy
Censorship and ControversyCensorship and Controversy
Censorship and ControversyVARUN KUMAR
 
Romberg's Integration
Romberg's IntegrationRomberg's Integration
Romberg's IntegrationVARUN KUMAR
 
Introduction to Censorship
Introduction to Censorship Introduction to Censorship
Introduction to Censorship VARUN KUMAR
 
Protect your online privacy-2
Protect your online privacy-2Protect your online privacy-2
Protect your online privacy-2VARUN KUMAR
 

More from VARUN KUMAR (20)

Distributed rc Model
Distributed rc ModelDistributed rc Model
Distributed rc Model
 
Electrical Wire Model
Electrical Wire ModelElectrical Wire Model
Electrical Wire Model
 
Interconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignInterconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI Design
 
Introduction to Digital VLSI Design
Introduction to Digital VLSI DesignIntroduction to Digital VLSI Design
Introduction to Digital VLSI Design
 
Challenges of Massive MIMO System
Challenges of Massive MIMO SystemChallenges of Massive MIMO System
Challenges of Massive MIMO System
 
E-democracy or Digital Democracy
E-democracy or Digital DemocracyE-democracy or Digital Democracy
E-democracy or Digital Democracy
 
Ethics of Parasitic Computing
Ethics of Parasitic ComputingEthics of Parasitic Computing
Ethics of Parasitic Computing
 
Action Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionAction Lines of Geneva Plan of Action
Action Lines of Geneva Plan of Action
 
Geneva Plan of Action
Geneva Plan of ActionGeneva Plan of Action
Geneva Plan of Action
 
Fair Use in the Electronic Age
Fair Use in the Electronic AgeFair Use in the Electronic Age
Fair Use in the Electronic Age
 
Software as a Property
Software as a PropertySoftware as a Property
Software as a Property
 
Orthogonal Polynomial
Orthogonal PolynomialOrthogonal Polynomial
Orthogonal Polynomial
 
Patent Protection
Patent ProtectionPatent Protection
Patent Protection
 
Copyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawCopyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy Law
 
Property Right and Software
Property Right and SoftwareProperty Right and Software
Property Right and Software
 
Investigating Data Trials
Investigating Data TrialsInvestigating Data Trials
Investigating Data Trials
 
Censorship and Controversy
Censorship and ControversyCensorship and Controversy
Censorship and Controversy
 
Romberg's Integration
Romberg's IntegrationRomberg's Integration
Romberg's Integration
 
Introduction to Censorship
Introduction to Censorship Introduction to Censorship
Introduction to Censorship
 
Protect your online privacy-2
Protect your online privacy-2Protect your online privacy-2
Protect your online privacy-2
 

Recently uploaded

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 

Recently uploaded (20)

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

Cubic Spline Interpolation

  • 1. Cubic Spline Interpolation Dr. Varun Kumar Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 1 / 9
  • 2. Outlines 1 Introduction to Splines 2 Cubic splines 3 Example Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 2 / 9
  • 3. Introduction to Splines Important points ⇒ Quality of interpolation increases with increasing degree n of the polynomial used. ⇒ Above statement is not absolutely true for very large n. ⇒ For various function, the corresponding interpolation polynomials may tend to oscillate more between the nodes causes numerical instability. Figure: Runge’s example f (x) = 1 1+x2 and interpolation polynomial P10(x) Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 3 / 9
  • 4. Continued– ⇒ Such oscillations are avoided by the method of splines. ⇒ Given f (x) on J, we partition J uniformly a = x0 < x1.....xn = b (1) ⇒ We require the function g(x), which will interpolate f (x) on J. ⇒ Thus g(x0) = f (x0), ...., g(xn) = f (xn) ⇒ Obtained g(x) is called spline. ⇒ If f (x) is given on a 5 x 5 b and a partition (1) has been chosen, we obtain a cubic spline g(x) that approximate f (x) by acquiring that g(x0) = f (x0) = f0, g(x1) = f (x1) = f1, g(xn) = f (xn) = fn, (2) g0 (x0) = k0 g0 (xn) = kn (3) ⇒ Note: k0 and kn are given number Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 4 / 9
  • 5. Cubic splines Theorem 1: Let f (x) be defined on the interval a 5 x 5 b, let a partition (1) be given, and let k0 and kn be any two given numbers. Then there exists one and only one cubic spline g(x) corresponding to (1) and satisfying (2) and (3) Important Results: (1) cj−1kj−1 + 2(cj−1 + cj )kj + cj kj+1 = 3 h c2 j−1∇fj + c2 j ∇fj+1 i (2) Determination of splines for equidistant nodes kj−1 + 4kj + kj+1 = 3 h (fj+1 − fj−1) (3) Determination of splines pj (x) = aj0 + aj1(x − xj ) + aj2(x − xj )2 + aj3(x − xj )3 ∀ xj 5 x 5 xj+1 Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 5 / 9
  • 6. Continued– (4) aj0 = pj (xj ) = fj (5) aj1 = p0 j (xj ) = kj (6) aj2 = 1 2p00 j (xj ) = 3 h2 (fj+1 − fj ) − 1 h (kj+1 + 2kj ) (7) aj3 = 1 6p000 j (xj ) = 2 h3 (fj − fj+1) + 1 h2 (kj+1 + kj ) Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 6 / 9
  • 7. Example: Q Interpolate f (x) = x4 on the interval −1 5 x 5 1 by cubic spline g(x) corresponding to the partition x0 = −1, x1 = 0, x2 = 1 and satisfying the clamped conditions g0(−1) = f 0(−1), g0(1) = f 0(1) Ans According to question f0 = f (−1) = 1, f1 = f (0) = 0, f2 = f (1) = 1. The given interval is partitioned into n = 2 parts and h = 1. Hence spline g consists of n = 2 polynomial. p0(x) = a00 + a01(x + 1) + a02(x + 1)2 + a03(x + 1)3 − 1 5 x 5 0 p1(x) = a10 + a11x + a12x2 + a13x3 0 5 x 5 1 Step 1: Our goal is to determine p0(x) and p1(x). Since n = 2, let j = 1 then k0 + 4k1 + k2 = 3 1 (f2 − f0) Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 7 / 9
  • 8. Continued– Now p0 0(x0) = k0 and p0 1(x2) = k2. But g = p0 at x0 = −1 and g = p1 at x2 = 1. Hence, as given (g0 = f 0 at ±1) f 0 (−1) = −4 = g0 (−1) = p0 0(−1) = k0, f 0 (1) = 4 = g0 (1) = p0 1(1) = k2 Substitution of k0 = −4 and k2 = 4 ⇒ k1 = 0 Step 2: We can now obtain the coefficient of p0. a00 = f0 = 1, a01 = k0 = −4 a02 = 3 12 (f1 − f0) − 1 1(k1 + 2k0) = 5 a03 = 2 13 (f0 − f1) + 1 12 (k1 + k0) = −2 Similarly a10 = f1 = 0, a11 = k1 = 0, a12 = −1, a13 = 2 This gives the polynomial p0(x) = 1 − 4(x + 1) + 5(x + 1)2 − 2(x + 1)3 = −x2 − 2x3 Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 8 / 9
  • 9. Continued– p1(x) = −x2 + 2x3 or g(x) = −x2 − 2x3 if − 1 5 x 5 0 = −x2 + 2x3 if 0 5 x 5 1 Figure: Function f (x) = x4 and cubic spline g(x) Dr. Varun Kumar (IIIT Surat) Unit 2 / Lecture-5 9 / 9