Skip to main content

Section 11.3 Partial Derivatives

In this section, we extend the concept of the derivative of a function of one variable to partial derivatives for functions of several variables.

Recall that the derivative of a function of one variable, \(y=f(x)\text{,}\) represents the rate of change of \(y\) with respect to \(x\text{.}\)

For functions of several variables, we can measure rates of change in the direction of each of the independent variables. These are called partial derivatives. Many of the ideas about derivatives carry over.

Subsection 11.3.1 Partial Derivatives for Functions of Two Variables

Consider the function \(z=f(x,y)\text{.}\) Suppose we keep \(y=b\) fixed. In that case, we essentially obtain a function of a single variable, \(x\text{,}\) namely \(g(x) = f(x,b)\text{.}\) By definition, the derivative of \(g(x)\) at \(x=a\) is $$ g'(a) = \lim_{h \to 0} \frac{ g(a+h) - g(a) }{ h }. $$

Introducing the notation \(f_x\) to denote the partial derivative of \(f\) with respect to \(x\text{,}\) we thus have $$ f_x(a,b) = \lim_{h \to 0} \frac{ f(a+h,b) - f(a,b) }{ h }. $$

Similarly, using \(f_y\) to denote the partial derivative of \(f\) with respect to \(y\text{,}\) we have $$ f_y(a,b) = \lim_{h \to 0} \frac{ f(a,b+h) - f(a,b) }{ h }. $$

Generalizing (by letting \(a\) and \(b\) vary), we have

\begin{alignat*}{1} f_x(x,y) &= \lim_{h \to 0} \frac{ f(x+h,y) - f(x,y) }{ h }, \\ f_y(x,y) &= \lim_{h \to 0} \frac{ f(x,y+h) - f(x,y) }{ h }. \end{alignat*}

These definitions suggest the following practical approach to determining partial derivatives of \(z=f(x,y)\text{:}\)

  • To determine \(f_x\text{,}\) treat \(y\) as a constant, and differentiate with respect to \(x\text{.}\)
  • To determine \(f_y\text{,}\) treat \(x\) as a constant, and differentiate with respect to \(y\text{.}\)
Consider $$ f(x,y) = 3 - x^3 - y^2. $$ Determine \(f_x(1,1)\) and \(f_y(1,1)\text{.}\)
Solution

Treating \(y\) as a constant, and differentiating with respect to \(x\) gives $$ f_x(x,y) = 0 - 3x^2 - 0 = -3x^2, $$ and so \(f_x(1,1) = -3\text{.}\)

Treating \(x\) as a constant, and differentiating with respect to \(y\) gives $$ f_y(x,y) = 0 - 0 - 2y = -2y, $$ and so \(f_y(1,1) = -2\text{.}\)

Readers wishing to see the above example (and all following examples) worked out in a video are referred to Section 6 below.

Subsection 11.3.2 Additional Notation

Alternative notation is similar to Leibniz notation, but using the symbol \(\partial\) instead of \(d\text{.}\) If \(z = f(x,y)\text{,}\) we can write

\begin{alignat*}{1} f_x(x,y) &= f_x = \frac{\partial f}{\partial x} = \frac{\partial}{\partial x} f(x,y) = \frac{\partial z}{\partial x}, \\ f_y(x,y) &= f_y = \frac{\partial f}{\partial y} = \frac{\partial}{\partial y} f(x,y) = \frac{\partial z}{\partial y}. \end{alignat*}
Consider $$ f(x,y) = \sin(xy^2). $$ Determine \(f_x(x,y)\) and \(f_y(x,y)\text{.}\)
Solution

Treating \(y\) as a constant, and differentiating with respect to \(x\) (keeping the chain rule in mind) gives

\begin{alignat*}{1} f_x(x,y) &= \cos(xy^2) \cdot \frac{\partial}{\partial x} (xy^2) \\ &= \cos(xy^2) \cdot y^2 \\ &= y^2 \cos(xy^2). \end{alignat*}

Treating \(x\) as a constant, and differentiating with respect to \(y\) (keeping the chain rule in mind) gives

\begin{alignat*}{1} f_y(x,y) &= \cos(xy^2) \cdot \frac{\partial}{\partial y} (xy^2) \\ &= \cos(xy^2) \cdot x \cdot 2y \\ &= 2 xy \cos(xy^2). \end{alignat*}
Consider $$ f(x,y) = e^{xy} (x^2 + y^2). $$ Determine \(f_x(x,y)\) and \(f_y(x,y)\text{.}\)
Solution

Treating \(y\) as a constant, and differentiating with respect to \(x\) (keeping the product rule and the chain rule in mind) gives

