A second derivative is the derivative of a first derivative: it measures how a function’s rate of change is itself changing. It turns an intuitive question—whether a graph is bending more, less, or differently—into a quantity that can guide geometric code. Differentiation can continue recursively whenever the preceding derivative exists. section 5.0 section 5.6
For a parametric curve, first derivatives describe tangent direction, while second derivatives are closely tied to how that direction changes. That makes them useful for assessing curvature: a point and tangent alone cannot distinguish a line from circles with different radii. Continuous curvature requires continuous second derivatives, commonly described as C2 smoothness. section 5.2.3 section 5.6
>>> diff(a*x**2 + b*x + c, x, x) #1 2*a
SymPy can differentiate a polynomial twice by naming the same variable twice. For a quadratic ax² + bx + c, the result is 2a: the second derivative is constant, so its curvature-related behavior cannot vary with x. section 5.1.4
Second derivatives support practical curve design in several ways:
- Check whether joined curve pieces can have continuous curvature, rather than merely sharing a point or tangent. section 5.2.3 section 5.6
- Add a curvature-related constraint to a polynomial by differentiating it twice and setting its value at a chosen point. section 7.1.1
- Choose constraints carefully: each prescribed derivative consumes polynomial coefficients and adds work to the equation system. section 7.1.1
Why a round road corner is not automatically smooth
A circular arc can meet a straight segment with matching position and tangent, yet their curvatures cannot match: a line has zero curvature and a circle has constant nonzero curvature. For a twisty road, avoiding that curvature discontinuity matters when the goal is a smooth change in turning behavior. section 5.2.3
Second-derivative constraints also generalize. A statement such as P⁽ᵐ⁾(xᵢ) = dᵢ becomes a linear equation for polynomial coefficients, provided the polynomial has enough degree to supply the needed coefficients. This is the basis for spending polynomial flexibility on specified shape behavior at selected points. section 7.1.1


