2.2 Partial Derivatives

Now that we have an idea of what functions of several variables are, and what a limit of such a function is, we can start to develop an idea of a derivative of a function of two or more variables. We will start with the notion of a partial derivative.

Definition 2.3

Let \(f(x,y)\) be a real-valued function with domain \(D\) in \(\Real{2}\), and let \((a,b)\) be a point in \(D\). Then the partial derivative of \(\bm{f}\) at \(\bm{(a,b)}\) with respect to \(\bm{x}\), denoted by \(\dfrac{\partial f}{\partial x} (a,b)\), is defined as

\begin{equation} \dfrac{\partial f}{\partial x} (a,b) = \lim_{h \to 0} \dfrac{f(a+h,b) - f(a,b)}{h} \tag{2.2}\end{equation}

and the partial derivative of \(\bm{f}\) at \(\bm{(a,b)}\) with respect to \(\bm{y}\), denoted by \(\dfrac{\partial f}{\partial y} (a,b)\), is defined as

\begin{equation} \dfrac{\partial f}{\partial y} (a,b) = \lim_{h \to 0} \dfrac{f(a,b+h) - f(a,b)}{h} ~. \tag{2.3}\end{equation}

Note: The symbol \(\partial\) is pronounced “del”.[1]

Recall that the derivative of a function \(f(x)\) can be interpreted as the rate of change of that function in the (positive) \(x\) direction. From the definitions above, we can see that the partial derivative of a function \(f(x,y)\) with respect to \(x\) or \(y\) is the rate of change of \(f(x,y)\) in the (positive) \(x\) or \(y\) direction, respectively. What this means is that the partial derivative of a function \(f(x,y)\) with respect to \(x\) can be calculated by treating the \(y\) variable as a constant, and then simply differentiating \(f(x,y)\) as if it were a function of \(x\) alone, using the usual rules from single-variable calculus. Likewise, the partial derivative of \(f(x,y)\) with respect to \(y\) is obtained by treating the \(x\) variable as a constant and then differentiating \(f(x,y)\) as if it were a function of \(y\) alone.


width height 0.5pt

Example 2.10

Find \(\dfrac{\partial f}{\partial x} (x,y)\) and \(\dfrac{\partial f}{\partial y} (x,y)\) for the function \(f(x,y) = x^{2}y + y^3\).

Solution: Treating \(y\) as a constant and differentiating \(f(x,y)\) with respect to \(x\) gives

\[\dfrac{\partial f}{\partial x} (x,y) = 2xy\]

and treating \(x\) as a constant and differentiating \(f(x,y)\) with respect to \(y\) gives

\[\dfrac{\partial f}{\partial y} (x,y) = x^2 + 3y^2 ~.\]


width height 0.5pt We will often simply write \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\) instead of \(\dfrac{\partial f}{\partial x} (x,y)\) and \(\dfrac{\partial f}{\partial y} (x,y)\).


width height 0.5pt

Example 2.11

Find \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\) for the function \(f(x,y) = \dfrac{\sin (xy^2)}{x^2 + 1}\).

Solution: Treating \(y\) as a constant and differentiating \(f(x,y)\) with respect to \(x\) gives

\[\dfrac{\partial f}{\partial x} = \dfrac{(x^2 + 1)(y^2 \cos (xy^2)) - (2x)\,\sin (xy^2)}{(x^2 + 1)^2}\]

and treating \(x\) as a constant and differentiating \(f(x,y)\) with respect to \(y\) gives

\[\dfrac{\partial f}{\partial y} = \dfrac{2xy\,\cos (xy^2)}{x^2 + 1} ~.\]


width height 0.5pt

Since both \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\) are themselves functions of \(x\) and \(y\), we can take their partial derivatives with respect to \(x\) and \(y\). This yields the higher-order partial derivatives:

