Spline Continuity and End Conditions - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Numerical Computations : Interpolation and Curve Fitting : CurveFitting Package : CurveFitting/General/SplineConditions

Spline Continuity and End Conditions

  

This help page describes the interpolating, continuity, and end conditions used in CurveFitting[Spline].

  

The form of the resulting piecewise function returned depends on whether the degree d is odd or even, and whether or not the knots='data' option is specified in the even case.

 

Odd Degree

Even Degree

Even degree with knots='data'

Examples

Odd Degree

  

The resulting function created by CurveFitting[Spline] is of the form piecewisev<x1,p1,...,pn, where the n spline sections {p1,p2,...,pn} are polynomials of degree at most d. These polynomials are given by the following d&plus;1n conditions:

2n Interpolating Conditions

• 

Force continuity at the knots.

p&lsqb;i&rsqb;xi1&equals;yi1&comma;andp&lsqb;i&rsqb;xi&equals;yi&comma;fori&equals;1&comma;2&comma;...&comma;n

(d-1)(n-1) Continuity Conditions

• 

Force continuity of the derivatives of order 1,2,...,d1 at the knots.

pikxi&equals;pi&plus;1kxi&comma;fori&equals;1&comma;2&comma;...&comma;n1&comma;andk&equals;1&comma;2&comma;...&comma;d1

d-1 End Conditions

• 

Natural splines specified by endpoints='natural'.

  

Equate the derivates of order d+12,...,d1 at the end nodes to zero.

pikx0&equals;0&comma;andpnkxn&equals;0&comma;fork&equals;12d&plus;12&comma;...&comma;d1

• 

Not-a-knot splines specified by endpoints='notaknot'.

  

Force the continuity of the dth derivative at the knots xi, for i=1,2,...,d12 and i=nd12,...,n1.

pikxi&equals;pi&plus;1dxi&comma;andpnidxni&equals;pni&plus;1dxni&comma;fori&equals;1&comma;2&comma;...&comma;12d12

• 

Periodic splines specified by endpoints='periodic'.

  

Match the derivatives of order 1,2,...,d1 at the end nodes.

p1kx0&equals;pnkxn&comma;fork&equals;1&comma;2&comma;...&comma;d1

• 

Clamped splines specified by endpoints=V.

  

Equate the derivates of order 1,2,...,d12 at the end nodes to the specified values given in V, where V is either a list, Vector, or an Array, of dimension d1 containing the specified clamped conditions. Specifically,

V&equals;pi1x0&comma;...&comma;p112d12x0&comma;pn1x0&comma;...&comma;pn12d12xn&comma;with

p1kx0&equals;Vk&comma;andpnkxn&equals;Vk&plus;12d&plus;12&comma;fork&equals;1&comma;2&comma;...&comma;12d12

• 

Generalized splines given by endpoints=G.

  

Generalized end conditions can be specified involving any arbitrary linear combination of the values of the derivatives (of any order 1,2,...,d at the nodes x0, x1, xn1, and xn, where 1<n). Such end conditions can be represented by a linear system of the form Ax&equals;b, where x is a vector of dimension 4d, with

x&equals;p11x0&comma;p21x1&comma;...&comma;p1d1x0&comma;p2d1x1&comma;p1d&comma;p2d&comma;pn11xn1&comma;pn1xn&comma;...&comma;pn1d1xn1&comma;pnd1xn&comma;pn1d&comma;pnd

  

A is the corresponding coefficient matrix of dimension d1 by 4d and b, a vector of dimension d1, represents the right-hand side of the linear system.

  

Generalized end conditions are specified with the optional parameter endpoints=G, where G is a Matrix or an Array. Here, G represents the augmented linear system &lsqb;A&verbar;b&rsqb;, having dimensions d1 by 4d&plus;1.

Even Degree

  

Without the knots='data' option, the resulting function created by CurveFitting[Spline] is of the form piecewisev<z1,p1,...,v<zn,pn,pn+1, where zi&equals;12xi1&plus;12xi, for i&equals;1&comma;2&comma;...&comma;n (that is, the spline knots are defined at the midpoints of the nodes) and the n&plus;1 spline sections {p1,p2,...,pn+1} are polynomials of degree at most d. These polynomials are specified by the following d&plus;1n&plus;1 conditions.

n+1 Interpolating Conditions at the Nodes

• 

Force continuity at the nodes.

p&lsqb;i&rsqb;xi1&equals;yi1&comma;fori&equals;1&comma;2&comma;...&comma;n&plus;1

n Interpolating Conditions at the Knots

• 

Force continuity at the knots.

p&lsqb;i&rsqb;zi&equals;p&lsqb;i&plus;1&rsqb;zi&comma;fori&equals;1&comma;2&comma;...&comma;n

(d-1)n Continuity Conditions

• 

Force continuity of the derivatives of order 1,2,...,d1 at the knots.

pikzi&equals;pi&plus;1kzi&comma;fori&equals;1&comma;2&comma;...&comma;nandk&equals;1&comma;2&comma;...&comma;d1

d End Conditions

• 

Natural splines specified by endpoints='natural'.

  

Equate the derivates of order d2,...,d1 at the end nodes to zero.

p1kx0&equals;0&comma;andpn&plus;1kxn&equals;0&comma;fork&equals;12d&comma;...&comma;d1

• 

Not-a-knot splines specified by endpoints='notaknot'.

  

Force the continuity of the dth derivative at the knots zi, for i=1,2,...,d2 and i=n+1d2,...,n1.

pidzi&equals;pi&plus;1dzi&comma;andpni&plus;1dzni&plus;1&equals;pn&plus;2idzni&plus;1&comma;fori&equals;1&comma;2&comma;...&comma;12d

• 

