(* 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[ 17622, 453] NotebookOptionsPosition[ 16997, 426] NotebookOutlinePosition[ 17336, 441] CellTagsIndexPosition[ 17293, 438] WindowFrame->Normal ContainsDynamic->True *) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Plotting Tangent Lines", "Title", CellChangeTimes->{{3.4308696379639664`*^9, 3.4308696409510803`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"cubic", "[", "x_", "]"}], " ", ":=", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "^", "3"}], "-", RowBox[{"2", RowBox[{"x", "^", "2"}]}], " ", "-", RowBox[{"2", " ", "x"}], " ", "+", " ", "1"}], ")"}], "/", "8"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"quartic", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"1", "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "^", "4"}], " ", "+", " ", RowBox[{"3", " ", RowBox[{"x", "^", "3"}]}], " ", "-", " ", RowBox[{"20", " ", RowBox[{"x", "^", "2"}]}], " ", "+", " ", "x", " ", "+", " ", "3"}], ")"}], "/", "100"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"g", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"Sin", "[", "x", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"x", "^", "3"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"chain", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"h", "[", RowBox[{"g", "[", "x", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{ RowBox[{"f", "[", "x1", "]"}], "+", RowBox[{ RowBox[{ RowBox[{"f", "'"}], "[", "x1", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x1"}], ")"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "c"}], ",", " ", "c"}], "}"}], ",", RowBox[{"PlotRange", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}]}], ",", " ", RowBox[{"Epilog", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", ".025", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"x1", ",", RowBox[{"f", "[", "x1", "]"}]}], "}"}], "]"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", RowBox[{"-", "c"}], ",", " ", "c"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"c", ",", " ", RowBox[{"2", " ", "Pi"}], ",", " ", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"f", ",", " ", RowBox[{"{", RowBox[{ "Sin", ",", "Cos", ",", "Tan", ",", "Sec", ",", "Csc", ",", "Cot", ",", "Exp", ",", "cubic", ",", "quartic", ",", "g", ",", "h", ",", "chain"}], "}"}]}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.430869648912484*^9, 3.430869651423066*^9}, { 3.4308697359752717`*^9, 3.4308698715007772`*^9}, {3.430869926464056*^9, 3.430869969330453*^9}, {3.430870020198291*^9, 3.4308700250759087`*^9}, { 3.4308700954776525`*^9, 3.430870104835452*^9}, 3.430870151433056*^9, { 3.430870186867311*^9, 3.43087019036904*^9}, {3.4308702256079955`*^9, 3.4308703634644065`*^9}, {3.4308704170185957`*^9, 3.430870694146366*^9}, { 3.4312722811044655`*^9, 3.431272294081174*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`c$$ = 5.805663223833938, $CellContext`f$$ = $CellContext`chain, \ $CellContext`x1$$ = 3.135058140870327, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`x1$$], Dynamic[-$CellContext`c$$], Dynamic[$CellContext`c$$]}, { Hold[$CellContext`c$$], 2 Pi, 0}, { Hold[$CellContext`f$$], { Sin, Cos, Tan, Sec, Csc, Cot, Exp, $CellContext`cubic, $CellContext`quartic, $CellContext`g, \ $CellContext`h, $CellContext`chain}}}, Typeset`size$$ = {360., {113., 118.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x1$206$$ = 0, $CellContext`c$207$$ = 0, $CellContext`f$208$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`c$$ = 2 Pi, $CellContext`f$$ = Sin, $CellContext`x1$$ = Dynamic[-$CellContext`c$$]}, "ControllerVariables" :> { Hold[$CellContext`x1$$, $CellContext`x1$206$$, 0], Hold[$CellContext`c$$, $CellContext`c$207$$, 0], Hold[$CellContext`f$$, $CellContext`f$208$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Plot[{ $CellContext`f$$[$CellContext`x], \ $CellContext`f$$[$CellContext`x1$$] + Derivative[ 1][$CellContext`f$$][$CellContext`x1$$] ($CellContext`x - \ $CellContext`x1$$)}, {$CellContext`x, -$CellContext`c$$, $CellContext`c$$}, PlotRange -> {-3, 3}, Epilog -> { PointSize[0.025], Point[{$CellContext`x1$$, $CellContext`f$$[$CellContext`x1$$]}]}], "Specifications" :> {{$CellContext`x1$$, Dynamic[-$CellContext`c$$], Dynamic[$CellContext`c$$]}, {$CellContext`c$$, 2 Pi, 0}, {$CellContext`f$$, { Sin, Cos, Tan, Sec, Csc, Cot, Exp, $CellContext`cubic, $CellContext`quartic, $CellContext`g, \ $CellContext`h, $CellContext`chain}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{408., {185., 190.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.4308701917839885`*^9, {3.430870227450651*^9, 3.430870296817305*^9}, { 3.430870329565209*^9, 3.4308703637964163`*^9}, {3.4308704380533824`*^9, 3.4308705637601805`*^9}, 3.4308706631844807`*^9, 3.4308706946551228`*^9, 3.43107658999644*^9, {3.4312722740443707`*^9, 3.4312722947071104`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Options", "[", "Plot", "]"}]], "Input", CellChangeTimes->{{3.431077171094013*^9, 3.4310771735928764`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"AlignmentPoint", "\[Rule]", "Center"}], ",", RowBox[{"AspectRatio", "\[Rule]", FractionBox["1", "GoldenRatio"]}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"AxesLabel", "\[Rule]", "None"}], ",", RowBox[{"AxesOrigin", "\[Rule]", "Automatic"}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"Background", "\[Rule]", "None"}], ",", RowBox[{"BaselinePosition", "\[Rule]", "Automatic"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"ClippingStyle", "\[Rule]", "None"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Automatic"}], ",", RowBox[{"ColorFunctionScaling", "\[Rule]", "True"}], ",", RowBox[{"ColorOutput", "\[Rule]", "Automatic"}], ",", RowBox[{"ContentSelectable", "\[Rule]", "Automatic"}], ",", RowBox[{"DisplayFunction", "\[RuleDelayed]", "$DisplayFunction"}], ",", RowBox[{"Epilog", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"Evaluated", "\[Rule]", "Automatic"}], ",", RowBox[{"EvaluationMonitor", "\[Rule]", "None"}], ",", RowBox[{"Exclusions", "\[Rule]", "Automatic"}], ",", RowBox[{"ExclusionsStyle", "\[Rule]", "None"}], ",", RowBox[{"Filling", "\[Rule]", "None"}], ",", RowBox[{"FillingStyle", "\[Rule]", "Automatic"}], ",", RowBox[{"FormatType", "\[RuleDelayed]", "TraditionalForm"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"FrameLabel", "\[Rule]", "None"}], ",", RowBox[{"FrameStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"FrameTicks", "\[Rule]", "Automatic"}], ",", RowBox[{"FrameTicksStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"GridLines", "\[Rule]", "None"}], ",", RowBox[{"GridLinesStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"ImageMargins", "\[Rule]", "0.`"}], ",", RowBox[{"ImagePadding", "\[Rule]", "All"}], ",", RowBox[{"ImageSize", "\[Rule]", "Automatic"}], ",", RowBox[{"LabelStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"MaxRecursion", "\[Rule]", "Automatic"}], ",", RowBox[{"Mesh", "\[Rule]", "None"}], ",", RowBox[{"MeshFunctions", "\[Rule]", RowBox[{"{", RowBox[{"#1", "&"}], "}"}]}], ",", RowBox[{"MeshShading", "\[Rule]", "None"}], ",", RowBox[{"MeshStyle", "\[Rule]", "Automatic"}], ",", RowBox[{"Method", "\[Rule]", "Automatic"}], ",", RowBox[{"PerformanceGoal", "\[RuleDelayed]", "$PerformanceGoal"}], ",", RowBox[{"PlotLabel", "\[Rule]", "None"}], ",", RowBox[{"PlotPoints", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"Full", ",", "Automatic"}], "}"}]}], ",", RowBox[{"PlotRangeClipping", "\[Rule]", "True"}], ",", RowBox[{"PlotRangePadding", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRegion", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Automatic"}], ",", RowBox[{"PreserveImageOptions", "\[Rule]", "Automatic"}], ",", RowBox[{"Prolog", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"RegionFunction", "\[Rule]", RowBox[{"(", RowBox[{"True", "&"}], ")"}]}], ",", RowBox[{"RotateLabel", "\[Rule]", "True"}], ",", RowBox[{"Ticks", "\[Rule]", "Automatic"}], ",", RowBox[{"TicksStyle", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"WorkingPrecision", "\[Rule]", "MachinePrecision"}]}], "}"}]], "Output", CellChangeTimes->{3.4310771741123743`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f", "[", "x_", "]"}], " ", ":=", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "-", "1"}], ")"}], "/", "8"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"g", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"1.5", " ", RowBox[{"Sin", "[", RowBox[{".1", RowBox[{"x", "^", "2"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"chain", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"f", "[", RowBox[{"g", "[", "x", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", " ", RowBox[{ RowBox[{"f", "[", "x1", "]"}], "+", RowBox[{ RowBox[{ RowBox[{"f", "'"}], "[", "x1", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x1"}], ")"}]}]}], ",", " ", RowBox[{"g", "[", "x", "]"}], ",", " ", RowBox[{ RowBox[{"g", "[", "x1", "]"}], "+", RowBox[{ RowBox[{ RowBox[{"g", "'"}], "[", "x1", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x1"}], ")"}]}]}], ",", " ", RowBox[{"chain", "[", "x", "]"}], ",", " ", RowBox[{ RowBox[{"chain", "[", "x1", "]"}], " ", "+", " ", RowBox[{ RowBox[{ RowBox[{"chain", "'"}], "[", "x1", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x1"}], ")"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"-", " ", "2"}], " ", "Pi"}], ",", " ", RowBox[{"2", " ", "Pi"}]}], "}"}], ",", RowBox[{"PlotRange", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "2"}], "}"}]}], ",", " ", RowBox[{"Epilog", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", ".025", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"x1", ",", RowBox[{"f", "[", "x1", "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"x1", ",", RowBox[{"g", "[", "x1", "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"x1", ",", RowBox[{"chain", "[", "x1", "]"}]}], "}"}], "]"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", RowBox[{ RowBox[{"-", " ", "2"}], " ", "Pi"}], ",", " ", RowBox[{"2", " ", "Pi"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"blue", " ", "curve", " ", "is", " ", "composition"}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.431076626064444*^9, 3.4310768385108075`*^9}, { 3.4310768712137923`*^9, 3.4310769778993473`*^9}, {3.4310770894205294`*^9, 3.4310771054361057`*^9}, {3.4310771864026036`*^9, 3.4310772110582523`*^9}, { 3.4310773233586817`*^9, 3.431077476750231*^9}, {3.4310775116444817`*^9, 3.431077610179191*^9}, {3.4310776506521864`*^9, 3.4310777026303053`*^9}, { 3.431077752216975*^9, 3.431077809129348*^9}, {3.431077858011962*^9, 3.4310779028821363`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`x1$$ = -2.7394687939302997`, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`x1$$], (-2) Pi, 2 Pi}}, Typeset`size$$ = { 360., {115., 120.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x1$65563$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`x1$$ = (-2) Pi}, "ControllerVariables" :> { Hold[$CellContext`x1$$, $CellContext`x1$65563$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Plot[{ $CellContext`f[$CellContext`x], $CellContext`f[$CellContext`x1$$] + Derivative[ 1][$CellContext`f][$CellContext`x1$$] ($CellContext`x - \ $CellContext`x1$$), $CellContext`g[$CellContext`x], $CellContext`g[$CellContext`x1$$] + Derivative[ 1][$CellContext`g][$CellContext`x1$$] ($CellContext`x - \ $CellContext`x1$$), $CellContext`chain[$CellContext`x], \ $CellContext`chain[$CellContext`x1$$] + Derivative[ 1][$CellContext`chain][$CellContext`x1$$] ($CellContext`x - \ $CellContext`x1$$)}, {$CellContext`x, (-2) Pi, 2 Pi}, PlotRange -> {-2, 2}, Epilog -> { PointSize[0.025], Point[{$CellContext`x1$$, $CellContext`f[$CellContext`x1$$]}], Point[{$CellContext`x1$$, $CellContext`g[$CellContext`x1$$]}], Point[{$CellContext`x1$$, $CellContext`chain[$CellContext`x1$$]}]}], "Specifications" :> {{$CellContext`x1$$, (-2) Pi, 2 Pi}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{408., {159., 164.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.431076719122941*^9, 3.431076746562591*^9}, { 3.4310767917559876`*^9, 3.4310768395185556`*^9}, {3.431076883927822*^9, 3.431076978309477*^9}, {3.4310770908227835`*^9, 3.431077105965369*^9}, { 3.4310771919754887`*^9, 3.4310772116080217`*^9}, {3.4310773251905956`*^9, 3.4310774775304546`*^9}, {3.431077519966215*^9, 3.4310776106879473`*^9}, { 3.431077653016293*^9, 3.4310777031292963`*^9}, {3.431077757527182*^9, 3.431077809451593*^9}, {3.431077858466034*^9, 3.4310779037922344`*^9}}] }, Open ]] }, Open ]] }, WindowSize->{791, 670}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 109, 1, 83, "Title"], Cell[CellGroupData[{ Cell[724, 28, 3165, 87, 172, "Input"], Cell[3892, 117, 3092, 64, 392, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7021, 186, 131, 2, 31, "Input"], Cell[7155, 190, 3521, 75, 318, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10713, 270, 3311, 92, 192, "Input"], Cell[14027, 364, 2942, 58, 340, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)