VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

The Gold Standard of Hermite Interpolation

Three secondary students review open books and notes together in a classroom.

Hermite interpolation constructs a curve that matches both specified values and specified derivatives. In its simplest widely used form, a cubic joins two endpoint values while also matching the slope at each endpoint. It is useful when knowing where a curve passes is not enough: the way it arrives and leaves matters too.

The gold standard is a curve whose constraints, coordinate scale, derivative information and limitations are explicit. Matching four conditions exactly does not prove that an unobserved physical process followed the resulting cubic. Reliable use requires checking the source of the slopes, behaviour between samples, sensitivity to uncertain inputs and the difference between interpolation and extrapolation.

This guide develops the cubic formula from first principles, works through unequal interval lengths, examines continuity and overshoot, and connects local pieces with general Hermite polynomial interpolation. It also includes uncertainty calculations, a changed-context exercise, diagnostics and practical routes into further study. All numerical cases are original teaching examples rather than measurements of an identified real system.

Start with the Gold Standard master, the Education parent and the How X Works hub. The broader Numerical Analysis root explains error and computational reliability. Here the central question is how values and slopes jointly determine a local curve, and what that determination does and does not establish.

CHAPTER 1 OF 14 · Define constraints and build the basis

1. Identify the information being interpolated

Back to contents

Ordinary value interpolation asks a curve to pass through selected points. Hermite interpolation also supplies derivative information at some or all of those points. A value constrains the height; a first derivative constrains the local rate of change. Higher derivatives can constrain curvature and further local behaviour when the problem requires them.

For two distinct locations a and b, write the endpoint values as y₀ and y₁ and the endpoint slopes as m₀ and m₁. The cubic problem asks for p(a) = y₀, p(b) = y₁, p′(a) = m₀ and p′(b) = m₁. These are four scalar conditions. A cubic has four coefficients, making it a natural candidate.

A slope needs a coordinate

If y is position in metres and x is time in seconds, m is velocity in metres per second. If the same curve is parameterised by a dimensionless animation coordinate, its derivative has different units and different numerical values. A tangent arrow without its parameter scale is incomplete information.

Record whether slopes were measured, supplied by a physical model, differentiated from a known function, estimated from neighbouring samples or chosen for visual design. These sources have different evidential status. A slope chosen to make a curve attractive is not an independent observation of an underlying process.

The interval also belongs to the definition. A transition lasting two seconds and one lasting twenty seconds can share endpoint positions but require different velocities. Rescaling the horizontal axis without adjusting derivative data changes the constraints rather than merely changing the drawing.

Before calculating, write a short input account: two endpoint coordinates, two values, two derivatives with units, and the intended domain of use. Then state the goal: exact reconstruction of a known polynomial, approximation of a smooth function, visual interpolation, or inference from uncertain measurements. The same algebra can serve all four purposes, but the checks needed to justify the result are not the same.

Contents · Next chapter

CHAPTER 2 OF 14 · Define constraints and build the basis

2. Explain why four endpoint conditions determine a cubic

Back to contents

Begin on the unit interval with p(t) = A + Bt + Ct² + Dt³. At t = 0, the value is A and the derivative is B. Therefore A and B are immediately determined by the left endpoint data. The right endpoint gives two linear equations for C and D.

If p(0) = y₀, p(1) = y₁, p′(0) = s₀ and p′(1) = s₁, then C + D = y₁ − y₀ − s₀ and 2C + 3D = s₁ − s₀. Solving gives C = 3(y₁ − y₀) − 2s₀ − s₁ and D = 2(y₀ − y₁) + s₀ + s₁.

A uniqueness argument you can inspect

Suppose two cubics satisfy the same four conditions. Their difference q has value and first derivative zero at both endpoints. Thus q contains factors t² and (t − 1)². A nonzero polynomial with those factors has degree at least four. Since q has degree at most three, it must be zero. The two cubics are identical.

This argument establishes uniqueness within a specified polynomial class. It does not establish uniqueness among all smooth functions. Adding c t²(t − 1)² to a cubic preserves all four endpoint conditions while changing interior values. The additional term is quartic, so it lies outside the class used in the uniqueness proof.

The phrase “degree at most three” matters. Some input combinations produce a straight line or quadratic. For example, matching the endpoints and slopes of a linear function returns that line, with the higher coefficients equal to zero. Four constraints do not force the cubic coefficient to be nonzero.

