(************** Content-type: application/mathematica **************
CreatedBy='Mathematica 5.0'
Mathematica-Compatible Notebook
This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.
To get the notebook into a Mathematica-compatible application, do
one of the following:
* Save the data starting with the line of stars above into a file
with a name ending in .nb, then open the file inside the
application;
* Copy the data starting with the line of stars above to the
clipboard, then use the Paste menu command inside the application.
Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode. Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).
NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.
For more information on notebooks and Mathematica-compatible
applications, contact Wolfram Research:
web: http://www.wolfram.com
email: info@wolfram.com
phone: +1-217-398-0700 (U.S.)
Notebook reader applications are available free of charge from
Wolfram Research.
*******************************************************************)
(*CacheID: 232*)
(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[ 48890, 1264]*)
(*NotebookOutlinePosition[ 49547, 1287]*)
(* CellTagsIndexPosition[ 49503, 1283]*)
(*WindowFrame->Normal*)
Notebook[{
Cell[TextData[{
StyleBox["Lab 3B - Directional Derivatives, Gradients, and Vector Fields",
FontSize->14,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"\nMath 2374 - University of Minnesota\nhttp://www.math.umn.edu/math2374\n\
Questions to: rogness@math.umn.edu"
}], "Text",
CellFrame->True,
TextAlignment->Center,
FontColor->GrayLevel[1],
Background->RGBColor[0, 0, 1]],
Cell[CellGroupData[{
Cell[TextData[StyleBox["Introduction",
FontSize->16]], "Section"],
Cell[TextData[{
"This week's lab is sort of a mish-mash of a few different topics which are \
all interrelated: directional derivatives, gradients, and vector fields. \
These topics are all covered in your book, but ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" can help you visualize them in ways not possible on a blackboard or on a \
written page.\n\nWhen you started this class, you already knew about the \
plain-old single variable calculus derivative, i.e. the slope of the tangent \
line. Since then you've learned about two multivariable generalizations of \
the derivative, the \"partial derivative\" and the \"total derivative\" \
(which is also called the \"derivative matrix\" or \"Jacobian matrix\"). \
These two concepts are intertwined, of course, because the derivative matrix \
is composed of a bunch of partial derivatives. \n\nIn this lab, we're going \
to deal with variants of both of these ideas. The directional derivative is \
a generalization of a partial derivative. The gradient, meanwhile, is a \
special case of the Jacobian matrix. In what might seem to be either a \
bizarre coincidence or a stroke of good luck, the gradient is very useful for \
",
StyleBox["calculating",
FontSlant->"Italic"],
" the directional derivative. It also turns out that the gradient provides \
an example of a vector field, which will be an important new kind of function \
for the rest of the course.\n\nIf you're getting confused trying to keep \
track of all these connections, don't worry. You know what? This stuff ",
StyleBox["is",
FontSlant->"Italic"],
" confusing! But the more you work with these ideas, the easier it gets. \
This lab can help, too, by showing you some visual examples, and explaining \
things that you've also learned about in lecture. Sometimes it can really \
help to read or hear a second explanation about a topic, even if the first \
one was very good!\n\nWith that in mind, this lab includes very few problems, \
but a lot of reading and a number of pictures. Above all, resist the \
temptation to scan over a few sentences here, gloss over this paragraph \
there, and just skim through the material about this or that. Gradients and \
vector fields, in particular, will be absolutely fundamental for the rest of \
the course, so it's important to learn these ideas. (That's why they're \
being covered in both lecture and lab.) If a sentence or paragraph is really \
confusing, read it over again, slowly, a few times. If you're still not sure \
what it says, ask your TA for help."
}], "Text"]
}, Closed]],
Cell[CellGroupData[{
Cell["Directional Derivatives and Gradients", "Section",
FontSize->16],
Cell[TextData[{
"Let's go back to partial derivatives for a minute. Recall that if you're \
on a surface ",
Cell[BoxData[
\(TraditionalForm\`z = f(x, y)\)]],
"above (or below) a point ",
Cell[BoxData[
\(TraditionalForm\`\((x, y)\)\)]],
", then partial derivative of f with respect to x tells you how steep the \
surface is in the positive x-direction at that point. If it's positive, then \
the surface goes \"uphill\" in that direction. If it's negative, then the \
surface goes \"downhill.\" The partial derivative with respect to y tells \
you the same sort of information about what's happening in the positive \
y-direction.\n\nThat's all fine and good, but what about any of the other \
directions? To carry the previous metaphor a bit further, if you're a \
mountain climber on a 24,000ft mountain (the surface of which could be the \
graph of a function), you want to know what's going on in more than just the \
positive x- and y-direction. \n\n(Let's think of these directions as east \
and north, respectively; imagine you're looking down at the xy-plane, and \
think of the axes as lying on a compass. The x-axis points east, to the \
right, and the y-axis points up, to the north.)\n\nBack on the mountain \
you're climbing, you want to know: what about northeast? Or southsouthwest? \
Or any of the infinitely many directions in-between? That's where the ",
StyleBox["directional derivative",
FontSlant->"Italic"],
" comes in. It can tell you how steep a surface is in any given direction, \
and whether that \"steepness\" goes up or down.\n\nTake a look at the \
following graph, which could represent a mountain and a valley, side-by-side \
in an otherwise nearly flat plain."
}], "Text"],
Cell[BoxData[{
\(f[x_, y_] = 2 y*Exp[\(-x^2\) - y^2]\), "\[IndentingNewLine]",
\(\(Plot3D[f[x, y], {x, \(-1\), 3}, {y, \(-2\), 2},
PlotRange \[Rule] {\(- .8\), .8}, PlotPoints \[Rule] 15,
Boxed \[Rule] False,
AxesLabel \[Rule] {"\", "\", "\"}];\)\)}], "Input"],
Cell["\<\
Look at the point (1,0,0), which is almost exactly in the middle of \
the graph. A mountain climber at that point on the surface could walk either \
uphill or downhill -- or even in a path which keeps her flat, at the same \
height! Go to the following web page to see an interactive demonstration of \
the directional derivative using this surface:
http://www.math.umn.edu/~rogness/multivar/dirderiv.shtml\
\>", "Text"],
Cell[TextData[{
"Alternatively, you could expand the subsection below, evaluate the \
commands there to start the example from within ",
StyleBox["Mathematica",
FontSlant->"Italic"],
", and then close the subsection and continue reading here."
}], "Text",
CellFrame->True,
Background->GrayLevel[0.833326]],
Cell[TextData[{
"Here's what the example shows you. The green dot represents the mountain \
climber's position. As you change the bearing by sliding the blue dot \
around, you get an interactive look at the \"cross section\" of the surface \
through that point at the bearing. Now imagine fitting a tangent line to the \
curve representing the cross section. That's the red arrow, where the \
direction of the arrow shows you which direction the climber is facing.\n\nIf \
the arrow is pointing up, then the directional derivative in that direction \
is ",
StyleBox["positive",
FontSlant->"Italic"],
". If the arrow is pointing down, then the directional derivative is ",
StyleBox["negative",
FontSlant->"Italic"],
". An arrow which is pointing just ever so slightly up would indicate a \
small (but positive) value for the directional derivative, say 0.01. If the \
arrow is tilted more upward, the derivative has a much higher positive value.\
\n\nAs you can see, it's positive as you move from the east, through the \
north, to the west. From the west, to the south, and back to the east, it's \
negative."
}], "Text"],
Cell[CellGroupData[{
Cell["Directional Derivative Example", "Subsection"],
Cell[TextData[{
"Don't bother trying to understand the commands here; it's just intended to \
let people run the interactive example without having to launch a web \
browser. If you'd prefer to do it from within ",
StyleBox["Mathematica,",
FontSlant->"Italic"],
" simply evaluate the next cell. After the window with the picture has \
popped up, you can collapse this subsection again.\n\nNote: You ",
StyleBox["must",
FontSlant->"Italic"],
" load the commands in math2374.nb before executing the following cell!"
}], "Text",
CellFrame->True,
Background->GrayLevel[0.833326]],
Cell[BoxData[{
\(\(\(f[x_, y_] = 2 y*Exp[\(-x^2\) - y^2];\)\(\n\)
\)\), "\[IndentingNewLine]",
\(\(\(SliderX[xmin_, xmax_, yval_, zval_,
ptlabel_] := \[IndentingNewLine]{{RGBColor[1, 0, 0],
Thickness[0.01],
Line[{{xmin, yval, zval}, {xmax, yval, zval}}]}, {RGBColor[0, 0,
1], PointSize[0.04], Point[{x, yval, zval}]},
Text[ptlabel, {x, yval, zval* .8}]};\)\(\n\)
\)\), "\n",
\(\(n = 16;\)\), "\n",
\(xmin = \(-1\); xmax = 3.15; ymin = \(-2\); ymax = 2;\), "\n",
\(dx = \((xmax - xmin)\)/n; dy = \((ymax - ymin)\)/n;\), "\n",
\(\(mesh = {GrayLevel[0.7],
Table[Line[{{i, j, f[i, j]}, {i + dx, j, f[i + dx, j]}, {i + dx,
j + dy, f[i + dx, j + dy]}, {i, j + dy, f[i, j + dy]}, {i,
j, f[i, j]}}], {i, xmin, xmax, dx}, {j, ymin, ymax,
dy}]};\)\), "\n",
\(\(\(point = {RGBColor[0, 1, 0], PointSize[0.03],
Point[{1, 0, 0}]};\)\(\n\)
\)\), "\[IndentingNewLine]",
\(\(n = 22;\)\), "\n",
\(rmin = \(-2\); rmax = 2;\), "\n",
\(\(dr = \((rmax - rmin)\)/n;\)\), "\n",
\(\(\(section = {RGBColor[0, 0, 1], Thickness[0.01],
Table[Line[{{1 + \((r)\) Cos[t], \((r)\) Sin[t],
2 \((r)\) Sin[t]
Exp[\(-1\) - r^2 - 2 r*Cos[t]]}, {1 + \((r + dr)\)
Cos[t], \((r + dr)\) Sin[t],
2 \((r + dr)\) Sin[t]
Exp[\(-1\) - \((r + dr)\)^2 -
2 \((r + dr)\)*Cos[t]]}}], {r, rmin, rmax - dr,
dr}]};\)\(\n\)
\)\), "\[IndentingNewLine]",
\(\(\(plane = {RGBColor[0, 0, 1], Thickness[0.01],
Line[{{1 + \((rmax)\) Cos[t], \((rmax)\) Sin[t],
2 \((rmax)\) Sin[t]
Exp[\(-1\) - rmax^2 - 2 rmax*Cos[t]]}, {1 + \((rmax)\)
Cos[t], \((rmax)\)
Sin[t], \(-1.5\)}, {1 - \((rmax)\) Cos[t], \(-\((rmax)\)\)
Sin[t], \(-1.5\)}, {1 - \((rmax)\) Cos[t], \(-\((rmax)\)\)
Sin[t],
2 \((\(-rmax\))\) Sin[t]
Exp[\(-1\) - rmax^2 + 2 rmax*Cos[t]]}}]};\)\(\n\)
\)\), "\[IndentingNewLine]",
\(\(gf[x_, y_] = {D[f[x, y], x], D[f[x, y], y]};\)\), "\n",
\(\(vector = {RGBColor[1, 0, 0], Thickness[0.01],
Arrow3D[{1 - Cos[t], \(-Sin[t]\), \(-2\) Sin[t]/E}, {1 + 1 Cos[t],
1 Sin[t], 2 Sin[t]/E}]};\)\), "\n",
\(\(g =
Graphics3D[{mesh, point, vector, section, plane,
SliderX[0, Pi, \(-3\), \(-1\), "\"],
Text["\", {0, \(-3\), \(-1.5\)}],
Text["\", {Pi/4, \(-3\), \(-1.5\)}],
Text["\", {Pi/2, \(-3\), \(-1.5\)}],
Text["\", {3 Pi/4, \(-3\), \(-1.5\)}],
Text["\", {3.15, \(-3\), \(-1.5\)}]}, Boxed \[Rule] False,
PlotRange \[Rule] {{\(-1\), 3.15}, {\(-3\), 2}, {\(-1.5\), .8}},
ViewPoint \[Rule] {2, \(-3\), 1.5}];\)\[IndentingNewLine]\n (*\
JLink\ loaded\ and\ Java\ installed\ in\ math2374 .
nb\ *) \), "\[IndentingNewLine]",
\(\(BeginJavaBlock[];\)\), "\[IndentingNewLine]",
\(\(dirderApplet = JavaNew["\"];\)\), "\n",
\(\(dirderFrame =
JavaNew["\",
dirderApplet, {"\" <>
ToString[
InputForm[
N[g]]], "\", "\", \
"\ .785}\>", "\ If[x < \
0, 0, If[x > 3.15, 3.15, x]],t -> 2x}\>", "\", \
"\"}];\)\), "\[IndentingNewLine]",
\(\(EndJavaBlock[];\)\)}], "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell["Calculating Direction Derivatives", "Subsection"],
Cell[TextData[{
"So how do we calculate direction derivatives? Well, first it's important \
to understand when we can even talk about them. ",
StyleBox["We can only use directional derivatives for a function with one \
output; that is, a function ",
FontSlant->"Italic"],
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^n \[Rule] \
\[DoubleStruckCapitalR]\)]],
". The reason for this is that a directional derivative measures the \
change in that one output per unit change in some given direction on the \
input side of things. (In English, using the mountain climbing metaphor: the \
directional derivative measures the slope of the mountain, i.e. the \
instantaneous change in height per change in (x,y) position, where the (x,y) \
position is changing in some given direction.)\n\nIn most cases, we'll only \
work with directional derivatives for functions ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^2 \[Rule] \
\[DoubleStruckCapitalR]\)]],
", in other words, functions like ",
Cell[BoxData[
\(TraditionalForm\`z = f(x, y)\)]],
". But you could use the same ideas to calculate a directional derivative \
for a function ",
Cell[BoxData[
\(TraditionalForm\`f(x, y, z)\)]],
", or ",
Cell[BoxData[
\(TraditionalForm\`f(x\_1, \ x\_2, \[Ellipsis], x\_n)\)]],
".\n\nLike all derivatives, the directional derivative has a limit \
definition, which you can find in your textbook. It's got vectors in it, so \
it's a little messier than your normal, everyday limit definition of ",
Cell[BoxData[
\(TraditionalForm\`f' \((x)\)\)]],
" in single variable calculus, and we're going to forget about it here. \
Instead we'll concentrate on a different way to calculate the directional \
derivative.\n\nSuppose we've got a function ",
Cell[BoxData[
\(TraditionalForm\`f(x, y)\)]],
", and we're interested in the point ",
Cell[BoxData[
\(TraditionalForm\`x = a\)]],
". In the example above, this was the point (1,0), but it could be \
anything. Now suppose we want to look in a certain direction, whether it's \
east, west, or 8.29 degrees west of southsouthwest. We specify a direction \
by choosing a vector. For example, we'd say \"in the direction of the vector \
(3,4).\" In that case, we can easily find the directional derivative of ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
" at the point ",
Cell[BoxData[
\(TraditionalForm\`x = a\)]],
".\n"
}], "Text"],
Cell[TextData[{
StyleBox["Theorem",
FontSlant->"Italic"],
": The directional derivative of ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
" at the point ",
Cell[BoxData[
\(TraditionalForm\`x = a\)]],
", in the direction of a vector ",
Cell[BoxData[
\(TraditionalForm\`v\&\[RightVector]\)]],
", is given by\n\t\t\t\t",
Cell[BoxData[
\(TraditionalForm\`\(D\_u\&\[RightVector]\) \(f(
a)\)\ = \ \[Del]\&\[RightVector]\( f(a)\)\[CenterDot]
u\&\[RightVector]\)],
FontSize->16],
",\n\t\t\t\t\nwhere ",
Cell[BoxData[
\(TraditionalForm\`u\&\[RightVector]\)]],
" is a unit vector in the direction of ",
Cell[BoxData[
\(TraditionalForm\`v\&\[RightVector]\)]],
", given by",
StyleBox[" ",
FontSize->18],
Cell[BoxData[
FormBox[
RowBox[{
FormBox[\(u\&\[RightVector]\),
"TraditionalForm"], "=",
FractionBox[
FormBox[\(v\&\[RightVector]\),
"TraditionalForm"], \(\(||\)\(v\&\[RightVector]\)\(||\)\)]}],
TraditionalForm]],
FontSize->16],
", and ",
Cell[BoxData[
\(TraditionalForm\`\[Del]\&\[RightVector]\( f(a)\)\)]],
" is the gradient of ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
" evaluated at the point ",
StyleBox["a",
FontSlant->"Italic"],
". "
}], "Text",
CellFrame->True,
Background->RGBColor[0.996078, 0.996078, 0.6]],
Cell[TextData[{
"One thing in that theorem requires some explanation, namely the \"gradient \
of ",
StyleBox["f",
FontSlant->"Italic"],
" at the point ",
StyleBox["a",
FontSlant->"Italic"],
". For a function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^n \[Rule] \
\[DoubleStruckCapitalR]\)]],
" with just one output, the gradient of ",
StyleBox["f",
FontSlant->"Italic"],
" is:"
}], "Text"],
Cell[BoxData[
\(TraditionalForm\`\(\[Del]\& \[RightVector] \)f\ = \ \((\[PartialD]f\/\
\[PartialD]x\_1, \[PartialD]f\/\[PartialD]x\_2, \[Ellipsis], \[PartialD]f\/\
\[PartialD]x\_n)\)\)], "Text",
TextAlignment->Center,
FontSize->16],
Cell[TextData[{
"In most cases, we'll only work with two or three dimensions, in which \
case, ",
Cell[BoxData[
FormBox[
StyleBox[\(\(\[Del]\& \[RightVector] \)f\ = \ \((\[PartialD]f\/\
\[PartialD]x, \[PartialD]f\/\[PartialD]y)\)\),
FontSize->18], TraditionalForm]],
TextAlignment->Center,
FontSize->16],
" or ",
Cell[BoxData[
FormBox[
StyleBox[\(\(\[Del]\& \[RightVector] \)f\ = \ \((\[PartialD]f\/\
\[PartialD]x, \[PartialD]f\/\[PartialD]y, \[PartialD]f\/\[PartialD]z)\)\),
FontSize->18], TraditionalForm]],
TextAlignment->Center,
FontSize->16],
", respectively. "
}], "Text"],
Cell[TextData[{
"Note how similar the gradient is to the Jacobian matrix. Write down the \
definitions for the Jacobian matrix of a function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^n \[Rule] \
\[DoubleStruckCapitalR]\)]],
". The only real difference is whether we think of it as a vector or a \
1-column matrix; the entries themselves are exactly the same!\n\nWhy, you \
might ask, do we have two names for the identical thing? That's a good \
question, and probably has more to do with traditions -- and the difficulty \
of changing traditions -- than anything else."
}], "Text",
CellFrame->True,
Background->GrayLevel[0.833326]],
Cell[TextData[{
StyleBox["Mathematica",
FontSlant->"Italic"],
" can compute gradients using the ",
StyleBox["Grad",
FontWeight->"Bold"],
" function:"
}], "Text"],
Cell[BoxData[{
\(f[x_, y_] = x^2 + y^2 - z\), "\[IndentingNewLine]",
\(Grad[f[x, y]]\)}], "Input"],
Cell[TextData[{
"There's a catch, unfortunately; ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" only works with three dimensional gradients. Notice how it tacks on an \
extra zero at the end of the following gradient."
}], "Text"],
Cell[BoxData[{
\(f[x_, y_] = x^2 + y^3\), "\[IndentingNewLine]",
\(Grad[f[x, y]]\)}], "Input"],
Cell[TextData[{
"We've defined a special command called ",
StyleBox["Grad2D",
FontWeight->"Bold"],
" to let you compute two dimensional gradients:"
}], "Text"],
Cell[BoxData[
\(Grad2D[f[x, y]]\)], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["Example", "Subsection"],
Cell["\<\
Let's use the same function as before, and find the directional \
derivative at the point (1,0) in the direction of the vector (3,4).\
\>", \
"Text"],
Cell[BoxData[
\(f[x_, y_] = 2 y*Exp[\(-x^2\) - y^2]\)], "Input"],
Cell["From our handy-dandy theorem, we know that:", "Text"],
Cell[TextData[Cell[BoxData[
\(TraditionalForm\`\(D\_u\&\[RightVector]\) \(f(
a)\)\ = \ \[Del]\&\[RightVector]\( f(a)\)\[CenterDot]
u\&\[RightVector]\)]]], "Text",
TextAlignment->Center,
FontSize->16],
Cell[TextData[{
"First we should compute ",
Cell[BoxData[
\(TraditionalForm\`u\&\[RightVector]\)]],
", which is a unit vector in the direction of the vector ",
Cell[BoxData[
FormBox[
FormBox[\(v\&\[RightVector]\),
"TraditionalForm"], TraditionalForm]],
FontSize->16],
"=(3,4). We can use the formula ",
StyleBox[" ",
FontSize->18],
Cell[BoxData[
FormBox[
RowBox[{
FormBox[\(u\&\[RightVector]\),
"TraditionalForm"], "=",
FractionBox[
FormBox[\(v\&\[RightVector]\),
"TraditionalForm"], \(\(||\)\(v\&\[RightVector]\)\(||\)\)]}],
TraditionalForm]],
FontSize->16],
", where the double bars mean \"length of\" a vector, which is also called \
the \"norm\" of a vector."
}], "Text"],
Cell[BoxData[
\(u = {3, 4}/Sqrt[3^2 + 4^2]\)], "Input"],
Cell["\<\
We can do that a little more automatically by defining a function \
like this, which will take a vector and return a unit vector in that \
direction.\
\>", "Text"],
Cell[BoxData[{
\(unitvec[v_] = v/Norm[v]\), "\[IndentingNewLine]",
\(u = unitvec[{3, 4}]\)}], "Input"],
Cell[TextData[{
"We also need the gradient of ",
StyleBox["f",
FontSlant->"Italic"],
", and then we're ready to compute:"
}], "Text"],
Cell[BoxData[{
\(gradf[x_, y_] = Grad2D[f[x, y]]\), "\[IndentingNewLine]",
\(gradf[1, 0]\), "\[IndentingNewLine]",
\(u\), "\[IndentingNewLine]",
\(gradf[1, 0] . u\)}], "Input"],
Cell[TextData[{
"So the slope in that direction is about ",
StyleBox["8/(5e)",
FontSize->16,
FontSlant->"Italic"],
", or about 0.59. If you look back at the interactive example, does that \
seem correct?\n\nFrom the picture it seems the steepest the incline can be is \
when the bearing is about northnorthwest, or (roughly) in the direction of \
the vector (-1,2). In that direction, the directional derivative is:"
}], "Text"],
Cell[BoxData[{
\(u = unitvec[{\(-1\), 2}]\), "\[IndentingNewLine]",
\(gradf[1, 0] . u\), "\[IndentingNewLine]",
\(N[%]\)}], "Input"],
Cell["\<\
Our eyes weren't deceiving us -- it really is steeper in that \
direction. If you go in the direction of (-1,-1) instead, you'll go \
downhill:\
\>", "Text"],
Cell[BoxData[{
\(u = unitvec[{\(-1\), \(-1\)}]\), "\[IndentingNewLine]",
\(gradf[1, 0] . u\), "\[IndentingNewLine]",
\(N[%]\)}], "Input"],
Cell[TextData[{
StyleBox["Exercise 1",
FontSize->14,
FontWeight->"Bold"],
"\n\nSuppose there is a spaceship in three-dimensional space, with our sun \
located at the origin, (0,0,0). The temperature near the sun is extremely \
hot, of course -- about 6000K -- and it drops rapidly as one moves away. \
Suppose the temperate at any point is space is given by ",
Cell[BoxData[
\(TraditionalForm\`T(x, y, z) =
6000/\((1 + \((x\^2 + y\^2 + z\^2)\)/5)\)\)]],
", where x, y, and z measured in units of 10 million miles. (Here we're \
assuming the spaceship will never get close enough to other stars to notice \
their heat, so effectively our sun is the only heat-producer in the \
universe.)\n\nSuppose now that the spaceship is located on the Earth, about \
93 million miles away, at the point (9,2,1). What is the directional \
derivative (change in K per change in position) if the spaceship were to move \
in the direction of the vector (-4,-3,5)?\n\n(If you're interested in how to \
find the surface temperature of a star, look at\n\
http://zebu.uoregon.edu/~soper/Stars/color.html., or any of the other pages \
you can find on Google by searching for \"Star Temperature Color\" or \
something similar.)\n\n",
StyleBox["Exercise 2",
FontSize->14,
FontWeight->"Bold"],
"\n\nUsing the same setup as in Example 1, suppose the spaceship is \
situated at the point (4,-2,8). If the ship were to fly in the direction of \
the point (-4,3,7), would the initial change in temperature be an increase or \
a decrease?"
}], "Text",
CellFrame->True,
Background->RGBColor[1, 0.501961, 0.501961]]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell[TextData[StyleBox["Vector Fields",
FontSize->16]], "Section"],
Cell[TextData[{
"A Vector Field is one of the most fundamental concepts in Multivariable \
Calculus and Vector Analysis. One of the main reason this course exists is \
to teach you four specific theorems: the Fundamental Theorem of Line \
Integrals, Green's Theorem, Stokes' Theorem, and the Divergence Theorem. ",
StyleBox["Every single one of these theorems involves vector fields!",
FontSlant->"Italic"],
" If you take a little time now to understand what a vector field is, \
you'll save yourself some time and grief later on.\n\nIn lecture you've \
already talked about linear transformations, so you should hopefully be \
comfortable with the idea of a function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^2 \[Rule] \
\[DoubleStruckCapitalR]\^2\)]],
". This notation means that ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
" takes two inputs and has two outputs. You've also learned that a linear \
transformation with two inputs and outputs can be represented by a 2 by 2 \
matrix.\n\nA (two-dimensional) vector field is simply a function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^2 \[Rule] \
\[DoubleStruckCapitalR]\^2\)]],
", but there are two key differences: (1) ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
" is not necessarily a linear function, so it might or might not be \
possible to represent it using a matrix, and (2) we interpret the inputs and \
outputs in a different way."
}], "Text"],
Cell[CellGroupData[{
Cell["Graphing a Vector Field", "Subsection"],
Cell[TextData[{
"Let's look at an example. Traditionally we represent vector fields with \
capital letters, so we'll call our first field ",
Cell[BoxData[
\(TraditionalForm\`F\)]],
" instead of ",
Cell[BoxData[
\(TraditionalForm\`f\)]],
"."
}], "Text"],
Cell[BoxData[
\(F[x_, y_] = {\(-y\), x}\)], "Input"],
Cell[TextData[{
"Here's the key to understanding vector fields: we think of the inputs as \
",
StyleBox["points",
FontSlant->"Italic"],
", and the outputs as ",
StyleBox["vectors",
FontSlant->"Italic"],
". For example, ",
Cell[BoxData[
\(TraditionalForm\`F(2, 1)\)]],
"is the vector (-1,2):"
}], "Text"],
Cell[BoxData[
\(F[2, 1]\)], "Input"],
Cell[TextData[{
"To draw a picture of the vector field, we simply draw the vector (-1,2) -- \
the ",
StyleBox["output",
FontSlant->"Italic"],
" -- beginning at the point (2,1) -- the ",
StyleBox["input",
FontSlant->"Italic"],
". In other words, we draw a vector which goes from (2,1) to (1,3). \
(Check my arithmetic here!) \n\n Here are a whole bunch of values of the \
vector field:"
}], "Text"],
Cell[BoxData[{
\(F[0, 0]\), "\[IndentingNewLine]",
\(F[1, 0]\), "\[IndentingNewLine]",
\(F[2, 0]\), "\[IndentingNewLine]",
\(F[0, 1]\), "\[IndentingNewLine]",
\(F[1, 1]\), "\[IndentingNewLine]",
\(F[2, 1]\), "\[IndentingNewLine]",
\(F[0, 2]\), "\[IndentingNewLine]",
\(F[1, 2]\), "\[IndentingNewLine]",
\(F[2, 2]\), "\[IndentingNewLine]",
\(\)}], "Input"],
Cell["\<\
And here's a picture where we've drawn in each of these vectors, \
starting at their respective points. (You don't have to understand this \
command, although if you look at it long enough you can probably kind of \
figure out what's going on.)\
\>", "Text"],
Cell[BoxData[
\(\(Show[
Graphics[{Arrow[{0, 0}, {0, 0}], Arrow[{1, 0}, {1, 1}],
Arrow[{2, 0}, {2, 2}], Arrow[{0, 1}, {\(-1\), 1}],
Arrow[{1, 1}, {0, 2}], Arrow[{2, 1}, {1, 3}],
Arrow[{0, 2}, {\(-2\), 2}], Arrow[{1, 2}, {\(-1\), 3}],
Arrow[{2, 2}, {0, 4}]}], Axes \[Rule] True,
AspectRatio \[Rule] Automatic];\)\)], "Input"],
Cell[TextData[{
"While that's somewhat interesting, it's awfully tedious, and it would take \
forever to tell what the \"big picture\" is. Fortunately ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" includes a command to graph vector fields for you. Here's a picture of \
",
Cell[BoxData[
\(TraditionalForm\`\(\(F\)\(:\)\)\)]]
}], "Text"],
Cell[BoxData[
\(PlotVectorField[{\(-y\), x}, {x, \(-5\), 5}, {y, \(-5\), 5},
Axes \[Rule] True]\)], "Input"],
Cell[TextData[{
"Wow! Imagine having to draw each of those arrows by hand. This is \
definitely a case where a computer can make your life easier, BUT... you need \
to be careful, because ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" is hiding some of the details from you. Look above at the picture we \
constructed \"manually.\" At the point (1,1) you can see the vector (-1,1), \
which has length ",
Cell[BoxData[
\(TraditionalForm\`\@2\)]],
". But if you look at the computer generated picture, the vector starting \
at (1,1) is so short that you can only see the arrow head! ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" is scaling the vectors, trying to make the picture easier to look at; \
while that's a noble goal, it means you do lose some information -- namely, \
exactly how long those vectors are.\n\nEvaluate the next cell to show the \
vectors at full length. We' added the ",
StyleBox["ScaleFactor->None",
FontWeight->"Bold"],
" option to turn off the scaling."
}], "Text"],
Cell[BoxData[
\(PlotVectorField[{\(-y\), x}, {x, \(-5\), 5}, {y, \(-5\), 5},
ScaleFactor \[Rule] None, Axes \[Rule] True]\)], "Input"],
Cell[TextData[{
"That's a much different picture! So now you can see that ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" was really distorting your view of what's going on. However, you can \
also see what the designers of ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" were thinking; if you show the whole vectors, it can get very crowded. \
You can use the ",
StyleBox["ScaleFactor",
FontWeight->"Bold"],
" option to fiddle around with a picture to suit your own tastes. You've \
already seen what setting this option to ",
StyleBox["None",
FontWeight->"Bold"],
" can do; if you set it to a number instead, then ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" will rescale the longest vector in the picture to have that length. For \
this particular vector field (with this range of x and y) it seems like \
scaling the vectors to have length 2 or less is a nice compromise."
}], "Text"],
Cell[BoxData[
\(PlotVectorField[{\(-y\), x}, {x, \(-5\), 5}, {y, \(-5\), 5},
ScaleFactor \[Rule] 2, Axes \[Rule] True]\)], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["Why Vector Fields are Useful", "Subsection"],
Cell[TextData[{
"The last picture looks like it represents some sort of circular motion, \
and that's a clue about why vector fields are important. Very often we'll \
think of vector fields as representing fluid flow, in which case this vector \
field would represent some kind of whirlpool or drain.\n\nSometimes we'll \
also think of a vector field as a ",
StyleBox["force",
FontSlant->"Italic"],
" field; in other words, each vector represents some kind of force, whether \
from an explosion, or gravity, etc.\n\nHere are a few examples of vector \
fields for you took look at. Look at the functions and try to understand why \
the picture looks the way it does. Also play around with the ",
StyleBox["ScaleFactor",
FontWeight->"Bold"],
" option to see how it affects the pictures. Which works better, the ",
StyleBox["Automatic",
FontWeight->"Bold"],
" or ",
StyleBox["None",
FontWeight->"Bold"],
" setting?"
}], "Text"],
Cell[CellGroupData[{
Cell["The \"Blowup\" or \"Super Nova\" Vector Field", "Subsubsection"],
Cell[BoxData[{
\(F[x_, y_] = {x, y}\), "\[IndentingNewLine]",
\(PlotVectorField[F[x, y], {x, \(-5\), 5}, {y, \(-5\), 5},
ScaleFactor \[Rule] Automatic, Axes \[Rule] True]\)}], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["The \"Black Hole\" Vector Field", "Subsubsection"],
Cell[TextData[{
"Can you explain what happens when you set ",
StyleBox["ScaleFactor",
FontWeight->"Bold"],
" to ",
StyleBox["None",
FontWeight->"Bold"],
" here?"
}], "Text"],
Cell[BoxData[{
\(F[x_, y_] = {\(-x\), \(-y\)}\), "\[IndentingNewLine]",
\(PlotVectorField[F[x, y], {x, \(-5\), 5}, {y, \(-5\), 5},
ScaleFactor \[Rule] Automatic, Axes \[Rule] True]\)}], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["The \"Important\" Vector Field", "Subsubsection"],
Cell["\<\
This vector field looks a lot like the very first example we worked \
with. See if you can tell how it's different. This particular vector field \
has some very unique characteristics, which you'll learn about in lecture. \
That's why we called it \"important\" here; it also has a tendency to show up \
in textbooks and on exams.\
\>", "Text"],
Cell[BoxData[{
\(F[x_, y_] = {\(-y\)/\((x^2 + y^2)\),
x/\((x^2 + y^2)\)}\), "\[IndentingNewLine]",
\(PlotVectorField[F[x, y], {x, \(-5\), 5}, {y, \(-5\), 5},
ScaleFactor \[Rule] Automatic, Axes \[Rule] True,
PlotPoints \[Rule] 16]\)}], "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell["The \"Curving River\"", "Subsubsection"],
Cell[BoxData[{
\(F[x_, y_] = {1, Sin[x]}\), "\[IndentingNewLine]",
\(PlotVectorField[F[x, y], {x, \(-Pi\)/2, Pi/2}, {y, \(-Pi\)/2, Pi/2},
Axes \[Rule] True]\)}], "Input"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell["Vector Fields in 3D", "Subsection"],
Cell[TextData[{
"Many -- maybe most -- of the vector fields you'll work with this semester \
are three-dimensional. That means we have a function ",
Cell[BoxData[
\(TraditionalForm\`F : \[DoubleStruckCapitalR]\^3 \[Rule] \
\[DoubleStruckCapitalR]\^3\)]],
"instead of ",
Cell[BoxData[
\(TraditionalForm\`\[DoubleStruckCapitalR]\^2 \[Rule] \
\[DoubleStruckCapitalR]\^2\)]],
". Everything else you've learned goes the same way: the three inputs are \
the (x,y,z) coordinates of a point, and the output is a three dimensional \
vector which you draw beginning at the input point (x,y,z).\n\n",
StyleBox["Mathematica",
FontSlant->"Italic"],
" can draw 3D vector fields, but you'll quickly see why we tend to \
concentrate on 2D examples when we're talking about these ideas. It just \
gets too messy when you look at a three dimensional picture. Look at this \
example of a 3D vector field, which is almost the same as the first 2D vector \
field we considered above:"
}], "Text"],
Cell[BoxData[{
\(F[x_, y_, z_] = {\(-y\), x, z}\), "\[IndentingNewLine]",
\(PlotVectorField3D[
F[x, y, z], {x, \(-5\), 5}, {y, \(-5\), 5}, {z, \(-5\), 5},
Axes \[Rule] True]\)}], "Input"],
Cell[TextData[{
StyleBox["Mathematica",
FontSlant->"Italic"],
" is trying valiantly to keep things from getting too messy. It's scaling \
the vectors, as before, and it's also removed the arrows at the end of the \
vectors. While the missing arrows make things a little less cluttered, it's \
a big loss of information because you have no way of knowing which directions \
things are heading in.\n\nIf you'd like to put the arrows back in, you can \
use the ",
StyleBox["VectorHeads",
FontWeight->"Bold"],
" option. We've done that in the next command here, along with turning the \
scaling off."
}], "Text"],
Cell[BoxData[{
\(F[x_, y_, z_] = {\(-y\), x, z}\), "\[IndentingNewLine]",
\(PlotVectorField3D[
F[x, y, z], {x, \(-5\), 5}, {y, \(-5\), 5}, {z, \(-5\), 5},
Axes \[Rule] True, VectorHeads \[Rule] True,
ScaleFactor \[Rule] None]\)}], "Input"],
Cell["\<\
Now you can see why, although we work with 3D vector fields all the \
time, we very rarely draw pictures of them!\
\>", "Text"],
Cell[CellGroupData[{
Cell["Gravity", "Subsubsection"],
Cell[TextData[{
"One 3D vector field that ",
StyleBox["can",
FontSlant->"Italic"],
" be drawn fairly easily is the gravitational force field on the surface of \
the earth. Of course, the only reason we can draw it is because it's such a \
simple force field. Look at the function and see if you can guess what the \
picture will look like before evaluating the cell."
}], "Text"],
Cell[BoxData[{
\(F[x_, y_, z_] = {0, 0, \(-9.8\)}\), "\[IndentingNewLine]",
\(PlotVectorField3D[
F[x, y, z], {x, \(-50\), 50}, {y, \(-50\), 50}, {z, 0, 50},
VectorHeads \[Rule] True, Axes \[Rule] True, ScaleFactor \[Rule] False,
PlotPoints \[Rule] 5]\)}], "Input"]
}, Open ]]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell[TextData[StyleBox["The Gradient Revisited; Tying it all Together",
FontSize->16]], "Section"],
Cell[TextData[{
"Now let's combine the two previous sections. If we have a function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^2 \[Rule] \
\[DoubleStruckCapitalR]\)]],
", we can take its gradient, which is a function ",
Cell[BoxData[
\(TraditionalForm\`\[Del]\(f : \[DoubleStruckCapitalR]\^2\) \[Rule] \
\[DoubleStruckCapitalR]\^2\)]],
". Read that again -- it's tricky. ",
StyleBox["f",
FontSlant->"Italic"],
" takes two inputs, and its gradient takes the same two inputs, and gives \
you two outputs back -- namely, the two partial derivatives.\n\nBut wait! If \
the gradient is a function ",
Cell[BoxData[
\(TraditionalForm\`\[Del]\(f : \[DoubleStruckCapitalR]\^2\) \[Rule] \
\[DoubleStruckCapitalR]\^2\)]],
", then we can think of the gradient of a function as a ",
StyleBox["vector field",
FontSlant->"Italic"],
"! And thus the idea of a \"gradient vector field\" is born. You'll run \
across that term fairly often. It just means a vector field which happens to \
be the gradient of some (possibly unknown!) function."
}], "Text"],
Cell[BoxData[{
\(f[x_, y_] = x*y\), "\[IndentingNewLine]",
\(gradf[x_, y_] = Grad2D[f[x, y]]\), "\[IndentingNewLine]",
\(gradfieldpic =
PlotVectorField[gradf[x, y], {x, \(-5\), 5}, {y, \(-5\), 5},
Axes \[Rule] True]\), "\[IndentingNewLine]",
\(\)}], "Input"],
Cell[TextData[{
"Gradient vector fields are important because they have a property called \
\"path independence,\" which you'll learn about later in this course. For \
today we'll concentrate on a different idea, the fact that gradients are \
perpendicular (or \"orthogonal,\" or \"normal,\" all of which mean the same \
thing) to level sets of a function. This will help us tie a few loose ends \
with the directional derivative, too.\n\nRemember that, for a function ",
Cell[BoxData[
\(TraditionalForm\`f(x, y)\)]],
", a level set is the set of all points (x,y) such that ",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = c\)]],
", where ",
StyleBox["c",
FontSlant->"Italic"],
" is some constant number you've already chosen. For example, with our \
function ",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = x*y\)]],
" that we just used,\n\n\t",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = \(x\ y\ = \ 1\)\)]],
" is the same as y=1/x, which is a hyperbola,\n\t",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = \(x\ y\ = \ 2\)\)]],
" is the same as y=2/x, which is a hyperbola,\n\t",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = \(x\ y\ = \ 3\)\)]],
" is the same as y=3/x, which is a hyperbola,\n\nand so on. Essentially \
we're finding all of the points where the height of the surface ",
Cell[BoxData[
\(TraditionalForm\`z = f(x, y)\)]],
" is equal to 1 (or 2, or 3). We could plot these together:"
}], "Text"],
Cell[BoxData[
\(Plot[{1/x, 2/x, 3/x}, {x, \(-5\), 5}, PlotRange \[Rule] {\(-5\), 5},
AspectRatio \[Rule] Automatic]\)], "Input"],
Cell[TextData[{
"But wait! If we're looking for points where the height has a certain \
values, then we're really looking for ",
StyleBox["contour lines",
FontSlant->"Italic"],
". Remember ",
StyleBox["ContourPlot",
FontWeight->"Bold"],
"? It can generate a nice picture of this function. (Go look at Lab 1B if \
you don't remember this command.) It shows us the various \"elevation \
lines\" of the graph, including those for negative elevation."
}], "Text"],
Cell[BoxData[
\(contourpic =
ContourPlot[f[x, y], {x, \(-5\), 5}, {y, \(-5\), 5}]\)], "Input"],
Cell[TextData[{
"Now let's look at the contour plot and the gradient field together. \
There's an extra option here to make the arrows blue in the picture of the \
vector field; you don't need to worry about figuring that out. Also, the ",
StyleBox["DisplayFunction",
FontWeight->"Bold"],
" stuff prevents ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" from drawing a picture of the vector field until we show both pictures \
together."
}], "Text"],
Cell[BoxData[{
\(\(gradfieldpic =
PlotVectorField[gradf[x, y], {x, \(-4\), 4}, {y, \(-4\), 4},
Axes \[Rule] True, ColorFunction \[Rule] \((RGBColor[0, 0, 1] &)\),
PlotPoints \[Rule] 10,
DisplayFunction \[Rule] Identity];\)\), "\[IndentingNewLine]",
\(\(Show[contourpic, gradfieldpic,
DisplayFunction \[Rule] $DisplayFunction];\)\)}], "Input"],
Cell["\<\
Notice that the blue vectors in the picture are perpendicular to \
the level curves (i.e. the contour lines). This is no accident! In fact, \
it's always true that\
\>", "Text"],
Cell[TextData[{
"If the point (x,y) is on the level curve ",
Cell[BoxData[
\(TraditionalForm\`f(x, y) = c\)]],
", then ",
Cell[BoxData[
\(TraditionalForm\`\[Del]\(f(x, y)\)\)]],
"will be perpendicular to the level curve."
}], "Text",
CellFrame->True,
Background->RGBColor[0.996078, 0.996078, 0.6]],
Cell[TextData[{
"(More technically, if you draw the tangent line which touches the curve at \
the point (x,y), then the gradient vector at that point will be perpendicular \
to the tangent line.)\n\nThe same is true in any dimension. If you have a \
function ",
Cell[BoxData[
\(TraditionalForm\`f : \[DoubleStruckCapitalR]\^3 \[Rule] \
\[DoubleStruckCapitalR]\)]],
", then the level sets will be level ",
StyleBox["surfaces",
FontSlant->"Italic"],
", and the gradient will be perpendicular to the level surfaces. (That is, \
if ",
Cell[BoxData[
\(TraditionalForm\`\((x, y, z)\)\)]],
" is on some level surface, then the gradient ",
Cell[BoxData[
\(TraditionalForm\`\[Del]\(f(x, y, z)\)\)]],
" will be perpendicular -- or \"normal\" -- to the tangent plane which \
touches the surface at ",
StyleBox["(x,y,z)",
FontSlant->"Italic"],
". \n\nYou won't be asked to use this fact about gradients and level sets \
for the rest of this lab, but it will be very important in next week's lab.\n\
\nThere's a little more to be said about the picture above. Remember that ",
StyleBox["ContourPlot",
FontWeight->"Bold"],
" shades the low areas with dark colors, and the high areas with bright \
colors. Notice how the gradient vectors always seem to point straight \
uphill. Once again, that's no accident. Remember,"
}], "Text"],
Cell[BoxData[
\(TraditionalForm\`\(\(\(D\_\(u\& \[RightVector] \)\) \(f(
a)\)\ = \ \(\[Del]\& \[RightVector] \)\(f(
a)\)\[CenterDot]\(u\& \[RightVector] \)\)\(,\)\)\)], \
"DisplayFormula",
TextAlignment->Center,
FontSize->16],
Cell[TextData[{
"and if we combine that with the definition of a dot product, along with \
the fact that ",
Cell[BoxData[
\(TraditionalForm\`u\&\[RightVector]\)]],
"is a unit vector (and therefore has length one):"
}], "Text"],
Cell[BoxData[{
\(TraditionalForm\`\(D\_u\&\[RightVector]\) \(f(
a)\)\ = \ \(\[Del]\&\[RightVector]\( f(a)\)\[CenterDot]
u\&\[RightVector] = \(\(||\)\(\[Del]\&\[RightVector]\( f(
a)\)\)\(||\)\(\ \)\(||\)\(u\&\[RightVector]\)\(||\)\(\ \)\(cos(\
\[Theta])\)\)\)\), "\[IndentingNewLine]",
\(TraditionalForm\`\(\(=\)\(\ \)\(\(||\)\(\[Del]\&\[RightVector]\( f(
a)\)\)\(||\)\(cos(\[Theta])\)\)\)\)}], "DisplayFormula",
TextAlignment->Center,
FontSize->16],
Cell[TextData[{
"where \[Theta] is the angle between the gradient vector and the vector ",
Cell[BoxData[
\(TraditionalForm\`u\&\[RightVector]\)]],
", i.e. the angle between the gradient and the direction that we're going. \
The largest this can be is when cos(\[Theta])=1, which happens for \
\[Theta]=0. In other words,\n\n",
StyleBox["\"The largest the directional derivative can be is when the angle \
between the gradient and our direction is 0 -- in other words, when we're \
looking in the direction of the gradient vector.\"\n",
FontSlant->"Italic"],
"\nRephrased one more time:\n\n",
StyleBox["\"The largest value of the directional derivative is in the \
direction of the gradient; equivalently, the gradient points in the direction \
of the largest increase.\"",
FontSlant->"Italic"],
"\n"
}], "Text"],
Cell[TextData[{
StyleBox["Exercise 3",
FontSize->14,
FontWeight->"Bold"],
"\n\nRecall the setup for Exercises 1 and 2:\n\nSuppose there is a \
spaceship in three-dimensional space, with our sun located at the origin, \
(0,0,0). The temperature near the sun is extremely hot, of course -- about \
6000K -- and it drops rapidly as one moves away. Suppose the temperate at \
any point is space is given by ",
Cell[BoxData[
\(TraditionalForm\`T(x, y, z) =
6000/\((1 + \((x\^2 + y\^2 + z\^2)\)/5)\)\)]],
", where x, y, and z measured in units of 10 million miles. (Here we're \
assuming the spaceship will never get close enough to other stars to notice \
their heat, so effectively our sun is the only heat-producer in the \
universe.)\n\nLet's assume again that the spaceship is located on the Earth, \
about 93 million miles away, at the point (9,2,1). In what direction is the \
largest increase in temperature? Why is this not the least bit surprising? \
In which direction could the spaceship go to remain at the same temperature? \
(This is much harder than the first question in this paragraph.)\n\n(If \
you're assigned this problem, it's not worthy of a separate writeup. You \
should include your answer as an \"interesting aside\" in your answer to \
Exercise 1.)\n\n",
StyleBox["Exercise 4",
FontSize->14,
FontWeight->"Bold"],
"\n\nAssuming the spaceship is at the point (4,-2,8). In which direction \
should the spacecraft move in order to ",
StyleBox["decrease",
FontSlant->"Italic"],
" the temperature as quickly as possible. What direction could the \
spacecraft go to keep the temperature constant?\n\nIf you're assigned this \
problem, you should include your answers as part of your writeup to Exercise \
2, instead of doing a separate problem."
}], "Text",
CellFrame->True,
Background->RGBColor[1, 0.501961, 0.501961]],
Cell[CellGroupData[{
Cell["Credits", "Subsection"],
Cell["\<\
This lab was written entirely from scratch in January 2004. We had \
an opening in the lab schedule, and students had been having difficulty with \
the directional derivative, as well as using gradients to find tangent \
planes. That last topic is covered in another lab, but with this \
introduction it will hopefully work a little better.
This lab is copyright 2004 by Jonathan Rogness (rogness@math.umn.edu) and is \
protected by the Creative Commons Attribution-NonCommercial-ShareAlike \
License. You can find more information on this license at \
http://creativecommons.org/licenses/by-nc-sa/1.0/
Although it's not specifically required by the license, I'd appreciate it if \
you let me know if you use parts of our labs, just so I can keep track of it. \
Please send me any questions or comments!\
\>", "Text"]
}, Closed]]
}, Closed]]
},
FrontEndVersion->"5.0 for X",
ScreenRectangle->{{0, 1024}, {0, 768}},
AutoGeneratedPackage->None,
WindowSize->{584, 603},
WindowMargins->{{43, Automatic}, {Automatic, 27}}
]
(*******************************************************************
Cached data follows. If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of the file. The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[1754, 51, 406, 11, 103, "Text"],
Cell[CellGroupData[{
Cell[2185, 66, 67, 1, 71, "Section"],
Cell[2255, 69, 2588, 40, 590, "Text"]
}, Closed]],
Cell[CellGroupData[{
Cell[4880, 114, 72, 1, 41, "Section"],
Cell[4955, 117, 1745, 29, 428, "Text"],
Cell[6703, 148, 310, 5, 59, "Input"],
Cell[7016, 155, 433, 8, 122, "Text"],
Cell[7452, 165, 319, 8, 84, "Text"],
Cell[7774, 175, 1147, 20, 266, "Text"],
Cell[CellGroupData[{
Cell[8946, 199, 52, 0, 38, "Subsection"],
Cell[9001, 201, 599, 13, 138, "Text"],
Cell[9603, 216, 3804, 72, 971, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[13444, 293, 55, 0, 30, "Subsection"],
Cell[13502, 295, 2504, 53, 464, "Text"],
Cell[16009, 350, 1428, 49, 150, "Text"],
Cell[17440, 401, 448, 16, 50, "Text"],
Cell[17891, 419, 240, 5, 57, "Text"],
Cell[18134, 426, 656, 19, 63, "Text"],
Cell[18793, 447, 674, 13, 156, "Text"],
Cell[19470, 462, 177, 7, 32, "Text"],
Cell[19650, 471, 107, 2, 43, "Input"],
Cell[19760, 475, 245, 6, 50, "Text"],
Cell[20008, 483, 103, 2, 43, "Input"],
Cell[20114, 487, 169, 5, 50, "Text"],
Cell[20286, 494, 48, 1, 27, "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell[20371, 500, 29, 0, 38, "Subsection"],
Cell[20403, 502, 159, 4, 50, "Text"],
Cell[20565, 508, 69, 1, 27, "Input"],
Cell[20637, 511, 59, 0, 32, "Text"],
Cell[20699, 513, 226, 5, 36, "Text"],
Cell[20928, 520, 816, 25, 79, "Text"],
Cell[21747, 547, 59, 1, 27, "Input"],
Cell[21809, 550, 173, 4, 50, "Text"],
Cell[21985, 556, 111, 2, 43, "Input"],
Cell[22099, 560, 143, 5, 32, "Text"],
Cell[22245, 567, 195, 4, 75, "Input"],
Cell[22443, 573, 444, 9, 129, "Text"],
Cell[22890, 584, 146, 3, 59, "Input"],
Cell[23039, 589, 168, 4, 50, "Text"],
Cell[23210, 595, 151, 3, 59, "Input"],
Cell[23364, 600, 1635, 31, 446, "Text"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell[25048, 637, 68, 1, 41, "Section"],
Cell[25119, 640, 1503, 29, 284, "Text"],
Cell[CellGroupData[{
Cell[26647, 673, 45, 0, 38, "Subsection"],
Cell[26695, 675, 275, 9, 50, "Text"],
Cell[26973, 686, 56, 1, 27, "Input"],
Cell[27032, 689, 332, 12, 50, "Text"],
Cell[27367, 703, 40, 1, 27, "Input"],
Cell[27410, 706, 417, 11, 104, "Text"],
Cell[27830, 719, 404, 10, 171, "Input"],
Cell[28237, 731, 269, 5, 68, "Text"],
Cell[28509, 738, 396, 7, 91, "Input"],
Cell[28908, 747, 361, 9, 68, "Text"],
Cell[29272, 758, 119, 2, 27, "Input"],
Cell[29394, 762, 1043, 22, 213, "Text"],
Cell[30440, 786, 145, 2, 43, "Input"],
Cell[30588, 790, 947, 22, 158, "Text"],
Cell[31538, 814, 142, 2, 43, "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell[31717, 821, 50, 0, 38, "Subsection"],
Cell[31770, 823, 962, 21, 212, "Text"],
Cell[CellGroupData[{
Cell[32757, 848, 70, 0, 28, "Subsubsection"],
Cell[32830, 850, 200, 3, 59, "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell[33067, 858, 56, 0, 28, "Subsubsection"],
Cell[33126, 860, 191, 8, 32, "Text"],
Cell[33320, 870, 210, 3, 59, "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell[33567, 878, 55, 0, 28, "Subsubsection"],
Cell[33625, 880, 357, 6, 86, "Text"],
Cell[33985, 888, 276, 5, 59, "Input"]
}, Open ]],
Cell[CellGroupData[{
Cell[34298, 898, 46, 0, 28, "Subsubsection"],
Cell[34347, 900, 186, 3, 59, "Input"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell[34582, 909, 41, 0, 38, "Subsection"],
Cell[34626, 911, 1009, 20, 194, "Text"],
Cell[35638, 933, 209, 4, 59, "Input"],
Cell[35850, 939, 627, 13, 140, "Text"],
Cell[36480, 954, 268, 5, 59, "Input"],
Cell[36751, 961, 137, 3, 50, "Text"],
Cell[CellGroupData[{
Cell[36913, 968, 32, 0, 28, "Subsubsection"],
Cell[36948, 970, 391, 8, 86, "Text"],
Cell[37342, 980, 293, 5, 75, "Input"]
}, Open ]]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell[37696, 992, 100, 1, 41, "Section"],
Cell[37799, 995, 1113, 24, 176, "Text"],
Cell[38915, 1021, 293, 6, 91, "Input"],
Cell[39211, 1029, 1488, 33, 302, "Text"],
Cell[40702, 1064, 139, 2, 43, "Input"],
Cell[40844, 1068, 482, 11, 86, "Text"],
Cell[41329, 1081, 105, 2, 27, "Input"],
Cell[41437, 1085, 472, 11, 86, "Text"],
Cell[41912, 1098, 402, 7, 75, "Input"],
Cell[42317, 1107, 189, 4, 50, "Text"],
Cell[42509, 1113, 323, 10, 66, "Text"],
Cell[42835, 1125, 1379, 30, 284, "Text"],
Cell[44217, 1157, 256, 6, 32, "DisplayFormula"],
Cell[44476, 1165, 238, 6, 50, "Text"],
Cell[44717, 1173, 508, 9, 58, "DisplayFormula"],
Cell[45228, 1184, 841, 17, 230, "Text"],
Cell[46072, 1203, 1900, 36, 518, "Text"],
Cell[CellGroupData[{
Cell[47997, 1243, 29, 0, 38, "Subsection"],
Cell[48029, 1245, 833, 15, 230, "Text"]
}, Closed]]
}, Closed]]
}
]
*)
(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)