(************** Content-type: application/mathematica ************** 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[ 27177, 865]*) (*NotebookOutlinePosition[ 27947, 891]*) (* CellTagsIndexPosition[ 27903, 887]*) (*WindowFrame->Normal*) Notebook[{ Cell["Lab 3: Graphs and Level Curves of Multivariable Functions", "Title", Background->RGBColor[0, 0, 1]], Cell[TextData[{ "Math 233\tFall 2002\t", StyleBox["Chapter 11, Section 1", FontFamily->"Arial", FontSize->16, FontWeight->"Bold"], " " }], "Subtitle", TextAlignment->Left, TextJustification->0], Cell[TextData[StyleBox["", FontWeight->"Bold"]], "Subsubtitle"], Cell[CellGroupData[{ Cell["Initialization Cells", "SmallText"], Cell[BoxData[ \(Clear[showsection, fxy, xrange, yrange, zrange, xsection]\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(showsection[fxy_, xrange_, yrange_, zrange_, \ xsection_] := CompoundExpression[\ Clear[p3d, \ pln, \ p2d], \(p3d = Plot3D[fxy, xrange, yrange, BoxRatios -> {1, 1, 2}, Axes \[Rule] True, AxesLabel \[Rule] {x, y, z}, PlotRange \[Rule] {{xrange[\([2]\)], xrange[\([3]\)]}, {yrange[\([2]\)], yrange[\([3]\)]}, {zrange[\([2]\)], zrange[\([3]\)]}}, \ DisplayFunction \[Rule] Identity\ \ ];\), \[IndentingNewLine]\(pln = ParametricPlot3D[{xsection, x, y}, {x, \(-10\), 10}, {y, \(-10\), 10}, Axes \[Rule] True, AxesLabel \[Rule] {x, y, z}, DisplayFunction \[Rule] Identity\ ];\), \n\ \ \ \ \ \(p2d = Plot[fxy /. x \[Rule] xsection, yrange, Axes \[Rule] True, AspectRatio \[Rule] 2, AxesLabel \[Rule] {y, z}, PlotRange \[Rule] {{xrange[\([2]\)], xrange[\([3]\)]}, {yrange[\([2]\)], yrange[\([3]\)]}}, DisplayFunction \[Rule] Identity];\), \(combo = Show[{p3d, pln}, DisplayFunction \[Rule] Identity]\ ;\), Show[GraphicsArray[{combo, p2d}], DisplayFunction \[Rule] $DisplayFunction]];\)\)], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Instructions!", FontColor->RGBColor[1, 0, 0]]], "Section"], Cell[TextData[{ "Work in ", StyleBox["pairs", FontWeight->"Bold"], " today, going through the entire notebook. Make sure that you answer ", StyleBox["all ", FontWeight->"Bold"], "questions posed.\nOn the You Try It, insert your own NEW values or \ functions. This lab is mainly so that you get some experience learning to \ use ", StyleBox["Mathematica", FontSlant->"Italic"], " to explore multivariable functions and their graphs. Take your time \ going through it; this is an opportunity to learn a little about what \ functions of various forms look like...\n\nThere won't be a formal write-up \ for this lab; the only thing you need to send me is a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook containing your function from the You Try It Part IV.\n" }], "Subsubtitle"] }, Closed]], Cell[CellGroupData[{ Cell["Introduction", "Section"], Cell[TextData[{ "OBJECTIVE: Work on visualizing and graphing functions of 2 variables and \ to understand the information that you are seeing when you take a \ cross-section of a 3-D surface. \nThe only ", StyleBox["Mathematica", FontSlant->"Italic"], " commands I want you to have a working knowledge of after today are the ", StyleBox["Plot3D", FontWeight->"Bold"], ", ", StyleBox["ContourPlot3D", FontWeight->"Bold"], ",", " and ", StyleBox["Table", FontWeight->"Bold"], " commands..." }], "Text"], Cell[CellGroupData[{ Cell["Technology Guidelines", "Subsection", CellDingbat->"\[LightBulb]"], Cell[TextData[{ StyleBox["NOTE: If you have just finished a module, restart ", CellFrame->True, Background->None], StyleBox["Mathematica", CellFrame->True, FontSlant->"Italic", Background->None], StyleBox[" before executing a new module.\nTO OPEN CELLS, put your cursor \ on the right cell bracket and double click.", CellFrame->True, Background->None], "\nTO STOP AN EXECUTION\n\tSelect the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu and click on ", StyleBox["Abort Evaluation.\n", FontSlant->"Italic"], "ORDER OF EXECUTION\n\tExecute cells in the order given. Do not skip any \ Input cells within a given notebook.\nSAVING NOTEBOOKS\n\tYou can save \ anytime to any directory you choose, and it is wise to save often.\n\t\ However, before you do your final save, delete all your output by selecting \ the \n\t ", StyleBox["Delete All Output", FontSlant->"Italic"], " selection under the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu.\nEXPERIENCING MAJOR PROBLEMS\n\tSave if appropriate, and \ then shut down ", StyleBox["Mathematica", FontSlant->"Italic"], " and start it up again." }], "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Part I: Basic Functions and Plots", "Section"], Cell["Let's define a function!", "Subsubsection"], Cell["\<\ Here is how we define a multivariable function. Note that the only \ difference between a single and multivariable function is that we define 2 \ independent variables!\ \>", "Text"], Cell["\<\ Clear[f] f[x_,y_]=10 Cos[x^2-y^2];\ \>", "Input", PageWidth->Infinity, FontFamily->"Courier New", FontSize->12, FontWeight->"Bold", FontColor->GrayLevel[0], Background->GrayLevel[1]], Cell["Let's evaluate this function when x=2 and y=1:", "Text"], Cell["f[2,1] ", "Input", PageWidth->Infinity, FontFamily->"Courier New", FontSize->12, FontWeight->"Bold", FontColor->GrayLevel[0], Background->GrayLevel[1]], Cell["\<\ Evaluate the function for the following (x,y) pairs: (3,0) and (1,4) \ \>", "Text"], Cell[BoxData[ \(\ \)], "Input"], Cell["Let's plot a function!", "Subsubsection"], Cell[TextData[{ "OK... so what does this thing look like? \nWe use the ", StyleBox["Plot3D command", FontWeight->"Bold"], " to view functions of 2 variables:" }], "Text"], Cell[BoxData[ \(\(?Plot3D\)\)], "Input"], Cell[TextData[{ "The important details are specifying the range of values that ", StyleBox["x", FontSlant->"Italic"], " and ", StyleBox["y", FontSlant->"Italic"], " will take on - everything else just makes the plot look nicer!", " " }], "Text"], Cell[BoxData[ \(\(Plot3D[f[x, y], {x, \(-Pi\), Pi}, {y, \(-Pi\), Pi}, AxesLabel \[Rule] {x, y, z}, PlotLabel \[Rule] \ f[x, y]];\)\)], "Input"], Cell[TextData[{ "\nNotice how difficult it is to visualize details in the graph. By \ default, ", StyleBox["Mathematica ", FontSlant->"Italic"], "selects 15 values from the ", StyleBox["x", FontSlant->"Italic"], " domain and 15 ", StyleBox[" ", FontSlant->"Italic"], "values from the ", StyleBox["y", FontSlant->"Italic"], " domain. It then evaluates the function for these 225 points (15x15), \ interpolates between evaluations, and graphs the data. You can tell ", StyleBox["Mathematica", FontSlant->"Italic"], " to increase its sampling by using the ", StyleBox["PlotPoints", FontWeight->"Bold"], " option. Increase the resolution of your graph by adding the following \ option to your ", StyleBox["Plot3D ", FontWeight->"Bold"], "command: ", StyleBox["PlotPoints->30\n", FontWeight->"Bold"], "This will increase the number of values to sample for the domain to 30 for \ ", StyleBox["x ", FontSlant->"Italic"], " and 30 for ", StyleBox["y", FontSlant->"Italic"], " (for a total of 900 points)... if you get too carried away, you can make \ ", StyleBox["Mathematica", FontSlant->"Italic"], " work really hard to graph your function!" }], "Text"], Cell[BoxData[ \(\ \)], "Input"], Cell["Try it on another function!", "Subsubsection"], Cell[TextData[{ "Here is another function to try - it is pretty cool looking! First define \ the function in ", StyleBox["Mathematica", FontSlant->"Italic"], " and then plot it.\n", Cell[BoxData[ \(TraditionalForm\`f(x, y) = \(e\^\(-x\)\) \(cos(x\^2 + y\^2)\)\)]] }], "Text"], Cell[TextData[{ "Note: Make sure that you pick an appropriate domain for ", StyleBox["x", FontSlant->"Italic"], "!" }], "Commentary", FontColor->RGBColor[0, 0, 1]], Cell["\<\ Clear[f] f[x_,y_]= Plot3D[\ \>", "Input", PageWidth->Infinity, FontFamily->"Courier New", FontSize->12, FontWeight->"Bold", FontColor->GrayLevel[0], Background->GrayLevel[1]], Cell[TextData[{ "So you want a different view of this function?\nCopy your ", StyleBox["Plot3D", FontWeight->"Bold"], " command to the input box below and then click after your {y,lo,upper} \ specification. Add a comma and then click the ", StyleBox["Input", FontWeight->"Bold"], " pull-down menu. Select ", StyleBox["3-D ViewPoint Selecter", FontWeight->"Bold"], ". You can orient the axes any way that you want to - pick one and click \ the ", StyleBox["Close Dialog Box", FontWeight->"Bold"], " button. Then, execute your ", StyleBox["Plot3D ", FontWeight->"Bold"], "command." }], "Text"], Cell[BoxData[ \(\ \)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Part II: Cross Sections!", "Section"], Cell[TextData[{ "Let's look at what happens when we take slices of a 3-D surface. We'll \ work with what is called a ", StyleBox["hyperbolic paraboloid ", FontSlant->"Italic"], "(AKA a saddle), which is a function of the form: \n", Cell[BoxData[ \(TraditionalForm\`f(x, y) = x\^2 - y\^2\)]], ". " }], "Text"], Cell[BoxData[{ \(Clear[x, y, hyp]\), "\[IndentingNewLine]", \(hyp[x_, y_] = x^2 - y^2\)}], "Input"], Cell[TextData[{ "I've defined some more ugly ", StyleBox["Mathematica ", FontSlant->"Italic"], "code (again, don't worry about reproducing it, just use it!). The command \ is called ", StyleBox["showsection", FontWeight->"Bold"], ", and it plots the cross section of the surface as we take slices. Here \ is an example:" }], "Text"], Cell[BoxData[ \(\(showsection[ hyp[x, y], {x, \(-3\), 3}, {y, \(-3\), 3}, {z, \(-9\), 9}, 1];\)\)], "Input", AnimationDisplayTime->0.2197], Cell[TextData[{ "Now,I'll create a table of graphs to animate. \nWe'll use the ", StyleBox["Table", FontWeight->"Bold"], " command a lot, so let's look more closely at it. ", StyleBox["Table", FontWeight->"Bold"], " creates a table of output from whatever command you want. I want a table \ of graphs, so I'll enclose my ", StyleBox["showsection", FontWeight->"Bold"], " command inside of the ", StyleBox["Table ", FontWeight->"Bold"], "command. Instead of the value 1 that I have at the end of the ", StyleBox["showsection", FontWeight->"Bold"], " command above, I'll give a parameter, ", StyleBox["t", FontSlant->"Italic"], ", whose value will vary for each plot. In this case, I want to plot \ sections as ", StyleBox["t", FontSlant->"Italic"], " goes from -2.5 to +2.5 in steps of 0.5 (so we'll have a graph for -2.5, \ -2.0, -1.5, etc.)\nGo ahead and execute this command, then animate it.", " " }], "Text"], Cell[BoxData[ \(\(Table[ showsection[ hyp[x, y], {x, \(-3\), 3}, {y, \(-3\), 3}, {z, \(-9\), 9}, t], {t, \(-2.5\), 2.5, 0.5}];\)\)], "Input", AnimationDisplayTime->0.2197], Cell["You Try it!", "Subsubsection"], Cell[TextData[{ "Go ahead and try the showsection command on the following function:\n", Cell[BoxData[ \(TraditionalForm\`f(x, y) = \(e\^\(-x\)\) \(cos(x\^2 + y\^2)\)\)]] }], "Text"], Cell[BoxData[{ \(\ Clear[x, y, f]\), "\[IndentingNewLine]", \(\(\(f[x_, y_]\)\(=\)\)\)}], "Input"], Cell[BoxData[ \(\(showsection[ f[x, y], {x, \(-3\), 0}, {y, \(-3\), 3}, {z, \(-3\), 10}, \(-2\)];\)\)], "Input"], Cell[TextData[{ "Now create an animation... let ", StyleBox["t", FontSlant->"Italic"], " range from -3 to 0 (use a good stepsize)..." }], "Text"], Cell[BoxData[ \(\(\(Table\)\([\)\(showsection[ f[x, y], {x, \(-3\), 0}, {y, \(-3\), 3}, {z, \(-3\), 10}, t], {t, \(?? ,??,??}];\)\)\)\)], "Input", AnimationDisplayTime->0.2197] }, Closed]], Cell[CellGroupData[{ Cell["Part III: Graphing Cylinders and Quadric Surfaces", "Section"], Cell[TextData[{ "When you look at the equations for cylinders or quadric surfaces, notice \ that they are not in the standard form for graphing on most graphing \ calculators or software packages, because you cannot usually solve explicity \ for the ", StyleBox["z", FontSlant->"Italic"], " variable. To get around this, we use a special command called ", StyleBox["ContourPlot3D", FontWeight->"Bold"], " after we first read in a package to enable it to work. " }], "Text"], Cell[BoxData[{ RowBox[{\(Off[General::spell]\), " "}], "\n", \(Off[ General::spell1]\), "\n", RowBox[{"<<", StyleBox[ RowBox[{"Graphics", StyleBox["`", "MB"], "ContourPlot3D", StyleBox["`", "MB"]}]]}]}], "Input"], Cell[TextData[{ "You've already seen contour plots of functions of 2 variables. We'll see \ today how to think of a function such as ", Cell[BoxData[ \(TraditionalForm\`x\^2 + y2 - z\^2 = 1\)]], " as a function of 3 variables: ", Cell[BoxData[ \(TraditionalForm\`f(x, y, z) = x\^2 + y2 - z\^2 - 1\)]], " and we are interested in the ", StyleBox["level surface", FontWeight->"Bold"], " for when ", Cell[BoxData[ \(TraditionalForm\`f(x, y, z) = 0\)]], ", which means that we want ", Cell[BoxData[ \(TraditionalForm\`x\^2 + y2 - z\^2 - 1 = 0\)]], " (compare that to what we started with...). \nLet's start with a simple \ case. Suppose that you want to plot the 3-D cylinder ", Cell[BoxData[ \(y\ = \ x\^2\)]], ". We think of this as ", Cell[BoxData[ \(TraditionalForm\`f(x, y, z) = \(y - x\^2 = 0\)\)]], ", and we ask for a ", StyleBox["ContourPlot3D ", FontWeight->"Bold"], "of this function. The default is to plot only the contour when the \ function specified is 0. Note that we must specify the values of ", StyleBox["x, y,", FontSlant->"Italic"], " and ", StyleBox["z", FontSlant->"Italic"], " overwhich to extend our plot, even though ", StyleBox["z", FontSlant->"Italic"], " does not appear in the function itself." }], "Text"], Cell[TextData[{ "Note: The Boxed->False option on the command turns off the usual box that \ we have around 3-D plots in ", StyleBox["Mathematica. ", FontSlant->"Italic"], "The ", StyleBox["AspectRatio->Automatic", FontWeight->"Bold"], " doesn't do much for us with this plot, but helps insure that level curves \ that should be circles show up as circles (instead of ellipses)." }], "Commentary", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[{ \(Clear[x, y, z, function]\), "\n", \(\(function = y - x\^2;\)\), "\n", \(\(ContourPlot3D[ function, {x, \(-3\), 3}, \ {y, \(-2\), 2}, \ {z, \(-4\), 4}, Axes -> True, AxesLabel -> {x, y, z}, Boxed -> False, AspectRatio -> Automatic];\)\)}], "Input"], Cell["Let's try another cylinder.", "Text"], Cell[BoxData[{ \(\(function = \ y\^2\ - 4\ z\^2\ - 1;\)\), "\n", \(\(ContourPlot3D[\ function, {x, \(-2\), 2}, \ {y, \(-2\), 2}, \ {z, \(-2\), 2}, Axes -> True, AxesLabel -> {x, y, z}, Boxed -> False, AspectRatio -> Automatic];\)\)}], "Input"], Cell[BoxData[ \(TextForm\`Next\ we\ will\ plot\ the\ quadric\ surface, \ z\^2 - \((2 x\^2 + 3 y\^2)\) = \ 0. \)], "Text"], Cell[BoxData[{ \(\(function = z\^2 - \((2 x\^2 + 3 y\^2)\);\)\), "\n", \(\(ContourPlot3D[ function, {x, \(-3\), 3}, \ {y, \(-2\), 2}, \ {z, \(-4\), 4}, Axes -> True, AxesLabel -> {x, y, z}, Boxed -> False, AspectRatio -> Automatic];\)\)}], "Input"], Cell["Here's an ellipsoid.", "Text"], Cell[BoxData[{ \(\(function = x^2\ + 4 y^2\ + \ z^2\ - 4;\)\), "\n", \(\(ContourPlot3D[\ \ function, {x, \(-2\), 2}, \ {y, \(-1\), 1}, \ {z, \(-2\), 2}, Axes -> True, AxesLabel -> {x, y, z}, Boxed -> False, AspectRatio -> Automatic];\)\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["You Try It: Part III", "Section"], Cell[TextData[{ "To plot any other surfaces we've talked about, go back to any of the \ plots and alter the functions as you wish. Note that some 3-D plots take \ quite a bit of time to plot. If you find you are waiting too long, you can \ always pull down the Kernel menu and select Abort Evaluation. \nTo \ experiment, replace the function in red with another function of ", Cell[BoxData[ \(TraditionalForm\`x, \ y\)]], ", and ", Cell[BoxData[ \(TraditionalForm\`z\)]], " - why not use the function you are assigned to analyze? Be certain to \ use correct terminology. " }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"function", "=", StyleBox[\(z\^3 - 2 x\^2 + 3 y\^2\), FontColor->RGBColor[1, 0, 0]]}], ";", "\n", \(ContourPlot3D[ function, \n\ \ \ {x, \(-3\), 3}, \ {y, \(-2\), 2}, \ {z, \(-4\), 4}, \n\ \ \ \ \ Axes -> True, AxesLabel -> {x, y, z}, Boxed -> False, AspectRatio -> Automatic]\), ";"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Part IV: More Surfaces, Contours, and Level Curves", "Section"], Cell[TextData[{ "In Part IV, we'll look at other surfaces that are easier to represent in \ ", StyleBox["Mathematica", FontSlant->"Italic"], " - those that we can explicitly solve for ", StyleBox["z", FontSlant->"Italic"], ". \nThe following code gives a set of ", StyleBox["Mathematica", FontSlant->"Italic"], " commands that can be used as a template for defining and plotting \ surfaces in three-dimensional space. You can get more information on these \ commands and their options in the ", StyleBox["Help", FontWeight->"Bold"], " menu. You can insert several new functions of your own, each of a \ different type, to develop a visualization of different surfaces. Try some \ new options for the plots as well." }], "Text"], Cell[TextData[{ "Note: Notice that I've used the ", StyleBox["Show", FontWeight->"Bold"], " command here to present the 3D plot from a different perspective. Nice \ to have a couple of views simultaneously..." }], "Commentary", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[{ \(Clear[x, y, z, f]\), "\n", \(f[x_, y_] = Exp[\(-\((x\^2 + y\^2)\)\)/ 8] \((\((Cos[x])\)\^2 + \((Sin[y])\)\^2)\)\), "\n", \(\(xmin = \(-5\);\)\), "\n", \(\(xmax = \(+5\);\)\), "\n", \(\(ymin = \(-\[Pi]\);\)\), "\n", \(\(ymax = \[Pi];\)\), "\n", \(\(pict = Plot3D[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, PlotPoints \[Rule] 40, AxesLabel -> {x, y, z}];\)\), "\n", \(\(Show[pict, ViewPoint \[Rule] {0, \(-2\), 0}];\)\)}], "Input"], Cell[TextData[{ "You can change the viewpoint manually in the last command,or you can \ highlight the ", StyleBox["ViewPoint ", FontWeight->"Bold"], "command and then select the", StyleBox["3D ViewPoint Selector", FontWeight->"Bold"], " button under the ", StyleBox["Input ", FontWeight->"Bold"], "heading at the top. Move the box around to select a new viewpoint and \ then ", StyleBox["paste", FontWeight->"Bold"], " that viewpoint into your code." }], "Text", FontColor->RGBColor[0, 0, 1]], Cell["Here are the level curves for the function. ", "Text"], Cell[BoxData[{ \(\(ContourPlot[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, y}];\)\), "\n", \(\(ContourPlot[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, ContourShading \[Rule] False, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, y}];\)\)}], "Input"], Cell[TextData[StyleBox["Question 1:\t What is the difference between the two \ plots below, and what does light to dark signify in the first plot?", FontWeight->"Bold"]], "Text", Background->RGBColor[0, 1, 1]], Cell[TextData[{ "Next, look at the curves formed when you hold ", StyleBox["x", FontSlant->"Italic"], " or ", StyleBox["y", FontSlant->"Italic"], " constant." }], "Text"], Cell[TextData[{ "Note: The ", StyleBox["Table ", FontWeight->"Bold"], "command creates a table of functions of a single variable: y. In each \ function, x is held constant. We have 1 function for each of the 11 possible \ ", StyleBox["integer", FontWeight->"Bold"], " x values between -5 and 5 (xmin is -5 and xmax is 5). " }], "Text", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[{ \(Clear[x, y]\), "\n", \(\(xlevel = Table[f[x, y], {x, xmin, xmax}];\)\), "\n", \(\(Plot[Evaluate[xlevel], {y, ymin, ymax}, AxesLabel -> {y, z}]\ ;\)\)}], "Input"], Cell[TextData[StyleBox["Question 2:\tWhich line corresponds to x=-5? Which \ corresponds to x=+5?", FontWeight->"Bold"]], "Text", Background->RGBColor[0, 1, 1]], Cell[TextData[{ "Here, we do the same thing holding ", StyleBox["y", FontSlant->"Italic"], " constant:", " " }], "Text"], Cell[BoxData[{ \(Clear[x, y]\), "\n", \(\(ylevel = Table[f[x, y], {y, ymin, ymax, .5}];\)\), "\n", \(\(Plot[Evaluate[ylevel], {x, xmin, xmax}, AxesLabel -> {x, z}]\ ;\)\)}], "Input"], Cell[TextData[StyleBox["Question 3:\tWhich line corresponds to y=-\[Pi]? \ Which corresponds to y=+\[Pi]?", FontWeight->"Bold"]], "Text", Background->RGBColor[0, 1, 1]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "You Try It: Part IV: ", StyleBox["Stump Your Classmates", FontColor->RGBColor[0, 0, 1]] }], "Section"], Cell[TextData[{ StyleBox["Your task is to submit a ", FontColor->RGBColor[1, 0, 0]], StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[1, 0, 0]], StyleBox[" notebook showing a function, its surface plot, its contour plot, \ and its ", FontColor->RGBColor[1, 0, 0]], StyleBox["x-", FontSlant->"Italic", FontColor->RGBColor[1, 0, 0]], StyleBox["level and ", FontColor->RGBColor[1, 0, 0]], StyleBox["y", FontSlant->"Italic", FontColor->RGBColor[1, 0, 0]], StyleBox["-level plots. Try to select a function that will stump your \ classmates - several of the best problems will be put on your exam next week \ - the format will be to match the functions, surfaces, contours, and level \ curves. Once you are happy with the function, copy and paste these cells \ into a ", FontColor->RGBColor[1, 0, 0]], StyleBox["new", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[1, 0, 0]], StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[1, 0, 0]], StyleBox[" notebook and ", FontColor->RGBColor[1, 0, 0]], StyleBox["email", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox[" it to me at mparker@carroll.edu.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[TextData[{ "Just put in your own functions and bounds for the items in red. Be sure to \ use correct notation. You can select any viewpoint you wish for the ", StyleBox["Show", FontWeight->"Bold"], " command." }], "Text"], Cell[BoxData[{\(Clear[x, y, z, f]\), "\n", RowBox[{\(f[x_, y_]\), ":=", StyleBox[\(Exp[\(-\((x\^2 + y\^2)\)\)/ 8] \((\((Cos[x])\)\^2 + \((Sin[y])\)\^2)\)\), FontColor->RGBColor[1, 0, 0]]}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox[\(-5\), FontColor->RGBColor[1, 0, 0]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox[\(+5\), FontColor->RGBColor[1, 0, 0]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-\[Pi]\), FontColor->RGBColor[1, 0, 0]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox[\(+\[Pi]\), FontColor->RGBColor[1, 0, 0]]}], ";"}], "\n", \(pict = Plot3D[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, PlotPoints \[Rule] 40, AxesLabel -> {x, y, z}];\), "\n", RowBox[{ RowBox[{"Show", "[", RowBox[{"pict", ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"{", StyleBox[\(0, \(-2\), 0\), FontColor->RGBColor[1, 0, 0]], "}"}]}]}], "]"}], ";"}]}], "Input"], Cell[BoxData[{ \(\(ContourPlot[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, y}];\)\), "\n", \(\(ContourPlot[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, ContourShading \[Rule] False, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, y}];\)\)}], "Input"], Cell[BoxData[{ \(Clear[x, y, z]\), "\n", \(\(xlevel = Table[f[x, y], {x, xmin, xmax, \((xmax - xmin)\)/10}];\)\), "\n", \(\(Plot[Evaluate[xlevel], {y, ymin, ymax}, AxesLabel -> {y, z}]\ ;\)\)}], "Input"], Cell[BoxData[{ \(Clear[x, y, z]\), "\n", \(\(ylevel = Table[f[x, y], {y, ymin, ymax, \((ymax - ymin)\)/10}];\)\), "\n", \(\(Plot[Evaluate[ylevel], {x, xmin, xmax}, AxesLabel -> {x, z}]\ ;\)\)}], "Input"] }, Closed]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 677}}, AutoGeneratedPackage->None, WindowToolbars->{"RulerBar", "EditBar"}, CellGrouping->Manual, WindowSize->{1000, 644}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, StyleDefinitions -> "DemoText.nb" ] (******************************************************************* 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[1705, 50, 108, 1, 70, "Title"], Cell[1816, 53, 217, 9, 41, "Subtitle"], Cell[2036, 64, 65, 1, 58, "Subsubtitle"], Cell[CellGroupData[{ Cell[2126, 69, 41, 0, 28, "SmallText"], Cell[2170, 71, 118, 2, 40, "Input", InitializationCell->True], Cell[2291, 75, 1424, 25, 240, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[3752, 105, 84, 1, 34, "Section"], Cell[3839, 108, 825, 19, 184, "Subsubtitle"] }, Closed]], Cell[CellGroupData[{ Cell[4701, 132, 31, 0, 34, "Section"], Cell[4735, 134, 537, 17, 79, "Text"], Cell[CellGroupData[{ Cell[5297, 155, 74, 1, 44, "Subsection"], Cell[5374, 158, 1206, 33, 70, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[6629, 197, 53, 0, 34, "Section"], Cell[6685, 199, 49, 0, 44, "Subsubsection"], Cell[6737, 201, 193, 4, 29, "Text"], Cell[6933, 207, 204, 9, 58, "Input"], Cell[7140, 218, 62, 0, 29, "Text"], Cell[7205, 220, 170, 6, 40, "Input"], Cell[7378, 228, 94, 2, 29, "Text"], Cell[7475, 232, 35, 1, 40, "Input"], Cell[7513, 235, 47, 0, 44, "Subsubsection"], Cell[7563, 237, 181, 5, 60, "Text"], Cell[7747, 244, 44, 1, 40, "Input"], Cell[7794, 247, 265, 9, 29, "Text"], Cell[8062, 258, 165, 3, 40, "Input"], Cell[8230, 263, 1244, 40, 148, "Text"], Cell[9477, 305, 35, 1, 40, "Input"], Cell[9515, 308, 52, 0, 44, "Subsubsection"], Cell[9570, 310, 294, 8, 56, "Text"], Cell[9867, 320, 175, 6, 23, "Commentary"], Cell[10045, 328, 196, 10, 76, "Input"], Cell[10244, 340, 637, 19, 79, "Text"], Cell[10884, 361, 35, 1, 40, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[10956, 367, 43, 0, 34, "Section"], Cell[11002, 369, 329, 9, 58, "Text"], Cell[11334, 380, 108, 2, 60, "Input"], Cell[11445, 384, 353, 10, 48, "Text"], Cell[11801, 396, 161, 4, 40, "Input"], Cell[11965, 402, 976, 27, 129, "Text"], Cell[12944, 431, 206, 5, 40, "Input"], Cell[13153, 438, 36, 0, 44, "Subsubsection"], Cell[13192, 440, 192, 4, 56, "Text"], Cell[13387, 446, 107, 2, 60, "Input"], Cell[13497, 450, 135, 3, 40, "Input"], Cell[13635, 455, 155, 5, 29, "Text"], Cell[13793, 462, 199, 4, 40, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[14029, 471, 69, 0, 34, "Section"], Cell[14101, 473, 493, 11, 67, "Text"], Cell[14597, 486, 288, 9, 80, "Input"], Cell[14888, 497, 1340, 38, 136, "Text"], Cell[16231, 537, 448, 11, 36, "Commentary"], Cell[16682, 550, 304, 6, 100, "Input"], Cell[16989, 558, 43, 0, 29, "Text"], Cell[17035, 560, 281, 5, 80, "Input"], Cell[17319, 567, 132, 2, 29, "Text"], Cell[17454, 571, 285, 5, 81, "Input"], Cell[17742, 578, 36, 0, 29, "Text"], Cell[17781, 580, 282, 4, 80, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[18100, 589, 39, 0, 34, "Section"], Cell[18142, 591, 609, 13, 79, "Text"], Cell[18754, 606, 393, 8, 100, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19184, 619, 69, 0, 34, "Section"], Cell[19256, 621, 762, 19, 98, "Text"], Cell[20021, 642, 270, 7, 23, "Commentary"], Cell[20294, 651, 524, 12, 181, "Input"], Cell[20821, 665, 529, 17, 48, "Text"], Cell[21353, 684, 61, 0, 29, "Text"], Cell[21417, 686, 352, 6, 60, "Input"], Cell[21772, 694, 213, 3, 45, "Text"], Cell[21988, 699, 188, 8, 29, "Text"], Cell[22179, 709, 388, 11, 48, "Text"], Cell[22570, 722, 201, 4, 80, "Input"], Cell[22774, 728, 165, 3, 45, "Text"], Cell[22942, 733, 132, 6, 29, "Text"], Cell[23077, 741, 206, 4, 80, "Input"], Cell[23286, 747, 173, 3, 45, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[23496, 755, 127, 4, 34, "Section"], Cell[23626, 761, 1318, 38, 67, "Text"], Cell[24947, 801, 236, 6, 29, "Text"], Cell[25186, 809, 1144, 31, 181, "Input"], Cell[26333, 842, 352, 6, 60, "Input"], Cell[26688, 850, 235, 5, 80, "Input"], Cell[26926, 857, 235, 5, 80, "Input"] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)