Example: barber

Unit 5: Cubic Splines - LTH

unit 5: Cubic SplinesLetK={x0, .. , xm}be a set of given knots witha=x0< x1< < xm=bDefinition. [ ]A functions C2[a, b]is called acubic splineon[a, b],ifsis a Cubic polynomialsiin each interval[xi, xi+1].It is called acubic interpolating splineifs(xi) =yifor given F uhrer: : Cubic SplinesInterpolating Cubic Splines need two additional conditions to be uniquelydefinedDefinition. [ ]An Cubic interpolatory spilnesis called anatural splineifs (x0) =s (xm) = 0C. F uhrer: : Cubic Splines - ConstructionWe construct an interpolating in a different but equivalent way than in thetextbook:Ansatz formthe piecewise polynomialssi(x) =ai(x xi)3+bi(x xi)2+ci(x xi) +diBy fixing the4mfree coefficientsai, bi, ci, di, i= 0 :m 1the entire splineis F uhrer: : Cubic Splines -ConstructionWe need4mconditions to fix the coefficients(1)si(xi) =yi,fori= 0 :m 1,(2)sm 1=ym,1condition(3)si(xi+1)

Unit 5: Cubic Splines Let K = {x 0,...,x m} be a set of given knots with a = x 0 < x 1 < ··· < x m = b Definition. [11.2] A function s ∈ C2[a,b] is called a cubic spline on [a,b], if s is a cubic polynomial s i in each interval [x i,x i+1]. It is called a cubic interpolating spline if s(x

Tags:

  Unit, Cubic, Spline, Unit 5, Cubic splines

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Unit 5: Cubic Splines - LTH

1 unit 5: Cubic SplinesLetK={x0, .. , xm}be a set of given knots witha=x0< x1< < xm=bDefinition. [ ]A functions C2[a, b]is called acubic splineon[a, b],ifsis a Cubic polynomialsiin each interval[xi, xi+1].It is called acubic interpolating splineifs(xi) =yifor given F uhrer: : Cubic SplinesInterpolating Cubic Splines need two additional conditions to be uniquelydefinedDefinition. [ ]An Cubic interpolatory spilnesis called anatural splineifs (x0) =s (xm) = 0C. F uhrer: : Cubic Splines - ConstructionWe construct an interpolating in a different but equivalent way than in thetextbook:Ansatz formthe piecewise polynomialssi(x) =ai(x xi)3+bi(x xi)2+ci(x xi) +diBy fixing the4mfree coefficientsai, bi, ci, di, i= 0 :m 1the entire splineis F uhrer: : Cubic Splines -ConstructionWe need4mconditions to fix the coefficients(1)si(xi) =yi,fori= 0 :m 1,(2)sm 1=ym,1condition(3)si(xi+1) =si+1(xi+1),fori= 0 :m 2,(4)s i(xi+1) =s i+1(xi+1),fori= 0 :m 2,(5)s i(xi+1) =s i+1(xi+1),fori= 0 :m 2,These are4m 2conditions.

2 We need two F uhrer: : Cubic Splines -Boundary ConditionsWe can define two extra boundary conditions. One has several alternatives:Natural Splines 0(x0) = 0ands m 1(xm) = 0 End Slope Splines 0(x0) =y 0ands m 1(xm) =y mPeriodic Splines 0(x0) =s m 1(xm)ands 0(x0) =s m 1(xm)Not-a-Knot Splines 0(x1) =s 1(x1)ands m 2(xm 1) =s m 1(xm 1)We consider here natural uses Splines with a not-a-knot F uhrer: : Natural Splines Constructionsi(x) =ai(x xi)3+bi(x xi)2+ci(x xi) +diLeth=xi+1 xiequidistant spacings i(ti+1)=3aih2+ 2bih+cis i(ti+1)=6aih+ 2biFrom Condition (1) we getdi= introduce new variables for the second derivatives atxi, i:=s (xi) = 6ai(xi xi) + 2bi= 2bii= 0 :mC.

3 F uhrer: : Natural Splines Construction(Cont.)Thusbi= i+1= 6aih+ Condition (5) we getai= i+1 Condition (3) we getyi+1=aih3+bih2+cih+ F uhrer: : Natural Splines Construction(Cont.).. and after inserting the hight-lighted expressions foraiandbiwe getyi+1=( i+1 i6h)h3+ i2h2+cih+ that we getci:ci=yi+1 yih h2 i+ i+ now Condition (4) gives a relation betweenciandci+1ci+1= 3aih2+ 2bih+ F uhrer: : Natural Splines Construction(Cont.)Inserting now the expressions forai, biandci, using Condition (2) andsimplifying finally gives the central recursion formula: i 1+ 4 i+ i+1= 6(yi+1 2yi+yi 1h2)withi= 1.

4 , m consider now natural boundary conditions 0= m= F uhrer: : Natural Splines Construction(Cont.)Finally we rewrite this all a system of linear equations 1 2 m 1 =6h2 y2 2y1+y0y3 2y2+ 2yn 1+yn 2 First, this system is solved and then the coefficientsai, bi, ci, diare deter-mined by the high-lighted F uhrer: FMN081-2005105


Related search queries