Finding the smoothest monotonic interpolation with Calculus of Variations

150 Views Asked by At

I want to implement an algorithm that will approximate the smoothest possible monotonic function that interpolates samples $\left(\left(x_1,y_1\right),\left(x_2,y_2\right),\ldots ,\left(x_n,y_n\right)\right)$ Here the $x_i$ are monotonic and $y_i$ are monotonic. The "smoothest" monotonic function will have f(x) with the minimum the bending energy = $\int_{x_1}^{x_n} f''(x)^2 \, dx$.
Finding a cubic spline interpolation that approximates the solution to this problem is the subject of this paper. It seems we can do better if we use Calculus of Variations to find the smoothest possible monotonic interpolation. However, Calculus of Variations was very difficult for me, and wonder if somebody here could show me how to apply the Euler Lagrange Equations to solve this problem. Once I have a differential equation, I can solve it using Mathematica.

Edit

I am looking for the smoothest monotonic interpolation. Hence we have the constraint that f'(x) should never change sign.

I made the following plot using Mathematica.

data={{0.0,0.0},{0.7,0.02},{2.1,0.06},{3.0,8.28},{3.8,57.6},{5.1,62.2},{5.9,62.24},{7.0,62.26}}; NaturalCubicSplinePlot The plot above is the smoothest possible, but it isn't monotonic. I want to find the smoothest function such that $0\leq f'(x)$.

1

There are 1 best solutions below

2
On BEST ANSWER

Let $\phi$ be any test function so that $\phi(x_1) = \cdots = \phi(x_n)= 0$, if $B$ is the bending energy,

\begin{align} 0 &= \frac{d}{dt}\bigg|_{t=0}B (f + t\phi) \\ &= \int_{x_1}^{x_n} f''(x) \phi''(x) dx \\ &= \sum_{k=1}^{n-1}\int_{x_k}^{x_{k+1}} f''(x) \phi''(x) dx \\ &= \sum_{k=1}^{n-1} \left(f'' (x_{k+1})\phi'(x_{k+1}) - f'' (x_{k})\phi'(x_{k}) \right) - \sum_{k=1}^{n-1} \int_{x_k}^{x_{k+1}} f''' (x) \phi' (x) dx \\ &= \sum_{k=1}^{n-1} \left(f'' (x_{k+1})\phi'(x_{k+1}) - f'' (x_{k})\phi'(x_{k}) \right) \\ &\ \ + \sum_{k=1}^{n-1} \int_{x_k}^{x_{k+1}} f'''' (x) \phi (x) dx. \end{align}

(The last equality used $\phi(x_k) = 0$). Since this is true for all test function $\phi$, we have $$\begin{cases} f''(x_k) = 0, & k=1,\cdots, n,\\ f''''(x) = 0 & \text{ otherwise.}\end{cases}.$$

Since $f''''(x) =0$ implies that $f$ is a polynomial of degree $\le 3$ in each subinterval, a minimizer of the bending energy would be just the cubic spline.