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.
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/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.
Let \(f(x,y)\) be a function of two variables. Then the partial derivative of \(f\) with respect to \(x\), written as \(∂f/∂x,\), or \(f_x,\) is defined as
The partial derivative of \(f\) with respect to \(y\), written as \(∂f/∂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 \(∂\). (This rounded \(“d”\) is usually called “partial,” so \(∂f/∂x\) is spoken as the “partial of \(f\) with respect to \(x\).”) 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.
Use the definition of the partial derivative as a limit to calculate \(∂f/∂x\) and \(∂f/∂y\) for the function
First, calculate \(f(x+h,y).\)
\[\begin f(x+h,y) &=(x+h)^2−3(x+h)y+2y^2−4(x+h)+5y−12 \\ &=x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12. \end \nonumber \]
Next, substitute this into Equation \ref and simplify:
To calculate \(\dfrac\), first calculate \(f(x,y+h):\)
Next, substitute this into Equation \ref and simplify:
Use the definition of the partial derivative as a limit to calculate \(∂f/∂x\) and \(∂f/∂y\) for the function
Hint
Use Equations \ref and \ref from the definition of partial derivatives.
Answer
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(x)=f(x,y)\) 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(y)=f(x,y)\) as a function of \(y\). Then
All differentiation rules apply.
Calculate \(∂f/∂x\) and \(∂f/∂y\) for the following functions by holding the opposite variable constant then differentiating:
Solution:
a. To calculate \(∂f/∂x\), treat the variable \(y\) as a constant. Then differentiate \(f(x,y)\) with respect to \(x\) 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 \(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 \(∂f/∂y\):
These are the same answers obtained in Example \(\PageIndex\).
b. To calculate \(∂g/∂x,\) treat the variable y as a constant. Then differentiate \(g(x,y)\) with respect to \(x\) using the chain rule and power rule:
To calculate \(∂g/∂y,\) treat the variable \(x\) as a constant. Then differentiate \(g(x,y)\) with respect to \(y\) using the chain rule and power rule:
Calculate \(∂f/∂x\) and \(∂f/∂y\) for the function
by holding the opposite variable constant, then differentiating.
Hint
Use Equations \ref and \ref from the definition of partial derivatives.
Answer
How can we interpret these partial derivatives? Recall that the graph of a function of two variables is a surface in \(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 \(\PageIndex\) illustrates a surface described by an arbitrary function \(z=f(x,y).\)
In Figure \(\PageIndex\), the value of \(h\) is positive. If we graph \(f(x,y)\) and \(f(x+h,y)\) for an arbitrary point \((x,y),\) then the slope of the secant line passing through these two points is given by
This line is parallel to the \(x\)-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\)-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\)-axis and so is the tangent line. Therefore, \(∂f/∂x\) represents the slope of the tangent line passing through the point \((x,y,f(x,y))\) parallel to the \(x\)-axis and \(∂f/∂y\) represents the slope of the tangent line passing through the point \((x,y,f(x,y))\) parallel to the \(y\)-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.
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(x,y)\).
Use a contour map to estimate \(∂g/∂x\) at the point \((\sqrt,0)\) for the function
Figure \(\PageIndex\) represents a contour map for the function \(g(x,y)\).
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\); the second circle is given by the equation \(1=\sqrt\). The first equation simplifies to \(x^2+y^2=5\) and the second equation simplifies to \(x^2+y^2=8.\) The \(x\)-intercept of the first circle is \((\sqrt,0)\) and the \(x\)-intercept of the second circle is \((2\sqrt,0)\). We can estimate the value of \(∂g/∂x\) evaluated at the point \((\sqrt,0)\) using the slope formula:
To calculate the exact value of \(∂g/∂x\) evaluated at the point \((\sqrt,0)\), we start by finding \(∂g/∂x\) using the chain rule. First, we rewrite the function as
and then differentiate with respect to \(x\) while holding \(y\) constant:
Next, we evaluate this expression using \(x=\sqrt\) and \(y=0\):
The estimate for the partial derivative corresponds to the slope of the secant line passing through the points \((\sqrt,0,g(\sqrt,0))\) and \((2\sqrt,0,g(2\sqrt,0))\). It represents an approximation to the slope of the tangent line to the surface through the point \((\sqrt,0,g(\sqrt,0)),\) which is parallel to the \(x\)-axis.
Use a contour map to estimate \(∂f/∂y\) at point \((0,\sqrt)\) for the function
Compare this with the exact answer.
Hint
Create a contour map for \(f\) using values of \(c\) from \(−3\) to \(3\). Which of these curves passes through point \((0,\sqrt)?\)
Answer
Using the curves corresponding to \(c=−2\) and \(c=−3,\) we obtain
The exact answer is
Suppose we have a function of three variables, such as \(w=f(x,y,z).\) 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.
Let \(f(x,y,z)\) be a function of three variables. Then, the partial derivative of \(f\) with respect to \(x\), written as \(∂f/∂x,\) or \(f_x,\) is defined to be
The partial derivative of \(f\) with respect to \(y\), written as \(∂f/∂y\), or \(f_y\), is defined to be
The partial derivative of \(f\) with respect to \(z\), written as \(∂f/∂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\), and \(z\), and we wish to calculate \(∂f/∂x\), then we treat the other two independent variables as if they are constants, then differentiate with respect to \(x\).
Use the limit definition of partial derivatives to calculate \(∂f/∂x\) for the function
Then, find \(∂f/∂y\) and \(∂f/∂z\) by setting the other two variables constant and differentiating accordingly.
Solution:
We first calculate \(∂f/∂x\) using Equation \ref, then we calculate the other two partial derivatives by holding the remaining variables constant. To use the equation to find \(∂f/∂x\), we first need to calculate \(f(x+h,y,z):\)
\[\begin f(x+h,y,z) &=(x+h)^2−3(x+h)y+2y^2−4(x+h)z+5yz^2−12(x+h)+4y−3z \\[4pt]
&=x^2+2xh+h^2−3xy−3xh+2y^2−4xz−4hz+5yz^2−12x−12h+4y−3z \end \nonumber \]
and recall that \(f(x,y,z)=x^2−3xy+2y^2−4zx+5yz^2−12x+4y−3z.\) Next, we substitute these two expressions into the equation:
Then we find \(∂f/∂y\) by holding \(x\) and \(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 \(∂f/∂z,\) 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 \(∂f/∂x\) for the function
Then find \(∂f/∂y\) and \(∂f/∂z\) by setting the other two variables constant and differentiating accordingly.
Hint
Use the strategy in the preceding example.
Answer
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 \(∂f/∂x, ∂f/∂y,\) and \(∂f/∂z\) for the function
Hint
Use the strategy in the preceding example.
Answer
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_,f_,f_,\) and \(f_\), respectively. Higher-order partial derivatives calculated with respect to different variables, such as \(f_\) and \(f_\), are commonly called mixed partial derivatives.
Calculate all four second partial derivatives for the function
Solution:
To calculate \(\dfrac\) and \(\dfrac\), we first calculate \(∂f/∂x\):
To calculate \(\dfrac\), differentiate \(∂f/∂x\) (Equation \ref) with respect to \(x\):
To calculate \(\dfrac\), differentiate \(∂f/∂x\) (Equation \ref) with respect to \(y\):
To calculate \(\dfrac\) and \(\dfrac\), first calculate \(∂f/∂y\):
To calculate \(\dfrac\), differentiate \(∂f/∂y\) (Equation \ref) with respect to \(x\):
To calculate \(\dfrac\), differentiate \(∂f/∂y\) (Equation \ref) with respect to \(y\):
Calculate all four second partial derivatives for the function
Hint
Follow the same steps as in the previous example.
Answer
At this point we should notice that, in both Example \(\PageIndex\) and the checkpoint, it was true that \(\dfrac=\dfrac\). Under certain conditions, this is always true. In fact, it is a direct consequence of the following theorem.
Suppose that \(f(x,y)\) is defined on an open disk \(D\) that contains the point \((a,b)\). If the functions \(f_\) and \(f_\) are continuous on \(D\), then \(f_(a,b)=f_(a,b)\).
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(x,y).\) The partial derivative \(f_\) is equal to the partial derivative of \(f_x\) with respect to \(x\), and \(f_\) is equal to the partial derivative of \(f_y\) with respect to \(y\).
Previously, 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
In the heat and wave equations, the unknown function \(u\) has three independent variables: \(t\), \(x\), and \(y\) with \(c\) is an arbitrary constant. The independent variables \(x\) and \(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\) and \(y\).
is a solution to the wave equation
First, we calculate \(u_,u_,\) and \(u_:\)
\[\begin u_(x,y,t) &=\dfrac\left[\dfrac\right] \\[6pt]
&=\dfrac[5\sin(3πx)\sin(4πy)(−10π\sin(10πt))] \\[6pt]
&= \dfrac \left[−50π\sin(3πx)\sin(4πy)\sin(10πt)\right] \\[6pt]
&=−500π^2\sin(3πx)\sin(4πy)\cos(10πt) \end\]
\[\begin u_(x,y,t) &=\dfrac \left[\dfrac \right] \\[6pt]
&=\dfrac\left[5\sin(3πx)(4π\cos(4πy))\cos(10πt)\right] \\[6pt]
&=\dfrac\left[20π\sin(3πx)\cos(4πy)\cos(10πt)\right] \\[6pt]
&=−80π^2\sin(3πx)\sin(4πy)\cos(10πt). \end \nonumber \]
Next, we substitute each of these into the right-hand side of Equation \ref and simplify:
\[\begin 4(u_+u_) &=4(−45π^2\sin(3πx)\sin(4πy)\cos(10πt)+−80π^2\sin(3πx)\sin(4πy)\cos(10πt)) \\[6pt]
&=4(−125π^2\sin(3πx)\sin(4πy)\cos(10πt)) \\[6pt]
&=−500π^2\sin(3πx)\sin(4πy)\cos(10πt) \\[6pt]
&=u_. \end\]
This verifies the solution.
\[u(x,y,t)=2\sin \left(\dfrac \right)\sin\left(\dfrac \right)e^ \nonumber \]
is a solution to the heat equation
Hint
Calculate the partial derivatives and substitute into the right-hand side.
Answer
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 Figure \(\PageIndex\). 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 \(\PageIndex\), where the initial temperature distribution over a wire of length \(1\) is given by \(u(x,0)=\sin π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.
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 to 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.
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(r,t)\) 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
Note how the values of \(α_n\) come from the boundary condition applied in part b. The term \(\dfrac>\) is the constant \(A_n\) for each term in the series, determined from applying the Fourier method. Letting \(β=\dfrac\), examine the first few terms of this solution shown here and note how \(λ^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 \(β=π/R_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 \(\PageIndex\)) and, after a long time, determine what time best yielded the estimated temperature gradient known during his era (\(1°F\) increase per \(50ft\)). He simply chose a range of times with a gradient close to this value. In Figure \(\PageIndex\), the solutions are plotted and scaled, with the \(300−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 realized 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.
Partial derivative of \(f\) with respect to \(x\) \[\dfrac=\displaystyle<\lim_
Partial derivative of \(f\) with respect to \(y\) \[\dfrac=\displaystyle<\lim_
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
13.3: Partial Derivatives is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.