Cell[CellGroupData[{Cell[BoxData[ RowBox[{ "Manipulate", "[", " ", " ", RowBox[{ RowBox[{ RowBox[{"checkfcn", "=", RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], "===", RowBox[{"Log", "[", RowBox[{"1", "+", "x"}], "]"}]}], "]"}]}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"checkfcn", "&&", RowBox[{"(", RowBox[{"xpt", "<=", RowBox[{"-", "1"}]}], ")"}]}], ",", RowBox[{"xpt", "=", RowBox[{"-", "0.9999"}]}]}], "]"}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"checkfcn", "&&", RowBox[{"(", RowBox[{ RowBox[{"errx", "<=", RowBox[{"-", "1"}]}], "||", RowBox[{"xpt", "<=", RowBox[{"-", "1"}]}]}], ")"}]}], ",", RowBox[{"xpt", "=", RowBox[{"-", "0.9999"}]}]}], "]"}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"errx", "<", RowBox[{"-", "xmax"}]}], ",", RowBox[{"errx", "=", RowBox[{"-", "xmax"}]}]}], "]"}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"errx", ">", "xmax"}], ",", RowBox[{"errx", "=", "xmax"}]}], "]"}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"xpt", "<", RowBox[{"-", "xmax"}]}], ",", RowBox[{"xpt", "=", RowBox[{"-", "xmax"}]}]}], "]"}], ";", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"xpt", ">", "xmax"}], ",", RowBox[{"xpt", "=", "xmax"}]}], "]"}], ";", " ", RowBox[{"Switch", "[", RowBox[{"opts", ",", "1", ",", RowBox[{ RowBox[{"showpoly", "=", "True"}], ";", RowBox[{"showerror", "=", "False"}]}], ",", "2", ",", RowBox[{ RowBox[{"showpoly", "=", "False"}], ";", RowBox[{"showerror", "=", "True"}]}], ",", "3", ",", RowBox[{ RowBox[{"showpoly", "=", "False"}], ";", RowBox[{"showerror", "=", "False"}]}]}], "]"}], ";", " ", " ", RowBox[{"graphlist", "=", RowBox[{"Evaluate", "@", RowBox[{"Intersection", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "xpt", ",", "n"}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "terms"}], "}"}]}], "]"}], "]"}]}]}], ";", " ", RowBox[{"T", "=", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", "x", "}"}], ",", RowBox[{"Evaluate", "@", RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "xpt", ",", "terms"}], "}"}]}], "]"}], "]"}]}]}], "]"}]}], ";", " ", " ", RowBox[{"Pane", "[", " ", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", " ", RowBox[{"Column", "[", RowBox[{ RowBox[{"{", " ", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "\"\<(\>\"", ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "\"\<) = \>\"", ",", RowBox[{"ToString", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", "TraditionalForm"}], "]"}]}], "}"}], "]"}], ",", "20", ",", "Red"}], "]"}]}], " ", "}"}], "]"}], ",", " ", " ", RowBox[{"Dynamic", "@", RowBox[{"Item", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"maingraph", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"PlotStyle", "->", "Red"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "ymax"}], ",", "ymax"}], "}"}]}], "}"}]}]}], "]"}]}], ",", " ", RowBox[{"If", "[", RowBox[{"showall", ",", RowBox[{"Plot", "[", RowBox[{"graphlist", ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "ymax"}], ",", "ymax"}], "}"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", "}"}]}], "]"}], ",", " ", RowBox[{"Plot", "[", RowBox[{ RowBox[{"Last", "[", "graphlist", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "ymax"}], ",", "ymax"}], "}"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "->", "Black"}]}], "]"}], ",", " ", RowBox[{"Graphics", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"If", "[", RowBox[{"showerror", ",", RowBox[{"{", RowBox[{ RowBox[{"Darker", "[", RowBox[{"Green", ",", "0.3"}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.02", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"errx", ",", RowBox[{"T", "[", "errx", "]"}]}], "}"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.02", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"errx", ",", RowBox[{"f", "[", "errx", "]"}]}], "}"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"errx", ",", RowBox[{"T", "[", "errx", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"errx", ",", RowBox[{"f", "[", "errx", "]"}]}], "}"}]}], "}"}], "]"}], "}"}]}], " ", "}"}]}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"Purple", ",", RowBox[{"PointSize", "[", "0.02", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"xpt", ",", RowBox[{"f", "[", "xpt", "]"}]}], "}"}], "]"}]}], "}"}]}], " ", "}"}], "]"}], ",", " ", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"450", ",", "250"}], "}"}]}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "ymax"}], ",", "ymax"}], "}"}]}], "}"}]}], ",", RowBox[{"ImagePadding", "->", "20"}], ",", RowBox[{"AspectRatio", "->", RowBox[{"250", "/", "450"}]}]}], "]"}], ",", " ", RowBox[{"ItemSize", "->", RowBox[{"{", RowBox[{"Automatic", ",", "25"}], "}"}]}]}], "]"}]}], ",", " ", " ", RowBox[{"Item", "[", RowBox[{ RowBox[{"If", "[", RowBox[{"showerror", ",", " ", RowBox[{"Column", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"Dynamic", "@", RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "\"\<(\>\"", ",", "errx", ",", "\"\<) = \>\"", ",", RowBox[{"TraditionalForm", "@", RowBox[{"f", "[", "errx", "]"}]}]}], "}"}], "]"}], ",", " ", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Subscript", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "terms"}], "]"}], ",", "\"\<(\>\"", ",", "errx", ",", "\"\<) = \>\"", ",", RowBox[{"T", "[", "errx", "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"TraditionalForm", "[", RowBox[{ RowBox[{"f", "[", "errx", "]"}], "-", RowBox[{"T", "[", "errx", "]"}]}], "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Style", "[", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\<|error| = \>\"", ",", RowBox[{"N", "@", RowBox[{"Abs", "[", RowBox[{ RowBox[{"f", "[", "errx", "]"}], "-", RowBox[{"T", "[", "errx", "]"}]}], "]"}]}]}], "}"}], "]"}], ",", "16", ",", "Bold"}], "]"}]}], " ", "}"}], "]"}], ",", "14", ",", RowBox[{"Darker", "[", RowBox[{"Green", ",", "0.5"}], "]"}]}], "]"}]}]}], ",", " ", RowBox[{"If", "[", RowBox[{"showerror", ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "\"\\"", ",", "10"}], "]"}], ",", RowBox[{"If", "[", RowBox[{"checkfcn", ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"errx", ",", "0"}], "}"}], ",", RowBox[{"-", "0.9999"}], ",", "xmax"}], "}"}], "]"}], ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"errx", ",", "0"}], "}"}], ",", RowBox[{"-", "xmax"}], ",", "xmax"}], "}"}], "]"}]}], "]"}]}], "}"}], "]"}], ",", "\"\<\>\""}], "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"If", "[", RowBox[{"showpoly", ",", " ", RowBox[{"Pane", "[", RowBox[{ RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Subscript", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "terms"}], "]"}], ",", "\"\<(\>\"", ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}], ",", "\"\<) = \>\"", ",", RowBox[{ RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "xpt", ",", "terms"}], "}"}]}], "]"}], "]"}], "/.", RowBox[{"x", "->", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}]}]}]}], "}"}], "]"}], ",", "12"}], "]"}]}], ",", "400"}], "]"}], ",", "\"\<\>\""}], "]"}]}], "]"}], ",", RowBox[{"ItemSize", "->", RowBox[{"{", RowBox[{"Automatic", ",", "11"}], "}"}]}]}], "]"}]}], " ", " ", "}"}], ",", RowBox[{"Alignment", "->", "Top"}]}], "]"}], " ", "}"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"525", ",", "405"}], "}"}], ",", RowBox[{"Alignment", "->", "Center"}]}], "]"}]}], ",", " ", " ", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"Pane", "[", RowBox[{ RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", " ", RowBox[{ RowBox[{"{", RowBox[{ "\"\\"", ",", " ", RowBox[{ "PaneSelector", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"True", "->", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xpt", ",", "0"}], "}"}], ",", RowBox[{"-", "0.9999"}], ",", "xmax", ",", RowBox[{ "Appearance", "->", "\"\\""}], ",", RowBox[{"ImageSize", "->", "Tiny"}]}], "}"}], "]"}]}], ",", " ", RowBox[{"False", "->", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xpt", ",", "0"}], "}"}], ",", RowBox[{"-", "xmax"}], ",", "xmax", ",", RowBox[{ "Appearance", "->", "\"\\""}], ",", RowBox[{"ImageSize", "->", "Tiny"}]}], "}"}], "]"}]}]}], "}"}], ",", " ", RowBox[{"Dynamic", "[", "checkfcn", "]"}]}], " ", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"terms", ",", "2"}], "}"}], ",", "0", ",", "10", ",", "1", ",", RowBox[{ "Appearance", "->", "\"\\""}], ",", RowBox[{"ImageSize", "->", "Tiny"}]}], "}"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xmax", ",", "10"}], "}"}], ",", "1.01", ",", "20", ",", RowBox[{ "Appearance", "->", "\"\\""}], ",", RowBox[{"ImageSize", "->", "Tiny"}]}], "}"}], "]"}]}], "}"}]}], " ", " ", "}"}], ",", RowBox[{"Alignment", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"Right", ",", "Left"}], "}"}], ",", "Center"}], "}"}]}]}], "]"}], ",", "300"}], "]"}], ",", " ", RowBox[{"Column", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"PopupMenu", "[", RowBox[{ RowBox[{"Dynamic", "[", "f", "]"}], ",", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"MapAt", "[", RowBox[{"TraditionalForm", ",", "#", ",", "2"}], "]"}], "&"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"Cos", "->", RowBox[{"Cos", "[", "x", "]"}]}], ",", RowBox[{"Sin", "->", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"Tan", "->", RowBox[{"Tan", "[", "x", "]"}]}], ",", RowBox[{"Exp", "->", RowBox[{"Exp", "[", "x", "]"}]}], ",", RowBox[{"ArcTan", "->", RowBox[{"ArcTan", "[", "x", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"Log", "[", RowBox[{"1", "+", "#"}], "]"}], "&"}], "->", RowBox[{"Log", "[", RowBox[{"1", "+", "x"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{"#", "+", "1"}], ")"}]}], "&"}], "->", RowBox[{"1", "/", RowBox[{"(", RowBox[{"x", "+", "1"}], ")"}]}]}]}], "}"}]}], "]"}]}], "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"showall", ",", "True"}], "}"}], ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"Control", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"opts", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"1", "->", "\"\< polynomial \>\""}], ",", RowBox[{"2", "->", "\"\< error \>\""}], ",", RowBox[{"3", "->", "\"\< neither\>\""}]}], "}"}], ",", RowBox[{ "ControlType", "->", "RadioButtonBar"}]}], "}"}], "]"}]}], "}"}], "]"}]}], " ", "}"}], "]"}]}], " ", "}"}], "}"}], ",", RowBox[{"Dividers", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"False", ",", "Gray", ",", "False"}], "}"}], ",", "None"}], "}"}]}], ",", RowBox[{"Spacings", "->", RowBox[{"{", RowBox[{"1", ",", "Automatic"}], "}"}]}]}], "]"}], "}"}], "]"}], ",", " ", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"f", ",", "Cos", ",", "\"\\""}], "}"}], ",", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"MapAt", "[", RowBox[{"TraditionalForm", ",", "#", ",", "2"}], "]"}], "&"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"Cos", "->", RowBox[{"Cos", "[", "x", "]"}]}], ",", RowBox[{"Sin", "->", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"Tan", "->", RowBox[{"Tan", "[", "x", "]"}]}], ",", RowBox[{"Exp", "->", RowBox[{"Exp", "[", "x", "]"}]}], ",", RowBox[{"ArcTan", "->", RowBox[{"ArcTan", "[", "x", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"Log", "[", RowBox[{"1", "+", "#"}], "]"}], "&"}], "->", RowBox[{"Log", "[", RowBox[{"1", "+", "x"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{"#", "+", "1"}], ")"}]}], "&"}], "->", RowBox[{"1", "/", RowBox[{"(", RowBox[{"x", "+", "1"}], ")"}]}]}]}], "}"}]}], "]"}], ",", "None"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"ymax", ",", "3", ",", "\"\\""}], "}"}], ",", "1", ",", "20", ",", "VerticalSlider", ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"graphlist", ",", RowBox[{"{", "1", "}"}]}], "}"}], ",", RowBox[{"ControlType", "->", "None"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"T", ",", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", "x", "}"}], ",", "1"}], "]"}]}], "}"}], ",", RowBox[{"ControlType", "->", "None"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"checkfcn", ",", "False"}], "}"}], ",", RowBox[{"ControlType", "->", "None"}]}], "}"}], ",", " ", RowBox[{"AutorunSequencing", "->", RowBox[{"{", RowBox[{"1", ",", "5", ",", "6"}], "}"}]}], ",", RowBox[{"TrackedSymbols", "->", "True"}]}], " ", "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.35696210375764*^9, 3.432832656847*^9, {3.432833304993*^9, 3.4328333094639997`*^9}, {3.4328334649519997`*^9, 3.432833476442*^9}, {3.432833575516*^9, 3.432833575775*^9}, 3.432833806816*^9, {3.432833866705*^9, 3.432833866986*^9}, 3.4328339042060003`*^9, 3.432833959049*^9, {3.432833989675*^9, 3.432833994403*^9}, {3.4329144884497585`*^9, 3.4329145050134144`*^9}, {3.4329145398568983`*^9, 3.4329145482377367`*^9}, {3.4329145934532576`*^9, 3.4329147499149017`*^9}, {3.4329147916200724`*^9, 3.432914847542664*^9}, {3.4329148901769266`*^9, 3.432914892681177*^9}, {3.433098388440997*^9, 3.433098397862932*^9}, 3.433098760474628*^9, {3.433098844631417*^9, 3.4330988464439287`*^9}, {3.433098927225695*^9, 3.43309893814764*^9}, {3.4330989726791115`*^9, 3.4330989744291224`*^9}, {3.433099227305741*^9, 3.433099263493472*^9}, {3.4331735898306866`*^9, 3.4331736253652396`*^9}, {3.433173675756278*^9, 3.4331736919018927`*^9}, {3.433173730315734*^9, 3.433173783759077*^9}, {3.433173813819083*^9, 3.433173817076409*^9}, {3.4331741313528333`*^9, 3.433174139974695*^9}, {3.4331744437660713`*^9, 3.433174477442439*^9}, 3.433193362874176*^9, {3.433194203515625*^9, 3.4331942035625*^9}, {3.433194249140625*^9, 3.433194249703125*^9}, {3.43319430909375*^9, 3.433194344921875*^9}, {3.43319444225*^9, 3.43319446959375*^9}, { 3.43319508490625*^9, 3.433195085296875*^9}, {3.433195741484375*^9, 3.4331957510625*^9}, {3.433201278484375*^9, 3.433201279265625*^9}, 3.433260818453125*^9, 3.433263036578125*^9, 3.433264913625*^9, { 3.433534265591961*^9, 3.4335342696543665`*^9}, 3.4337155280625*^9, {3.43371577021875*^9, 3.433715781*^9}, { 3.5067835993772173`*^9, 3.50678395553883*^9}, { 3.5067839883871145`*^9, 3.5067840421134863`*^9}, { 3.506784096142889*^9, 3.5067841103883133`*^9}, 3.759780372534802*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`checkfcn$$ = False, $CellContext`f$$ = Cos, $CellContext`graphlist$$ = { 1, 1 + Rational[-1, 2] $CellContext`x^2}, $CellContext`opts$$ = 1, $CellContext`showall$$ = True, $CellContext`T$$ = Function[{$CellContext`x$}, 1 + Rational[-1, 2] $CellContext`x$^2], $CellContext`terms$$ = 2, $CellContext`xmax$$ = 10, $CellContext`xpt$$ = 0, $CellContext`ymax$$ = 3, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`xpt$$], 0}, -0.9999, Dynamic[$CellContext`xmax$$]}, {{ Hold[$CellContext`xpt$$], 0}, Dynamic[-$CellContext`xmax$$], Dynamic[$CellContext`xmax$$]}, {{ Hold[$CellContext`terms$$], 2}, 0, 10, 1}, {{ Hold[$CellContext`xmax$$], 10}, 1.01, 20}, {{ Hold[$CellContext`showall$$], True}, {True, False}}, {{ Hold[$CellContext`opts$$], 1}, { 1 -> " polynomial ", 2 -> " error ", 3 -> " neither"}}, { Hold[ Row[{ Grid[{{ Pane[ Grid[{{"expansion point", PaneSelector[{ True -> Manipulate`Place[1], False -> Manipulate`Place[2]}, Dynamic[$CellContext`checkfcn$$]]}, { "terms (highest degree)", Manipulate`Place[3]}, {"x axis", Manipulate`Place[4]}}, Alignment -> {{Right, Left}, Center}], 300], Column[{ Row[{"f(x) = ", PopupMenu[ Dynamic[$CellContext`f$$], {Cos -> TraditionalForm[ Cos[$CellContext`x]], Sin -> TraditionalForm[ Sin[$CellContext`x]], Tan -> TraditionalForm[ Tan[$CellContext`x]], Exp -> TraditionalForm[E^$CellContext`x], ArcTan -> TraditionalForm[ ArcTan[$CellContext`x]], (Log[1 + #]& ) -> TraditionalForm[ Log[1 + $CellContext`x]], (1/(# + 1)& ) -> TraditionalForm[(1 + $CellContext`x)^(-1)]}]}], Row[{"graph all polynomials ", Manipulate`Place[5]}], Row[{"show ", Manipulate`Place[6]}]}]}}, Dividers -> {{False, GrayLevel[0.5], False}, None}, Spacings -> {1, Automatic}]}]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`f$$], Cos, "f(x) ="}, {Cos -> TraditionalForm[ Cos[$CellContext`x]], Sin -> TraditionalForm[ Sin[$CellContext`x]], Tan -> TraditionalForm[ Tan[$CellContext`x]], Exp -> TraditionalForm[E^$CellContext`x], ArcTan -> TraditionalForm[ ArcTan[$CellContext`x]], (Log[1 + #]& ) -> TraditionalForm[ Log[1 + $CellContext`x]], (1/(# + 1)& ) -> TraditionalForm[(1 + $CellContext`x)^(-1)]}}, {{ Hold[$CellContext`ymax$$], 3, "y axis"}, 1, 20}, {{ Hold[$CellContext`graphlist$$], { 1, 1 + Rational[-1, 2] $CellContext`x^2}}}, {{ Hold[$CellContext`T$$], Function[{$CellContext`x$}, 1 + Rational[-1, 2] $CellContext`x$^2]}}, {{ Hold[$CellContext`checkfcn$$], False}}}, Typeset`size$$ = { 525., {200., 205.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`xpt$29945$$ = 0, $CellContext`terms$29946$$ = 0, $CellContext`xmax$29947$$ = 0, $CellContext`showall$29948$$ = False, $CellContext`opts$29949$$ = False, $CellContext`f$29950$$ = False, $CellContext`ymax$29951$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 2, StandardForm, "Variables" :> {$CellContext`checkfcn$$ = False, $CellContext`f$$ = Cos, $CellContext`graphlist$$ = { 1, 1 + Rational[-1, 2] $CellContext`x^2}, $CellContext`opts$$ = 1, $CellContext`showall$$ = True, $CellContext`T$$ = Function[{$CellContext`x$}, 1 + Rational[-1, 2] $CellContext`x$^2], $CellContext`terms$$ = 2, $CellContext`xmax$$ = 10, $CellContext`xpt$$ = 0, $CellContext`ymax$$ = 3}, "ControllerVariables" :> { Hold[$CellContext`xpt$$, $CellContext`xpt$29945$$, 0], Hold[$CellContext`terms$$, $CellContext`terms$29946$$, 0], Hold[$CellContext`xmax$$, $CellContext`xmax$29947$$, 0], Hold[$CellContext`showall$$, $CellContext`showall$29948$$, False], Hold[$CellContext`opts$$, $CellContext`opts$29949$$, False], Hold[$CellContext`f$$, $CellContext`f$29950$$, False], Hold[$CellContext`ymax$$, $CellContext`ymax$29951$$, 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" :> ($CellContext`checkfcn$$ = TrueQ[$CellContext`f$$[$CellContext`x] === Log[1 + $CellContext`x]]; If[ And[$CellContext`checkfcn$$, $CellContext`xpt$$ <= -1], \ $CellContext`xpt$$ = -0.9999]; If[ And[$CellContext`checkfcn$$, Or[$CellContext`errx <= -1, $CellContext`xpt$$ <= -1]], \ $CellContext`xpt$$ = -0.9999]; If[$CellContext`errx < -$CellContext`xmax$$, $CellContext`errx = \ -$CellContext`xmax$$]; If[$CellContext`errx > $CellContext`xmax$$, $CellContext`errx = \ $CellContext`xmax$$]; If[$CellContext`xpt$$ < -$CellContext`xmax$$, \ $CellContext`xpt$$ = -$CellContext`xmax$$]; If[$CellContext`xpt$$ > $CellContext`xmax$$, \ $CellContext`xpt$$ = $CellContext`xmax$$]; Switch[$CellContext`opts$$, 1, $CellContext`showpoly = True; $CellContext`showerror = False, 2, $CellContext`showpoly = False; $CellContext`showerror = True, 3, $CellContext`showpoly = False; $CellContext`showerror = False]; $CellContext`graphlist$$ = Evaluate[ Intersection[ Table[ Normal[ Series[ $CellContext`f$$[$CellContext`x], {$CellContext`x, \ $CellContext`xpt$$, $CellContext`n}]], {$CellContext`n, 0, $CellContext`terms$$}]]]; $CellContext`T$$ = Function[{$CellContext`x$}, Evaluate[ Normal[ Series[ $CellContext`f$$[$CellContext`x$], {$CellContext`x$, \ $CellContext`xpt$$, $CellContext`terms$$}]]]]; Pane[ Column[{ Column[{ Row[{ Text[ Style[ Row[{ Style["f", Italic], "(", Style["x", Italic], ") = ", ToString[ $CellContext`f$$[$CellContext`x], TraditionalForm]}], 20, Red]]}], Dynamic[ Item[ Show[$CellContext`maingraph = Plot[ $CellContext`f$$[$CellContext`x], {$CellContext`x, \ -$CellContext`xmax$$, $CellContext`xmax$$}, PlotStyle -> Red, PlotRange -> {{-$CellContext`xmax$$, \ $CellContext`xmax$$}, {-$CellContext`ymax$$, $CellContext`ymax$$}}], If[$CellContext`showall$$, Plot[$CellContext`graphlist$$, {$CellContext`x, \ -$CellContext`xmax$$, $CellContext`xmax$$}, PlotRange -> {{-$CellContext`xmax$$, \ $CellContext`xmax$$}, {-$CellContext`ymax$$, $CellContext`ymax$$}}], \ {}], Plot[ Last[$CellContext`graphlist$$], {$CellContext`x, \ -$CellContext`xmax$$, $CellContext`xmax$$}, PlotRange -> {{-$CellContext`xmax$$, \ $CellContext`xmax$$}, {-$CellContext`ymax$$, $CellContext`ymax$$}}, PlotStyle -> Black], Graphics[{ If[$CellContext`showerror, { Darker[Green, 0.3], {{ PointSize[0.02], Point[{$CellContext`errx, $CellContext`T$$[$CellContext`errx]}]}, { PointSize[0.02], Point[{$CellContext`errx, $CellContext`f$$[$CellContext`errx]}]}, { Line[{{$CellContext`errx, $CellContext`T$$[$CellContext`errx]}, \ {$CellContext`errx, $CellContext`f$$[$CellContext`errx]}}]}}}, {}], { Purple, PointSize[0.02], Point[{$CellContext`xpt$$, $CellContext`f$$[$CellContext`xpt$$]}]}}], ImageSize -> {450, 250}, PlotRange -> {{-$CellContext`xmax$$, \ $CellContext`xmax$$}, {-$CellContext`ymax$$, $CellContext`ymax$$}}, ImagePadding -> 20, AspectRatio -> 250/450], ItemSize -> {Automatic, 25}]], Item[ If[$CellContext`showerror, Column[{ Dynamic[ Text[ Style[ Column[{ Row[{ Style["f", Italic], "(", $CellContext`errx, ") = ", TraditionalForm[ $CellContext`f$$[$CellContext`errx]]}], Row[{ Subscript[ Style["T", Italic], $CellContext`terms$$], "(", $CellContext`errx, ") = ", $CellContext`T$$[$CellContext`errx]}], Row[{"error = ", TraditionalForm[$CellContext`f$$[$CellContext`\ errx] - $CellContext`T$$[$CellContext`errx]]}], Style[ Row[{"|error| = ", N[ Abs[$CellContext`f$$[$CellContext`errx] - \ $CellContext`T$$[$CellContext`errx]]]}], 16, Bold]}], 14, Darker[Green, 0.5]]]], If[$CellContext`showerror, Row[{ Style["error point ", "Label", 10], If[$CellContext`checkfcn$$, Control[{{$CellContext`errx, 0}, -0.9999, $CellContext`xmax$$}], Control[{{$CellContext`errx, 0}, -$CellContext`xmax$$, \ $CellContext`xmax$$}]]}], ""]}], If[$CellContext`showpoly, Pane[ Text[ Style[ Row[{ Subscript[ Style["T", Italic], $CellContext`terms$$], "(", Style["x", Italic], ") = ", ReplaceAll[ Normal[ Series[ $CellContext`f$$[$CellContext`x], \ {$CellContext`x, $CellContext`xpt$$, $CellContext`terms$$}]], \ $CellContext`x -> Style["x", Italic]]}], 12]], 400], ""]], ItemSize -> {Automatic, 11}]}, Alignment -> Top]}], { 525, 405}, Alignment -> Center]), "Specifications" :> {{{$CellContext`xpt$$, 0}, -0.9999, Dynamic[$CellContext`xmax$$], Appearance -> "Labeled", ImageSize -> Tiny, ControlPlacement -> 1}, {{$CellContext`xpt$$, 0}, Dynamic[-$CellContext`xmax$$], Dynamic[$CellContext`xmax$$], Appearance -> "Labeled", ImageSize -> Tiny, ControlPlacement -> 2}, {{$CellContext`terms$$, 2}, 0, 10, 1, Appearance -> "Labeled", ImageSize -> Tiny, ControlPlacement -> 3}, {{$CellContext`xmax$$, 10}, 1.01, 20, Appearance -> "Labeled", ImageSize -> Tiny, ControlPlacement -> 4}, {{$CellContext`showall$$, True}, {True, False}, ControlPlacement -> 5}, {{$CellContext`opts$$, 1}, { 1 -> " polynomial ", 2 -> " error ", 3 -> " neither"}, ControlType -> RadioButtonBar, ControlPlacement -> 6}, Row[{ Grid[{{ Pane[ Grid[{{"expansion point", PaneSelector[{ True -> Manipulate`Place[1], False -> Manipulate`Place[2]}, Dynamic[$CellContext`checkfcn$$]]}, { "terms (highest degree)", Manipulate`Place[3]}, {"x axis", Manipulate`Place[4]}}, Alignment -> {{Right, Left}, Center}], 300], Column[{ Row[{"f(x) = ", PopupMenu[ Dynamic[$CellContext`f$$], {Cos -> TraditionalForm[ Cos[$CellContext`x]], Sin -> TraditionalForm[ Sin[$CellContext`x]], Tan -> TraditionalForm[ Tan[$CellContext`x]], Exp -> TraditionalForm[E^$CellContext`x], ArcTan -> TraditionalForm[ ArcTan[$CellContext`x]], (Log[1 + #]& ) -> TraditionalForm[ Log[1 + $CellContext`x]], (1/(# + 1)& ) -> TraditionalForm[(1 + $CellContext`x)^(-1)]}]}], Row[{"graph all polynomials ", Manipulate`Place[5]}], Row[{"show ", Manipulate`Place[6]}]}]}}, Dividers -> {{False, GrayLevel[0.5], False}, None}, Spacings -> {1, Automatic}]}], {{$CellContext`f$$, Cos, "f(x) ="}, {Cos -> TraditionalForm[ Cos[$CellContext`x]], Sin -> TraditionalForm[ Sin[$CellContext`x]], Tan -> TraditionalForm[ Tan[$CellContext`x]], Exp -> TraditionalForm[E^$CellContext`x], ArcTan -> TraditionalForm[ ArcTan[$CellContext`x]], (Log[1 + #]& ) -> TraditionalForm[ Log[1 + $CellContext`x]], (1/(# + 1)& ) -> TraditionalForm[(1 + $CellContext`x)^(-1)]}, ControlType -> None}, {{$CellContext`ymax$$, 3, "y axis"}, 1, 20, ControlType -> VerticalSlider, ControlPlacement -> Left}, {{$CellContext`graphlist$$, { 1, 1 + Rational[-1, 2] $CellContext`x^2}}, ControlType -> None}, {{$CellContext`T$$, Function[{$CellContext`x$}, 1 + Rational[-1, 2] $CellContext`x$^2]}, ControlType -> None}, {{$CellContext`checkfcn$$, False}, ControlType -> None}}, "Options" :> { AutorunSequencing -> {1, 5, 6}, TrackedSymbols -> True}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{626., {272., 278.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.759780372535199*^9}, CellID->1044046] }, {2}]]