On existence of a smooth function on an interval $\left( a, b \right)$ with certain conditions I am trying to prove the following result:

Let $\left( a, b \right) \subseteq \mathbb{R}$ be an interval and $x, y \in \left( a, b \right)$. Then, there is a smooth family of diffeomorphisms $f_t: \left( a, b \right) \rightarrow \left( a, b \right)$, where $0 \leq t \leq 1$, such that the following hold:

*

*For all $z \in \left( a, b \right)$, we have $f_0 \left( z \right) = z$.

*There is some $\epsilon > 0$ such that for all $z \in \left( a, a + \epsilon \right) \cup \left( b - \epsilon, b \right)$, we have $f_t \left( z \right) = z$, for all $0 \leq t \leq 1$.

*$f_1 \left( x \right) = y$.


I have tried to define $f_t: \left( a, b \right) \rightarrow \left( a, b \right)$ as
$$f_t \left( z \right) = z + t \int\limits_{a}^{z} g \left( u \right) \mathrm{d}u,$$
for some smooth map $g: \left( a, b \right) \rightarrow \left( a, b \right)$. My choice of the smooth map $g = g_1 - g_2$, where $g_1$ and $g_2$ are "bump functions" with (compact) support contained in $\left( a, b \right)$ about $x$ and $y$ such that their areas are same (and they don't overlap), That way, point (1) and (2) of the result are taken care of.
The problem is with point (3) and the bijectivity of $f_t$ (and, indeed, finding its inverse).
For point (3) to hold, we would require
$$\int\limits_{a}^{x} g \left( u \right) \mathrm{d}u = y - x.$$
Also, proving bijectivity with this choice of $g$ is difficult.
So, the question is whether such choice of bump functions $g_1$ and $g_2$ is possible?
 A: Using your notations and in particular, we choose $\epsilon >0$ so that
$$\tag{1} b-x - 4\epsilon > y-x$$
and $g_1, g_2$ are non-negative,

*

*$g_1$ is supported in $(a+\epsilon, x-\epsilon)$,

*$g_2$ is supported in $(x+\epsilon, b-\epsilon)$,

*$\int_a^b g_1(u)du = \int_a^b g_2(u)du = y-x$, and
$$\tag{2} g_2 (u) <1,\ \ \ \forall u\in (a, b).$$
We can assume this last condition because of (1). Using $g$, $f_t$ as suggested, we have
$$f_1 (x) = x + \int_a^x g(u) du = x + \int_a^x g_1 (u) du = x + y-x = y.$$
also, by (2),
$$ f_t'(z) = 1 + g(z) = (1 -tg_2(z)) + tg_1(z)  >0.$$
Thus each $f_t$ is strictly increasing and thus is injective. Intermediate value theorem imply that $f_t$ is also surjective. Thus $f_t$ is bijective for all $t\in [0,1]$.
Remark To construct $g_2$ with the required property:

*

*Consider the function $h : (a, b)\to \mathbb R$ given by
$$ h(z) = \begin{cases} \frac{y-x}{b-x-4\epsilon} & \text{ when } z\in [x+ 2\epsilon, b-2\epsilon]\\ 0 & \text{ otherwise.}\end{cases}$$
then $h(z) <1$ by (1) and $\int_a^b h(s) ds = y-x$.

*Let $\psi$ be a smooth bump function with integral one and support in $(-\epsilon, \epsilon)$. Let $g_2 = h *\psi$ be the convolution. Then $g_2$ is smooth, supported in $[x+ \epsilon, b-\epsilon]$, satisfies (2) and $\int_a^b g_2(s) ds = y-x$ (the last condition follows from the property about convulution (see here))

