Multivariable Taylor Approximation and Error

Use a Hessian to improve a local model and bound error across all nearby directions.

Builds on Lagrange Multipliers and Constraint Geometry

The bigger question: Where is the best value when movement has limits?

On this page

Add curvature to the tangent model

For a twice continuously differentiable scalar function near aa, with displacement vector hh, the second-order Taylor expansion is

f(a+h)=f(a)+∇f(a)Th+12hTH(a)h+o(∥h∥2).f(a+h)=f(a)+\nabla f(a)^Th+\tfrac12h^TH(a)h+o(\|h\|^2).

In two variables the quadratic term is 12(fxxhx2+2fxyhxhy+fyyhy2)\tfrac12(f_{xx}h_x^2+2f_{xy}h_xh_y+f_{yy}h_y^2). The factor two on the mixed term comes from both off-diagonal Hessian entries.

To bound the error of the first-order approximation, suppose the Hessian operator norm is at most MM along the segment from aa to a+ha+h. Then ∣f(a+h)−f(a)−∇f(a)Th∣≤M∥h∥2/2|f(a+h)-f(a)-\nabla f(a)^Th|\le M\|h\|^2/2. The bound must hold along the segment, not only at the base point.

Visual guide

VISUAL GUIDEThe quadratic correction measures curvature
Along displacement h = s(0.1, −0.2) from (1, 1), f = x² + xy + y² becomes 3 − 0.3s + 0.03s². The linear estimate omits the upward quadratic correction. At s = 1 the missing term is 0.03.02.40.52.5812.751.52.9223.1sf
  • Exact quadratic value
  • Linear prediction
Along displacement h = s(0.1, −0.2) from (1, 1), f = x² + xy + y² becomes 3 − 0.3s + 0.03s². The linear estimate omits the upward quadratic correction. At s = 1 the missing term is 0.03.

Worked example: an exact quadratic

For f=x2+xy+y2f=x^2+xy+y^2 at a=(1,1)a=(1,1), f(a)=3f(a)=3, ∇f(a)=(3,3)\nabla f(a)=(3,3) and H=(2112)H=\begin{pmatrix}2&1\\1&2\end{pmatrix}. At displacement h=(0.1,−0.2)h=(0.1,-0.2), the linear model gives 3+0.3−0.6=2.73+0.3-0.6=2.7.

The quadratic correction is hx2+hxhy+hy2=0.03h_x^2+h_xh_y+h_y^2=0.03, giving the exact answer 2.732.73. There is no higher remainder because the original function is quadratic. Since the Hessian eigenvalues are 1,31,3, the first-order error bound is 3(0.05)/2=0.0753(0.05)/2=0.075, safely above the actual error 0.030.03.

PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

What is the quadratic term in the Taylor expansion near a point with displacement h and Hessian H?

Hint 1 · Find a starting point

The one-variable second-order term includes a factorial.

Hint 2 · Take the next step

The quadratic form generalizes f″(a)h²/2.

Show the reasoning

Answer: ½hᵀHh

The term is ½hᵀHh; Hh is a vector and cannot be a scalar change in f.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

Worked example: uncertainty propagation

For a measured quantity f(x,y)f(x,y) and small input errors Δx,Δy\Delta x,\Delta y, the first-order change is approximately fxΔx+fyΔyf_x\Delta x+f_y\Delta y. If ∣Δx∣≤ϵx|\Delta x|\le\epsilon_x and ∣Δy∣≤ϵy|\Delta y|\le\epsilon_y, its magnitude is bounded by ∣fx∣ϵx+∣fy∣ϵy|f_x|\epsilon_x+|f_y|\epsilon_y.

For area A=xyA=xy near x=2,y=3x=2,y=3, with both input errors at most 0.010.01, this linear bound is 0.050.05. The exact correction ΔxΔy\Delta x\Delta y has magnitude at most 0.00010.0001, so a rigorous total bound is 0.05010.0501. Units are area units; independent statistical errors would call for a different probabilistic calculation.

Practice

  1. Write the quadratic Taylor polynomial for ex+ye^{x+y} at zero.
  2. If M=4M=4 and ∥h∥=0.1\|h\|=0.1, bound the linearization error.
  3. Why does a zero gradient not make the quadratic correction vanish?
Show worked solutions
  1. 1+x+y+(x2+2xy+y2)/21+x+y+(x^2+2xy+y^2)/2.
  2. At most 4(0.1)2/2=0.024(0.1)^2/2=0.02.
  3. The gradient controls the first-order term; the Hessian can still be nonzero, as at the origin of x2+y2x^2+y^2.

Further study

MIT OpenCourseWare: Multivariable Calculus provides a full university course with additional lectures and exercises.

MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →