Two endpoint values do not determine the slopes of a curve connecting them. If those slopes are separately supplied, they become additional interpolation data rather than properties to be guessed from the endpoint values. Cubic Hermite interpolation makes that distinction explicit: four conditions determine a polynomial of degree at most three on one interval.

The independent variable also matters. A derivative per second is not the same number as a derivative with respect to a normalized coordinate running from zero to one. Omitting the interval-length conversion changes the specified slopes even if both endpoint values remain correct. The following invented scalar record works through those constraints without reporting an executed interpolator or a validated robot trajectory.

Count the conditions before choosing a curve

Suppose t runs from t_0 to t_1, with positive interval length h = t_1 - t_0. We are given y_0 and y_1 as endpoint values and m_0 and m_1 as derivatives dy/dt at those endpoints. These are four numbers with distinct roles. If y is a length and t is time, the values have length units and the slopes have length-per-time units.

A cubic has four coefficients, so it can satisfy four independent linear constraints. A straight line through the two values uses only two conditions and generally cannot also fit arbitrary endpoint slopes. Adding invented intermediate samples would introduce different information; it would not be equivalent to using the supplied derivatives.

SciPy's official CubicHermiteSpline reference specifies values and first derivatives as inputs. Boost's official cubic Hermite documentation likewise requires supplied slopes. These definitions motivate the problem; the interval, values, algebra, and comparisons below are original calculations, not outputs copied from either library.

Build basis functions on the unit interval

Define u = (t - t_0)/h. Seek a polynomial p(u) whose values and u-derivatives can be assembled separately. Four useful basis polynomials are H00 = 2u cubed - 3u squared + 1, H10 = u cubed - 2u squared + u, H01 = -2u cubed + 3u squared, and H11 = u cubed - u squared.

At u = 0, H00 has value one and the other three have value zero. At u = 1, H01 has value one and the others vanish. Their endpoint derivatives similarly select the two slope conditions: H10 has u-derivative one at zero and zero at one, while H11 has derivative zero at zero and one at one. The value-selecting bases have zero derivatives at both endpoints.

The chain rule gives dp/du = h dy/dt. Consequently, the required curve is p(u) = H00 y_0 + H10 h m_0 + H01 y_1 + H11 h m_1. The factors h m_0 and h m_1 have the same units as y, so every term can be added consistently. Those factors also impose the correct physical derivatives when dividing dp/du by h.

Recover a cubic from explicit data

Choose t_0 = 2 seconds and t_1 = 5 seconds, so h = 3 seconds. Let y_0 = 1 millimeter, y_1 = 4 millimeters, m_0 = 2 millimeters per second, and m_1 = -1 millimeter per second. The normalized-coordinate derivative data are therefore 6 millimeters and -3 millimeters.

Substitution into the four basis terms gives p(u) = 1 + 6u - 3u cubed, measured in millimeters. At u = 0 it gives 1, and at u = 1 it gives 4. Differentiation gives dy/dt = (6 - 9u squared)/3 = 2 - 3u squared millimeters per second, recovering both specified endpoint derivatives exactly.

At t = 3.5 seconds, u = 0.5, so the interpolated value is 3.625 millimeters and the derivative is 1.25 millimeters per second. The line through the same endpoint values gives 2.5 millimeters at that time and has constant slope 1 millimeter per second. It fits the values while failing both derivative conditions.

See what a missing length factor does

Suppose one incorrectly inserts the numerical slopes 2 and -1 directly as coefficients of H10 and H11, treating per-second slopes as per-u slopes. The resulting expression is 1 + 2u + 6u squared - 5u cubed. It still passes through 1 and 4, so an endpoint-value check alone would not expose the mistake.

Its physical starting derivative is 2/3 millimeter per second, and its ending derivative is -1/3 millimeter per second. Each is one third of the requested value. At the midpoint it gives 2.875 millimeters, different from both the correct Hermite value and the endpoint line. The error is a coordinate conversion, not rounding or a library-specific choice.

Uniqueness does not establish physical truth

To prove uniqueness, subtract any two cubics satisfying the same four constraints. Their difference has value and first derivative zero at both endpoints. It must therefore have double roots at u = 0 and u = 1, making it divisible by u squared times (u - 1) squared. A nonzero polynomial with that factor has degree at least four. The cubic difference must be zero.

This proves uniqueness within the chosen degree bound. A higher-degree function can share all four data and still differ inside: add any constant times u squared times (u - 1) squared. Thus even supplied endpoint slopes do not identify an arbitrary unknown physical response without the polynomial modeling assumption.

Finally, specified slopes and automatically selected shape-preserving slopes answer different questions. The supplied negative ending slope in this example is part of its data, not something inferred from the increasing endpoint values. It does not establish acceleration, jerk, actuator feasibility, or behavior outside the interval. A reproducible lookup record should retain the endpoints, units, four data values, coordinate normalization, and intended domain together.

Sources checked October 24, 2026:

SciPy: CubicHermiteSpline: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.CubicHermiteSpline.html

Boost.Math: Cubic Hermite interpolation: https://www.boost.org/doc/libs/latest/libs/math/doc/html/math_toolkit/cubic_hermite.html

Concept illustration: Generic robot sensor imagery provides robotics context. It does not depict these invented inputs, an executed algorithm, or a measured system result.