<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="new8">
  <name>B-splines</name>
  <metadata>
  <md:version>2.1</md:version>
  <md:created>2003/04/23</md:created>
  <md:revised>2003/04/23</md:revised>
  <md:authorlist>
      <md:author id="ixmocane">
      <md:firstname>Alena</md:firstname>
      <md:othername>Ixmocane</md:othername>
      <md:surname>Scott</md:surname>
      <md:email>oetting@stat.rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="ixmocane">
      <md:firstname>Alena</md:firstname>
      <md:othername>Ixmocane</md:othername>
      <md:surname>Scott</md:surname>
      <md:email>oetting@stat.rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="sujesh">
      <md:firstname>Sujesh</md:firstname>
      
      <md:surname>Sreedharan</md:surname>
      <md:email>sujesh@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="rebecca">
      <md:firstname>Rebecca</md:firstname>
      
      <md:surname>Willett</md:surname>
      <md:email>willett@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="charlet">
      <md:firstname>Charlet</md:firstname>
      
      <md:surname>Reedstrom</md:surname>
      <md:email>charlet@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>B-splines</md:keyword>
    <md:keyword>basis</md:keyword>
    <md:keyword>splines</md:keyword>
  </md:keywordlist>

  <md:abstract>This module explains B-splines, which form a basis for splines.</md:abstract>
</metadata>

  <content>
    <para id="para1">
      <term>B-splines</term> are symmetrical, bell-shaped functions
      constructed from the (
      <m:math>
	<m:apply>
	  <m:plus/>
	  <m:ci>n</m:ci>
	  <m:cn>1</m:cn>
	</m:apply>
      </m:math>) fold convolution of a rectangular pulse 
      <m:math>
	<m:apply>
	  <m:ci type="fn"><m:msup>
	      <m:mi>β</m:mi>
	      <m:mn>0</m:mn>
	    </m:msup></m:ci>
	  <m:ci>x</m:ci>
	</m:apply>
      </m:math>:

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn"><m:msup>
		<m:mi>β</m:mi>
		<m:mn>0</m:mn>
	      </m:msup></m:ci>
	    <m:ci>x</m:ci>
	  </m:apply>
	  <m:piecewise>
	    <m:piece>
	      <m:cn>1</m:cn>
	      <m:apply>
		<m:lt/>
		<m:apply>
		  <m:abs/>
		  <m:ci>x</m:ci>
		</m:apply>
		<m:cn>0.5</m:cn>
	      </m:apply>
	    </m:piece>
	    <m:piece>
	      <m:cn>0.5</m:cn>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:abs/>
		  <m:ci>x</m:ci>
		</m:apply>
		<m:cn>0.5</m:cn>
	      </m:apply>
	    </m:piece>
	    <m:otherwise>
	      <m:cn>0</m:cn>
	    </m:otherwise>
	  </m:piecewise>
	</m:apply>
      </m:math>

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn"><m:msup>
		<m:mi>β</m:mi>
		<m:mi>n</m:mi>
	      </m:msup></m:ci>
	    <m:ci>x</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
	      <m:ci type="fn"><m:msubsup>
		  <m:mi>β</m:mi>
		  <m:mrow>
		    <m:mi>+</m:mi>
		    <m:mo>,</m:mo>
		    <m:mn>1</m:mn>
		  </m:mrow>
		  <m:mn>0</m:mn>
		</m:msubsup></m:ci>
	      <m:ci type="fn"><m:msubsup>
		  <m:mi>β</m:mi>
		  <m:mrow>
		    <m:mi>+</m:mi>
		    <m:mo>,</m:mo>
		    <m:mn>2</m:mn>
		  </m:mrow>
		  <m:mn>0</m:mn>
		</m:msubsup></m:ci>
	      <m:ci>…</m:ci>
	      <m:ci type="fn"><m:msubsup>
		  <m:mi>β</m:mi>
		  <m:mrow>
		    <m:mi>+</m:mi>
		    <m:mo>,</m:mo>
		    <m:mi>n</m:mi>
		  </m:mrow>
		  <m:mn>0</m:mn>
		</m:msubsup></m:ci>
	      <m:ci type="fn"><m:msubsup>
		  <m:mi>β</m:mi>
		  <m:mrow>
		    <m:mi>+</m:mi>
		    <m:mo>,</m:mo>
		    <m:mrow>
		      <m:mi>n</m:mi>
		      <m:mo>+</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		  </m:mrow>
		  <m:mn>0</m:mn>
		</m:msubsup></m:ci>
	    </m:apply>
	    <m:ci>x</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
