(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 11734, 324] NotebookOptionsPosition[ 10901, 293] NotebookOutlinePosition[ 11240, 308] CellTagsIndexPosition[ 11197, 305] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ StyleBox[ RowBox[{ "Comparing", " ", "Functions", " ", "and", " ", "their", " ", "Taylor", " ", "Polynomials"}], "Subsection"]], "Input", CellChangeTimes->{{3.4616640279034643`*^9, 3.461664036283095*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"Log", "[", RowBox[{"1", " ", "+", " ", "x"}], "]"}]}]], "Input", CellChangeTimes->{{3.461664058461608*^9, 3.461664079549068*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"g1", "[", RowBox[{"x_", ",", "n_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f1", "[", "y", "]"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "n"}], "}"}]}], "]"}], "]"}], "/.", RowBox[{"y", " ", "\[Rule]", " ", "x"}]}]}]], "Input", CellChangeTimes->{{3.4616640871174994`*^9, 3.46166409909338*^9}, { 3.461664140777164*^9, 3.461664223132374*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"f2", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"Exp", "[", "x", "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g2", "[", RowBox[{"x_", ",", "n_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f2", "[", "y", "]"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "n"}], "}"}]}], "]"}], "]"}], "/.", RowBox[{"y", " ", "\[Rule]", " ", "x", " "}]}]}]}], "Input", CellChangeTimes->{{3.461664238584455*^9, 3.4616642803085413`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"f3", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"Sin", "[", "x", "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g3", "[", RowBox[{"x_", ",", "n_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"f3", "[", "y", "]"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "n"}], "}"}]}], "]"}], "]"}], "/.", RowBox[{"y", " ", "\[Rule]", " ", "x", " "}]}]}]}], "Input", CellChangeTimes->{{3.4616642927266827`*^9, 3.46166430229325*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Tooltip", "[", RowBox[{"{", RowBox[{ RowBox[{"f1", "[", "x", "]"}], ",", RowBox[{"g1", "[", RowBox[{"x", ",", "n"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "1.5"}], "}"}], ",", " ", RowBox[{"PlotRange", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1.5"}], "}"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", "Thick"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "8", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.461664326215847*^9, 3.461664457146393*^9}, { 3.461664496813868*^9, 3.461664502643857*^9}, {3.461664533127706*^9, 3.461664543669359*^9}, {3.461664695028853*^9, 3.461664699938673*^9}}], Cell[BoxData[ FormBox[ TagBox[ FormBox[ StyleBox[ DynamicModuleBox[{$CellContext`n$$ = 3, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`n$$], 1, 8, 1}}, Typeset`size$$ = { 360., {114., 118.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`n$1951$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, TraditionalForm, "Variables" :> {$CellContext`n$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`n$$, $CellContext`n$1951$$, 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[ Tooltip[{ $CellContext`f1[$CellContext`x], $CellContext`g1[$CellContext`x, $CellContext`n$$]}], \ {$CellContext`x, -1, 1.5}, PlotRange -> {-1, 1.5}, PlotStyle -> Thick], "Specifications" :> {{$CellContext`n$$, 1, 8, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{403., {157.40625, 163.59375}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], TraditionalForm], Manipulate`InterpretManipulate[1]], TraditionalForm]], "Output", CellChangeTimes->{3.461664701117979*^9}] }, Open ]], Cell[BoxData[ FormBox["", TraditionalForm]], "Input", CellChangeTimes->{{3.461664632530678*^9, 3.4616646325752373`*^9}}], Cell[BoxData[ FormBox["", TraditionalForm]], "Input", CellChangeTimes->{ 3.461664609817842*^9, {3.461664707469368*^9, 3.4616647665470743`*^9}}, EmphasizeSyntaxErrors->True], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Tooltip", "[", RowBox[{"{", RowBox[{ RowBox[{"f2", "[", "x", "]"}], ",", RowBox[{"g2", "[", RowBox[{"x", ",", "n"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "3"}], "}"}], ",", " ", RowBox[{"PlotRange", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"0", ",", "27"}], "}"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", "Thick"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "8", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.461664774510824*^9, 3.4616647981498137`*^9}}], Cell[BoxData[ FormBox[ TagBox[ FormBox[ StyleBox[ DynamicModuleBox[{$CellContext`n$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`n$$], 1, 8, 1}}, Typeset`size$$ = { 360., {116., 121.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`n$2095$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, TraditionalForm, "Variables" :> {$CellContext`n$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`n$$, $CellContext`n$2095$$, 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[ Tooltip[{ $CellContext`f2[$CellContext`x], $CellContext`g2[$CellContext`x, $CellContext`n$$]}], \ {$CellContext`x, -1, 3}, PlotRange -> {0, 27}, PlotStyle -> Thick], "Specifications" :> {{$CellContext`n$$, 1, 8, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{403., {160.40625, 166.59375}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], TraditionalForm], Manipulate`InterpretManipulate[1]], TraditionalForm]], "Output", CellChangeTimes->{3.46166480276414*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Tooltip", "[", RowBox[{"{", RowBox[{ RowBox[{"f3", "[", "x", "]"}], ",", RowBox[{"g3", "[", RowBox[{"x", ",", "n"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "Pi"}], ",", RowBox[{"4", " ", "Pi"}]}], "}"}], ",", " ", RowBox[{"PlotRange", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", "Thick"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "8", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.461664823616386*^9, 3.4616648426471367`*^9}}], Cell[BoxData[ FormBox[ TagBox[ FormBox[ StyleBox[ DynamicModuleBox[{$CellContext`n$$ = 8, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`n$$], 1, 8, 1}}, Typeset`size$$ = { 360., {115., 119.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`n$2547$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, TraditionalForm, "Variables" :> {$CellContext`n$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`n$$, $CellContext`n$2547$$, 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[ Tooltip[{ $CellContext`f3[$CellContext`x], $CellContext`g3[$CellContext`x, $CellContext`n$$]}], \ {$CellContext`x, -Pi, 4 Pi}, PlotRange -> {-1, 1}, PlotStyle -> Thick], "Specifications" :> {{$CellContext`n$$, 1, 8, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{403., {158.40625, 164.59375}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], TraditionalForm], Manipulate`InterpretManipulate[1]], TraditionalForm]], "Output", CellChangeTimes->{3.4616648504788*^9}] }, Open ]] }, WindowSize->{1158, 762}, WindowMargins->{{4, Automatic}, {Automatic, 4}}, FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (November 10, 2008)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 228, 5, 31, "Input"], Cell[776, 27, 220, 5, 27, "Input"], Cell[999, 34, 488, 13, 27, "Input"], Cell[1490, 49, 568, 15, 43, "Input"], Cell[2061, 66, 567, 15, 43, "Input"], Cell[CellGroupData[{ Cell[2653, 85, 907, 23, 27, "Input"], Cell[3563, 110, 1805, 38, 338, "Output"] }, Open ]], Cell[5383, 151, 122, 2, 27, InheritFromParent], Cell[5508, 155, 177, 4, 27, InheritFromParent], Cell[CellGroupData[{ Cell[5710, 163, 738, 20, 27, "Input"], Cell[6451, 185, 1800, 38, 344, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8288, 228, 791, 22, 27, "Input"], Cell[9082, 252, 1803, 38, 340, "Output"] }, Open ]] } ] *) (* End of internal cache information *)