Advanced Vector Calculus: Background You’ll Need 2

  • Compute partial derivatives of multivariable functions

Derivatives of a Function of Two Variables

In single-variable calculus, the derivative represents an instantaneous rate of change of [latex]y[/latex] with respect to [latex]x[/latex]. We write this using Leibniz notation as [latex]dy/dx[/latex], where [latex]y[/latex] is the dependent variable and [latex]x[/latex] is the independent variable.

For a function [latex]z=f(x,y)[/latex] of two variables, both [latex]x[/latex] and [latex]y[/latex] are independent variables and [latex]z[/latex] is the dependent variable. This immediately raises two questions: How do we adapt Leibniz notation for two variables? What does the derivative even mean when we have two inputs? The answer lies in partial derivatives.

partial derivatives

Let [latex]f(x, y)[/latex] be a function fo two variables.

[latex]\\[/latex]

The partial derivative of [latex]f[/latex] with respect to [latex]x[/latex], written as [latex]\frac{\partial f}{\partial x}[/latex] or [latex]f_x[/latex], is defined as

[latex]\dfrac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\dfrac{f(x+h,y)-f(x,y)}{h}[/latex].

The partial derivative of [latex]f[/latex] with respect to [latex]y[/latex], written as [latex]\frac{\partial f}{\partial y}[/latex] or [latex]f_y[/latex], is defined as

[latex]\dfrac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\dfrac{f(x,y+k)-f(x,y)}{k}[/latex].

This definition reveals two key differences from single-variable derivatives. First, the notation changes—we use the symbol [latex]\partial[/latex] instead of [latex]d[/latex]. This rounded “[latex]d[/latex]” is called “partial,” so [latex]\partial f/\partial x[/latex] is read as “the partial of [latex]f[/latex] with respect to [latex]x[/latex].”

Second, we now have two different derivatives we can compute, one with respect to each independent variable. Depending on which variable we choose, we get entirely different partial derivatives.

Use the definition of the partial derivative as a limit to calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the function

[latex]f(x, y)=x^{2}-3xy+2y^{2}-4x+5y-12[/latex].

Computing Partial Derivatives

The key idea when calculating partial derivatives is simple: treat all independent variables except the one you’re differentiating with respect to as constants. Then differentiate as you would with a single-variable function.

Why does this work? When we fix [latex]y[/latex] and define [latex]g(x)=f(x,y)[/latex] as a function of [latex]x[/latex] only, we get:

[latex]g'(x)=\underset{h\to 0}{\text{lim}}\dfrac{g(x+h)-g(x)}{h}=\underset{h\to 0}{\text{lim}}\dfrac{f(x+h,y)-f(x,y)}{h}=\dfrac{\partial f}{\partial x}[/latex].

The same reasoning applies for the partial derivative with respect to [latex]y[/latex]. Fix [latex]x[/latex] and define [latex]h(y)=f(x,y)[/latex] as a function of [latex]y[/latex] only:

[latex]h'(y)=\underset{k\to 0}{\text{lim}}\dfrac{h(y+k)-h(y)}{k}=\underset{k\to 0}{\text{lim}}\dfrac{f(x,y+k)-f(x,y)}{k}=\dfrac{\partial f}{\partial y}[/latex].

All the differentiation rules you learned in single-variable calculus still apply.

To find [latex]\dfrac{\partial f}{\partial x}[/latex]: Treat [latex]y[/latex] as a constant and differentiate with respect to [latex]x[/latex].

To find [latex]\dfrac{\partial f}{\partial y}[/latex]: Treat [latex]x[/latex] as a constant and differentiate with respect to [latex]y[/latex].

Calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the following functions by holding the opposite variable constant then differentiating:

  1. [latex]f(x, y)=x^{2}-3xy+2y^{2}-4x+5y-12[/latex].
  2. [latex]g(x, y)=\sin{(x^{2}y-2x+4)}[/latex]

Functions of More Than Two Variables

Suppose we have a function of three variables, such as [latex]w=f(x,y,z)[/latex]. We can calculate partial derivatives of [latex]w[/latex] with respect to any of the independent variables. The definitions extend naturally from what we did with two variables.

partial derivatives of functions of three variables

Let [latex]f(x,y,z)[/latex] be a function of three variables. Then:

[latex]\\[/latex]

The partial derivative with respect to [latex]x[/latex] is

[latex]\dfrac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\dfrac{f(x+h,y,z)-f(x,y,z)}{h}[/latex].

The partial derivative with respect to [latex]y[/latex] is

[latex]\dfrac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\dfrac{f(x,y+k,z)-f(x,y,z)}{k}[/latex].

The partial derivative with respect to [latex]z[/latex] is

[latex]\dfrac{\partial f}{\partial z}=\underset{m\to 0}{\text{lim}}\dfrac{f(x,y,z+m)-f(x,y,z)}{m}[/latex].

The computation technique is identical to what you used with two variables. To calculate [latex]\frac{\partial f}{\partial x}[/latex], treat [latex]y[/latex] and [latex]z[/latex] as constants and differentiate with respect to [latex]x[/latex]. The same principle applies for the other partial derivatives—just hold the other variables constant and differentiate with respect to the variable of interest.

Use the limit definition of partial derivatives to calculate [latex]\partial f/\partial x[/latex] for the function

[latex]\large{f\,(x,\ y,\ z)=x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z}[/latex].

 

Then, find [latex]\partial f/\partial y[/latex] and [latex]\partial f/\partial z[/latex] by setting the other two variables constant and differentiating accordingly.

Calculate the three partial derivatives of the following functions.

  1. [latex]f\,(x,\ y,\ z)=\frac{x^{2}y-4xz+y^{2}}{x-3yz}[/latex]
  2. [latex]g\,(x,\ y,\ z)=\sin{(x^{2}y-z)}+\cos{(x^{2}-yz)}[/latex]