Back to Calculus III
Level 7Calculus III

Multivariable Functions

Understand functions of several variables and their graphs.

Progress
Complete the practice questions to track your progress

Multivariable Functions

Multivariable functions take multiple inputs and produce one or more outputs. Here's what you need to know:

Basic Concepts

Definition

A function of several variables assigns a single value to an ordered collection of inputs.

Example: $$f(x, y) = x^2 + y^2$$ is a function of two variables.

Domain and Range

  • Domain: The set of all input values for which the function is defined
  • Range: The set of all possible output values

Example: For $$f(x, y) = \sqrt{1 - x^2 - y^2}$$, the domain is $$\{(x, y) : x^2 + y^2 \leq 1\}$$ (the unit disk).

Visualization and Level Curves/Surfaces

Graphs of Functions of Two Variables

The graph of $$z = f(x, y)$$ is a surface in three-dimensional space.

Level Curves

For a function $$f(x, y)$$, a level curve is the set of points where $$f(x, y) = c$$ for some constant c.

Example: The level curves of $$f(x, y) = x^2 + y^2$$ are circles centered at the origin.

Level Surfaces

For a function $$f(x, y, z)$$, a level surface is the set of points where $$f(x, y, z) = c$$ for some constant c.

Example: The level surfaces of $$f(x, y, z) = x^2 + y^2 + z^2$$ are spheres centered at the origin.

Limits and Continuity

Limit Definition

We say $$\lim_{(x,y) \to (a,b)} f(x,y) = L$$ if f(x,y) can be made arbitrarily close to L by taking (x,y) sufficiently close to (a,b).

Properties of Limits

  • Limits of sums, products, and quotients behave as in single-variable calculus
  • A limit may not exist if the function approaches different values along different paths

Continuity

A function f is continuous at a point (a,b) if:

  1. f(a,b) is defined
  2. $$\lim_{(x,y) \to (a,b)} f(x,y)$$ exists
  3. $$\lim_{(x,y) \to (a,b)} f(x,y) = f(a,b)$$

Partial Derivatives

Definition

The partial derivative of f with respect to x, denoted $$\frac{\partial f}{\partial x}$$ or $$f_x$$, is the derivative of f with respect to x while holding all other variables constant.

Computation

To compute $$\frac{\partial f}{\partial x}(a, b)$$:

  1. Treat y as a constant
  2. Differentiate with respect to x using single-variable calculus rules
  3. Evaluate at the point (a, b)

Example

For $$f(x, y) = x^2y + y^3$$:

$$\frac{\partial f}{\partial x} = 2xy$$ (treating y as a constant)

$$\frac{\partial f}{\partial y} = x^2 + 3y^2$$ (treating x as a constant)

Geometric Interpretation

$$\frac{\partial f}{\partial x}(a, b)$$ is the slope of the tangent line to the curve formed by intersecting the surface z = f(x, y) with the plane y = b, at the point (a, b, f(a, b)).

Higher-Order Partial Derivatives

Second-Order Partial Derivatives

  • $$f_{xx} = \frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right)$$
  • $$f_{xy} = \frac{\partial^2 f}{\partial y \partial x} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right)$$
  • $$f_{yx} = \frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right)$$
  • $$f_{yy} = \frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right)$$

Mixed Partial Derivatives

If f and its partial derivatives are continuous, then the mixed partial derivatives are equal: $$f_{xy} = f_{yx}$$.

Example

For $$f(x, y) = x^3y^2 + xy$$:

$$f_x = 3x^2y^2 + y$$

$$f_y = 2x^3y + x$$

$$f_{xy} = 6x^2y + 1$$

$$f_{yx} = 6x^2y + 1$$

The Gradient

Definition

The gradient of a function f(x, y, z) is the vector:

$$\nabla f = \left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\right)$$

Properties

  • The gradient points in the direction of steepest increase of the function
  • The gradient is perpendicular to the level curves/surfaces
  • The magnitude of the gradient gives the rate of change in the direction of steepest increase

Example

For $$f(x, y, z) = x^2 + y^2 + z^2$$:

$$\nabla f = (2x, 2y, 2z)$$

At the point (1, 2, 3), $$\nabla f = (2, 4, 6)$$

Directional Derivatives

Definition

The directional derivative of f at a point in the direction of a unit vector $$\vec{u}$$ is:

$$D_{\vec{u}}f = \nabla f \cdot \vec{u}$$

Interpretation

The directional derivative gives the rate of change of f in the direction of $$\vec{u}$$.

Example

For $$f(x, y) = x^2 + xy$$ at the point (2, 1) in the direction $$\vec{u} = (\frac{3}{5}, \frac{4}{5})$$:

$$\nabla f = (2x + y, x) = (5, 2)$$ at (2, 1)

$$D_{\vec{u}}f = \nabla f \cdot \vec{u} = (5, 2) \cdot (\frac{3}{5}, \frac{4}{5}) = 3 + \frac{8}{5} = \frac{23}{5}$$

Tangent Planes and Normal Lines

Tangent Plane

The equation of the tangent plane to the surface z = f(x, y) at the point (a, b, f(a, b)) is:

$$z - f(a, b) = f_x(a, b)(x - a) + f_y(a, b)(y - b)$$

Normal Line

The normal line to the surface z = f(x, y) at the point (a, b, f(a, b)) has direction vector:

$$\vec{n} = (-f_x(a, b), -f_y(a, b), 1)$$

