Skip to main content

Multivariable Functions and Partial Derivatives

Overview​

Calculus extends its inquiry into functions of multiple variables, shifting from the study of single-variable functions and their derivatives to exploring the terrain of multivariable functions. This progression is essential for delving into domains such as optimization and machine learning, where functions often depend on numerous variables.

Tangents: From Lines to Planes​

Single Variable Context​

Consider a univariate function, f(x)=x2f(x) = x^2. Its derivative, dfdx\frac{df}{dx}, represents the slope of the tangent line at any given point on the curve. For instance, at x=0.2x=0.2, the function value is f(0.2)=0.04f(0.2)=0.04 and the tangent-line slope is f′(0.2)=0.4f'(0.2)=0.4.

Multivariable Context​

In contrast, for a bivariate function f(x,y)=x2+y2f(x, y) = x^2 + y^2, the concept of tangency expands from a line to a plane. To visualize this function and its tangent structures, one must employ a 3-dimensional plot, where the xx and yy axes define the plane and the zz axis represents the function value, f(x,y)f(x, y).

Deriving the Tangent Plane​

The construction of a tangent plane at a given point on the surface defined by f(x,y)f(x, y) involves analyzing the function's behavior along two distinct paths that intersect at the point of interest.

Procedure​

Fixing yy​

  1. By fixing yy (e.g., y=4y = 4), the function reduces to a single-variable context along the xx-axis, resulting in a slice f(x,4)=x2+16f(x, 4) = x^2 + 16.
  2. The derivative of this slice with respect to xx, ∂f∂x=2x\frac{\partial f}{\partial x} = 2x, gives the slope of the tangent line in the direction of the xx-axis.

Fixing xx​

  1. Similarly, by fixing xx (e.g., x=2x = 2), and considering a slice along the yy-axis, f(2,y)=4+y2f(2, y) = 4 + y^2.
  2. The derivative of this slice with respect to yy, ∂f∂y=2y\frac{\partial f}{\partial y} = 2y, provides the slope of the tangent line in the direction of the yy-axis.

Tangent Plane Synthesis​

When the function is differentiable at the point, its tangent plane is spanned by these two intersecting tangent lines. Partial derivatives alone do not guarantee differentiability; see the example below.

Partial Derivatives​

Conceptual Overview​

Consider a function f(x,y)f(x, y) representing a surface in three-dimensional space. If we slice this surface with a plane y=y0y=y_0 (holding yy fixed) or x=x0x=x_0 (holding xx fixed), we obtain a curve on the surface. The slope of the tangent to this curve at any point represents a partial derivative of the function at that point, depending on the direction of the slice.

Visualization Through Slicing​

  • Slicing Parallel to the xx-axis: Fixing a value of yy and treating it as a constant transforms f(x,y)f(x, y) into a function of a single variable xx, represented by a curve on the surface. The slope of the tangent to this curve is the partial derivative of ff with respect to xx, denoted as ∂f∂x\frac{\partial f}{\partial x} or fxf_x.
  • Slicing Parallel to the yy-axis: Similarly, fixing xx and treating it as a constant transforms f(x,y)f(x, y) into a function of yy alone. The slope of the tangent to this curve is the partial derivative of ff with respect to yy, denoted as ∂f∂y\frac{\partial f}{\partial y} or fyf_y.
A secant line through two surface points with equal y coordinates and x coordinates separated by h.Open full-size image

Both labeled points keep y fixed. Divide their height difference by h to get the secant slope; as h approaches zero, its limit is the partial derivative with respect to x, when that limit exists. The generic surface illustrates this construction rather than the quadratic example above. Access for free at OpenStax.

Calculating Partial Derivatives​

Example 1: Function f(x,y)=x2+y2f(x, y) = x^2 + y^2​

  • Partial Derivative with Respect to xx: Treating yy as a constant, the partial derivative ∂f∂x\frac{\partial f}{\partial x} is obtained by differentiating f(x,y)f(x, y) with respect to xx, yielding 2x2x.
  • Partial Derivative with Respect to yy: Treating xx as a constant, the partial derivative ∂f∂y\frac{\partial f}{\partial y} is 2y2y.

General Method​

  1. Fix Other Variables: Treat all variables other than the one with respect to which differentiation is performed as constants.
  2. Differentiate: Apply normal differentiation rules to the function with respect to the variable of interest.

Example 2: Function f(x,y)=3x2y3f(x, y) = 3x^2y^3​

  • Partial Derivative with Respect to xx: Treating yy as constant, differentiate f(x,y)f(x, y) with respect to xx, leading to 6xy36xy^3.
  • Partial Derivative with Respect to yy: Treating xx as constant, differentiate f(x,y)f(x, y) with respect to yy, resulting in 9x2y29x^2y^2.

When the tangent plane is a valid approximation​

At an interior point (a,b)(a,b), the partial derivative is a limit with the other input fixed:

fx(a,b)=lim⁡h→0f(a+h,b)−f(a,b)h.f_x(a,b)=\lim_{h\to0}\frac{f(a+h,b)-f(a,b)}h.

A tangent plane approximates changes in all directions only when ff is differentiable there. This means

f(a+h,b+k)=f(a,b)+fx(a,b)h+fy(a,b)k+r(h,k),r(h,k)h2+k2→0.f(a+h,b+k)=f(a,b)+f_x(a,b)h+f_y(a,b)k+r(h,k), \qquad \frac{r(h,k)}{\sqrt{h^2+k^2}}\to0.

Continuous partial derivatives in a neighborhood are a sufficient condition. The plane for x2+y2x^2+y^2 at (2,4)(2,4) is therefore z=20+4(x−2)+8(y−4)z=20+4(x-2)+8(y-4). At (2.1,3.9)(2.1,3.9) it predicts 19.619.6, versus the exact 19.6219.62; the missing quadratic terms contribute 0.020.02.

Existence of partial derivatives alone is insufficient. Define f(x,y)=xy/(x2+y2)f(x,y)=xy/(x^2+y^2) away from the origin and f(0,0)=0f(0,0)=0. Both partial derivatives at the origin are zero, but along y=x≠0y=x\ne0, f=1/2f=1/2. The function is not even continuous there, so its coordinate slices do not justify a tangent-plane approximation.

Explore connectionsOpen network