A useful diagnostic follows directly: if two implementations give different cubics for the same four exact conditions, at least one has a convention, scaling or arithmetic mismatch. If two proposed physical trajectories differ between the endpoints while sharing those conditions, that alone is not a contradiction. They may belong to a larger function class than the interpolating cubic.

Previous chapter · Contents · Next chapter

CHAPTER 3 OF 14 · Define constraints and build the basis

3. Build the four Hermite basis functions

Back to contents

Rearrange the coefficient solution to separate the contribution of each datum. Define H₀₀(t) = 2t³ − 3t² + 1, H₁₀(t) = t³ − 2t² + t, H₀₁(t) = −2t³ + 3t² and H₁₁(t) = t³ − t². Then p(t) = y₀H₀₀(t) + s₀H₁₀(t) + y₁H₀₁(t) + s₁H₁₁(t).

Each function performs one job. H₀₀ has value one at the left endpoint, value zero at the right, and zero derivative at both. H₁₀ has zero endpoint values, derivative one at the left and zero at the right. The other two functions provide the corresponding right-endpoint roles.

Verify rather than memorise

For H₁₀, differentiation gives 3t² − 4t + 1. Its value at t = 0 is 1 and at t = 1 is 0. Meanwhile H₁₀ itself vanishes at both endpoints. This confirms that multiplying it by s₀ changes the left slope without changing either endpoint value or the right slope.

The value basis functions satisfy H₀₀ + H₀₁ = 1. Consequently, adding the same constant to both endpoint values shifts the entire curve by that constant, leaving slopes unchanged. This simple identity is an effective implementation test and an explanation of translation invariance.

At t = 1/2, the four basis values are 1/2, 1/8, 1/2 and −1/8. The midpoint therefore depends on the difference between the endpoint slopes as well as the average of the endpoint values. Equal endpoint slopes cancel their midpoint contributions, although they still affect the rest of the curve.

These basis functions are a representation of the unique cubic, not a different interpolation problem. Solving coefficients, using basis functions or evaluating a suitable library object should agree under the same conventions. Choosing a representation is a computational decision; choosing endpoint slopes is a modelling decision. Keeping those decisions separate makes mistakes much easier to locate.

Previous chapter · Contents · Next chapter

CHAPTER 4 OF 14 · Scale, reconstruct and join segments

4. Restore the physical interval and derivative units

Back to contents

For a general interval [a,b], let h = b − a and t = (x − a)/h. The normalised coordinate runs from zero to one. By the chain rule, dp/dt = h dp/dx. Therefore the derivatives supplied to the unit-interval formula are s₀ = h m₀ and s₁ = h m₁.

The physical-coordinate interpolant is p(x) = y₀H₀₀(t) + h m₀H₁₀(t) + y₁H₀₁(t) + h m₁H₁₁(t). The factors h are necessary. Omitting them matches derivatives with respect to t rather than derivatives with respect to x.

A dimensional check

Suppose y is measured in metres and x in seconds. The product h m has units seconds times metres per second, which is metres. Every term in the formula then has the same units as p. Adding a raw velocity directly to a position contribution would fail this check.

To differentiate the interpolant with respect to x, differentiate each basis with respect to t and multiply the whole expression by 1/h. For a second derivative, the factor is 1/h². These factors are especially important when comparing segments of unequal duration.

Consider a constant-speed line y = 2 + 3x over [4,6]. Its endpoint values are 14 and 20, its endpoint slopes are both 3, and h = 2. The normalised slopes are 6. Substitution reconstructs 14 + 6t, which equals 2 + 3x. Using normalised slopes of 3 instead would produce a different curve despite correct endpoint heights.

The official CubicHermiteSpline documentation describes a piecewise cubic interface taking coordinates, values and derivatives. Supply derivatives with respect to the same coordinate used in the input array. A library can enforce array shapes and finite values, but it cannot infer that an input derivative was expressed per minute while the coordinate was expressed in seconds.

Previous chapter · Contents · Next chapter

CHAPTER 5 OF 14 · Scale, reconstruct and join segments

5. Work a complete value-and-slope reconstruction

Back to contents

Take a fictional position record on [0,2] seconds with y₀ = 1 metre, y₁ = 5 metres, m₀ = 1 metre per second and m₁ = 3 metres per second. Here h = 2, and the normalised slope values are 2 and 6.

