We still have some tasks from Day 15 to finish discussing in class.

Day 15 - Prep

Every time we compute a differential $df = f_xdx+ f_ydy$, we're following a pattern that shows up so often that it's given a name (linear combination). At some point you may take a linear algebra course where you'll focus quite a bit on linear combinations, and quickly adopt matrices to help speed up the process of writing linear combinations.

Linear Combination, Matrix Notation, Total Derivative

Given $n$ vectors $\vec v_1, \vec v_2,\cdots,\vec v_n$ and $n$ scalars $c_1, c_2, \cdots, c_n$ the linear combination of these vectors using these scalars is the sum $$\sum_{i=1}^n c_1 \vec v_i = c_1\vec v_1+c_2\vec v_2+\cdots+c_n\vec v_n.$$ Matrix notation and products were invented to organize linear combinations into a visually appealing compact form. We place each vector in the column of a matrix, and then place the corresponding scalars into a single column vector after the matrix. The linear combination above, in matrix form, becomes the matrix product $$c_1\vec v_1+c_2\vec v_2+\cdots+c_n\vec v_n = \begin{bmatrix} \begin{pmatrix}\\\vec v_1\\ \ \end{pmatrix} &\begin{pmatrix}\\\vec v_2\\ \ \end{pmatrix} &\cdots &\begin{pmatrix}\\\vec v_n\\ \ \end{pmatrix} \end{bmatrix} \begin{pmatrix}c_1\\c_2\\\vdots\\c_n\end{pmatrix}.$$

The derivative (or total derivative) of a function is a matrix whose columns are the partial derivatives of the function. The partial derivatives we insert into the columns of the matrix in the same order in which the variables are listed for the function. Some examples follow.

  • For the function $f(x)$, the derivative is $Df(x) = \begin{bmatrix}f_x\end{bmatrix} =\begin{bmatrix}\frac{df}{dx}\end{bmatrix}$, with differential $df = f_xdx$.
  • For the function $f(x,y)$, the derivative is $Df(x,y) = \begin{bmatrix}f_x&f_y\end{bmatrix}$, with differential $df = f_xdx+f_ydy$.
  • For the function $f(r,s,t)$, the derivative is $Df(r,s,t) = \begin{bmatrix}f_r&f_s&f_t\end{bmatrix}$, with differential $df = f_rdr+f_sds+f_tdt$.
  • For the function $\vec r(u,v)$, the derivative is $D\vec r(u,v) = \begin{bmatrix}\vec r_u&\vec r_v\end{bmatrix}$, with differential $d\vec r = \vec r_udu+\vec r_vdv$.

Task 15.1

Let's practice using the definitions above. For each function below, (a) compute and label all relevant partial derivatives. Then (b) write the differential $df$ as a linear combination of the partial derivatives. Then (c) write $df$ as a matrix product. Finish by (d) stating the total derivative $Df$ of the function.

  1. $f(x,y)=x^2y$ [Clearly label all 4 things you were asked to find, namely (a) all partials, (b) $df$ as a linear combination, (c) $df$ as a matrix product, and (d) the derivative $Df$.]
  2. $f(x,y)=x^2+2xy+3y^2$
  3. $f(x,y,z)=3xz-x^2y$

Task 15.2

The gradient of a function $f(x,y)$ is itself a function. When we compute the partial derivatives of the gradient, we obtain vectors instead of numbers. This task has you examine the differential, partials, and derivative of the gradient of a function. We'll soon see that the derivative of the gradient is precisely the key to classifying maximums and minimums of a function.

The function $f(x,y) = x^2+3xy+2y^2$ has the gradient $\vec \nabla f = (2x+3y,3x+4y)$. This is the vector field $$\vec F = (2x+3y,3x+4y).$$

  1. Find the differential $d\vec F$ and write it as the linear combination $$d\vec F = \begin{pmatrix}?\\?\end{pmatrix}dx+\begin{pmatrix}?\\?\end{pmatrix}dy.$$
  2. Rewrite the above differential as a matrix product, so fill in the blanks below. $$d\vec F = \begin{pmatrix}?&?\\?&?\end{pmatrix}\begin{pmatrix}?\\?\end{pmatrix}.$$
  3. Clearly label the two partial derivatives $\frac{\partial \vec F}{\partial x}$ and $\vec F_y$.
  4. State the total derivative $D\vec F(x,y)$ (it should be a 2 by 2 matrix). [Note: We also write the derivative of the gradient as $D^2f(x,y)$, or $D\vec\nabla f(x,y)$, and call the resulting matrix the Hessian of $f$. Some people use the notation $\vec \nabla ^2 f$ for the Hessian, though this notation also gets use for the Laplacian $\vec \nabla \cdot (\vec \nabla f)$, which is a very different quantity.]
  5. The function $f(x,y) = xy^2$ has gradient $\vec F = (y^2, 2xy)$. Repeat the above to obtain the differential of $\vec F$ (as a linear combination, and in matrix form), the partials of $\vec F$, and the derivative $D\vec F(x,y)$.

Task 15.3

Suppose a rover moves along the level curve of a function $f(x,y)$ following the path $\vec r(t)=(x,y)$. An example of such a scenario is shown below (note that lighter colors correspond to greater outputs of $f(x,y)$. )

