I want a monotonic differentiable function $f(x)$ such that, for some $0 < a < 1 < b$:
$f(x) = x$ for all $x \le a$
$f(x) = 1$ for all $x \ge b$
So basically the problem boils down to two steps:
Choosing values of $a$ and $b$ (these will become user-adjustable parameters in a computer program)
Defining $f(x)$ for all $x \in (a,b)$
Ignoring the monotonicity constraint, the simplest way to find such a $f(x)$ is to interpolate a cubic polynomial: $g(x) = mx^3 + nx^2 + px + q$, so that $f(x) = g(x)$ for all $x \in (a,b)$, using the system of equations:
$g(a) = ma^3 + na^2 + pa + q = a$
$g(b) = mb^3 + nb^2 + pb + q = b$
$g'(a) = 3ma^2 + 2na + p = 1$
$g'(b) = 3mb^2 + 2nb + p = 0$
Unfortunately, the resulting $g(x)$ could have a local maximum in $(a,b)$, making $f(x)$ not monotonic. Is there some easy way to characterize the region in the $AB$ plane consisting of those points for which $g(x)$ doesn't have a local maximum in $(a,b)$?
Edit: When I insert a word in the middle of a sentence, I should re-read the whole sentence. :-p