Hi I have a problem with quadratic splines, I am supposed to find $S_1$ and $S_2$ that interpolates the following points $S(-1)=0$, $S(0)=1$, $S(1)=2$, and at the same time we want to find $S$ such that $\int_{-1}^1 \! (S(x))^2 \, \mathrm{d}x$ is minimal. The answer is on the form

$S_1(x)=a_1 x^2 +b_1x +c_1$ on $[-1,0]$ and

$S_2(x)=a_2 x^2 +b_2x +c_2$ on $[0,1]$

I use the data points and find that $a_1=-a_2$, $b_1=b_2$ and $c_1=c_2=1$, but I have no idea how to use minimize $\int_{-1}^1 \! (S(x))^2 \, \mathrm{d}x$ , can I divide it up?

$$\min \int_{-1}^1 \! (S(x))^2 \, \mathrm{d}x=\min (\int_{-1}^0 \! (S_1(x))^2 \, \mathrm{d}x + \int_0^1 \! (S_2(x))^2 \, \mathrm{d}x )$$

I know I should get an expression and probably set the derivative to zero but I just don't know how to attack the minimizing integral since the function has two parts. Help greatly appreciated.

-

Here's a hint: since you need your piecewise expression to be a spline, one thing you should have is the imposition of a derivative condition at the point $x=0$; namely, $S_1^{\prime}(0)=S_2^{\prime}(0)$. (This is apart from the obvious equations you get from substituting appropriate values of $x$ and $y$ into the expressions for $S_1$ and $S_2$).

Thus far, you should have five equations in six unknowns; you can eliminate some unknowns, and be able to express some of them in terms of just one of the unknowns, such that both $S_1$ and $S_2$ depend on a single parameter. You had the right idea to split up the integral into integrals over $[-1,0]$ and $[0,1]$ ; if you do that, you should end up with a quadratic in a single variable, whose minimum is trivial to find.

Shorter version of the hint: you should be able to express $a_1$ (and thus $a_2$ as well) in terms of either $b_1$ or $b_2$. Picking $b_1$ as the variable of interest, and substituting into your integral, you should have an expression of the form

$$u(b_1)^2+v\cdot b_1+w$$

where $u$, $v$, and $w$ are certain constants. If $u$ is positive, then $-\frac{v}{2u}$ is the minimum value of $b_1$ you seek. Substitute into all your other relations, and you should now have the desired spline.

-
For those who give up, here is the answer. – J. M. Dec 1 '10 at 10:13