At the midpoint x = 1, t = 1/2. The interpolated position is (1)(1/2) + (2)(1/8) + (5)(1/2) + (6)(−1/8) = 0.5 + 0.25 + 2.5 − 0.75 = 2.5 metres. A straight line between endpoint positions would give 3 metres, so the supplied slopes have changed the interior estimate.

Recover the polynomial explicitly

The resulting curve is p(x) = 1 + x + x²/2. Its derivative is 1 + x. It gives positions 1 and 5 at x = 0 and x = 2, and slopes 1 and 3 at those endpoints. Its cubic coefficient is zero because these particular data belong to a quadratic.

At x = 0.5, the position is 1 + 0.5 + 0.125 = 1.625 metres and the velocity is 1.5 metres per second. At x = 1.5, the corresponding values are 3.625 metres and 2.5 metres per second. These additional points are calculated consequences of the interpolation model, not new observations.

The second derivative is constant at 1 metre per second squared. That gives a coherent constant-acceleration interpretation for the teaching case. It does not mean that any four position-and-velocity constraints imply constant acceleration; here the quadratic simplification makes that interpretation possible.

Use this example as a unit test with a non-unit interval. It simultaneously tests endpoint values, endpoint derivatives, the normalisation factor and interior evaluation. Testing only a unit interval can hide a missing h factor because multiplying by one changes nothing. A good test case deliberately makes an important implementation assumption visible.

Previous chapter · Contents · Next chapter

CHAPTER 6 OF 14 · Scale, reconstruct and join segments

6. Join segments and distinguish continuity levels

Back to contents

A piecewise cubic Hermite curve uses one cubic on each adjacent pair of knots. If neighbouring pieces share the same value and first derivative at their common knot, the assembled curve has continuous value and first derivative there. This is called C1 continuity.

The second derivative need not be continuous. C1 does not mean that every visually smooth property agrees across the join. For a position trajectory, continuous first derivative means continuous velocity, while a jump in second derivative means an acceleration jump. Whether that is acceptable depends on the intended use.

Construct a visible acceleration jump

On [0,1], join value 0 to value 1 with both endpoint slopes zero. The cubic is 3t² − 2t³. Its first derivative is 6t − 6t², which vanishes at both ends. Its second derivative is 6 − 12t, equal to 6 at the start and −6 at the end.

On [1,2], use the same shape translated upward, joining 1 to 2 with zero endpoint slopes. At the shared point x = 1, both pieces have value 1 and derivative zero. But the second derivative approaches −6 from the left and +6 from the right. The join is C1 and not C2.

This matters when a downstream calculation differentiates the interpolated curve. A graph of position may look satisfactory while acceleration contains jumps created by the interpolation design. More plotting points do not remove those jumps; they only show the same piecewise function more densely.

A conventional cubic spline often imposes second-derivative continuity along with boundary conditions, whereas cubic Hermite interpolation directly accepts first derivatives. These are different constraint systems. Neither should be selected solely because its name includes “cubic” or “spline.” Choose the continuity and endpoint information required by the problem, and verify the relevant derivatives at every join rather than assuming that smooth appearance establishes them.

Previous chapter · Contents · Next chapter

CHAPTER 7 OF 14 · Inspect shape and general interpolation

7. Recognise overshoot and slope-driven reversals

Back to contents

Matching increasing endpoint values does not guarantee an increasing cubic between them. Endpoint slopes can force the curve to rise too quickly, reverse direction and then reach the prescribed final value. Hermite interpolation faithfully satisfies the supplied conditions even when their combined shape is undesirable.

On [0,1], take values 0 and 1 and slopes 10 at both ends. The cubic is p(t) = 18t³ − 27t² + 10t. At t = 1/4 it equals 1.09375, already above the final endpoint value. At t = 3/4 it equals −0.09375, below the initial endpoint value.

Check the derivative, not only the endpoints

The derivative is 54t² − 54t + 10. At the midpoint it is −3.5, even though the endpoint derivatives are both positive. The curve must reverse direction inside the interval. Positive endpoint slopes are therefore insufficient to establish monotonicity.

For a scalar cubic, checking stationary points inside the interval is practical: solve the quadratic derivative and evaluate the curve at any real roots within the domain, as well as at the endpoints. Those values determine the segment’s extrema. A sparse plot can miss a narrow extremum or understate its magnitude.

If the values represent a quantity that must stay nonnegative, overshoot below zero may make the interpolant unusable. Repair options include revising unreliable slopes, selecting a shape-preserving method, subdividing with justified additional data or using a simpler interpolation rule. Silently clipping the output changes the function and may destroy derivative continuity.

