Why a Second Derivative Has Two Sources
A quantity \(z=f(x(t),y(t))\) changes because the point \((x(t),y(t))\) moves through the input plane. Its rate of change depends on the first partial derivatives of \(f\) and on the velocities \(x'(t)\) and \(y'(t)\). Its second derivative has two kinds of contributions: the second partial derivatives of \(f\), which describe how the function changes across the plane, and the accelerations \(x''(t)\) and \(y''(t)\), which describe how the path’s velocity changes.
This distinction matters even when the function is linear. For \(f(x,y)=x+y\), all second partial derivatives of \(f\) are zero, but \(f(x(t),y(t))\) can still have a nonzero second derivative when the path accelerates.
The Second-Derivative Formula
Let \(f\) have continuous second partial derivatives on an open set containing the path, and suppose \(x(t)\) and \(y(t)\) are twice differentiable. Define \(z(t)=f(x(t),y(t))\). The first derivative follows from the chain rule. Differentiating it once more gives:
Every partial derivative of \(f\) in this formula is evaluated at \((x(t),y(t))\). The quantities \(x'\), \(y'\), \(x''\), and \(y''\) are evaluated at \(t\). Since \(f\) has continuous second partial derivatives, \(f_{xy}=f_{yx}\), so the two mixed-partial contributions combine into the term \(2f_{xy}x'y'\).
The formula can also be grouped to emphasize these two contributions:
Here, \(f_xx''\) means the product of \(f_x\) and \(x''\), not a second partial derivative. The subscripts on \(f\) denote partial derivatives; primes denote ordinary derivatives with respect to \(t\).
Why the Formula Works
The derivation starts with the first-derivative chain rule. At each time \(t\), the rate of change of \(z\) is the sum of the changes contributed by the two moving inputs:
Differentiate both products with respect to \(t\). Applying the product rule and the chain rule to \(f_x(x(t),y(t))\) and \(f_y(x(t),y(t))\) gives:
Because \(f\) has continuous second partial derivatives, \(f_{xy}=f_{yx}\). Substituting this equality yields the stated formula. This derivation explains why neither contribution can generally be omitted: differentiating the first-derivative chain rule produces both the derivatives of the partial derivatives and the derivatives of the path velocities.
Worked Examples
Worked Example: A Polynomial Along a Curved Path
Let \(f(x,y)=x^2+3xy+y^2\), with \(x(t)=t\) and \(y(t)=t^2\). Find \(z''(1)\) using the formula, then check by direct differentiation.
First calculate the partial derivatives:
At \(t=1\), the path values and their derivatives are:
The first partial derivatives at \((1,1)\) are \(f_x=2(1)+3(1)=5\) and \(f_y=3(1)+2(1)=5\). Substitution into the second-derivative formula gives:
For a check, substitute the path into \(f\):
Thus \(z''(1)=2+18+12=32\), agreeing with the formula.
Worked Example: Mixed Partial and Acceleration Contributions
Let \(f(x,y)=xy\), \(x(t)=t^2\), and \(y(t)=t+1\). Compute \(z''(1)\) using the formula and verify it directly.
The partial derivatives are \(f_x=y\), \(f_y=x\), \(f_{xx}=0\), \(f_{xy}=1\), and \(f_{yy}=0\). At \(t=1\):
Therefore \(f_x=2\) and \(f_y=1\) at the point \((1,2)\), and:
Directly, \(z(t)=t^2(t+1)=t^3+t^2\), so \(z'(t)=3t^2+2t\) and \(z''(t)=6t+2\). Hence \(z''(1)=6+2=8\), as required. In this example, the mixed-partial term contributes \(4\), and the acceleration term contributes another \(4\).
Worked Example: A Linear Function with an Accelerating Path
Let \(f(x,y)=x+y\), \(x(t)=t^2\), and \(y(t)=t^3\). Find \(z''(1)\) using the formula and check it directly.
The first partial derivatives are \(f_x=1\) and \(f_y=1\). All second partial derivatives are zero:
At \(t=1\), \(x''=2\) and \(y''=6\). The velocity-dependent terms vanish because all second partial derivatives are zero. The acceleration terms give:
For a direct check, \(z(t)=t^2+t^3\), so \(z'(t)=2t+3t^2\) and \(z''(t)=2+6t\). Therefore \(z''(1)=2+6=8\). This confirms that zero second partial derivatives of \(f\) do not force the composite function to have zero second derivative.
When Each Contribution Matters
The formula separates naturally into two parts. If the path has zero acceleration at a time, so \(x''=y''=0\), only the second-partial contribution remains at that time. If all second partial derivatives of \(f\) vanish, only the acceleration contribution remains. In particular, for a linear function, changes in \(z'\) can come entirely from changes in the path’s velocity.
These observations are useful checks, not extra assumptions needed to use the formula. For a general function and a general path, both contributions may be nonzero. A path can also have zero velocity at an instant but nonzero acceleration; at such a time, the velocity-dependent terms vanish, while the acceleration terms may still contribute.
Common Pitfall: Forgetting the Acceleration Terms
A frequent error is to differentiate the first-derivative chain rule as though only the partial derivatives change, forgetting to differentiate \(x'\) and \(y'\). For the linear example \(f(x,y)=x+y\), \(x=t^2\), \(y=t^3\), this incomplete calculation would give:
because all second partial derivatives of \(f\) are zero. But differentiating \(z'=x'+y'\) correctly gives \(z''=x''+y''\). At \(t=1\), that is \(2+6=8\), not zero. The omitted quantities were precisely the accelerations of the path.
A second check is to keep the mixed-partial contribution straight. Under the stated continuous-second-partial-derivative condition, it is \(2f_{xy}x'y'\). The factor of \(2\) arises because differentiating \(f_xx'\) produces \(f_{xy}y'x'\), while differentiating \(f_yy'\) produces \(f_{yx}x'y'\); the two terms are equal.
Why This Formula Matters
The second derivative of a composite quantity describes how its rate of change itself changes over time. In applications, a changing output may reflect both the shape of the rule \(f\) and the motion of the inputs. Separating those causes makes calculations easier to interpret and helps identify what information is needed: second partial derivatives and the path’s velocity describe one contribution, while first partial derivatives and the path’s acceleration describe the other.
Before substituting values, it is useful to record \(x,y,x',y',x'',y''\) at the time of interest. Then evaluate the needed partial derivatives at the corresponding point \((x,y)\). Finally, compare the result with direct differentiation when the composed expression is manageable. That check is especially effective at catching a missing acceleration term or an incorrect mixed-partial factor.
Check Your Understanding
Use the second-derivative formula and, where practical, verify by direct differentiation.
- For \(f(x,y)=x^2+y^2\), \(x(t)=t\), and \(y(t)=2t\), find \(z''(1)\).
- For \(f(x,y)=xy\), identify the mixed-partial contribution to \(z''\) along any twice-differentiable path.
- What smoothness condition allows the two mixed-partial terms to combine into \(2f_{xy}x'y'\)?
- For \(f(x,y)=3x-2y\), \(x(t)=t^2\), and \(y(t)=t^3\), explain why \(z''\) need not be zero even though all second partial derivatives of \(f\) are zero.
- If \(x''(t)=y''(t)=0\) at a particular time, which terms of the formula remain at that time?