Tutorials › Calculus III › Quadratic Taylor Polynomials in Three Variables

Differentiability and Linearization · Tutorial 344 of 999

Quadratic Taylor Polynomials in Three Variables

Construct and check quadratic Taylor polynomials in three variables by evaluating first and second partial derivatives at a base point.

Intermediate 11 min read

What You'll Learn

  • Identify the base point and the three coordinate increments used in a quadratic Taylor polynomial.
  • Calculate the first and second partial derivatives needed for a three-variable approximation.
  • Include all three pure-square terms and all three mixed-product terms with the correct coefficients.
  • Expand a Hessian quadratic form into coordinate notation.
  • Check a polynomial by matching its value, gradient, and Hessian at the base point.
  • Recognize and correct the common error of halving mixed-product coefficients.

From Derivatives to a Three-Variable Polynomial

A linearization describes how a function changes to first order near a point. A quadratic Taylor polynomial adds information about curvature: it uses the second partial derivatives to capture how the function bends in each coordinate direction and how pairs of coordinates interact.

For a scalar function of three variables, there are three pure-square terms and three mixed-product terms. Keeping all six terms straight is the main bookkeeping challenge. The Hessian matrix organizes their coefficients, while the coordinate formula makes each term visible.

Coordinates, Increments, and the Base Point

Let \(f(x,y,z)\) be a scalar-valued function, and choose the base point \((a,b,c)\). Write the coordinate increments from that point as

$$ h=x-a,\qquad k=y-b,\qquad \ell=z-c. $$

The increments \(h,k,\ell\) measure how far the input has moved in the \(x,y,z\) directions. The Taylor polynomial is expressed in these increments, not in the original coordinates alone. For example, the term \(hk\) measures a joint contribution from changes in \(x\) and \(y\).

Definition: If \(f\) has continuous second partial derivatives in a neighborhood of \((a,b,c)\), its second-order Taylor polynomial at \((a,b,c)\) is
$$ \begin{aligned} P_2(x,y,z)={}&f(a,b,c) +f_x(a,b,c)h+f_y(a,b,c)k+f_z(a,b,c)\ell\\ &+\frac12 f_{xx}(a,b,c)h^2 +\frac12 f_{yy}(a,b,c)k^2 +\frac12 f_{zz}(a,b,c)\ell^2\\ &+f_{xy}(a,b,c)hk +f_{xz}(a,b,c)h\ell +f_{yz}(a,b,c)k\ell. \end{aligned} $$

Every derivative in this expression is evaluated at the base point. The first line contains the function value and the linear terms. The second line contains the pure-square terms, each with a factor of \(1/2\). The final line contains the mixed-product terms.

The continuity assumption on the second partial derivatives ensures that the local Taylor expansion has this polynomial as its quadratic part. In particular, as \((h,k,\ell)\) approaches \((0,0,0)\), the difference between \(f(a+h,b+k,c+\ell)\) and \(P_2(a+h,b+k,c+\ell)\) is \(o(h^2+k^2+\ell^2)\). This identifies the polynomial’s order of approximation; it does not by itself give a numerical error bound.

Why the Mixed Terms Have No One-Half

The Hessian form of the quadratic approximation is one-half the Hessian quadratic form. In three variables, the Hessian is

$$ \mathbf{H}_f(a,b,c)= \begin{pmatrix} f_{xx}&f_{xy}&f_{xz}\\ f_{yx}&f_{yy}&f_{yz}\\ f_{zx}&f_{zy}&f_{zz} \end{pmatrix}_{(a,b,c)}. $$

When the second partial derivatives are continuous, the mixed partials agree, so this matrix is symmetric. Let \(\mathbf{h}=(h,k,\ell)^\top\). Expanding the quadratic form gives the reason for the coefficient pattern:

$$ \begin{aligned} \frac12\mathbf{h}^{\top}\mathbf{H}_f\mathbf{h} &=\frac12\bigl( f_{xx}h^2+f_{yy}k^2+f_{zz}\ell^2\\ &\qquad\quad+f_{xy}hk+f_{yx}kh +f_{xz}h\ell+f_{zx}\ell h +f_{yz}k\ell+f_{zy}\ell k \bigr)\\ &=\frac12 f_{xx}h^2+\frac12 f_{yy}k^2+\frac12 f_{zz}\ell^2 +f_{xy}hk+f_{xz}h\ell+f_{yz}k\ell. \end{aligned} $$