Parametric equations: $$x = a + t(-f_x(a, b))$$, $$y = b + t(-f_y(a, b))$$, $$z = f(a, b) + t$$

Extrema of Multivariable Functions

Critical Points

A critical point of f(x, y) is a point where:

  • $$\nabla f = (0, 0)$$ (both partial derivatives are zero), or
  • At least one partial derivative does not exist

Second Derivative Test

At a critical point (a, b) where both partial derivatives are zero, compute:

$$D = f_{xx}(a, b)f_{yy}(a, b) - [f_{xy}(a, b)]^2$$

  • If D > 0 and $$f_{xx}(a, b) > 0$$, then f has a local minimum at (a, b)
  • If D > 0 and $$f_{xx}(a, b) < 0$$, then f has a local maximum at (a, b)
  • If D < 0, then f has a saddle point at (a, b)
  • If D = 0, the test is inconclusive

Example

For $$f(x, y) = x^2 + y^2 - 2x - 4y + 5$$:

$$f_x = 2x - 2$$ and $$f_y = 2y - 4$$

Setting both equal to zero: $$2x - 2 = 0 \Rightarrow x = 1$$ and $$2y - 4 = 0 \Rightarrow y = 2$$

So the critical point is (1, 2)

$$f_{xx} = 2$$, $$f_{yy} = 2$$, $$f_{xy} = 0$$

$$D = f_{xx}f_{yy} - (f_{xy})^2 = 2 \cdot 2 - 0^2 = 4 > 0$$

Since D > 0 and $$f_{xx} > 0$$, f has a local minimum at (1, 2)

Constrained Optimization and Lagrange Multipliers

Method of Lagrange Multipliers

To find extrema of f(x, y, z) subject to the constraint g(x, y, z) = 0:

  1. Form the Lagrangian: $$L(x, y, z, \lambda) = f(x, y, z) - \lambda g(x, y, z)$$
  2. Find critical points by solving the system:
    • $$\frac{\partial L}{\partial x} = 0$$
    • $$\frac{\partial L}{\partial y} = 0$$
    • $$\frac{\partial L}{\partial z} = 0$$
    • $$\frac{\partial L}{\partial \lambda} = 0$$ (which gives the constraint g(x, y, z) = 0)
  3. Evaluate f at each critical point to find extrema

Example

Find the maximum value of $$f(x, y) = xy$$ subject to the constraint $$x^2 + y^2 = 1$$.

Lagrangian: $$L(x, y, \lambda) = xy - \lambda(x^2 + y^2 - 1)$$

$$\frac{\partial L}{\partial x} = y - 2\lambda x = 0 \Rightarrow y = 2\lambda x$$

$$\frac{\partial L}{\partial y} = x - 2\lambda y = 0 \Rightarrow x = 2\lambda y$$

$$\frac{\partial L}{\partial \lambda} = -(x^2 + y^2 - 1) = 0 \Rightarrow x^2 + y^2 = 1$$

From the first two equations: $$y = 2\lambda x$$ and $$x = 2\lambda y$$

Substituting: $$y = 2\lambda(2\lambda y) = 4\lambda^2 y$$

If y ≠ 0, then $$1 = 4\lambda^2 \Rightarrow \lambda = \pm \frac{1}{2}$$

Using $$\lambda = \frac{1}{2}$$: $$y = 2\lambda x = x$$

With $$x^2 + y^2 = 1$$ and $$y = x$$: $$x^2 + x^2 = 1 \Rightarrow 2x^2 = 1 \Rightarrow x = \pm \frac{1}{\sqrt{2}}$$

So we have critical points $$(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$$ and $$(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}})$$

Evaluating f: $$f(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}) = \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} = \frac{1}{2}$$

$$f(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}) = (-\frac{1}{\sqrt{2}}) \cdot (-\frac{1}{\sqrt{2}}) = \frac{1}{2}$$

Using $$\lambda = -\frac{1}{2}$$: $$y = 2\lambda x = -x$$

With $$x^2 + y^2 = 1$$ and $$y = -x$$: $$x^2 + (-x)^2 = 1 \Rightarrow 2x^2 = 1 \Rightarrow x = \pm \frac{1}{\sqrt{2}}$$

So we have critical points $$(\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}})$$ and $$(-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$$

Evaluating f: $$f(\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}) = \frac{1}{\sqrt{2}} \cdot (-\frac{1}{\sqrt{2}}) = -\frac{1}{2}$$

$$f(-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}) = (-\frac{1}{\sqrt{2}}) \cdot \frac{1}{\sqrt{2}} = -\frac{1}{2}$$

Therefore, the maximum value is $$\frac{1}{2}$$ at $$(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$$ and $$(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}})$$.

Common Pitfalls and Tips

  • When finding limits, check the limit along different paths to ensure it exists
  • Remember that the order of differentiation doesn't matter for mixed partial derivatives of continuous functions
  • The gradient vector is perpendicular to level curves/surfaces
  • For constrained optimization, make sure to check all critical points found using Lagrange multipliers
  • Be careful with the second derivative test—it only applies at critical points where both partial derivatives are zero
  • When working with functions of three or more variables, the same principles apply but with additional variables

Interactive Visualization

Interactive Visualization

Interact with the visualization to better understand the mathematical concepts.

Practice Questions

Question 1 of 5
Find the domain of f(x, y) = √(1 - x² - y²).