Skip to main content
\(\renewcommand{\chaptername}{Unit} \newcommand{\derivativehomeworklink}[1]{\href{http://db.tt/cSeKG8XO}{#1}} \newcommand{\chpname}{unit} \newcommand{\sageurlforcurvature}{http://bmw.byuimath.com/dokuwiki/doku.php?id=curvature_calculator} \newcommand{\uday}{ \LARGE Day \theunitday \normalsize \flushleft \stepcounter{unitday} } \newcommand{\sageworkurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=work_calculator} \newcommand{\sagefluxurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=flux_calculator} \newcommand{\sageworkfluxurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=both_flux_and_work} \newcommand{\sagelineintegral}{http://bmw.byuimath.com/dokuwiki/doku.php?id=line_integral_calculator} \newcommand{\sagephysicalpropertiestwod}{http://bmw.byuimath.com/dokuwiki/doku.php?id=physical_properties_in_2d} \newcommand{\sagephysicalpropertiesthreed}{http://bmw.byuimath.com/dokuwiki/doku.php?id=physical_properties_in_3d} \newcommand{\sageDoubleIntegralCheckerURL}{http://bmw.byuimath.com/dokuwiki/doku.php?id=double_integral_calculator} \newcommand{\myscale}{1} \newcommand{\ds}{\displaystyle} \newcommand{\dfdx}[1]{\frac{d#1}{dx}} \newcommand{\ddx}{\frac{d}{dx}} \newcommand{\ii}{\vec \imath} \newcommand{\jj}{\vec \jmath} \newcommand{\kk}{\vec k} \newcommand{\vv}{\mathbf{v}} \newcommand{\RR}{\mathbb{R}} \newcommand{\R}{ \mathbb{R}} \newcommand{\inv}{^{-1}} \newcommand{\im}{\text{im }} \newcommand{\colvec}[1]{\begin{bmatrix}#1\end{bmatrix} } \newcommand{\cl}[1]{ \begin{matrix} #1 \end{matrix} } \newcommand{\bm}[1]{ \begin{bmatrix} #1 \end{bmatrix} } \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\rref}{rref} \DeclareMathOperator{\vspan}{span} \DeclareMathOperator{\trace}{tr} \DeclareMathOperator{\proj}{proj} \DeclareMathOperator{\curl}{curl} \newcommand{\blank}[1]{[14pt]{\rule{#1}{1pt}}} \newcommand{\vp}{^{\,\prime}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section7.2The (multi-dimensional) Derivative

Objectives

In this section we will...

  • understand differentials in matrix notation

  • learn to compute partial and total derivatives

Before we introduce multi-dimensional derivatives, let's recall the definition of a differential. If \(y=f(x)\) is a function, then we say the differential \(dy\) is the expression \(dy=f'(x) dx\text{.}\) We could also write this as \(dy = \frac{dy}{dx}dx\text{.}\) Similarly, if \(w=g(t)\) then we have the derivative as \(\frac{dw}{dt}=g'(t)\) and the differential as \(dw=g'(t)dt\text{.}\)

Observation7.2.1

Here's the key. Think of differential notation \(dy=f'(x)dx\) in the following way:

A change in the output \(y\) equals the derivative multiplied by a change in the input \(x\text{.}\) To get \(dy\text{,}\) we just need the derivative times \(dx\text{.}\)

To get the derivative in all dimensions, we just substitute in vectors to obtain the differential notation \(d\vec y = f'(\vec x) d\vec x\text{.}\) The derivative is precisely the thing that tells us how to get \(d\vec y\) from \(d\vec x\text{.}\) We'll quickly see that \(f'(\vec x)\) must be a matrix, and then we'll start calling it \(Df\) instead of \(f'\text{.}\)

Let's now examine some exercises you have seen before.

Exercise7.2.1

The volume of a right circular cylinder is \(V(r,h)= \pi r^2 h\text{.}\) Imagine that each of \(V\text{,}\) \(r\text{,}\) and \(h\) depends on \(t\) (we might be collecting rain water in a can, or crushing a cylindrical concentrated juice can, etc.).

(a)

Let's rewrite \(V(r,h)\text{.}\) For each of the following start with \(V(r,h)=\pi r^2 h\)

(i)

Substitute \(r(t)\) for \(r\)

(ii)

Substitute \(h(t)\) for \(h\)

(iii)

Now replace both \(r\) and \(h\) with \(r(t)\) and \(h(t)\) respectively

(b)

In which of the equations from part (a) does \(h\) NOT change as time changes?

(c)

If the height remains constant, what is \(dV/dt\) in terms of \(dr/dt\text{?}\) Times both sides by \(dt\) to obtain a formula for \(dV\) when \(h\) is constant.

(d)

If the radius remains constant, what is \(dV/dt\) in terms of \(dh/dt\text{?}\) What is \(dV\) when \(r\) is constant?

(e)

If neither the radius nor height remains constant, what is \(dV/dt\) in terms of \(dh/dt\text{?}\) Solve for \(dV\text{.}\)

(f)

Show that we can write \(dV\) as the matrix product

\begin{equation*} dV = \begin{bmatrix}2\pi rh\amp \pi r^2 \end{bmatrix} \begin{bmatrix}dr\\dh \end{bmatrix} . \end{equation*}

How do the columns of this matrix relate to the previous portions of the exercise.

The matrix \(\begin{bmatrix}2\pi rh\amp \pi r^2 \end{bmatrix}\) is the derivative. The columns we'll call the partial derivatives. The partial derivatives make up the whole.

Exercise7.2.2

The volume of a box is \(V(x,y,z)=xyz\text{.}\) Imagine that each variable depends on \(t\text{.}\)

(a)

If both \(y\) and \(z\) remain constant we only need to replace \(x\) with \(x(t)\)

(i)

State the new equation for \(V\)

(ii)

What is \(dV/dt\text{?}\)

(iii)

Times both sides by \(dt\) to obtain a formula for \(dV\) when all but \(x\) is constant.

(b)

Repeat Part 1 for when \(y\) is the only non constant variable, and then for when \(z\) is the only non constant variable.

(c)

What is \(dV/dt\) in terms of \(dx/dt\text{,}\) \(dy/dt\text{,}\) and \(dz/dt\) when all three variables are not constant.

(d)

Show that we can write \(dV\) as the matrix product (fill in the blanks)

\begin{equation*} dV = \begin{bmatrix}yz\amp ?\amp ? \end{bmatrix} \begin{bmatrix}dx\\dy\\dz \end{bmatrix} . \end{equation*}

How do the columns of this matrix relate to the previous portions of the exercise.

The matrix \(\begin{bmatrix}yz\amp ?\amp ? \end{bmatrix}\) is the derivative. The columns we'll call the partial derivatives. The partial derivatives make up the whole.

Subsection7.2.1Developing the Derivative

Part (d) in each exercise above is the KEY idea, let me repeat, THE KEY IDEA, to the rest of this course. It all goes back to differentials. We can compute a small change in volume, if we know how much the radius and height have changed, or if we know how much the length, width, and height will change.

Exercise7.2.3

Use matrix multiplication to answer the following questions.

(a)

Make sure you ask me in class to show you physically exactly how you can see these differential formulas.

In Exercise 1 we showed that a change in the volume of a cylinder is approximately

\begin{equation*} dV = \begin{bmatrix}2\pi rh\amp \pi r^2 \end{bmatrix} \begin{bmatrix}dr\\dh \end{bmatrix} . \end{equation*}

If we know that \(r=3\) and \(h=4\text{,}\) and we know that \(r\) could going to increase by about \(.1\) and \(h\) could increase by about \(.2\text{,}\) then by about how much will \(V\) increase by?

(b)

The volume of a box is given by \(V=xyz\text{.}\) From Exercise 2 we know the differential of the volume is \(V=\begin{bmatrix}yz\amp xz \amp xy \end{bmatrix} \begin{bmatrix}dx\\dy\\dz \end{bmatrix}\text{.}\) If the current measurements are \(x=2\text{,}\) \(y=3\text{,}\) and \(z=5\text{,}\) and we know that \(dx=.01\text{,}\) \(dy=.02\text{,}\) and \(dz=.03\text{,}\) then by about how much will the volume increase.

In more general terms, we can compute the change in a function \(f(x,y)\) if we know how much \(x\) and \(y\) will change.

Exercise7.2.4

Consider the function \(f(x,y) = x^2y +3x+4\sin(5y)\text{.}\)

(a)

If both \(x\) and \(y\) depend on \(t\text{,}\) then use implicit differentiation to obtain a formula for \(df/dt\) in terms of \(dx/dt\) and \(dy/dt\text{.}\) This will be the last time we use implicit differentiation.

(b)

Solve for \(df\text{,}\) and write your answer as the matrix product (fill in the blank)

\begin{equation*} df = \begin{bmatrix}?\amp x^2+20\cos(5y) \end{bmatrix} \begin{bmatrix}dx\\dy \end{bmatrix} . \end{equation*}
(c)

If you hold \(y\) constant, then what is \(df/dx\text{?}\)

(d)

If you hold \(x\) constant, then what is \(df/dy\text{?}\)

Exercise 4 is precisely the content to this chapter. We just need to add some vocabulary to make it easier to talk about what we just did. Let's introduce the vocabulary in terms of the exercise above, and then make a formal definition.

  • The derivative of \(f\) in the previous exercise is the matrix

    \begin{equation*} Df(x,y) = \begin{bmatrix}2xy+3\amp x^2+20\cos(5y) \end{bmatrix} . \end{equation*}

    Some people call this the total derivative, as it's made up of two parts, called partial derivatives.

  • The first column of this matrix is just part of the whole derivative. We can get the first column by holding \(y\) constant, and then differentiating with respect to \(x\text{.}\) This is precisely a partial derivative. We'll write this as \(\frac{\partial f}{\partial x} = 2xy+3\text{,}\) or sometimes just \(f_x = 2xy+3\text{.}\)

  • The second column of the derivative is the partial of \(f\) with respect to \(y\text{.}\) We can get the second column by holding \(x\) constant, and then differentiating with respect to \(y\text{.}\) We'll write this as \(\frac{\partial f}{\partial y} = x^2+20\cos(5y)\text{,}\) or \(f_y = x^2+20\cos(5y)\text{.}\)

  • Remember, the derivative of \(f\) is a matrix. The columns of the matrix are the partial derivatives with respect to the input variables.

Definition7.2.2Derivatives and Partial Derivatives

Let \(f\) be a function.

  • The partial derivative of \(f\) with respect to \(x\) is the regular derivative of \(f\text{,}\) provided we hold every every input variable constant except \(x\text{.}\) (This is what we did in the first parts of exercises 1 and Exercise 2. We'll use the notations

    \begin{equation*} \frac{\partial f}{\partial x}, \frac{\partial}{\partial x}[f], f_x, \text{ and } D_x f \end{equation*}

    to mean the partial of \(f\) with respect to \(x\text{.}\)

  • The partial of \(f\) with respect to \(y\text{,}\) written \(\ds \frac{\partial f}{\partial y}\) or \(f_y\text{,}\) is the regular derivative of \(f\text{,}\) provided we hold every input variable constant except \(y\text{.}\) A similar definition holds for partial derivatives with respect to any variable.

  • The derivative of \(f\) is a matrix. The columns of the derivative are the partial derivatives. When there's more than one input variable, we'll use \(Df\) rather than \(f'\) to talk about derivatives. The order of the columns must match the order you list the variables in the function. If the function is \(f(x,y)\text{,}\) then the derivative is \(Df(x,y) = \begin{bmatrix}\frac{\partial f}{\partial x}\amp \frac{\partial f}{\partial y} \end{bmatrix} .\) If the function is \(V(x,y,z)\text{,}\) then the derivative is \(DV(x,y,z) = \begin{bmatrix}\frac{\partial V}{\partial x}\amp \frac{\partial V}{\partial y}\amp \frac{\partial V}{\partial z} \end{bmatrix} .\)

Subsection7.2.2Practicing the Derivative

It's time to practice these new words on some exercises. Remember, we're doing the exact same thing as before the definitions above. Now we just have some vocabulary which makes it much easier to talk about differentiation.

Exercise7.2.5

Compute the requested partial and total derivatives.

I strongly suggest you practice a lot of this type of exercise until you can compute partial derivatives with ease.

(a)

For \(f(x,y)=x^2+2xy+3y^2\text{,}\) compute both \(\ds\frac{\partial f}{\partial x}\) and \(f_y\text{.}\) Then state \(Df(x,y)\text{.}\)

(b)

For \(f(x,y,z)=x^2y^3z^4\text{,}\) compute all three of \(f_x\text{,}\) \(\ds\frac{\partial f}{\partial y}\text{,}\) and \(D_z f\text{.}\) Then state \(Df(x,y,z)\text{.}\)

Remember, the partial derivative of a function with respect to \(x\) is just the regular derivative with respect to \(x\text{,}\) provided you hold all other variables constant. We put the partials into the columns of a matrix to obtain the (total) derivative.

Please take a moment and practice computing partial and total derivatives. Your textbook has lots of examples to help you with partial derivatives. However, the textbook leaves out the actual derivative. This handwritten file (follow the link) has 6 exercises, together with solutions, that you can use as extra practice for total derivatives. Please open the file before moving on.

Exercise7.2.6

Compute the requested partial and total derivatives.

(a)

Consider the parametric surface \(\vec r(u,v) = (u,v,v\cos(uv))\text{.}\) Compute both \(\ds\frac{\partial \vec r}{\partial u}\) and \(\ds\frac{\partial \vec r}{\partial v}\text{.}\) Then state \(D\vec r(u,v)\text{.}\) If you end up with a 3 by 2 matrix, you did this correctly.

(b)

Consider the vector field \(\vec F(x,y) = (-y,xe^{3y})\text{.}\) Compute both \(\ds\frac{\partial \vec F}{\partial x}\) and \(\ds\frac{\partial \vec F}{\partial y}\text{.}\) Then state \(D\vec F(x,y)\text{.}\)

As you completed the exercises above, did you notice any connections between the size of the matrix and the size of the input and output vectors? Make sure you ask in class about this. We'll make a connection.

We've now seen that the derivative of \(z=f(x,y)\) is a matrix \(Df(x,y) = \begin{bmatrix}f_x \amp f_y \end{bmatrix}\text{.}\) This is a function itself that has inputs \(x\) and \(y\text{,}\) and outputs \(f_x\) and \(f_y\text{.}\) This means it has 2 inputs and 2 outputs, so it's a vector field. What does the vector field tell us about the original function?

Exercise7.2.7

Consider the function \(f(x,y)=y-x^2\text{.}\)

(a)

In the \(xy\) plane, please draw several level curves of \(f\) (maybe \(z=0\text{,}\) \(z=1\text{,}\) \(z=-4\text{,}\) etc.) Write the height on each curve (so you're making a topographical map).

(b)

Compute the derivative of \(f\text{.}\) (Remember this is now a vector field.)

(c)

Pick several points in the \(xy\) plane that lie on the level curves you already drew. At these points, add the vector given by the derivative. (So at (0,0), you'll need to draw the vector (0,1). At (1,1), you'll need to draw the vector (-2,1).) Add 8 vectors to your picture, and then write down to share with the class any observations you make.

We'll come back to this exercise more in chapter 9 as we discuss optimization. There are lots of connections between the derivative and level curves.

Subsection7.2.3A Geometric Interpretation of the Derivative

Let's now explain geometrically what a partial derivative is. The next few exercises will help with this.

Exercise7.2.8

Consider the change of coordinates \(\vec T(r,\theta) = (r\cos \theta, r\sin \theta)\text{.}\)

(a)

Compute the partial derivatives \(\ds\frac{\partial \vec T}{\partial r}\) and \(\ds\frac{\partial \vec T}{\partial \theta}\)

(b)

State the derivative \(D\vec T(r,\theta)\text{.}\)

Hint

If you get a 2 by 2 matrix, then you're on the right track. Each partial derivative is a vector. (This one is in the handwritten file with extra practice.)

(c)

Consider the polar point \((r,\theta) = (4,\pi/2)\text{.}\)

(i)

Compute \(T(4,\pi/2)\) (the Cartesian coordinate)

(ii)

Compute both partial derivatives at \((4,\pi/2)\text{.}\)

Hint

You should get a point and two vectors.

(iii)

At the point, draw both vectors.

(d)

If you were standing at the polar point \((4,\pi/2)\) and someone said, “Hey you, keep your angle constant, but increase your radius,” then which direction would you move? What if someone said, “Hey you, keep your radius constant, but increase your angle”?

(e)

Now change the polar point to \((r,\theta) = (2,3\pi/4)\text{.}\) Try, without doing any computations, to repeat part 2 (at the point draw both partial derivatives). Explain.

If your answers to the 2nd and 3rd part above were the same, then you're doing this correctly. The partial derivatives, when vectors, tell us precisely about motion. The next exercise reinforces this concept.

Review

If you know that a line passes through the point \((1,2,3)\) and is parallel to the vector \((4,5,6)\text{,}\) give a vector equation, and parametric equations, of the line. See 1 A vector equation is \(\vec r(t) = (4,5,6)t+(1,2,3)\) or \(\vec r(t) = (4t+1, 5t+2, 6t+3)\text{.}\) Parametric equations for this line are \(x=4t+1\text{,}\) \(y=5t+2\text{,}\) and \(z=6t+3\text{.}\)for an answer.

Exercise7.2.9

Consider the parametric surface \(\vec r(a,t) = (a\cos t, a\sin t, t)\) for \(2\leq a\leq 4\) and \(0\leq t\leq 4\pi\text{.}\) We encountered this parametric surface in Exercise 6.3.1 when we considered a smoke screen left by multiple jets.

(a)

How many inputs does this function have? How many outputs?

(b)

What dimensions does that make the derivative?

(c)

Compute the partial derivatives \(\vec r_a\) and \(\vec r_t\) (they are vectors), and state the total derivative.

(d)

Look at a plot of the surface (use one of the links to the right). Now, suppose an object is on this surface at the point \(\vec r(3,\pi) = (-3,0,\pi)\text{.}\) At that point, please draw the partial derivatives \(\vec r_a(3,\pi)\) and \(\vec r_t(3,\pi)\text{.}\)

(e)

If you were standing at \(\vec r(3,\pi)\) and someone told you, “Hey you, hold \(t\) constant and increase \(a\text{,}\)” then in which direction would you move. What if f someone told you, “Hey you, hold \(a\) constant and increase \(t\)”?

(f)

Give vector equations for two tangent lines to the surface at \(\vec r(3,\pi)\text{.}\)

Hint

You've got the point by plugging \((3,\pi)\) into \(\vec r\text{,}\) and you've got two different direction vectors from \(D\vec r\text{.}\) Once you have a point and a vector, we know 2.1.5 how to get an equation of a line.

In the previous exercise, you should have noticed that the partial derivatives of \(\vec r(a,t)\) are tangent vectors to the surface. Because we have two tangent vectors to the surface, we should be able to use them to construct a normal vector to the surface ( recall Exercise 2.5.5 , and from that, a tangent plane (recall Exercise 2.5.1). That's just cool and leads us into the next section...

Subsection7.2.4A Notational Diversion

Since a partial derivative is a function, we can take partial derivatives of that function as well. If we want to first compute a partial with respect to \(x\text{,}\) and then with respect to \(y\text{,}\) we would write one of

\begin{equation*} f_{xy}=\ds\frac{\partial}{\partial y}\frac{\partial}{\partial x}f = \frac{\partial}{\partial y}\frac{\partial f}{\partial x} = \frac{\partial^2 f}{\partial y \partial x}. \end{equation*}

The shorthand notation \(f_{xy}\) is easiest to write. In upper-level courses, we will use subscripts to mean other things. At that point, we'll have to use the fractional partial notation to avoid confusion.

Exercise7.2.10Mixed Partials Agree

Complete the following:

(a)

Let \(f(x,y)=3xy^3+e^{x}.\) Compute the four second partials

\begin{equation*} \ds \frac{\partial^2 f}{ \partial x^2}, \ds\frac{\partial^2 f}{\partial y \partial x}, \ds\frac{\partial^2 f}{\partial y^2}, \text{ and } \ds\frac{\partial^2 f}{\partial x \partial y}. \end{equation*}
(b)

For \(f(x,y)=x^2\sin(y)+y^3\text{,}\) compute both \(f_{xy}\) and \(f_{yx}\text{.}\)

(c)

Make a conjecture about a relationship between \(f_{xy}\) and \(f_{yx}\text{.}\) Then use your conjecture to quickly compute \(f_{xy}\) if

\begin{equation*} f(x,y)=3xy^2+\tan^{2}(\cos(x)) (x^{49}+x)^{1000}. \end{equation*}

Subsection7.2.5Computational Practice

These are provided to help you achieve better skills in basic computational answers.

1
2
3
4
5
6
7