Each diagonal term occurs once in the quadratic form and keeps the factor \(1/2\). Each mixed term occurs twice: for example, the \(xy\) contributions are \(f_{xy}hk\) and \(f_{yx}kh\). Since \(f_{xy}=f_{yx}\) and \(kh=hk\), their sum is \(2f_{xy}hk\). The outside factor \(1/2\) leaves \(f_{xy}hk\), not \(\frac12 f_{xy}hk\).

Coefficient rule: The coefficient of \(h^2\) is \(\frac12 f_{xx}\), while the coefficient of \(hk\) is \(f_{xy}\). The corresponding rules apply to the other pure-square and mixed-product terms.

A Construction Checklist

At a chosen base point, construct the polynomial in a fixed order so that no derivative or product term is overlooked.

1
Set the increments.
Write \(h=x-a\), \(k=y-b\), and \(\ell=z-c\).
2
Evaluate the function and first partials.
Find \(f\), \(f_x\), \(f_y\), and \(f_z\) at \((a,b,c)\). These give the constant and linear terms.
3
Evaluate the second partials.
Find \(f_{xx}, f_{yy}, f_{zz}, f_{xy}, f_{xz}, f_{yz}\) at the same point.
4
Assemble and check.
Use one-half for each pure-square coefficient and no extra one-half for a mixed-product coefficient. Check that the polynomial’s value, first partials, and second partials at the base point agree with those of \(f\).

Worked Examples

Worked Example: A Polynomial with Several Mixed Terms

Find the second-order Taylor polynomial for \(f(x,y,z)=x^2y+yz^2+2xz\) at \((1,1,1)\).

First evaluate the function:

$$ f(1,1,1)=1^2(1)+(1)(1^2)+2(1)(1)=1+1+2=4. $$

The first partial derivatives are \(f_x=2xy+2z\), \(f_y=x^2+z^2\), and \(f_z=2yz+2x\). At the base point, their values are

$$ f_x(1,1,1)=2(1)(1)+2(1)=4,\quad f_y(1,1,1)=1^2+1^2=2,\quad f_z(1,1,1)=2(1)(1)+2(1)=4. $$

The second partial derivatives are

$$ f_{xx}=2y,\quad f_{yy}=0,\quad f_{zz}=2y,\quad f_{xy}=2x,\quad f_{xz}=2,\quad f_{yz}=2z. $$

Thus, at \((1,1,1)\), the pure second derivatives are \(2,0,2\), and the mixed second derivatives \(f_{xy},f_{xz},f_{yz}\) are \(2,2,2\). Here \(h=x-1\), \(k=y-1\), and \(\ell=z-1\). Substitution into the formula gives

$$ \begin{aligned} P_2(x,y,z) &=4+4h+2k+4\ell +\frac12(2)h^2+\frac12(0)k^2+\frac12(2)\ell^2\\ &\qquad +(2)hk+(2)h\ell+(2)k\ell\\ &=4+4h+2k+4\ell+h^2+\ell^2+2hk+2h\ell+2k\ell. \end{aligned} $$

To check the construction, at \(h=k=\ell=0\) the polynomial has value \(4\). Its first partial derivatives there are \(4,2,4\), matching those of \(f\). Its second partial derivatives there are \(P_{xx}=2\), \(P_{yy}=0\), \(P_{zz}=2\), \(P_{xy}=2\), \(P_{xz}=2\), and \(P_{yz}=2\), also matching \(f\). In this case the check confirms every coefficient, including the zero \(k^2\) coefficient.

Worked Example: An Exponential Depending on All Three Variables

Find the second-order Taylor polynomial for \(f(x,y,z)=e^{x+2y-z}\) at \((0,0,0)\).

The function value at the base point is \(e^0=1\). Put \(q=x+2y-z\). Differentiating \(e^q\) gives

$$ f_x=e^q,\qquad f_y=2e^q,\qquad f_z=-e^q. $$

At the origin, these first partial derivatives are \(1,2,-1\). Differentiating again gives

$$ f_{xx}=e^q,\quad f_{yy}=4e^q,\quad f_{zz}=e^q,\quad f_{xy}=2e^q,\quad f_{xz}=-e^q,\quad f_{yz}=-2e^q. $$

At the origin, the six values are \(1,4,1,2,-1,-2\), respectively. The base-point increments are \(h=x\), \(k=y\), and \(\ell=z\), so

$$ \begin{aligned} P_2(x,y,z) &=1+x+2y-z+\frac12x^2+\frac12(4)y^2+\frac12z^2 +2xy-xz-2yz\\ &=1+x+2y-z+\frac12x^2+2y^2+\frac12z^2+2xy-xz-2yz. \end{aligned} $$