Do not automatically alter slopes that are independent physical measurements merely to obtain a pleasing curve. A conflict between trusted derivatives and a desired shape may indicate that the shape assumption is wrong, the interval is too large or the observations are inconsistent. The right response begins with the source of the constraints, not with cosmetic editing of the plotted curve.

Previous chapter · Contents · Next chapter

CHAPTER 8 OF 14 · Inspect shape and general interpolation

8. Separate supplied slopes from PCHIP slope selection

Back to contents

Cubic Hermite interpolation is a construction once endpoint values and slopes are known. PCHIP is a particular piecewise method that chooses slopes from value data to preserve shape. The cubic basis is shared, but the source and meaning of derivative information differ.

The official PchipInterpolator documentation describes monotonicity preservation, continuous first derivatives and possible second-derivative jumps. Those properties belong to the documented slope-selection procedure, not to every arbitrary set of Hermite slopes.

Compare two legitimate input situations

In a trajectory problem, an independent velocity measurement may supply an endpoint derivative. A Hermite segment can honour that measurement, with its uncertainty made explicit. In a table of cumulative values without derivative observations, a shape-preserving method instead derives slopes from neighbouring secants. Its derivatives are algorithmic choices consistent with the values and shape goal.

The existing PCHIP and monotone-slope guide develops that selection mechanism and a worked local example. Use it when the central decision is preserving monotone data without unnecessary oscillation. Use the present construction when you need to understand the role of value and derivative constraints themselves.

A shape-preserving interpolant is still not a denoiser. If the data contain a small spurious rise and fall, an interpolating method must pass through those values. Smoothing or regression is a different task, with a different objective and an explicit allowance for residuals.

Similarly, monotonicity does not establish physical accuracy between observations. Several monotone curves can share the same samples. Shape restrictions reduce the range of admissible behaviour, but they do not turn an inferred curve into an observed one. State whether a derivative came from measurement, a model or a shape rule so readers can understand which information supports the resulting trajectory.

Previous chapter · Contents · Next chapter

CHAPTER 9 OF 14 · Inspect shape and general interpolation

9. Understand general Hermite interpolation and repeated nodes

Back to contents

The two-endpoint cubic is one member of a wider family. General Hermite interpolation can specify values and several derivatives at multiple locations. When the derivative constraints at each distinct node are consecutive, starting from the value, the total number of conditions determines the degree bound for the unique interpolating polynomial.

For example, values and first derivatives at three distinct nodes provide six conditions and determine a polynomial of degree at most five. The degree may be lower for special data. Increasing the number of constraints does not guarantee that a single high-degree polynomial will be the best approximation between them.

Repeated-node notation has a precise meaning

Newton interpolation can be written using divided differences. When nodes coincide in the appropriate limiting construction, derivative information replaces an ordinary difference quotient. In particular, f[a,a] represents f′(a), while f[a,a,a] represents f″(a)/2. The factorial is part of the relation, not an optional convention.

NIST’s interpolation reference gives the coincident-node divided-difference rule. It explains how derivative constraints connect to the same algebraic framework used for ordinary interpolation. Repeating a node in a data structure only has this meaning when the algorithm explicitly supports the convention.

The official KroghInterpolator documentation describes one such interface: repeated coordinates indicate successive derivative data. Do not pass duplicated coordinates with conflicting ordinary values and assume that the software will somehow resolve them. That would be an inconsistent value-interpolation problem, not a legitimate derivative constraint.

Global and piecewise constructions should also be distinguished. A single degree-five polynomial through three value-and-slope pairs is generally different from two cubic pieces sharing the middle pair. Both honour the specified information, but they make different choices between knots and respond differently when one input changes. Select the function class deliberately, then test its behaviour on the actual domain rather than treating the number of satisfied constraints as the sole measure of quality.

Previous chapter · Contents · Next chapter

CHAPTER 10 OF 14 · Quantify uncertainty and validate

10. Quantify sensitivity to uncertain values and slopes

Back to contents

For a fixed interval and evaluation point, the cubic Hermite value is linear in its four input data. That makes sensitivity analysis direct. A small perturbation changes the output by δp = H₀₀ δy₀ + hH₁₀ δm₀ + H₀₁ δy₁ + hH₁₁ δm₁. The coefficients tell us how each input contributes.

