## Section7.3Partial 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.

### Subsection7.3.1First-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.

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

Solution

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.

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

Solution

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.

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

\begin{equation*} \frac{\partial f}{\partial x} = \lim_{h\to 0} \frac{f(x+h,y)-f(x,y)}{h} \end{equation*}

provided the limit exists,

and the first partial derivative of $f$ with respect to $y$ at $(x,y)$ is given by

\begin{equation*} \frac{\partial f}{\partial y} = \lim_{k\to 0} \frac{f(x,y+k)-f(x,y)}{k} \end{equation*}

provided the limit exists.

Note: Convenient alternate notations for the partial derivatives of $z=f(x,y)$ are given by

\begin{equation*} \begin{split} f_x(x,y) \amp = f_x = \frac{\partial f}{\partial x} = \frac{\partial}{\partial x} \left(f(x,y)\right) = z_x = \frac{\partial z}{\partial x} = \partial_x f, \\ f_y(x,y) \amp = f_y = \frac{\partial f}{\partial y} = \frac{\partial}{\partial y} \left(f(x,y)\right) = z_y = \frac{\partial z}{\partial y} = \partial_y f. \end{split} \end{equation*}
###### Example7.18. Partial Derivative with respect to $y$.

Find the partial derivative with respect to $y$ of $f(x,y)=\sin(xy)+3xy\text{.}$

Solution

The partial derivative with respect to $y$ of $f(x,y)=\sin(xy)+3xy$ is

\begin{equation*} f_y(x,y)={\partial\over\partial y}\sin(xy)+3xy=\cos(xy){\partial\over\partial y}\left[(xy)+ 3x\right]=x\cos(xy)+3x\text{.} \end{equation*}
###### Example7.19. Partial Derivatives.

Given the two-variable function $f(x,y)=x^2-xy+y^5\text{,}$

1. Find the first-order partial derivatives $f_x$ and $f_y\text{.}$

2. Calculate $f_x(2,1)$ and interpret your result.

3. Calculate $f_y(2,1)$ and interpret your result.

Solution
1. 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*}
2. 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{.}$

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

###### Example7.20. First-Order Partial Derivatives.

Find the first-order partial derivatives of the following functions.

1. $f(x,y) = \dfrac{xy}{x+y^3}\text{.}$

2. $g(s,t) = \left(s + st^2 -t ^3\right)^2\text{.}$

3. $p(x,y) = x\ln(x+y^3)\text{.}$

Solution
1. 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*}
2. 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*}
3. 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*}
###### Example7.21. First-Order Partial Derivatives.

Find the first-order partial derivatives of the function

\begin{equation*} w=f(x,y,z)= xyz - xe^x + x \sin y\text{.} \end{equation*}
Solution

Since $f$ is a three-variable function, it will have three first-order partial derivatives:

\begin{equation*} f_x, f_y, \text{ and } f_z\text{.} \end{equation*}

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

\begin{equation*} \begin{array}{c} f_x(x,y) = \frac{\partial}{\partial x} \left(xyz - xe^x + x \sin y\right) = yz - (e^x + xe^x) + \sin y \\ f_y(x,y) = \frac{\partial}{\partial y} \left(xyz - xe^x + x \sin y\right) = xz + x\cos y \\ f_z(x,y) = \frac{\partial}{\partial z} \left(xyz - xe^x + x \sin y\right) = xy \end{array} \end{equation*}

### Subsection7.3.2Applications

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.

###### Definition7.22. Cobb-Douglas Production Function.

The Cobb-Douglas production function is defined by

\begin{equation*} Y(L,K)=aL^bK^{1-b} \end{equation*}

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.

###### Example7.23. Marginal Productivity.

Suppose a country's production can be described by the function

\begin{equation*} Y(L,K)=15L^{1/3}K^{2/3} \end{equation*}

units, where $L$ is units of labour and $K$ is units of capital.

1. Calculate the marginal productivity of labour and the marginal productivity of capital.