\begin{alignat*}{1} f_x(x,y) &= \frac{\partial}{\partial x} e^{xy} \cdot (x^2 + y^2) + e^{xy} \cdot \frac{\partial}{\partial x}(x^2 + y^2) \\ &= e^{xy} \cdot \frac{\partial}{\partial x}(xy) \cdot (x^2 + y^2) + e^{xy} \cdot (2x + 0) \\ &= e^{xy} \cdot y \cdot (x^2 + y^2) + 2 x e^{xy} \\ &= y(x^2+y^2)e^{xy} + 2xe^{xy}. \end{alignat*}

Similarly (try it yourself!), we have $$ f_y(x,y) = x(x^2+y^2)e^{xy} + 2ye^{xy}. $$

Subsection 11.3.3 Checking Your Work: Partial Differentiation with Technology

On WolframAlpha, you can simply use the differentiate command, but you need to indicate with respect to which variable you want to differentiate, for example differentiate sin(xy^2) with respect to x.

Subsection 11.3.4 Partial Derivatives of Functions of More Than Two Variables

The concept of the partial derivative extends naturally to functions of more than two variables. Formally, for a function of \(n\) variables, \(f(x_1, x_2, \ldots, x_n)\text{,}\) we have $$ f_{x_i} = \frac{\partial f}{\partial x_i} = \lim_{h \to 0} \frac{ f(x_1, \ldots, x_{i-1}, x_i + h, x_{i+1}, \ldots, x_n) - f(x_1, \ldots, x_{i-1}, x_i, x_{i+1}, \ldots, x_n) }{h}. $$

In practice, to determine \(f_{x_i}\text{,}\) treat \(x_1, \ldots, x_{i-1}, x_{i+1}, \ldots, x_n\) as constants, and differentiate with respect to \(x_i\text{.}\)

Consider $$ f(x,y,z) = \ln(xyz^2). $$ Determine \(f_x\) and \(f_z\text{.}\)
Solution

Treating \(y\) and \(z\) as constants, and differentiating with respect to \(x\) gives $$ f_x(x,y,z) = \frac{1}{xyz^2} \frac{\partial}{\partial x}(xyz^2) = \frac{yz^2}{xyz^2}. $$

Treating \(x\) and \(y\) as constants, and differentiating with respect to \(z\) gives $$ f_z(x,y,z) = \frac{1}{xyz^2} \frac{\partial}{\partial z}(xyz^2) = \frac{2xyz}{xyz^2}. $$

Subsection 11.3.5 Higher-Order Partial Derivatives

In general, for \(z=f(x,y)\text{,}\) the partial derivatives \(f_x\) and \(f_y\) also are functions of \(x\) and \(y\text{.}\) We can differentiate each of these functions with respect to \(x\) and \(y\) to obtain \((f_x)_x\text{,}\) \((f_x)_y\text{,}\) \((f_y)_x\text{,}\) and \((f_y)_y\text{.}\) We introduce the following notation:

\begin{alignat*}{1} (f_x)_x &= f_{xx} = \frac{\partial}{\partial x} \left( \frac{\partial f}{\partial x} \right) = \frac{\partial^2 f}{\partial x^2} = \frac{\partial^2 z}{\partial x^2}, \\ (f_x)_y &= f_{xy} = \frac{\partial}{\partial y} \left( \frac{\partial f}{\partial x} \right) = \frac{\partial^2 f}{\partial y \ \partial x} = \frac{\partial^2 z}{\partial y \ \partial x}, \\ (f_y)_x &= f_{yx} = \frac{\partial}{\partial x} \left( \frac{\partial f}{\partial y} \right) = \frac{\partial^2 f}{\partial x \ \partial y} = \frac{\partial^2 z}{\partial x \ \partial y}, \\ (f_y)_y &= f_{yy} = \frac{\partial}{\partial y} \left( \frac{\partial f}{\partial y} \right) = \frac{\partial^2 f}{\partial y^2} = \frac{\partial^2 z}{\partial y^2}, \end{alignat*}
Remark 11.3.5.
Note the order of the subscript \(xy\) and the order of \(\partial y \ \partial x\) in the denominator: \(\displaystyle f_{xy} = \frac{\partial^2 f}{\partial y \ \partial x}\) indicates differentiation with respect to \(x\) first, followed by differentiation with respect to \(y\text{.}\)

Luckily, for well-behaved functions (where \(f\text{,}\) \(f_x\text{,}\) \(f_y\text{,}\) \(f_{xy}\text{,}\) and \(f_{yx}\) all are continuous in the neighbourhood of the point \((a,b)\)), the mixed derivatives are equal, that is, $$ f_{xy}(a,b) = f_{yx}(a,b), $$ and the order of differentiation does not matter.

