Section 7.3 Partial Differentiation
¶The derivative of a function of a single variable tells us how quickly the value of the function changes as the value of the independent variable changes. Intuitively, it tells us how “steep” the graph of the function is. We might wonder if there is a similar idea for graphs of functions of two variables, that is, surfaces. It is not clear that this has a simple answer, nor how we might proceed. We will start with what seem to be very small steps toward the goal. Surprisingly, it turns out that these simple ideas hold the keys to a more general understanding.
Subsection 7.3.1 First-Order Partial Derivatives
¶The derivative of a single-variable function \(f(x)\) tells us how much \(f(x)\) changes as \(x\) changes. There is no ambiguity when we speak about the rate of change of \(f(x)\) with respect to \(x\) since \(x\) must be constrained to move along the \(x\)-axis. The situation becomes more complicated, however, when we study the rate of change of a function of two or more variables. The obvious analogue for a function of two variables \(g(x,y)\) would be something that tells us how quickly \(g(x,y)\) increases as \(x\) and \(y\) increase. However, in most cases this will depend on how quickly \(x\) and \(y\) are changing relative to each other.
Example 7.15. Analyzing a Simple Rate of Change in One Variable.
Given \(f(x,y)=y^2\text{,}\) analyze the rate of change of \(f\) when one variable changes and the other variable is kept constant.
If we look at a point \((x,y,y^2)\) on this surface, the value of a function does not change at all if we fix \(y\) and let \(x\) increase, but increases like \(y^2\) if we fix \(x\) and let \(y\) increase.
Example 7.16. Analyzing Rates of Change in One Variable.
Given \(f(x,y)=x^2+y^2\text{,}\) analyze the rate of change of \(f\) when one variable changes and the other variable is kept constant.
Now let us consider what happens to \(f(x,y)\) when both \(x\) and \(y\) are increasing, perhaps at different rates. We can think of this as being a movement in a certain direction of a point in the \(x\)-\(y\)-plane. A point and a direction defines a line in the \(x\)-\(y\)-plane, and so we are asking how the function changes as we move along this line.
Introducing cross-sections: Let us then imagine a plane perpendicular to the \(x\)-\(y\)-plane that intersects the \(x\)-\(y\)-plane along this line. This plane will intersect the surface of \(f\) in a curve, so we can just look at the behaviour of this curve in the given plane.
Figure 7.3 shows the plane \(x+y=1\text{,}\) which is the plane perpendicular to the line \(x+y=1\) in the \(x\)-\(y\)-plane. Observe that its intersection with the surface of \(f\) is a curve, in fact, a parabola. We will refer to such a curve as the cross-section of the surface above the line in the \(x\)-\(y\)-plane.
How to think of a rate of change: We can now look at the rate of change (or slope) of \(f\) in a particular direction by looking at the slope of a curve in a plane — something we already have experience with.
Simple case - lines parallel to the x- or y- axis: Let's start by looking at some particularly easy lines: Those parallel to the \(x\)- or \(y\)- axis. Suppose we are interested in the cross-section of \(f(x,y)\) above the line \(y=b\text{.}\) If we substitute \(b\) for \(y\) in \(f(x,y)\text{,}\) we get a function in one variable, describing the height of the cross-section as a function of \(x\text{.}\) Because \(y=b\) is parallel to the \(x\)-axis, if we view it from a vantage point on the negative \(y\)-axis, we will see what appears to be simply an ordinary curve in the \(x\)-\(z\)-plane.
We now consider a particular cross-section. The cross-section above the line \(y=2\) consists of all points \((x,2,x^2+4)\text{.}\) Looking at this cross-section we see what appears to be just the curve \(f(x)=x^2+4\text{.}\) At any point on the cross-section, \((a,2,a^2+4)\text{,}\) the slope of the surface in the direction of the line \(y=2\) is simply the slope of the curve \(f(x)=x^2+4\text{,}\) namely \(2x\text{.}\) Figure 7.4 shows the same parabolic surface as before, but now cut by the plane \(y=2\text{.}\) The left graph shows the cut-off surface, the right shows just the cross-section.
If, for example, we're interested in the point \((-1,2,5)\) on the surface, then the slope in the direction of the line \(y=2\) is \(2x=2(-1)=-2\text{.}\) This means that starting at \((-1,2,5)\) and moving on the surface, above the line \(y=2\text{,}\) in the direction of increasing \(x\)-values, the surface goes down; of course moving in the opposite direction, toward decreasing \(x\)-values, the surface will rise.
Generalizing our findings: If we're interested in some other line \(y=k\text{,}\) there is really no change in the computation. The equation of the cross-section above \(y=k\) is \(x^2+k^2\) with derivative \(2x\text{.}\) We can save ourselves the effort, small as it is, of substituting \(k\) for \(y\text{:}\) all we are in effect doing is temporarily assuming that \(y\) is some constant. With this assumption, the derivative \({d\over dx}(x^2+y^2)=2x\text{.}\) To emphasize that we are only temporarily assuming \(y\) is constant, we use a slightly different notation: \({\partial\over \partial x}(x^2+y^2)=2x\text{;}\) the “\(\partial\)” reminds us that there are more variables than \(x\text{,}\) but that only \(x\) is being treated as a variable. We read the equation as “the partial derivative of \((x^2+y^2)\) with respect to \(x\) is \(2x\text{.}\)”
Based on this discussion, we are now in a position to formally introduce the first-order partial derivatives of \(f\). Of course, we can do the same sort of calculation for lines parallel to the \(y\)-axis. We temporarily hold \(x\) constant, which gives us the equation of the cross-section above a line \(x=k\text{.}\) We can then compute the derivative with respect to \(y\text{;}\) this will measure the slope of the curve in the \(y\) direction.
Definition 7.17. First-Order Partial Derivatives of \(f(x,y)\).
Suppose \(f(x,y)\) is a two-variable function.
Then, the first partial derivative of \(f\) with respect to \(x\) at \((x,y)\) is given by
provided the limit exists,
and the first partial derivative of \(f\) with respect to \(y\) at \((x,y)\) is given by
provided the limit exists.
Note: Convenient alternate notations for the partial derivatives of \(z=f(x,y)\) are given by
Example 7.18. Partial Derivative with respect to \(y\).
Find the partial derivative with respect to \(y\) of \(f(x,y)=\sin(xy)+3xy\text{.}\)
The partial derivative with respect to \(y\) of \(f(x,y)=\sin(xy)+3xy\) is
Example 7.19. Partial Derivatives.
Given the two-variable function \(f(x,y)=x^2-xy+y^5\text{,}\)
Find the first-order partial derivatives \(f_x\) and \(f_y\text{.}\)
Calculate \(f_x(2,1)\) and interpret your result.
Calculate \(f_y(2,1)\) and interpret your result.
-
To find the first-order partial derivative of \(f\) with respect to \(x\text{,}\) we treat the variable \(y\) as a constant and then differentiate as usual. That is,
\begin{equation*} \begin{split} f_x(x,y) \amp= \frac{\partial}{\partial x} \left(x^2-xy+y^5\right)\\ \amp = \frac{\partial}{\partial x} (x^2) - y \frac{\partial}{\partial x}(x) + \frac{\partial}{\partial x}(y^5) = 2x-y.\end{split} \end{equation*}Next, to compute the first-order partial derivative of \(f\) with respect to \(y\text{,}\) we treat the variable \(x\) as a constant. Then,
\begin{equation*} \begin{split} f_y(x,y) \amp= \frac{\partial}{\partial y} \left(x^2-xy+y^5\right)\\ \amp = \frac{\partial}{\partial y} (x^2) - x \frac{\partial}{\partial y}(y) + \frac{\partial}{\partial y}(y^5) = -x+5y^4.\end{split} \end{equation*} -
Letting \(x=2\) and \(y=1\text{,}\) we find
\begin{equation*} f_x(2,1) = 2(2)-1 = 3\text{.} \end{equation*}This means that \(f\) is increasing at a rate of 3 in the \(x\)-direction at the point \((2,1)\text{.}\)
-
We again let \(x=2\) and \(y=1\text{.}\) Then,
\begin{equation*} f_y(2,1) = -2+5(1) = 3\text{,} \end{equation*}which gives the rate at which \(f\) is changing in the \(y\)-direction at the point \((2,1)\text{.}\)
Example 7.20. First-Order Partial Derivatives.
Find the first-order partial derivatives of the following functions.
\(f(x,y) = \dfrac{xy}{x+y^3}\text{.}\)
\(g(s,t) = \left(s + st^2 -t ^3\right)^2\text{.}\)
\(p(x,y) = x\ln(x+y^3)\text{.}\)
-
We first compute \(f_x\text{:}\) to do this, we need to treat \(y\) as a constant. Then
\begin{equation*} f_x(x,y) = y\frac{\partial}{\partial x} \dfrac{x}{x+y^3} = y\dfrac{(x+y^3)-x}{(x+y^3)^2} = \dfrac{y^4}{(x+y^3)^2}\text{.} \end{equation*}Now to compute \(f_y\text{,}\) we consider \(x\) to be constant, which gives
\begin{equation*} f_y(x,y) = x\frac{\partial}{\partial y} \dfrac{y}{x+y^3} = x\frac{(x+y^3)-3y^2}{(x+y^3)^2} = \frac{x(x-2y^3)}{(x+y^3)^2}\text{.} \end{equation*} -
Treating the variable \(t\) as a constant and differentiating with respect to \(s\) gives
\begin{equation*} g_s(s,t) = 2\frac{\partial}{\partial s} \left(s + st^2 -t ^3\right) = 2(t^2+1)(st^2+s-t^3)\text{.} \end{equation*}And so if we treat \(s\) as a constant and differentiate in the \(t\)-direction, we obtain
\begin{equation*} g_t(s,t) = 2\frac{\partial}{\partial t} \left(s + st^2 -t ^3\right) = 2t(2s-3t)(st^2+s-t^3)\text{.} \end{equation*} -
Differentiating in the \(x\)-direction gives
\begin{equation*} p_x(x,y) = \ln(x+y^3) + x\frac{\partial}{\partial x} \ln(x+y^3) = \ln(x+y^3)+\frac{x}{x+y^3}\text{,} \end{equation*}and differentiating in the \(y\)-direction gives
\begin{equation*} p_y(x,y) = x\frac{\partial}{\partial x} \ln(x+y^3) = \frac{3xy^2}{x+y^3}\text{.} \end{equation*}
Example 7.21. First-Order Partial Derivatives.
Find the first-order partial derivatives of the function
Since \(f\) is a three-variable function, it will have three first-order partial derivatives:
So to compute the derivative in the \(x\)-direction, we need to consider both \(y\) and \(z\) as constants and then differentiate with respect to \(x\text{,}\) and similarly for the derivatives in the \(y\)- and \(z\)-direction. We then obtain
Subsection 7.3.2 Applications
In economics, the Cobb-Douglas production function is a specific form of production function that yields the amount of output produced by the amounts of two or more inputs, which are in technological relationship among each other. Here, we only consider one type of example, namely the connection between physical capital and labour, which are defined as follows.
Definition 7.22. Cobb-Douglas Production Function.
The Cobb-Douglas production function is defined by
to represent the amount of output, \(Y\text{,}\) produced by two inputs that are in technological relationship to each other, where specifically
\(L\) is the total number of person-hours worked per year;
\(K\) is the real value of all physical capital such as machinery, equipment, and buildings;
\(a\) is the total factor productivity; and
\(b\in (0,1)\) and \(1-b\) are the output elasticities of labour and capital respectively.
The partial derivative \(Y_L\) measures the rate of change of production with respect to the amount of money expended for labour, when the level of capital expenditure is held fixed. Therefore, \(Y_L\) is called the marginal productivity of labour. Similarly, the partial derivative \(Y_K\) measures the rate of change of production with respect to the amount of money expended for capital, when the level of labour expenditure is held constant. Therefore, \(Y_K\) is called the marginal productivity of capital.
We showcase these concepts with the following example.
Example 7.23. Marginal Productivity.
Suppose a country's production can be described by the function
units, where \(L\) is units of labour and \(K\) is units of capital.
Calculate the marginal productivity of labour and the marginal productivity of capital.
Evaluate \(Y_L\) and \(Y_K\) when \(L=100\) and \(K=55\text{.}\)
Interpret your result.
-
The marginal productivity of labour is calculated to be
\begin{equation*} Y_L = \frac{\partial}{\partial L}15L^{1/3}K^{2/3} = 5\left(\frac{L}{K}\right)^{2/3}\text{,} \end{equation*}and the marginal productivity of capital is
\begin{equation*} Y_K = \frac{\partial}{\partial K}15L^{1/3}K^{2/3} = 10\left(\frac{L}{K}\right)^{1/3}\text{.} \end{equation*} -
When \(L=100\) and \(K=55\text{,}\) we have
\begin{equation*} Y_L(100,55) = 55\left(\frac{55}{100}\right)^{2/3} \approx 3.36\text{,} \end{equation*}and
\begin{equation*} Y_K(100,55) = 10\left(\frac{55}{100}\right)^{1/3} \approx 12.2\text{.} \end{equation*} We see that the marginal productivity of labour is less than the marginal productivity of capital when 100 units is spent on labour and 55 units is spent on capital. Therefore, if we increase the amount spent on capital while keeping the amount spent on labour constant, the resulting productivity will be higher than if we were to increase the amount spent on labour instead.
A further application in economics of partial derivatives is to two-variable functions that represent the relative demands of two commodities that are either competitive or complementary.
The relative demands of two commodities are defined as follows:
Definition 7.24. Relative Demand Equations of Two Commodities.
Let \(A\) and \(B\) be two commodities, then the relative demand equations are given by
\(\begin{aligned}\amp q_A \text{ is the quantity demanded for commodity } A;\\ \amp q_B \text{ is the quantity demanded for commodity } B;\\ \amp p_A \text{ is the unit price for commodity } A; \text{ and } \\ \amp p_B \text{ is the unit price for commodity } B. \end{aligned}\)
Definition 7.25. Competitive Commodities.
The relative demands of two commodities are termed competitive commodities, if they have an inverse relationship to each other, i.e. an increase in price (or decrease in demand) of one commodity results in an increase in demand of the other commodity.
Examples of competitive commodities are bread and cereal, beer and wine, or cherries and strawberries.
Definition 7.26. Complementary Commodities.
The relative demands of two commodities are termed complementary commodities, if they have a direct relationship to each other, i.e. an increase in demand of one commodity results in an increase in demand of the other commodity and vice versa.
Examples of complementary commodities are flat screen TVs and blue-ray players, hamburgers and hamburger buns, or apple pie and vanilla ice cream.
Using partial derivatives, we can readily test whether two relative demands are competitive or complementary.
Definition 7.27. Partial Derivatives of Competitive and Complementary Commodities.
-
If
\begin{equation*} \frac{\partial q_A}{\partial p_B} > 0 \text{ and } \frac{\partial q_B}{\partial p_A} > 0\text{,} \end{equation*}then the commodities \(A\) and \(B\) are competitive.
-
If
\begin{equation*} \frac{\partial q_A}{\partial p_B} \lt 0 \text{ and } \frac{\partial q_B}{\partial p_A} \lt 0\text{,} \end{equation*}then the commodities \(A\) and \(B\) are complementary.
Example 7.28. Competitive and Complementary Commodities.
Let \(q_A\) denote the quantity of apples demanded and \(q_B\) denote the quantity of blueberries demanded in a supermarket. If the demand equations for apples and blueberries are given by
respectively, determine whether the products are competitive, complementary or neither.
We calculate
Since \(p_A\) and \(p_B\) must be positive, we determine that
We thus conclude that the two products are competitive.
Example 7.29. Competitive and Complementary Commodities.
A retailer sells both raincoats and umbrellas. Let \(q_A\) denote the quantity of umbrellas demanded and \(q_B\) denote the quantity of raincoats demanded. The demand equations for raincoats and umbrellas are, respectively,
Determine whether these two commodities are competitive, complementary, or neither.
We calculate
As always, \(p_A\) and \(p_B\) must be positive. We thus determine that
and that the two products are competitive.
Subsection 7.3.3 Tangent Plane
So far, using no new techniques, we have succeeded in measuring the slope of a surface in two quite special directions. For functions of one variable, the derivative is closely linked to the notion of tangent line. For surfaces, the analogous idea is the tangent plane—a plane that just touches a surface at a point, and has the same slope as the surface in all directions. Even though we haven't yet figured out how to compute the slope in all directions, we have enough information to find tangent planes. Suppose we want the plane tangent to a surface at a particular point \((a,b,c)\text{.}\) If we compute the two partial derivatives of the function for that point, we get enough information to determine two lines tangent to the surface, both through \((a,b,c)\) and both tangent to the surface in their respective directions. These two lines determine a plane, that is, there is exactly one plane containing the two lines: the tangent plane. Figure 7.5 shows (part of) two tangent lines at a point, and the tangent plane containing them.
How can we discover an equation for this tangent plane? We know a point on the plane, \((a,b,c)\text{;}\) we need a vector normal to the plane. If we can find two vectors, one parallel to each of the tangent lines we know how to find, then the cross product of these vectors will give the desired normal vector.
How can we find vectors parallel to the tangent lines? Consider first the line tangent to the surface above the line \(y=b\text{.}\) A vector \(\langle u,v,w\rangle\) parallel to this tangent line must have \(y\) component \(v=0\text{,}\) and we may as well take the \(x\) component to be \(u=1\text{.}\) The ratio of the \(z\) component to the \(x\) component is the slope of the tangent line, precisely what we know how to compute. The slope of the tangent line is \(f_x(a,b)\text{,}\) so
In other words, a vector parallel to this tangent line is \(\langle 1,0,f_x(a,b)\rangle\text{,}\) as shown in Figure 7.6. If we repeat the reasoning for the tangent line above \(x=a\text{,}\) we get the vector \(\langle 0,1,f_y(a,b)\rangle\text{.}\)
Now to find the desired normal vector we compute the cross product, \(\langle 0,1,f_y\rangle\times\langle 1,0,f_x\rangle= \langle f_x,f_y,-1\rangle\text{.}\) From our earlier discussion of planes, we can write down the equation we seek: \(f_x(a,b)x+f_y(a,b)y-z=k\text{,}\) and \(k\) as usual can be computed by substituting a known point: \(f_x(a,b)(a)+f_y(a,b)(b)-c=k\text{.}\) There are various more-or-less nice ways to write the result:
Example 7.30. Tangent Plane to a Sphere.
Find the plane tangent to \(x^2+y^2+z^2=4\) at \((1,1,\sqrt2)\text{.}\)
The point \((1,1,\sqrt2)\) is on the upper hemisphere, so we use \(\ds f(x,y)=\sqrt{4-x^2-y^2}\text{.}\) Then \(\ds f_x(x,y)=-x(4-x^2-y^2)^{-1/2}\) and \(\ds f_y(x,y)=-y(4-x^2-y^2)^{-1/2}\text{,}\) so \(f_x(1,1)=f_y(1,1)=-1/\sqrt2\) and the equation of the plane is
The hemisphere and this tangent plane are pictured in Figure 7.5.
So it appears that to find a tangent plane, we need only find two quite simple ordinary derivatives, namely \(f_x\) and \(f_y\text{.}\) This is true if the tangent plane exists. It is, unfortunately, not always the case that if \(f_x\) and \(f_y\) exist there is a tangent plane. Consider the function \(xy^2/(x^2+y^4)\) with \(f(0,0)\) defined to be 0, pictured in Figure 7.1. This function has value 0 when \(x=0\) or \(y=0\text{.}\) Now it's clear that \(f_x(0,0)=f_y(0,0)=0\text{,}\) because in the \(x\) and \(y\) directions the surface is simply a horizontal line. But it's also clear from the picture that this surface does not have anything that deserves to be called a tangent plane at the origin, certainly not the \(x\)-\(y\)-plane containing these two tangent lines.
When does a surface have a tangent plane at a particular point? What we really want from a tangent plane, as from a tangent line, is that the plane be a “good” approximation of the surface near the point. Here is how we can make this precise:
Definition 7.31. Tangent Plane.
Let \(\Delta x=x-x_0\text{,}\) \(\Delta y=y-y_0\text{,}\) and \(\Delta z=z-z_0\) where \(z_0=f(x_0,y_0)\text{.}\) The function \(z=f(x,y)\) is differentiable at \((x_0,y_0)\) if
where both \(\epsilon_1\) and \(\epsilon_2\) approach 0 as \((x,y)\) approaches \((x_0,y_0)\text{.}\)
This definition takes a bit of absorbing. Let's rewrite the central equation a bit:
The first three terms on the right are the equation of the tangent plane, that is,
is the \(z\)-value of the point on the plane above \((x,y)\text{.}\) Equation (7.3.1) says that the \(z\)-value of a point on the surface is equal to the \(z\)-value of a point on the plane plus a “little bit,” namely \(\epsilon_1\Delta x + \epsilon_2\Delta y\text{.}\) As \((x,y)\) approaches \((x_0,y_0)\text{,}\) both \(\Delta x\) and \(\Delta y\) approach 0, so this little bit \(\epsilon_1\Delta x + \epsilon_2\Delta y\) also approaches 0, and the \(z\)-values on the surface and the plane get close to each other. But that by itself is not very interesting: since the surface and the plane both contain the point \((x_0,y_0,z_0)\text{,}\) the \(z\) values will approach \(z_0\) and hence get close to each other whether the tangent plane is tangent to the surface or not. The extra condition in the definition says that as \((x,y)\) approaches \((x_0,y_0)\text{,}\) the \(\epsilon\) values approach 0—this means that \(\epsilon_1\Delta x + \epsilon_2\Delta y\) approaches 0 much, much faster, because \(\epsilon_1\Delta x\) is much smaller than either \(\epsilon_1\) or \(\Delta x\text{.}\) It is this extra condition that makes the plane a tangent plane.
We can see that the extra condition on \(\epsilon_1\) and \(\epsilon_2\) is just what is needed if we look at partial derivatives. Suppose we temporarily fix \(y=y_0\text{,}\) so \(\Delta y=0\text{.}\) Then the equation from the definition becomes
or
Now taking the limit of the two sides as \(\Delta x\) approaches 0, the left side turns into the partial derivative of \(z\) with respect to \(x\) at \((x_0,y_0)\text{,}\) or in other words \(f_x(x_0,y_0)\text{,}\) and the right side does the same, because as \((x,y)\) approaches \((x_0,y_0)\text{,}\) \(\epsilon_1\) approaches 0. Essentially the same calculation works for \(f_y\text{.}\)
Subsection 7.3.4 Second-Order Partial Derivatives
The first-order partial derivatives \(\frac{\partial f}{\partial x}\) and \(\frac{\partial f}{\partial y}\) of a two-variable function \(f(x,y)\) are again functions of the two variables \(x\) and \(y\text{.}\) Therefore, we can compute the derivative of each function \(\frac{\partial f}{\partial x}(x,y)\) and \(\frac{\partial f}{\partial y}(x,y)\) to obtain the second-order partial derivatives of \(f\text{.}\)
Definition 7.32. Second-Order Partial Derivatives of \(f(x,y)\).
Suppose \(f(x,y)\) is a two-variable function. Then we obtain the four second-order partial derivatives by differentiating the functions \(f_x\) and \(f_y\) with respect to \(x\) and \(y\text{:}\)
\(\dfrac{\partial^2 f}{\partial x^2} = \dfrac{\partial}{\partial x} \left(\dfrac{\partial f}{\partial x}\right)\)
\(\dfrac{\partial^2 f}{\partial y\partial x} = \dfrac{\partial}{\partial y} \left(\dfrac{\partial f}{\partial x}\right)\)
\(\dfrac{\partial^2 f}{\partial x \partial y} = \dfrac{\partial}{\partial x} \left(\dfrac{\partial f}{\partial y}\right)\)
\(\dfrac{\partial^2 f}{\partial y^2} = \dfrac{\partial}{\partial y}\left(\dfrac{\partial f}{\partial y}\right)\)
Note:
-
The notation for the second-order partial derivative is analogous to the notation for the ordinary second derivative in single-variable calculus:
\begin{equation*} f_{xy}=\left(f_x\right)_y=\frac{\partial^2 f}{\partial y \partial x} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right)\text{.} \end{equation*} When multiple distinct independent variables are involved in second-order partial derivatives, then they are also referred to as mixed partial derivatives. For example, \(f_{xy}\) and \(f_{yx}\text{.}\)
In general, we have that \(f_{xy} \neq f_{yx}\text{.}\) However, if the second-order partial derivatives are continuous around a point \((a,b)\text{,}\) then \(f_{xy}(a,b) = f_{yx}(a,b)\text{.}\) This is a theorem that is variously referenced to as Schwarz's theorem or Clairaut's theorem, but we would need real analysis in order to prove it, so we state it here without proof. Most functions we will encounter in this course satisfy Clairaut's theorem.
Figure 7.7 is a schematic way of demonstrating how the four second-order partial derivatives of \(f\) are calculated.
Theorem 7.33. Clairaut's Theorem.
If the mixed partial derivatives are continuous, they are equal.
Example 7.34. Second-Order Partial Derivatives.
Find the second-order partial derivatives of the function
\(f(x,y)=x^2-2x^2y+xy^2+y^3\text{.}\)
\(g(x,y) = e^{x^2y}\text{.}\)
-
We will first calculate \(f_x\) and \(f_y\text{.}\)
\begin{equation*} f_x = 2x-4xy+y^2, \text{ and } f_y=-2x^2+2xy+2y^2\text{.} \end{equation*}Hence, the four second-order partial derivatives of \(f\) are
\begin{equation*} \begin{array}{l} f_{xx} = \frac{\partial}{\partial x} \left(2x-4xy+y^2\right) = 2-4y \\[1ex] f_{xy} = \frac{\partial}{\partial y} \left(2x-4xy+y^2\right) = -4x+2y \\[1ex] f_{yy} = \frac{\partial}{\partial y} \left(-2x^2+2xy+2y^2\right) = 2x+4y \\[1ex] f_{yx} = \frac{\partial}{\partial x} \left(-2x^2+2xy+2y^2\right) =-4x+2 = f_{xy}. \end{array} \end{equation*} -
The first-order partial derivatives of \(g\) are
\begin{equation*} g_x = 2xye^{x^2y}, \text{ and } g_y=x^2e^{x^2y}\text{.} \end{equation*}Thus, the second-order partial derivatives of \(g\) are given by
\begin{equation*} \begin{array}{l} g_{xx} = \frac{\partial}{\partial x} \left(2xye^{x^2y}\right) = 2ye^{x^2y} + 4x^2y^2e^{x^2y}\\[1ex] g_{xy} = \frac{\partial}{\partial y} \left(2xye^{x^2y}\right) = 2x^3ye^{x^2y}+2xe^{x^2y}\\[1ex] g_{yy} = \frac{\partial}{\partial y} \left(x^2e^{x^2y}\right) = x^4e^{x^2y}\\[1ex] g_{yx} = \frac{\partial}{\partial x} \left(x^2e^{x^2y}\right) =2x^3ye^{x^2y}+2xe^{x^2y} = g_{xy}. \end{array} \end{equation*}
Exercises for Section 7.3.
Exercise 7.3.1.
Find \(f_x\) and \(f_y\) of the following functions \(f(x,y)\text{.}\)
-
\(\ds f(x,y)=\cos(x^2y)+y^3\)
AnswerSolution\(f_x = -2xy\sin(x^2y)\text{,}\) \(f_y = -x^2\sin(x^2y)+3y^2\)Given \(f(x,y) = \cos(x^2y) + y^3\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x (x,y) = -2xy\sin(x^2y) \end{equation*}\begin{equation*} f_y(x,y) = -x^2\sin(x^2y)+3y^2 \end{equation*} -
\(\ds f(x,y)={xy\over x^2+y}\)
AnswerSolution\(f_x = (y^2-x^2y)/(x^2+y)^2\text{,}\) \(f_y = x^3/(x^2+y)^2\)Given \(f(x,y) = \dfrac{xy}{x^2+y}\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x(x,y) = \dfrac{y(x^2+y) - 2x(xy)}{(x^2+y)^2} = \dfrac{y^2-x^2y}{(x^2+y)^2} \end{equation*}\begin{equation*} f_y(x,y) = \dfrac{x(x^2+y)-(xy)}{(x^2+y)^2} = \dfrac{x^3-xy}{(x^2+y)^2} \end{equation*} -
\(\ds f(x,y)=e^{x^2+y^2}\)
AnswerSolution\(f_x = 2xe^{x^2+y^2}\text{,}\) \(f_y = 2ye^{x^2+y^2}\)Given \(f(x,y)=e^{x^2+y^2}\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x (x,y) = \frac{\partial}{\partial x} e^{x^2+y^2} = e^{x^2+y^2} \frac{\partial}{\partial x} \left(x^2+y^2\right) = 2x e^{x^2+y^2} \end{equation*}\begin{equation*} f_y (x,y) = \frac{\partial}{\partial y} e^{x^2+y^2} = e^{x^2+y^2} \frac{\partial}{\partial y} \left(x^2+y^2\right) = 2y e^{x^2+y^2} \end{equation*} -
\(\ds f(x,y)=xy\ln(xy)\)
AnswerSolution\(f_x = \ln(xy)+y\text{,}\) \(f_y = x\ln(xy)+x\)Given \(f(x,y) = xy\ln(xy)\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x(x,y) = y\ln(xy) + xy \frac{y}{xy} = y\ln(xy) + y \end{equation*}\begin{equation*} f_y(x,y) = x\ln(xy) + xy \frac{x}{xy} = x\ln(xy) + x \end{equation*} -
\(\ds f(x,y)=\sqrt{1-x^2-y^2}\)
AnswerSolution\(f_x = -x/\sqrt{1-x^2-y^2}\text{,}\) \(f_y = -y/\sqrt{1-x^2-y^2}\)Given \(f(x,y) = \sqrt{1-x^2-y^2}\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x(x,y) = \frac{1}{2\sqrt{1-x^2-y^2}} (-2x) = -\frac{x}{\sqrt{1-x^2-y^2}} \end{equation*}\begin{equation*} f_y(x,y) = \frac{1}{2\sqrt{1-x^2-y^2}} (-2y) = -\frac{y}{\sqrt{1-x^2-y^2}} \end{equation*} -
\(\ds f(x,y)=x\tan(y)\)
AnswerSolution\(f_x = \tan y\text{,}\) \(f_y = x\sec^2 y\)Given \(f(x,y) = x\tan(y)\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x(x,y) = \tan(y) \end{equation*}\begin{equation*} f_y(x,y) = x\sec^2 (y) \end{equation*} -
\(\ds f(x,y)={1\over xy}\)
AnswerSolution\(f_x = -1/(x^2y)\text{,}\) \(f_y = -1/(xy^2)\)Given \(f(x,y) = \dfrac{1}{xy}\text{,}\) we compute the following partial derivatives:
\begin{equation*} f_x(x,y) = \dfrac{-y}{(xy)^2} = \frac{-1}{x^2y} \end{equation*}\begin{equation*} f_y(x,y) = \dfrac{-x}{(xy)^2} = \frac{-1}{xy^2} \end{equation*}
Exercise 7.3.2.
Evaluate the first partial derivatives of the function at the given point.
-
\(f(x,y)=x^2y+xy^2\) at \((1,3)\)
AnswerSolution\(f_x(1,3) = 15\text{,}\) \(f_y(1,3) = 7\)We first compute
\begin{equation*} f_x(x,y) = 2xy + y^2\text{,} \end{equation*}and
\begin{equation*} f_y(x,y) = x^2 + 2xy\text{.} \end{equation*}Therefore, when \(x=1\) and \(y=3\text{,}\) we have
\begin{equation*} f_x(1,3) = 2(1)(3) + 3^2 = 15\text{,} \end{equation*}and
\begin{equation*} f_y(1,3) = 1^2+2(1)(3) = 7\text{.} \end{equation*} -
\(g(x,y) = x\sqrt{y}\) at \((4,4)\)
AnswerSolution\(g_x(4,4)=2\text{,}\) \(g_y(4,4)=1\)We first differentiate:
\begin{equation*} g_x(x,y) = \sqrt{y}, \text{ and } g_y(x,y) = \frac{x}{2\sqrt{y}}\text{.} \end{equation*}Therefore,
\begin{equation*} g_x(4,4) = \sqrt{4} = 2, \text{ and } g_y(4,4) = \frac{4}{2\sqrt{4}} = 1\text{.} \end{equation*} -
\(f(s,t) = s/t\) at \((-1,2)\)
AnswerSolution\(f_s(-1,2)=1/2\text{,}\) \(f_t(-1,2)=1/4\)\(f_s=\diffp{f}{s}=1/t\text{,}\) and \(f_t=\diffp{f}{t}=-s/t^2\text{.}\) Therefore,
\begin{equation*} f_s(-1,2)=1/2, \ \ \text{ and } \ \ f_t(-1,2)=1/(2)^2=1/4\text{.} \end{equation*} -
\(p(x,y) = e^{xy}\) at \((1,-1)\)
AnswerSolution\(p_x(1,-1) = -1/e\text{,}\) \(p_y(1,-1) = 1/e\)\(p_x = \diffp{p}{x}=ye^{xy}\text{,}\) and \(p_y=\diffp{p}{y}=xe^{xy}\text{.}\) Thus, when \(x=1\) and \(y=-1\text{,}\) we have
\begin{equation*} p_x(1,-1)=-1e^{-1}=-1/e, \ \ \text{ and } \ \ p_y(1,-1)=1e^{-1}=1/e\text{.} \end{equation*} -
\(h(a,b,c) = a^2bc^3\) at \((1,1,2)\)
AnswerSolution\(h_a(1,1,2)=16\text{,}\) \(h_b(1,1,2)=8\text{,}\) \(h_c(1,1,2)=12\)We now have three first order partial derivatives:
\begin{equation*} h_a(a,b,c) = 2abc^3 \end{equation*}\begin{equation*} h_b(a,b,c) = a^2c^3 \end{equation*}\begin{equation*} h_c(a,b,c) = 3a^2bc^2 \end{equation*}Evaluated at the point \((1,1,2)\text{,}\) we find
\begin{equation*} h_a (1,1,2) = 16, \ \ h_b(a,b,c) = 8, \ \ h_c(a,b,c) = 12\text{.} \end{equation*} -
\(f(p,q) = \sin(pq)\) at \((\pi/2, 1)\)
AnswerSolution\(f_p(\pi/2,1) = 0, f_q(\pi/2,1) = 0\)We find that
\begin{equation*} f_p(p,q) = q\cos(pq), \text{ and } f_q(p,q) = p\cos(pq)\text{.} \end{equation*}Thus, evaluated at the point \((\pi/2,1)\text{,}\) we see that
\begin{equation*} f_p\left(\frac{\pi}{2},1\right) = 0, \text{ and } f_q\left(\frac{\pi}{2},1\right) = 0\text{.} \end{equation*} -
\(h(a,b) = e^{\sin(ab)}\) at \((\pi,1)\)
AnswerSolution\(h_a = -1\text{,}\) \(h_b = -\pi\)We find:
\begin{equation*} h_a(a,b) = b\cos(ab)e^{\sin(ab)}, \text{ and } h_b(a,b) = a\cos(ab)e^{\sin(ab)}\text{.} \end{equation*}Therefore,
\begin{equation*} h_a(\pi,1) = -1, \text{ and } h_b(\pi,1) = -\pi\text{.} \end{equation*} -
\(g(x,y) = \frac{\sin(x)\cos(y)}{x+y}\) at \((\pi/3,\pi/3)\)
Answer\(g_x=\frac{1}{1+\pi}\text{,}\) \(g_y = 0\)
Exercise 7.3.3.
Suppose the productivity of a country can be approximated by
where \(L\) is units of labour and \(K\) is units of capital.
-
Calculate \(Y_K\) and \(Y_L\text{.}\)
AnswerSolution\(Y_K = 9(K/L)^{2/5}\text{,}\) \(Y_L=6(K/L)^{3/5}\text{.}\)We first calculate the first partial derivatives of the productivity function \(Y(K,L)\text{:}\)
\begin{equation*} Y_k=\diffp{}{K}\left(15L^{3/5}K^{2/5}\right)=15\left(\frac{2}{5}\right)L^{3/5}K^{-3/5}=6\left(\frac{L}{K}\right)^{3/5}\text{,} \end{equation*}and
\begin{equation*} Y_L=\diffp{}{L}\left(15L^{3/5}K^{2/5}\right)=15\left(\frac{3}{5}\right)L^{-2/5}K^{2/5}=9\left(\frac{K}{L}\right)^{2/5}\text{.} \end{equation*} -
Calculate the marginal productivity of labour and the marginal productivity of capital when \(L=100\) and \(K=55\text{.}\) Interpret your results.
AnswerSolution7.09,8.58Therefore, when the units of labour are set at \(L=100\) and the units of capital are set at \(K=55\text{,}\) the marginal productivity of labour is
\begin{equation*} Y_L(55,100) \approx 8.6\text{,} \end{equation*}and the marginal productivity of capital is
\begin{equation*} Y_K(55,100) \approx 7.1\text{.} \end{equation*}We see that, at the point \((55,100)\text{,}\) \(Y_L > Y_K\text{.}\) This means that an increase in labour will result in a greater increase in productivity than would an increase in capital. Therefore, it is advisable to increase labour over increasing capital.
Exercise 7.3.4.
Suppose the productivity of a country can be approximated by
where \(L\) is units of labour and \(K\) is units of capital.
-
Calculate \(Y_K\) and \(Y_L\text{.}\)
Answer\(Y_L= \left(\frac{5K}{4L}\right)^{3/4}\text{,}\) \(Y_K=\left(\frac{15L}{4K}\right)^{1/4}\text{.}\) -
Calculate the marginal productivity of labour and the marginal productivity of capital when \(L=33\) and \(K=100\text{.}\) Interpret your results.
Answer2.87,2.84.
Exercise 7.3.5.
Suppose the density of houses in a city district is given by
where \(x\) and \(y\) are measured in kilometres and lie in the region described by the graph below.
-
Calculate \(\rho_x\) and \(\rho_y\text{.}\)
Answer\(\rho_x = -10\text{,}\) \(\rho_y=-10(y-1)\text{.}\) -
What can you say about the density of housing around the point \((1,0)\text{?}\)
Answer\(\rho_x (1,0) =-10\) and \(\rho_y(1,0)=10\text{.}\) Therefore density is increasing in the \(y\)-direction and decreasing in the \(x\)-direction.
Exercise 7.3.6.
An office supply store sells \(q_N\) notebooks and \(q_P\) pencils. Suppose the demand equation for notebooks and pencils are, respectively
(where \(p_N\) and \(p_P\) are the respective unit prices). Are these two products are competitive, complementary, or neither?
Answercomplementary
Exercise 7.3.7.
A network TV station sells online and cable subscriptions. Suppose the demand equation for online and cable subscriptions are, respectively
(where \(p_O\) and \(p_C\) are the respective unit prices). Are these two products are competitive, complementary, or neither?
Answercompetitive
We wish to determine whether the two types of subscriptions are competitive or complementary commodities. Given that \(p_o\) is the unit price of the online subscriptions and \(p_c\) is the unit price of cable subscriptions, we first calculate the rate of change of the demand of the online subscriptions, \(q_o=f(p_o,p_c)\text{,}\) with respect to the unit price of cable subscriptions, \(p_c\text{.}\) That is,
We also need to compute the rate of change of the demand of cable subscriptions, \(q_c=g(p_o,p_c)\text{,}\) with respect to the unit price of the online subscriptions, \(p_c\text{.}\) That is,
Both \(p_o\) and \(p_c\) are necessarily positive, and so both \(f_{p_c} > 0\) and \(g_{p_o} > 0\text{.}\) We conclude that the products are competitive.
Exercise 7.3.8.
Find an equation for the plane tangent to the following functions \(f(x,y) = z\) at the given point.
-
\(\ds 2x^2+3y^2-z^2=4\) at \((1,1,-1)\text{.}\)
AnswerSolution\(z=-2(x-1)-3(y-1)-1\)We first differentiate implicitly with respect to \(x\text{:}\)
\begin{equation*} \begin{split} \diffp{}{x} \bigl(2x^2+3y^2-z^2\bigr) \amp = \diffp{}{x} \bigl(4\bigr)\\ 4x - 2z\diffp{z}{x} \amp = 0 \\ \diffp{z}{x} \amp = \frac{2x}{z} \end{split} \end{equation*}Now differentiate implicitly with respect to \(y\text{:}\)
\begin{equation*} \begin{split} \diffp{}{y} \bigl(2x^2+3y^2-z^2\bigr) \amp = \diffp{}{y} \bigl(4\bigr)\\ 6y - 2z\diffp{z}{y} \amp = 0 \\ \diffp{z}{y} \amp = \frac{3y}{z} \end{split} \end{equation*}Therefore, at the point \((1,1,-1)\text{,}\) we have
\begin{equation*} \diffp{z}{x} = \frac{2(1)}{-1} = -2, \ \ \text{ and } \ \ \diffp{z}{y} = \frac{3(1)}{-1} = -3\text{.} \end{equation*}Hence, the equation of the tangent plane at the point \((1,1,-1)\) is given by
\begin{equation*} z=-2(x-1) -3 (y-1) -1\text{.} \end{equation*} -
\(\ds f(x,y)=\sin(xy)\) at \((\pi,1/2,1)\)
AnswerSolution\(z=1\)Calculate
\begin{equation*} f_x=\diffp{}{x} \sin(xy) = y\cos(xy) \ \ \text{ and } \ \ f_y=\diffp{}{y} \sin(xy) = x\cos(xy)\text{.} \end{equation*}So
\begin{equation*} f_x\left(\pi,1/2\right) = 0 = f_y\left(\pi,1/2\right)\text{.} \end{equation*}The equation of the tangent plane to \(f(x,y)\) at the point \((\pi,1/2,1)\) is therefore constant and given by \(z=1\text{.}\)
-
\(\ds f(x,y)=x^2+y^3\) at \((3,1,10)\)
AnswerSolution\(z=6(x-3)+3(y-1)+10\)The two first order partial derivatives are
\begin{equation*} f_x = \diffp{}{x} \bigl(x^2+y^3\bigr) = 2x, \ \ \text{ and } \ \ f_y = \diffp{}{y} \bigl(x^2+y^3\bigr) = 3y^2\text{.} \end{equation*}Therefore, evaluated at the point \((3,1,10)\text{,}\) we have
\begin{equation*} f_x(3,1,10) = 2(3) = 6, \ \ \text{ and } \ \ f_y(3,1,10) = 3(1)^2 = 3\text{.} \end{equation*}The equation of the tangent plane to \(f(x,y)\) at the point \((3,1,10)\) is therefore
\begin{equation*} z = 6(x-3) + 3(y-1) +10\text{.} \end{equation*} -
\(\ds f(x,y)=x\ln(xy)\) at \((2,1/2,0)\)
AnswerSolution\(z=(x-2)+4(y-1/2)\)The two first order partial derivatives are
\begin{equation*} f_x = \diffp{}{x} \bigl(x\ln(xy)\bigr) = \ln(xy)+1, \ \ \text{ and } \ \ f_y = \diffp{}{y} \bigl(x\ln(xy)\bigr) = \frac{x}{y}\text{.} \end{equation*}Therefore, evaluated at the point \((2,1/2,0)\text{,}\) we have
\begin{equation*} f_x(2,1/2,0) = \ln(1)+1 = 1, \ \ \text{ and } \ \ f_y(2,1/2,0) = 2/(1/2) = 4\text{.} \end{equation*}The equation of the tangent plane to \(f(x,y)\) at the point \((2,1/2,0)\) is therefore
\begin{equation*} z = (x-2) + 4(y-1/2)\text{.} \end{equation*}
Exercise 7.3.9.
Find an equation for the line normal to \(\ds x^2+4y^2=2z\) at \((2,1,4)\text{.}\)
Answer\(r(t)=\langle 2,1,4\rangle+t\langle 2,4,-1\rangle\)
Differentiate the relation implicitly with respect to both \(x\) and \(y\text{:}\)
Therefore, at the point \((2,1,4)\text{,}\)
By definition, the equation of the normal line is thus
Exercise 7.3.10.
Explain in your own words why, when taking a partial derivative of a function of multiple variables, we can treat the variables not being differentiated as constants.
SolutionIn three dimensions, the partial derivative with respect to \(x\) tells us the rate of change of the surface in the \(x\)-direction. That is, \(f_x(a,b)\) tells us how the surface changes if we move an infinitesimal amount away from \(x=a\) while keeping \(y=b\) fixed. Therefore, the \(y\) variable is considered to be a constant. A similar argument holds for the partial derivative with respect to \(y\) and in higher dimensions.
Exercise 7.3.11.
Consider a differentiable function, \(f(x,y)\text{.}\) Give physical interpretations of the meanings of \(f_x(a,b)\) and \(f_y(a,b)\) as they relate to the graph of \(f\text{.}\)
SolutionGiven a differentiable function \(f(x,y)\text{,}\) the partial derivative \(f_x(a,b)\) is the instantaneous rate of change of \(f\) at the point \((a,b)\) in the \(x\)-direction. Similarly, the partial derivative \(f_y(a,b)\) is the instantaneous rate of change of \(f\) at the point \((a,b)\) in the \(y\)-direction.
Exercise 7.3.12.
In much the same way that we used the tangent line to approximate the value of a function from single variable calculus, we can use the tangent plane to approximate a function from multivariable calculus. Consider the tangent plane found in Exercise 7.30. Use this plane to approximate \(f(1.98, 0.4)\text{.}\)
SolutionIn Example 7.30, we found that the tangent plane to the sphere \(x^2+y^2+z^2=4\) at the point \((1,1,\sqrt{2})\) was
Therefore, we can evalaute this tangent plane at the point \((1.98,0.4)\) in order to estimate the value of the surface at this point:
Exercise 7.3.13.
The volume of a cylinder is given by \(V=\pi r^2 h\text{.}\) Suppose that the current values of \(r\) and \(h\) are \(r=7\) cm and \(h=3\) cm. Is the volume more sensitive to a small change in radius or the same amount of change in height? Why?
Answerheight
We compute
When \(r=7\) and \(h=3\text{,}\) we have
Hence, the volume will be more sensitive to a small change in the height.
Exercise 7.3.14.
Suppose that one of your colleagues has calculated the partial derivatives of a given function, and reported to you that \(f_x(x,y)=2x+3y\) and that \(f_y(x,y)=4x+6y\text{.}\) Do you believe them? Why or why not? If not, what answer might you have accepted for \(f_y\text{?}\)
AnswerLet's assume that the answer \(f_x=2x+3y\) is correct. Then \(f\) must have the form
for some single-variable function \(g(y)\text{.}\) Therefore, the partial derivative with respect to \(y\) must be of the form
Therefore, the answer \(f_y=4x+6y\) must be incorrect, although we might have accepted the answer \(f_y=3x+6y\text{.}\)
Exercise 7.3.15.
Suppose \(f(t)\) and \(g(t)\) are single variable differentiable functions. Find \(\partial z/\partial x\) and \(\partial z/\partial y\) for each of the following two variable functions.
Exercise 7.3.16.
Let \(\ds Q(p,q)=pq/(p^2+q^2)\text{;}\) compute \(Q_{pp}\text{,}\) \(Q_{qp}\text{,}\) and \(Q_{qq}\text{.}\)
Answer\(Q_{pp}=(2p^3q-6pq^3)/(p^2+q^2)^3\text{,}\) \(Q_{qq}=(2pq^3-6p^3q)/(p^2+q^2)^3\)
Given \(Q(p,q) = \dfrac{pq}{p^2+q^2}\text{,}\) we have the first-order partial derivatives:
Therefore, we find the following second-order partial derivatives:
Exercise 7.3.17.
Determine all first and second partial derivatives of the following functions.
-
\(f(x,y) = x^2y^2+y^3\)
AnswerSolution\(f_x = 2xy^2\text{,}\) \(f_y = y(2x^2+3y)\text{,}\)\(f_{xx}=2y^2\text{,}\) \(f{yy}=2(x^2+3y)\text{,}\) \(f_{xy}=4xy=f_{yx}\text{.}\)We calculate the first-order partial derivatives of \(f(x,y) = x^2y^2+y^3\text{:}\)
\begin{equation*} \diffp{f}{x} = 2xy^2, \ \ \text{ and } \ \ \diffp{f}{y} = 2x^2y+3y^2\text{.} \end{equation*}Therefore, the second-order partial derivatives are:
\begin{gather*} \frac{\partial^2 f}{\partial x^2} = \diffp{}{x} 2xy^2 = 2y^2\\ \frac{\partial^2 f}{\partial y^2} = \diffp{}{y} \bigl(2x^2y+3y^2\bigr) = 2x^2+6y\\ \frac{\partial^2 f}{\partial y \partial x}= \diffp{}{y} 2xy^2 = 4xy = \frac{\partial^2 f}{\partial x \partial y} \end{gather*} -
\(f(x,y) = 2x^2+xy+3\)
AnswerSolution\(f_x = 4x+y^3\text{,}\) \(f_y =3xy^2\text{,}\) \(f_{xx}=4\text{,}\) \(f_{yy}=6xy\text{,}\) \(f_{xy}=3y^2=f_{yx}\text{.}\)We calculate the first-order partial derivatives of \(f(x,y) = 2x^2+xy+3\text{:}\)
\begin{equation*} \diffp{f}{x} = 4x+y, \ \ \text{ and } \ \ \diffp{f}{y} = x\text{.} \end{equation*}Therefore, we compute:
\begin{gather*} \frac{\partial^2 f}{\partial x^2} = \diffp{}{x} (4x+y) = 4\\ \frac{\partial^2 f}{\partial y^2} = \diffp{}{y} (x) = 0\\ \frac{\partial^2 f}{\partial y \partial x}= \diffp{}{y} (4x+y) = 1 = frac{\partial^2 f}{\partial x \partial y} \end{gather*} -
\(f(x,y) = y\sin x\)
AnswerSolution\(f_x = y\cos(x)\text{,}\) \(f_y = \sin(x)\text{,}\) \(f_{xx}=-y\sin(x)\text{,}\) \(f_{yy}=0\text{,}\) \(f_{xy}=\cos(x)=f_{yx}\text{.}\)We calculate the first-order partial derivatives of \(f(x,y)=y\sin x\text{:}\)
\begin{equation*} \frac{\partial f}{\partial x} = y \cos x, \text{ and } \end{equation*}\begin{equation*} \frac{\partial f}{\partial y} = \sin x\text{.} \end{equation*}We now compute the second-order partial derivatives:
\begin{gather*} \frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x} (y\cos x) = -y\sin x\\ \frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y} \sin x = 0\\ \frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x} (\sin x) = \cos x = \frac{\partial}{\partial y} (y\cos x) = \frac{\partial^2 f}{\partial y \partial x} \end{gather*} -
\(f(x,y) = \sin(2y)\cos(x)\)
AnswerSolution\(f_x=-\sin(x)sin(2y)\text{,}\) \(f_y=2\cos(x)\cos(2y)\text{,}\) \(f_{xx}=-\cos(x)\sin(2y)\text{,}\) \(f_{yy}=-4\cos(x)\sin(2y)\text{,}\) \(f_{xy}=-2\sin(x)\cos(2y)=f_{yx}\text{.}\)We calculate the first-order partial derivatives of \(f(x,y) = \sin(2y)\cos(x)\text{:}\)
\begin{equation*} f_x = -\sin(2y)\sin(x) \ \ \text{ and } \ \ f_y = 2\cos(2y)\cos(x)\text{.} \end{equation*}Therefore, the second-order partial derivatives are:
\begin{gather*} f_{xx} = -\cos(x)\sin(2y)\\ f_{yy} = -4\cos(x)\sin(2y)\\ f_{xy} = -2\sin(x)\cos(2y) = f_{yx} \end{gather*} -
\(f(x,y) = e^{x^2-y}\)
AnswerSolution\(f_x=2xe^{x^2-y}\text{,}\) \(f_y=-e^{x^2-y}\text{,}\) \(f_{xx}=2(2x^2+1)e^{x^2-y}\text{,}\) \(f_{yy}=e^{x^2-y}\text{,}\) \(f_{xy}=-2xe^{x^2-y}=f_{yx}\text{.}\)We calculate the first-order partial derivatives of \(f(x,y)=e^{x^2-y}\text{:}\)
\begin{equation*} \frac{\partial f}{\partial x} = e^{x^2-y} \frac{\partial}{\partial x} \left(x^2-y\right) = 2xe^{x^2-y}, \text{ and } \end{equation*}\begin{equation*} \frac{\partial f}{\partial y} = e^{x^2-y} \frac{\partial}{\partial y} \left(x^2-y\right) = -e^{x^2-y}\text{.} \end{equation*}Hence, the second-order partial derivatives are:
\begin{gather*} \frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x} 2xe^{x^2-y} = 2e^{x^2-y} + 2x\left(2xe^{x^2-y}\right) = e^{x^2-y}\left(2+4x^2\right),\\ \frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y} (-e^{x^2-y}) = e^{x^2-y}, \text{ and }\\ \frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x} (-e^{x^2-y}) = -2xe^{x^2-y} = \frac{\partial^2 f}{\partial y \partial x}\text{.} \end{gather*} -
\(f(x,y) = \ln\sqrt{x^2+y^2}\)
AnswerSolution\(f_x=\frac{x}{x^2+y^2}\text{,}\) \(f_y=\frac{y}{x^2+y^2}\text{,}\) \(f_{xx}=\frac{y^2-x^2}{(x^2+y^2)^2}\text{,}\) \(f_{yy}=\frac{x^2-y^2}{(x^2+y^2)^2}\)\(f_{xy}=\frac{-2xy}{(x^2+y^2)^2}=f_{yx}\)We calculate the first-order partial derivatives of \(f(x,y) = \ln\sqrt{x^2+y^2}\text{:}\)
\begin{equation*} f_x = \frac{2x}{2(x^2+y^2)} = \frac{x}{x^2+y^2} , \ \ \text{ and } \ \ f_y = \frac{2y}{2(x^2+y^2)} = \frac{y}{x^2+y^2}\text{.} \end{equation*}We now compute all second-order partial derivatives of \(f\text{:}\)
\begin{gather*} f_{xx} = \frac{y^2-x^2}{(x^2+y^2)^2}\\ f_{yy} = \frac{x^2-y^2}{(x^2+y^2)^2}\\ f_{xy} = \frac{-2xy}{(x^2+y^2)^2} = f_{yx} \end{gather*}
Exercise 7.3.18.
Prove that the function \(u(x,t)=e^{-\alpha^2k^2t}\sin(kx)\) is a solution to the heat equation
where \(\alpha\) and \(k\) are constants.
SolutionWe need to show that the given function \(u(x,t)\) satisfies the equation
Let's first compute the partial derivatives \(u_t\) and \(u_{xx}\text{.}\)
and
Therefore,
as desired.
As an aside, we could also give a physical argument. Consider the solution \(u(x,t)\) we verified above on the domain \(x \in [-2\pi,2\pi]\) and \(t\geq 0\text{.}\) Taking snapshots of the function at times \(t=0,1,2\) and choosing \(\alpha=k=1\) for simplicity, we see
Suppose \(u\) describes the evolution in time and space of temperature in a thin wire (\(\Delta y \approx 0\)) of length \(4\pi\) on the domain described above. Suppose also that we fix the temperature at both ends of the wire at \(u(-2\pi,t)=u(2\pi,t)=0\text{,}\) allowing heat to flow out through the ends.
If we initially heat the wire according to \(u(x,0)=\sin(x)\text{,}\) then the above plots show us that the amplitude of the sine wave decreases with time. We interpret this as heat moving from areas of high temperature to areas of low temperature (this is known as Fourier's Law). Eventually, since
we see that in the late time limit, the temperature of the wire is no longer changing. This simply means that the wire has no internal source of heat.
Exercise 7.3.19.
Prove that \(u=\sin(x-at)+\ln(x+at)\) is a solution to the wave equation
where \(a\) is a constant.
SolutionWe need to show that the given function \(u(x,t)\) satisfies the equation
Let's first compute the partial derivatives \(u_{tt}\) and \(u_{xx}\text{.}\)
and
Therefore, we have that
Hence, the funciton \(u(x,t)\) is a solution to the wave equation.
Exercise 7.3.20.
How many distinct third-order derivatives does a function of 2 variables have?
AnswerA function of 2 variables has exactly 2 first-order partial derivatives, and 4 second-order partial derivatives. Since each of the 4 second-order partial derivatives can be differentiated again with respect to either \(x\) or \(y\text{,}\) this means that there will be 8 third-order partial derivatives.
Exercise 7.3.21.
How many distinct \(n\)-th-order derivatives does a function of 2 variables have?
AnswerA function of 2 variables has exactly \(2^1=2\) first-order partial derivatives, and \(2^2=4\) second-order partial derivatives. Since each of the 4 second-order partial derivatives can be differentiated again with respect to either \(x\) or \(y\text{,}\) this means that there will be \(2^3=8\) third-order partial derivatives. In general, we find that there will be \(2^n\) distinct \(n\)-th order partial derivatives.