(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 14058, 387] NotebookOptionsPosition[ 13034, 351] NotebookOutlinePosition[ 13472, 368] CellTagsIndexPosition[ 13429, 365] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["Derivative Signs", "Text", CellChangeTimes->{{3.409269896323167*^9, 3.409269903249358*^9}, { 3.692915778150144*^9, 3.692915785280126*^9}}, TextAlignment->Center, FontSize->36, FontColor->RGBColor[1, 0, 0]], Cell[CellGroupData[{ Cell["\<\ by Ruth Dover, Illinois Mathematics and Science Academy with help from Stan Wagon, Macalester College\ \>", "Subsubtitle", CellChangeTimes->{{3.692641766908617*^9, 3.692641801480177*^9}}], Cell[TextData[{ "Enter a function and the min and max values for ", StyleBox["x", FontSlant->"Italic"], ". (An example is given, but this may be changed.)" }], "Text", CellChangeTimes->{{3.409270006049891*^9, 3.409270056130176*^9}, { 3.4116809999061003`*^9, 3.411681011873941*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", RowBox[{ SuperscriptBox["x", "3"], "-", RowBox[{"6", SuperscriptBox["x", "2"]}], "+", RowBox[{"5", "x"}], "+", "8"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"xmin", "=", " ", RowBox[{"-", "2"}]}], ";", " ", RowBox[{"xmax", "=", "6"}], ";"}]}], "Input", CellChangeTimes->{{3.408927197789257*^9, 3.408927292150642*^9}, { 3.411680971215016*^9, 3.411680996410844*^9}}], Cell["\<\ Here's the basic graph. (In some cases, you might want to control the \ PlotRange for this and for the subsequent graphs.)\ \>", "Text", CellChangeTimes->{{3.411681022395952*^9, 3.411681040313805*^9}, { 3.411681214163121*^9, 3.4116812497699833`*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", " ", "Thick"}]}], "]"}]], "Input", CellChangeTimes->{{3.408927226047933*^9, 3.408927234410142*^9}, { 3.408927269647814*^9, 3.408927273466113*^9}, {3.4116809904756603`*^9, 3.41168099238652*^9}, {3.41168171826029*^9, 3.4116817220507183`*^9}}], Cell[CellGroupData[{ Cell["First derivative", "Section", CellChangeTimes->{{3.411681326501376*^9, 3.4116813299858007`*^9}}], Cell[TextData[{ "This will plot the function ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], " where the first derivative is positive and ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], " where the derivative is negative." }], "Text", CellChangeTimes->{{3.4092700656250677`*^9, 3.4092701003773613`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"fder", "[", "x_", "]"}], ":=", RowBox[{"Evaluate", "[", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", "x"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"fder", "[", "x", "]"}], ">", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"fder", "[", "x", "]"}], "<", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{{3.408927299821266*^9, 3.4089273070969152`*^9}, { 3.408927420337517*^9, 3.408927445995297*^9}, {3.4089276097424307`*^9, 3.408927657067327*^9}, {3.40892770143847*^9, 3.408927717815961*^9}, { 3.408927999229953*^9, 3.408927999948124*^9}, 3.4089280866312027`*^9, { 3.408928127298273*^9, 3.4089281290291367`*^9}, {3.408928189009324*^9, 3.4089282477809677`*^9}, {3.408928290741189*^9, 3.408928321581996*^9}, { 3.409269562425353*^9, 3.4092695917551813`*^9}, {3.4093567882867317`*^9, 3.409356802004335*^9}, {3.409357254215001*^9, 3.4093572871884747`*^9}, { 3.409357318068755*^9, 3.4093574455336103`*^9}, {3.409613991948113*^9, 3.409613999034566*^9}, {3.4116810473012743`*^9, 3.411681058980599*^9}}], Cell["\<\ Below, you will see the same colored graph along with the graph of the first \ derivative of \[Florin].\ \>", "Text", CellChangeTimes->{{3.41168135711089*^9, 3.411681380001884*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"fder", "[", "x_", "]"}], ":=", RowBox[{"Evaluate", "[", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", "x"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"fder", "[", "x", "]"}], ">", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"fder", "[", "x", "]"}], "<", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", RowBox[{"Plot", "[", RowBox[{ RowBox[{"fder", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Thick", ",", "Green"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{{3.408927299821266*^9, 3.4089273070969152`*^9}, { 3.408927420337517*^9, 3.408927445995297*^9}, {3.4089276097424307`*^9, 3.408927657067327*^9}, {3.40892770143847*^9, 3.408927717815961*^9}, { 3.408927999229953*^9, 3.408927999948124*^9}, 3.4089280866312027`*^9, { 3.408928127298273*^9, 3.4089281290291367`*^9}, {3.408928189009324*^9, 3.4089282477809677`*^9}, {3.408928290741189*^9, 3.408928321581996*^9}, { 3.409269562425353*^9, 3.4092695917551813`*^9}, {3.4093567882867317`*^9, 3.409356802004335*^9}, {3.409357254215001*^9, 3.4093572871884747`*^9}, { 3.409357318068755*^9, 3.4093574455336103`*^9}, {3.409613991948113*^9, 3.409613999034566*^9}, {3.4116810473012743`*^9, 3.411681058980599*^9}, { 3.411681460957951*^9, 3.4116815031362867`*^9}, {3.442791285405293*^9, 3.4427912950413227`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Second derivative", "Section", CellChangeTimes->{{3.411681342520833*^9, 3.411681345393806*^9}}], Cell[TextData[{ "This next command will plot the function ", StyleBox["green", FontColor->RGBColor[0, 1, 0]], " where the second derivative is positive and ", StyleBox["purple", FontColor->RGBColor[0.5, 0, 0.5]], " where the second derivative is negative." }], "Text", CellChangeTimes->{{3.409270157499218*^9, 3.4092702040976267`*^9}, { 3.4427913572400913`*^9, 3.442791358758572*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"secder", "[", "x_", "]"}], ":=", RowBox[{"Evaluate", "[", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "2"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"secder", "[", "x", "]"}], ">", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Green", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"secder", "[", "x", "]"}], "<", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Purple", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{{3.409269668707903*^9, 3.409269726627247*^9}, { 3.409269790604807*^9, 3.409269791555026*^9}, {3.409356810124167*^9, 3.4093568315884132`*^9}, {3.4093574717163887`*^9, 3.409357508316279*^9}, { 3.409357560590138*^9, 3.409357612485016*^9}, {3.4093576582228203`*^9, 3.4093576586451473`*^9}, {3.409444477146068*^9, 3.409444485112093*^9}, { 3.4096137907488728`*^9, 3.409613796274847*^9}, {3.411681068236918*^9, 3.4116810785566807`*^9}}], Cell["\<\ Below, you will see the same colored graph along with the graph of the second \ derivative of \[Florin].\ \>", "Text", CellChangeTimes->{{3.4116815308249474`*^9, 3.411681583217901*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"secder", "[", "x_", "]"}], ":=", RowBox[{"Evaluate", "[", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "2"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"secder", "[", "x", "]"}], ">", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Green", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", " ", RowBox[{ RowBox[{"secder", "[", "x", "]"}], "<", "0"}]}], "]"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Purple", ",", " ", "Thick"}], "}"}]}]}], "]"}], ",", RowBox[{"Plot", "[", RowBox[{ RowBox[{"secder", "[", "x", "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", "xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", "Thick"}]}], "]"}], ",", " ", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{{3.409269668707903*^9, 3.409269726627247*^9}, { 3.409269790604807*^9, 3.409269791555026*^9}, {3.409356810124167*^9, 3.4093568315884132`*^9}, {3.4093574717163887`*^9, 3.409357508316279*^9}, { 3.409357560590138*^9, 3.409357612485016*^9}, {3.4093576582228203`*^9, 3.4093576586451473`*^9}, {3.409444477146068*^9, 3.409444485112093*^9}, { 3.4096137907488728`*^9, 3.409613796274847*^9}, {3.411681068236918*^9, 3.4116810785566807`*^9}, {3.411681595646158*^9, 3.411681624730742*^9}}] }, Open ]] }, Open ]] }, WindowSize->{762, 695}, WindowMargins->{{Automatic, 732}, {Automatic, 47}}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (September \ 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 217, 5, 55, "Text"], Cell[CellGroupData[{ Cell[787, 29, 198, 4, 49, "Subsubtitle"], Cell[988, 35, 290, 7, 30, "Text"], Cell[1281, 44, 464, 13, 54, "Input"], Cell[1748, 59, 264, 5, 49, "Text"], Cell[2015, 66, 463, 9, 32, "Input"], Cell[CellGroupData[{ Cell[2503, 79, 103, 1, 64, "Section"], Cell[2609, 82, 318, 9, 49, "Text"], Cell[2930, 93, 2210, 51, 117, "Input"], Cell[5143, 146, 192, 4, 30, "Text"], Cell[5338, 152, 2617, 61, 138, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[7992, 218, 102, 1, 64, "Section"], Cell[8097, 221, 396, 10, 49, "Text"], Cell[8496, 233, 2008, 50, 117, "Input"], Cell[10507, 285, 196, 4, 30, "Text"], Cell[10706, 291, 2300, 56, 138, "Input"] }, Open ]] }, Open ]] } ] *)