(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.2' 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[ 30435, 1001]*) (*NotebookOutlinePosition[ 31340, 1030]*) (* CellTagsIndexPosition[ 31296, 1026]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Multivariable Calculus", "Title", Evaluatable->False, TextAlignment->Center, TextJustification->0, AspectRatioFixed->True, Background->RGBColor[0, 1, 1]], Cell["\<\ This notebook is by Steven Amgott. Please send any questions or\ \[NonBreakingSpace]comments to samgott1@swarthmore.edu. Feel free to use and \ distribute this notebook, but keep this author information in any copy you \ use or distribute.\ \>", "SmallText"], Cell[TextData[{ "Buttons to create many of the symbols in this notebook are available in \ the ", StyleBox["BasicInput Palette", FontColor->RGBColor[0, 0, 1]], ". This palette is usually opened at the time ", StyleBox["Mathematica", FontSlant->"Italic"], " is started. If it is not up on the screen, it can be displayed using the \ ", StyleBox["Palette", FontColor->RGBColor[0, 0, 1]], " command in the ", StyleBox["File", FontColor->RGBColor[0, 0, 1]], " menu. ", StyleBox["Take a brief look at this palette", FontColor->RGBColor[1, 0, 1]], " to see what symbols it contains before continuing with this notebook. If \ the computer you are using has the additional ", StyleBox["Multivariable ", FontColor->RGBColor[0, 0, 1]], "palette installed, you may also wish to look at it.\n\nTo open the closed \ group of cells for any of the sections or commands, you can ", StyleBox["double-click the bracket with a triangle at its bottom at the \ right edge of the cell", FontColor->RGBColor[1, 0, 1]], ".\n\nIf this is your first experience with ", StyleBox["Mathematica", FontSlant->"Italic"], ", or if you need a brief refresher before continuing, you might first go \ through the ", Cell[BoxData[ FormBox[ ButtonBox[\(Introduction\ to\ Mathematica\), ButtonData:>{"Introduction_to_Mathematica.nb", None}, ButtonStyle->"Hyperlink"], TraditionalForm]]], " notebook contained in the same folder as this notebook. In particular, \ remember that to evaluate a cell you need to press the ", StyleBox["enter", FontColor->RGBColor[0, 0, 1]], " key on the number pad at the lower right side of the keyboard and NOT the \ ", StyleBox["return", FontColor->RGBColor[0, 0, 1]], " key on a Macintosh or the ", StyleBox["Enter", FontColor->RGBColor[0, 0, 1]], " key next to the single and double quote marks on a Windows machine! ", "(The latter only produces a line break. You can, however, use the ", StyleBox["Shift", FontColor->RGBColor[0, 0, 1]], " and ", StyleBox["Enter", FontColor->RGBColor[0, 0, 1]], " keys on a Windows machine, or the ", StyleBox["shift", FontColor->RGBColor[0, 0, 1]], " and ", StyleBox["return", FontColor->RGBColor[0, 0, 1]], " keys on a Mac, simultaneously to evaluate a cell. In particular, that is \ how you evaluate a cell on a notebook computer without a number pad.)" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ "What ", StyleBox["Mathematica", FontSlant->"Italic"], " can do" }], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " can perform many of the basic operations of Multivariable Calculus. Some \ of these (partial differentiation, iterated integration) use the same syntax \ as in the one variable case). With the package ", StyleBox["\"Calculus", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["VectorAnalysis", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["\"", FontColor->RGBColor[1, 0, 0]], " loaded, ", StyleBox["Mathematica", FontSlant->"Italic"], " can also find gradients and Jacobians, calculate dot, cross, and triple \ scalar products, divergence, curl, and the Laplacian. Of course, it can also \ do many different types of plots. Examples of each of these commands are in \ the cells below." }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Plots", "Section"], Cell[CellGroupData[{ Cell["Plots of Functions", "Subsection"], Cell[TextData[{ "The command to draw graphs of functions of two variables is ", StyleBox["Plot3D", FontColor->RGBColor[1, 0, 0]], ". Evaluating the next cell shows an example of its use." }], "Text"], Cell[BoxData[ \(\(Plot3D[ Sin[x] Cos[2\ y], {x, \(-2\), 2}, {y, \(-2\), 2}];\)\)], "Input"], Cell[TextData[{ "(As with the ", StyleBox["Plot", FontColor->RGBColor[1, 0, 0]], " command, the semicolon at the end of the line just keeps ", StyleBox["Mathematica", FontSlant->"Italic"], " from responding with an output cell containing only the text \ \"-SurfaceGraphics-.\") The graph is a static figure, but you can change the \ viewpoint by with the ", StyleBox["3D Viewpoint Selector", FontColor->RGBColor[0, 0, 1]], ". You use it by clicking in a Plot3D input cell (such as the one below) \ just before the final ", StyleBox["]", FontColor->RGBColor[1, 0, 0]], ", typing a comma (", StyleBox[",", FontColor->RGBColor[1, 0, 0]], "), and then choosing Input...3D Viewpoint Selector. In the resulting \ window, use your mouse to rotate the box any desired orientation, and click \ the ", StyleBox["Paste", FontColor->RGBColor[0, 0, 1]], " button. ", StyleBox["Try this in the cell below", FontColor->RGBColor[1, 0, 1]], ". You should get something that looks like ", StyleBox["Plot3D[Sin[x]Sin[2 y],{x,-2,2},{y,-2,2},ViewPoint\[Rule]{-2.756, \ -0.536, 1.889}]", FontColor->RGBColor[1, 0, 0]], " (but with different numbers after the word ", StyleBox["ViewPoint", FontColor->RGBColor[1, 0, 0]], "). Then ", StyleBox["evaluate", FontColor->RGBColor[1, 0, 1]], " the cell to produce the graph from the new viewpoint." }], "Text"], Cell[BoxData[ \(\(Plot3D[ Sin[x] Cos[2\ y], {x, \(-2\), 2}, {y, \(-2\), 2}];\)\)], "Input"], Cell[TextData[{ "You can change the viewpoint once again by highlighting the part of the \ syntax the ", StyleBox["3D Viewpoint Selector", FontColor->RGBColor[0, 0, 1]], " pasted in, and then rotating the box again and pasting in a different \ location. You may wish to try this." }], "Text"], Cell[TextData[{ "There is another way to rotate the graph. A new (experimental) package \ has been included in recent versions of ", StyleBox["Mathematica", FontSlant->"Italic"], " (but without documentation in the ", StyleBox["Help", FontColor->RGBColor[0, 0, 1]], " menu). You can load this package by evaluating the cell below. Check \ the output of the $Packages command to make sure ", StyleBox["RealTime3D", FontColor->RGBColor[0, 0, 1]], " is now loaded." }], "Text"], Cell[BoxData[{ \(Needs["\"]\), "\[IndentingNewLine]", \($Packages\)}], "Input"], Cell[TextData[{ "Once this package has been loaded, any additional 3D graphs you create can \ be rotated in real time. (Note that graphs you created before loading the \ package still cannot be rotated this way.) For instance, ", StyleBox["evaluate", FontColor->RGBColor[1, 0, 1]], " the syntax below to be able to rotate the graph from the beginning of \ this section. Click and hold the (left) mouse button anywhere in the graph \ and move the mouse to rotate the graph. When you release the mouse button, \ the graph \"freezes\" in the current position. " }], "Text"], Cell[BoxData[ \(\(Plot3D[ Sin[x] Cos[2\ y], {x, \(-2\), 2}, {y, \(-2\), 2}];\)\)], "Input"], Cell[TextData[{ "If you wish, you can change the region on which the graph is plotted, for \ instance, to zoom in. All you need to do are to put in different values for \ the range on x and y. The values in ", StyleBox["magenta", FontColor->RGBColor[1, 0, 1]], " below can be changed to do this. ", StyleBox["Change them in the next cell in order to redraw the graph on the \ square -0.5 \[LessEqual] x \[LessEqual] 0.5 and -0.5 \[LessEqual] y \ \[LessEqual] 0.5, and then evaluate the cell to see the \"zoomed-in\" graph", FontColor->RGBColor[1, 0, 1]], "." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"Plot3D", "[", RowBox[{\(Sin[x] Cos[2\ y]\), ",", RowBox[{"{", RowBox[{"x", ",", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 1]], ",", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 1]], ",", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], "}"}]}], "]"}], ";"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Contour Plots", "Subsection"], Cell[TextData[{ "Another interesting type of plot, although not 3D, is a ", StyleBox["ContourPlot", FontColor->RGBColor[1, 0, 0]], ". This plot shows graphs of the curves you get by slicing the surface at \ various heights. (You may have seen maps of mountains and hills done this \ way.) Here is the contour plot for the above function." }], "Text"], Cell[BoxData[ \(\(ContourPlot[ Sin[x] Cos[2\ y], {x, \(-2\), 2}, {y, \(-2\), 2}];\)\)], "Input"], Cell[TextData[{ "The shading reflects the height of the contour. Darker is lower, while \ lighter is higher. If you just want to see the contours without the shading, \ use the ", StyleBox["ContourShading\[Rule]False", FontColor->RGBColor[1, 0, 0]], " option." }], "Text"], Cell[BoxData[ \(\(ContourPlot[Sin[x] Cos[2\ y], {x, \(-2\), 2}, {y, \(-2\), 2}, ContourShading \[Rule] False];\)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Parametric Plots", "Subsection"], Cell[TextData[{ "You can use ", StyleBox["ParametricPlot", FontColor->RGBColor[1, 0, 0]], " and ", StyleBox["ParametricPlot3D", FontColor->RGBColor[1, 0, 0]], " to plot curves. Here is an ellipse done with ", StyleBox["ParametricPlot", FontColor->RGBColor[1, 0, 0]], "." }], "Text"], Cell[BoxData[ \(\(ParametricPlot[{3\ Sin[t], 4\ Cos[t]}, {t, 0, 2\ \[Pi]}];\)\)], "Input"], Cell[TextData[{ "Notice that to get a good representation of a circle the ", StyleBox["AspectRatio", FontColor->RGBColor[1, 0, 0]], " option might be necessary. Without this option the plot may look like an \ ellipse." }], "Text"], Cell[BoxData[ \(\(ParametricPlot[{4\ Sin[t], 4\ Cos[t]}, {t, 0, 2\ \[Pi]}];\)\)], "Input"], Cell["With the option you get the true shape of the circle.", "Text"], Cell[BoxData[ \(\(ParametricPlot[{4\ Sin[t], 4\ Cos[t]}, {t, 0, 2\ \[Pi]}, AspectRatio \[Rule] Automatic];\)\)], "Input"], Cell[TextData[{ "This plots a spiral in three-dimensional space using ", StyleBox["ParametricPlot3D", FontColor->RGBColor[1, 0, 0]], "." }], "Text"], Cell[BoxData[ \(\(ParametricPlot3D[{7\ Cos[u], 7\ Sin[u], u}, {u, 0, 8 \[Pi]}];\)\)], "Input"], Cell[TextData[{ "You can also use ", StyleBox["ParametricPlot3D", FontColor->RGBColor[1, 0, 0]], " to plot surfaces. Here is a paraboloid." }], "Text"], Cell[BoxData[ \(\(ParametricPlot3D[{2\ r\ Cos[\[Theta]], 2\ r\ Sin[\[Theta]], r\^2}, {r, 0, 4}, {\[Theta], 0, 2\ \[Pi]}];\)\)], "Input"], Cell[TextData[{ "Notice the advantages to plotting the paraboloid using ", StyleBox["ParametricPlot3D", FontColor->RGBColor[1, 0, 0]], ", rather than using ", StyleBox["Plot3D", FontColor->RGBColor[1, 0, 0]], "." }], "Text"], Cell[BoxData[ \(\(Plot3D[ 1\/4\ x\^2 + 1\/4\ y\^2, {x, \(-8\), 8}, {y, \(-8\), 8}];\)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Vector Field Plots", "Subsection"], Cell[TextData[{ "In order to use the commands in this section, the package ", StyleBox["\"Graphics", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["PlotField", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["\"", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0.499992, 0.0658274, 0.17203]], "(for two dimensional fields) and/or the package ", StyleBox["\"Graphics", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["PlotField3D", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["\"", FontColor->RGBColor[1, 0, 0]], " (for three dimensional fields) must be loaded. ", StyleBox["Evaluate the next cell to load the first of these packages.", FontColor->RGBColor[1, 0, 1]], StyleBox[" ", FontColor->RGBColor[1, 0.0721599, 0.542763]], "You will have to load the package during any session in which you plan to \ use these commands. ", StyleBox["$Packages", FontColor->RGBColor[1, 0, 0]], " displays the current list of loaded packages." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Needs["\"]\), "\[IndentingNewLine]", \($Packages\)}], "Input"], Cell["\<\ Using this package you can display gradient fields of functions of two \ variables.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"PlotGradientField", "[", RowBox[{\(3 x + 12 y - x\^3 - y\^3\), ",", RowBox[{"{", RowBox[{"x", StyleBox[",", FontColor->GrayLevel[0]], \(-2\), ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", StyleBox[",", FontColor->GrayLevel[0]], \(-3\), ",", "3"}], "}"}]}], "]"}], ";"}]], "Input"], Cell["\<\ There are, of course, tons of customization options. You can find \ information on this by evaluating the following cell.\ \>", "Text"], Cell[BoxData[ \(?? PlotGradientField\)], "Input"], Cell["You can also directly plot vector fields.", "Text"], Cell[BoxData[ \(\(PlotVectorField[{\(-y\), x}, {x, \(-2\), 2}, {y, \(-2\), 2}];\)\)], "Input"], Cell[TextData[{ "One way to get more information on this is to highlight the words \ PlotVectorField in the previous cell using your mouse, and then click the \ menu item ", StyleBox["Help...Find Selected Function", FontColor->RGBColor[0, 0, 1]], ". Do so, then click the link to ", StyleBox["Graphics`PlotField`", FontColor->RGBColor[0, 0, 1]], " under Standard Packages, or the section number link under the ", StyleBox["Mathematica", FontSlant->"Italic"], " Book." }], "Text"], Cell["\<\ To work in three dimensions you need to load the second of the packages.\ \>", "Text"], Cell[BoxData[{ \(Needs["\"]\), "\[IndentingNewLine]", \($Packages\)}], "Input"], Cell["\<\ You can then display gradient fields of functions of three variables\ \>", "Text"], Cell[BoxData[ \(\(PlotGradientField3D[ x\ y\ z, {x, \(-1\), 1}, {y, \(-1\), 1}, {z, \(-1\), 1}, VectorHeads \[Rule] True];\)\)], "Input"], Cell["or other arbitrary vector fields with three components.", "Text"], Cell[BoxData[ \(\(PlotVectorField3D[{x, y, z}, {x, 0, 2}, {y, 0, 2}, {z, 0, 2}, PlotPoints \[Rule] 5, VectorHeads \[Rule] True];\)\)], "Input"], Cell["\<\ Notice the options in these cells. The default is to draw without arrows, as \ you can see by evaluating the following cell, which displays the default \ options.\ \>", "Text"], Cell[BoxData[ \(Options[PlotVectorField3D]\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Partial Derivatives", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The basic syntax for the command to find partial derivatives is \ essentially the same as for one variable derivatives. You can use the \ palette symbols ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_\[Placeholder]\ \[Placeholder]\)], FontColor->RGBColor[1, 0, 0]], " or ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_\(\[Placeholder], \[Placeholder]\)\ \[Placeholder]\)], FontColor->RGBColor[1, 0, 0]], ", where the subscript boxes are filled by the variables and the final box \ is filled by the function. As you will see in the examples below, you can \ use more than two variables. You can also use the older syntax ", StyleBox["D[f[x1,x2,x3,...,xn],xi]", FontColor->RGBColor[1, 0, 0]], ". You can use any variable names, as in the examples below. Make sure to \ leave a ", StyleBox["space", FontColor->RGBColor[1, 0, 0]], " or put a ", StyleBox["*", FontColor->RGBColor[1, 0, 0]], " between letters that are being multiplied (such as the use of ", StyleBox["x y", FontColor->RGBColor[1, 0, 0]], ", instead of ", StyleBox["xy", FontColor->RGBColor[1, 0, 0]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], " in the following example). ", StyleBox["Evaluate each input cell below by clicking anywhere in the cell, \ and pressing the ", FontColor->RGBColor[1, 0, 1]], StyleBox["enter", FontColor->RGBColor[0, 0, 1]], StyleBox[" key", FontColor->RGBColor[1, 0, 1]], "." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_x Sin[x\ y]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_y Sin[x\ y]\)], "Input", AspectRatioFixed->True], Cell[TextData[ "The first output from the following cell is the function, the second the \ partial derivative of this function with respect to t, the third the partial \ with respect to u, and the fourth the partial with respect to v."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Clear[h, t, u, v]\), "\[IndentingNewLine]", \(h[t_, u_, v_] = t\^2\ E\^\(t\ u\ v\) + u\^3\), "\n", \(\[PartialD]\_t h[t, u, v]\), "\n", \(\[PartialD]\_u h[t, u, v]\), "\n", \(\[PartialD]\_v h[t, u, v]\)}], "Input", AspectRatioFixed->True], Cell[TextData[{ "You can find higher order derivatives with respect to one of the variables \ by including the order in the command. For example, to find the 2nd \ derivative of ", StyleBox["x Cos[x y]", FontColor->RGBColor[1, 0, 0]], " with respect to ", StyleBox["x", FontColor->RGBColor[1, 0, 0]], " twice, use: " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_{x, 2}\((x\ Cos[x\ y])\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Be sure to put the braces ", StyleBox["{ }", FontColor->RGBColor[1, 0, 0]], " around the variable and the order." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ You can find mixed higher order partials by listing the variables with which \ you wish to differentiate after the expression. For example, the next cell \ finds the third order partial derivative with respect to x twice, and z once.\ \ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_\(x, x, z\)\((z\ \[ExponentialE]\^\(x\ y\ z\))\)\)], \ "Input", AspectRatioFixed->True], Cell["This can also be done by", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_\({x, 2}, z\)\((z\ \[ExponentialE]\^\(x\ y\ z\))\)\)], \ "Input", AspectRatioFixed->True], Cell["and, of course, by", "Text"], Cell[BoxData[ \(D[z\ E^\((x\ y\ z)\), {x, x, z}]\)], "Input"], Cell["as in the older version 2 syntax.", "Text"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " assumes the order of the variables is unimportant. For example, it will \ give the same answer to ", StyleBox["D[f[x,y],x,y]", FontColor->RGBColor[1, 0, 0]], " and ", StyleBox["D[f[x,y],y,x]", FontColor->RGBColor[1, 0, 0]], ". As you may know from class, this is true for \"nice\" (but not all) \ functions." }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Iterated Integrals", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In order to evaluate iterated integrals, you simply \"nest\" one variable \ integral commands. (The additional ", StyleBox["Multivariable", FontColor->RGBColor[0, 0, 1]], " palette has buttons to quickly create the \"nested\" integrals for double \ and triple iterated integrals. Look in ", StyleBox["File...Palettes", FontColor->RGBColor[0, 0, 1]], " to see if it is on your computer.) For example, the following cell \ evaluates the iterated integral of the function ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]]], "y over the triangle bounded by y=x, y=0, and x=1, doing y first and then \ x. ", StyleBox["Evaluate each input cell below by clicking anywhere in the cell, \ and pressing the ", FontColor->RGBColor[1, 0, 1]], StyleBox["enter", FontColor->RGBColor[0, 0, 1]], StyleBox[" key", FontColor->RGBColor[1, 0, 1]], "." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\[Integral]\_0\%1\((\[Integral]\_0\%x\( x\^2\ y\) \[DifferentialD]y)\) \[DifferentialD]x\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "The next cell evaluates the iterated integrals which calculate the \ z-coordinate of the centroid (geometric center) of the region trapped between \ the two paraboloids ", StyleBox["z = ", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]], FontColor->RGBColor[1, 0, 0]], StyleBox[" + ", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["y", FontSlant->"Plain"], "2"], TraditionalForm]], FontColor->RGBColor[1, 0, 0]], " and ", StyleBox["z = 8 - ", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]], FontColor->RGBColor[1, 0, 0]], StyleBox[" - ", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["y", FontSlant->"Plain"], "2"], TraditionalForm]], FontColor->RGBColor[1, 0, 0]], ". (The x and y coordinates are both 0.) The integral has been \ transformed into cylindrical coordinates, which explains the factor ", StyleBox["r", FontColor->RGBColor[1, 0, 0]], " in the integrand." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Clear[Vxy, V, zbar]\), "\[IndentingNewLine]", \(Vxy = \[Integral]\_0\%\(2\ \ \[Pi]\)\((\[Integral]\_0\%2\((\[Integral]\_\(r\^2\)\%\(8 - r\^2\)\(z\ r\) \ \[DifferentialD]z)\) \[DifferentialD]r)\) \[DifferentialD]\[Theta]\), "\n", \(V = \[Integral]\_0\%\(2\ \[Pi]\)\((\[Integral]\_0\%2\((\[Integral]\_\(r\ \^2\)\%\(8 - r\^2\)r \[DifferentialD]z)\) \[DifferentialD]r)\) \ \[DifferentialD]\[Theta]\), "\n", \(zbar = Vxy\/V\)}], "Input", AspectRatioFixed->True], Cell[TextData[{ "(Of course, from just considering the two surfaces, we can easily see that \ the answer for ", StyleBox["zbar", FontColor->RGBColor[1, 0, 0]], " should be 4.)" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Be sure to look at the integration section of the ", StyleBox["Calculus (one variable)", FontColor->RGBColor[0, 0, 1]], " notebook for more information on integration." }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData[ "Vector Analysis (including gradients, dot and cross products, and much \ more)"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In order to use the commands in this section, the package ", StyleBox["\"Calculus", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["VectorAnalysis", FontColor->RGBColor[1, 0, 0]], StyleBox["`", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox["\"", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0.499992, 0.0658274, 0.17203]], "must be loaded. ", StyleBox["Evaluate the next cell to do so.", FontColor->RGBColor[1, 0, 1]], StyleBox[" ", FontColor->RGBColor[1, 0.0721599, 0.542763]], "You will have to load this package during any session in which you plan to \ use any of these commands. ", StyleBox["$Packages", FontColor->RGBColor[1, 0, 0]], " displays the current list of loaded packages." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Needs["\"]\), "\[IndentingNewLine]", \($Packages\)}], "Input", AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ "Dot, cross, and scalar triple products in ", Cell[BoxData[ \(TraditionalForm\`R\^3\)]] }], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "This cell produces the dot product of the vectors ", StyleBox["{2,1,-3}", FontColor->RGBColor[1, 0, 0]], " and ", StyleBox["{4,-2,1}", FontColor->RGBColor[1, 0, 0]], ", which ", StyleBox["Mathematica", FontSlant->"Italic"], " stores as lists." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(DotProduct[{2, 1, \(-3\)}, {4, \(-2\), 1}]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "You can also do this for any two vectors in ", Cell[BoxData[ \(TraditionalForm\`R\^n\)]], " using ", StyleBox[". ", FontColor->RGBColor[1, 0, 0]], "." }], "Text"], Cell[BoxData[ \({2, 1, \(-3\)} . {4, \(-2\), 1}\)], "Input"], Cell[BoxData[ \({3, 4, \(-2\), 5} . {\(-2\), 4, 3, \(-1\)}\)], "Input"], Cell["\<\ This one gives the cross product of the original two vectors.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(CrossProduct[{2, 1, \(-3\)}, {4, \(-2\), 1}]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "The next cell gives the scalar triple product of these vectors together \ with the vector ", StyleBox["{2,-2,3}", FontColor->RGBColor[1, 0, 0]], ". You might remember that the absolute value of this number gives us the \ volume of the parallelepiped whose sides are formed from the three vectors. " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(ScalarTripleProduct[{2, 1, \(-3\)}, {4, \(-2\), 1}, {2, \(-2\), 3}]\)], "Input", AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Gradients, Divergence, Curl, and Laplacians", "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In addition to computing partial derivatives, ", StyleBox["Mathematica", FontSlant->"Italic"], " can compute gradients (the vector of all first order partial \ derivatives)." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Grad[x\ y\ E\^\(x\ y\ z\)]\)], "Input", AspectRatioFixed->True], Cell[TextData[ "The divergence of a vector field is found using the following command."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Div[{x\ y\^2\ z, x\^3\ E\^\(y\ z\), x\ y\ z}]\)], "Input", AspectRatioFixed->True], Cell[TextData["To find its curl, use:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Curl[{x\ y\^2\ z, x\^3\ E\^\(y\ z\), x\ y\ z}]\)], "Input", AspectRatioFixed->True], Cell[TextData[ "The Laplacian of a function is the sum of second partials. (It is also the \ divergence of its gradient, as you can see in evaluating the second cell \ below.)"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Laplacian[x\ y\ E\^\(x\ y\ z\)]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(Div[Grad[x\ y\ E\^\(x\ y\ z\)]]\)], "Input", AspectRatioFixed->True] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.2 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 723}}, WindowToolbars->{"RulerBar", "EditBar"}, WindowSize->{598, 551}, WindowMargins->{{6, Automatic}, {Automatic, 8}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->"MacintoshAutomaticEncoding" ] (******************************************************************* 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[CellGroupData[{ Cell[1776, 53, 169, 5, 131, "Title", Evaluatable->False], Cell[1948, 60, 270, 5, 44, "SmallText"], Cell[2221, 67, 2517, 65, 318, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[4763, 136, 153, 7, 59, "Section", Evaluatable->False], Cell[4919, 145, 1039, 29, 110, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[5995, 179, 24, 0, 39, "Section"], Cell[CellGroupData[{ Cell[6044, 183, 40, 0, 47, "Subsection"], Cell[6087, 185, 210, 5, 52, "Text"], Cell[6300, 192, 103, 2, 30, "Input"], Cell[6406, 196, 1419, 38, 166, "Text"], Cell[7828, 236, 103, 2, 30, "Input"], Cell[7934, 240, 303, 7, 52, "Text"], Cell[8240, 249, 503, 13, 71, "Text"], Cell[8746, 264, 102, 2, 50, "Input"], Cell[8851, 268, 584, 10, 109, "Text"], Cell[9438, 280, 103, 2, 30, "Input"], Cell[9544, 284, 591, 12, 90, "Text"], Cell[10138, 298, 585, 16, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[10760, 319, 35, 0, 31, "Subsection"], Cell[10798, 321, 363, 7, 71, "Text"], Cell[11164, 330, 108, 2, 30, "Input"], Cell[11275, 334, 284, 7, 52, "Text"], Cell[11562, 343, 138, 2, 50, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[11737, 350, 38, 0, 31, "Subsection"], Cell[11778, 352, 309, 11, 33, "Text"], Cell[12090, 365, 105, 2, 30, "Input"], Cell[12198, 369, 241, 6, 52, "Text"], Cell[12442, 377, 105, 2, 30, "Input"], Cell[12550, 381, 69, 0, 33, "Text"], Cell[12622, 383, 134, 2, 30, "Input"], Cell[12759, 387, 158, 5, 33, "Text"], Cell[12920, 394, 110, 2, 30, "Input"], Cell[13033, 398, 162, 5, 33, "Text"], Cell[13198, 405, 151, 2, 31, "Input"], Cell[13352, 409, 242, 8, 33, "Text"], Cell[13597, 419, 121, 3, 42, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[13755, 427, 40, 0, 31, "Subsection"], Cell[13798, 429, 1461, 45, 92, "Text", Evaluatable->False], Cell[15262, 476, 110, 2, 50, "Input"], Cell[15375, 480, 107, 3, 33, "Text"], Cell[15485, 485, 454, 12, 31, "Input"], Cell[15942, 499, 146, 3, 52, "Text"], Cell[16091, 504, 53, 1, 30, "Input"], Cell[16147, 507, 57, 0, 33, "Text"], Cell[16207, 509, 109, 2, 30, "Input"], Cell[16319, 513, 506, 13, 71, "Text"], Cell[16828, 528, 96, 2, 33, "Text"], Cell[16927, 532, 112, 2, 50, "Input"], Cell[17042, 536, 92, 2, 33, "Text"], Cell[17137, 540, 158, 3, 50, "Input"], Cell[17298, 545, 71, 0, 33, "Text"], Cell[17372, 547, 156, 2, 50, "Input"], Cell[17531, 551, 187, 4, 52, "Text"], Cell[17721, 557, 59, 1, 30, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[17829, 564, 86, 2, 39, "Section", Evaluatable->False], Cell[17918, 568, 1557, 43, 147, "Text", Evaluatable->False], Cell[19478, 613, 83, 2, 30, "Input"], Cell[19564, 617, 83, 2, 30, "Input"], Cell[19650, 621, 293, 5, 52, "Text", Evaluatable->False], Cell[19946, 628, 281, 6, 110, "Input"], Cell[20230, 636, 395, 12, 52, "Text", Evaluatable->False], Cell[20628, 650, 96, 2, 30, "Input"], Cell[20727, 654, 200, 7, 33, "Text", Evaluatable->False], Cell[20930, 663, 308, 7, 52, "Text", Evaluatable->False], Cell[21241, 672, 122, 3, 30, "Input"], Cell[21366, 677, 88, 2, 33, "Text", Evaluatable->False], Cell[21457, 681, 124, 3, 30, "Input"], Cell[21584, 686, 34, 0, 33, "Text"], Cell[21621, 688, 65, 1, 30, "Input"], Cell[21689, 691, 49, 0, 33, "Text"], Cell[21741, 693, 458, 14, 52, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[22236, 712, 85, 2, 39, "Section", Evaluatable->False], Cell[22324, 716, 1042, 28, 109, "Text", Evaluatable->False], Cell[23369, 746, 156, 3, 42, "Input"], Cell[23528, 751, 1381, 44, 90, "Text", Evaluatable->False], Cell[24912, 797, 494, 9, 140, "Input"], Cell[25409, 808, 246, 8, 33, "Text", Evaluatable->False], Cell[25658, 818, 255, 7, 52, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[25950, 830, 156, 4, 66, "Section", Evaluatable->False], Cell[26109, 836, 984, 30, 72, "Text", Evaluatable->False], Cell[27096, 868, 141, 3, 50, "Input"], Cell[CellGroupData[{ Cell[27262, 875, 179, 6, 47, "Subsection", Evaluatable->False], Cell[27444, 883, 346, 13, 33, "Text", Evaluatable->False], Cell[27793, 898, 101, 2, 30, "Input"], Cell[27897, 902, 199, 8, 33, "Text"], Cell[28099, 912, 64, 1, 30, "Input"], Cell[28166, 915, 75, 1, 30, "Input"], Cell[28244, 918, 133, 4, 33, "Text", Evaluatable->False], Cell[28380, 924, 103, 2, 30, "Input"], Cell[28486, 928, 386, 9, 71, "Text", Evaluatable->False], Cell[28875, 939, 129, 3, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[29041, 947, 113, 2, 31, "Subsection", Evaluatable->False], Cell[29157, 951, 261, 8, 52, "Text", Evaluatable->False], Cell[29421, 961, 85, 2, 30, "Input"], Cell[29509, 965, 148, 4, 33, "Text", Evaluatable->False], Cell[29660, 971, 104, 2, 31, "Input"], Cell[29767, 975, 96, 2, 33, "Text", Evaluatable->False], Cell[29866, 979, 105, 2, 31, "Input"], Cell[29974, 983, 235, 5, 52, "Text", Evaluatable->False], Cell[30212, 990, 90, 2, 30, "Input"], Cell[30305, 994, 90, 2, 30, "Input"] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)