## Learning Objectives

- 4.3.1 Calculate the partial derivatives of a function of two variables.
- 4.3.2 Calculate the partial derivatives of a function of more than two variables.
- 4.3.3 Determine the higher-order derivatives of a function of two variables.
- 4.3.4 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(x,y)$ 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

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

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{\u201cd\u201d}$ is usually called “partial,” so $\partial f\text{/}\partial x$ is spoken as the “partial of $f$ with respect to $x\text{.\u201d})$ 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.

## Example 4.14

### 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

### Solution

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

Next, substitute this into Equation 4.12 and simplify:

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

Next, substitute this into Equation 4.13 and simplify:

## Checkpoint 4.12

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

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

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

All differentiation rules from Introduction to Derivatives apply.

## Example 4.15

### 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:

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

### Solution

- 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 $\mathrm{-3}y.$ 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 \\ & =\mathrm{-3}x+4y-0+5-0\hfill \\ & =\mathrm{-3}x+4y+5.\hfill \end{array}$$

These are the same answers obtained in Example 4.14. - 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}$$

## Checkpoint 4.13

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.

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

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

In Figure 4.21, 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

This line is parallel to the $x\u2013z\text{plane.}$ 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).$

## Example 4.16

### 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}}.$

### Solution

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

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:

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:

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

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}.$

## Checkpoint 4.14

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

Compare this with the exact answer.

## 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

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

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

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.$

## Example 4.17

### 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

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

### Solution

We first calculate $\partial f\text{/}\partial x$ using Equation 4.14, 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{:}$

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:

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:

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:

## Checkpoint 4.15

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

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

## Example 4.18

### Calculating Partial Derivatives for a Function of Three Variables

Calculate the three partial derivatives of the following functions.

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

### Solution

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

- $\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(\mathrm{-3}z\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(\mathrm{-4}x\right)\left(x-3yz\right)-\left({x}^{2}y-4xz+{y}^{2}\right)\left(\mathrm{-3}y\right)}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{\mathrm{-4}{x}^{2}+12xyz+3{x}^{2}{y}^{2}-12xyz+3{y}^{3}}{{\left(x-3yz\right)}^{2}}\hfill \\ & =\frac{\mathrm{-4}{x}^{2}+3{x}^{2}{y}^{2}+3{y}^{3}}{{\left(x-3yz\right)}^{2}}\hfill \end{array}$ - $\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{\u2212}\text{cos}\left({x}^{2}y-z\right)+y\phantom{\rule{0.2em}{0ex}}\text{sin}\left({x}^{2}-yz\right)\hfill \end{array}$

## Checkpoint 4.16

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).$

## Higher-Order Partial Derivatives

Consider the function

Its partial derivatives are

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):

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.

## Example 4.19

### Calculating Second Partial Derivatives

Calculate all four second partial derivatives for the function

### Solution

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{:}$

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

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

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{:}$

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

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

## Checkpoint 4.17

Calculate all four second partial derivatives for the function

At this point we should notice that, in both Example 4.19 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.

## Theorem 4.5

### 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

(heat equation in two dimensions)

(wave equation in two dimensions)

(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.$

## Example 4.20

### A Solution to the Wave Equation

Verify that

is a solution to the wave equation

### Solution

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

Next, we substitute each of these into the right-hand side of Equation 4.20 and simplify:

This verifies the solution.

## Checkpoint 4.18

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}^{\mathrm{-25}t\text{/}16}$ is a solution to the heat equation

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.

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

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

where $m$ is any positive integer. A graph of this solution using $m=1$ appears in Figure 4.24, 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.

## Student Project

### Lord Kelvin and the Age of Earth

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.

## Media

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

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

- Substitute this form into Equation 4.13 and, noting that $f(t)$ is constant with respect to distance $\left(r\right)$ and $R(r)$ 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].$$ - 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{\u2212}{\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{\u2212}{\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{\u2212}{\lambda}^{2}.$$

Now, we can verify through direct substitution for each equation that the solutions are $f(t)=A{e}^{\text{\u2212}{\lambda}^{2}t}$ and $R(r)=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(t)=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? - Let’s now apply boundary conditions.
- 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}(\alpha r)\text{/}r\to \alpha =$ as $r\to 0,$ but $\text{cos}(\alpha r)\text{/}r$ behaves very differently.)
- 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{\xb0}\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).$ The total or general solution is the sum of all these solutions.
- 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}.)$ 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(r,t)=\left(\frac{{T}_{0}{R}_{\text{E}}}{\pi}\right){\displaystyle \sum _{n}\frac{{(\mathrm{-1})}^{n-1}}{n}{e}^{\text{\u2212}\lambda {n}^{2}t}\frac{\text{sin}({\alpha}_{n}r)}{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{\u2212}{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:

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 4.26) and, after a long time, determine what time best yielded the estimated temperature gradient known during his era $(1\text{\xb0}\text{F}$ increase per $50\phantom{\rule{0.2em}{0ex}}\text{ft}).$ He simply chose a range of times with a gradient close to this value. In Figure 4.26, 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.

**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.

## Section 4.3 Exercises

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}$

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

${f}_{x}(1,1)$

${f}_{y}(1,1)$

For the following exercises, calculate the partial derivatives.

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

$\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)$

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

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}(2x-y).$ Find $\frac{\partial z}{\partial x}$ and $\frac{\partial z}{\partial y}.$

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

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

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

Find $\frac{\partial z}{\partial x}$ at $\left(0,1\right)$ for $z={e}^{\text{\u2212}x}\text{cos}(y).$ Evaluate the partial derivatives at point $P(0,1).$

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

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

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(a,b,\theta )=ba\phantom{\rule{0.2em}{0ex}}\text{sin}(\theta ).$ Find the rate of change of the area of the parallelogram with respect to the following:

- Side
*a* - Side
*b* - $\text{Angle}\phantom{\rule{0.2em}{0ex}}\theta $

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

- its radius $r$ and its height $h.$
- 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.
- 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.

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

Find the indicated higher-order partial derivatives.

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

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

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(x,y,z)={e}^{\mathrm{-2}x}\text{sin}\left({z}^{2}y\right),$ show that ${f}_{xyy}={f}_{yxy}.$

Show that $z=\frac{1}{2}\left({e}^{y}-{e}^{\text{\u2212}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.$

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

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

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

Given $f(x,y)=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(x,y)={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.

Given $f(x,y)=15{x}^{3}-3xy+15{y}^{3},$ find all points at which ${f}_{x}(x,y)={f}_{y}(x,y)=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.$

Show that $f(x,y)=\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{\u2212}t}\text{cos}\left(\frac{x}{c}\right)$ satisfies the heat equation $\frac{\partial z}{\partial t}={c}^{2}\left(\frac{{\partial}^{2}z}{\partial {x}^{2}}\right)$

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

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

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

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

The function $P(T,V)=\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(x,y,t)={e}^{\mathrm{-2}t}\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(x,t)=\text{sin}(x+t)$ and $f(x,t)=\text{sin}(x-t)$ 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(x,y,\theta )={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}.$

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(x,y)=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{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ at these values, which represent the marginal productivity of labor and capital, respectively.

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{\xb0}\text{F}$ and $h=0.90.$