Differentiation of Functions of Several Variables

23 Partial Derivatives

Learning Objectives

  • Calculate the partial derivatives of a function of two variables.
  • Calculate the partial derivatives of a function of more than two variables.
  • Determine the higher-order derivatives of a function of two variables.
  • Explain the meaning of a partial differential equation and give an example.

Now that we have examined limits and continuity of functions of two variables, we can proceed to study derivatives. Finding derivatives of functions of two variables is the key concept in this chapter, with as many applications in mathematics, science, and engineering as differentiation of single-variable functions. However, we have already seen that limits and continuity of multivariable functions have new issues and require new terminology and ideas to deal with them. This carries over into differentiation as well.

Derivatives of a Function of Two Variables

When studying derivatives of functions of one variable, we found that one interpretation of the derivative is an instantaneous rate of change of y as a function of x. Leibniz notation for the derivative is dy\text{/}dx, which implies that y is the dependent variable and x is the independent variable. For a function z=f\left(x,y\right) of two variables, x and y are the independent variables and z is the dependent variable. This raises two questions right away: How do we adapt Leibniz notation for functions of two variables? Also, what is an interpretation of the derivative? The answer lies in partial derivatives.

Definition

Let f\left(x,y\right) be a function of two variables. Then the partial derivative of f with respect to x, written as \partial f\text{/}\partial x, or {f}_{x}, is defined as

\frac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}.

The partial derivative of f with respect to y, written as \partial f\text{/}\partial y, or {f}_{y}, is defined as

\frac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\frac{f\left(x,y+k\right)-f\left(x,y\right)}{k}.

This definition shows two differences already. First, the notation changes, in the sense that we still use a version of Leibniz notation, but the d in the original notation is replaced with the symbol \partial . (This rounded \text{``d''} is usually called “partial,” so \partial f\text{/}\partial x is spoken as the “partial of f with respect to x\text{.''}\right) This is the first hint that we are dealing with partial derivatives. Second, we now have two different derivatives we can take, since there are two different independent variables. Depending on which variable we choose, we can come up with different partial derivatives altogether, and often do.

Calculating Partial Derivatives from the Definition

Use the definition of the partial derivative as a limit to calculate \partial f\text{/}\partial x and \partial f\text{/}\partial y for the function

f\left(x,y\right)={x}^{2}-3xy+2{y}^{2}-4x+5y-12.

First, calculate f\left(x+h,y\right).

\begin{array}{cc}\hfill f\left(x+h,y\right)& ={\left(x+h\right)}^{2}-3\left(x+h\right)y+2{y}^{2}-4\left(x+h\right)+5y-12\hfill \\ & ={x}^{2}+2xh+{h}^{2}-3xy-3hy+2{y}^{2}-4x-4h+5y-12.\hfill \end{array}

Next, substitute this into (Figure) and simplify:

\begin{array}{cc}\hfill \frac{\partial f}{\partial x}& =\underset{h\to 0}{\text{lim}}\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{\left({x}^{2}+2xh+{h}^{2}-3xy-3hy+2{y}^{2}-4x-4h+5y-12\right)-\left({x}^{2}-3xy+2{y}^{2}-4x+5y-12\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{{x}^{2}+2xh+{h}^{2}-3xy-3hy+2{y}^{2}-4x-4h+5y-12-{x}^{2}+3xy-2{y}^{2}+4x-5y+12}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{2xh+{h}^{2}-3hy-4h}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{h\left(2x+h-3y-4\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\left(2x+h-3y-4\right)\hfill \\ & =2x-3y-4.\hfill \end{array}

To calculate \frac{\partial f}{\partial y}, first calculate f\left(x,y+h\right)\text{:}

\begin{array}{cc}\hfill f\left(x+h,y\right)& ={x}^{2}-3x\left(y+h\right)+2{\left(y+h\right)}^{2}-4x+5\left(y+h\right)-12\hfill \\ & ={x}^{2}-3xy-3xh+2{y}^{2}+4yh+2{h}^{2}-4x+5y+5h-12.\hfill \end{array}

Next, substitute this into (Figure) and simplify:

\begin{array}{cc}\hfill \frac{\partial f}{\partial y}& =\underset{h\to 0}{\text{lim}}\frac{f\left(x,y+h\right)-f\left(x,y\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{\left({x}^{2}-3xy-3xh+2{y}^{2}+4yh+2{h}^{2}-4x+5y+5h-12\right)-\left({x}^{2}-3xy+2{y}^{2}-4x+5y-12\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{{x}^{2}-3xy-3xh+2{y}^{2}+4yh+2{h}^{2}-4x+5y+5h-12-{x}^{2}+3xy-2{y}^{2}+4x-5y+12}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{-3xh+4yh+2{h}^{2}+5h}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\frac{h\left(-3x+4y+2h+5\right)}{h}\hfill \\ & =\underset{h\to 0}{\text{lim}}\left(-3x+4y+2h+5\right)\hfill \\ & =-3x+4y+5.\hfill \end{array}

Use the definition of the partial derivative as a limit to calculate \partial f\text{/}\partial x and \partial f\text{/}\partial y for the function

f\left(x,y\right)=4{x}^{2}+2xy-{y}^{2}+3x-2y+5.

\frac{\partial f}{\partial x}=8x+2y+3,\phantom{\rule{1em}{0ex}}\frac{\partial f}{\partial y}=2x-2y-2

Hint

Use (Figure) and (Figure) from the definition of partial derivatives.

The idea to keep in mind when calculating partial derivatives is to treat all independent variables, other than the variable with respect to which we are differentiating, as constants. Then proceed to differentiate as with a function of a single variable. To see why this is true, first fix y and define g\left(x\right)=f\left(x,y\right) as a function of x. Then

{g}^{\prime }\left(x\right)=\underset{h\to 0}{\text{lim}}\frac{g\left(x+h\right)-g\left(x\right)}{h}=\underset{h\to 0}{\text{lim}}\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}=\frac{\partial f}{\partial x}.

The same is true for calculating the partial derivative of f with respect to y. This time, fix x and define h\left(y\right)=f\left(x,y\right) as a function of y. Then

{h}^{\prime }\left(x\right)=\underset{k\to 0}{\text{lim}}\frac{h\left(x+k\right)-h\left(x\right)}{k}=\underset{k\to 0}{\text{lim}}\frac{f\left(x,y+k\right)-f\left(x,y\right)}{k}=\frac{\partial f}{\partial y}.

All differentiation rules from Introduction to Derivatives apply.

Calculating Partial Derivatives

Calculate \partial f\text{/}\partial x and \partial f\text{/}\partial y for the following functions by holding the opposite variable constant then differentiating:

  1. f\left(x,y\right)={x}^{2}-3xy+2{y}^{2}-4x+5y-12
  2. g\left(x,y\right)=\text{sin}\left({x}^{2}y-2x+4\right)
  1. To calculate \partial f\text{/}\partial x, treat the variable y as a constant. Then differentiate f\left(x,y\right) with respect to x using the sum, difference, and power rules:
    \begin{array}{cc}\hfill \frac{\partial f}{\partial x}& =\frac{\partial }{\partial x}\left[{x}^{2}-3xy+2{y}^{2}-4x+5y-12\right]\hfill \\ & =\frac{\partial }{\partial x}\left[{x}^{2}\right]-\frac{\partial }{\partial x}\left[3xy\right]+\frac{\partial }{\partial x}\left[2{y}^{2}\right]-\frac{\partial }{\partial x}\left[4x\right]+\frac{\partial }{\partial x}\left[5y\right]-\frac{\partial }{\partial x}\left[12\right]\hfill \\ & =2x-3y+0-4+0-0\hfill \\ & =2x-3y-4.\hfill \end{array}


    The derivatives of the third, fifth, and sixth terms are all zero because they do not contain the variable x, so they are treated as constant terms. The derivative of the second term is equal to the coefficient of x, which is -3y. Calculating \partial f\text{/}\partial y\text{:}

    \begin{array}{cc}\hfill \frac{\partial f}{\partial y}& =\frac{\partial }{\partial y}\left[{x}^{2}-3xy+2{y}^{2}-4x+5y-12\right]\hfill \\ & =\frac{\partial }{\partial y}\left[{x}^{2}\right]-\frac{\partial }{\partial y}\left[3xy\right]+\frac{\partial }{\partial y}\left[2{y}^{2}\right]-\frac{\partial }{\partial y}\left[4x\right]+\frac{\partial }{\partial y}\left[5y\right]-\frac{\partial }{\partial y}\left[12\right]\hfill \\ & =-3x+4y-0+5-0\hfill \\ & =-3x+4y+5.\hfill \end{array}


    These are the same answers obtained in (Figure).

  2. To calculate \partial g\text{/}\partial x, treat the variable y as a constant. Then differentiate g\left(x,y\right) with respect to x using the chain rule and power rule:
    \begin{array}{cc}\hfill \frac{\partial g}{\partial x}& =\frac{\partial }{\partial x}\left[\text{sin}\left({x}^{2}y-2x+4\right)\right]\hfill \\ & =\text{cos}\left({x}^{2}y-2x+4\right)\frac{\partial }{\partial x}\left[{x}^{2}y-2x+4\right]\hfill \\ & =\left(2xy-2\right)\text{cos}\left({x}^{2}y-2x+4\right).\hfill \end{array}


    To calculate \partial g\text{/}\partial y, treat the variable x as a constant. Then differentiate g\left(x,y\right) with respect to y using the chain rule and power rule:

    \begin{array}{cc}\hfill \frac{\partial g}{\partial y}& =\frac{\partial }{\partial y}\left[\text{sin}\left({x}^{2}y-2x+4\right)\right]\hfill \\ & =\text{cos}\left({x}^{2}y-2x+4\right)\frac{\partial }{\partial y}\left[{x}^{2}y-2x+4\right]\hfill \\ & ={x}^{2}\text{cos}\left({x}^{2}y-2x+4\right).\hfill \end{array}

Calculate \partial f\text{/}\partial x and \partial f\text{/}\partial y for the function f\left(x,y\right)=\text{tan}\left({x}^{3}-3{x}^{2}{y}^{2}+2{y}^{4}\right) by holding the opposite variable constant, then differentiating.

\begin{array}{c}\frac{\partial f}{\partial x}=\left(3{x}^{2}-6x{y}^{2}\right){\text{sec}}^{2}\left({x}^{3}-3{x}^{2}{y}^{2}+2{y}^{4}\right)\hfill \\ \frac{\partial f}{\partial y}=\left(-6{x}^{2}y+8{y}^{3}\right){\text{sec}}^{2}\left({x}^{3}-3{x}^{2}{y}^{2}+2{y}^{4}\right)\hfill \end{array}

Hint

Use (Figure) and (Figure) from the definition of partial derivatives.

How can we interpret these partial derivatives? Recall that the graph of a function of two variables is a surface in {ℝ}^{3}. If we remove the limit from the definition of the partial derivative with respect to x, the difference quotient remains:

\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}.

This resembles the difference quotient for the derivative of a function of one variable, except for the presence of the y variable. (Figure) illustrates a surface described by an arbitrary function z=f\left(x,y\right).

Secant line passing through the points \left(x,y,f\left(x,y\right)\right) and \left(x+h,y,f\left(x+h,y\right)\right).

A complicated curve in xyz space with a secant line through the points (x, y, f(x, y)) and (x + h, y, f(x + h, y)).

In (Figure), the value of h is positive. If we graph f\left(x,y\right) and f\left(x+h,y\right) for an arbitrary point \left(x,y\right), then the slope of the secant line passing through these two points is given by

\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}.

This line is parallel to the x\text{-axis.} Therefore, the slope of the secant line represents an average rate of change of the function f as we travel parallel to the x\text{-axis.} As h approaches zero, the slope of the secant line approaches the slope of the tangent line.

If we choose to change y instead of x by the same incremental value h, then the secant line is parallel to the y\text{-axis} and so is the tangent line. Therefore, \partial f\text{/}\partial x represents the slope of the tangent line passing through the point \left(x,y,f\left(x,y\right)\right) parallel to the x\text{-axis} and \partial f\text{/}\partial y represents the slope of the tangent line passing through the point \left(x,y,f\left(x,y\right)\right) parallel to the y\text{-axis}. If we wish to find the slope of a tangent line passing through the same point in any other direction, then we need what are called directional derivatives, which we discuss in Directional Derivatives and the Gradient.

We now return to the idea of contour maps, which we introduced in Functions of Several Variables. We can use a contour map to estimate partial derivatives of a function g\left(x,y\right).

Partial Derivatives from a Contour Map

Use a contour map to estimate \partial g\text{/}\partial x at the point \left(\sqrt{5},0\right) for the function g\left(x,y\right)=\sqrt{9-{x}^{2}-{y}^{2}}.

The following graph represents a contour map for the function g\left(x,y\right)=\sqrt{9-{x}^{2}-{y}^{2}}.

Contour map for the function g\left(x,y\right)=\sqrt{9-{x}^{2}-{y}^{2}}, using \text{c}\phantom{\rule{0.2em}{0ex}}=0,1,2, and 3 \left(c=3 corresponds to the origin).

A series of concentric circles with the center the origin. The first is marked c = 0 and has radius 3; the second is marked c = 1 and has radius slightly less than 3; and the third is marked c = 2 and has radius slightly more than 2. The graph is marked with the equation g(x, y) = the square root of the quantity (9 – x2 – y2).

The inner circle on the contour map corresponds to c=2 and the next circle out corresponds to c=1. The first circle is given by the equation 2=\sqrt{9-{x}^{2}-{y}^{2}}; the second circle is given by the equation 1=\sqrt{9-{x}^{2}-{y}^{2}}. The first equation simplifies to {x}^{2}+{y}^{2}=5 and the second equation simplifies to {x}^{2}+{y}^{2}=8. The x\text{-intercept} of the first circle is \left(\sqrt{5},0\right) and the x\text{-intercept} of the second circle is \left(2\sqrt{2},0\right). We can estimate the value of \partial g\text{/}\partial x evaluated at the point \left(\sqrt{5},0\right) using the slope formula:

{\frac{\partial g}{\partial x}|}_{\left(x,y\right)=\left(\sqrt{5},0\right)}\approx \frac{g\left(\sqrt{5},0\right)-g\left(2\sqrt{2},0\right)}{\sqrt{5}-2\sqrt{2}}=\frac{2-1}{\sqrt{5}-2\sqrt{2}}=\frac{1}{\sqrt{5}-2\sqrt{2}}\approx -1.688.

To calculate the exact value of \partial g\text{/}\partial x evaluated at the point \left(\sqrt{5},0\right), we start by finding \partial g\text{/}\partial x using the chain rule. First, we rewrite the function as g\left(x,y\right)=\sqrt{9-{x}^{2}-{y}^{2}}={\left(9-{x}^{2}-{y}^{2}\right)}^{1\text{/}2} and then differentiate with respect to x while holding y constant:

\frac{\partial g}{\partial x}=\frac{1}{2}{\left(9-{x}^{2}-{y}^{2}\right)}^{-1\text{/}2}\left(-2x\right)=-\frac{x}{\sqrt{9-{x}^{2}-{y}^{2}}}.

Next, we evaluate this expression using x=\sqrt{5} and y=0\text{:}

{\frac{\partial g}{\partial x}|}_{\left(x,y\right)=\left(\sqrt{5},0\right)}=-\frac{\sqrt{5}}{\sqrt{9-{\left(\sqrt{5}\right)}^{2}-{\left(0\right)}^{2}}}=-\frac{\sqrt{5}}{\sqrt{4}}=-\frac{\sqrt{5}}{2}\approx -1.118.

The estimate for the partial derivative corresponds to the slope of the secant line passing through the points \left(\sqrt{5},0,g\left(\sqrt{5},0\right)\right) and \left(2\sqrt{2},0,g\left(2\sqrt{2},0\right)\right). It represents an approximation to the slope of the tangent line to the surface through the point \left(\sqrt{5},0,g\left(\sqrt{5},0\right)\right), which is parallel to the x\text{-axis}.

Use a contour map to estimate \partial f\text{/}\partial y at point \left(0,\sqrt{2}\right) for the function

f\left(x,y\right)={x}^{2}-{y}^{2}.

Compare this with the exact answer.

Using the curves corresponding to c=-2\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}c=-3, we obtain

{\frac{\partial f}{\partial y}|}_{\left(x,y\right)=\left(0,\sqrt{2}\right)}\approx \frac{f\left(0,\sqrt{3}\right)-f\left(0,\sqrt{2}\right)}{\sqrt{3}-\sqrt{2}}=\frac{-3-\left(-2\right)}{\sqrt{3}-\sqrt{2}}·\frac{\sqrt{3}+\sqrt{2}}{\sqrt{3}+\sqrt{2}}=\text{−}\sqrt{3}-\sqrt{2}\approx -3.146.

The exact answer is

{\frac{\partial f}{\partial y}|}_{\left(x,y\right)=\left(0,\sqrt{2}\right)}=\left({-2y|}_{\left(x,y\right)=\left(0,\sqrt{2}\right)}=-2\sqrt{2}\approx -2.828.

Hint

Create a contour map for f using values of c from -3\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}3. Which of these curves passes through point \left(0,\sqrt{2}\right)?

Functions of More Than Two Variables

Suppose we have a function of three variables, such as w=f\left(x,y,z\right). We can calculate partial derivatives of w with respect to any of the independent variables, simply as extensions of the definitions for partial derivatives of functions of two variables.

Definition

Let f\left(x,y,z\right) be a function of three variables. Then, the partial derivative of f with respect to x, written as \partial f\text{/}\partial x, or {f}_{x}, is defined to be

\frac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\frac{f\left(x+h,y,z\right)-f\left(x,y,z\right)}{h}.

The partial derivative of f with respect to y, written as \partial f\text{/}\partial y, or {f}_{y}, is defined to be

\frac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\frac{f\left(x,y+k,z\right)-f\left(x,y,z\right)}{k}.

The partial derivative of f with respect to z, written as \partial f\text{/}\partial z, or {f}_{z}, is defined to be

\frac{\partial f}{\partial z}=\underset{m\to 0}{\text{lim}}\frac{f\left(x,y,z+m\right)-f\left(x,y,z\right)}{m}.

We can calculate a partial derivative of a function of three variables using the same idea we used for a function of two variables. For example, if we have a function f of x,y,\text{and}\phantom{\rule{0.2em}{0ex}}z, and we wish to calculate \partial f\text{/}\partial x, then we treat the other two independent variables as if they are constants, then differentiate with respect to x.

Calculating Partial Derivatives for a Function of Three Variables

Use the limit definition of partial derivatives to calculate \partial f\text{/}\partial x for the function

f\left(x,y,z\right)={x}^{2}-3xy+2{y}^{2}-4xz+5y{z}^{2}-12x+4y-3z.

Then, find \partial f\text{/}\partial y and \partial f\text{/}\partial z by setting the other two variables constant and differentiating accordingly.

We first calculate \partial f\text{/}\partial x using (Figure), then we calculate the other two partial derivatives by holding the remaining variables constant. To use the equation to find \partial f\text{/}\partial x, we first need to calculate f\left(x+h,y,z\right)\text{:}

\begin{array}{cc}\hfill f\left(x+h,y,z\right)& ={\left(x+h\right)}^{2}-3\left(x+h\right)y+2{y}^{2}-4\left(x+h\right)z+5y{z}^{2}-12\left(x+h\right)+4y-3z\hfill \\ & ={x}^{2}+2xh+{h}^{2}-3xy-3xh+2{y}^{2}-4xz-4hz+5y{z}^{2}-12x-12h+4y-3z\hfill \end{array}

and recall that f\left(x,y,z\right)={x}^{2}-3xy+2{y}^{2}-4zx+5y{z}^{2}-12x+4y-3z. Next, we substitute these two expressions into the equation:

\begin{array}{cc}\hfill \frac{\partial f}{\partial x}& =\underset{h\to 0}{\text{lim}}\left[\frac{{x}^{2}+2xh+{h}^{2}-3xy-3hy+2{y}^{2}-4xz-4hz+5y{z}^{2}-12x-12h+4y-3z}{h}\hfill \\ & \phantom{\rule{0.5em}{0ex}}-\frac{{x}^{2}-3xy+2{y}^{2}-4xz+5y{z}^{2}-12x+4y-3z}{h}\right]\hfill \\ & =\underset{h\to 0}{\text{lim}}\left[\frac{2xh+{h}^{2}-3hy-4hz-12h}{h}\right]\hfill \\ & =\underset{h\to 0}{\text{lim}}\left[\frac{h\left(2x+h-3y-4z-12\right)}{h}\right]\hfill \\ & =\underset{h\to 0}{\text{lim}}\left(2x+h-3y-4z-12\right)\hfill \\ & =2x-3y-4z-12.\hfill \end{array}

Then we find \partial f\text{/}\partial y by holding x\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}z constant. Therefore, any term that does not include the variable y is constant, and its derivative is zero. We can apply the sum, difference, and power rules for functions of one variable:

\begin{array}{c}\frac{\partial }{\partial y}\left[{x}^{2}-3xy+2{y}^{2}-4xz+5y{z}^{2}-12x+4y-3z\right]\hfill \\ =\frac{\partial }{\partial y}\left[{x}^{2}\right]-\frac{\partial }{\partial y}\left[3xy\right]+\frac{\partial }{\partial y}\left[2{y}^{2}\right]-\frac{\partial }{\partial y}\left[4xz\right]+\frac{\partial }{\partial y}\left[5y{z}^{2}\right]-\frac{\partial }{\partial y}\left[12x\right]+\frac{\partial }{\partial y}\left[4y\right]-\frac{\partial }{\partial y}\left[3z\right]\hfill \\ =0-3x+4y-0+5{z}^{2}-0+4-0\hfill \\ =-3x+4y+5{z}^{2}+4.\hfill \end{array}

To calculate \partial f\text{/}\partial z, we hold x and y constant and apply the sum, difference, and power rules for functions of one variable:

\begin{array}{c}\frac{\partial }{\partial z}\left[{x}^{2}-3xy+2{y}^{2}-4xz+5y{z}^{2}-12x+4y-3z\right]\hfill \\ =\frac{\partial }{\partial z}\left[{x}^{2}\right]-\frac{\partial }{\partial z}\left[3xy\right]+\frac{\partial }{\partial z}\left[2{y}^{2}\right]-\frac{\partial }{\partial z}\left[4xz\right]+\frac{\partial }{\partial z}\left[5y{z}^{2}\right]-\frac{\partial }{\partial z}\left[12x\right]+\frac{\partial }{\partial z}\left[4y\right]-\frac{\partial }{\partial z}\left[3z\right]\hfill \\ =0-0+0-4x+10yz-0+0-3\hfill \\ =-4x+10yz-3.\hfill \end{array}

Use the limit definition of partial derivatives to calculate \partial f\text{/}\partial x for the function

f\left(x,y,z\right)=2{x}^{2}-4{x}^{2}y+2{y}^{2}+5x{z}^{2}-6x+3z-8.

Then find \partial f\text{/}\partial y and \partial f\text{/}\partial z by setting the other two variables constant and differentiating accordingly.

\frac{\partial f}{\partial x}=4x-8xy+5{z}^{2}-6,\phantom{\rule{1em}{0ex}}\frac{\partial f}{\partial y}=-4{x}^{2}+4y,\phantom{\rule{1em}{0ex}}\frac{\partial f}{\partial z}=10xz+3

Hint

Use the strategy in the preceding example.

Calculating Partial Derivatives for a Function of Three Variables

Calculate the three partial derivatives of the following functions.

  1. f\left(x,y,z\right)=\frac{{x}^{2}y-4xz+{y}^{2}}{x-3yz}
  2. g\left(x,y,z\right)=\text{sin}\left({x}^{2}y-z\right)+\text{cos}\left({x}^{2}-yz\right)

In each case, treat all variables as constants except the one whose partial derivative you are calculating.

  1. \begin{array}{cc}\hfill \frac{\partial f}{\partial x}& =\frac{\partial }{\partial x}\left[\frac{{x}^{2}y-4xz+{y}^{2}}{x-3yz}\right]\hfill \\ & =\frac{\frac{\partial }{\partial x}\left({x}^{2}y-4xz+{y}^{2}\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\frac{\partial }{\partial x}\left(x-3yz\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{\left(2xy-4z\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\left(1\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{2{x}^{2}y-6x{y}^{2}z-4xz+12y{z}^{2}-{x}^{2}y+4xz-{y}^{2}}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{{x}^{2}y-6x{y}^{2}z-4xz+12y{z}^{2}+4xz-{y}^{2}}{{\left(x-3yz\right)}^{2}}\hfill \end{array}
    \begin{array}{cc}\hfill \frac{\partial f}{\partial y}& =\frac{\partial }{\partial y}\left[\frac{{x}^{2}y-4xz+{y}^{2}}{x-3yz}\right]\hfill \\ & =\frac{\frac{\partial }{\partial y}\left({x}^{2}y-4xz+{y}^{2}\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\frac{\partial }{\partial y}\left(x-3yz\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{\left({x}^{2}+2y\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\left(-3z\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{{x}^{3}-3{x}^{2}yz+2xy-6{y}^{2}z+3{x}^{2}yz-12x{z}^{2}+3{y}^{2}z}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{{x}^{3}+2xy-3{y}^{2}z-12x{z}^{2}}{{\left(x-3yz\right)}^{2}}\hfill \end{array}
    \begin{array}{cc}\hfill \frac{\partial f}{\partial z}& =\frac{\partial }{\partial z}\left[\frac{{x}^{2}y-4xz+{y}^{2}}{x-3yz}\right]\hfill \\ & =\frac{\frac{\partial }{\partial z}\left({x}^{2}y-4xz+{y}^{2}\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\frac{\partial }{\partial z}\left(x-3yz\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{\left(-4x\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\left(-3y\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{-4{x}^{2}+12xyz+3{x}^{2}{y}^{2}-12xyz+3{y}^{3}}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{-4{x}^{2}+3{x}^{2}{y}^{2}+3{y}^{3}}{{\left(x-3yz\right)}^{2}}\hfill \end{array}
  2. \begin{array}{cc}\hfill \frac{\partial f}{\partial x}& =\frac{\partial }{\partial x}\left[\text{sin}\left({x}^{2}y-z\right)+\text{cos}\left({x}^{2}-yz\right)\right]\hfill \\ & =\left(\text{cos}\left({x}^{2}y-z\right)\right)\frac{\partial }{\partial x}\left({x}^{2}y-z\right)-\left(\text{sin}\left({x}^{2}-yz\right)\right)\frac{\partial }{\partial x}\left({x}^{2}-yz\right)\hfill \\ & =2xy\phantom{\rule{0.2em}{0ex}}\text{cos}\left({x}^{2}y-z\right)-2x\phantom{\rule{0.2em}{0ex}}\text{sin}\left({x}^{2}-yz\right)\hfill \\ \frac{\partial f}{\partial y}\hfill & =\frac{\partial }{\partial y}\left[\text{sin}\left({x}^{2}y-z\right)+\text{cos}\left({x}^{2}-yz\right)\right]\hfill \\ & =\left(\text{cos}\left({x}^{2}y-z\right)\right)\frac{\partial }{\partial y}\left({x}^{2}y-z\right)-\left(\text{sin}\left({x}^{2}-yz\right)\right)\frac{\partial }{\partial y}\left({x}^{2}-yz\right)\hfill \\ & ={x}^{2}\text{cos}\left({x}^{2}y-z\right)+z\phantom{\rule{0.2em}{0ex}}\text{sin}\left({x}^{2}-yz\right)\hfill \\ \frac{\partial f}{\partial z}\hfill & =\frac{\partial }{\partial z}\left[\text{sin}\left({x}^{2}y-z\right)+\text{cos}\left({x}^{2}-yz\right)\right]\hfill \\ & =\left(\text{cos}\left({x}^{2}y-z\right)\right)\frac{\partial }{\partial z}\left({x}^{2}y-z\right)-\left(\text{sin}\left({x}^{2}-yz\right)\right)\frac{\partial }{\partial z}\left({x}^{2}-yz\right)\hfill \\ & =\text{−}\text{cos}\left({x}^{2}y-z\right)+y\phantom{\rule{0.2em}{0ex}}\text{sin}\left({x}^{2}-yz\right)\hfill \end{array}

Calculate \partial f\text{/}\partial x, \partial f\text{/}\partial y, and \partial f\text{/}\partial z for the function f\left(x,y,z\right)=\text{sec}\left({x}^{2}y\right)-\text{tan}\left({x}^{3}y{z}^{2}\right).

\begin{array}{c}\frac{\partial f}{\partial x}=2xy\phantom{\rule{0.2em}{0ex}}\text{sec}\left({x}^{2}y\right)\text{tan}\left({x}^{2}y\right)-3{x}^{2}y{z}^{2}{\text{sec}}^{2}\left({x}^{3}y{z}^{2}\right)\hfill \\ \frac{\partial f}{\partial y}={x}^{2}\text{sec}\left({x}^{2}y\right)\text{tan}\left({x}^{2}y\right)-{x}^{3}{z}^{2}{\text{sec}}^{2}\left({x}^{3}y{z}^{2}\right)\hfill \\ \frac{\partial f}{\partial z}=-2{x}^{3}yz\phantom{\rule{0.2em}{0ex}}{\text{sec}}^{2}\left({x}^{3}y{z}^{2}\right)\hfill \end{array}

Hint

Use the strategy in the preceding example.

Higher-Order Partial Derivatives

Consider the function

f\left(x,y\right)=2{x}^{3}-4x{y}^{2}+5{y}^{3}-6xy+5x-4y+12.

Its partial derivatives are

\frac{\partial f}{\partial x}=6{x}^{2}-4{y}^{2}-6y+5\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}\frac{\partial f}{\partial y}=-8xy+15{y}^{2}-6x-4.

Each of these partial derivatives is a function of two variables, so we can calculate partial derivatives of these functions. Just as with derivatives of single-variable functions, we can call these second-order derivatives, third-order derivatives, and so on. In general, they are referred to as higher-order partial derivatives. There are four second-order partial derivatives for any function (provided they all exist):

\frac{{\partial }^{2}f}{\partial {x}^{2}}=\frac{\partial }{\partial x}\left[\frac{\partial f}{\partial x}\right],\phantom{\rule{1em}{0ex}}\frac{{\partial }^{2}f}{\partial x\partial y}=\frac{\partial }{\partial x}\left[\frac{\partial f}{\partial y}\right],\phantom{\rule{1em}{0ex}}\frac{{\partial }^{2}f}{\partial y\partial x}=\frac{\partial }{\partial y}\left[\frac{\partial f}{\partial x}\right],\phantom{\rule{1em}{0ex}}\frac{{\partial }^{2}f}{\partial {y}^{2}}=\frac{\partial }{\partial y}\left[\frac{\partial f}{\partial y}\right].

An alternative notation for each is {f}_{xx},{f}_{yx},{f}_{xy}, and {f}_{yy}, respectively. Higher-order partial derivatives calculated with respect to different variables, such as {f}_{xy} and {f}_{yx}, are commonly called mixed partial derivatives.

Calculating Second Partial Derivatives

Calculate all four second partial derivatives for the function

f\left(x,y\right)=x{e}^{-3y}+\text{sin}\left(2x-5y\right).

To calculate {\partial }^{2}f\text{/}d{x}^{2} and {\partial }^{2}f\text{/}\partial y\partial x, we first calculate \partial f\text{/}\partial x\text{:}

\frac{\partial f}{\partial x}={e}^{-3y}+2\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right).

To calculate {\partial }^{2}f\text{/}d{x}^{2}, differentiate \partial f\text{/}\partial x with respect to x\text{:}

\begin{array}{cc}\hfill \frac{{\partial }^{2}f}{\partial {x}^{2}}& =\frac{\partial }{\partial x}\left[\frac{\partial f}{\partial x}\right]\hfill \\ & =\frac{\partial }{\partial x}\left[{e}^{-3y}+2\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right)\right]\hfill \\ & =-4\phantom{\rule{0.2em}{0ex}}\text{sin}\left(2x-5y\right).\hfill \end{array}

To calculate {\partial }^{2}f\text{/}\partial y\partial x, differentiate \partial f\text{/}\partial x with respect to y\text{:}

\begin{array}{cc}\hfill \frac{{\partial }^{2}f}{\partial y\partial x}& =\frac{\partial }{\partial y}\left[\frac{\partial f}{\partial x}\right]\hfill \\ & =\frac{\partial }{\partial y}\left[{e}^{-3y}+2\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right)\right]\hfill \\ & =-3{e}^{-3y}+10\phantom{\rule{0.2em}{0ex}}\text{sin}\left(2x-5y\right).\hfill \end{array}

To calculate {\partial }^{2}f\text{/}\partial x\partial y and {\partial }^{2}f\text{/}d{y}^{2}, first calculate \partial f\text{/}\partial y\text{:}

\frac{\partial f}{\partial y}=-3x{e}^{-3y}-5\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right).

To calculate {\partial }^{2}f\text{/}\partial x\partial y, differentiate \partial f\text{/}\partial y with respect to x\text{:}

\begin{array}{cc}\hfill \frac{{\partial }^{2}f}{\partial x\partial y}& =\frac{\partial }{\partial x}\left[\frac{\partial f}{\partial y}\right]\hfill \\ & =\frac{\partial }{\partial x}\left[-3x{e}^{-3y}-5\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right)\right]\hfill \\ & =-3{e}^{-3y}+10\phantom{\rule{0.2em}{0ex}}\text{sin}\left(2x-5y\right).\hfill \end{array}

To calculate {\partial }^{2}f\text{/}\partial {y}^{2}, differentiate \partial f\text{/}\partial y with respect to y\text{:}

\begin{array}{cc}\hfill \frac{{\partial }^{2}f}{\partial {y}^{2}}& =\frac{\partial }{\partial y}\left[\frac{\partial f}{\partial y}\right]\hfill \\ & =\frac{\partial }{\partial y}\left[-3x{e}^{-3y}-5\phantom{\rule{0.2em}{0ex}}\text{cos}\left(2x-5y\right)\right]\hfill \\ & =9x{e}^{-3y}-25\phantom{\rule{0.2em}{0ex}}\text{sin}\left(2x-5y\right).\hfill \end{array}

Calculate all four second partial derivatives for the function

f\left(x,y\right)=\text{sin}\left(3x-2y\right)+\text{cos}\left(x+4y\right).

\begin{array}{c}\frac{{\partial }^{2}f}{\partial {x}^{2}}=-9\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3x-2y\right)-\text{cos}\left(x+4y\right)\hfill \\ \frac{{\partial }^{2}f}{\partial x\partial y}=6\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3x-2y\right)-4\phantom{\rule{0.2em}{0ex}}\text{cos}\left(x+4y\right)\hfill \\ \frac{{\partial }^{2}f}{\partial y\partial x}=6\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3x-2y\right)-4\phantom{\rule{0.2em}{0ex}}\text{cos}\left(x+4y\right)\hfill \\ \frac{{\partial }^{2}f}{\partial {y}^{2}}=-4\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3x-2y\right)-16\phantom{\rule{0.2em}{0ex}}\text{cos}\left(x+4y\right)\hfill \end{array}

Hint

Follow the same steps as in the previous example.

At this point we should notice that, in both (Figure) and the checkpoint, it was true that {\partial }^{2}f\text{/}\partial x\partial y={\partial }^{2}f\text{/}\partial y\partial x. Under certain conditions, this is always true. In fact, it is a direct consequence of the following theorem.

Equality of Mixed Partial Derivatives (Clairaut’s Theorem)

Suppose that f\left(x,y\right) is defined on an open disk D that contains the point \left(a,b\right). If the functions {f}_{xy} and {f}_{yx} are continuous on D, then {f}_{xy}={f}_{yx}.

Clairaut’s theorem guarantees that as long as mixed second-order derivatives are continuous, the order in which we choose to differentiate the functions (i.e., which variable goes first, then second, and so on) does not matter. It can be extended to higher-order derivatives as well. The proof of Clairaut’s theorem can be found in most advanced calculus books.

Two other second-order partial derivatives can be calculated for any function f\left(x,y\right). The partial derivative {f}_{xx} is equal to the partial derivative of {f}_{x} with respect to x, and {f}_{yy} is equal to the partial derivative of {f}_{y} with respect to y.

Partial Differential Equations

In Introduction to Differential Equations, we studied differential equations in which the unknown function had one independent variable. A partial differential equation is an equation that involves an unknown function of more than one independent variable and one or more of its partial derivatives. Examples of partial differential equations are

{u}_{t}={c}^{2}\left({u}_{xx}+{u}_{yy}\right)

(heat equation in two dimensions)

{u}_{tt}={c}^{2}\left({u}_{xx}+{u}_{yy}\right)

(wave equation in two dimensions)

{u}_{xx}+{u}_{yy}=0

(Laplace’s equation in two dimensions)

In the first two equations, the unknown function u has three independent variables—t,x,\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}y—and c is an arbitrary constant. The independent variables x\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}y are considered to be spatial variables, and the variable t represents time. In Laplace’s equation, the unknown function u has two independent variables x\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}y.

A Solution to the Wave Equation

Verify that

u\left(x,y,t\right)=5\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)

is a solution to the wave equation

{u}_{tt}=4\left({u}_{xx}+{u}_{yy}\right).

First, we calculate {u}_{tt},{u}_{xx}, and {u}_{yy}\text{:}

\begin{array}{ccc}\hfill {u}_{tt}& =\hfill & \frac{\partial }{\partial t}\left[\frac{\partial u}{\partial t}\right]\hfill \\ & =\hfill & \frac{\partial }{\partial t}\left[5\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\left(-10\pi \phantom{\rule{0.2em}{0ex}}\text{sin}\left(10\pi t\right)\right)\right]\hfill \\ & =\hfill & \frac{\partial }{\partial t}\left[-50\pi \phantom{\rule{0.2em}{0ex}}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{sin}\left(10\pi t\right)\right]\hfill \\ & =\hfill & -500{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\hfill \\ {u}_{xx}\hfill & =\hfill & \frac{\partial }{\partial x}\left[\frac{\partial u}{\partial x}\right]\hfill \\ & =\hfill & \frac{\partial }{\partial x}\left[15\pi \phantom{\rule{0.2em}{0ex}}\text{cos}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\right]\hfill \\ & =\hfill & -45{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\hfill \\ {u}_{yy}\hfill & =\hfill & \frac{\partial }{\partial y}\left[\frac{\partial u}{\partial y}\right]\hfill \\ & =\hfill & \frac{\partial }{\partial y}\left[5\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3\pi x\right)\left(4\pi \phantom{\rule{0.2em}{0ex}}\text{cos}\left(4\pi y\right)\right)\text{cos}\left(10\pi t\right)\right]\hfill \\ & =\hfill & \frac{\partial }{\partial y}\left[20\pi \phantom{\rule{0.2em}{0ex}}\text{sin}\left(3\pi x\right)\text{cos}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\right]\hfill \\ & =\hfill & -80{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right).\hfill \end{array}

Next, we substitute each of these into the right-hand side of (Figure) and simplify:

\begin{array}{cc}\hfill 4\left({u}_{xx}+{u}_{yy}\right)& =4\left(-45{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)+-80{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\right)\hfill \\ & =4\left(-125{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\right)\hfill \\ & =-500{\pi }^{2}\text{sin}\left(3\pi x\right)\text{sin}\left(4\pi y\right)\text{cos}\left(10\pi t\right)\hfill \\ & ={u}_{tt}.\hfill \end{array}

This verifies the solution.

Verify that u\left(x,y,t\right)=2\phantom{\rule{0.2em}{0ex}}\text{sin}\left(\frac{x}{3}\right)\text{sin}\left(\frac{y}{4}\right){e}^{-25t\text{/}16} is a solution to the heat equation

{u}_{t}=9\left({u}_{xx}+{u}_{yy}\right).
Hint

Calculate the partial derivatives and substitute into the right-hand side.

Since the solution to the two-dimensional heat equation is a function of three variables, it is not easy to create a visual representation of the solution. We can graph the solution for fixed values of t, which amounts to snapshots of the heat distributions at fixed times. These snapshots show how the heat is distributed over a two-dimensional surface as time progresses. The graph of the preceding solution at time t=0 appears in the following figure. As time progresses, the extremes level out, approaching zero as t approaches infinity.

A complicated curve in xyz space with many sinusoidally alternating local maxima and minima.

If we consider the heat equation in one dimension, then it is possible to graph the solution over time. The heat equation in one dimension becomes

{u}_{t}={c}^{2}{u}_{xx},

where {c}^{2} represents the thermal diffusivity of the material in question. A solution of this differential equation can be written in the form

{u}_{m}\left(x,t\right)={e}^{\text{−}{\pi }^{2}{m}^{2}{c}^{2}t}\text{sin}\left(m\pi x\right)

where m is any positive integer. A graph of this solution using m=1 appears in (Figure), where the initial temperature distribution over a wire of length 1 is given by u\left(x,0\right)=\text{sin}\phantom{\rule{0.2em}{0ex}}\pi x. Notice that as time progresses, the wire cools off. This is seen because, from left to right, the highest temperature (which occurs in the middle of the wire) decreases and changes color from red to blue.

Graph of a solution of the heat equation in one dimension over time.

A curve in xtu space with a local maximum at (0.5, 0, 12). From this maximum, the values decrease with increasing t and for any value of x.

Lord Kelvin and the Age of Earth
(a) William Thomson (Lord Kelvin), 1824-1907, was a British physicist and electrical engineer; (b) Kelvin used the heat diffusion equation to estimate the age of Earth (credit: modification of work by NASA).

This figure consists of two figures marked a and b. Figure a show Lord Kelvin, dressed well and with a beard. Figure b shows an image of the planet Earth taken from space.

During the late 1800s, the scientists of the new field of geology were coming to the conclusion that Earth must be “millions and millions” of years old. At about the same time, Charles Darwin had published his treatise on evolution. Darwin’s view was that evolution needed many millions of years to take place, and he made a bold claim that the Weald chalk fields, where important fossils were found, were the result of 300 million years of erosion.

At that time, eminent physicist William Thomson (Lord Kelvin) used an important partial differential equation, known as the heat diffusion equation, to estimate the age of Earth by determining how long it would take Earth to cool from molten rock to what we had at that time. His conclusion was a range of 20\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}400 million years, but most likely about 50 million years. For many decades, the proclamations of this irrefutable icon of science did not sit well with geologists or with Darwin.

Read Kelvin’s paper on estimating the age of the Earth.

Kelvin made reasonable assumptions based on what was known in his time, but he also made several assumptions that turned out to be wrong. One incorrect assumption was that Earth is solid and that the cooling was therefore via conduction only, hence justifying the use of the diffusion equation. But the most serious error was a forgivable one—omission of the fact that Earth contains radioactive elements that continually supply heat beneath Earth’s mantle. The discovery of radioactivity came near the end of Kelvin’s life and he acknowledged that his calculation would have to be modified.

Kelvin used the simple one-dimensional model applied only to Earth’s outer shell, and derived the age from graphs and the roughly known temperature gradient near Earth’s surface. Let’s take a look at a more appropriate version of the diffusion equation in radial coordinates, which has the form

\frac{\partial T}{\partial t}=K\left[\frac{{\partial }^{2}T}{{\partial }^{2}r}+\frac{2}{r}\phantom{\rule{0.2em}{0ex}}\frac{\partial T}{\partial r}\right].

Here, T\left(r,t\right) is temperature as a function of r (measured from the center of Earth) and time t. K is the heat conductivity—for molten rock, in this case. The standard method of solving such a partial differential equation is by separation of variables, where we express the solution as the product of functions containing each variable separately. In this case, we would write the temperature as

T\left(r,t\right)=R\left(r\right)f\left(t\right).
  1. Substitute this form into (Figure) and, noting that f\left(t\right) is constant with respect to distance \left(r\right) and R\left(r\right) is constant with respect to time \left(t\right), show that
    \frac{1}{f}\phantom{\rule{0.2em}{0ex}}\frac{\partial f}{\partial t}=\frac{K}{R}\left[\frac{{\partial }^{2}R}{\partial {r}^{2}}+\frac{2}{r}\phantom{\rule{0.2em}{0ex}}\frac{\partial R}{\partial r}\right].
  2. This equation represents the separation of variables we want. The left-hand side is only a function of t and the right-hand side is only a function of r, and they must be equal for all values of r\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}t. Therefore, they both must be equal to a constant. Let’s call that constant \text{−}{\lambda }^{2}. (The convenience of this choice is seen on substitution.) So, we have
    \frac{1}{f}\phantom{\rule{0.2em}{0ex}}\frac{\partial f}{\partial t}=\text{−}{\lambda }^{2}\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\frac{K}{R}\left[\frac{{\partial }^{2}R}{\partial {r}^{2}}+\frac{2}{r}\phantom{\rule{0.2em}{0ex}}\frac{\partial R}{\partial r}\right]=\text{−}{\lambda }^{2}.


    Now, we can verify through direct substitution for each equation that the solutions are f\left(t\right)=A{e}^{\text{−}{\lambda }^{2}t} and R\left(r\right)=B\left(\frac{\text{sin}\phantom{\rule{0.2em}{0ex}}\alpha r}{r}\right)+C\left(\frac{\text{cos}\phantom{\rule{0.2em}{0ex}}\alpha r}{r}\right), where \alpha =\lambda \text{/}\sqrt{K}. Note that f\left(t\right)=A{e}^{+\lambda {n}^{2}t} is also a valid solution, so we could have chosen +{\lambda }^{2} for our constant. Can you see why it would not be valid for this case as time increases?

  3. Let’s now apply boundary conditions.
    1. The temperature must be finite at the center of Earth, r=0. Which of the two constants, B or C, must therefore be zero to keep R finite at r=0? (Recall that \text{sin}\left(\alpha r\right)\text{/}r\to \alpha = as r\to 0, but \text{cos}\left(\alpha r\right)\text{/}r behaves very differently.)
    2. Kelvin argued that when magma reaches Earth’s surface, it cools very rapidly. A person can often touch the surface within weeks of the flow. Therefore, the surface reached a moderate temperature very early and remained nearly constant at a surface temperature {T}_{s}. For simplicity, let’s set T=0\phantom{\rule{0.2em}{0ex}}\text{at}\phantom{\rule{0.2em}{0ex}}r={R}_{E} and find \alpha such that this is the temperature there for all time t. (Kelvin took the value to be 300\phantom{\rule{0.2em}{0ex}}\text{K}\approx 80\text{°}\text{F}. We can add this 300\phantom{\rule{0.2em}{0ex}}\text{K} constant to our solution later.) For this to be true, the sine argument must be zero at r={R}_{E}. Note that \alpha has an infinite series of values that satisfies this condition. Each value of \alpha represents a valid solution (each with its own value for A\right). The total or general solution is the sum of all these solutions.
    3. At t=0, we assume that all of Earth was at an initial hot temperature {T}_{0} (Kelvin took this to be about 7000\phantom{\rule{0.2em}{0ex}}\text{K}.\right) The application of this boundary condition involves the more advanced application of Fourier coefficients. As noted in part b. each value of {\alpha }_{n} represents a valid solution, and the general solution is a sum of all these solutions. This results in a series solution:
      T\left(r,t\right)=\left(\frac{{T}_{0}{R}_{\text{E}}}{\pi }\right)\sum _{n}\frac{{\left(-1\right)}^{n-1}}{n}{e}^{\text{−}\lambda {n}^{2}t}\frac{\text{sin}\left({\alpha }_{n}r\right)}{r},\text{where}\phantom{\rule{0.2em}{0ex}}{\alpha }_{n}=n\pi \text{/}{R}_{\text{E}}.

Note how the values of {\alpha }_{n} come from the boundary condition applied in part b. The term \frac{\text{−}{1}^{n-1}}{n} is the constant {A}_{n} for each term in the series, determined from applying the Fourier method. Letting \beta =\frac{\pi }{{R}_{\text{E}}}, examine the first few terms of this solution shown here and note how {\lambda }^{2} in the exponential causes the higher terms to decrease quickly as time progresses:

T\left(r,t\right)=\frac{{T}_{0}{R}_{\text{E}}}{\pi r}\left(\begin{array}{c}{e}^{\text{−}K{\beta }^{2}t}\left(\text{sin}\phantom{\rule{0.2em}{0ex}}\beta r\right)-\frac{1}{2}{e}^{-4K{\beta }^{2}t}\left(\text{sin}\phantom{\rule{0.2em}{0ex}}2\beta r\right)+\frac{1}{3}{e}^{-9K{\beta }^{2}t}\left(\text{sin}\phantom{\rule{0.2em}{0ex}}3\beta r\right)\hfill \\ \hfill -\frac{1}{4}{e}^{-16K{\beta }^{2}t}\left(\text{sin}\phantom{\rule{0.2em}{0ex}}4\beta r\right)+\frac{1}{5}{e}^{-25K{\beta }^{2}t}\left(\text{sin}\phantom{\rule{0.2em}{0ex}}5\beta r\right)...\end{array}\right).

Near time t=0, many terms of the solution are needed for accuracy. Inserting values for the conductivity K and \beta =\pi \text{/}{R}_{\text{E}} for time approaching merely thousands of years, only the first few terms make a significant contribution. Kelvin only needed to look at the solution near Earth’s surface ((Figure)) and, after a long time, determine what time best yielded the estimated temperature gradient known during his era \left(1\text{°}\text{F} increase per 50\phantom{\rule{0.2em}{0ex}}\text{ft}\right). He simply chose a range of times with a gradient close to this value. In (Figure), the solutions are plotted and scaled, with the 300-\text{K} surface temperature added. Note that the center of Earth would be relatively cool. At the time, it was thought Earth must be solid.

Temperature versus radial distance from the center of Earth. (a) Kelvin’s results, plotted to scale. (b) A close-up of the results at a depth of 4.0\phantom{\rule{0.2em}{0ex}}\text{mi} below Earth’s surface.

This figure consists of two figures labeled a and b. Figure a shows three curves labeled 20, 50, and 200 million years on a chart showing fraction of the earth’s radius vs. temperature (K). The highest curve is the 20 million one, then the 50 million one, and then the 200 million one, with all of them starting with a mildly decreasing slope until the slope decreases more steeply around x = 0.2 and then they all intersect at roughly (1, 315). Figure b shows a close up near (1, 315) with the x axis marked 4.0 miles below Earth’s surface; the curves all appear linear in this close up, with the slopes increasing as the value of the curve does.

Epilog

On May 20,1904, physicist Ernest Rutherford spoke at the Royal Institution to announce a revised calculation that included the contribution of radioactivity as a source of Earth’s heat. In Rutherford’s own words:

“I came into the room, which was half-dark, and presently spotted Lord Kelvin in the audience, and realised that I was in for trouble at the last part of my speech dealing with the age of the Earth, where my views conflicted with his. To my relief, Kelvin fell fast asleep, but as I came to the important point, I saw the old bird sit up, open an eye and cock a baleful glance at me.

Then a sudden inspiration came, and I said Lord Kelvin had limited the age of the Earth, provided no new source [of heat] was discovered. That prophetic utterance referred to what we are now considering tonight, radium! Behold! The old boy beamed upon me.”

Rutherford calculated an age for Earth of about 500 million years. Today’s accepted value of Earth’s age is about 4.6 billion years.

Key Concepts

  • A partial derivative is a derivative involving a function of more than one independent variable.
  • To calculate a partial derivative with respect to a given variable, treat all the other variables as constants and use the usual differentiation rules.
  • Higher-order partial derivatives can be calculated in the same way as higher-order derivatives.

Key Equations

  • Partial derivative of f with respect to x
    \frac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\frac{f\left(x+h,y\right)-f\left(x,y\right)}{h}
  • Partial derivative of f with respect to y
    \frac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\frac{f\left(x,y+k\right)-f\left(x,y\right)}{k}

For the following exercises, calculate the partial derivative using the limit definitions only.

\frac{\partial z}{\partial x} for z={x}^{2}-3xy+{y}^{2}

\frac{\partial z}{\partial y} for z={x}^{2}-3xy+{y}^{2}

\frac{\partial z}{\partial y}=-3x+2y

For the following exercises, calculate the sign of the partial derivative using the graph of the surface.

A partial paraboloid with vertex at the origin and pointing up.

{f}_{x}\left(1,1\right)

{f}_{x}\left(-1,1\right)

The sign is negative.

{f}_{y}\left(1,1\right)

{f}_{x}\left(0,0\right)

The partial derivative is zero at the origin.

For the following exercises, calculate the partial derivatives.

\frac{\partial z}{\partial x} for z=\text{sin}\left(3x\right)\text{cos}\left(3y\right)

\frac{\partial z}{\partial y} for z=\text{sin}\left(3x\right)\text{cos}\left(3y\right)

\frac{\partial z}{\partial y}=-3\phantom{\rule{0.2em}{0ex}}\text{sin}\left(3x\right)\text{sin}\left(3y\right)

\frac{\partial z}{\partial x} and \frac{\partial z}{\partial y} for z={x}^{8}{e}^{3y}

\frac{\partial z}{\partial x} and \frac{\partial z}{\partial y} for z=\text{ln}\left({x}^{6}+{y}^{4}\right)

\frac{\partial z}{\partial x}=\frac{6{x}^{5}}{{x}^{6}+{y}^{4}};\frac{\partial z}{\partial y}=\frac{4{y}^{3}}{{x}^{6}+{y}^{4}}

Find {f}_{y}\left(x,y\right) for f\left(x,y\right)={e}^{xy}\text{cos}\left(x\right)\text{sin}\left(y\right).

Let z={e}^{xy}. Find \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.

\frac{\partial z}{\partial x}=y{e}^{xy};\frac{\partial z}{\partial y}=x{e}^{xy}

Let z=\text{ln}\left(\frac{x}{y}\right). Find \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.

Let z=\text{tan}\left(2x-y\right). Find \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.

\frac{\partial z}{\partial x}=2\phantom{\rule{0.2em}{0ex}}{\text{sec}}^{2}\left(2x-y\right),\frac{\partial z}{\partial y}=\text{−}{\text{sec}}^{2}\left(2x-y\right)

Let z=\text{sinh}\left(2x+3y\right). Find \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.

Let f\left(x,y\right)=\text{arctan}\left(\frac{y}{x}\right). Evaluate {f}_{x}\left(2,-2\right) and {f}_{y}\left(2,-2\right).

{f}_{x}\left(2,-2\right)=\frac{1}{4}={f}_{y}\left(2,-2\right)

Let f\left(x,y\right)=\frac{xy}{x-y}. Find {f}_{x}\left(2,-2\right) and {f}_{y}\left(2,-2\right).

Evaluate the partial derivatives at point P\left(0,1\right).

Find \frac{\partial z}{\partial x} at \left(0,1\right) for z={e}^{\text{−}x}\text{cos}\left(y\right).

\frac{\partial z}{\partial x}=\text{−}\text{cos}\left(1\right)

Given f\left(x,y,z\right)={x}^{3}y{z}^{2}, find \frac{{\partial }^{2}f}{\partial x\partial y} and {f}_{z}\left(1,1,1\right).

Given f\left(x,y,z\right)=2\phantom{\rule{0.2em}{0ex}}\text{sin}\left(x+y\right), find {f}_{x}\left(0,\frac{\pi }{2},-4\right), {f}_{y}\left(0,\frac{\pi }{2},-4\right), and {f}_{z}\left(0,\frac{\pi }{2},-4\right).

\begin{array}{ccc}{f}_{x}=0,\hfill & {f}_{y}=0,\hfill & {f}_{z}=0\hfill \end{array}

The area of a parallelogram with adjacent side lengths that are a\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}b, and in which the angle between these two sides is \theta , is given by the function A\left(a,b,\theta \right)=ba\phantom{\rule{0.2em}{0ex}}\text{sin}\left(\theta \right). Find the rate of change of the area of the parallelogram with respect to the following:

  1. Side a
  2. Side b
  3. \text{Angle}\phantom{\rule{0.2em}{0ex}}\theta

Express the volume of a right circular cylinder as a function of two variables:

  1. its radius r and its height h.
  2. Show that the rate of change of the volume of the cylinder with respect to its radius is the product of its circumference multiplied by its height.
  3. Show that the rate of change of the volume of the cylinder with respect to its height is equal to the area of the circular base.

a. V\left(r,h\right)=\pi {r}^{2}h b. \frac{\partial V}{\partial r}=2\pi rh c. \frac{\partial V}{\partial h}=\pi {r}^{2}

Calculate \frac{\partial w}{\partial z} for w=z\phantom{\rule{0.2em}{0ex}}\text{sin}\left(x{y}^{2}+2z\right).

Find the indicated higher-order partial derivatives.

{f}_{xy} for z=\text{ln}\left(x-y\right)

{f}_{xy}=\frac{1}{{\left(x-y\right)}^{2}}

{f}_{yx} for z=\text{ln}\left(x-y\right)

Let z={x}^{2}+3xy+2{y}^{2}. Find \frac{{\partial }^{2}z}{\partial {x}^{2}} and \frac{{\partial }^{2}z}{\partial {y}^{2}}.

\frac{{\partial }^{2}z}{\partial {x}^{2}}=2,\frac{{\partial }^{2}z}{\partial {y}^{2}}=4

Given z={e}^{x}\text{tan}\phantom{\rule{0.2em}{0ex}}y, find \frac{{\partial }^{2}z}{\partial x\partial y} and \frac{{\partial }^{2}z}{\partial y\partial x}.

Given f\left(x,y,z\right)=xyz, find {f}_{xyy},{f}_{yxy}, and {f}_{yyx}.

{f}_{xyy}={f}_{yxy}={f}_{yyx}=0

Given f\left(x,y,z\right)={e}^{-2x}\text{sin}\left({z}^{2}y\right), show that {f}_{xyy}={f}_{yxy}.

Show that z=\frac{1}{2}\left({e}^{y}-{e}^{\text{−}y}\right)\text{sin}\phantom{\rule{0.2em}{0ex}}x is a solution of the differential equation \frac{{\partial }^{2}z}{\partial {x}^{2}}+\frac{{\partial }^{2}z}{\partial {y}^{2}}=0.

\begin{array}{ccc}\hfill \frac{{d}^{2}z}{d{x}^{2}}& =\hfill & -\frac{1}{2}\left({e}^{y}-{e}^{\text{−}y}\right)\text{sin}\phantom{\rule{0.2em}{0ex}}x\hfill \\ \hfill \frac{{d}^{2}z}{d{y}^{2}}& =\hfill & \frac{1}{2}\left({e}^{y}-{e}^{\text{−}y}\right)\text{sin}\phantom{\rule{0.2em}{0ex}}x\hfill \\ \hfill \frac{{d}^{2}z}{d{x}^{2}}+\frac{{d}^{2}z}{d{y}^{2}}& =\hfill & 0\hfill \end{array}

Find {f}_{xx}\left(x,y\right) for f\left(x,y\right)=\frac{4{x}^{2}}{y}+\frac{{y}^{2}}{2x}.

Let f\left(x,y,z\right)={x}^{2}{y}^{3}z-3x{y}^{2}{z}^{3}+5{x}^{2}z-{y}^{3}z. Find {f}_{xyz}.

{f}_{xyz}=6{y}^{2}x-18y{z}^{2}

Let F\left(x,y,z\right)={x}^{3}y{z}^{2}-2{x}^{2}yz+3xz-2{y}^{3}z. Find {F}_{xyz}.

Given f\left(x,y\right)={x}^{2}+x-3xy+{y}^{3}-5, find all points at which {f}_{x}={f}_{y}=0 simultaneously.

\left(\frac{1}{4},\frac{1}{2}\right),\left(1,1\right)

Given f\left(x,y\right)=2{x}^{2}+2xy+{y}^{2}+2x-3, find all points at which \frac{\partial f}{\partial x}=0 and \frac{\partial f}{\partial y}=0 simultaneously.

Given f\left(x,y\right)={y}^{3}-3y{x}^{2}-3{y}^{2}-3{x}^{2}+1, find all points on f at which {f}_{x}={f}_{y}=0 simultaneously.

\left(0,0\right),\left(0,2\right),\left(\sqrt{3},-1\right),\left(\text{−}\sqrt{3},-1\right)

Given f\left(x,y\right)=15{x}^{3}-3xy+15{y}^{3}, find all points at which {f}_{x}\left(x,y\right)={f}_{y}\left(x,y\right)=0 simultaneously.

Show that z={e}^{x}\text{sin}\phantom{\rule{0.2em}{0ex}}y satisfies the equation \frac{{\partial }^{2}z}{\partial {x}^{2}}+\frac{{\partial }^{2}z}{\partial {y}^{2}}=0.

\frac{{\partial }^{2}z}{\partial {x}^{2}}+\frac{{\partial }^{2}z}{\partial {y}^{2}}={e}^{x}\text{sin}\left(y\right)-{e}^{x}\text{sin}\phantom{\rule{0.2em}{0ex}}y=0

Show that f\left(x,y\right)=\text{ln}\left({x}^{2}+{y}^{2}\right) solves Laplace’s equation \frac{{\partial }^{2}z}{\partial {x}^{2}}+\frac{{\partial }^{2}z}{\partial {y}^{2}}=0.

Show that z={e}^{\text{−}t}\text{cos}\left(\frac{x}{c}\right) satisfies the heat equation \frac{\partial z}{\partial t}=\text{−}{e}^{\text{−}t}\text{cos}\left(\frac{x}{c}\right).

{c}^{2}\frac{{\partial }^{2}z}{\partial {x}^{2}}={e}^{\text{−}t}\text{cos}\left(\frac{x}{c}\right)

Find \underset{\text{Δ}x\to 0}{\text{lim}}\frac{f\left(x+\text{Δ}x\right)-f\left(x,y\right)}{\text{Δ}x} for f\left(x,y\right)=-7x-2xy+7y.

Find \underset{\text{Δ}y\to 0}{\text{lim}}\frac{f\left(x,y+\text{Δ}y\right)-f\left(x,y\right)}{\text{Δ}y} for f\left(x,y\right)=-7x-2xy+7y.

\frac{\partial f}{\partial y}=-2x+7

Find \underset{\text{Δ}x\to 0}{\text{lim}}\frac{\text{Δ}f}{\text{Δ}x}=\underset{\text{Δ}x\to 0}{\text{lim}}\frac{f\left(x+\text{Δ}x,y\right)-f\left(x,y\right)}{\text{Δ}x} for f\left(x,y\right)={x}^{2}{y}^{2}+xy+y.

Find \underset{\text{Δ}x\to 0}{\text{lim}}\frac{\text{Δ}f}{\text{Δ}x}=\underset{\text{Δ}x\to 0}{\text{lim}}\frac{f\left(x+\text{Δ}x,y\right)-f\left(x,y\right)}{\text{Δ}x} for f\left(x,y\right)=\text{sin}\left(xy\right).

\frac{\partial f}{\partial x}=y\phantom{\rule{0.2em}{0ex}}\text{cos}\phantom{\rule{0.2em}{0ex}}xy

The function P\left(T,V\right)=\frac{nRT}{V} gives the pressure at a point in a gas as a function of temperature T and volume V. The letters n\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}R are constants. Find \frac{\partial P}{\partial V} and \frac{\partial P}{\partial T}, and explain what these quantities represent.

The equation for heat flow in the xy\text{-plane} is \frac{\partial f}{\partial t}=\frac{{\partial }^{2}f}{\partial {x}^{2}}+\frac{{\partial }^{2}f}{\partial {y}^{2}}. Show that f\left(x,y,t\right)={e}^{-2t}\text{sin}\phantom{\rule{0.2em}{0ex}}x\phantom{\rule{0.2em}{0ex}}\text{sin}\phantom{\rule{0.2em}{0ex}}y is a solution.

The basic wave equation is {f}_{tt}={f}_{xx}. Verify that f\left(x,t\right)=\text{sin}\left(x+t\right) and f\left(x,t\right)=\text{sin}\left(x-t\right) are solutions.

The law of cosines can be thought of as a function of three variables. Let x,y, and \theta be two sides of any triangle where the angle \theta is the included angle between the two sides. Then, F\left(x,y,\theta \right)={x}^{2}+{y}^{2}-2xy\phantom{\rule{0.2em}{0ex}}\text{cos}\phantom{\rule{0.2em}{0ex}}\theta gives the square of the third side of the triangle. Find \frac{\partial F}{\partial \theta } and \frac{\partial F}{\partial x} when x=2,y=3, and \theta =\frac{\pi }{6}.

\frac{\partial F}{\partial \theta }=6,\frac{\partial F}{\partial x}=4-3\sqrt{3}

Suppose the sides of a rectangle are changing with respect to time. The first side is changing at a rate of 2 in./sec whereas the second side is changing at the rate of 4 in/sec. How fast is the diagonal of the rectangle changing when the first side measures 16 in. and the second side measures 20 in.? (Round answer to three decimal places.)

A Cobb-Douglas production function is f\left(x,y\right)=200{x}^{0.7}{y}^{0.3}, where x\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}y represent the amount of labor and capital available. Let x=500 and y=1000. Find \frac{\delta f}{\delta x} and \frac{\delta f}{\delta y} at these values, which represent the marginal productivity of labor and capital, respectively.

\frac{\delta f}{\delta x} at \left(500,1000\right)=172.36, \frac{\delta f}{\delta y} at \left(500,1000\right)=36.93

The apparent temperature index is a measure of how the temperature feels, and it is based on two variables: h, which is relative humidity, and t, which is the air temperature.

A=0.885t-22.4h+1.20th-0.544. Find \frac{\partial A}{\partial t} and \frac{\partial A}{\partial h} when t=20\text{°}\text{F} and h=0.90.

Glossary

higher-order partial derivatives
second-order or higher partial derivatives, regardless of whether they are mixed partial derivatives
mixed partial derivatives
second-order or higher partial derivatives, in which at least two of the differentiations are with respect to different variables
partial derivative
a derivative of a function of more than one independent variable in which all the variables but one are held constant
partial differential equation
an equation that involves an unknown function of more than one independent variable and one or more of its partial derivatives

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Partial Derivatives by OSCRiceUniversity is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book