At the midpoint, this becomes δp = (δy₀ + δy₁)/2 + h(δm₀ − δm₁)/8. Equal slope errors cancel at the midpoint, while opposite slope errors reinforce each other. This cancellation is point-specific: equal errors do not generally cancel at every interior location.

Work a variance calculation

Return to the two-second interval. The midpoint coefficients on [y₀,m₀,y₁,m₁] are [0.5,0.25,0.5,−0.25]. Assume independent endpoint-position errors with standard deviation 0.02 metres and independent slope errors with standard deviation 0.1 metres per second. The output variance is 2(0.5²)(0.02²) + 2(0.25²)(0.1²) = 0.00145 square metres.

The corresponding standard deviation is approximately 0.0381 metres. This calculation concerns the specified input-error model. It excludes interpolation error from an incorrect trajectory assumption and any uncertainty in the endpoint times themselves.

If values and derivatives were estimated from the same observations, independence may be implausible. The general covariance expression is wᵀΣw, using the full covariance matrix of the four inputs. A shared position offset passes through unchanged because the two value weights sum to one. Interpolation does not remove that common bias.

Longer intervals multiply slope contributions by a larger h. This is a concrete reason to examine derivative quality before interpolating across a large gap. A small slope uncertainty can become an appreciable position uncertainty over time. Retain the provenance of the derivative estimates and avoid reporting many digits merely because the polynomial can be evaluated to high arithmetic precision.

Previous chapter · Contents · Next chapter

CHAPTER 11 OF 14 · Quantify uncertainty and validate

11. Distinguish reconstruction error from missing information

Back to contents

When the target function is known, its difference from the interpolant can be examined directly. For f(x) = x⁴ on [0,1], endpoint values are 0 and 1 and endpoint derivatives are 0 and 4. Substitution gives the cubic H(x) = 2x³ − x².

The exact difference is f(x) − H(x) = x⁴ − 2x³ + x² = x²(x − 1)². It vanishes in both value and first derivative at the endpoints, yet is positive inside. At x = 1/2, the error is 1/16. Matching values and slopes has not reproduced this quartic exactly.

More endpoint information still leaves an interior question

For any cubic p meeting the four conditions, define g(x) = p(x) + c(x − a)²(x − b)². The added term and its first derivative vanish at both endpoints. Therefore g meets the same value and slope constraints for every c, but its interior values vary with c.

This construction proves an information limit. Without restricting the admissible function class or bounding its behaviour, the endpoint data alone cannot supply a universal interior error bound. A numerical routine cannot infer the missing restriction from the fact that it has solved its interpolation equations exactly.

A smoothness-based error theorem can provide a bound when its derivative assumptions and bounds are genuinely available. Merely observing that a plotted curve looks smooth does not establish those conditions for the unknown target. The distinction is between a mathematical premise and a visual impression.

The existing GNSS orbit interpolation and held-out-state guide connects this issue to tabulated trajectories. It separates reproducing supplied samples from checking states not used to construct the curve. That distinction applies equally to a laboratory response table, a simulation output or a designed motion path: test something the interpolation was not forced to satisfy.

Previous chapter · Contents · Next chapter

CHAPTER 12 OF 14 · Quantify uncertainty and validate

12. Validate derivatives, integrals and out-of-range behaviour

Back to contents

A cubic can be differentiated and integrated exactly as a polynomial. Those operations describe the interpolant. Whether they accurately describe the original process is a separate question, especially when differentiation amplifies uncertain inputs or integration accumulates a model bias.

Integrating the four unit-interval basis functions gives 1/2, 1/12, 1/2 and −1/12. After restoring the physical interval, the integral is h(y₀ + y₁)/2 + h²(m₀ − m₁)/12. This identity provides an independent consistency check for a library’s integration method.

Check the teaching trajectory

For the example with h = 2, values 1 and 5, and slopes 1 and 3, the integral is 2(1 + 5)/2 + 4(1 − 3)/12 = 6 − 2/3 = 16/3. Directly integrating 1 + x + x²/2 from zero to two gives the same result. Because y represents position, the units are metre-seconds; this integral is not displacement.

Displacement instead follows by integrating velocity, the derivative of position, and equals p(2) − p(0) = 4 metres. Attaching units to each operation prevents a mathematically correct integral from receiving the wrong physical interpretation.

Outside [a,b], evaluating the same polynomial is extrapolation. The basis values can grow rapidly, and the endpoint evidence no longer surrounds the requested location. A software default that permits extrapolation is a computational option, not evidence that extrapolated values are reliable. Decide whether to reject, flag or explicitly model out-of-range queries.

