(************** 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[ 38795, 995]*) (*NotebookOutlinePosition[ 39792, 1026]*) (* CellTagsIndexPosition[ 39748, 1022]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[{ StyleBox["Lab 2B - Tangent Planes", FontSize->24, FontWeight->"Bold", FontVariations->{"Underline"->True}], "\nMath 2374 - University of Minnesota\nhttp://www.math.umn.edu/math2374\n \ questions to: rogness@math.umn.edu, drake@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[{ "In last week's lab, we investigated properties of continuity, \ differentiability, and partial derivatives. In this lab, all of the \ functions we consider will be differentiable, which as we learned means that \ we can approximate the function at any given point with a linear \ approximation, or \"tangent plane.\"\n\nThere's an important point here: \ earlier we talked about whether a function is differentiable at the point ", Cell[BoxData[ \(TraditionalForm\`x\&\[RightVector] = a\&\[RightVector]\)]], "; if we say that a function is \"differentiable\" without any modifier, we \ mean that it is differentiable at ", StyleBox["every", FontSlant->"Italic"], " point, or at least every point where it is defined. Go to the following \ web page:\n\nhttp://www.math.umn.edu/~rogness/multivar/tanplane.shtml\n\n(Or, \ alternatively, expand the subsection below labeled \"Tangent Plane Example\" \ and evaluate the cell there.) This demo shows you part of a paraboloid with \ a tangent plane at a certain point; you can click and drag the point to move \ it around, and LiveGraphics3D will automatically show you the tangent plane \ at the new point.\n\nThis is intended to reinforce the point that a \ \"differentiable\" function doesn't have one single tangent plane (or linear \ approximation, if you prefer that language). Rather, it has a different \ linear approximation at each point!\n\nToday we'll learn various methods of \ finding the equation of the tangent plane / linear approximation of a \ differentiable function. In some sense this is one of the most important \ things you can learn in this course, and all of the material for the first \ month of the class has led to this point. You'll even get a foreshadowing of \ things to come; in lecture, you've learned what the gradient is, but you \ haven't learned all of its properties. In this lab you'll see how you can \ use the gradient to find a tangent plane, which will be mentioned later in \ the book an in lecture." }], "Text"], Cell[CellGroupData[{ Cell["Tangent Plane Example", "Subsection"], Cell["\<\ As with the code in the previous example, you don't have to worry \ about understanding the commands here. It's just intended for people who \ would like to view the example without opening up a web browser. This is a slightly modified version of an example on the LiveGraphics3D \ website, so I make no claim of originality.\ \>", "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[BoxData[ \(\(\( (*\ plane, \ paraboloid, \ point, \ vector\ *) \)\(\[IndentingNewLine]\)\(\(independentVariables = {x \ \[Rule] .5, y \[Rule] .5};\)\n \(dependentVariables = {x \[Rule] If[x < \(-1\), \(-1\), If[x > 1, 1, x]], y \[Rule] If[y < \(-1\), \(-1\), If[y > 1, 1, y]], z \[Rule] x*x + y*y};\)\n minx = \(-1\); miny = \(-1\); maxx = 1; maxy = 1;\[IndentingNewLine] n = 10; dx = \((maxx - minx)\)/n; dy = \((maxy - miny)\)/n;\[IndentingNewLine] \(point = {PointSize[0.04], RGBColor[1, 0, 0], Point[{x, y, z}], Point[{1. *x, 1. *y, z + .2}], Point[{1. *x, 1. *y, z - .2}]};\)\[IndentingNewLine] \(paraboloid = Table[Polygon[{{i, j, i*i + j*j}, {i + dx, j, \((i + dx)\)*\((i + dx)\) + j*j}, {i + dx, j + dy, \((i + dx)\)*\((i + dx)\) + \((j + dy)\)*\((j + dy)\)}, {i, j + dy, i*i + \((j + dy)\)*\((j + dy)\)}}], {i, minx, maxx - dx/2, dx}, {j, miny, maxy - dy/2, dy}];\)\n \(plane = Table[Polygon[{{i, j, \((i - x)\)*2*x + \((j - y)\)*2*y + z}, {i + dx, j, \((i + dx - x)\)*2*x + \((j - y)\)*2*y + z}, {i + dx, j + dy, \((i + dx - x)\)*2*x + \((j + dy - y)\)*2*y + z}, {i, j + dy, \((i - x)\)*2*x + \((j + dy - y)\)*2*y + z}}], {i, minx, maxx - dx/2, dx}, {j, miny, maxy - dy/2, dy}];\)\[IndentingNewLine]\[IndentingNewLine] \(g = Graphics3D[{paraboloid, point, plane}, BoxRatios \[Rule] {1, 1, 1}, Axes \[Rule] True, AxesLabel \[Rule] {"\", "\", "\"}];\)\n\ \[IndentingNewLine] (*\ JLink\ loaded\ and\ Java\ installed\ in\ math2374 . nb\ *) \[IndentingNewLine] \(BeginJavaBlock[];\)\[IndentingNewLine] \(dirderApplet = JavaNew["\"];\)\n \(dirderFrame = JavaNew["\", dirderApplet, {"\" <> ToString[ InputForm[ N[g]]], "\", "\", \ "\", \ "\1,1,x]],y\[Rule]If[y<-1,-1,If[\ y>1,1,y]],z\[Rule]x*x+y*y}\>", "\", \ "\"}];\)\[IndentingNewLine] \(EndJavaBlock[];\)\[IndentingNewLine] \(Clear[g];\)\[IndentingNewLine] \)\)\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Plotting Planes", FontSize->16]], "Section"], Cell["\<\ Before we begin considering issues of tangency, let's review how to \ plot planes. It might help you to look in your textbook and review Cartesian \ and parametric equations for planes; you can also ask your TA for help. The nicest situation is when we can describe the plane as a function of x and \ y; in that case, we can write the equation of the plane as ``z = ax + by + \ c'' where a, b, and c are real numbers. We can just use Plot3D in those \ cases; for instance, if we had z = 3x - y, we could just use\ \>", "Text"], Cell[BoxData[ \(Plot3D[3 x\ - \ y, \ {x, \(-2\), 2}, {y, \(-2\), 2}]\)], "Input"], Cell["\<\ to plot the plane, adjusting the range of x and y if necessary. Even if we can describe a plane with a nice, easy equation, it is sometimes \ more convenient or enlightening to describe the plane with parametric \ equations. If we are given a point and two non-parallel vectors, there is a \ unique plane containing that point parallel to each of the vectors. Let's say \ our vectors are (2,3,5) and (-7,-11,13), and we wish to find the plane \ parallel to those two vectors passing through the point (17, 29, 0). In \ parametric equations, we could write\ \>", "Text"], Cell[BoxData[ \(\((17, 29, 0)\)\ + \ t\ \((2, 3, 5)\)\ + \ s \((\(-7\), \(-11\), 13)\)\)], "DisplayFormula"], Cell["\<\ where s and t range over all real numbers. To plot this plane, we \ use the properties of scalar multiplication and vector addition, and use \ ParametricPlot3D:\ \>", "Text"], Cell[BoxData[ \(ParametricPlot3D[{17 + 2*t - 7*s, \ 29 + 3*t - 11*\ s, \ 5*t + 13*s}, \ {t, \(-1\), 1}, {s, \(-1\), 1}]\)], "Input"], Cell[TextData[{ "You can keep the parametric equation of the plane in ``un-multiplied out'' \ form and use ParametricPlot3D, although earlier versions of ", StyleBox["Mathematica", FontSlant->"Italic"], " might complain a bit before showing you the graph. Either way works; \ mathematically they are exactly equivalent. The following form may be easier \ to write." }], "Text"], Cell[BoxData[ \(ParametricPlot3D[{17, \ 29, 0}\ + \ t*{2, 3, 5} + s*{\(-7\), \(-11\), 13}, \ {t, \(-1\), 1}, {s, \(-1\), 1}]\)], "Input"], Cell[TextData[{ "One important thing to note is that we've only plotted a small portion of \ the plane. Above we chose values of t and s between -1 and 1, but we can \ choose any range we like. The ranges on s and t don't have to be the same. \ You don't have to use s and t if you don't like; ", StyleBox["Mathematica", FontSlant->"Italic"], " will let you use pretty much any variable name you like. The world is \ your oyster.\n\nThere's one other point you should be aware of. In this \ class you've seen how difficult it can be sometimes to represent \ three-dimensional pictures on a two-dimensional computer screen or piece of \ paper. A picture of a plane can be particularly hard to decipher; it's \ sometimes difficult to tell which part is sloping uphill, which part is going \ downhill, or even whether a plane is horizontal or vertical. As an example, \ look at the previous picture and try to decide how the plane is situated in \ space. Then evaluate the following command, which will make the same picture \ pop up in an interactive window. Rotate the plane around and see how \ accurately you interpreted the two-dimensional picture." }], "Text"], Cell[BoxData[ \(ParametricPlot3DLive[{17, \ 29, 0}\ + \ t*{2, 3, 5} + s*{\(-7\), \(-11\), 13}, \ {t, \(-1\), 1}, {s, \(-1\), 1}]\)], "Input"], Cell[CellGroupData[{ Cell["Example", "Subsection"], Cell["Plot the plane that's described by", "Text"], Cell[BoxData[ \(s \((0, 0, 1)\)\ + \ t \((0.2, \ 0.2, \ 2)\)\)], "DisplayFormula"], Cell["\<\ when s and t range from 2 to 3. It won't look very \ good\[LongDash]it's ``too skinny''. Experiment with some different ranges on \ s and t until you get a nicer picture\[LongDash]one that's a little more \ ``square''.\ \>", "Text"], Cell[TextData[{ StyleBox["Exercise 1 - A Thought Experiment", FontSize->16, FontWeight->"Bold"], "\n\nAre there planes that are not the graph of a function of x and y? If \ so, which planes are they? If there are no such planes, explain why.\n\nAre \ there planes that ", StyleBox["cannot", FontSlant->"Italic"], " be described by a parametrization? If so, which planes are they? If there \ are no such planes (i.e., any plane whatsoever can be described by a \ parametrization), explain why.\n\nExplain your reasoning!" }], "Text", CellFrame->True, Background->RGBColor[1, 0.498039, 0.498039]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Tangent Planes Via Partial Derivatives", FontSize->16]], "Section"], Cell[TextData[{ "You've learned that, basically, a function is \"differentiable\" if it has \ a linear approximation; in the case of a function ", Cell[BoxData[ \(TraditionalForm\`z = f(x, y)\)]], ", this is the same as saying it has a tangent plane at each point. You've \ also seen the general (cartesian) equation ", Cell[BoxData[ \(TraditionalForm\`z = L(x, y)\)]], " of a linear approximation/tangent plane for a function like this; it has \ lots of partial deriatives in it.\n\nIn this section we're going to learn how \ to use partial derivatives to find the ", StyleBox["parametric", FontSlant->"Italic"], " equation of a tangent plane. Before you do anything else, open the \ following page in a web browser and read the material there:", "\n\nhttp://www.math.umn.edu/~rogness/multivar/partialderivs.html\n\nOnce \ you've read the web page, you can continue on to the rest of the lab." }], "Text"], Cell[CellGroupData[{ Cell["\<\ Using Tangent Vectors to find Parametric Equations of Tangent \ Planes\ \>", "Subsection"], Cell[TextData[{ "So now you've seen that tangent vectors of cross sections through a point \ are in the tangent plane at that point. But wait -- all we need to write \ down the parametric equation of a plane is a point on the plane and two \ vectors in the plane! So, in this situation, we've got all the information \ we need. Given two cross sections of a surface which intersect at a point ", Cell[BoxData[ \(TraditionalForm\`x\&\[RightVector] = a\&\[RightVector]\)]], ", the equation of the tangent plane is:" }], "Text"], Cell[BoxData[ \(TraditionalForm\`p(s, t) = a\&\[RightVector] + s\[CenterDot]\((tan . \ vector\ of\ first\ cross\ section\ at\ the\ point\ a\&\ \[RightVector])\)\ + \ t\[CenterDot]\(\((tan . \ vector\ of\ second\ cross\ section\ at\ the\ point\ a\&\ \[RightVector])\)\(.\)\)\)], "DisplayFormula", TextAlignment->Center], Cell["\<\ Let's do a real-life example now, by finding the plane tangent to \ the surface\ \>", "Text"], Cell[BoxData[ \(z\ = \ x\^2\ + \ 3 xy\ + \ y\^2\)], "DisplayFormula", TextAlignment->Center, FontSize->14], Cell[TextData[{ "at the point (1,-2,-1). First let's plot the surface; we'll use the ", StyleBox["Mesh", FontWeight->"Bold"], " option to turn off the grid, so that later on we can see our cross \ sections a little better." }], "Text"], Cell[BoxData[{ \(f[x_, y_]\ = \ x^2\ + \ 3\ x*y\ + \ y^2\), "\[IndentingNewLine]", \(surf\ = \ Plot3D[f[x, y], \ {x, 0, 2}, {y, \(-3\), \(-1\)}, \ Mesh \[Rule] False, AxesLabel \[Rule] {"\", "\", "\"}]\)}], "Input"], Cell[TextData[{ "Now we need to find the partial derivatives of ", StyleBox["f", FontSlant->"Italic"], " and evaluate them at the point ", Cell[BoxData[ \(TraditionalForm\`\((x, y)\) = \((1, \(-2\))\)\)]], "." }], "Text"], Cell[BoxData[{ \(fx[x_, y_] = D[f[x, y], x]\), "\[IndentingNewLine]", \(fy[x_, y_] = D[f[x, y], y]\[IndentingNewLine]\), "\[IndentingNewLine]", \(fx[1, \(-2\)]\), "\[IndentingNewLine]", \(fy[1, \(-2\)]\)}], "Input"], Cell[TextData[{ "As you learned in the external web page, the vectors\n\t\t\t\t ", Cell[BoxData[ \(TraditionalForm\`\((1, 0, \(f\_x\)(1, \(-2\)))\) = \((1, 0, \(-4\))\)\)]], "\n\t\t\t\t ", Cell[BoxData[ \(TraditionalForm\`\((0, 1, \(f\_y\)(1, \(-2\)))\) = \((0, 1, \(-1\))\)\)]], " \nare both parallel to the tangent plane at our point; let's use the ", StyleBox["Arrow3D", FontWeight->"Bold"], " graphics object to draw these vectors with our surface. The syntax for ", StyleBox["Arrow3D", FontWeight->"Bold"], " might seem a little odd; we have to tell ", StyleBox["Mathematica", FontSlant->"Italic"], " that it's a graphical object (hence the ", StyleBox["Graphics3D[]", FontWeight->"Bold"], " bit), and then we tell it the starting point and ending point of the \ vector. Make sure you can understand why the following command does that." }], "Text"], Cell[BoxData[{ \(\(tangentvectorx = Graphics3D[ Arrow3D[{1, \(-2\), \(-1\)}, {1, \(-2\), \(-1\)} + {1, 0, \(-4\)}]];\)\), "\[IndentingNewLine]", \(\(tangentvectory = Graphics3D[ Arrow3D[{1, \(-2\), \(-1\)}, {1, \(-2\), \(-1\)} + {0, 1, \(-1\)}]];\)\), "\[IndentingNewLine]", \(\(ShowLive[surf, tangentvectorx, tangentvectory];\)\)}], "Input"], Cell[TextData[{ "We're using ", StyleBox["ShowLive", FontWeight->"Bold"], " here instead of ", StyleBox["Show", FontWeight->"Bold"], " because you'll probably have to rotate the picture and look at it from \ below to see the vectors. It certainly seems plausible that they're in a \ tangent plane for the surface!\n\nLet's go ahead and define the parametric \ equation for our tangent plane, using the equation above." }], "Text"], Cell[BoxData[ \(p[s_, t_]\ = \ {1, \(-2\), f[1, \(-2\)]} + s*{1, 0, fx[1, \(-2\)]} + t*{0, 1, fy[1, \(-2\)]}\)], "Input"], Cell["\<\ Now plot the plane and the surface together in a LiveGraphics3D \ pop-up window:\ \>", "Text"], Cell[BoxData[{ \(\(tanplane\ = ParametricPlot3D[ p[s, t], \ {s, \(-1\), 1}, \ {t, \(-1\), 1}];\)\), "\[IndentingNewLine]", \(\(ShowLive[surf, \ tanplane];\)\), "\[IndentingNewLine]", \(\)}], "Input"], Cell[TextData[{ "Rotate the picture and see if you can convince yourself that this plane \ really is tangent to the surface. (We've talked about how appearances can be \ deceiving, but in this case your eyes aren't lying to you.) Note how the \ plane is above the surface at some points and below it at others; that's \ perfectly fine. It's analogous to the line tangent to the curve y = ", Cell[BoxData[ \(TraditionalForm\`sin\ x\)]], " at x = 0, which goes above and beneath the curve:" }], "Text"], Cell[BoxData[ \(Plot[{Sin[x], x}, {x, \(-Pi\)/2, Pi/2}, AspectRatio \[Rule] Automatic]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Using Tangent Vectors to find Cartesian Equations of Tangent Planes\ \ \>", "Subsection"], Cell["\<\ Sometimes we need to find a Cartesian equation for a tangent plane. \ Recall that the Cartesian equation of a plane looks like\ \>", "Text"], Cell[BoxData[ \(A \((x - x\_0)\) + B \((y - y\_0)\) + C \((z - z\_0)\) = 0\)], "DisplayFormula", TextAlignment->Center, FontSize->14], Cell[TextData[{ "where ", Cell[BoxData[ \(TraditionalForm\`\((x\_0, y\_0, z\_0)\)\)]], " is a point on the plane, and the vector ", Cell[BoxData[ \(TraditionalForm\`\((A, B, C)\)\)]], " is normal (i.e. perpendicular) to the plane. Now think back to what \ we've been doing so far: given a surface, we choose a point; then we find two \ curves through that point; then we find the tangent vectors at that point.\n\n\ So we've got a point, and now we need a normal vector. Why not just use the \ cross product of the two tangent vectors? They're both in the tangent plane, \ so their cross product is perpendicular to the plane.\n\nHere's the \ parametric equation of the tangent plane we just found, which touches the \ surface at ", Cell[BoxData[ \(TraditionalForm\`\((1, \(-2\), \(-1\))\)\)]], ". " }], "Text"], Cell[BoxData[ \(p[s_, t_]\ = \ {1, \(-2\), f[1, \(-2\)]} + s*{1, 0, fx[1, \(-2\)]} + t*{0, 1, fy[1, \(-2\)]}\)], "Input"], Cell[TextData[{ "The two tangent vectors are ", Cell[BoxData[ \(TraditionalForm\`\((1, 0, \(-4\))\)\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\((0, 1, \(-1\))\)\)]], ", so our normal vector is their cross product. ", StyleBox["Mathematica", FontSlant->"Italic"], " can compute cross products with a command named, not surprisingly, ", StyleBox["Cross", FontWeight->"Bold"], ":" }], "Text"], Cell[BoxData[ \(Cross[{1, 0, \(-4\)}, {0, 1, \(-1\)}]\)], "Input"], Cell["Therefore our Cartesian equation for this same plane is", "Text"], Cell[BoxData[{ \(4 \((x - 1)\) + 1 \((y + 2)\) + 1 \((z + 1)\) = 0\[IndentingNewLine]\), "\[IndentingNewLine]", \(z = \(-4\) x - y + 1\)}], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "Let's plot this using ", StyleBox["Plot3D", FontWeight->"Bold"], " and show it with the original surface:" }], "Text"], Cell[BoxData[{ \(\(tanplane2 = Plot3D[\(-4\) x - y + 1, {x, 0, 2}, {y, \(-1\), \(-3\)}];\)\), "\[IndentingNewLine]", \(\(Show[surf, tanplane2];\)\)}], "Input"], Cell["\<\ Are you convinced that this is the same tangent plane? It \ certainly looks that way, and in fact it is!\ \>", "Text"], Cell[TextData[{ StyleBox["Exercise 2", FontSize->16, FontWeight->"Bold"], "\n\nIn this exercise you're going to find the linear approximation (or \ tangent plane, if you prefer) of the function ", Cell[BoxData[ \(TraditionalForm\`g(x, y) = x\^2 - y\^2\)]], "at the point ", Cell[BoxData[ \(TraditionalForm\`\((x, y)\) = \((1, 2)\)\)]], ". Your work should include the following steps:\n\n(a) Describe the cross \ sections of the surface defined by ", Cell[BoxData[ \(TraditionalForm\`x = 1\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y = 2\)]], ". \n\n(b) Find the partial derivatives of ", StyleBox["g", FontSlant->"Italic"], " at the appropriate point; using these values, find two vectors tangent to \ the surface there.", "\n\n(c) Give simplified parametric and cartesian equations for the tangent \ plane.\n\nYour writeup should include a good picture of both the surface and \ the tangent plane. You should put some thought into the ranges of the x- and \ y-values in your picture; if you're too close, you won't be able to tell the \ difference between the plane and the surface, but if you're too far away, the \ resulting picture may not be very useful. In particular, if your picture \ clearly shows that your plane is ", StyleBox["not", FontSlant->"Italic"], " tangent, or if it's impossible to tell, you will most likely lose points.\ \n\n", StyleBox["Exercise 3", FontSize->16, FontWeight->"Bold"], "\n\nIn this exercise you're going to find the linear approximation (or \ tangent plane, if you prefer) of the function ", Cell[BoxData[ \(TraditionalForm\`g(x, y) = \(sin(x)\) \(cos(y)\)\)]], "at the point ", Cell[BoxData[ \(TraditionalForm\`\((x, y)\) = \((\[Pi]/4, \(-\[Pi]\)/4)\)\)]], ". Your work should include the following steps:\n\n(a) Describe the cross \ sections of the surface defined by ", Cell[BoxData[ \(TraditionalForm\`x = \[Pi]/4\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y = \(-\[Pi]\)/4\)]], ". \n\n(b) Find the partial derivatives of ", StyleBox["g", FontSlant->"Italic"], " at the appropriate point; using these values, find two vectors tangent to \ the surface there.", "\n\n(c) Give simplified parametric and cartesian equations for the tangent \ plane.\n\nYour writeup should include a good picture of both the surface and \ the tangent plane. You should put some thought into the ranges of the x- and \ y-values in your picture; if you're too close, you won't be able to tell the \ difference between the plane and the surface, but if you're too far away, the \ resulting picture may not be very useful. In particular, if your picture \ clearly shows that your plane is ", StyleBox["not", FontSlant->"Italic"], " tangent, or if it's impossible to tell, you will most likely lose points.\ \n" }], "Text", CellFrame->True, Background->RGBColor[1, 0.498039, 0.498039]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Tangent Planes Via Gradients", FontSize->16]], "Section"], Cell["\<\ Another way to find the tangent plane to a surface is to use the \ gradient vector. Recall that the gradient vector of a function f(x,y) is \ defined to be\ \>", "Text"], Cell[BoxData[ \(\[Del]\&\[RightVector] f \((x, y)\) = \(\((\[PartialD]f\/\[PartialD]x, \ \ \[PartialD]f\/\[PartialD]y)\)\(.\)\)\)], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "Hmmm. This is a two-dimensional vector, and to define a plane in 3-space, \ we'll definitely need vectors with three components. We get around this by \ doing some minor rearranging. Our surface is defined by ", Cell[BoxData[ \(TraditionalForm\`z = f(x, y)\)]], ". We could move everything over to the same side and say that our surface \ is defined by the equation" }], "Text"], Cell[BoxData[ \(TraditionalForm\`z - f(x, y) = 0\)], "DisplayFormula", TextAlignment->Center, FontSize->14], Cell[TextData[{ "You might be thinking that this is an odd step; if anything, it's a more \ complicated way to write it. That's true, and it's going to get a little \ worse. Rather than saying our surface is defined by this equation, let's \ defined a ", StyleBox["new", FontSlant->"Italic"], " function:" }], "Text"], Cell[BoxData[ \(g \((x, y, z)\)\ = \ z\ - \ f \((x, y)\)\)], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "And now we say that our function is the ", StyleBox["level set", FontSlant->"Italic"], " defined by ", Cell[BoxData[ \(TraditionalForm\`g(x, y, z) = 0\)]], ". So now instead of the nice, simple statement ", Cell[BoxData[ \(TraditionalForm\`z = f(x, y)\)]], ", we're suddenly talking about level sets. Yikes! There's a reason for \ this, however...\n\nNotice that ", Cell[BoxData[ \(TraditionalForm\`g(x, y, z)\)]], " is a function of three variables, and its gradient ", Cell[BoxData[ \(TraditionalForm\`is\)]] }], "Text"], Cell[BoxData[ \(\[Del]\&\[RightVector] g \((x, y, z)\) = \(\((\(-\(\[PartialD]f\/\[PartialD]x\)\), \ \ \(-\(\[PartialD]f\/\[PartialD]y\)\), \ 1)\)\(.\)\)\)], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "Now recall from lecture that ", StyleBox["the gradient of a function g is perpendicular to the level sets \ of g", FontSlant->"Italic"], ". (", StyleBox["If you haven't seen this in lecture yet, you will soon. Just \ take it for granted here; it might be a good idea to ask your TA to draw a \ picture of what this means", FontWeight->"Bold", FontSlant->"Italic"], ".) ", "In other words:\n\n-- We can start with a point (x,y,z) which is on the \ level set ", Cell[BoxData[ \(TraditionalForm\`g(x, y, z) = 0\)]], ".\n-- Because of the way we defined ", Cell[BoxData[ \(TraditionalForm\`g(x, y, z)\)]], ", this is the same as saying the point is on the surface ", Cell[BoxData[ \(TraditionalForm\`z = f(x, y)\)]], ".\n-- Furthermore, ", Cell[BoxData[ \(\[Del]\&\[RightVector] g \((x, y, z)\)\)], TextAlignment->Center], "will be perpendicular (or normal) to our surface at that point.\n-- In \ particular, we can use ", Cell[BoxData[ \(\[Del]\&\[RightVector] g \((x, y, z)\)\)], TextAlignment->Center], "as a normal vector to define the equation for our tangent plane!\n\nLet's \ use this method quickly to find the same tangent plane we've been working \ with this whole time. Remember that the function is given by:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(f[x_, y_]\ = \ x^2\ + \ 3\ x*y\ + \ y^2\)], "Input"], Cell[BoxData[ \(x\^2 + 3\ x\ y + y\^2\)], "Output"] }, Open ]], Cell["So we can do our magic \"new\" function like this:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(g[x_, y_, z_] = z - f[x, y]\)], "Input"], Cell[BoxData[ \(\(-x\^2\) - 3\ x\ y - y\^2 + z\)], "Output"] }, Open ]], Cell[TextData[{ "We're interested in the gradient at the point ", Cell[BoxData[ \(TraditionalForm\`\((1, \(-2\), \(-1\))\)\)]], ":" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(gradg[x_, y_, z_] = Grad[g[x, y, z]]\), "\[IndentingNewLine]", \(gradg[1, \(-2\), \(-1\)]\)}], "Input"], Cell[BoxData[ \({\(-2\)\ x - 3\ y, \(-3\)\ x - 2\ y, 1}\)], "Output"], Cell[BoxData[ \({4, 1, 1}\)], "Output"] }, Open ]], Cell["Thus the Cartesian equation of the tangent plane is:", "Text"], Cell[BoxData[{ \(\(\(4 \((x - 1)\) + \((y + 2)\) + \((z + 1)\) = 0\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(z = \(-4\) x - y + 1\)}], "DisplayFormula", TextAlignment->Center], Cell["\<\ Which is exactly what we found before. Good! Although the \"gradient method\" of finding a tangent plane might seem more \ complicated -- particularly if you don't like level sets -- it's very, very \ useful. We didn't have to find any cross sections, find tangent vectors, and \ so on. We just rewrote the original equation, computed one gradient, and we \ were basically done!\ \>", "Text"], Cell[TextData[{ StyleBox["Exercise 4", FontSize->16, FontWeight->"Bold"], "\n\nUse the gradient method to find the cartesian equation of the plane \ tangent to\n\n", Cell[BoxData[ \(TraditionalForm\`f(x, y) = \(Exp(\(-x\^2\) - y\^2)\)*x\)]], "\n\nat the point ", Cell[BoxData[ \(TraditionalForm\`\(\((0, 0, f(0, 0))\)\(.\)\)\)]], " Show the graph of f(x,y) and this tangent plane together on the same \ plot. Be sure to show your work and explain your reasoning.\n\n", StyleBox["Exercise 5", FontSize->16, FontWeight->"Bold"], "\n\nUse the gradient method to find the cartesian equation of the plane \ tangent to\n\n", Cell[BoxData[ \(TraditionalForm\`f(x, y) = y*\(Cos(x)\)\)]], "\n\nat the point ", Cell[BoxData[ \(TraditionalForm\`\(\((0, \[Pi]/4, f(0, \[Pi]/4))\)\(.\)\)\)]], " Show the graph of f(x,y) and this tangent plane together on the same \ plot; use the ranges -\[Pi] to \[Pi] for both x and y. Be sure to show your \ work and explain your reasoning. In particular, with the suggested ranges \ the \"true\" tangent plane looks like it sticks through part of the surface. \ You may want to explain why that's the case." }], "Text", CellFrame->True, Background->RGBColor[1, 0.498039, 0.498039]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Tangent Plane Conspiracy Theory", FontSize->16]], "Section"], Cell["\<\ You are not responsible for the material in this section, but we've \ included it for those people who are interested in the mathematics behind all \ of this; it turns out that all of the different methods of finding tangent \ planes aren't really all that different!\ \>", "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[TextData[{ "In this section, we'll learn that, despite all appearances to the \ contrary, the ``tangent vectors'' and ``gradient vector'' methods are \ surreptitiously working together and are engaged in a ", StyleBox["secret government conspiracy!", FontSlant->"Italic"], "\n\nOkay, there's no government conspiracy (well...none that ", StyleBox["I'm", FontSlant->"Italic"], " aware of), but it is true that the two methods are working together\ \[LongDash]in fact, they are just different ways of looking at the same \ thing. Let's talk about directional derivatives for a bit before explaining \ why they're the same.\n\nAbove we were talking about partial derivatives and \ directions, which should remind you of directional derivatives. In the \ Tangent Vectors section, when specifying ``the planes y = 2x - 4 and y = -x - \ 1'', we were really talking about direction vectors. In the above cases, the \ corresponding direction vectors would be" }], "Text"], Cell[BoxData[ \(\(\(\(1\/\@5\) \((1, 2)\)\ \ \ \ and\ \ \ \ \ \(1\/\@2\) \((1, \(-1\))\)\)\(,\)\)\)], \ "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "respectively. We are basically using the slope of a line: y = 2x - 4 is a \ line (in two dimensions) with slope 2. The vector (1,2) is parallel to that \ line, and above we just normalized it. The other direction vector was \ obtained in a similar way. Once we know direction vectors, we just need to \ take the dot product with the gradient vector to find the directional \ derivative. The conspiracy is already unravelling.\n\nFor the function f(x,y) \ = ", Cell[BoxData[ \(TraditionalForm\`x\^2\ + \ 3 xy + \ y\^2\)]], " at the point (1,-2), and the first direction vector\[LongDash]call it u\ \[LongDash]we have" }], "Text"], Cell[BoxData[ \(Df\_u = \ \(\((\[PartialD]f\/\[PartialD]x, \ \ \[PartialD]f\/\[PartialD]y)\)\[CenterDot]\((1\/\@5, 2\/\@5)\)\ = \ \(\((\(-4\), \ \(-1\))\)\[CenterDot]\((1\/\@5, 2\/\@5)\)\ = \ \(-\(6\/\@5\)\)\)\)\)], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "We interpret this by saying ``in the direction of u, f is increasing at a \ rate of ", Cell[BoxData[ \(TraditionalForm\`\(-6\)/\@5\)]], ".'' The upshot of this is that (", Cell[BoxData[ \(TraditionalForm\`1/\@5\)]], ", ", Cell[BoxData[ \(TraditionalForm\`2/\@5\)]], ", ", Cell[BoxData[ \(TraditionalForm\`\(-6\)/\@5\)]], ") is a tangent vector to f(x,y), and it's parallel to \ (1,2,-6)\[LongDash]the tangent vector we found by using the path we described \ in the first section. We get this vector by taking the direction vector\ \[LongDash]a two-dimensional vector\[LongDash]and adding a third component, \ which is given by the directional derivative of f(x,y). In general, this \ means that" }], "Text"], Cell[BoxData[ \(\((u1, \ u2, \ \(D\_u\) f)\)\)], "DisplayFormula"], Cell[TextData[{ "is a vector tangent to the surface z = f(x,y). You should do this same \ process with the other direction vector above and make sure that you end up \ with a tangent vector parallel to (1,-1,-3).\n\nOf course, there's nothing \ special about those two directional vectors above. We can use ", StyleBox["any", FontSlant->"Italic"], " two non-parallel direction vectors and we'll get the same \ plane\[LongDash]which is exactly what you would hope for, since a function \ can have only one tangent plane (or no tangent plane, if the function isn't \ differentiable). The following exercise will help you expose the conspiracy\ \[LongDash]er, show that the tangent planes from the ``tangent vectors \ method'' and from the ``gradient vectors method'' are in fact the same. We'll \ do that by comparing the normal vectors of the resulting planes." }], "Text"], Cell[TextData[{ StyleBox["Exercise ", FontSize->16, FontWeight->"Bold"], "\n\n(Notice that this isn't in a red box; you don't have to hand this \ exercise in. You might find it interesting, however.)\n\nAs discussed in the \ Gradient Vector section, the gradient of z - f(x,y) represents a normal \ vector to the tangent plane, so our main objective is to find the normal \ vector of the plane we get from the tangent vector method. We'll use an \ arbitrary differentiable function f(x,y) and two non-parallel direction \ vectors u = (u1, u2) and v = (v1, v2).\n\n\t(i) Find the vectors tangent to \ f(x,y) in the directions of u and v. Describe them in terms of u1, u2, v1, \ v2, and the partials of f (\[PartialD]f / \[PartialD]x and \[PartialD]f / \ \[PartialD]y).\n\n\t(ii) Find the normal vector of the plane spanned by those \ two vectors.\n\t\n\t(iii) Show that the normal vector you found in (ii) is \ parallel to the gradient vector of the function g(x,y,z) = z - f(x,y).\n\t\n\t\ (iii) What does this imply about the tangent planes found using the two \ different methods?\n " }], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell["Credits", "Subsubsection"], Cell[TextData[{ "This lab is a descendent of an earlier lab on Tangent Planes written by \ Cindy Kaus. Dan Drake did a major rewrite in 2002, and then I overhauled it \ again in February 2004. We changed the focus a little bit, and added a few \ things here and there; having taught this lab for a few years now, we've \ learned what the sticking points are for students, so I've tried to add extra \ explanations in these parts. I also changed the exercises, except for #1, \ which Dan wrote, and the pseudo-exercise in the \"Conspiracy Theory\" \ section, which is also Dan's. I changed the rest of them so we'd have a \ little variety; the previous exercises have been used for the last 4 years or \ so.\n\nIt's a little difficult to completely describe who did what, but \ here's an attempt:\n\n-- I don't believe any of the writing is Cindy's; the \ only thing remaining is her choice of the surface and the point where we find \ the tangent planes.\n\n-- The \"Plotting Planes\" and \"Tangent Plane \ Conspiracy Theory\" sections are all Dan's; at most I changed a few words \ here or there, or added a ", StyleBox["Live", FontWeight->"Bold"], " command.\n\n-- The other sections are fairly major rewrites of Dan's \ original sections. A lot of his original text remains. Some of it remains \ but has been modified a bit, because of reorganization, etc. Some of it is \ new text added by me. To make things more complicated, it's all intertwined; \ many paragraphs combine Dan's writing with mine.\n\n[ Update (Fall 2004): \ switching textbooks really messed this lab up. We used to parametrize \ \"general\" cross sections, i.e. the points in the surface over any line in \ the xy-plane which went through the appropriate surface. In the new \ textbook, students know about parametric equations of lines, but not \ parametric curves, and not the tangent vector of a parametric curve. I had \ to gut that section and replace it with a version where we only use tangent \ vectors derived from the partial derivatives. Ah well. ]\n\nThis would be a \ major mess, but fortunately we've all agreed to use the same license, and it \ works out. The current version of the 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/. (As \ mentioned, parts of this are copyright 2000 by Cindy Kaus and 2002 by Dan \ Drake and are protected under the same license.)\n\nAlthough 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->Automatic, ScreenStyleEnvironment->"Working", WindowSize->{672, 649}, WindowMargins->{{Automatic, 66}, {15, Automatic}}, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"PaperSize"->{612, 792}, "PaperOrientation"->"Portrait", "PostScriptOutputFile":>FrontEnd`FileName[{$RootDirectory, "user001", \ "drake", "mathematica", "new-diff"}, "lab3b.nb.ps", CharacterEncoding -> \ "iso8859-1"], "Magnification"->1} ] (******************************************************************* 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, 388, 11, 114, "Text"], Cell[CellGroupData[{ Cell[2167, 66, 67, 1, 71, "Section"], Cell[2237, 69, 2046, 31, 410, "Text"], Cell[CellGroupData[{ Cell[4308, 104, 43, 0, 38, "Subsection"], Cell[4354, 106, 405, 9, 102, "Text"], Cell[4762, 117, 2513, 50, 539, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7324, 173, 70, 1, 41, "Section"], Cell[7397, 176, 538, 9, 122, "Text"], Cell[7938, 187, 87, 1, 27, "Input"], Cell[8028, 190, 581, 10, 140, "Text"], Cell[8612, 202, 121, 2, 23, "DisplayFormula"], Cell[8736, 206, 184, 4, 50, "Text"], Cell[8923, 212, 145, 2, 43, "Input"], Cell[9071, 216, 388, 8, 68, "Text"], Cell[9462, 226, 151, 2, 43, "Input"], Cell[9616, 230, 1178, 18, 230, "Text"], Cell[10797, 250, 155, 2, 43, "Input"], Cell[CellGroupData[{ Cell[10977, 256, 29, 0, 38, "Subsection"], Cell[11009, 258, 50, 0, 32, "Text"], Cell[11062, 260, 87, 1, 23, "DisplayFormula"], Cell[11152, 263, 242, 5, 50, "Text"], Cell[11397, 270, 618, 14, 200, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[12064, 290, 93, 1, 41, "Section"], Cell[12160, 293, 940, 18, 212, "Text"], Cell[CellGroupData[{ Cell[13125, 315, 100, 3, 38, "Subsection"], Cell[13228, 320, 540, 9, 86, "Text"], Cell[13771, 331, 386, 9, 43, "DisplayFormula"], Cell[14160, 342, 103, 3, 32, "Text"], Cell[14266, 347, 118, 3, 27, "DisplayFormula"], Cell[14387, 352, 246, 6, 50, "Text"], Cell[14636, 360, 256, 4, 59, "Input"], Cell[14895, 366, 241, 8, 32, "Text"], Cell[15139, 376, 241, 5, 91, "Input"], Cell[15383, 383, 931, 23, 140, "Text"], Cell[16317, 408, 428, 9, 59, "Input"], Cell[16748, 419, 449, 11, 86, "Text"], Cell[17200, 432, 135, 2, 27, "Input"], Cell[17338, 436, 104, 3, 32, "Text"], Cell[17445, 441, 246, 6, 59, "Input"], Cell[17694, 449, 513, 9, 86, "Text"], Cell[18210, 460, 110, 2, 27, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[18357, 467, 99, 3, 38, "Subsection"], Cell[18459, 472, 151, 3, 50, "Text"], Cell[18613, 477, 148, 4, 25, "DisplayFormula"], Cell[18764, 483, 847, 18, 176, "Text"], Cell[19614, 503, 135, 2, 27, "Input"], Cell[19752, 507, 433, 14, 50, "Text"], Cell[20188, 523, 70, 1, 27, "Input"], Cell[20261, 526, 71, 0, 32, "Text"], Cell[20335, 528, 198, 4, 55, "DisplayFormula"], Cell[20536, 534, 145, 5, 32, "Text"], Cell[20684, 541, 190, 4, 43, "Input"], Cell[20877, 547, 129, 3, 32, "Text"], Cell[21009, 552, 2964, 69, 712, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[24022, 627, 83, 1, 41, "Section"], Cell[24108, 630, 179, 4, 50, "Text"], Cell[24290, 636, 189, 4, 40, "DisplayFormula"], Cell[24482, 642, 410, 8, 86, "Text"], Cell[24895, 652, 115, 3, 25, "DisplayFormula"], Cell[25013, 657, 329, 8, 68, "Text"], Cell[25345, 667, 109, 2, 23, "DisplayFormula"], Cell[25457, 671, 590, 17, 86, "Text"], Cell[26050, 690, 215, 4, 40, "DisplayFormula"], Cell[26268, 696, 1332, 34, 212, "Text"], Cell[CellGroupData[{ Cell[27625, 734, 75, 1, 27, "Input"], Cell[27703, 737, 55, 1, 28, "Output"] }, Open ]], Cell[27773, 741, 66, 0, 32, "Text"], Cell[CellGroupData[{ Cell[27864, 745, 60, 1, 27, "Input"], Cell[27927, 748, 64, 1, 28, "Output"] }, Open ]], Cell[28006, 752, 155, 5, 32, "Text"], Cell[CellGroupData[{ Cell[28186, 761, 129, 2, 43, "Input"], Cell[28318, 765, 73, 1, 27, "Output"], Cell[28394, 768, 43, 1, 27, "Output"] }, Open ]], Cell[28452, 772, 68, 0, 32, "Text"], Cell[28523, 774, 211, 5, 55, "DisplayFormula"], Cell[28737, 781, 406, 8, 104, "Text"], Cell[29146, 791, 1279, 30, 380, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[30462, 826, 86, 1, 41, "Section"], Cell[30551, 829, 345, 7, 84, "Text"], Cell[30899, 838, 986, 17, 194, "Text"], Cell[31888, 857, 159, 4, 44, "DisplayFormula"], Cell[32050, 863, 659, 12, 122, "Text"], Cell[32712, 877, 292, 5, 45, "DisplayFormula"], Cell[33007, 884, 767, 20, 106, "Text"], Cell[33777, 906, 70, 1, 23, "DisplayFormula"], Cell[33850, 909, 882, 14, 176, "Text"], Cell[34735, 925, 1166, 20, 398, "Text"], Cell[CellGroupData[{ Cell[35926, 949, 32, 0, 28, "Subsubsection"], Cell[35961, 951, 2806, 40, 644, "Text"] }, Closed]] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)