# B Splines

## Content summary

This learning project aims to provide as an introduction to the specialized spline functions known as B (or Basis) splines. B splines have varying applications, including numerical analysis.

## Goals

• Define B Spline
• Differentiate types of B Splines
• Approximation using B Splines

## Lessons

### Lesson 0: Prerequisite

B splines derive from Splines, therefore an understanding of Splines in general is beneficial to completing this lesson. In short, a Spline function approximates another function by defining a set of polynomials

• ${\displaystyle S_{0}(x),\ S_{1}(x),\ldots ,S_{n}(x)}$

where each of these polynomials defines a specific piece of the resulting Spline. ${\displaystyle S_{0}(x)}$  might exist on the interval ${\displaystyle [0,1]}$ , ${\displaystyle S_{1}(x)}$  might exist on the interval ${\displaystyle [1,2]}$ , and so on. The result will be a piecewise approximation to some other exact function.

### Lesson 1: Definition

A definition of B splines assumes:

• an infinite set of knots are defined at points along the x-axis (can be spaced uniformally or not), that is,
• ${\displaystyle \ldots
• ${\displaystyle \lim _{i\rightarrow \infty }t_{i}=\infty =-\lim _{i\rightarrow \infty }t_{-i}}$

#### Degree 0 (or constant)

With that in mind, we can now move on to the simplest of B splines, those of degree 0, which are defined as

• ${\displaystyle B_{i}^{0}\left(x\right)={\begin{cases}1&t_{i}\leq x

In other words, a degree 0 B spline is equal to 0 at all points except on the interval ${\displaystyle \left[t_{i},t_{i+1}\right)}$ .

It should now be easy to see that a degree 0 Spline can be formed as a weighted linear combination of degree 0 B splines so that,

• ${\displaystyle S=\ldots +b_{i-1}B_{i-1}^{0}+b_{i}B_{i}^{0}+b_{i+1}B_{i+1}^{0}+\ldots }$
• ${\displaystyle -\infty <=i<=\infty }$

#### Degree 1 (or linear)

Logically, the next B spline are those of degree 1, defined as

• ${\displaystyle B_{i}^{1}\left(x\right)={\begin{cases}0&x\geq t_{i+2}\ or\ x

This might seem difficult to visualize at first glance, but its actually quite easy. Just like ${\displaystyle B_{i}^{0}}$ , it is 0 at quite nearly all points. However, we now have the two intervals, ${\displaystyle \left[t_{i},t_{i+1}\right)}$  and ${\displaystyle \left[t_{i+1},t_{i+2}\right)}$ , at which ${\displaystyle B_{i}^{1}\neq 0}$ .

On the first interval it is easy to see that, substituting ${\displaystyle t_{i}}$  and ${\displaystyle t_{i+1}}$  give 0 and 1, respectively. Thus, this function yields an upward sloping line, with a maximum height of 1. Similarly, the second interval yields a downward sloping line, starting from the point that the first interval terminates.

Again, similarly to ${\displaystyle B_{i}^{0}}$ , it should now be easy to see that a degree 1 Spline can be formed as a weighted linear combination of degree 1 B splines so that,

• ${\displaystyle S=\ldots +b_{i-1}B_{i-1}^{1}+b_{i}B_{i}^{1}+b_{i+1}B_{i+1}^{1}+\ldots }$
• ${\displaystyle -\infty <=i<=\infty }$

#### Degree k (or quadratic and above)

The higher degree B splines, and actually including ${\displaystyle B_{i}^{1}}$ , are defined as

• ${\displaystyle B_{i}^{k}\left(x\right)=\left({\frac {x-t_{i}}{t_{i+k}-t_{i}}}\right)B_{i}^{k-1}\left(x\right)+\left({\frac {t_{i+k+1}-x}{t_{i+k+1}-t_{i+1}}}\right)B_{i+1}^{k-1}\left(x\right)}$

### Lesson 2: Approximation

We have seen how B splines can be used to construct general Spline. Now we will discuss a process for approximating a generic function by using B splines.

#### Schoenberg's Approximation

This specific approximation utilizes ${\displaystyle B_{i}^{2}}$  (or quadratic B splines) to approximate a function with ${\displaystyle S^{2}}$  (or a quadratic Spline). The approximation is defined as

• ${\displaystyle S\left(x\right)=\ldots +f\left(\tau _{i-1}\right)B_{i-1}^{2}+f\left(\tau _{i}\right)B_{i}^{2}+f\left(\tau _{i+1}\right)B_{i+1}^{2}+\ldots }$
• ${\displaystyle -\infty <=i<=\infty }$
• ${\displaystyle \tau _{i}={\frac {1}{2}}\left(t_{i+1}+t_{i+2}\right)}$ , or the average of the next two knots

In real life, we would only approximate the function over a specific interval ${\displaystyle \left[a,b\right]}$ .

## Active participants

Active participants in this Learning Group

Mathematics since 00:11, 11 November 2013‎ --Marshallsumter (discusscontribs) 23:48, 11 May 2019 (UTC)

## Inactive participants

• Jlietz 18:04, 12 December 2006 (UTC)