Skip to main content

Section 14.3 Partial Derivatives

In single-variable Calculus (MTH 251Z or MTH 251), the derivative \(f'(x)\) gave us a powerful tool to measure the instantaneous rate of change. Geometrically, it represented the slope of the tangent line to the curve \(y=f(x)\text{.}\) Now that we are dealing with functions of two variables \(z=f(x,y)\text{,}\) the concept of "rate of change" becomes a bit more complex.
Imagine standing on the side of a mountain (a surface). The steepness of the terrain depends entirely on which direction you choose to walk! To manage this complexity, we start by restricting our movement to the coordinate directions: parallel to the \(x\)-axis or parallel to the \(y\)-axis. This approach leads us to the concept of partial derivatives. Essentially, we will look at how the function changes if we only wiggle one variable while holding the others constant.
Without further ado, Let’s define the partial derivatives!

Definition 14.3.1. Partial Derivatives.

Let \(f(x,y)\) be a function of two variables. The partial derivative of \(f\) with respect to \(x\) at the point \((a,b)\text{,}\) denoted \(f_x(a,b)\) or \(\dfrac{\partial f}{\partial x}\bigg|_{(a,b)}\text{,}\) is defined as
\begin{equation*} f_x(a,b) = \lim_{h \to 0} \dfrac{f(a+h,b) - f(a,b)}{h} \end{equation*}
provided the limit exists.
The partial derivative of \(f\) with respect to \(y\) at the point \((a,b)\text{,}\) denoted \(f_y(a,b)\) or \(\dfrac{\partial f}{\partial y}\bigg|_{(a,b)}\text{,}\) is defined as
\begin{equation*} f_y(a,b) = \lim_{k \to 0} \dfrac{f(a,b+k) - f(a,b)}{k} \end{equation*}
provided the limit exists.
They measure the rate of change with respect to each variable separately.
We can observe from the definition that we fix one variable and let the other variable vary to compute the partial derivative. By fixing one variable, we are essentially looking at the trace curve of the surface obtained by intersecting with a plane. Then the partial derivative is the slope of the tangent line to the trace curve at the point of interest.
Figure 14.3.2. The partial derivatives are the slopes of the vertical trace curves.
You can imagine that the reason why we call them the partial derivatives is because they only measure the rate of change with respect to one variable while keeping the other variable fixed. There is a concept called the total derivative (or total differential) that takes into account the rate of change with respect to both variables. We will investigate this concept in the next section.
Symbolically, we use the symbol "\(\partial\)" to emphasize this "partial" nature. When we see "\(\frac{\partial f}{\partial x}\)", we know that that \(x\) is just one of the several variables affecting \(f\text{,}\) and the others are being held fixed. As a comparison, when we see \(\frac{df}{dx}\text{,}\) we know that \(x\) is the only variable affecting \(f\text{.}\)
If this were a MTH 251Z (or MTH 251), then Richard would make you to evaluate the limits using the definition to get a sense of what the derivative measures (the limit of some average rate of change as the change gets smaller and smaller). However, this is MTH 254 so Richard assumes you are already comfortable with this concept. Feel free to use the derivative formulas and rules that you learned from MTH 251Z (or MTH 251) to compute partial derivatives.

Example 14.3.3.

Let \(f(x,y) = x^3 - y^2 + 4\text{.}\)
  1. Compute \(\dfrac{\partial f}{\partial x}\) at the point \((2,-4)\text{.}\) Also, interpret the meaning of this value in terms of the graph of \(f\text{.}\)
  2. Compute \(\dfrac{\partial f}{\partial y}\) at the point \((2,-4)\text{.}\) Also, interpret the meaning of this value in terms of the graph of \(f\text{.}\)
Hint.
If you stare at the definition of the partial derivative, we either treat \(x\) or \(y\) as the variable and the other as a constant. This will help you to evaluate the partial derivatives using the rules you already know!
Richard also coded the graph of \(f\) below for you to visualize what the surface looks like.
Figure 14.3.4. The graph of \(f(x,y) = x^3 - y^2 + 4\text{.}\)
Solution.
To compute \(\dfrac{\partial f}{\partial x}\bigg|_{(2,-4)}\text{,}\) we treat \(y\) as a constant and differentiate with respect to \(x\text{.}\)
\begin{align*} \frac{\partial f}{\partial x} \amp = \frac{\partial}{\partial x}(x^3 - y^2 + 4) = 3x^2 \\ \frac{\partial f}{\partial x}\bigg|_{(2,-4)} \amp = 3(2)^2 = 12 \end{align*}
This means that the slope of the tangent line to the trace of the surface obtained by intersecting with the plane \(y=-4\) at the point \((2,-4,6)\) is 12.
Figure 14.3.5.
To compute \(\dfrac{\partial f}{\partial y}\bigg|_{(2,-4)}\text{,}\) we treat \(x\) as a constant and differentiate with respect to \(y\text{.}\)
\begin{align*} \frac{\partial f}{\partial y} \amp = \frac{\partial}{\partial y}(x^3 - y^2 + 4) = -2y \\ \frac{\partial f}{\partial y}\bigg|_{(2,-4)} \amp = -2(-4) = 8 \end{align*}
This means that the slope of the tangent line to the trace of the surface obtained by intersecting with the plane \(x=2\) at the point \((2,-4,6)\) is 8.
Figure 14.3.6.
We can find the higher order partial derivatives by taking the partial derivatives of the partial derivatives. Since we have two variables, we can take the partial derivatives in different orders.
Let \(z = f(x,y)\text{.}\) Then there are four different ways to take the second-order partial derivatives:
\begin{align*} f_{xx} = \frac{\partial}{\partial x}\lp \frac{\partial f}{\partial x} \rp = \frac{\partial^2 f}{\partial x^2} \qquad \amp, \qquad f_{yy} = \frac{\partial}{\partial y}\lp \frac{\partial f}{\partial y} \rp = \frac{\partial^2 f}{\partial y^2} \\ f_{xy} = \frac{\partial}{\partial y}\lp \frac{\partial f}{\partial x} \rp = \frac{\partial^2 f}{\partial y\,\partial x} \qquad \amp, \qquad f_{yx} = \frac{\partial}{\partial x}\lp \frac{\partial f}{\partial y} \rp = \frac{\partial^2 f}{\partial x\,\partial y} \end{align*}
The notation should be self-explanatory regarding the order of differentiation.

Example 14.3.7.

Find the four second partial derivatives of \(f(x,y) = 3x^4y - 2xy + 5xy^3\text{.}\)
Solution.
First, we compute the partial derivatives:
\begin{align*} \frac{\partial f}{\partial x} \amp= \frac{\partial}{\partial x} \lp 3x^4y - 2xy + 5xy^3 \rp = 12x^3y - 2y + 5y^3 \\ \frac{\partial f}{\partial y} \amp= \frac{\partial}{\partial y} \lp 3x^4y - 2xy + 5xy^3 \rp = 3x^4 - 2x + 15xy^2 \end{align*}
For the second partial derivatives, we have
\begin{align*} \frac{\partial^2 f}{\partial x^2} \amp= \frac{\partial}{\partial x} \lp 12x^3y - 2y + 5y^3 \rp = 36x^2y \\ \frac{\partial^2 f}{\partial y^2} \amp= \frac{\partial}{\partial y} \lp 3x^4 - 2x + 15xy^2 \rp = 30xy \\ \frac{\partial^2 f}{\partial x \partial y} \amp= \frac{\partial}{\partial y} \lp 12x^3y - 2y + 5y^3 \rp = 12x^3 - 2 + 15y^2 \\ \frac{\partial^2 f}{\partial y \partial x} \amp= \frac{\partial}{\partial x} \lp 3x^4 - 2x + 15xy^2 \rp = 12x^3 - 2 + 15y^2 \end{align*}
Observe that the two mixed partial derivatives \(f_{xy}\) and \(f_{yx}\) are the same in this example. It turns out that most of the functions we encounter have this property. A French mathematician Alexis Clairaut (1713-1765) also found this pattern, formulate it as a theorem, and proved it.
The proof of Clairaut’s Theorem is a bit technical and requires the Mean Value Theorem. If you are interested in seeing the proof, you can check out the textbook on page A21.
The Clairaut’s Theorem states that if the mixed partial derivatives are continuous, then the order of differentiation does not matter. This result can be generalized to higher order partial derivatives as well. That is, we can interchange the order of differentiation as long as the mixed partial derivatives are continuous.

Example 14.3.9.

Let \(f(x,y,u,v) = \dfrac{x^2 + e^yv}{3y^2 + \ln\lp 2 + u^2\rp}\text{.}\) Compute the derivative \(f_{uvxyvu}\text{.}\)
Hint.
Clairaut’s Theorem allows us to rearrange the order of differentiation as long as the mixed partial derivatives are continuous. So which order of differentiation would be the easiest to compute?
One way to determine the order of differentiation is to see which variable appears in the simplest way in the function...
Solution.
Observe that \(v\) appears in the simplest way in the function, so we can start there!
\begin{align*} f_{v}(x,y,u,v) \amp= \frac{\partial}{\partial v} \frac{x^2 + e^yv}{3y^2 + \ln\lp 2 + u^2\rp} \\ \amp= \frac{\partial}{\partial v} \lp \frac{x^2}{3y^2 + \ln\lp 2 + u^2\rp} + \frac{e^y}{3y^2 + \ln\lp 2 + u^2\rp} v\rp \\ \amp= 0 + \frac{e^y}{3y^2 + \ln\lp 2 + u^2\rp} \end{align*}
The next variable that appears in the simplest way is \(x\) since there is no \(x\) at all! Then we have
\begin{align*} f_{vx}(x,y,u,v) \amp= \frac{\partial}{\partial x}\lp \frac{\partial f}{\partial v} \rp \\ \amp= \frac{\partial}{\partial x} \lp \frac{e^y}{3y^2 + \ln\lp 2 + u^2\rp} \rp \\ \amp= 0 \end{align*}
From here, we can conclude that the rest of the derivatives will also be zero since we are taking the derivative of a constant. Therefore, \(f_{uvxyvu} = f_{vxuyvu} = 0\text{.}\)
It takes practice to get comfortable with computing partial derivatives, especially the higher order ones. The more you practice, the more you will get a sense of how to rearrange the order of differentiation to make the computation easier!

Worksheet Assigned Problems for Section 14.3

The problems listed below are assigned to be included in your problem set portfolio. Note that a specific selection of these problems will also form the written homework assignments. I recommend working through all of them to ensure a solid grasp of the material. Reach out to Richard for help if you get stuck or have any questions.
The solutions will be posted after the written homework due dates. If you have any questions about your work, talk to Richard and he is happy to discuss the process with you.

14.3.3.

Use the Product Rule to compute \(f_x\) and \(f_y\) for \(f(x,y) = \lp x^2 - y\rp\lp x - y^2\rp\)
Solution.
Using the Product Rule for \(f_x\text{:}\)
\begin{align*} f_x \amp = \frac{\partial}{\partial x}\lp x^2 - y\rp \cdot \lp x - y^2\rp + \lp x^2 - y\rp \cdot \frac{\partial}{\partial x}\lp x - y^2\rp \\ \amp = \lp 2x \rp \lp x - y^2 \rp + \lp x^2 - y \rp \lp 1 \rp \\ \amp = 3x^2 - 2xy^2 - y \end{align*}
Using the Product Rule for \(f_y\text{:}\)
\begin{align*} f_y \amp = \frac{\partial}{\partial y}\lp x^2 - y\rp \cdot \lp x - y^2\rp + \lp x^2 - y\rp \cdot \frac{\partial}{\partial y}\lp x - y^2\rp \\ \amp = \lp -1 \rp \lp x - y^2 \rp + \lp x^2 - y \rp \lp -2y \rp \\ \amp = -x + y^2 - 2x^2y + 2y^2 \\ \amp = 3y^2 - 2x^2y - x \end{align*}

14.3.5.

Use the Quotient Rule to compute \(\dfrac{\partial}{\partial y} \dfrac{y}{x + y}\)
Solution.
\begin{align*} \frac{\partial}{\partial y} \frac{y}{x + y} \amp = \frac{\lp 1 \rp\lp x + y \rp - \lp y \rp \lp 1 \rp}{\lp x + y \rp^2} \\ \amp = \frac{x + y - y}{\lp x + y \rp^2} \\ \amp = \frac{x}{\lp x + y \rp^2} \end{align*}

14.3.9.

The plane \(y = 1\) intersects the surface \(z = x^4 + 6xy - y^4\) in a certain curve. Find the slope of the tangent line to this curve at the point \(P = (1,1,6)\text{.}\)
Solution.
The slope of the tangent line to the curve formed by the intersection of the surface and the plane \(y=1\) is given by the partial derivative with respect to \(x\) evaluated at the point \((1,1)\text{.}\)
\begin{align*} f_x(x,y) \amp = \frac{\partial}{\partial x} \lp x^4 + 6xy - y^4 \rp = 4x^3 + 6y \\ f_x(1,1) \amp = 4(1)^3 + 6(1) = 4 + 6 =10 \end{align*}

Exercise Group.

For the following exercises, compute the first-order partial derivatives.
14.3.17.
\(z = x^4y + xy^{-2}\)
Solution.
\begin{align*} \frac{\partial z}{\partial x} \amp = \frac{\partial}{\partial x}\lp x^4y \rp + \frac{\partial}{\partial x}\lp xy^{-2} \rp \\ \amp = 4x^3y + y^{-2} \end{align*}
\begin{align*} \frac{\partial z}{\partial y} \amp = \frac{\partial}{\partial y}\lp x^4y \rp + \frac{\partial}{\partial y}\lp xy^{-2} \rp \\ \amp = x^4 - 2xy^{-3} \end{align*}
14.3.23.
\(z = \lp \sin(x) \rp\lp \cos(y) \rp\)
Solution.
\begin{align*} \frac{\partial z}{\partial x} \amp = \cos(x)\cos(y) \end{align*}
\begin{align*} \frac{\partial z}{\partial y} \amp = -\sin(x)\sin(y) \end{align*}
14.3.33.
\(z = e^{-x^2 - y^2}\)
Solution.
\begin{align*} \frac{\partial z}{\partial x} \amp = e^{-x^2 - y^2} \cdot \frac{\partial}{\partial x} \lp -x^2 - y^2 \rp \\ \amp = -2xe^{-x^2 - y^2} \end{align*}
\begin{align*} \frac{\partial z}{\partial y} \amp = e^{-x^2 - y^2} \cdot \frac{\partial}{\partial y} \lp -x^2 - y^2 \rp \\ \amp = -2ye^{-x^2 - y^2} \end{align*}
14.3.39.
\(w = xy^2z^3\)
Solution.
\begin{align*} \frac{\partial w}{\partial x} \amp = y^2z^3 \end{align*}
\begin{align*} \frac{\partial w}{\partial y} \amp = 2xyz^3 \end{align*}
\begin{align*} \frac{\partial w}{\partial z} \amp = 3xy^2z^2 \end{align*}

14.3.45.

Given that \(g(u,v) = u \ln\lp u + v \rp\text{,}\) compute the partial derivative \(g_u(1,2)\text{.}\)
Solution.
First, we find the partial derivative function \(g_u(u,v)\) using the Product Rule.
\begin{align*} g_u(u,v) \amp = 1 \cdot \ln\lp u + v \rp + u \cdot \frac{1}{u+v} \cdot 1 \\ \amp = \ln\lp u + v \rp + \frac{u}{u+v} \end{align*}
Now we substitute \((1,2)\) into the derivative.
\begin{align*} g_u(1,2) \amp = \ln\lp 1 + 2 \rp + \frac{1}{1+2} \\ \amp = \ln(3) + \frac{1}{3} \end{align*}

Exercise Group.

For the following exercises, compute the derivatives indicated.
14.3.53.
\(f(x,y) = 3x^2y - 6xy^4\, , \quad \dfrac{\partial^2 f}{\partial x^2} \text{ and } \dfrac{\partial^2 f}{\partial y^2}\)
Solution.
\begin{align*} \frac{\partial f}{\partial x} \amp = 6xy - 6y^4 \\ \frac{\partial^2 f}{\partial x^2} \amp = 6y \end{align*}
\begin{align*} \frac{\partial f}{\partial y} \amp = 3x^2 - 24xy^3 \\ \frac{\partial^2 f}{\partial y^2} \amp = -72xy^2 \end{align*}
14.3.55.
\(h(u,v) = \dfrac{u}{u + 4v}\, , \quad h_{vv}(u,v)\)
Solution.
We can rewrite \(h(u,v) = u(u+4v)^{-1}\) to make differentiation easier.
\begin{align*} h_v(u,v) \amp = u(-1)(u+4v)^{-2}(4) = -4u(u+4v)^{-2} \\ h_{vv}(u,v) \amp = -4u(-2)(u+4v)^{-3}(4) \\ \amp = 32u(u+4v)^{-3} = \frac{32u}{\lp u + 4v \rp^3} \end{align*}

Exercise Group.

In the following exercises, compute the derivative indicated.
14.3.61.
\(f(u,v) = \cos\lp u + v^2 \rp \, , \quad f_{uuv}\)
Solution.
\begin{align*} f_u \amp = -\sin\lp u + v^2 \rp \\ f_{uu} \amp = -\cos\lp u + v^2 \rp \\ f_{uuv} \amp = \frac{\partial}{\partial v}\lp -\cos\lp u + v^2 \rp \rp = -\lp -\sin\lp u + v^2 \rp \rp \cdot 2v \\ \amp = 2v\sin\lp u + v^2 \rp \end{align*}
14.3.67.
\(g(x,y,z) = \sqrt{x^2 + y^2 + z^2} \, , \quad g_{xyz}\)
Solution.
\begin{align*} g_x \amp = \frac{1}{2}\lp x^2 + y^2 + z^2 \rp^{-1/2} \cdot 2x = x\lp x^2 + y^2 + z^2 \rp^{-1/2} \\ g_{xy} \amp = x \cdot \lp -\frac{1}{2} \rp \lp x^2 + y^2 + z^2 \rp^{-3/2} \cdot 2y = -xy\lp x^2 + y^2 + z^2 \rp^{-3/2} \\ g_{xyz} \amp = -xy \cdot \lp -\frac{3}{2} \rp \lp x^2 + y^2 + z^2 \rp^{-5/2} \cdot 2z \\ \amp = 3xyz\lp x^2 + y^2 + z^2 \rp^{-5/2} \end{align*}

14.3.75.

The Laplace operator \(\Delta\) is defined by
\begin{equation*} \Delta f = f_{xx} + f_{yy} \end{equation*}
A function \(u(x,y)\) satisfying the Laplace equation \(\Delta u = 0\) is called harmonic.
Show that the following functions are harmonic.
  1. \(\displaystyle u(x,y) = x\)
  2. \(\displaystyle u(x,y) = e^x\cos(y)\)
  3. \(\displaystyle u(x,y) = \tan^{-1} \lp \dfrac{y}{x} \rp\)
  4. \(\displaystyle u(x,y) = \ln\lp x^2 + y^2 \rp\)
Solution.
To demonstrate that each function is harmonic, we must compute the second partial derivatives with respect to \(x\) and \(y\text{,}\) and show that their sum is zero.
  1. We first compute the derivatives for \(u(x,y) = x\text{.}\)
    \begin{align*} u_x \amp = 1 \\ u_{xx} \amp = 0 \\ u_y \amp = 0 \\ u_{yy} \amp = 0 \end{align*}
    Now we calculate the Laplacian:
    \begin{align*} \Delta u \amp = u_{xx} + u_{yy} = 0 + 0 = 0 \end{align*}
    Since \(\Delta u = 0\text{,}\) the function is harmonic.
  2. Next, we compute the derivatives for \(u(x,y) = e^x\cos(y)\text{.}\)
    \begin{align*} u_x \amp = e^x\cos(y) \\ u_{xx} \amp = e^x\cos(y) \\ u_y \amp = -e^x\sin(y) \\ u_{yy} \amp = -e^x\cos(y) \end{align*}
    Summing the second derivatives gives:
    \begin{align*} \Delta u \amp = e^x\cos(y) - e^x\cos(y) = 0 \end{align*}
    Therefore, the function is harmonic.
  3. For \(u(x,y) = \tan^{-1} \lp \dfrac{y}{x} \rp\text{,}\) we use the Chain Rule to find the derivatives.
    \begin{align*} u_x \amp = \frac{1}{1 + (y/x)^2} \cdot \lp -yx^{-2} \rp = \frac{-y}{x^2 + y^2} \\ u_{xx} \amp = \frac{\partial}{\partial x}\lp -y\lp x^2 + y^2 \rp^{-1} \rp = -y(-1)\lp x^2 + y^2 \rp^{-2}(2x) = \frac{2xy}{(x^2 + y^2)^2} \\ u_y \amp = \frac{1}{1 + (y/x)^2} \cdot \lp x^{-1} \rp = \frac{x}{x^2 + y^2} \\ u_{yy} \amp = \frac{\partial}{\partial y}\lp x\lp x^2 + y^2 \rp^{-1} \rp = x(-1)\lp x^2 + y^2 \rp^{-2}(2y) = \frac{-2xy}{(x^2 + y^2)^2} \end{align*}
    Adding the second partials:
    \begin{align*} \Delta u \amp = \frac{2xy}{(x^2 + y^2)^2} + \frac{-2xy}{(x^2 + y^2)^2} = 0 \end{align*}
    Thus, the function is harmonic.
  4. Finally, for \(u(x,y) = \ln\lp x^2 + y^2 \rp\text{,}\) we compute the derivatives using the Chain Rule and Quotient Rule.
    \begin{align*} u_x \amp = \frac{1}{x^2 + y^2} \cdot 2x = \frac{2x}{x^2 + y^2} \\ u_{xx} \amp = \frac{2(x^2 + y^2) - 2x(2x)}{(x^2 + y^2)^2} = \frac{2y^2 - 2x^2}{(x^2 + y^2)^2} \\ u_y \amp = \frac{1}{x^2 + y^2} \cdot 2y = \frac{2y}{x^2 + y^2} \\ u_{yy} \amp = \frac{2(x^2 + y^2) - 2y(2y)}{(x^2 + y^2)^2} = \frac{2x^2 - 2y^2}{(x^2 + y^2)^2} \end{align*}
    We sum \(u_{xx}\) and \(u_{yy}\text{:}\)
    \begin{align*} \Delta u \amp = \frac{2y^2 - 2x^2}{(x^2 + y^2)^2} + \frac{2x^2 - 2y^2}{(x^2 + y^2)^2} \\ \amp = \frac{2y^2 - 2x^2 + 2x^2 - 2y^2}{(x^2 + y^2)^2} = 0 \end{align*}
    Since the sum is zero, we conclude that the function is harmonic.