2. Evaluate $Y_L$ and $Y_K$ when $L=100$ and $K=55\text{.}$

Solution
1. 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*}
2. 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*}
3. 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:

###### Definition7.24. Relative Demand Equations of Two Commodities.

Let $A$ and $B$ be two commodities, then the relative demand equations are given by

\begin{equation*} q_A=f(p_A,p_B) \text{ and } q_B=g(p_A,p_B) \text{ , where} \end{equation*}

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

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

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

###### Definition7.27. Partial Derivatives of Competitive and Complementary Commodities.
1. 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.

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

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

\begin{equation*} q_A = 500-p_A^2+0.5p_B^2 \text{ and } q_B=850+0.3p_A^2-0.8p_B^2\text{,} \end{equation*}

respectively, determine whether the products are competitive, complementary or neither.

Solution

We calculate

\begin{equation*} \frac{\partial q_A}{\partial p_B} = p_B \text{ and } \frac{\partial q_B}{\partial p_A} = 0.6p_A \end{equation*}

Since $p_A$ and $p_B$ must be positive, we determine that

\begin{equation*} \frac{\partial q_A}{\partial p_B} > 0 \text{ and } \frac{\partial q_B}{\partial p_A} > 0\text{.} \end{equation*}

We thus conclude that the two products are competitive.

###### Example7.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,

\begin{equation*} q_A = \frac{2p_B}{3+5p_A^2} \text{ and } q_B = \frac{p_A}{3+p_B^{1/3}}\text{.} \end{equation*}

Determine whether these two commodities are competitive, complementary, or neither.

Solution

We calculate

\begin{equation*} \frac{\partial q_A}{\partial p_B} = \frac{2}{3+5p_A^2} \text{ and } \frac{\partial q_B}{\partial p_A} = \frac{1}{3+p_B^{1/3}}\text{.} \end{equation*}

As always, $p_A$ and $p_B$ must be positive. We thus determine that

\begin{equation*} \frac{\partial q_A}{\partial p_B} > 0 \text{ and } \frac{\partial q_B}{\partial p_A} > 0\text{,} \end{equation*}

and that the two products are competitive.

### Subsection7.3.3Tangent 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

\begin{equation*} f_x(a,b)={w\over u} ={w\over1} = w\text{.} \end{equation*}

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:

\begin{align*} \amp f_x(a,b)x+f_y(a,b)y-z=f_x(a,b)a+f_y(a,b)b-c\\ \amp f_x(a,b)x+f_y(a,b)y-f_x(a,b)a-f_y(a,b)b+c=z\\ \amp f_x(a,b)(x-a)+f_y(a,b)(y-b)+c=z\\ \amp f_x(a,b)(x-a)+f_y(a,b)(y-b)+f(a,b)=z \end{align*}
###### Example7.30. Tangent Plane to a Sphere.

Find the plane tangent to $x^2+y^2+z^2=4$ at $(1,1,\sqrt2)\text{.}$

Solution

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

\begin{equation*} z=-{1\over\sqrt2}(x-1)-{1\over\sqrt2}(y-1)+\sqrt2\text{.} \end{equation*}

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:

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

\begin{equation*} \Delta z=f_x(x_0,y_0)\Delta x+f_y(x_0,y_0)\Delta y+\epsilon_1\Delta x + \epsilon_2\Delta y\text{,} \end{equation*}

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:

$$z=f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)+f(x_0,y_0)+ \epsilon_1\Delta x + \epsilon_2\Delta y\text{.}\label{eq_f_is_differentiable}\tag{7.3.1}$$

The first three terms on the right are the equation of the tangent plane, that is,

\begin{equation*} f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)+f(x_0,y_0) \end{equation*}

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

\begin{equation*} \Delta z=f_x(x_0,y_0)\Delta x+\epsilon_1\Delta x \end{equation*}

or

\begin{equation*} {\Delta z\over\Delta x}=f_x(x_0,y_0)+\epsilon_1\text{.} \end{equation*}

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

### Subsection7.3.4Second-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{.}$

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

