(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. 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[ 14535, 481]*) (*NotebookOutlinePosition[ 15235, 506]*) (* CellTagsIndexPosition[ 15191, 502]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Derivatives, Slopes, Tangent Lines, and Making Movies", "Title", PageWidth->PaperWidth], Cell[TextData[StyleBox["Chapter 2, Section 1, and\nChapter 3, Section 6", FontFamily->"Arial", FontSize->16]], "Text", FontWeight->"Bold"], Cell[CellGroupData[{ Cell["Introduction", "Section", PageWidth->PaperWidth], Cell[TextData[{ "OBJECTIVE: To visualize the derivative and the linearization of a function \ at a point.\n\nIn this module, we explore the derivative as the slope of a \ nonlinear function and find the equation of the line tangent to a curve at a \ point. You will learn how to plot the curve and selected tangents on the same \ graph. In addition, you will see how to use ", StyleBox["Mathematica ", FontSlant->"Italic"], "to make a movie animation by generating a sequence of plots, each showing \ a different tangent to the curve. When the sequence of graphs is animated, \ the tangent lines appear to roll along the graph of the function.\n" }], "Text", PageWidth->PaperWidth], Cell[CellGroupData[{ Cell["Technology Guidelines", "Subsection", PageWidth->PaperWidth, 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", PageWidth->PaperWidth] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["You Try It", "Section", PageWidth->PaperWidth], Cell[TextData[{ "First, work through Parts I - V with the example function ", Cell[BoxData[ \(TraditionalForm\`f(x) = x\^2\)]], ", and then repeat the steps in Parts I - V for some functions that you \ select. Here are some suggestions.\n\n1. ", Cell[BoxData[ \(TraditionalForm\`x\^3\)]], " for ", Cell[BoxData[ \(TraditionalForm\`\(-2\) \[LessEqual] x \[LessEqual] 2\)]], "\n\n2. ", Cell[BoxData[ \(TraditionalForm\`sin\ x\)]], " for ", Cell[BoxData[ \(TraditionalForm\`0 \[LessEqual] x \[LessEqual] 2 \[Pi]\)]], "\n\n3. ", Cell[BoxData[ \(TraditionalForm\`e\^\(-x\^2\)\)]], " for ", Cell[BoxData[ \(TraditionalForm\`\(-2\) \[LessEqual] x \[LessEqual] 2\)]], "\n\n4. ", Cell[BoxData[ \(TraditionalForm\`\@x\)]], " for ", Cell[BoxData[ \(TraditionalForm\`0 < x \[LessEqual] 4\)]], " Note that we do not include ", Cell[BoxData[ \(TraditionalForm\`x = 0\)]], ". Do you know why?\n" }], "Text", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Part I: The Derivative at a Point", "Section", PageWidth->PaperWidth], Cell["Chapter 2, Section 1, Exercises 1 - 6", "Text", PageWidth->PaperWidth, FontWeight->"Bold"], Cell[TextData[{ "Define a nonlinear function of your choice, and call it ", Cell[BoxData[ \(TraditionalForm\`y = f(x)\)]], " and graph it. For an example, we choose the function ", Cell[BoxData[ \(TraditionalForm\`f(x) = x\^2\)]], " for ", Cell[BoxData[ \(TraditionalForm\`\(-2\) \[LessEqual] x \[LessEqual] 2\)]], ". (To enter a different function and domain, change the red entries in the \ following input cell.)" }], "Text", PageWidth->PaperWidth], Cell[BoxData[{\(Clear[y, f];\), "\[IndentingNewLine]", RowBox[{ RowBox[{\(x\_0\), "=", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 0]]}], ";", " ", RowBox[{\(x\_f\), "=", StyleBox["2", FontColor->RGBColor[1, 0, 0]]}], ";"}], "\[IndentingNewLine]", RowBox[{"y", "=", RowBox[{\(f[x_]\), "=", StyleBox[\(x\^2\), FontColor->RGBColor[1, 0, 0]]}]}]}], "Input", PageWidth->PaperWidth], Cell[BoxData[ \(\(Plot[y, {x, x\_0, x\_f}, PlotRange \[Rule] All, PlotStyle \[Rule] {RGBColor[0, 0, 1]}, AxesLabel \[Rule] {"\", "\"}];\)\)], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Now pick a point on the function and ", StyleBox["use the definition of the derivative", FontSlant->"Italic"], " to find the slope of the function's graph at the point you pick, calling \ it ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox[ StyleBox["m", FontWeight->"Bold", FontSlant->"Plain"], "tangent"], FontWeight->"Bold"], TraditionalForm]]], ". We choose ", Cell[BoxData[ \(TraditionalForm\`x = 1\)]], " for our example." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ \(m\_tangent = Limit[\(f[1 + h] - f[1]\)\/h, h \[Rule] 0]\)], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Part II: The Linearization of a Function", "Section", PageWidth->PaperWidth], Cell["\<\ Chapter 2, Section 1, Exercises 1 - 6, and Chapter 3, Section 6\ \>", "Text", PageWidth->PaperWidth, FontWeight->"Bold"], Cell[TextData[{ "Form a new function for the line that is tangent to the function that you \ chose in the \"You Try It\" section at the point you picked in Part I, and \ call it ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox[ StyleBox["y", FontSlant->"Plain"], "tangent"], "=", StyleBox[\(L[x_]\), FontSlant->"Plain"]}], TraditionalForm]], FontWeight->"Bold"], ". This function is called the ", StyleBox["linearization", FontSlant->"Italic"], " of ", Cell[BoxData[ \(TraditionalForm\`y = f(x)\)]], " at the point ", Cell[BoxData[ \(TraditionalForm\`\((1, \ f(1))\)\)]] }], "Text", PageWidth->PaperWidth], Cell[BoxData[ \(y\_tangent = \(L[x_] = f[1] + m\_tangent*\((x - 1)\)\)\)], "Input", PageWidth->PaperWidth], Cell["Plot the function and the tangent line on the same graph.", "Text", PageWidth->PaperWidth], Cell[BoxData[ \(\(Plot[{f[x], L[x]}, {x, x\_0, x\_f}, PlotRange \[Rule] All, PlotStyle \[Rule] {{RGBColor[0, 0, 1]}, {RGBColor[1, 0, 0]}}, AxesLabel \[Rule] {"\", \*"\"\\""}];\)\)], \ "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Part III: The Derivative Function", "Section", PageWidth->PaperWidth], Cell["\<\ Chapter 2, Section 1, Exercises 1 - 6, and Chapter 3, Section 6\ \>", "Text", PageWidth->PaperWidth, FontWeight->"Bold"], Cell[TextData[{ "Form the derivative function that will give the slope of the tangent to \ your chosen function at any point with coordinates ", Cell[BoxData[ \(TraditionalForm\`\((x, f(x))\)\)]], ". Call the derivative function ", Cell[BoxData[ FormBox[ RowBox[{ StyleBox["yprime", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], StyleBox[ RowBox[{ StyleBox["x", FontWeight->"Bold", FontSlant->"Plain"], StyleBox["_", FontWeight->"Bold"]}]], StyleBox[" ", FontWeight->"Bold"], StyleBox["]", FontWeight->"Bold"]}], TraditionalForm]]], " , and graph it." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ \(yprime[x_] = Limit[\(f[x + h] - f[x]\)\/h, h \[Rule] 0]\)], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Graph ", StyleBox["yprime[ x ]", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ \(\(Plot[yprime[x], {x, x\_0, x\_f}, PlotStyle \[Rule] {RGBColor[0, 1, 0]}, AxesLabel \[Rule] {"\", "\"}];\)\)], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Part IV: A Whole Bunch of Tangents", "Section", PageWidth->PaperWidth], Cell["Chapter 3, Section 6", "Text", PageWidth->PaperWidth, FontWeight->"Bold"], Cell[TextData[{ "Form a new ", StyleBox["Mathematica", FontSlant->"Italic"], " function that gives the equation of the line tangent to ", Cell[BoxData[ \(TraditionalForm\`y = f(x)\)]], " at the point ", Cell[BoxData[ \(TraditionalForm\`\((a, f(a))\)\)]], ". Call the new function ", StyleBox["tanline[x_, a_ ]", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[{ \(\(Clear[tanline];\)\), "\[IndentingNewLine]", \(tanline[x_, a_] := f[a] + yprime[a]*\((x - a)\)\)}], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Test your ", Cell[BoxData[ \(TraditionalForm\`tanline[x_, a_]\)], FontWeight->"Bold"], " for several values of ", StyleBox["a", FontSlant->"Italic"], " by plotting the tangent lines and ", Cell[BoxData[ \(TraditionalForm\`y = f(x)\)]], " together on the same graph. First, use the ", StyleBox["tanline[x_, a_ ]", FontWeight->"Bold"], " function and the ", StyleBox["Table[ ]", FontWeight->"Bold"], " command to generate a list of equations for the tangents to the curve at \ points ", Cell[BoxData[ \(TraditionalForm\`\((a, f(a))\)\)]], ", for values of ", StyleBox["a", FontSlant->"Italic"], " varying from ", Cell[BoxData[ \(TraditionalForm\`\(-2\)\)]], " to 2 in increments of 0.1. Then graph the tangent lines and ", Cell[BoxData[ \(TraditionalForm\`y = f(x)\)]], " together on the same graph." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ \(listoftangentlines = Table[tanline[x, a], {a, x\_0, x\_f, 0.2}]\)], "Input", PageWidth->PaperWidth], Cell[BoxData[ \(\(p1 = Plot[Evaluate[listoftangentlines], {x, x\_0, x\_f}, PlotStyle \[Rule] {RGBColor[0, 0, 1]}, AxesLabel \[Rule] {"\", \*"\"\\""}];\)\)], "Input", PageWidth->PaperWidth], Cell[BoxData[ \(\(p2 = Plot[y, {x, x\_0, x\_f}, PlotRange \[Rule] All, PlotStyle \[Rule] {RGBColor[1, 0, 0], Thickness[0.010]}, AxesLabel \[Rule] {"\", \*"\"\\""}];\)\)], "Input", PageWidth->PaperWidth], Cell[BoxData[ \(\(Show[{p1, p2}];\)\)], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Part V: Making Movies", "Section", PageWidth->PaperWidth], Cell["Chapter 3, Section 6", "Text", PageWidth->PaperWidth, FontWeight->"Bold"], Cell[TextData[{ "The following command generates a sequence of graphs that you can animate. \ To animate the graphs, simply place the cursor on any one of the graphs in \ the sequence and double click the mouse. Or, you can collapse all the cells \ for the animation sequence into one cell by double clicking the mouse on the \ first cell bracket that contains all the graphics cells in the sequence, and \ then type Ctrl+Y. Set the ", StyleBox["PlotRange", FontWeight->"Bold"], " so that all the graphs in the sequence are the same size; Otherwise, the \ picture will jump around in the animation. You will have to adjust the \ vertical limits (in red letters) in the ", StyleBox["PlotRange", FontWeight->"Bold"], " option to make the animation fit correctly in the viewing window." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Do", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{\({f[x], tanline[x, a]}\), ",", \({x, x\_0, x\_f}\), ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{\({x\_0, x\_f}\), ",", RowBox[{"{", StyleBox[\(\(-2\), 4\), FontColor->RGBColor[1, 0, 0]], "}"}]}], "}"}]}], ",", \(PlotStyle \[Rule] {{RGBColor[1, 0, 0]}, {RGBColor[0, 0, 1]}}\), ",", \(AxesLabel \[Rule] {"\", \*"\"\\""}\)}], "]"}], ",", \({a, x\_0, x\_f, 0.2}\)}], "]"}]], "Input", PageWidth->PaperWidth] }, Closed]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{6, 6} ] (*********************************************************************** 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[1739, 51, 95, 1, 195, "Title"], Cell[1837, 54, 144, 3, 60, "Text"], Cell[CellGroupData[{ Cell[2006, 61, 56, 1, 53, "Section"], Cell[2065, 64, 693, 12, 166, "Text"], Cell[CellGroupData[{ Cell[2783, 80, 99, 2, 47, "Subsection"], Cell[2885, 84, 1232, 34, 242, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[4166, 124, 54, 1, 33, "Section"], Cell[4223, 127, 1033, 34, 225, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[5293, 166, 77, 1, 33, "Section"], Cell[5373, 169, 100, 2, 33, "Text"], Cell[5476, 173, 485, 13, 71, "Text"], Cell[5964, 188, 466, 12, 70, "Input"], Cell[6433, 202, 205, 4, 50, "Input"], Cell[6641, 208, 580, 19, 52, "Text"], Cell[7224, 229, 113, 2, 42, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[7374, 236, 84, 1, 33, "Section"], Cell[7461, 239, 134, 4, 33, "Text"], Cell[7598, 245, 715, 23, 72, "Text"], Cell[8316, 270, 112, 2, 30, "Input"], Cell[8431, 274, 98, 1, 33, "Text"], Cell[8532, 277, 265, 5, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[8834, 287, 77, 1, 33, "Section"], Cell[8914, 290, 134, 4, 33, "Text"], Cell[9051, 296, 819, 26, 52, "Text"], Cell[9873, 324, 113, 2, 42, "Input"], Cell[9989, 328, 121, 6, 33, "Text"], Cell[10113, 336, 195, 4, 50, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[10345, 345, 78, 1, 33, "Section"], Cell[10426, 348, 83, 2, 33, "Text"], Cell[10512, 352, 411, 15, 52, "Text"], Cell[10926, 369, 160, 3, 50, "Input"], Cell[11089, 374, 940, 32, 109, "Text"], Cell[12032, 408, 128, 3, 30, "Input"], Cell[12163, 413, 253, 6, 70, "Input"], Cell[12419, 421, 267, 6, 70, "Input"], Cell[12689, 429, 77, 2, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[12803, 436, 65, 1, 33, "Section"], Cell[12871, 439, 83, 2, 33, "Text"], Cell[12957, 443, 838, 16, 147, "Text"], Cell[13798, 461, 709, 16, 90, "Input"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)