Tutorials › Calculus III › Constructing Second-Order Taylor Polynomials

Differentiability and Linearization · Tutorial 341 of 999

Constructing Second-Order Taylor Polynomials

Use the derivatives at a point to build and check a quadratic polynomial that locally approximates a function of two variables.

Intermediate 10 min read

What You'll Learn

  • Identify the function value and first and second partial derivatives needed at a base point.
  • Use coordinate increments to write the second-order Taylor polynomial in two variables.
  • Explain why the pure-square terms have a factor of one-half and the mixed term does not.
  • Construct and verify Taylor polynomials for exponential, logarithmic, and polynomial functions.
  • Recognize when the polynomial is a valid local approximation and avoid a common mixed-term error.

From a Tangent Plane to a Quadratic Approximation

A linearization uses the value and first partial derivatives of a function at a point. It describes the local tangent-plane approximation. When that approximation is not sufficiently accurate, second partial derivatives provide additional information: they describe how the function bends in each coordinate direction and how the two directions interact.

For a function \(f(x,y)\), the second-order Taylor polynomial combines these data into a polynomial of degree at most two. Its coefficients are determined by the function and its derivatives at one specified base point. The key practical details are to use increments from that point and to handle the mixed term correctly.

The Second-Order Taylor Polynomial

Let the base point be \((a,b)\), and suppose \(f\) has first and second partial derivatives there. Write the coordinate increments as \(u=x-a\) and \(v=y-b\). If the second partial derivatives are continuous in a neighborhood of \((a,b)\), the second-order Taylor polynomial is defined by the following formula. In particular, this smoothness condition ensures the mixed partial derivatives agree at the base point.

Definition: The second-order Taylor polynomial of \(f\) at \((a,b)\) is
$$ \begin{aligned} P_2(x,y)={}&f(a,b)+f_x(a,b)u+f_y(a,b)v\\ &+\frac{1}{2}f_{xx}(a,b)u^2 +f_{xy}(a,b)uv +\frac{1}{2}f_{yy}(a,b)v^2, \end{aligned} $$
where \(u=x-a\) and \(v=y-b\).

The polynomial has six possible terms: a constant, two linear terms, and three quadratic terms. Every derivative in its coefficients is evaluated at the base point, not at the general point \((x,y)\). The increments \(u\) and \(v\), by contrast, vary as \((x,y)\) varies.

The pure-square terms have factors of one-half, while the mixed term does not. These coefficients are not a matter of convention or memorization alone: they are exactly the coefficients needed for the polynomial’s derivatives at the base point to match those of \(f\).

Why These Coefficients Match the Derivatives

We can justify the construction by starting with a general quadratic polynomial in the increments:

$$ Q(u,v)=c_0+c_1u+c_2v+c_3u^2+c_4uv+c_5v^2. $$

At the base point, \(u=v=0\). The value of \(Q\) there is \(c_0\). Its first partial derivatives are \(Q_u=c_1+2c_3u+c_4v\) and \(Q_v=c_2+c_4u+2c_5v\), so at the base point they are \(c_1\) and \(c_2\). Its second partial derivatives are \(Q_{uu}=2c_3\), \(Q_{uv}=c_4\), and \(Q_{vv}=2c_5\). Matching these six quantities to the value and derivatives of \(f\) determines every coefficient.

1
Match the value.
Set \(c_0=f(a,b)\), since \(u=v=0\) at the base point.
2
Match the first derivatives.
Set \(c_1=f_x(a,b)\) and \(c_2=f_y(a,b)\).
3
Match the second derivatives.
Since \(Q_{uu}=2c_3\), \(Q_{uv}=c_4\), and \(Q_{vv}=2c_5\), set \(c_3=\frac12 f_{xx}(a,b)\), \(c_4=f_{xy}(a,b)\), and \(c_5=\frac12 f_{yy}(a,b)\).

