# Wanted: smoothing time domain transform

Let $A$ be a finite (and small-ish) set of positive real numbers and 0. Let $B$ be a subset of $\mathbb N^0$, up to some (small-ish) bound.

I have a function $f(t)$, $A \rightarrow B$ that is strictly monotonically increasing. It is $f(0) = 0$ and $f$ shall cover all values of its codomain $B$.

In plain English: $f$ starts at (0,0) and always increases by one, but with varying $\Delta t$ in between the steps.

A simple continuous version of $f(t)$ is $c(t)$ which I can get by piecewise linear interpolation. However since my $\Delta t$ values are all different, the derivative $c'(t) = dc/dt$ will have discontinuities.

I am looking for the easiest possible function $g(t)$ (stretching and squeezing $t$) such that $\frac {dc(g(t))}{dt}$ is smooth, with $g(t)=t$ $\forall t \in A$.

In plain English: How can I turn my simple linear interpolation into something that has a continuous time derivative (but still perfectly interpolates $f$)?

• Can your question be boiled down to this: you have a sequence $(0,a_1,a_2,\dots,a_n)$, and you want a smooth monotonic function $h:[0,a_n]\to\{0,1,\dots,n\}$ such that $h(a_i)=i$ for all $i$? Why does it have to be of the form $h=c\circ g$?
– user3883
Jul 1 '18 at 5:34
• If it is sufficient for $h$ to be $C^1$ and not $C^\infty$, you could try Fritsch & Carlson's monotone piecewise cubic interpolation.
– user3883
Jul 1 '18 at 5:35
• @Rahul yes, sorry, it should be $f:A \rightarrow B$. I just fixed it. Jul 1 '18 at 14:03
• @Rahul The codomain of $c(t)$ is no longer $B$ but rather $B$ and all real numbers in between. And yes, I want a smooth monotonic function the way you described, but one that maps $[0,a_n] \rightarrow [0 .. n]$. Jul 1 '18 at 14:10