Periodic splines specified by endpoints='periodic'.

  

Match the derivatives of order 1,2,...,d at the end nodes.

p1kx0&equals;pn&plus;1kxn&comma;fork&equals;1&comma;2&comma;...&comma;d

• 

Clamped splines specified by endpoints=V.

  

Equate the derivates of order 1,2,...,d2 at the end nodes to the specified values given in V, where V is either a list, Vector, or an Array, of dimension d containing the specified clamped conditions. Specifically,

V&equals;p11x0&comma;...&comma;p112dx0&comma;pn&plus;11xn&comma;...&comma;pn&plus;112dxn&comma;with

p1kx0&equals;Vk&comma;andpn&plus;1kxn&equals;Vk&plus;12d&comma;fork&equals;1&comma;2&comma;...&comma;12d

• 

Generalized splines specified by endpoints=G.

  

Generalized end conditions can be specified involving any arbitrary linear combination of the values of the derivatives (of any order 1,2,...,d at the nodes x0 and xn). Such end conditions can be represented by a linear system of the form Ax&equals;b, where x is a vector of dimension 2d, with

x&equals;p11x0&comma;...&comma;p1d1x0&comma;p1d&comma;pn&plus;11xn&comma;...&comma;pn&plus;1d1xn&comma;pn&plus;1d

  

A is the corresponding coefficient matrix of dimension d by 2d and b, a vector of dimension d, represents the right-hand side of the linear system.

  

Generalized end conditions are specified with the optional parameter endpoints=G, where G is a Matrix or an Array. Here, G represents the augmented linear system &lsqb;A&verbar;b&rsqb;, having dimensions d by 2d&plus;1.

Even degree with knots='data'

  

With the knots='data' option included, CurveFitting[Spline] will avoid creating knots at the midpoints of the nodes, and instead use the nodes for the knots in the even case.  The resulting function is of the form piecewisev<x1,p1,...,pn, where the n spline sections {p1,p2,...,pn} are polynomials of degree at most d. These polynomials are given by the following d&plus;1n conditions:

2n Interpolating Conditions

• 

Force continuity at the knots.

p&lsqb;i&rsqb;xi1&equals;yi1&comma;andp&lsqb;i&rsqb;xi&equals;yi&comma;fori&equals;1&comma;2&comma;...&comma;n

(d-1)(n-1) Continuity Conditions

• 

Force continuity of the derivatives of order 1,2,...,d1 at the knots.

pikxi&equals;pi&plus;1kxi&comma;fori&equals;1&comma;2&comma;...&comma;n1&comma;andk&equals;1&comma;2&comma;...&comma;d1

d-1 End Conditions

• 

Natural splines specified by endpoints='natural'.

  

Equate the derivates of order d2,...,d1 at the left end node and the derivatives of order d2,...,d2 at the right end node to zero.

p1kx0&equals;0&comma;fork&equals;12d&comma;...&comma;d1&comma;and

pn&plus;1kxn&equals;0&comma;fork&equals;12d&comma;...&comma;d2

• 

Not-a-knot splines specified by endpoints='notaknot'.

  

Force the continuity of the dth derivative at the knots zi, for i=1,2,...,d2 and i=n+1d2,...,n1.

pidzi&equals;pi&plus;1dzi&comma;fori&equals;1&comma;2&comma;...&comma;12d&comma;and

pnidzni&equals;pni&plus;1dzni&comma;fori&equals;1&comma;2&comma;...&comma;12d1

Examples

withCurveFitting&colon;

data0&comma;0&comma;1&comma;5&comma;2&comma;1&comma;3&comma;0

data:=0&comma;0&comma;1&comma;5&comma;2&comma;1&comma;3&comma;0

(1)

A quintic spline using the 'natural' end condition.

Splinedata&comma;v&comma;degree&equals;5&comma;endpoints&equals;&apos;natural&apos;

&lcub;311v510111v2&plus;15311vv<1611v5&plus;4511v49011v3v2&plus;10811v&plus;911v<2311v54511v4&plus;27011v373111v2&plus;82811v27911otherwise

(2)

A cubic spline using the 'periodic' end condition.

Splinedata&comma;v&comma;degree&equals;3&comma;endpoints&equals;&apos;periodic&apos;

&lcub;5v3&plus;4v2&plus;6vv<16v329v2&plus;39v11v<2v3&plus;13v245v&plus;45otherwise

(3)

A quadratic spline using the 'notaknot' end condition.

Splinedata&comma;v&comma;degree&equals;2&comma;endpoints&equals;&apos;notaknot&apos;

&lcub;7v2&plus;12vv<325v224v&plus;27otherwise

(4)

A clamped cubic spline with slope A and B at the two end nodes.

Splinedata&comma;v&comma;endpoints&equals;A&comma;B

&lcub;1115A495&plus;115Bv3&plus;7452615A115Bv2&plus;Avv<115A&plus;42515Bv3&plus;1995&plus;1615A&plus;1115Bv2&plus;95A&plus;273545Bv&plus;1415A915&plus;415Bv<2295&plus;115A&plus;1115Bv3&plus;2275815A7315Bv2&plus;5795&plus;75A&plus;525Bv&plus;477565A365Botherwise

(5)

A cubic spline using the generalized end conditions with second derivative equal to 5 at the end nodes.

GMatrix2&comma;13&comma;1&comma;3&equals;1&comma;1&comma;13&equals;5&comma;2&comma;10&equals;1&comma;2&comma;13&equals;5&colon;

Splinedata&comma;v&comma;endpoints&equals;G

&lcub;225v3&plus;52v2&plus;6910vv<16v328710v2&plus;38110v525v<285v3&plus;16910v253110v&plus;2525otherwise

(6)

See Also

CurveFitting

CurveFitting[Spline]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam