Skip to main content
\(\require{cancel}\newcommand{\highlight}[1]{{\color{blue}{#1}}} \newcommand{\apex}{A\kern -1pt \lower -2pt\mbox{P}\kern -4pt \lower .7ex\mbox{E}\kern -1pt X} \newcommand{\colorlinecolor}{blue!95!black!30} \newcommand{\bwlinecolor}{black!30} \newcommand{\thelinecolor}{\colorlinecolor} \newcommand{\colornamesuffix}{} \newcommand{\linestyle}{[thick, \thelinecolor]} \newcommand{\bmx}[1]{\left[\hskip -3pt\begin{array}{#1} } \newcommand{\emx}{\end{array}\hskip -3pt\right]} \newcommand{\ds}{\displaystyle} \newcommand{\fp}{f'} \newcommand{\fpp}{f''} \newcommand{\lz}[2]{\frac{d#1}{d#2}} \newcommand{\lzn}[3]{\frac{d^{#1}#2}{d#3^{#1}}} \newcommand{\lzo}[1]{\frac{d}{d#1}} \newcommand{\lzoo}[2]{{\frac{d}{d#1}}{\left(#2\right)}} \newcommand{\lzon}[2]{\frac{d^{#1}}{d#2^{#1}}} \newcommand{\lzoa}[3]{\left.{\frac{d#1}{d#2}}\right|_{#3}} \newcommand{\plz}[2]{\frac{\partial#1}{\partial#2}} \newcommand{\plzoa}[3]{\left.{\frac{\partial#1}{\partial#2}}\right|_{#3}} \newcommand{\inflim}[1][n]{\lim\limits_{#1 \to \infty}} \newcommand{\infser}[1][1]{\sum_{n=#1}^\infty} \newcommand{\Fp}{F\primeskip'} \newcommand{\Fpp}{F\primeskip''} \newcommand{\yp}{y\primeskip'} \newcommand{\gp}{g\primeskip'} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\ddz}{\Delta z} \newcommand{\thet}{\theta} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\vnorm}[1]{\left\lVert\vec #1\right\rVert} \newcommand{\snorm}[1]{\left|\left|\ #1\ \right|\right|} \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \newcommand{\dotp}[2]{\vec #1 \cdot \vec #2} \newcommand{\proj}[2]{\text{proj}_{\,\vec #2}{\,\vec #1}} \newcommand{\crossp}[2]{\vec #1 \times \vec #2} \newcommand{\veci}{\vec i} \newcommand{\vecj}{\vec j} \newcommand{\veck}{\vec k} \newcommand{\vecu}{\vec u} \newcommand{\vecv}{\vec v} \newcommand{\vecw}{\vec w} \newcommand{\vecx}{\vec x} \newcommand{\vecy}{\vec y} \newcommand{\vrp}{\vec r\, '} \newcommand{\vsp}{\vec s\, '} \newcommand{\vrt}{\vec r(t)} \newcommand{\vst}{\vec s(t)} \newcommand{\vvt}{\vec v(t)} \newcommand{\vat}{\vec a(t)} \newcommand{\px}{\partial x} \newcommand{\py}{\partial y} \newcommand{\pz}{\partial z} \newcommand{\pf}{\partial f} \newcommand{\mathN}{\mathbb{N}} \newcommand{\zerooverzero}{\ds \raisebox{8pt}{\text{``\ }}\frac{0}{0}\raisebox{8pt}{\textit{ ''}}} \newcommand{\deriv}[2]{\myds\frac{d}{dx}\left(#1\right)=#2} \newcommand{\myint}[2]{\myds\int #1\ dx= {\ds #2}} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \newcommand{\primeskip}{\hskip.75pt} \newcommand{\plotlinecolor}{blue} \newcommand{\colorone}{blue} \newcommand{\colortwo}{red} \newcommand{\coloronefill}{blue!15!white} \newcommand{\colortwofill}{red!15!white} \newcommand{\abs}[1]{\left\lvert #1\right\rvert} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section12.3Partial Derivatives

Let \(y\) be a function of \(x\text{.}\) We have studied in great detail the derivative of \(y\) with respect to \(x\text{,}\) that is, \(\frac{dy}{dx}\text{,}\) which measures the rate at which \(y\) changes with respect to \(x\text{.}\) Consider now \(z=f(x,y)\text{.}\) It makes sense to want to know how \(z\) changes with respect to \(x\) and/or \(y\text{.}\) This section begins our investigation into these rates of change.

Consider the function \(z=f(x,y) = x^2+2y^2\text{,}\) as graphed in Figure 12.3.1(a). By fixing \(y=2\text{,}\) we focus our attention to all points on the surface where the \(y\)-value is 2, shown in both parts (a) and (b) of the figure. These points form a curve in space: \(z = f(x,2) = x^2+8\) which is a function of just one variable. We can take the derivative of \(z\) with respect to \(x\) along this curve and find equations of tangent lines, etc.

<<SVG image is unavailable, or your browser cannot render it>>

(a)

<<SVG image is unavailable, or your browser cannot render it>>

(b)
Table12.3.1By fixing \(y=2\text{,}\) the surface \(f(x,y) = x^2+2y^2\) is a curve in space.

The key notion to extract from this example is: by treating \(y\) as constant (it does not vary) we can consider how \(z\) changes with respect to \(x\text{.}\) In a similar fashion, we can hold \(x\) constant and consider how \(z\) changes with respect to \(y\text{.}\) This is the underlying principle of partial derivatives. We state the formal, limit–based definition first, then show how to compute these partial derivatives without directly taking limits.

Definition12.3.2Partial Derivative

Let \(z=f(x,y)\) be a continuous function on an open set \(S\) in \(\mathbb{R}^2\text{.}\)

  1. The partial derivative of \(f\) with respect to \(x\) is: \begin{equation*} f_x(x,y) = \lim_{h\to 0} \frac{f(x+h,y) - f(x,y)}h. \end{equation*}

  2. The partial derivative of \(f\) with respect to \(y\) is: \begin{equation*} f_y(x,y) = \lim_{h\to 0} \frac{f(x,y+h) - f(x,y)}h. \end{equation*}

Alternate notations for \(f_x(x,y)\) include: \begin{equation*} \frac{\partial}{\partial x}f(x,y),\ \ \frac{\pf}{\px},\ \ \frac{\pz}{\px},\ \ \text{ and } \ z_x, \end{equation*} with similar notations for \(f_y(x,y)\text{.}\) For ease of notation, \(f_x(x,y)\) is often abbreviated \(f_x\text{.}\)

Example12.3.3Computing partial derivatives with the limit definition

Let \(f(x,y) = x^2y + 2x+y^3\text{.}\) Find \(f_x(x,y)\) using the limit definition.

Solution

Example 12.3.3 found a partial derivative using the formal, limit–based definition. Using limits is not necessary, though, as we can rely on our previous knowledge of derivatives to compute partial derivatives easily. When computing \(f_x(x,y)\text{,}\) we hold \(y\) fixed — it does not vary. Therefore we can compute the derivative with respect to \(x\) by treating \(y\) as a constant or coefficient.

Just as \(\frac{d}{dx}\big(5x^2\big) = 10x\text{,}\) we compute \(\frac{\partial}{\px}\big(x^2y\big) = 2xy\text{.}\) Here we are treating \(y\) as a coefficient.

Just as \(\frac{d}{dx}\big(5^3\big) = 0\text{,}\) we compute \(\frac{\partial}{\px}\big(y^3\big) = 0\text{.}\) Here we are treating \(y\) as a constant. More examples will help make this clear.

Example12.3.4Finding partial derivatives

Find \(f_x(x,y)\) and \(f_y(x,y)\) in each of the following.

  1. \(f(x,y) = x^3y^2+ 5y^2-x+7\)

  2. \(f(x,y) = \cos(xy^2)+\sin(x)\)

  3. \(f(x,y) = e^{x^2y^3}\sqrt{x^2+1}\)

Solution

We have shown how to compute a partial derivative, but it may still not be clear what a partial derivative means. Given \(z=f(x,y)\text{,}\) \(f_x(x,y)\) measures the rate at which \(z\) changes as only \(x\) varies: \(y\) is held constant.

Imagine standing in a rolling meadow, then beginning to walk due east. Depending on your location, you might walk up, sharply down, or perhaps not change elevation at all. This is similar to measuring \(z_x\text{:}\) you are moving only east (in the “\(x\)”-direction) and not north/south at all. Going back to your original location, imagine now walking due north (in the “\(y\)”-direction). Perhaps walking due north does not change your elevation at all. This is analogous to \(z_y=0\text{:}\) \(z\) does not change with respect to \(y\text{.}\) We can see that \(z_x\) and \(z_y\) do not have to be the same, or even similar, as it is easy to imagine circumstances where walking east means you walk downhill, though walking north makes you walk uphill.

The following example helps us visualize this more.

Example12.3.5Evaluating partial derivatives

Let \(z=f(x,y)=-x^2-\frac12y^2+xy+10\text{.}\) Find \(f_x(2,1)\) and \(f_y(2,1)\) and interpret their meaning.

Solution

Subsection12.3.1Second Partial Derivatives

Let \(z=f(x,y)\text{.}\) We have learned to find the partial derivatives \(f_x(x,y)\) and \(f_y(x,y)\text{,}\) which are each functions of \(x\) and \(y\text{.}\) Therefore we can take partial derivatives of them, each with respect to \(x\) and \(y\text{.}\) We define these “second partials” along with the notation, give examples, then discuss their meaning.

Definition12.3.9Second Partial Derivative, Mixed Partial Derivative

Let \(z=f(x,y)\) be continuous on an open set \(S\text{.}\)

  1. The second partial derivative of \(f\) with respect to \(x\) then \(x\) is \begin{equation*} \frac{\partial}{\partial x}\left(\frac{\partial f}{\px}\right) = \frac{\partial^2 f}{\px^2} = \big(\,f_x\,\big)_x = f_{xx} \end{equation*}

  2. The second partial derivative of \(f\) with respect to \(x\) then \(y\) is \begin{equation*} \frac{\partial}{\partial y}\left(\frac{\partial f}{\px}\right) = \frac{\partial^2f}{\py\px} = \big(\,f_x\,\big)_y = f_{xy} \end{equation*}

Similar definitions hold for \(\ds \frac{\partial^2f}{\py^2} = f_{yy}\) and \(\ds \frac{\partial^2f}{\px\py} = f_{yx}\text{.}\)

The second partial derivatives \(f_{xy}\) and \(f_{yx}\) are mixed partial derivatives.

The notation of second partial derivatives gives some insight into the notation of the second derivative of a function of a single variable. If \(y=f(x)\text{,}\) then \(\ds \fp'(x) = \frac{d^2 y}{dx^2}\text{.}\) The “\(d^2y\)” portion means “take the derivative of \(y\) twice,” while “\(dx^2\)” means “with respect to \(x\) both times.” When we only know of functions of a single variable, this latter phrase seems silly: there is only one variable to take the derivative with respect to. Now that we understand functions of multiple variables, we see the importance of specifying which variables we are referring to.

The terms in Definition 12.3.9 all depend on limits, so each definition comes with the caveat “where the limit exists.”

Example12.3.10Second partial derivatives

For each of the following, find all six first and second partial derivatives. That is, find \begin{equation*} f_x, f_y, f_{xx}, f_{yy}, f_{xy} \text{ and } f_{yx}\,. \end{equation*}

  1. \(f(x,y) = x^3y^2 + 2xy^3+\cos(x)\)

  2. \(\ds f(x,y) = \frac{x^3}{y^2}\)

  3. \(f(x,y)=e^{x}\sin(x^2y)\)

Solution

Notice how in each of the three functions in Example 12.3.10, \(f_{xy} = f_{yx}\text{.}\) Due to the complexity of the examples, this likely is not a coincidence. The following theorem states that it is not.

Finding \(f_{xy}\) and \(f_{yx}\) independently and comparing the results provides a convenient way of checking our work.

Subsection12.3.2Understanding Second Partial Derivatives

Now that we know how to find second partials, we investigate what they tell us.

Again we refer back to a function \(y=f(x)\) of a single variable. The second derivative of \(f\) is “the derivative of the derivative,” or “the rate of change of the rate of change.” The second derivative measures how much the derivative is changing. If \(\fp'(x)\lt 0\text{,}\) then the derivative is getting smaller (so the graph of \(f\) is concave down); if \(\fp'(x)>0\text{,}\) then the derivative is growing, making the graph of \(f\) concave up.

Now consider \(z=f(x,y)\text{.}\) Similar statements can be made about \(f_{xx}\) and \(f_{yy}\) as could be made about \(\fp'(x)\) above. When taking derivatives with respect to \(x\) twice, we measure how much \(f_x\) changes with respect to \(x\text{.}\) If \(f_{xx}(x,y)\lt 0\text{,}\) it means that as \(x\) increases, \(f_x\) decreases, and the graph of \(f\) will be concave down in the \(x\)-direction. Using the analogy of standing in the rolling meadow used earlier in this section, \(f_{xx}\) measures whether one's path is concave up/down when walking due east.

Similarly, \(f_{yy}\) measures the concavity in the \(y\)-direction. If \(f_{yy}(x,y)>0\text{,}\) then \(f_y\) is increasing with respect to \(y\) and the graph of \(f\) will be concave up in the \(y\)-direction. Appealing to the rolling meadow analogy again, \(f_{yy}\) measures whether one's path is concave up/down when walking due north.

We now consider the mixed partials \(f_{xy}\) and \(f_{yx}\text{.}\) The mixed partial \(f_{xy}\) measures how much \(f_x\) changes with respect to \(y\text{.}\) Once again using the rolling meadow analogy, \(f_{x}\) measures the slope if one walks due east. Looking east, begin walking north (side–stepping). Is the path towards the east getting steeper? If so, \(f_{xy}>0\text{.}\) Is the path towards the east not changing in steepness? If so, then \(f_{xy}=0\text{.}\) A similar thing can be said about \(f_{yx}\text{:}\) consider the steepness of paths heading north while side–stepping to the east.

The following example examines these ideas with concrete numbers and graphs.

Example12.3.12Understanding second partial derivatives

Let \(z=x^2-y^2+xy\text{.}\) Evaluate the 6 first and second partial derivatives at \((-1/2,1/2)\) and interpret what each of these numbers mean.

Solution

Subsection12.3.3Partial Derivatives and Functions of Three Variables

The concepts underlying partial derivatives can be easily extend to more than two variables. We give some definitions and examples in the case of three variables and trust the reader can extend these definitions to more variables if needed.

Definition12.3.16Partial Derivatives with Three Variables

Let \(w=f(x,y,z)\) be a continuous function on an open set \(S\) in \(\mathbb{R}^3\text{.}\)

The partial derivative of \(f\) with respect to \(x\) is: \begin{equation*} f_x(x,y,z) = \lim_{h\to 0} \frac{f(x+h,y,z)-f(x,y,z)}{h}. \end{equation*}

Similar definitions hold for \(f_y(x,y,z)\) and \(f_z(x,y,z)\text{.}\)

By taking partial derivatives of partial derivatives, we can find second partial derivatives of \(f\) with respect to \(z\) then \(y\text{,}\) for instance, just as before.

Example12.3.17Partial derivatives of functions of three variables

For each of the following, find \(f_x\text{,}\)  \(f_y\text{,}\)  \(f_z\text{,}\)  \(f_{xz}\text{,}\)  \(f_{yz}\text{,}\) and \(f_{zz}\text{.}\)

  1. \(f(x,y,z) = x^2y^3z^4+x^2y^2+x^3z^3+y^4z^4\)

  2. \(f(x,y,z) = x\sin(yz)\)

Solution

Subsection12.3.4Higher Order Partial Derivatives

We can continue taking partial derivatives of partial derivatives of partial derivatives of …; we do not have to stop with second partial derivatives. These higher order partial derivatives do not have a tidy graphical interpretation; nevertheless they are not hard to compute and worthy of some practice.

We do not formally define each higher order derivative, but rather give just a few examples of the notation. \begin{equation*} f_{xyx}(x,y) =\frac{\partial}{\px}\left(\frac{\partial}{\py}\left(\frac{\pf}{\px}\right)\right) \text{ and } \end{equation*} \begin{equation*} f_{xyz}(x,y,z) =\frac{\partial}{\partial z}\left(\frac{\partial}{\py}\left(\frac{\pf}{\px}\right)\right) . \end{equation*}

Example12.3.18Higher order partial derivatives
  1. Let \(f(x,y) = x^2y^2+\sin(xy)\text{.}\) Find \(f_{xxy}\) and \(f_{yxx}\text{.}\)

  2. Let \(f(x,y,z) = x^3e^{xy}+\cos(z)\text{.}\) Find \(f_{xyz}\text{.}\)

Solution

In the previous example we saw that \(f_{xxy} = f_{yxx}\text{;}\) this is not a coincidence. While we do not state this as a formal theorem, as long as each partial derivative is continuous, it does not matter the order in which the partial derivatives are taken. For instance, \(f_{xxy} = f_{xyx} = f_{yxx}\text{.}\)

This can be useful at times. Had we known this, the second part of Example 12.3.18 would have been much simpler to compute. Instead of computing \(f_{xyz}\) in the \(x\text{,}\) \(y\) then \(z\) orders, we could have applied the \(z\text{,}\) then \(x\) then \(y\) order (as \(f_{xyz} = f_{zxy}\)). It is easy to see that \(f_z = -\sin(z)\text{;}\) then \(f_{zx}\) and \(f_{zxy}\) are clearly 0 as \(f_z\) does not contain an \(x\) or \(y\text{.}\)

A brief review of this section: partial derivatives measure the instantaneous rate of change of a multivariable function with respect to one variable. With \(z=f(x,y)\text{,}\) the partial derivatives \(f_x\) and \(f_y\) measure the instantaneous rate of change of \(z\) when moving parallel to the \(x\)- and \(y\)-axes, respectively. How do we measure the rate of change at a point when we do not move parallel to one of these axes? What if we move in the direction given by the vector \(\la 2,1\ra\text{?}\) Can we measure that rate of change? The answer is, of course, yes, we can. This is the topic of Section 12.6. First, we need to define what it means for a function of two variables to be differentiable.

Subsection12.3.5Exercises

In the following exercises, evaluate \(f_x(x,y)\) and \(f_y(x,y)\) at the indicated point.

In the following exercises, find \(f_x\text{,}\) \(f_y\text{,}\) \(f_{xx}\text{,}\) \(f_{yy}\text{,}\) \(f_{xy}\) and \(f_{yx}\text{.}\)

In the following exercises, form a function \(z=f(x,y)\) such that \(f_x\) and \(f_y\) match those given.

In the following exercises, find \(f_x\text{,}\) \(f_y\text{,}\) \(f_z\text{,}\) \(f_{yz}\) and \(f_{zy}\text{.}\)