1. $\dfrac{\partial^2 f}{\partial x^2} = \dfrac{\partial}{\partial x} \left(\dfrac{\partial f}{\partial x}\right)$

2. $\dfrac{\partial^2 f}{\partial y\partial x} = \dfrac{\partial}{\partial y} \left(\dfrac{\partial f}{\partial x}\right)$

3. $\dfrac{\partial^2 f}{\partial x \partial y} = \dfrac{\partial}{\partial x} \left(\dfrac{\partial f}{\partial y}\right)$

4. $\dfrac{\partial^2 f}{\partial y^2} = \dfrac{\partial}{\partial y}\left(\dfrac{\partial f}{\partial y}\right)$

Note:

1. 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*}
2. 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{.}$

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

###### Example7.34. Second-Order Partial Derivatives.

Find the second-order partial derivatives of the function

1. $f(x,y)=x^2-2x^2y+xy^2+y^3\text{.}$

2. $g(x,y) = e^{x^2y}\text{.}$

Solution
1. 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*}
2. 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.

Find $f_x$ and $f_y$ of the following functions $f(x,y)\text{.}$

1. $\ds f(x,y)=\cos(x^2y)+y^3$

$f_x = -2xy\sin(x^2y)\text{,}$ $f_y = -x^2\sin(x^2y)+3y^2$
Solution

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*}
2. $\ds f(x,y)={xy\over x^2+y}$

$f_x = (y^2-x^2y)/(x^2+y)^2\text{,}$ $f_y = x^3/(x^2+y)^2$
Solution

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*}
3. $\ds f(x,y)=e^{x^2+y^2}$

$f_x = 2xe^{x^2+y^2}\text{,}$ $f_y = 2ye^{x^2+y^2}$
Solution

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*}
4. $\ds f(x,y)=xy\ln(xy)$

$f_x = \ln(xy)+y\text{,}$ $f_y = x\ln(xy)+x$
Solution

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*}
5. $\ds f(x,y)=\sqrt{1-x^2-y^2}$

$f_x = -x/\sqrt{1-x^2-y^2}\text{,}$ $f_y = -y/\sqrt{1-x^2-y^2}$
Solution

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*}
6. $\ds f(x,y)=x\tan(y)$

$f_x = \tan y\text{,}$ $f_y = x\sec^2 y$
Solution

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*}
7. $\ds f(x,y)={1\over xy}$

$f_x = -1/(x^2y)\text{,}$ $f_y = -1/(xy^2)$
Solution

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

Evaluate the first partial derivatives of the function at the given point.

1. $f(x,y)=x^2y+xy^2$ at $(1,3)$

$f_x(1,3) = 15\text{,}$ $f_y(1,3) = 7$
Solution

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*}
2. $g(x,y) = x\sqrt{y}$ at $(4,4)$

$g_x(4,4)=2\text{,}$ $g_y(4,4)=1$
Solution

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*}
3. $f(s,t) = s/t$ at $(-1,2)$

$f_s(-1,2)=1/2\text{,}$ $f_t(-1,2)=1/4$
Solution

$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*}
4. $p(x,y) = e^{xy}$ at $(1,-1)$

$p_x(1,-1) = -1/e\text{,}$ $p_y(1,-1) = 1/e$
Solution

$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*}
5. $h(a,b,c) = a^2bc^3$ at $(1,1,2)$

$h_a(1,1,2)=16\text{,}$ $h_b(1,1,2)=8\text{,}$ $h_c(1,1,2)=12$
Solution

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*}
6. $f(p,q) = \sin(pq)$ at $(\pi/2, 1)$

$f_p(\pi/2,1) = 0, f_q(\pi/2,1) = 0$
Solution

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*}
7. $h(a,b) = e^{\sin(ab)}$ at $(\pi,1)$

$h_a = -1\text{,}$ $h_b = -\pi$
Solution

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*}
8. $g(x,y) = \frac{\sin(x)\cos(y)}{x+y}$ at $(\pi/3,\pi/3)$

