Smooth functions and local extreme values

Given a sample of $ n$ observations $ y_1,\dots,y_n$ at time points $ t_1,\dots,t_n$ we consider the problem of specifying a function $ \tilde f$ such that $ \tilde f$

We analyse in particular a fast method which is based on minimising

$\displaystyle \sum_{i=1}^n(y_i- f(t_i))^2+\sum_{i=1}^{n-1}\lambda_i \sqrt{(f_{i+1}-f_i)^2+(t_{i+1}-t_i)^2}

where the $ \lambda_i$ are chosen automatically. The new method can also be applied to density estimation.