For further study, Numerical Differentiation explains derivative inference and noise, while the general Numerical Analysis guide connects representation, conditioning and validation. Keep the original constraints alongside derived quantities so a later reader can distinguish exact polynomial operations from conclusions about the system being represented.

Previous chapter · Contents · Next chapter

CHAPTER 13 OF 14 · Transfer and continue learning

13. Test transfer when duration and slope information change

Back to contents

A fictional display marker must move from position 0 to position 1 over two seconds, beginning and ending at rest. Use a cubic Hermite segment. Here y₀ = 0, y₁ = 1, m₀ = m₁ = 0, h = 2 and t = x/2. The position is p(x) = 3t² − 2t³.

At one second, t = 1/2 and p = 1/2. The velocity is (6t − 6t²)/2, giving 0.75 position units per second at the midpoint. Acceleration is (6 − 12t)/4, so it begins at 1.5 and ends at −1.5 position units per second squared.

Shorten the duration

Now complete the same normalised transition in one second, still beginning and ending at rest. The position shape in t is unchanged, but h is halved. Midpoint velocity doubles to 1.5, and endpoint acceleration magnitudes quadruple to 6. A visually identical path can therefore have very different time-dependent demands.

Next return to the two-second interval but suppose the initial slope is 0.2 while the final slope remains zero. The extra position contribution is h m₀H₁₀ = 0.4H₁₀. At the midpoint it adds 0.05, changing the position from 0.5 to 0.55. The new curve honours a different starting condition; it is not a more accurate evaluation of the old curve.

Introduce an unobserved interior deviation

Add c t²(1 − t)² to either normalised curve. Endpoint values and endpoint physical velocities remain unchanged because the added term and its t-derivative vanish at both ends. With c = 0.8, the midpoint position increases by 0.8/16 = 0.05.

The same midpoint change can thus arise from changing an endpoint slope or from an interior deviation that preserves all endpoint conditions. The full curves are not identical, and the causes are different. The exercise tests whether you can identify which information changed rather than interpreting every disagreement as rounding. To distinguish a real interior deviation from an assumed cubic trajectory, obtain an independent interior observation or justify additional constraints on admissible motion.

Previous chapter · Contents · Next chapter

CHAPTER 14 OF 14 · Transfer and continue learning

14. Diagnose failures and choose a learning route

Back to contents

Why are endpoint values correct but endpoint slopes wrong?

Check the coordinate normalisation first. Missing h factors in the slope contributions, or missing 1/h factors when differentiating, can leave values correct while producing incorrect derivatives. Test a non-unit interval and verify units. Also check whether the supplied slope is with respect to time, distance or a dimensionless parameter.

Why does the curve overshoot?

Inspect the derivative inside each segment. Arbitrary endpoint slopes can force reversals even when endpoint values and endpoint slopes appear reasonable separately. Determine whether the slopes are trusted observations or adjustable design choices. Shape-preserving slope selection is appropriate for some data tasks, but it changes the derivative assumptions.

Is a piecewise Hermite curve automatically smooth enough?

It is C1 when neighbouring pieces share values and first derivatives. Second derivatives may jump. Identify which derivatives matter to the intended use and test them at the joins. A position plot alone is not a sufficient check for an application that depends on acceleration or higher rates of change.

What if derivatives are unavailable?

Choose explicitly between estimating them, using a method that selects them, or using a value-only interpolator. Estimated derivatives bring uncertainty and dependence on neighbouring values. They should not be labelled as independent measurements. The existing PCHIP article supplies one useful route when monotone shape is the priority.

How should I practise?

First derive the four basis functions and check their endpoint values and derivatives. Then reconstruct a line and a quadratic over intervals of different lengths. Introduce the steep-slope overshoot case and locate its stationary points. Finally perturb one input at a time and compare the change with the linear sensitivity formula.

For a small implementation, preserve the coordinate array, values, slopes, units, extrapolation policy and test results. Validate every endpoint value and derivative, a known polynomial at interior points, continuity at joins and the integral identity. A held-out interior value tests something different from these construction checks and should be reported separately.

Primary references are NIST DLMF interpolation, the official CubicHermiteSpline interface, Krogh interpolation and PCHIP documentation. Consult the documentation matching the software version used. A useful final explanation names the constraints, demonstrates that the curve satisfies them, and states which additional evidence supports its behaviour between the supplied locations.

Previous chapter · Contents · Gold Standard master