$g_x=\frac{1}{1+\pi}\text{,}$ $g_y = 0$

Suppose the productivity of a country can be approximated by

\begin{equation*} Y(L,K) = 15L^{3/5}K^{2/5} \end{equation*}

where $L$ is units of labour and $K$ is units of capital.

1. Calculate $Y_K$ and $Y_L\text{.}$

$Y_K = 9(K/L)^{2/5}\text{,}$ $Y_L=6(K/L)^{3/5}\text{.}$
Solution

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*}
2. Calculate the marginal productivity of labour and the marginal productivity of capital when $L=100$ and $K=55\text{.}$ Interpret your results.

7.09,8.58
Solution

Therefore, 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.

Suppose the productivity of a country can be approximated by

\begin{equation*} Y(L,K) = 5L^{1/4}K^{3/4} \end{equation*}

where $L$ is units of labour and $K$ is units of capital.

1. Calculate $Y_K$ and $Y_L\text{.}$

$Y_L= \left(\frac{5K}{4L}\right)^{3/4}\text{,}$ $Y_K=\left(\frac{15L}{4K}\right)^{1/4}\text{.}$
2. Calculate the marginal productivity of labour and the marginal productivity of capital when $L=33$ and $K=100\text{.}$ Interpret your results.

2.87,2.84.

Suppose the density of houses in a city district is given by

\begin{equation*} \rho(x,y)=100-10(x-3)-5(y-1)^2 \end{equation*}

where $x$ and $y$ are measured in kilometres and lie in the region described by the graph below.

1. Calculate $\rho_x$ and $\rho_y\text{.}$

$\rho_x = -10\text{,}$ $\rho_y=-10(y-1)\text{.}$
2. What can you say about the density of housing around the point $(1,0)\text{?}$

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

An office supply store sells $q_N$ notebooks and $q_P$ pencils. Suppose the demand equation for notebooks and pencils are, respectively

\begin{equation*} q_N = f(p_N,p_P)=8000+8p_N-0.5p_P^2 \text{ and } q_P = g(p_N,p_P)=1000-0.8p_N^2+20p_P \end{equation*}

(where $p_N$ and $p_P$ are the respective unit prices). Are these two products are competitive, complementary, or neither?

complementary

A network TV station sells online and cable subscriptions. Suppose the demand equation for online and cable subscriptions are, respectively

\begin{equation*} q_O = f(p_O,p_C)=7000+2p_O+p_C^2 \text{ and } q_C = g(p_O,p_C)=1500+0.8p_O^2+0.2p_C \end{equation*}

(where $p_O$ and $p_C$ are the respective unit prices). Are these two products are competitive, complementary, or neither?

competitive

Solution

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,

\begin{equation*} \diffp{f}{{p_c}} = \diffp{}{{p_c}}\left(7000+2p_o+p_c^2\right)=2p_c\text{.} \end{equation*}

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,

\begin{equation*} \diffp{g}{{p_o}} = \diffp{}{{p_o}}\left(1500+0.8p_o^2+0.2p_c\right)=1.6p_o\text{.} \end{equation*}

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.

Find an equation for the plane tangent to the following functions $f(x,y) = z$ at the given point.

1. $\ds 2x^2+3y^2-z^2=4$ at $(1,1,-1)\text{.}$

$z=-2(x-1)-3(y-1)-1$
Solution

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*}
2. $\ds f(x,y)=\sin(xy)$ at $(\pi,1/2,1)$

$z=1$
Solution

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

3. $\ds f(x,y)=x^2+y^3$ at $(3,1,10)$

$z=6(x-3)+3(y-1)+10$
Solution

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*}
4. $\ds f(x,y)=x\ln(xy)$ at $(2,1/2,0)$

$z=(x-2)+4(y-1/2)$
Solution

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

Find an equation for the line normal to $\ds x^2+4y^2=2z$ at $(2,1,4)\text{.}$

$r(t)=\langle 2,1,4\rangle+t\langle 2,4,-1\rangle$

Solution