\begin{gather*} \dfrac{\partial^2 f}{\partial x^2} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial f}{\partial x} \biggr) \qquad\dfrac{\partial^2 f}{\partial y^2} =\dfrac{\partial}{\partial y} \biggl( \dfrac{\partial f}{\partial y} \biggr)\\ \dfrac{\partial^2 f}{\partial y \, \partial x} = \dfrac{\partial}{\partial y} \biggl( \dfrac{\partial f}{\partial x} \biggr)\qquad \dfrac{\partial^2 f}{\partial x \, \partial y} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial f}{\partial y} \biggr)\\ \dfrac{\partial^3 f}{\partial x^3} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial^2 f}{\partial x^2} \biggr) \qquad\dfrac{\partial^3 f}{\partial y^3} =\dfrac{\partial}{\partial y} \biggl( \dfrac{\partial^2 f}{\partial y^2} \biggr)\\ \dfrac{\partial^3 f}{\partial y \, \partial x^2} = \dfrac{\partial}{\partial y} \biggl( \dfrac{\partial^2 f}{\partial x^2} \biggr)\qquad \dfrac{\partial^3 f}{\partial x \, \partial y^2} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial^2 f}{\partial y^2} \biggr)\\ \dfrac{\partial^3 f}{\partial y^2 \, \partial x} = \dfrac{\partial}{\partial y} \biggl( \dfrac{\partial^2 f}{\partial y \, \partial x} \biggr)\qquad \dfrac{\partial^3 f}{\partial x^2 \, \partial y} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial^2 f}{\partial x \, \partial y} \biggr)\\ \dfrac{\partial^3 f}{\partial x \, \partial y \, \partial x} = \dfrac{\partial}{\partial x} \biggl( \dfrac{\partial^2 f}{\partial y \, \partial x} \biggr)\qquad \dfrac{\partial^3 f}{\partial y \, \partial x \, \partial y} = \dfrac{\partial}{\partial y} \biggl( \dfrac{\partial^2 f}{\partial x \, \partial y} \biggr)\\ \vdots \end{gather*}


width height 0.5pt

Example 2.12

Find the partial derivatives \(\dfrac{\partial f}{\partial x}\), \(\dfrac{\partial f}{\partial y}\), \(\dfrac{\partial^2 f}{\partial x^2}\), \(\dfrac{\partial^2 f}{\partial y^2}\), \(\dfrac{\partial^2 f}{\partial y \, \partial x}\) and \(\dfrac{\partial^2 f}{\partial x \, \partial y}\) for the function \(f(x,y) = e^{x^2 y} + xy^3\).

Solution: Proceeding as before, we have

\begin{alignat*}{2} \dfrac{\partial f}{\partial x} &= 2xy e^{x^2 y} + y^3\qquad\qquad & \dfrac{\partial f}{\partial y} &= x^2 e^{x^2 y} + 3xy^2\\ \dfrac{\partial^2 f}{\partial x^2} &= \dfrac{\partial}{\partial x} (2xy e^{x^2 y} + y^3)\qquad\qquad & \dfrac{\partial^2 f}{\partial y^2} &= \dfrac{\partial}{\partial y} (x^2 e^{x^2 y} + 3xy^2)\\ \phantom{\dfrac{\partial^2 f}{\partial x^2}} &= 2y e^{x^2 y} + 4x^2 y^2 e^{x^2 y}\qquad\qquad & \phantom{\dfrac{\partial^2 f}{\partial y^2}} &= x^4 e^{x^2 y} + 6xy\\ \dfrac{\partial^2 f}{\partial y \, \partial x} &= \dfrac{\partial}{\partial y} (2xy e^{x^2 y} + y^3)\qquad\qquad & \dfrac{\partial^2 f}{\partial x \, \partial y} &= \dfrac{\partial}{\partial x} (x^2 e^{x^2 y} + 3xy^2)\\ \phantom{\dfrac{\partial^2 f}{\partial y \, \partial x}} &= 2x e^{x^2 y} + 2x^3 y e^{x^2 y} + 3y^2\qquad\qquad & \phantom{\dfrac{\partial^2 f}{\partial x \, \partial y}} &= 2x e^{x^2 y} + 2x^3 y e^{x^2 y} + 3y^2 \end{alignat*}


width height 0.5pt

Higher-order partial derivatives that are taken with respect to different variables, such as \(\frac{\partial^2 f}{\partial y \, \partial x}\) and \(\frac{\partial^2 f}{\partial x \, \partial y}\), are called mixed partial derivatives. Notice in the above example that \(\frac{\partial^2 f}{\partial y \, \partial x} = \frac{\partial^2 f}{\partial x \, \partial y}\). It turns that this will usually be the case. Specifically, whenever both \(\frac{\partial^2 f}{\partial y \, \partial x}\) and \(\frac{\partial^2 f}{\partial x \, \partial y}\) are continuous at a point \((a,b)\), then they are equal at that point.[2] All the functions we will deal with will have continuous partial derivatives of all orders, so you can assume in the remainder of the text that

\[\frac{\partial^2 f}{\partial y \, \partial x} = \frac{\partial^2 f}{\partial x \, \partial y} ~~ \text{for all $(x,y)$ in the domain of $f$.}\]

In other words, it doesn’t matter in which order you take partial derivatives. This applies even to mixed partial derivatives of order \(3\) or higher.

