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 as a function of Leibniz notation for the derivative is which implies that is the dependent variable and is the independent variable. For a function of two variables, and are the independent variables and 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 be a function of two variables. Then the partial derivative of with respect to written as or is defined as

The partial derivative of with respect to written as or 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 in the original notation is replaced with the symbol (This rounded is usually called “partial,” so is spoken as the “partial of with respect to 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 and for the function

First, calculate

Next, substitute this into (Figure) and simplify:

To calculate first calculate

Next, substitute this into (Figure) and simplify:

Use the definition of the partial derivative as a limit to calculate and for the function

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 and define as a function of Then

The same is true for calculating the partial derivative of with respect to This time, fix and define as a function of Then

All differentiation rules from Introduction to Derivatives apply.

Calculating Partial Derivatives

Calculate and for the following functions by holding the opposite variable constant then differentiating:

1. To calculate treat the variable as a constant. Then differentiate with respect to using the sum, difference, and power rules:

The derivatives of the third, fifth, and sixth terms are all zero because they do not contain the variable so they are treated as constant terms. The derivative of the second term is equal to the coefficient of which is Calculating

These are the same answers obtained in (Figure).

2. To calculate treat the variable y as a constant. Then differentiate with respect to x using the chain rule and power rule:

To calculate treat the variable as a constant. Then differentiate with respect to using the chain rule and power rule:

Calculate and for the function by holding the opposite variable constant, then differentiating.

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 If we remove the limit from the definition of the partial derivative with respect to the difference quotient remains:

This resembles the difference quotient for the derivative of a function of one variable, except for the presence of the variable. (Figure) illustrates a surface described by an arbitrary function

Secant line passing through the points and

In (Figure), the value of is positive. If we graph and for an arbitrary point then the slope of the secant line passing through these two points is given by

This line is parallel to the Therefore, the slope of the secant line represents an average rate of change of the function as we travel parallel to the As approaches zero, the slope of the secant line approaches the slope of the tangent line.

If we choose to change instead of by the same incremental value then the secant line is parallel to the and so is the tangent line. Therefore, represents the slope of the tangent line passing through the point parallel to the and represents the slope of the tangent line passing through the point parallel to the 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

Partial Derivatives from a Contour Map

Use a contour map to estimate at the point for the function

The following graph represents a contour map for the function

Contour map for the function using and corresponds to the origin).

The inner circle on the contour map corresponds to and the next circle out corresponds to The first circle is given by the equation the second circle is given by the equation The first equation simplifies to and the second equation simplifies to The of the first circle is and the of the second circle is We can estimate the value of evaluated at the point using the slope formula:

To calculate the exact value of evaluated at the point we start by finding using the chain rule. First, we rewrite the function as and then differentiate with respect to while holding constant:

Next, we evaluate this expression using and

The estimate for the partial derivative corresponds to the slope of the secant line passing through the points and It represents an approximation to the slope of the tangent line to the surface through the point which is parallel to the

Use a contour map to estimate at point for the function

Compare this with the exact answer.

Using the curves corresponding to we obtain

Hint

Create a contour map for using values of from Which of these curves passes through point

### Functions of More Than Two Variables

Suppose we have a function of three variables, such as We can calculate partial derivatives of with respect to any of the independent variables, simply as extensions of the definitions for partial derivatives of functions of two variables.

Definition

Let be a function of three variables. Then, the partial derivative of with respect to x, written as or is defined to be

The partial derivative of with respect to written as or is defined to be

The partial derivative of with respect to written as or 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 of and we wish to calculate then we treat the other two independent variables as if they are constants, then differentiate with respect to

Calculating Partial Derivatives for a Function of Three Variables

Use the limit definition of partial derivatives to calculate for the function

Then, find and by setting the other two variables constant and differentiating accordingly.

We first calculate using (Figure), then we calculate the other two partial derivatives by holding the remaining variables constant. To use the equation to find we first need to calculate

and recall that Next, we substitute these two expressions into the equation:

Then we find by holding constant. Therefore, any term that does not include the variable is constant, and its derivative is zero. We can apply the sum, difference, and power rules for functions of one variable:

To calculate we hold x and y constant and apply the sum, difference, and power rules for functions of one variable:

Use the limit definition of partial derivatives to calculate for the function

Then find and by setting the other two variables constant and differentiating accordingly.

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.

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

Calculate and for the function

Hint

Use the strategy in the preceding example.

### 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 and respectively. Higher-order partial derivatives calculated with respect to different variables, such as and are commonly called mixed partial derivatives.

