I have to minimize the function: $F(x) = \sum_{i=1}^{M}\left\|x_{i+1} - x_i - K\left(\frac{x_{i+1} + x_i}{2}\right)\right\|^2 + \|x_1-c_1\|^2 + \|x_N-c_2\|^2,$ where $x$ is a vector of $N$ scalars, $c$ are constants and the latter two terms are my positional constraints.
Now, the $K(s)$ function (scalar in, scalar out) is just a $1 \rm D$ linear (but non-convex) data interpolator
I have a feeling that this could be simplified further (to a linear problem? quadratic?)
For example I was thinking to express the $K(s)$ function as a sum of tent functions (one at each data point), but I'm not sure if I'm getting anywhere better with that.