How to use Bezier curve to model one to one functions? I recently have been looking at Bezier curves.  I thought it would be useful in modeling the continuous function across a series of plotted points.  So I started with
$f(x)$ and $g(x)$ and real numbers $$x_0 < x_1 < x_2$$ where the domain of $f(x)$ is $$(-\infty,x_0]$$ and the domain of $g(x)$ is $$[x_2,\infty)$$ and we have real numbers $y_1, y_2, y_3$ each of which correspond to the data points $$(x_0,y_0),(x_1,y_1),(x_2,y_2)$$ and $$f(x_0)=y_0$$ $$g(x_2)=y_2$$
I want to generate to Bezier curves, $B_1$ and $B_2$ such that $B_1$ extends from $(x_0,y_0)$ to $(x_1,y_1)$ and $B_2$ extends from $(x_1,y_1)$ to $(x_2,y_2)$. I want to work within the limitation that
$$\lim_{x\to x_0}f'(x) = \lim_{x\to x_0}B_1'(x)$$
$$\lim_{x\to x_1}B_1'(x) = \lim_{x\to x_1}B_2'(x)$$
$$\lim_{x\to x_2}B_2'(x) = \lim_{x\to x_2}g'(x)$$
I found the equation for the angle bisecting line running through $(x_1,y_1)$ for that is $$y=\left\{x_{0}\le x\le x_{2}\right\}\frac{\left(\sqrt{\left(y_{2}-y_{1}\right)^{2}+\left(x_{2}-x_{1}\right)^{2}}\left(y_{1}-y_{0}\right)+\sqrt{\left(y_{1}-y_{0}\right)^{2}+\left(x_{1}-x_{0}\right)^{2}}\left(y_{2}-y_{1}\right)\right)}{\left(\sqrt{\left(y_{2}-y_{1}\right)^{2}+\left(x_{2}-x_{1}\right)^{2}}\left(x_{1}-x_{0}\right)+\sqrt{\left(y_{1}-y_{0}\right)^{2}+\left(x_{1}-x_{0}\right)^{2}}\left(x_{2}-x_{1}\right)\right)}x+\frac{\left(\sqrt{\left(y_{2}-y_{1}\right)^{2}+\left(x_{2}-x_{1}\right)^{2}}\left(x_{1}y_{0}-y_{1}x_{0}\right)+\sqrt{\left(y_{1}-y_{0}\right)^{2}+\left(x_{1}-x_{0}\right)^{2}}\left(x_{2}y_{1}-y_{2}x_{1}\right)\right)}{\left(\sqrt{\left(y_{2}-y_{1}\right)^{2}+\left(x_{2}-x_{1}\right)^{2}}\left(x_{1}-x_{0}\right)+\sqrt{\left(y_{1}-y_{0}\right)^{2}+\left(x_{1}-x_{0}\right)^{2}}\left(x_{2}-x_{1}\right)\right)}$$
I figured that this would be relevant, but I am not quite sure where to go from here, other than the two starting curves $$((1-t)x_0+tx_1,(1-t)y_0+ty_1)$$ $$((1-t)x_1+tx_2,(1-t)y_1+ty_2)$$ where $0\leq t \leq 1$. Again, my main parameters are that $B_1$ and $B_2$ need to be one to one, and
$$\lim_{x\to x_0}f'(x) = \lim_{x\to x_0}B_1'(x)$$
$$\lim_{x\to x_1}B_1'(x) = \lim_{x\to x_1}B_2'(x)$$
$$\lim_{x\to x_2}B_2'(x) = \lim_{x\to x_2}g'(x)$$
 A: You have the following data that you want to match: a value and first derivative at $x_0$, a value and first derivative at $x_2$, and a value at $x_1$. You want a function that interpolates these values, and you want it to be $C_1$ continuous at the middle point $x_1$.
The simplest solution is a cubic spline with “clamped” end-tangents. This will consist of two cubic segments that actually have a $C_2$ joint at $x_1$. You can think of the two cubic segments as (real-valued) Bézier curves, if you want. Conventional Bézier curves are parametric curves, i.e. functions with values in $\mathbb R^2$ or $\mathbb R^3$, so they’re not quite what you need.
In general, to construct a cubic spline, you have to solve a linear system of equations. But in your case the linear system will be trivially simple. Just look up cubic splines.
If you want to guarantee that the result will be monotone, or that it closely matches the piecewise linear interpolant, then life gets more complicated. There are things called “monotonicity-preserving” splines, and “splines under tension” that achieve these objectives. But, you might find that plain old cubic splines serve your purpose, without all this extra fuss.