For a check, the polynomial has value \(1\) at the origin. Its first partial derivatives there are \(1,2,-1\); its second partial derivatives there are \(1,4,1,2,-1,-2\), in the same order as above. In particular, the coefficient of \(xz\) is \(-1\), because \(f_{xz}(0,0,0)=-1\); it is not \(-\frac12\).

Worked Example: A Square Root with Distinct Coordinate Weights

Find the second-order Taylor polynomial for \(f(x,y,z)=\sqrt{4+x+2y-z}\) at the origin. The function is twice continuously differentiable in a neighborhood of the origin because its radicand is positive there.

Let \(s=x+2y-z\). At the origin, \(f=2\). The first partial derivatives are \(f_x=1/(2\sqrt{4+s})\), \(f_y=2/(2\sqrt{4+s})\), and \(f_z=-1/(2\sqrt{4+s})\). Their values at the origin are \(1/4,1/2,-1/4\).

Differentiating a second time gives

$$ f_{xx}=-\frac{1}{32},\quad f_{yy}=-\frac{4}{32}=-\frac18,\quad f_{zz}=-\frac{1}{32},\quad f_{xy}=-\frac{2}{32}=-\frac1{16},\quad f_{xz}=\frac{1}{32},\quad f_{yz}=\frac{2}{32}=\frac1{16} $$

at the origin. For instance, the general second-partial pattern is \(-a_i a_j/(4(4+s)^{3/2})\), where \((a_x,a_y,a_z)=(1,2,-1)\). Using \(h=x\), \(k=y\), and \(\ell=z\), the polynomial is

$$ \begin{aligned} P_2(x,y,z) &=2+\frac14x+\frac12y-\frac14z -\frac1{64}x^2-\frac1{16}y^2-\frac1{64}z^2\\ &\qquad-\frac1{16}xy+\frac1{32}xz+\frac1{16}yz. \end{aligned} $$

The checks are direct: the constant is \(2\), the three first partial derivatives at the origin are \(1/4,1/2,-1/4\), and the second partial derivatives are \(-1/32,-1/8,-1/32,-1/16,1/32,1/16\). These agree with the values obtained from \(f\). Notice that the \(xz\) and \(yz\) terms are positive because the \(z\)-weight in the radicand is negative.

A Common Coefficient Error

A frequent mistake is to place a factor of \(1/2\) in front of every second-derivative term. That is correct for the pure squares but incorrect for mixed products. For example, for \(f(x,y,z)=e^{x+2y-z}\) at the origin, \(f_{xy}=2\). The incorrect calculation

$$ \text{incorrect \(xy\) term}=\frac12 f_{xy}xy=\frac12(2)xy=xy $$

misses one of the two equal contributions in the Hessian quadratic form. The correct calculation is

$$ \frac12\bigl(f_{xy}xy+f_{yx}yx\bigr) =\frac12(2xy+2xy)=2xy. $$

Thus the \(xy\) term in the polynomial is \(2xy\). A reliable check is to differentiate the proposed polynomial twice: its \(xy\) partial derivative at the base point must equal \(f_{xy}\) there. The incorrect term \(xy\) would give \(P_{xy}=1\), contradicting \(f_{xy}=2\).

Why the Coordinate Formula Is Useful

The Hessian form is compact and helps organize second derivatives. The expanded coordinate formula is useful when constructing an actual polynomial: it shows explicitly which increments multiply each derivative. Together, the two forms reduce two different risks. The matrix form helps prevent omitted entries, while the expanded form makes it easier to spot a missing square, mixed product, or coefficient.

A useful final audit is to check the polynomial at the base point. Its value must equal \(f(a,b,c)\); its three first partial derivatives must agree with those of \(f\); and its six second partial derivatives must agree with the corresponding second partials of \(f\). These checks do not replace calculating the coefficients, but they give a systematic way to detect errors in signs and factors.

Check Your Understanding

For each question, keep the pure-square and mixed-product coefficients distinct.

  1. At a base point \((a,b,c)\), what increments correspond to the variables \(x,y,z\)?
  2. Which three terms in a three-variable quadratic Taylor polynomial have coefficients with a factor of \(1/2\)?
  3. Why does the \(xy\) term have coefficient \(f_{xy}(a,b,c)\), rather than \(\frac12 f_{xy}(a,b,c)\)?
  4. What regularity condition stated in this tutorial ensures that the second-order Taylor expansion applies near the base point?
  5. Which values should be compared to check a proposed quadratic Taylor polynomial at its base point?