Calculating Second Partial Derivatives

Calculate all four second partial derivatives for the function

To calculate and we first calculate

To calculate differentiate with respect to

To calculate differentiate with respect to

To calculate and first calculate

To calculate differentiate with respect to

To calculate differentiate with respect to

Calculate all four second partial derivatives for the function

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 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 is defined on an open disk that contains the point If the functions and are continuous on then

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 The partial derivative is equal to the partial derivative of with respect to and is equal to the partial derivative of with respect to

### 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 has three independent variables——and is an arbitrary constant. The independent variables are considered to be spatial variables, and the variable represents time. In Laplace’s equation, the unknown function has two independent variables

A Solution to the Wave Equation

Verify that

is a solution to the wave equation

First, we calculate and

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

This verifies the solution.

Verify that is a solution to the heat equation

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 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 represents the thermal diffusivity of the material in question. A solution of this differential equation can be written in the form

where is any positive integer. A graph of this solution using appears in (Figure), where the initial temperature distribution over a wire of length is given by 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.

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

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 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 million years, but most likely about 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

Here, is temperature as a function of (measured from the center of Earth) and time 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

1. Substitute this form into (Figure) and, noting that is constant with respect to distance and is constant with respect to time show that
2. This equation represents the separation of variables we want. The left-hand side is only a function of and the right-hand side is only a function of and they must be equal for all values of Therefore, they both must be equal to a constant. Let’s call that constant (The convenience of this choice is seen on substitution.) So, we have

Now, we can verify through direct substitution for each equation that the solutions are and where Note that is also a valid solution, so we could have chosen 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, Which of the two constants, or must therefore be zero to keep finite at (Recall that as but 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 For simplicity, let’s set and find such that this is the temperature there for all time (Kelvin took the value to be We can add this constant to our solution later.) For this to be true, the sine argument must be zero at Note that has an infinite series of values that satisfies this condition. Each value of represents a valid solution (each with its own value for The total or general solution is the sum of all these solutions.
3. At we assume that all of Earth was at an initial hot temperature (Kelvin took this to be about The application of this boundary condition involves the more advanced application of Fourier coefficients. As noted in part b. each value of represents a valid solution, and the general solution is a sum of all these solutions. This results in a series solution:

Note how the values of come from the boundary condition applied in part b. The term is the constant for each term in the series, determined from applying the Fourier method. Letting examine the first few terms of this solution shown here and note how in the exponential causes the higher terms to decrease quickly as time progresses:

Near time many terms of the solution are needed for accuracy. Inserting values for the conductivity and 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 increase per He simply chose a range of times with a gradient close to this value. In (Figure), the solutions are plotted and scaled, with the 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 below Earth’s surface.

Epilog

On May 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 million years. Today’s accepted value of Earth’s age is about 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 with respect to
• Partial derivative of with respect to

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

for

for

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

The sign is negative.

The partial derivative is zero at the origin.

For the following exercises, calculate the partial derivatives.

for

for

and for

and for

Find for

Let Find and

Let Find and

Let Find and

Let Find and

Let Evaluate and

Let Find and

Evaluate the partial derivatives at point

Find at for

Given find and

Given find and

The area of a parallelogram with adjacent side lengths that are and in which the angle between these two sides is is given by the function Find the rate of change of the area of the parallelogram with respect to the following:

1. Side a
2. Side b

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

1. its radius and its height
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. b. c.

Calculate for

Find the indicated higher-order partial derivatives.

for

for

Let Find and

Given find and

Given find and

Given show that

Show that is a solution of the differential equation

Find for

Let Find

Let Find

Given find all points at which simultaneously.

Given find all points at which and simultaneously.

Given find all points on at which simultaneously.

Given find all points at which simultaneously.

Show that satisfies the equation

Show that solves Laplace’s equation

Show that satisfies the heat equation

Find for

Find for

Find for

Find for

The function gives the pressure at a point in a gas as a function of temperature and volume The letters are constants. Find and and explain what these quantities represent.

The equation for heat flow in the is Show that is a solution.

The basic wave equation is Verify that and are solutions.

The law of cosines can be thought of as a function of three variables. Let and be two sides of any triangle where the angle is the included angle between the two sides. Then, gives the square of the third side of the triangle. Find and when and

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

A Cobb-Douglas production function is where represent the amount of labor and capital available. Let and Find and at these values, which represent the marginal productivity of labor and capital, respectively.

at at

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

Find and when and

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