Differentiate the relation implicitly with respect to both $x$ and $y\text{:}$

\begin{equation*} \begin{split} \diffp{}{x} \bigl(x^2+4y^2\bigr) \amp = \diffp{}{x}\bigl(2z\bigr) \\ 2x \amp = 2\diffp{z}{x}\\ \diffp{z}{x} \amp = x \end{split} \end{equation*}
\begin{equation*} \begin{split} \diffp{}{y} \bigl(x^2+4y^2\bigr) \amp = \diffp{}{y}\bigl(2z\bigr) \\ 8y \amp = 2\diffp{z}{x}\\ \diffp{z}{x} \amp = 4y \end{split} \end{equation*}

Therefore, at the point $(2,1,4)\text{,}$

\begin{equation*} \diffp{z}{x} = 2, \ \ \text{ and } \ \ \diffp{z}{y} = 4\text{.} \end{equation*}

By definition, the equation of the normal line is thus

\begin{equation*} r(t) = \langle 2,1,4 \rangle + t \langle 2,4,-1\rangle\text{.} \end{equation*}

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.

Solution

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

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

Solution

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

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

Solution

In 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

\begin{equation*} z = -\frac{1}{\sqrt{2}}(x-1) - \frac{1}{\sqrt{2}}(y-1) + \sqrt{2}\text{.} \end{equation*}

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:

\begin{equation*} f(1.98, 0.4) \approx -\frac{1}{\sqrt{2}}(1.98-1) - \frac{1}{\sqrt{2}}(0.4-1) + \sqrt{2} = -\frac{0.98}{\sqrt{2}}+ \frac{0.6}{\sqrt{2}} + \sqrt{2}\text{.} \end{equation*}

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?

height

Solution

We compute

\begin{equation*} \diffp{V}{r} = 2\pi rh, \ \ \text{ and } \diff{V}{h} = \pi r^2\text{.} \end{equation*}

When $r=7$ and $h=3\text{,}$ we have

\begin{equation*} \diffp{V}{r} = 42\pi , \ \ \text{ and } \diff{V}{h} = 49\pi\text{.} \end{equation*}

Hence, the volume will be more sensitive to a small change in the height.

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

no
Solution

Let's assume that the answer $f_x=2x+3y$ is correct. Then $f$ must have the form

\begin{equation*} f(x,y) = x^2+3yx+g(y)\text{,} \end{equation*}

for some single-variable function $g(y)\text{.}$ Therefore, the partial derivative with respect to $y$ must be of the form

\begin{equation*} f_y = 3x+g'(y)\text{.} \end{equation*}

Therefore, the answer $f_y=4x+6y$ must be incorrect, although we might have accepted the answer $f_y=3x+6y\text{.}$

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.

1. $z=f(x)g(y)$

$\diffp{z}{x} = f'(x)g(y)$ and $\diffp{z}{y} = f(x)g'(y)\text{.}$
2. $z=f(xy)$

$\diffp{z}{x} = yf'(xy)$ and $\diffp{z}{y} = xf'(xy)\text{.}$
3. $z=f(x/y)$

$\diffp{z}{x} = \frac{1}{y} f'(x/y)$ and $\diffp{z}{y} = -\frac{x f'(x/y)}{y^2}\text{.}$

Let $\ds Q(p,q)=pq/(p^2+q^2)\text{;}$ compute $Q_{pp}\text{,}$ $Q_{qp}\text{,}$ and $Q_{qq}\text{.}$

$Q_{pp}=(2p^3q-6pq^3)/(p^2+q^2)^3\text{,}$ $Q_{qq}=(2pq^3-6p^3q)/(p^2+q^2)^3$

Solution

Given $Q(p,q) = \dfrac{pq}{p^2+q^2}\text{,}$ we have the first-order partial derivatives:

\begin{equation*} Q_p = \frac{q(q^2-p^2)}{(p^2+q^2)^2}, \ \ \text{ and } \ \ Q_q = \frac{p(p^2-q^2)}{(p^2+q^2)^2}\text{.} \end{equation*}