<!-- is this right?-->

      <rule type="theorem" id="bsplinetheorem">
	<name>Schoenberg</name>
	<statement>
	  <para id="para2">
	    Polynomial splines with equally spaced knots can be
	    uniquely characterized in terms of a B-spline expansion.
	  </para>
	</statement>
	<example id="ex1">
	  <para id="para2a">
	    That is, for a spline 
	    <m:math>
	      <m:apply>
		<m:ci type="fn">s</m:ci>
		<m:ci>x</m:ci>
	      </m:apply>
	    </m:math> of degree <m:math><m:ci>n</m:ci></m:math>, there
	    exist unique coefficients 
	    <m:math>
	      <m:apply>
		<m:ci type="fn">c</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	    </m:math> such that 

	    <m:math display="block">
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn">s</m:ci>
		  <m:ci>x</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>k</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:apply>
		      <m:minus/>
		      <m:infinity/>
		    </m:apply>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:infinity/>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn">c</m:ci>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn"><m:msup>
			  <m:mi>β</m:mi>
			  <m:mi>n</m:mi>
			</m:msup></m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>x</m:ci>
			<m:ci>k</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>

		<m:apply>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
		    <m:ci>c</m:ci>
		    <m:ci type="fn"><m:msup>
			<m:mi>β</m:mi>
			<m:mi>n</m:mi>
		      </m:msup></m:ci>
		  </m:apply>
		  <m:ci>x</m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>

	  </para>
	</example>
      </rule>
    </para>

    <para id="para3">
      Understanding B-splines can help us better understand splines,
      since B-splines are the building blocks.
      <list id="bsplinesprops" type="enumerated">
	<name>Some properties of B-splines</name>
	<item>
	  The derivative of a B-spline of order
	  <m:math><m:ci>n</m:ci></m:math> with respect to
	  <m:math><m:ci>x</m:ci></m:math> is equal to the sum of two
	  B-splines of order 
	  <m:math>
	    <m:apply>
	      <m:minus/>
	      <m:ci>n</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math> evaluated at shifts of
	  <m:math><m:ci>x</m:ci></m:math>

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:diff/>
		<m:bvar><m:ci>x</m:ci></m:bvar>
		<m:apply>
		  <m:ci type="fn"><m:msup>
		      <m:mi>β</m:mi>
		      <m:mi>n</m:mi>
		    </m:msup></m:ci>
		  <m:ci>x</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:ci type="fn"><m:msup>
		      <m:mi>β</m:mi>
		      <m:mrow>
			<m:mi>n</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msup></m:ci>
<!-- or n-1 a power?-->
		  <m:apply>
		    <m:plus/>
		    <m:ci>x</m:ci>
		    <m:cn>0.5</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:ci type="fn"><m:msup>
		      <m:mi>β</m:mi>
		      <m:mrow>
			<m:mi>n</m:mi>
			<m:mo>-</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msup></m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>x</m:ci>
		    <m:cn>0.5</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</item>

	<item>
	  The integral of a B-spline of order
	  <m:math><m:ci>n</m:ci></m:math> is equal to the infinite sum
	  of B-splines of order 
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>n</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>.

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:int/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit>
		  <m:apply>
		    <m:minus/>
		    <m:infinity/>
		  </m:apply>
		</m:lowlimit>
		<m:uplimit><m:ci>x</m:ci></m:uplimit>
		<m:apply>
		  <m:ci type="fn"><m:msup>
		      <m:mi>β</m:mi>
		      <m:mi>n</m:mi>
		    </m:msup></m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:lowlimit>
		  <m:cn>0</m:cn>
		</m:lowlimit>
		<m:uplimit>
		  <m:infinity/>
		</m:uplimit>
		<m:apply>
		  <m:ci type="fn"><m:msup>
		      <m:mi>β</m:mi>
		      <m:mrow>
			<m:mi>n</m:mi>
			<m:mo>+</m:mo>
			<m:mn>1</m:mn>
		      </m:mrow>
		    </m:msup></m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:minus/>
		      <m:ci>x</m:ci>
		      <m:cn>0.5</m:cn>
		    </m:apply>
		    <m:ci>k</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</item>

	<item>
	  Notice that this Fourier transform is related to the 
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>n</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math> fold convolution construction of the B-splines. 

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn"><m:msup>
		    <m:mover>
		      <m:mi>β</m:mi>
		      <m:mo>^</m:mo>
		    </m:mover>
		    <m:mi>n</m:mi>
		  </m:msup></m:ci>
		<m:ci>ω</m:ci>
	      </m:apply>
	      <m:apply>
		<m:power/>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:sin/>
		    <m:apply>
		      <m:divide/>
		      <m:ci>ω</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:ci>ω</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:ci>n</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</item>

	<item>
	  B-splines are compactly supported.
	</item>

	<item>
	  They are the shortest possible polynomial splines.
	</item>

	<item>
	  <m:math>
	    <m:apply>
	      <m:ci type="fn"><m:msup>
		  <m:mi>β</m:mi>
		  <m:mi>n</m:mi>
		</m:msup></m:ci>
	      <m:ci>x</m:ci>
	    </m:apply>
	  </m:math> is a piecewise polynomial of degree
	  <m:math><m:ci>n</m:ci></m:math>: 

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn"><m:msup>
		    <m:mi>β</m:mi>
		    <m:mi>n</m:mi>
		  </m:msup></m:ci>
		<m:ci>x</m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:apply>
		    <m:factorial/>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>k</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:plus/>
		      <m:ci>n</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:vector>
		      <m:apply>
			<m:plus/>
			<m:ci>n</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:ci>k</m:ci>
		    </m:vector>
		    <m:apply>
		      <m:power/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:power/>
		      <m:apply>
			<m:plus/>
			<m:apply>
			  <m:minus/>
			  <m:ci>x</m:ci>
			  <m:ci>k</m:ci>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:plus/>
			    <m:ci>n</m:ci>
			    <m:cn>1</m:cn>
			  </m:apply>
			  <m:cn>2</m:cn>
			</m:apply>
		      </m:apply>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  where 
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>x</m:mi>
		    <m:mi>+</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
<!-- not sure if n is a sup or power-->
	      <m:piecewise>
		<m:piece>
		  <m:apply>
		    <m:power/>
		    <m:ci>x</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:geq/>
		    <m:ci>x</m:ci>
		    <m:cn>0</m:cn>
		  </m:apply>
		</m:piece>
		<m:piece>
		  <m:cn>0</m:cn>
		  <m:apply>
		    <m:lt/>
		    <m:ci>x</m:ci>
		    <m:cn>0</m:cn>
		  </m:apply>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>   
	</item>
      </list>

    </para>
  </content>
  
</document>
