The purpose of a second-order model is to keep the first change and the leading curvature while separating the approximation from its error. Let a=(a1,a2)∈R2, write h=(u,v), and approximate f(a+h). Every derivative in the polynomial is evaluated at the fixed base point a; the variables are the displacements u=x−a1, v=y−a2. Total degree is what matters: uv has degree two, whereas u2v has degree three.
For sufficiently small h, the whole segment a+th, 0≤t≤1, must stay in the function's domain. A C2 hypothesis in an open neighborhood of a gives a local second-order expansion. A numerical cubic error bound uses additional third-derivative information along the actual segment. These are different conclusions, so the assumptions must be checked separately.
The second-order statement and its assumptions
Definition 13.4.1
(Hessian and second-order Taylor polynomial)
For a C2 function near a, its Hessian is Hf(a)=(∂i∂jf(a))i,j. Writing the displacement as h, the second-order Taylor polynomial at a is
T2(a+h)=f(a)+∇f(a)⋅h+21hTHf(a)h.
In two variables h=(u,v), the quadratic term is 21(fxxu2+2fxyuv+fyyv2) with derivatives evaluated at a.
Theorem 13.4.2
(Second-order Taylor expansion)
If f is C2 near a, then, as h→0,
f(a+h)=T2(a+h)+o(∥h∥2).
If f is C3 on a neighbourhood of the segment, then for some θ∈(0,1) the remainder equals 61ϕ′′′(θ), where ϕ(t)=f(a+th). In particular, if ∣ϕ′′′(t)∣≤K∥h∥3 along the segment, its absolute value is at most K∥h∥3/6.
Why C2 is enough for the local remainder
For a real scalar C2 function on an open neighborhood of a, take a small ball centered at a inside that neighborhood and let h be small enough that its segment stays there. Set ϕ(t)=f(a+th). Twice applying the fundamental theorem of calculus gives
f(a+h)=f(a)+∇f(a)⋅h+∫01(1−t)hTHf(a+th)hdt.
To verify this identity directly, one-variable integration by parts gives
The chain rule supplies ϕ′(0)=∇f(a)⋅h and ϕ′′(t)=hTHf(a+th)h. This proves the identity without an interchange of multiple integrals. Subtracting the constant-Hessian part and using ∫01(1−t)dt=1/2 yields
The supremum tends to zero by continuity of the Hessian at a: every point of the segment is within ∥h∥ of a. This proof needs no third derivatives. It does not give a fixed cubic constant or an infinite-series representation.
In two variables, symmetry fxy(a)=fyx(a) makes
21hTHf(a)h=21fxx(a)u2+fxy(a)uv+21fyy(a)v2.
There are two equal off-diagonal contributions before multiplying by 1/2. Forgetting either contribution halves the mixed coefficient incorrectly.
Proof X-ray
Where continuity of the Hessian does the work
The argument has one idea: write the error as a weighted average, along the segment, of the gap between the Hessian at a moving point and the Hessian at a. Reaching that integral form costs only the chain rule and one integration by parts, provided the segment stays in the ball. Continuity of Hf at a is then used exactly once, to make the gap small at every point of a short segment. Because nothing says how fast the gap shrinks, the conclusion is o(∥h∥2) with no explicit constant.
Check the derivatives before using the model
For the worked function f(x,y)=exln(1+y), the open domain is y>−1. Differentiation before substitution gives
At the origin these give the values used in the worked example below. In particular, the mixed coefficient is one, not one half. Since the function is smooth throughout its open domain, both the C2 local conclusion and a C3 segment estimate are available when their respective domain checks hold.
Worked example and selected practice
Worked example: a quadratic model with mixed curvature. For f(x,y)=exln(1+y) around (0,0), require y>−1. At the origin, the values and derivatives are
The constant, pure x, and pure x2 coefficients are zero because f(x,0)=0. At (0.02,0.03), the approximation is 0.03+0.0006−0.00045=0.03015. A guaranteed error needs bounds on the third derivatives over the connecting segment, not merely the fact that both coordinates look small.
Exercises
P01. Find the quadratic Taylor polynomial of f(x,y)=ln(1+x+y) at (0,0), stating a valid neighbourhood domain.
P02. Expand f(x,y)=x2y about (1,2) through second order and identify its exact remaining cubic term.
P03. Suppose f is C3 on an open neighbourhood containing the segment and all its third partial derivatives have absolute value at most two on that segment. Bound the second-order Taylor error for ∣h1∣≤0.01, ∣h2∣≤0.02.
Full solutions
P01. Let u=x+y. The expansion is u−u2/2, so T2=x+y−(x2+2xy+y2)/2. A neighbourhood with ∣x+y∣<1/2 lies in the logarithm's domain 1+x+y>0.
P02. Put x=1+u,y=2+v. Expansion is 2+4u+v+2u2+2uv+u2v. The Taylor polynomial through degree two omits only u2v.
P03. The coefficients come from the third derivative along the segment. Thus
Substituting the given bounds gives (2/6)(0.01+0.02)3=0.000009.
A certified error needs the whole segment
For a real C3 function on an open neighborhood containing [a,a+h], let h=(u,v) and ϕ(t)=f(a+th). Repeated chain differentiation gives
ϕ′′′(t)=fxxxu3+3fxxyu2v+3fxyyuv2+fyyyv3,
with all derivatives evaluated at a+th. The factors three count the positions of the repeated coordinate in the three differentiations; equality of mixed partials uses C3. The required remainder formula can be proved by three applications of Rolle's theorem. Define
Then ψ(0)=ψ(1)=ψ′(0)=ψ′′(0)=0. Rolle on [0,1] gives c1∈(0,1) with ψ′(c1)=0. Rolle applied to ψ′ on [0,c1] gives c2∈(0,c1) with ψ′′(c2)=0. Finally Rolle applied to ψ′′ on [0,c2] gives θ∈(0,c2) with ψ′′′(θ)=0. The C3 neighborhood hypothesis supplies all required continuity and differentiability. Since ψ′′′(θ)=ϕ′′′(θ)−6R, this proves R2=R=ϕ′′′(θ)/6. If every third partial has absolute value at most M on the segment, then
∣R2∣≤6M(∣u∣+∣v∣)3.
This is why P03 uses both coordinate bounds and every mixed derivative, rather than bounding just u3+v3.
For the earlier numerical example, h=(0.02,0.03) makes the entire segment satisfy 0≤x≤0.02, 0≤y≤0.03. Its four third partials are
This bound is conservative. It certifies an interval around the approximation; it does not claim every displayed decimal digit is correct.
Proof X-ray
Why Rolle's theorem is applied three times
The auxiliary function turns the unknown remainder into the coefficient of a cubic. This choice of R makes ψ vanish at t=1, while the subtracted Taylor terms make ψ, ψ′ and ψ′′ vanish at t=0. Each application of Rolle's theorem uses two zeros of one derivative and yields a zero of the next derivative strictly between them, so three steps leave a zero θ of ψ′′′. Differentiating Rt3 three times produces 6R, the source of the factor 1/6. Since θ lies in (0,1), the derivative bound is needed on the whole segment.
How to verify the selected solutions
For P01, differentiation at the origin gives ∇f=(1,1) and Hf=−(1111). Substitution in the Hessian formula produces the coefficient −1 of xy. The open strip ∣x+y∣<1/2 contains the origin and lies in the logarithm domain; a sufficiently small displacement segment is inside it.
For P02, at a=(1,2) the data are f(a)=2, ∇f(a)=(4,1) and Hf(a)=(4220). Hence the quadratic term is 2u2+2uv, agreeing with the exact product (1+u)2(2+v). The omitted u2v obeys ∣u2v∣≤∥h∥3, so it is also o(∥h∥2) without needing an infinite series.
For P03, the binomial sum includes both mixed terms with multiplicity three. Substituting the upper bounds gives 31(0.03)3=9×10−6. The assumption is a bound along the whole segment, not only at its endpoints.
Further study
Concept lensGeometric
The quadratic model as a tangent quadric surface
The graph of z=T2(a+h) is the quadric surface that agrees with the graph of f at a to second order: the same height, the same tangent plane, and the same curvature in every direction. Its shape is read from the Hessian part alone. In the worked example, T2=y+xy−21y2, whose quadratic part xy−21y2 has Hessian (011−1) with determinant −1<0. That quadratic part takes both signs (it is positive at (1,1) and negative at (0,1)), so the model surface is a hyperbolic paraboloid tilted by the linear term y: above its tangent plane in some directions and below it in others. A positive definite Hessian would instead give a bowl-shaped elliptic paraboloid lying above the tangent plane near a.
Worked example 13.4.3
(A quadratic model about a point away from the origin)
Let f(x,y)=x/y near a=(2,1), on the open half-plane y>0, and write x=2+u, y=1+v. Differentiating before substituting,
fx=y1,fy=−y2x,fxx=0,fxy=−y21,fyy=y32x,
so at a the values are f=2, fx=1, fy=−2, fxx=0, fxy=−1 and fyy=4. The quadratic term is 21(0⋅u2+2(−1)uv+4v2)=−uv+2v2, hence
T2=2+u−2v−uv+2v2.
At (2.1,0.95), u=0.1 and v=−0.05, so T2=2+0.1+0.1+0.005+0.005=2.21. The exact value is 2.1/0.95≈2.210526, a difference of about 0.00053. Every coefficient was evaluated at the base point, and the variables of the polynomial are the displacements, as the opening section of this note requires.
Worked example 13.4.4
(The coordinate bound against the bound along the segment)
Let f(x,y)=ex−y at the origin and h=(0.1,0.05). Here T2=1+(x−y)+21(x−y)2, and x−y=0.05 gives T2=1.05125. On the segment, x−y=0.05t∈[0,0.05], so every third partial derivative, ±ex−y, has absolute value at most M=e0.05. The bound ∣R2∣≤6M(∣u∣+∣v∣)3 from the segment-error section gives
∣R2∣≤6e0.05(0.15)3≈0.000591.
Working directly with ϕ(t)=e0.05t is much sharper: ϕ′′′(t)=(0.05)3e0.05t, so the Lagrange form gives ∣R2∣≤(0.05)3e0.05/6≈0.0000219. The actual error is e0.05−1.05125≈0.0000211. The coordinate bound adds the four terms of ϕ′′′ in absolute value, while along this segment they cancel to (u−v)3. Both bounds are valid; the second uses more of the function's structure.
Worked example 13.4.5
(Curvature of the distance function across the radial direction)
Let f(x,y)=x2+y2 near a=(3,4), where f=5. With r=x2+y2,
∇f=r(x,y),Hf=r31(y2−xy−xyx2),
so ∇f(a)=(3/5,4/5) and Hf(a)=1251(16−12−129). For h=(0.03,−0.04) the linear term is 0.018−0.032=−0.014, and the quadratic term is
Thus T2=4.9862304, while the exact value 24.8625≈4.9862310. The Hessian has the form r31wwT with w=(y,−x), perpendicular to the radius, so the quadratic term equals 2r1(h⋅w/r)2: only the component of h across the radial direction, here 0.048, bends the distance, and 0.0482/10=0.0002304.
Quick check
(Find the second-order Taylor polynomial of f(x,y)=y/(1+x) at (0,0).)
Differentiate on the domain x>−1 before evaluating at the origin.
Solution · Answer
On x>−1, fx=−y/(1+x)2, fy=1/(1+x), fxx=2y/(1+x)3, fxy=−1/(1+x)2 and fyy=0. At the origin f=0, ∇f=(0,1), fxx=0, fxy=−1 and fyy=0. The quadratic term is 21⋅2(−1)xy=−xy, so T2=y−xy.
Quick check
(Find T2 for f(x,y)=exy at (0,0) and explain why the coefficient of xy is 1 rather than 1/2.)
Compute fxy at the origin and count the off-diagonal entries of the Hessian.
Solution · Answer
Here fx=yexy, fy=xexy, fxx=y2exy, fyy=x2exy and fxy=(1+xy)exy. At the origin f=1, the gradient is zero, fxx=fyy=0 and fxy=1. The two equal off-diagonal entries contribute 21(2fxyuv)=uv, so T2=1+xy. This matches es=1+s+⋯ with s=xy of degree two.
Quick check
(For f(x,y)=x3−3xy2 about (1,0), find T2 and the exact remainder, and compare it at h=(0.1,0.1) with the bound 6M(∣u∣+∣v∣)3.)
Expand f(1+u,v) directly, then find a bound M for the third partial derivatives.
Solution · Answer
At (1,0), f=1, ∇f=(3,0), fxx=6, fxy=0 and fyy=−6, so T2=1+3u+3u2−3v2. Directly, f(1+u,v)=1+3u+3u2+u3−3v2−3uv2, so the remainder is exactly u3−3uv2. At h=(0.1,0.1) it equals 0.001−0.003=−0.002. The third partials are fxxx=6, fxxy=0, fxyy=−6 and fyyy=0, so M=6 and the bound is 66(0.2)3=0.008≥0.002.