Therefore, we find the following second-order partial derivatives:

\begin{equation*} Q_{pp} = \frac{2p^3q-6pq^3}{(p^2+q^2)^3} \end{equation*}
\begin{equation*} Q_{qq} = \frac{2pq^3-6p^3q}{(p^2+q^2)^3} \end{equation*}

Determine all first and second partial derivatives of the following functions.

1. $f(x,y) = x^2y^2+y^3$

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

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*}
2. $f(x,y) = 2x^2+xy+3$

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

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*}
3. $f(x,y) = y\sin x$

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

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*}
4. $f(x,y) = \sin(2y)\cos(x)$

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

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*}
5. $f(x,y) = e^{x^2-y}$

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

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*}
6. $f(x,y) = \ln\sqrt{x^2+y^2}$

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

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

Prove that the function $u(x,t)=e^{-\alpha^2k^2t}\sin(kx)$ is a solution to the heat equation

\begin{equation*} u_t=\alpha^2u_{xx}\text{,} \end{equation*}

where $\alpha$ and $k$ are constants.

Solution

We need to show that the given function $u(x,t)$ satisfies the equation

\begin{equation*} u_t=\alpha^2u_{xx}\text{.} \end{equation*}

Let's first compute the partial derivatives $u_t$ and $u_{xx}\text{.}$

\begin{equation*} \begin{split} u_t \amp = \diffp{}{t} \left(e^{-\alpha^2 k^2 t}\sin(kx)\right) \\ \amp =-\alpha^2 k^2 e^{-\alpha^2 k^2 t}\sin(kx) \\ \amp = -\alpha^2 k^2 u(x,t), \end{split} \end{equation*}

and

\begin{equation*} \begin{split} u_{xx} \amp = \diffp{}{{x^2}} \left(e^{-\alpha^2 k^2 t}\sin(kx)\right) \\ \amp = ke^{-\alpha^2 k^2 t} \diffp{}{x} \cos(kx) \\ \amp = -k^2 e^{-\alpha^2 k^2 t} \sin(kx) \\ \amp = -k^2 u(x,t). \end{split} \end{equation*}

Therefore,

\begin{equation*} u_t = -\alpha^2 k^2 u(x,t) = \alpha^2 u_{xx}\text{,} \end{equation*}

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

\begin{equation*} \lim\limits_{t\to\infty} u(x,t) = \lim\limits_{t\to\infty} e^{-\alpha^2 k^2 t}\sin(kx) = 0\text{,} \end{equation*}

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.

Prove that $u=\sin(x-at)+\ln(x+at)$ is a solution to the wave equation

\begin{equation*} u_{tt}=a^2u_{xx}\text{,} \end{equation*}

where $a$ is a constant.

Solution

We need to show that the given function $u(x,t)$ satisfies the equation

\begin{equation*} u_{tt}=a^2u_{xx}\text{.} \end{equation*}

Let's first compute the partial derivatives $u_{tt}$ and $u_{xx}\text{.}$

\begin{equation*} \begin{split} u_{tt} \amp = \diffp{}{t} a\left(\cos(x-at) + \frac{1}{x+at}\right) \\ \amp = a^2\left( \sin(x-at) - \frac{1}{(x+at)^2}\right), \end{split} \end{equation*}

and

\begin{equation*} \begin{split} u_{xx} \amp = \diffp{}{x} \left(-\cos(x-at) + \frac{1}{x+at}\right)\\ \amp = -\sin(x-at) - \frac{1}{(x+at)^2} \end{split} \end{equation*}

Therefore, we have that

\begin{equation*} u_{tt} = a^2\left( \sin(x-at) - \frac{1}{(x+at)^2}\right) = a^2 u_{xx}\text{.} \end{equation*}

Hence, the funciton $u(x,t)$ is a solution to the wave equation.

How many distinct third-order derivatives does a function of 2 variables have?

A 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.
How many distinct $n$-th-order derivatives does a function of 2 variables have?
$2^n$
A 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.