A "Bezier curve" is a cubic spline, that is, a piecewise cubic function that fits the conditions:

. A single cubic won't do it- you have 4 numbers to fit and have 6 conditions. If you use one cubic

, for the first two points and another

, for the second two (the middle point being used in both), you will also require that the values and the first derivative match at the middle point.
Assuming that the points are

,

,

, and that the slopes at these points are

,

, and

, respectively, then you have the equations:
values:
slopes:
That gives eight equations to solve for the eight coefficients.