


- ContourSurfaceGradient.nb
- NOTE: In many STEM fields, graduate school tuition is waived and most students are provided 15-30K a year in extra cash through some kind of teaching or research assistantship. In other words, you get paid to go to graduate school.
Presentations
4.? - 4.?Pacing Tracker
- The quizzes have included questions for 16 objectives. How many have you passed? What are you plans to master those that you haven't mastered yet?
- We've finished units 1 through 3. Have you started your self-directed learning project for each unit?
- Remember you can submit only one SDL project per week. Plan ahead and don't let yourself get behind.
Brain Gains

- Earlier in the semester we showed that $\vec u\cdot \vec v = |\vec u||\vec v|\cos\theta$, where $\theta$ is the angle between vectors $\vec u$ and $\vec v$. Find a unit vector $\hat w$ so that $(3,4)\cdot \hat w$ is as large as possible.
Solution
Using $\vec u\cdot \vec v = |\vec u||\vec v|\cos\theta$, we find that $(3,4)\cdot \hat w = (5)(1)\cos\theta$. This is largest when $\cos\theta = 1$, or $\theta = 0$. So the unit vector we need points in the same direction as $(3,4)$, which means $\hat w = \frac{1}{5}(3,4)$.
Let's look at 4.8 now. Recall that the slope of a function in the direction $\vec u$ is given by $$D_{\vec u}f(P) = \vec \nabla f(P)\cdot \hat u.$$ This is the dot product of the gradient with a unit vector. We have the tools needed to prove that the gradient points in the direction of greatest slope, one of our first optimization facts.
- Consider the function $z=\sin(x)+e^y$, where $x=3t$ and $y=t^2$. Compute $\frac{dz}{dt}$.
Solution
There are two ways to do this.
- Substitution gives $z=\sin(3t)+e^{t^2}$. Differentiation (using the chain rule) then gives $$\frac{dz}{dt}=\cos(3t)\frac{d}{dt}(3t)+e^{t^2}\,\frac{d}{dt}(t^2)=\cos(3t)3+e^{t^2}\,2t.$$
- Differentials give $dz = \cos(x)dx+e^ydy$, with $dx = 3dt$ and $dy=2tdt$. Substitution then gives $$dz = \cos(3t)3dt+e^{t^2}\,2tdt\quad\text{or}\quad\frac{dz}{dt}=\cos(3t)3+e^{t^2}\,2t.$$
In both cases, we obtained the same solution of $$\frac{dz}{dt}=\underbrace{\cos(3t)}_{f_x}\underbrace{3}_{\frac{dx}{dt}}+\underbrace{e^{t^2}}_{f_y}\underbrace{2t}_{\frac{dy}{dt}}.$$ Writing the solution above symbolically gives us the chain rule $$\frac{dz}{dt} = f_x\frac{dx}{dt}+f_y\frac{dy}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt}+\frac{\partial z}{\partial y}\frac{dy}{dt}.$$
- Suppose $dz = e^{x^2}dx+\cos(2y)dy$, $x=3t$, and $y=t^2$. Compute $\frac{dz}{dt}$.
Solution
This time we don't know what the function $z$ equals, so we cannot first substitute and then differentiate. We do know however that $f_x = e^{x^2}$ and $f_y = \cos(2y)$. We can compute differentials and then substitute.
- Note that $dx = 3dt$ and $dy = 2tdt$. Substitution then gives $$dz = e^{(3t)^2}3\,dt+\cos(2(t^2))2t\,dt \quad\text{and so}\quad \frac{dz}{dt} = e^{(3t)^2}3+\cos(2(t^2))2t.$$
Again, the the solution above symbolically gives us the same chain rule $$\frac{dz}{dt} = f_x\frac{dx}{dt}+f_y\frac{dy}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt}+\frac{\partial z}{\partial y}\frac{dy}{dt}.$$
- For $f(x,y)=x^2-y^2$, draw the level curve (contour) that passes through the point $(0,1)$.
Solution
- We compute $f(0,1) = -1$. We then need to draw the curve $-1=x^2-y^2$ or $1=y^2-x^2$. It's a hyperbola opening up and down along the $y$-axis.
Group problems
Please download the Mathematica Notebook ContourSurfaceGradient.nb. You do not need to become an expert at using Mathematica, but learning some basic commands can only help.
- Compute $f_x$ and $\frac{\partial f}{\partial y}$ for each of the following (try to do it without computing $df$ first).
- $f(x,y) = x^2y$
- $f(x,y) = 3xy+4y^2$
- $f(x,y) = \sin(xy^2)$
- Consider the elevation function $f(x,y)=e^x\sin y$ and the path $\vec r(t) = (t^2,t^3)$.
- Compute $f(\vec r(t))$ and then compute $\frac{df}{dt}$.
- Find $df$ in terms of $x$, $y$, $dx$, and $dy$. Then find $dx$ and $dy$ in terms of $t$ and $dt$.
- Use substitution to state $df$ in terms of $dt$ and divide by $dt$ to obtain $\frac{df}{dt}$. [You should have the same answer as the first part.]
- In your solution for $\frac{df}{dt}$, label each of $f_x$, $f_y$, $\frac{dx}{dt}$ and $\frac{dy}{dt}$ to verify that $\frac{df}{dt} = f_x\frac{dx}{dt}+f_y\frac{dy}{dt}$.
- Consider the function $z=4-y^2$.
- Construct a 2D contour plot by hand. So pick several values for $z$ and plot the resulting curves. If you end up with lots of horizontal lines in the $xy$-plane, you're doing this correctly. Write the height on each horizontal line you draw.
- Construct a 3D surface plot by hand.
- Construct both the above with software.
- Consider the function $f(x,y)=4-|x|$.
- Construct a 2D contour plot. Label your contours with their corresponding height.
- Construct a 3D surface plot.
- Construct both the above with software.
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |