- P2(x, y) = f(a, b) + fx · h + fy · k + ½ (fxx · h² + 2fxy · h · k + fyy · k²)
Here h = x − a and k = y − b are the steps from the centre, and all six numbers, f(a, b), the two first partials
and the three second partials, are taken at (a, b). The first three terms are the
tangent plane. The card takes the six numbers, the
centre (a, b) and the point (x, y), and returns P2. Along a line where y stays at b, k is 0 and the
formula is the Taylor polynomial of degree 2
of one variable.
The cross term has a 2 because fxy stands for two mixed partials, fxy and fyx, which
are equal when they are continuous (mixed partial derivatives).
The second-order part is the quadratic form of the Hessian matrix, the matrix of second partials, in the step
(h, k); see quadratic form.
Holds when f has continuous second partial derivatives near (a, b) and (x, y) is close to (a, b). The error is
then small compared with the square of the distance, and with continuous third partials it is at most a constant times the cube of the distance.
Worked example: x³y² near (1, 2)
For f(x, y) = x³y² the numbers at (1, 2) are f = 4, fx = 3x²y² = 12, fy = 2x³y = 4,
fxx = 6xy² = 24, fxy = 6x²y = 12 and fyy = 2x³ = 2. Read at (1.1, 1.95), the
steps are h = 0.1 and k = −0.05, and the polynomial comes to 5.0625:
- First order: 4 + 12 · 0.1 + 4 · (−0.05) = 5.
- Second order: ½ (24 · 0.01 + 2 · 12 · 0.1 · (−0.05) + 2 · 0.0025) = ½ (0.24 − 0.12 + 0.005) = 0.0625.
- P2(1.1, 1.95) = 5 + 0.0625 = 5.0625
The function itself is 1.1³ · 1.95² ≈ 5.0611. The tangent plane misses by about 0.061 and the second-order
polynomial by about 0.0014. Halving both steps divides that remaining error by about eight.
A second example: a function that is its own polynomial
For f(x, y) = xy about (0, 0) the numbers are f = 0, fx = fy = 0, fxx = fyy = 0
and fxy = 1. Everything comes from the cross term: P2 = ½ · 2 · 1 · h · k = hk, so
P2(3, 2) = 6, exactly xy. A function that is already a polynomial of degree at most two equals its second-order polynomial about
any centre, which is a way to test the formula.
Common mistakes
- Leaving out the 2 on the cross term. Without it the polynomial has the right value and the right slopes
at (a, b) but the wrong curvature in every direction where x and y change together.
- Leaving out the ½. As on the one-variable page, the polynomial then curves twice as much as f.
- Using x and y instead of the steps. The terms use x − a and y − b, not x and y, unless the centre is (0, 0).
- Taking the partials at (x, y). All six numbers belong to the centre (a, b).
- Mixing up h² and k². fxx goes with (x − a)² and fyy with (y − b)².
Frequently asked questions
How does this differ from the tangent plane?
The tangent plane has the right value and the right slopes at (a, b). The polynomial on this page also has the
right curvature in every direction, so it stays close to the surface over a larger neighbourhood.
What is it used for?
At a stationary point the first-order terms are 0 and only the second-order part is left, which is why the
second-derivative test for two variables
classifies the point by the Hessian determinant.
Is there a third-order term?
Yes, with the third partials fxxx, fxxy, fxyy and fyyy and the
coefficients 1, 3, 3, 1 over 6. This page stops at degree 2.