The notation extends naturally to functions of more than two variables, as well as to higher-order partial derivatives.

Consider $$ f(x,y,z) = \cos(4x+3y+2z). $$ Determine \(f_{xyz}\) and \(f_{yzz}\text{.}\)
Solution

For \(f_{xyz}\text{,}\) we could use the following steps (but other steps will lead to the same result): First,

\begin{alignat*}{1} f_x &= -\sin(4x+3y+2z) \cdot \frac{\partial}{\partial x} (4x+3y+2z) \\ &= -\sin(4x+3y+2z) \cdot (4+0+0) \\ &= -4\sin(4x+3y+2z). \end{alignat*}

Second,

\begin{alignat*}{1} f_{xy} &= (f_x)_y \\ &= -4\cos(4x+3y+2z) \cdot \frac{\partial}{\partial y} (4x+3y+2z) \\ &= -4\cos(4x+3y+2z) \cdot (0+3+0)\\ &= -12\cos(4x+3y+2z). \end{alignat*}

Third,

\begin{alignat*}{1} f_{xyz} &= (f_{xy})_z \\ &= 12\sin(4x+3y+2z) \cdot \frac{\partial}{\partial z} (4x+3y+2z) \\ &= 12\sin(4x+3y+2z) \cdot (0+0+2) \\ &= 24 \sin(4x+3y+2z). \end{alignat*}

For \(f_{yzz}\text{,}\) we could use the following steps (but other steps will lead to the same result): First,

\begin{alignat*}{1} f_y &= -\sin(4x+3y+2z) \cdot \frac{\partial}{\partial y} (4x+3y+2z) \\ &= -\sin(4x+3y+2z) \cdot (0+3+0) \\ &= -3\sin(4x+3y+2z). \end{alignat*}

Second,

\begin{alignat*}{1} f_{yz} &= (f_y)_z \\ &= -3\cos(4x+3y+2z) \cdot \frac{\partial}{\partial z} (4x+3y+2z) \\ &= -3\cos(4x+3y+2z) \cdot (0+0+2) \\ &= -6\cos(4x+3y+2z). \end{alignat*}

Third,

\begin{alignat*}{1} f_{yzz} &= (f_{yz})_z \\ &= 6\sin(4x+3y+2z) \cdot \frac{\partial}{\partial z} (4x+3y+2z) \\ &= 12\sin(4x+3y+2z). \end{alignat*}

Subsection 11.3.6 All Examples Collected in One Video (Optional)

In the following video, we work through all of the examples treated in this section.

Figure 11.3.7. Video demonstrating partial differentiation.

Subsection 11.3.7 Summary

  • For \(f(x_1, x_2, \ldots, x_n)\text{,}\) the partial derivative $$ f_{x_i} = \frac{\partial f}{\partial x_i} $$ is obtained by treating \(x_1, \ldots, x_{i-1}, x_{i+1}, \ldots, x_n\) as constants, and differentiating with respect to \(x_i\text{.}\)
  • Notation for partial derivatives of \(z=f(x,y)\text{:}\)
    \begin{alignat*}{1} f_x(x,y) &= f_x = \frac{\partial f}{\partial x} = \frac{\partial}{\partial x} f(x,y) = \frac{\partial z}{\partial x}, \\ f_y(x,y) &= f_y = \frac{\partial f}{\partial y} = \frac{\partial}{\partial y} f(x,y) = \frac{\partial z}{\partial y}. \end{alignat*}
  • Notation for higher-order partial derivatives: $$ f_{xy} = \frac{\partial^2 f}{\partial y \ \partial x} $$ indicates differentiation with respect to \(x\) first, followed by differentiation with respect to \(y\text{.}\)
  • In general (for continuous functions with continuous derivatives), the order of differentiation for higher-order partial derivatives does not matter. For example, \(f_{xxy} = f_{xyx} = f_{yxx}\text{.}\)

Subsection 11.3.8 Don't Forget

Don't forget to return to eClass to complete the pre-class quiz.

Subsection 11.3.9 Further Study

Remember that the notes presented above only serve as an introduction to the topic. Further study of the topic will be required. This includes working through the pre-class quizzes, reviewing the lecture notes, and diligently working through the homework problems.

As you study, you should reflect on the following learning outcomes, and critically assess where you are on the path to achieving these learning outcomes:

The following references provide a good start for review and further study:

Learning Outcome Video Textbook Section
1 11.3 9.2
2 11.3 9.2
3 N/A 9.2