Substitution of these six coefficients gives the stated formula. This argument explains the half-factors: differentiating a square term twice produces a factor of two. Differentiating \(uv\) once in each variable produces no extra factor. The construction matches the value and all first and second partial derivatives at the base point.

When \(f\) is twice continuously differentiable near \((a,b)\), the polynomial is also a local approximation: as \((x,y)\) approaches \((a,b)\), the difference between \(f(x,y)\) and \(P_2(x,y)\), divided by \(u^2+v^2\), approaches zero. This describes the approximation’s local accuracy; it does not by itself give a numerical error bound at a particular distance.

A Reliable Construction Procedure

A good calculation keeps the base point, derivative values, and increments visibly separate. This helps prevent a frequent error: differentiating correctly but substituting the base point incorrectly, or using \(x,y\) where the formula requires \(x-a,y-b\).

1
Record the base point and increments.
For \((a,b)\), define \(u=x-a\) and \(v=y-b\).
2
Find the six required values.
Compute \(f,f_x,f_y,f_{xx},f_{xy},f_{yy}\) at \((a,b)\).
3
Substitute into the formula.
Keep the factors of one-half on the two pure-square terms and use the mixed derivative as the coefficient of \(uv\).
4
Check by differentiating the polynomial.
At \(u=v=0\), confirm that its value and first and second partial derivatives reproduce the data used to construct it.

Worked Examples

Worked Example: An Exponential Function at the Origin

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

First compute the function value:

$$ f(0,0)=e^0=1. $$

The first partial derivatives are \(f_x=e^{x+2y}\) and \(f_y=2e^{x+2y}\). Thus \(f_x(0,0)=1\) and \(f_y(0,0)=2\). Differentiating again gives \(f_{xx}=e^{x+2y}\), \(f_{xy}=2e^{x+2y}\), and \(f_{yy}=4e^{x+2y}\). At the base point, these values are \(1,2,4\), respectively.

Here the increments are \(u=x\) and \(v=y\). Substituting all the values gives

$$ P_2(x,y)=1+x+2y+\frac12x^2+2xy+2y^2. $$

To check, differentiate the polynomial: \((P_2)_x=1+x+2y\), \((P_2)_y=2+2x+4y\), \((P_2)_{xx}=1\), \((P_2)_{xy}=2\), and \((P_2)_{yy}=4\). At \((0,0)\), these derivatives are \(1,2,1,2,4\), and \(P_2(0,0)=1\). They match the function’s value and derivatives at the base point.

Worked Example: A Logarithm at a Nonzero Base Point

Construct the second-order Taylor polynomial for \(f(x,y)=\ln(x+2y)\) at \((1,1)\). The function is defined in a neighborhood of this point because \(1+2(1)=3>0\).

The value is \(f(1,1)=\ln 3\). Differentiating gives

$$ f_x=\frac{1}{x+2y}, \qquad f_y=\frac{2}{x+2y}. $$

At \((1,1)\), the first partial derivatives are \(f_x(1,1)=\frac13\) and \(f_y(1,1)=\frac23\). The second partial derivatives are

$$ f_{xx}=-\frac{1}{(x+2y)^2}, \qquad f_{xy}=-\frac{2}{(x+2y)^2}, \qquad f_{yy}=-\frac{4}{(x+2y)^2}. $$

Their values at \((1,1)\) are \(-\frac19\), \(-\frac29\), and \(-\frac49\). Set \(u=x-1\) and \(v=y-1\). The pure-square coefficients are half the corresponding second derivatives, so the polynomial is

$$ P_2(x,y)=\ln 3+\frac13u+\frac23v-\frac1{18}u^2-\frac29uv-\frac29v^2. $$

For the check, differentiating gives \((P_2)_x=\frac13-\frac19u-\frac29v\), \((P_2)_y=\frac23-\frac29u-\frac49v\), \((P_2)_{xx}=-\frac19\), \((P_2)_{xy}=-\frac29\), and \((P_2)_{yy}=-\frac49\). At \(u=v=0\), these agree with the computed derivatives, and \(P_2(1,1)=\ln 3\), as required.