The notation for partial derivatives varies. All of the following are equivalent:

\begin{gather*} \dfrac{\partial f}{\partial x}:~ \ssub{f}{x}(x,y) ~, \quad \ssub{f}{1}(x,y) ~, \quad \ssub{D}{x}(x,y) ~, \quad \ssub{D}{1}(x,y)\\ \dfrac{\partial f}{\partial y}:~ \ssub{f}{y}(x,y) ~, \quad \ssub{f}{2}(x,y) ~, \quad \ssub{D}{y}(x,y) ~, \quad \ssub{D}{2}(x,y)\\ \dfrac{\partial^2 f}{\partial x^2}:~ \ssub{f}{xx}(x,y) ~, \quad \ssub{f}{11}(x,y) ~, \quad \ssub{D}{xx}(x,y) ~, \quad \ssub{D}{11}(x,y)\\ \dfrac{\partial^2 f}{\partial y^2}:~ \ssub{f}{yy}(x,y) ~, \quad \ssub{f}{22}(x,y) ~, \quad \ssub{D}{yy}(x,y) ~, \quad \ssub{D}{22}(x,y)\\ \dfrac{\partial^2 f}{\partial y \, \partial x}: ~ \ssub{f}{xy}(x,y) ~, \quad \ssub{f}{12}(x,y) ~, \quad \ssub{D}{xy}(x,y) ~, \quad \ssub{D}{12}(x,y)\\ \dfrac{\partial^2 f}{\partial x \, \partial y}: ~ \ssub{f}{yx}(x,y) ~, \quad \ssub{f}{21}(x,y) ~, \quad \ssub{D}{yx}(x,y) ~, \quad \ssub{D}{21}(x,y) \end{gather*}
Exercises

A

For Exercises 1-16, find \(\frac{\partial f}{\partial x}\) and \(\frac{\partial f}{\partial y}\).

2

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

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

    2

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

  4. \(f(x,y) = \dfrac{x + 1}{y + 1}\)

    2

  5. \(f(x,y) = e^{xy} + xy\)

  6. \(f(x,y) = x^2 - y^2 + 6xy + 4x - 8y + 2\)

    2

  7. \(f(x,y) = x^4\)

  8. \(f(x,y) = x + 2y\)

    2

  9. \(f(x,y) = \sqrt{x^2 + y^2}\)

  10. \(f(x,y) = \sin(x+y)\)

    2

  11. \(f(x,y) = \sqrt[3]{x^2 + y + 4}\)

  12. \(f(x,y) = \dfrac{xy + 1}{x + y}\)

    2

  13. \(f(x,y) = e^{-(x^2 + y^2)}\)

  14. \(f(x,y) = \ln (xy)\)

    2

  15. \(f(x,y) = \sin(xy)\)

  16. \(f(x,y) = \tan(x+y)\)

For Exercises 17-26, find \(\frac{\partial^2 f}{\partial x^2}\), \(\frac{\partial^2 f}{\partial y^2}\) and \(\frac{\partial^2 f}{\partial y \, \partial x}\) (use Exercises 1-8, 14, 15).

2

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

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

    2

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

  4. \(f(x,y) = \dfrac{x + 1}{y + 1}\)

    2

  5. \(f(x,y) = e^{xy} + xy\)

  6. \(f(x,y) = x^2 - y^2 + 6xy + 4x - 8y + 2\)

    2

  7. \(f(x,y) = x^4\)

  8. \(f(x,y) = x + 2y\)

    2

  9. \(f(x,y) = \ln (xy)\)

  10. \(f(x,y) = \sin(xy)\)

B

  1. Show that the function \(f(x,y)=\sin(x+y) + \cos(x-y)\) satisfies the wave equation

    \[\frac{\partial^2 f}{\partial x^2} - \frac{\partial^2 f}{\partial y^2} = 0 ~.\]

    The wave equation is an example of a partial differential equation.

  2. Let \(u\) and \(v\) be twice-differentiable functions of a single variable, and let \(c\ne 0\) be a constant. Show that \(f(x,y)=u(x+cy)+v(x-cy)\) is a solution of the general one-dimensional wave equation[3]

    \[\frac{\partial^2 f}{\partial x^2} - \frac{1}{c^2}\,\frac{\partial^2 f}{\partial y^2} = 0 ~.\]


  1. It is not a Greek letter. The symbol was first used by the mathematicians A. Clairaut and L. Euler around 1740, to distinguish it from the letter \(d\) used for the “usual” derivative.
  2. See pp. 214-216 in tm for a proof.
  3. Conversely, it turns out that any solution must be of this form. See Ch. 1 in wei.