From a Line to a Two-Variable Formula
A quadratic Taylor polynomial for a function of two variables records its value, slopes, and curvature at a chosen point. Its terms can look like a collection of coefficients to memorize. A useful way to derive them is to examine the function along a single line through that point.
On a line, a function of two variables becomes a function of one variable. Its first derivative records the change in the direction of the line, and its second derivative records the curvature in that direction. Because the line can point in any direction, these one-variable derivatives determine all the quadratic terms.
We will derive the formula at a point \((a,b)\). Write a nearby point as \((a+h,b+k)\), where \(h\) and \(k\) are its horizontal and vertical displacements. Assume that \(f\) has continuous second partial derivatives on an open neighborhood of \((a,b)\). This condition ensures that the line restrictions used below are twice differentiable and that the mixed partial derivatives agree.
Restricting the Function to a Line
Fix a displacement \((h,k)\), and consider the line segment from \((a,b)\) to \((a+h,b+k)\). A parameter \(t\) runs from \(0\) to \(1\) along this segment. Define the one-variable function
At \(t=0\), the line is at the base point, so \(g(0)=f(a,b)\). At \(t=1\), it reaches the point being approximated, so \(g(1)=f(a+h,b+k)\). The chain rule gives the derivatives of \(g\).
Differentiating again gives
Since the second partial derivatives are continuous, \(f_{xy}=f_{yx}\) near the base point. Combining the two mixed terms therefore yields
In particular, the first two derivatives at \(t=0\) are
and
These quantities give the linear and quadratic contributions to the approximation. The next step explains why the second derivative enters with a factor of one-half.
Deriving the Quadratic Taylor Formula
For a twice continuously differentiable one-variable function, the fundamental theorem of calculus, applied twice, gives
To see the identity, first write \(g(1)=g(0)+\int_0^1g'(s)\,ds\). For each \(s\), write \(g'(s)=g'(0)+\int_0^s g''(t)\,dt\). Substitution and reversing the order of integration over \(0\leq t\leq s\leq1\) give \(g(1)=g(0)+g'(0)+\int_0^1(1-t)g''(t)\,dt\).
Separate the constant value \(g''(0)\) from the integrand. Since \(\int_0^1(1-t)\,dt=1/2\), this gives
As the displacement \((h,k)\) approaches \((0,0)\), continuity of the second partial derivatives makes the final integral small compared with \(h^2+k^2\). Indeed, the difference \(g''(t)-g''(0)\) is a sum of differences in second partial derivatives, multiplied by \(h^2\), \(hk\), or \(k^2\). Along the whole segment, those differences tend uniformly to zero as the displacement tends to zero. Also, \(|hk|\leq(h^2+k^2)/2\). Thus the integral, divided by \(h^2+k^2\), tends to zero.
Here \(o(h^2+k^2)\) means a remainder whose ratio to \(h^2+k^2\) tends to zero as \((h,k)\to(0,0)\), with \((h,k)\ne(0,0)\). Substituting the expressions for \(g(0)\), \(g'(0)\), and \(g''(0)\) into the one-variable identity produces the displayed formula. In particular, the mixed term has coefficient \(f_{xy}(a,b)\): the two equal mixed contributions in \(g''(0)\) combine, and the factor \(1/2\) then cancels their factor of \(2\).
Worked Examples
Worked Example: A Quadratic Function at a Shifted Base Point
Find the second-order Taylor polynomial for \(f(x,y)=x^2+3xy+2y^2\) at \((1,-1)\), using a line restriction.
Set \(x=1+th\) and \(y=-1+tk\). Expanding each term gives
Therefore \(g(0)=0\), \(g'(0)=-h-k\), and \(g''(0)=2h^2+6hk+4k^2\). The quadratic Taylor expression is
Thus the polynomial, written in terms of \(x\) and \(y\), is \(P_2(x,y)=-(x-1)-(y+1)+(x-1)^2+3(x-1)(y+1)+2(y+1)^2\). As a check, the line expansion above is exactly a polynomial of degree two in \(t\); its value at \(t=1\) is \(h^2+3hk+2k^2-h-k\), agreeing with \(P_2(a+h,b+k)\). There is no remainder because the original function is already quadratic.
Worked Example: A Logarithm Near the Origin
Find the quadratic Taylor polynomial for \(f(x,y)=\ln(1+x+2y)\) at \((0,0)\). The function is defined in a neighborhood of the origin because \(1+x+2y>0\) there.
Along the line \((th,tk)\), the restricted function is \(g(t)=\ln(1+t(h+2k))\). Let \(s=h+2k\). Differentiation gives
Consequently, the quadratic Taylor expression along the line is \(s-\frac12s^2\). Substituting \(s=h+2k\) and expanding the square gives
The polynomial in the original variables is therefore \(P_2(x,y)=x+2y-\frac12x^2-2xy-2y^2\). To check the mixed coefficient, the line calculation gives a cross contribution of \(-2hk\), exactly as the expanded square does. Equivalently, \(f_{xy}(0,0)=-2\), so the formula contributes \(-2hk\), not half of that value.
Worked Example: A Reciprocal Function and a Numerical Check
Find the quadratic Taylor polynomial for \(f(x,y)=1/(1-x-y)\) at the origin, then evaluate the approximation at \((1/10,0)\). The denominator is nonzero throughout a sufficiently small neighborhood of the origin.
Along the line \((th,tk)\), set \(s=h+k\). Then \(g(t)=1/(1-ts)\), and differentiation gives
The quadratic Taylor expression along the line is \(1+s+s^2\). Replacing \(s\) by \(h+k\), the polynomial is
At \((h,k)=(1/10,0)\), its value is \(1+1/10+1/100=111/100=1.11\). The function itself has value \(1/(1-1/10)=10/9\), approximately \(1.1111\) to four decimal places. This comparison checks the calculation at the requested point: the polynomial is close to the function value, but is not asserted to equal it exactly.
A Common Mixed-Term Error
A frequent mistake is to include the mixed partial derivative with a factor of one-half. The error often comes from seeing the \(\frac12g''(0)\) in the one-variable formula but forgetting that \(g''(0)\) contains two mixed contributions.
When the Formula Applies
The continuity assumption on second partial derivatives is important: it ensures that the line restriction has the required second-order behavior as the displacement shrinks. The polynomial can still be computed from derivative values in other situations, but those values alone do not guarantee that the function has the stated remainder behavior. Do not infer the approximation just from the existence of first and second partial derivatives at one point.
The line method also clarifies what the polynomial captures. The constant term gives the function value at the base point; the linear terms record the initial change along every direction; and the quadratic terms record the initial curvature along each direction. In applications, this gives a local approximation that can retain curvature information the tangent-plane approximation omits. The polynomial is an approximation in general, not an identity: equality throughout a neighborhood occurs for functions that have no higher-order variation there, such as the quadratic function in the first example.
Check Your Understanding
Use the line restriction \(g(t)=f(a+th,b+tk)\) to answer the following.
- Write \(g'(0)\) in terms of the first partial derivatives of \(f\) and the displacement \((h,k)\).
- Write \(g''(0)\) in terms of the second partial derivatives, assuming the mixed partials agree.
- Why does the mixed term in the quadratic Taylor polynomial have coefficient \(f_{xy}(a,b)\), rather than \(\frac12 f_{xy}(a,b)\)?
- State a condition on \(f\) that guarantees the second-order Taylor expansion with a remainder \(o(h^2+k^2)\).
- For \(f(x,y)=x^2+y^2\) at \((0,0)\), use the formula to find the quadratic Taylor polynomial.