Quadratic Spline Interpolation

Quadratic Spline Interpolation

Introduction

  • Given a set of points: \left( 0, \ 0.1\right), \ scattered points
  • We define two functions f1 and f2 that will be our quadratic splines: \begin{align} f_1(x) &= a interpolation for mse

Solving the unknowns

  • We can solve the unknowns in these equations.
  • First we plug in our known values: \begin{align} f_1(0) &= 0
  • This gives us a system of linear equations: \begin{align} a_1(0^2) +
  • Which simplifies to: \begin{align} c_1 &= 0.1
  • An extra contraint we can add to this system is that the gradient of the two splines should be equal at the point they meet: f'_1(0.5) = f'_2(0.5)
  • First we find the derivitives of our two functions: \begin{align} f'_1(x) &=
  • And then solve them at x = 0.5: \begin{align} f'_1(0.5) &
  • And finally set them equal to each other and re-arrange a_{1} + b_{1} - a_{2} - b
  • We now have 5 equations, but 6 unknowns
  • So it's not quite solvable yet
  • However we can rewrite each of the terms with respect to a1: \begin{align} a_{2} &= 2.

Solving a1

  • There are several different options for solving a1
  • But in order to compare them, let's start with a more complex problem:
  • Given a new set of points: \left( 0, \ 0.1\right), \ scattered points
  • We can perform the same steps as above to produce a set of coefficients for our 4 splines: \begin{align} a_{2} &= 2.
a1 = 0
  • One simple solution is to set a1 to 0:
  • This system is now solvable, giving: \begin{align} a_{1} &= 0.
  • Which produces splines of: \begin{align} f_{1}(x) &= interpolation for a1=0
  • Setting a1 to 0 makes it easy and efficient to compute the splines.
  • However the first spline is a straight line.
  • And all other splines have large gradients.
a1 = a2
  • Another simple solution would be to set a1 to a2
  • The system is now solvable, giving: \begin{align} a_{1} &= 1.
  • Which produces splines of: \begin{align} f_1(x) &= 1 interpolation for a1=a2
  • The first two splines are equal
  • The average gradient of the splines is less than for a1 = 0
Minimizing the gradients of the splines
  • An ideal interpolation minimizes the amount that each spline curves
  • We can describe this mathematically as minimizing the mean squared error of the a terms: error = \frac{a_1^2 + a_2
  • First we get all the a terms with respect to a1: \begin{align} a_{1} &= a_
  • Then the error function contains a single term: \begin{align} error &= \f
  • We can find its minimum by finding the derivitive: \frac{d_{error}}{da_1} =
  • And solving for 0: a_1 = 5.7
  • If we now use a1 = 5.7 as an extra equation in our system, it solves as: \begin{align} a1 &= 5.7\\
  • Which produces splines of: \begin{align} f_1(x) &= 5 interpolation for a1= mse(a)
  • The average gradient of the splines is minimized
  • However solving a1 was complicated and required finding the derivative of the error function

Comparison

interpolations for all three methods
  • The value we choose for a1 makes a big difference for subsequent splines
  • using mean square error (mse) to minimize the average gradient produces splines that have the least deviation against a linear interpolation
  • However it is by far the most complex option
  • If we increase the number of points we are interpolating, the changes get even more pronounced: interpolations for all three methods for more splines
This website uses cookies. Using this website means you are okay with this, but you can find out more and learn how to manage your cookie choices here