Label the dots $A$ and $B$ (it doesn't matter which you label $A$ or $B$). Our goal is to prove that the gradient of $f$ is normal to level curves.

  1. At each dot in the picture on the right, draw a vector that represents a possible option for $\ds\frac{d\vec r}{dt} = \left(\frac{dx}{dt},\frac{dy}{dt}\right)$.
  2. Suppose $\vec r(0)=A$ and $\vec r(1)=B$. If we know that $f(\vec r(0)) = 7$, then what is $f(\vec r(1))$? Explain.
  3. As the rover moves along $\vec r(t)$, how much does $f$ change? Use this to give a value for $\ds\frac{df}{dt}$?
  4. Explain why $\vec \nabla f$ and $\ds\frac{d\vec r}{dt}$ are orthogonal at any point along the level curve. (Hint: Add $dt$ to the denominators of the the differential $df = f_xdx+f_ydy$ , and then write the differential as a dot product. Since we are on a level curve, we know the value of $\ds\frac{df}{dt}$.)
  5. At point $A$, draw a vector that points in the same direction as $\vec \nabla f(A)$. Use your work above to explain why the gradient of $f$ must be normal to the level curve.

Task 15.4

The last problem for prep each day will point to relevant problems from OpenStax. Spend 30 minutes working on problems from the sections below.

  • Return to any of the previous day's OpenStax problems to locate extra practice.

Day 16 - Prep

Learning Target Checkoff

A learning target quiz will appear in I-Learn. Complete and submit the quiz before the due date.

Day 16 - In class

There is no class. Complete the quiz in I-Learn.

Day 17 - Prep

Task 17.1

We'll focus this task on making sure we understand how differentials can help us approximate changes in a function.

A forest ranger needs to estimate the height of a tree. The ranger stands 50 feet from the base of tree and measures the angle of elevation to the top of the tree to be about 60$^\circ$.

  1. If this angle of 60$^\circ$ is correct, then what is the height of the tree? Explain in general why the height of the tree is $h(\theta) = 50 \tan \theta$.
  2. Compute the differential $dh$ in terms of $\theta$ and $d\theta$.
  3. The ranger's angle measurement is mostly likely off by some amount. If the error in the ranger's measurement could be as much as $d\theta = 5^\circ$ (so $\frac{5\pi}{180}$ radians), then use differentials to estimate how large the error in the height could be (so compute $dh$). If your answer here is quite large (much larger than the height of the tree), then look back at your work and see if using radians instead of degrees makes a difference. Why does it? Feel free to ask in class.
  4. Compute the height if the angle were exactly 65 instead of 60. What's the actual difference between these two heights?

The US mint creates coins that are roughly a cylindrical shape, with volume $V = \pi r^2h$. Unfortunately, not every coin is exactly the same size, and small errors in $r$ (given by $dr$) and small errors in $h$ (given by $dh$), affect the amount of material needed to mint these coins.

  1. Compute $dV$ to give an approximate for the change in volume given by the errors $dr$ and $dh$.
  2. The radius of a coin is much larger than the height. Will an error in the radius, or an error in the height, cause a larger change in volume? Explain using your differentials.
  3. A soda can company has a cylindrical shape that instead has a large $h$ with small $r$. Will an error in the radius, or an error in the height, cause a larger change in volume in this situation.

Task 17.2

Suppose that our rover is located at point $P=(x,y)$ on a hill whose elevation is given by $z=f(x,y)$. The rover will be moving in the direction parallel to $\vec u$.

  1. Explain why the slope of the hill at $P$ in the direction $\vec u = (dx,dy)$ is given by $$\frac{dz}{\sqrt{(dx)^2+(dy)^2}}.$$
  2. Prove that this slope can be written, using gradients, as $$\vec \nabla f(P) \cdot \frac{\vec u}{|\vec u|}.$$
  3. Use the above fact to compute the slope of a hill given by $f(x,y) = x^2+3xy$ at $P=(2,-1)$ in the direction $\vec u = (3,4)$. (We call this the directional derivative of $f$ at $P$ in the direction $\vec u$, written $D_{\vec u}f(P)$.

The directional derivative of $f$ in the direction of the vector $\vec u$ at a point $P$ is defined to be $$D_{\vec u} f(P)=\vec \nabla f \cdot \frac{\vec u}{|\vec u|}.$$ We can simplify the above to just $f(P)=\vec \nabla f \cdot \hat u$ if $\hat u$ is a unit vector. We dot the gradient of $f$ with a unit vector in the direction of $\vec u$.

  1. Show that the partial derivative of $f$ with respect to $x$ is precisely the directional derivative of $f$ in the $(1,0)$ direction.
  2. Show that the partial derivative of $f$ with respect to $y$ is precisely the directional derivative of $f$ in the $(0,1)$ direction.

Please watch this short 2 part video that discusses the gradient a bit more, and how you can connect the gradient to the slope in various directions.

Task 17.3

Suppose our rover is located at a point $P$ on a hill whose elevation is given by $z=f(x,y)$. Recall that the directional derivative of $\vec f$ at $P$ in the direction $\vec u$ is the dot product $D_{\vec u} f(P)=\vec \nabla f(P)\cdot \frac{\vec u}{|\vec u|}.$ Also recall that we can compute dot products using the law of cosines $\vec \nabla f(P)\cdot \vec u= |\vec \nabla f(P)| |\vec u|\cos\theta,$ where $\theta$ is the angle between $\vec \nabla f(P)$ and $\vec u$.

  1. Give a formula for the angle $\theta$ between the two vectors $\vec \nabla f$ and $\vec u$?
  2. Given a direction $\vec u$, the directional derivative will give the slope of $f$ at $P$ in the direction $\vec u$. We want to know which direction we should be pick to obtain the largest slope (directional derivative). Explain why the angle between $\vec u$ and $\vec \nabla f(P)$ must be 0, in order to obtain the largest slope.
  3. State a vector $\vec u$ that yields the largest directional derivative.
  4. When $\vec u$ is parallel to $\vec \nabla f(P)$, show that $D_{\vec u}f(P) = |\vec \nabla f(P)|$. In other words, explain why the length of the gradient is precisely the slope of $f$ in the direction of greatest increase (the slope in the steepest direction).
  5. Which direction points in the direction of greatest decrease? What is the slope in that direction?
  6. In your own words, summarize what facts this task helped you learn about the gradient.

Task 17.4

The last problem for prep each day will point to relevant problems from OpenStax. Spend 30 minutes working on problems from the sections below.

  • Return to any of the previous day's OpenStax problems to locate extra practice.


Today

« October 2022 »

Sun

Mon

Tue

Wed

Thu

Fri

Sat

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31