Worked Example: A Polynomial with All Three Quadratic Terms

Construct the second-order Taylor polynomial for \(f(x,y)=x^2y+xy^2\) at \((1,2)\).

The function value is \(f(1,2)=1^2(2)+(1)(2^2)=2+4=6\). Its first partial derivatives are \(f_x=2xy+y^2\) and \(f_y=x^2+2xy\). Therefore, \(f_x(1,2)=2(1)(2)+2^2=8\), and \(f_y(1,2)=1^2+2(1)(2)=5\).

The second partial derivatives are \(f_{xx}=2y\), \(f_{xy}=2x+2y\), and \(f_{yy}=2x\). At \((1,2)\), these are \(4,6,2\). With \(u=x-1\) and \(v=y-2\), substitution gives

$$ P_2(x,y)=6+8u+5v+2u^2+6uv+v^2. $$

Differentiate to check: \((P_2)_x=8+4u+6v\), \((P_2)_y=5+6u+2v\), \((P_2)_{xx}=4\), \((P_2)_{xy}=6\), and \((P_2)_{yy}=2\). At the base point \(u=v=0\), the first derivatives are \(8\) and \(5\), the second derivatives are \(4,6,2\), and the polynomial value is \(6\). These match the function data exactly.

In this example the original function has degree three, so its quadratic Taylor polynomial need not equal the function everywhere. The construction matches the specified data at the base point; it does not retain terms of degree greater than two in the increments.

A Common Mixed-Term Mistake

A common error is to put a factor of one-half in front of the mixed term, as if it were another square term. For the exponential example, this mistake would give the quadratic part \(\frac12x^2+xy+2y^2\), instead of \(\frac12x^2+2xy+2y^2\). The mixed partial derivative of the incorrect polynomial at the origin is \(1\), since differentiating \(xy\) first in \(x\) and then in \(y\) gives \(1\). But \(f_{xy}(0,0)=2\). The incorrect coefficient fails the derivative-matching check; the correct mixed coefficient is \(f_{xy}(0,0)=2\), with no extra half-factor.

Another error is to use \(x\) and \(y\) in place of the increments when the base point is not the origin. For example, at \((1,1)\), the pure-square term is \(-\frac1{18}(x-1)^2\), not \(-\frac1{18}x^2\). The increment must vanish at the point where the coefficients are evaluated.

What the Polynomial Does—and Does Not—Guarantee

The second-order Taylor polynomial is a local approximation built from derivatives at one point. If the second partial derivatives are continuous near that point, it captures the function’s value, slope, and quadratic change there. This is useful when a tangent-plane approximation alone does not reflect the function’s local curvature.

The polynomial’s coefficients alone do not provide a numerical error bound at a chosen nearby point. Such a bound requires additional information about the function, such as suitable bounds on higher derivatives. Also, when the required smoothness conditions fail, writing down the derivative-based polynomial does not by itself guarantee that it approximates the function to second order.

Key takeaway: Evaluate the function and all required partial derivatives at the base point, use \(u=x-a\) and \(v=y-b\), and verify the resulting polynomial by differentiating it. The pure-square coefficients are half the corresponding second partial derivatives; the mixed coefficient is the mixed partial derivative itself.

Check Your Understanding

Use the derivative-matching idea and the worked examples to answer these questions.

  1. For a base point \((a,b)\), what increments should be used in the second-order Taylor polynomial?
  2. Why does the coefficient of \(u^2\) equal one-half of \(f_{xx}(a,b)\)?
  3. What is the coefficient of the mixed term \(uv\), and why is there no one-half factor?
  4. For \(f(x,y)=x^2+y^2\) at \((1,1)\), find the value and first and second partial derivatives needed to construct \(P_2\).
  5. Does matching the function and its first and second partial derivatives at a point alone give a numerical error bound at a nearby point? Explain what further information may be needed.