Second-Order Differentials Explained: Linear Principal Parts and Bilinear Structure

    This article explains second-order differentials by separating the base point, the direction of displacement, and the order of differentiation. It shows why the second differential is a bilinear map, why setting its two inputs equal produces \(f''(x)(dx)^2\), and why differentiating a diagonal expression can yield zero without contradicting the existence of the second differential. It also covers the factor \(1/2\) in second-order expansions, the case where \(x\) depends on \(t\), and the multivariate Hessian formulation.

    1. The Core Question: Differentiating With Respect to What?

    When learning about second-order differentials, the most common confusion is this: the first differential extracts the linear principal part of an increment, so why does differentiating again produce a quadratic term? If that quadratic term is divided by an increment and a limit is taken, the result is zero. Does that mean the second differential should also be zero?

    The problem is not that the definition of differentiation is inconsistent. The problem is that different variables, different functions, and different orders of change are being mixed together.

    For a real-valued function (y=f(x)), the first differential can be written as

    [
    df(x)[h]=f’(x)h.
    ]

    This expression involves two distinct roles:

    • (x) is the base point, which determines where the local behavior of the function is being examined.
    • (h) is the direction or displacement, used as the input to the linear map.

    To compute the second differential, we should first fix (h), then examine how this linear map changes as the base point (x) moves. To avoid confusion, denote the new displacement of the base point by another symbol, (k).

    The second differential is not obtained by extracting a linear term twice with respect to the same small quantity. It is obtained by differentiating the first differential as a function of the base point.

    2. First Differential: Linearity Is in the Displacement, Not Necessarily in the Original Function

    Suppose (f) is differentiable at (x). By the definition of differentiability,

    [
    f(x+h)-f(x)=f’(x)h+r(h),
    ]

    where the remainder satisfies

    [
    r(h)/h\to 0,\qquad h\to 0.
    ]

    Equivalently,

    [
    f(x+h)-f(x)=f’(x)h+o(h).
    ]

    Here (f’(x)h) is the linear principal part of the function increment with respect to (h). Defining this as the differential gives

    [
    df(x)[h]=f’(x)h.
    ]

    It is important to emphasize that “linear” means that, with (x) fixed, the map from (h) to (df(x)[h]) is linear. It does not mean that (f) itself is a linear function, nor does it mean that (f’(x)) is linear in (x).

    For example, if (f(x)=x^3), then

    [
    df(x)[h]=3x^2h.
    ]

    This is linear in (h), but quadratic in (x). This is exactly why the first differential can still have a nontrivial derivative as the base point changes.

    In elementary calculus, (h) is often written as (dx), giving

    [
    dy=f’(x)dx.
    ]

    Here (dx) usually denotes the displacement of the independent variable, or the input to the differential map. It does not need to be understood as a mysterious infinitesimal that exists independently.

    3. A Rigorous Construction of the Second Differential: Fix the Direction, Move the Base Point

    To make the derivation intuitive and to handle the remainder clearly, assume first that (f) is twice continuously differentiable in the neighborhood under discussion.

    Fix a direction (h), and move the base point from (x) to (x+k). The change in the first differential is

    [
    df(x+k)[h]-df(x)[h]
    =
    [f’(x+k)-f’(x)]h.
    ]

    Since (f’) is differentiable at (x),

    [
    f’(x+k)-f’(x)=f’’(x)k+o(k).
    ]

    Therefore,

    [
    df(x+k)[h]-df(x)[h]
    =
    f’’(x)kh+h\cdot o(k).
    ]

    In this limiting process, (h) is fixed, so the remainder can also be written as (o(k)). The linear principal part with respect to (k) is

    [
    d^2f(x)[k,h]=f’’(x)kh.
    ]

    This result is called the second differential.

    It is linear in (k) when (h) is fixed, and linear in (h) when (k) is fixed. Therefore, the second differential is a bilinear map.

    From a more abstract perspective, the first derivative (Df(x)) is a linear map, while the second derivative (D^2f(x)) describes how that linear map changes with (x). For a real-valued function of one variable,

    [
    Df(x)[h]=f’(x)h,
    ]

    [
    D^2f(x)[k,h]=f’’(x)kh.
    ]

    Thus, the second derivative should not be understood only as the number (f’’(x)). The more complete object is the bilinear map determined by that number.

    4. Why Textbooks Write the Second Differential as (f’’(x)(dx)^2)

    If the derivation requires distinguishing (k) and (h), why do textbooks eventually use only one (dx)?

    The reason is that distinguishing the two inputs is necessary for a correct definition. Once the definition is established, the two inputs can of course be assigned the same value.

    Setting (k=h) in the second differential gives

    [
    d^2f(x)[h,h]=f’’(x)h^2.
    ]

    Textbooks often denote this diagonal evaluation as

    [
    d^2y=f’’(x)(dx)^2.
    ]

    The square does not appear out of nowhere. It appears because the two inputs to the bilinear map happen to be equal, so the product (kh) becomes (h^2).

    The following two statements must be distinguished:

    1. (d^2f(x)[k,h]) is linear in each input separately.
    2. The map (h\mapsto d^2f(x)[h,h]) is usually quadratic.

    There is no contradiction between them. Restricting a bilinear map to the diagonal naturally produces a quadratic expression. For example, (B(k,h)=kh) is linear in (k) and linear in (h), but (B(h,h)=h^2) is not a linear function.

    5. Why “Set (k=h) First, Then Take the First Derivative” Gives Zero

    Now consider another function:

    [
    G(h)=df(x+h)[h]-df(x)[h].
    ]

    In this definition, both the displacement of the base point and the input to the differential vary with (h). This is no longer the earlier process of “fix the direction (h), then move only the base point.”

    By second-order differentiability,

    [
    G(h)=[f’(x+h)-f’(x)]h
    =f’’(x)h^2+o(h^2).
    ]

    Also, (G(0)=0), so

    [
    G’(0)
    =\lim{h\to 0}\frac{G(h)}{h}
    =\lim
    {h\to 0}\left[f’’(x)h+o(h)\right]
    =0.
    ]

    This zero value means that the new function (G) has no first-order change at the origin. Its first possible nonzero term is of second order.

    It does not mean that (f’’(x)=0), and it certainly does not mean that the second differential does not exist.

    There are two different questions here:

    • Taking the first derivative of (G) at (h=0) gives the coefficient of the first-order term.
    • Taking the second differential of (f) at (x) gives a bilinear structure in two directions.

    It is completely normal for a quadratic quantity to have no first-order term. For example, (q(h)=h^2) satisfies (q’(0)=0), but this does not imply that (q) is identically zero.

    6. A Complete Comparison Using the Square Function

    Take (f(x)=x^2). Then

    [
    f’(x)=2x,\qquad f’’(x)=2.
    ]

    The first differential is

    [
    df(x)[h]=2xh.
    ]

    6.1 Fix (h), Then Move the Base Point

    Replace (x) with (x+k):

    [
    df(x+k)[h]-df(x)[h]
    =2(x+k)h-2xh
    =2kh.
    ]

    This expression is already linear in (k), so

    [
    d^2f(x)[k,h]=2kh.
    ]

    Setting (k=h) gives

    [
    d^2f(x)[h,h]=2h^2.
    ]

    6.2 Make the Two Displacements Equal First, Then Take the First Derivative

    Define

    [
    G(h)=df(x+h)[h]-df(x)[h]=2h^2.
    ]

    Then

    [
    G’(0)=\lim_{h\to 0}\frac{2h^2}{h}=0.
    ]

    Both computations are correct, but their outputs are different objects. The first extracts the second differential. The second extracts the first derivative of (G).

    6.3 Compare With the Actual Increment of the Original Function

    The increment of the original function is

    [
    f(x+h)-f(x)=2xh+h^2.
    ]

    Here:

    • (2xh) is the first differential;
    • (h^2) is the second-order expansion term;
    • the diagonal evaluation of the second differential is (2h^2).

    This also reminds us that the second differential and the second-order term in the expansion differ by a factor of (1/2).

    7. The Relationship Between the Second Differential and the Second-Order Expansion

    Under the condition of twice continuous differentiability, the function can be expanded near (x) as

    [
    f(x+h)
    =f(x)+df(x)[h]
    +\frac{1}{2}d^2f(x)[h,h]
    +o(h^2).
    ]

    In ordinary derivative notation, this becomes

    [
    f(x+h)
    =f(x)+f’(x)h
    +\frac{1}{2}f’’(x)h^2
    +o(h^2).
    ]

    Therefore,

    [
    d^2f(x)[h,h]=f’’(x)h^2,
    ]

    while the second-order contribution to the actual increment is

    [
    \frac{1}{2}f’’(x)h^2.
    ]

    Why is there a factor of (1/2)? Intuitively, along the path from (x) to (x+h), the slope does not change all at once. It changes gradually. Accumulating this first-order change in slope produces the factor (1/2) in the second-order contribution.

    In algorithm analysis, local approximation, and error estimation, this distinction matters. One should not treat (d^2f(x)[h,h]) directly as the complete second-order correction to the original function increment; doing so doubles that correction.

    8. When Does (dx) in (d(dy)) Need to Be Differentiated?

    When we write

    [
    dy=f’(x)dx,
    ]

    and then

    [
    d(dy)=f’’(x)(dx)^2,
    ]

    it is usually assumed that (x) is an independent coordinate and (dx) is treated as a fixed direction input. This convention corresponds to the earlier construction: fix (h), then differentiate with respect to the base point.

    But if (x) itself depends on another variable (t), that is, (x=x(t)), the situation is different.

    Let

    [
    y(t)=f(x(t)).
    ]

    The first derivative is

    [
    \frac{dy}{dt}=f’(x(t))x’(t).
    ]

    Differentiating again requires the product rule:

    [
    \frac{d^2y}{dt^2}
    =f’’(x(t))[x’(t)]^2
    +f’(x(t))x’’(t).
    ]

    The first term comes from the change in (f)‘s first derivative as the base point changes. The second term comes from the change in the path velocity (x’(t)) itself.

    For example, take (f(x)=x^2) and (x(t)=t^2). Then (y(t)=t^4), so

    [
    y’’(t)=12t^2.
    ]

    Using the composition formula,

    [
    f’’(x)[x’(t)]^2=2\cdot(2t)^2=8t^2,
    ]

    [
    f’(x)x’’(t)=2t^2\cdot 2=4t^2.
    ]

    Adding the two terms gives exactly (12t^2).

    Therefore, one cannot mechanically assume that “(dx) is constant” in every situation. The correct approach is to specify first: with respect to which variable is the derivative being taken, is the direction fixed, and does (x) move along a nonlinear path?

    9. The Multivariate Case: The Second Differential Is a Bilinear Form

    For a twice continuously differentiable real-valued function

    [
    f:\mathbb{R}^n\to\mathbb{R},
    ]

    the first differential can be written as

    [
    df(x)[h]=\nabla f(x)^T h.
    ]

    The second differential is

    [
    d^2f(x)[k,h]=k^T H(x)h,
    ]

    where (H(x)) is the matrix of second partial derivatives.

    Under twice continuous differentiability, mixed partial derivatives are equal, so (H(x)) is symmetric. Setting (k=h) gives

    [
    d^2f(x)[h,h]=h^T H(x)h.
    ]

    For example,

    [
    f(x_1,x_2)=x_1^2+3x_1x_2+2x_2^2.
    ]

    Its second derivative matrix is

    [
    H=
    \begin{bmatrix}
    2 & 3\
    3 & 4
    \end{bmatrix}.
    ]

    Thus,

    [
    d^2f(x)[h,h]
    =2h_1^2+6h_1h_2+4h_2^2.
    ]

    This expression includes not only squared terms but also cross terms between different directions. It can describe the local curvature structure of the function and is an important foundation for identifying local extrema, building second-order approximations, and designing optimization algorithms.

    The one-variable expression (f’’(x)h^2) is exactly the special case of this structure when the dimension is one.

    10. A Checklist for Practical Derivations

    When encountering (d(dy)) or similar expressions, use the following checklist.

    10.1 Identify the Function Being Studied

    Is it the original function (f(x)), the function formed by the first differential as the base point changes, or a new function obtained by tying several variables together? Different objects can naturally have different derivatives.

    10.2 Use Different Symbols for Different Roles

    It is advisable to use (x) for the base point, (h) for the differential input, and (k) for the displacement of the base point. Do not write every increment as (dx) before the definition is clear.

    10.3 State Which Quantities Are Fixed

    When differentiating (df(x)[h]) with respect to (x), (h) is fixed. When differentiating along a parameterized curve, the direction may change with the parameter. These two situations cannot be mixed without justification.

    10.4 Specify the Order Being Retained

    Taking the first-order linear principal part discards second-order terms. The disappearance of second-order terms in a first derivative is exactly consistent with the order rule; it does not mean that no second-order information exists.

    10.5 Check the Limiting Condition for the Remainder

    When (h) is fixed, (h\cdot o(k)) can be treated as (o(k)) with respect to (k). If (h) also varies with some parameter, the remainder should be reanalyzed rather than carried over without explanation.

    10.6 Distinguish the Second Differential From the Second-Order Approximation Term

    The diagonal evaluation of the second differential is (f’’(x)h^2), while the second-order term in the expansion is half of that. In approximation calculations, this factor cannot be omitted.

    11. Summary

    The key to understanding second-order differentials is not repeated manipulation of the symbol (d), but recognizing the mapping structure behind it.

    The first differential,

    [
    df(x)[h]=f’(x)h,
    ]

    is a linear map after the base point is fixed.

    The second differential,

    [
    d^2f(x)[k,h]=f’’(x)kh,
    ]

    is the bilinear map produced by the change of this linear map as the base point moves.

    The textbook expression

    [
    d^2y=f’’(x)(dx)^2
    ]

    usually denotes the value of the second differential when both inputs are the same direction. It is quadratic in the common direction, but it still comes from a structure that is separately linear in two inputs.

    Once the base point, direction, displacement, and order of differentiation are distinguished, it becomes clear that a zero first derivative and a nonzero second differential can hold at the same time. They do not contradict each other; they answer different mathematical questions.