An archive of Mark's Spring 2018 Numerical Analysis course.

A quadratic spline

mark

Find the smooth quadratic spline that interpolates the data

\{(-1,0),(0,0),(1,1)\}

and has slope 1 at the origin.

anonymous_user

We are asked to find a smooth quadratic spline interpolating the three points above, along with the given that f_1'(0)=f_2'(0)=1. Since we wish to find splines going between three points, we will have two quadratic equations, which we denote

f_1(x)=a_1x^2+b_1x+c_1\\ f_2(x)=a_2x^2+b_2x+c_2.\\

Note that we have a total of six unknown constants to solve for. Fortunately, using the three points and the restriction, we have the following six equations:

f_1(-1)=a_1(-1)^2+b_1(-1)+c_1=0 \\ f_1(0)=a_1(0)+b_1(0)+c_1=0 \\ f_2(0)=a_2(0)+b_1(0)+c_2=0 \\ f_2(1)=a_2(1)^2+b_1(1)+c_2=1 \\ f_1'(0)=2a_1(0)+b_1=1 \\ f_2'(0)=2a_2(0)+b_2=1. \\

Looking at the second and third equations, we see immediately that c_1=c_2=0. Furthermore, looking at the fifth and sixth equations, we see that b_1=b_2=1. Turning now to the first equation, if we substitute our now known values for b_1 and c_1, we have

f_1(-1)=a_1(-1)^2 +(-1)=0 \\ \Rightarrow a_1-1=0 \\ \Rightarrow a_1=1.

Similarly, looking at the fourth equation and substituting the known values of b_2 and c_2, we have

f_2(1)=a_2(1)^2+(1)=1 \\ \Rightarrow a_2 = 0.

Thus, our solution is f_1(x)=x^2+x on the interval [-1,0] and f_2(x)=x on the interval [0,1].