Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

(* 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[ 32966, 888]
NotebookOptionsPosition[ 30024, 797]
NotebookOutlinePosition[ 30366, 812]
CellTagsIndexPosition[ 30323, 809]
WindowFrame->Normal
ContainsDynamic->False*)

(* Beginning of Notebook Content *)


Notebook[{

Cell[CellGroupData[{
Cell[TextData[{
"Solution of a non-linear algebraic equation using \nthe ",
"Wegstein Method",
StyleBox["\n",
FontWeight->"Plain",
FontVariations->{"CompatibilityType"->0}],
StyleBox["Author's Data",
FontSize->14,
FontWeight->"Bold"],
StyleBox[": ",
FontSize->14],
StyleBox["Housam BINOUS\nDepartment of Chemical Engineering\nNational \
Institute of Applied Sciences and Technology\nTunis, TUNISIA\nEmail: \
binoushousam@yahoo.com ",
FontSize->14,
FontWeight->"Plain"]
}], "Title",
CellChangeTimes->{{3.3993951467308655`*^9, 3.3993951488238754`*^9}, {
3.3993952263052883`*^9, 3.399395236469904*^9}, {3.3993953037867007`*^9,
3.3993953250372577`*^9}},
TextAlignment->Center,
FontSize->18,
Background->RGBColor[0.68751, 0.996109, 0.796887]],

Cell[CellGroupData[{

Cell["Solution of a non-linear algebraic equation using FindRoot", \


"Subsubtitle",
CellGroupingRules->{GroupTogetherGrouping, 10000.},
CellChangeTimes->{{3.3993952492082205`*^9, 3.399395298929717*^9},
3.3993954663204126`*^9},
Background->RGBColor[1., 1., 0.6588235294117647]],

Cell[BoxData[
RowBox[{"FindRoot", "[",
RowBox[{
RowBox[{
RowBox[{"Cos", "[",
RowBox[{"x", "+", "0.25"}], "]"}], "\[Equal]", " ",
RowBox[{
RowBox[{"2", " ",
RowBox[{"Exp", "[",
RowBox[{
RowBox[{"-", "x"}], "+", "1"}], "]"}]}], "-", "1"}]}], ",",
RowBox[{"{",
RowBox[{"x", ",", "5.5"}], "}"}]}], "]"}]], "Input",
CellGroupingRules->{GroupTogetherGrouping, 10000.},
CellChangeTimes->{{3.3992093690731916`*^9, 3.3992094556576943`*^9}, {
3.399209683555395*^9, 3.3992096844566913`*^9}, 3.3993954663204126`*^9}],

Cell[BoxData[
RowBox[{"{",
RowBox[{"x", "\[Rule]", "3.47904759491851`"}], "}"}]], "Output",
CellGroupingRules->{GroupTogetherGrouping, 10000.},
CellChangeTimes->{{3.3992093900633745`*^9, 3.3992094565990477`*^9},
3.399209592324211*^9, 3.399209685107627*^9, 3.3992099270555315`*^9,
3.399210009624259*^9, 3.3992100567219825`*^9, 3.3992103017242785`*^9,
3.399210913483946*^9, 3.399221283355088*^9, 3.399221703449154*^9,
3.399373635989939*^9, 3.399373731817733*^9, 3.3993954663204126`*^9}]
}, Closed]],

Cell[CellGroupData[{

Cell["\<\
Solution of a non-linear algebraic equation using the fixed point method\
\>", "Subsubtitle",
CellChangeTimes->{{3.3993952492082205`*^9, 3.399395298929717*^9}, {
3.3993953381561213`*^9, 3.39939534561685*^9}},
Background->RGBColor[1., 1., 0.6588235294117647]],

Cell[BoxData[
RowBox[{
RowBox[{"f", "[", "x_", "]"}], ":=",
RowBox[{"x", "-",
RowBox[{"(",
RowBox[{
RowBox[{"Cos", "[",
RowBox[{"x", "+", "0.25"}], "]"}], "-", " ",
RowBox[{"2", " ",
RowBox[{"Exp", "[",
RowBox[{
RowBox[{"-", "x"}], "+", "1"}], "]"}]}], "+", "1"}],
")"}]}]}]], "Input",
CellChangeTimes->{{3.3992095037067857`*^9, 3.399209524917285*^9}, {
3.399209605663392*^9, 3.399209606083997*^9}, {3.3992096496967087`*^9,
3.3992096501173134`*^9}, {3.399209724754637*^9, 3.3992097344385614`*^9}}],

Cell[BoxData[
RowBox[{
RowBox[{"i", "=", "0"}], ";",
RowBox[{
RowBox[{"x", "[", "0", "]"}], "=", "1.5"}], ";"}]], "Input",
CellChangeTimes->{{3.3992095512952147`*^9, 3.399209579095189*^9}, {
3.399209636307456*^9, 3.399209637759544*^9}, {3.3992096731704626`*^9,
3.399209674161888*^9}, {3.3992110474866323`*^9, 3.3992110480474386`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
RowBox[{"While", "[",
RowBox[{
RowBox[{"i", "<", "20"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"i", "+=", "1"}], ",",
RowBox[{
RowBox[{"x", "[", "i", "]"}], "=",
RowBox[{"f", "[",
RowBox[{"x", "[",
RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ",",
RowBox[{"Print", "[",
RowBox[{"i", ",", "\"\< \>\"", ",",
RowBox[{"x", "[", "i", "]"}]}], "]"}]}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.399209462958192*^9, 3.3992095001416593`*^9}, {
3.3992095387672*^9, 3.3992095477701454`*^9}, {3.399209628376051*^9,
3.3992096324118547`*^9}, {3.3992097465559855`*^9, 3.3992097478378286`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
InterpretationBox[
RowBox[{
"1", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"1.8913073750747589`"}],
SequenceForm[1, " ", 1.8913073750747589`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734101016*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"2", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"2.251608050280188`"}],
SequenceForm[2, " ", 2.251608050280188],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737341510878`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"3", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"2.625801908839891`"}],
SequenceForm[3, " ", 2.625801908839891],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.39937373420116*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"4", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"2.9841946712129683`"}],
SequenceForm[4, " ", 2.9841946712129683`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734251232*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"5", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.2548927578582476`"}],
SequenceForm[5, " ", 3.2548927578582476`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734301304*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"6", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.399391528075458`"}],
SequenceForm[6, " ", 3.399391528075458],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734351376*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"7", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.454754798872858`"}],
SequenceForm[7, " ", 3.454754798872858],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737344014482`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"8", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4720944923877366`"}],
SequenceForm[8, " ", 3.4720944923877366`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.39937373445152*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"9", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.477097781435284`"}],
SequenceForm[9, " ", 3.477097781435284],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737345015917`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4785040692011036`"}],
SequenceForm[10, " ", 3.4785040692011036`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737345516644`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"11", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4788963370437322`"}],
SequenceForm[11, " ", 3.4788963370437322`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734601736*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"12", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790055210583195`"}],
SequenceForm[12, " ", 3.4790055210583195`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734651808*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"13", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479035893188798`"}],
SequenceForm[13, " ", 3.479035893188798],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.39937373470188*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"14", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479044340510481`"}],
SequenceForm[14, " ", 3.479044340510481],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737347419376`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"15", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790466898331114`"}],
SequenceForm[15, " ", 3.4790466898331114`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737347819953`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"16", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047343205365`"}],
SequenceForm[16, " ", 3.479047343205365],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734822053*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"17", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047524914665`"}],
SequenceForm[17, " ", 3.479047524914665],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737348721247`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"18", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047575449772`"}],
SequenceForm[18, " ", 3.479047575449772],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737349121823`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"19", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475895040682`"}],
SequenceForm[19, " ", 3.4790475895040682`],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.3993737349422255`*^9}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"20", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047593412702`"}],
SequenceForm[20, " ", 3.479047593412702],
Editable->False]], "Print",
CellChangeTimes->{{3.399209639421934*^9, 3.399209701320941*^9}, {
3.3992097393255887`*^9, 3.399209758032488*^9}, 3.399209927396021*^9,
3.399210010295224*^9, 3.399210057483077*^9, 3.3992103042078495`*^9,
3.3992109142350254`*^9, 3.3992110498800735`*^9, 3.3992212896241026`*^9,
3.399221704110104*^9, 3.3993736385936832`*^9, 3.399373734982283*^9}]
}, Open ]]
}, Open ]],

Cell[BoxData[
RowBox[{
RowBox[{"tbl1", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"x", "[", "i", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "20"}], "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.3992103062407727`*^9, 3.3992103500237293`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["\<\
Solution of a non-linear algebraic equation using the wegstein method\
\>", "Subsubtitle",
CellChangeTimes->{{3.3993952492082205`*^9, 3.399395298929717*^9}, {
3.3993953381561213`*^9, 3.39939537440825*^9}},
Background->RGBColor[1., 1., 0.6588235294117647]],

Cell[BoxData[
RowBox[{
RowBox[{"i", "=", "0"}], ";",
RowBox[{
RowBox[{"x", "[", "0", "]"}], "=", "1.5"}], ";",
RowBox[{"q", "=",
RowBox[{"-", "0.5"}]}], ";"}]], "Input",
CellChangeTimes->{{3.39920987900644*^9, 3.399209881660256*^9}, {
3.399210154031907*^9, 3.399210163295227*^9}, {3.3992102076990767`*^9,
3.3992102120653553`*^9}, {3.3992103567333775`*^9, 3.399210390341704*^9}, {
3.3992105569412622`*^9, 3.3992105610071087`*^9}, {3.3992107670533886`*^9,
3.3992107762065506`*^9}, {3.3992109222365313`*^9, 3.399210937348261*^9}, {
3.3992213582527857`*^9, 3.399221366284334*^9}, {3.3992215084888144`*^9,
3.3992215098407583`*^9}, {3.3992221029936705`*^9, 3.399222122061088*^9}, {
3.3993736803637457`*^9, 3.399373764985426*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
RowBox[{"While", "[",
RowBox[{
RowBox[{"i", "<", "20"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"i", "+=", "1"}], ",",
RowBox[{
RowBox[{"x", "[", "i", "]"}], "=",
RowBox[{
RowBox[{"q", " ",
RowBox[{"x", "[",
RowBox[{"i", "-", "1"}], "]"}]}], "+",
RowBox[{
RowBox[{"(",
RowBox[{"1", "-", "q"}], ")"}], " ",
RowBox[{"f", "[",
RowBox[{"x", "[",
RowBox[{"i", "-", "1"}], "]"}], "]"}]}]}]}], ",",
RowBox[{"Print", "[",
RowBox[{"i", ",", "\"\< \>\"", ",",
RowBox[{"x", "[", "i", "]"}]}], "]"}]}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.399209809917094*^9, 3.3992099375806656`*^9}, {
3.3992099735223475`*^9, 3.399209976696912*^9}, {3.3992100210306606`*^9,
3.399210081257262*^9}, {3.399210628884712*^9, 3.399210641252496*^9}, {
3.399210679387331*^9, 3.3992107390531263`*^9}, {3.399210950076563*^9,
3.3992109508276434`*^9}, {3.3992215616953216`*^9, 3.3992215846783695`*^9}, {
3.399222112547408*^9, 3.399222130943861*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
InterpretationBox[
RowBox[{
"1", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"2.086961062612138`"}],
SequenceForm[1, " ", 2.086961062612138],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373766727931*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"2", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"2.6387455513210707`"}],
SequenceForm[2, " ", 2.6387455513210707`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737667679887`*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"3", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.1737223172312907`"}],
SequenceForm[3, " ", 3.1737223172312907`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373766818061*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"4", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4556795942393372`"}],
SequenceForm[4, " ", 3.4556795942393372`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737668681326`*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"5", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.480709855707204`"}],
SequenceForm[5, " ", 3.480709855707204],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373766918205*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"6", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.478908523315642`"}],
SequenceForm[6, " ", 3.478908523315642],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373766968277*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"7", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479059105371034`"}],
SequenceForm[7, " ", 3.479059105371034],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.39937376699832*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"8", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790466413759633`"}],
SequenceForm[8, " ", 3.4790466413759633`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767038378*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"9", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790476739054292`"}],
SequenceForm[9, " ", 3.4790476739054292`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767078435*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047588375569`"}],
SequenceForm[10, " ", 3.479047588375569],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767118493*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"11", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475954604996`"}],
SequenceForm[11, " ", 3.4790475954604996`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737671485357`*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"12", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047594873613`"}],
SequenceForm[12, " ", 3.479047594873613],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767188594*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"13", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475949222284`"}],
SequenceForm[13, " ", 3.4790475949222284`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767228651*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"14", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475949182023`"}],
SequenceForm[14, " ", 3.4790475949182023`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737672687087`*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"15", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475949185358`"}],
SequenceForm[15, " ", 3.4790475949185358`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767298752*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"16", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047594918508`"}],
SequenceForm[16, " ", 3.479047594918508],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737673388095`*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"17", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.479047594918511`"}],
SequenceForm[17, " ", 3.479047594918511],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767378867*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"18", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475949185105`"}],
SequenceForm[18, " ", 3.4790475949185105`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767418925*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"19", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.4790475949185096`"}],
SequenceForm[19, " ", 3.4790475949185096`],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.399373767448968*^9}}],

Cell[BoxData[
InterpretationBox[
RowBox[{
"20", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]",
"3.47904759491851`"}],
SequenceForm[20, " ", 3.47904759491851],
Editable->False]], "Print",
CellChangeTimes->{
3.399221591448104*^9, 3.399222132025416*^9, 3.3993736466152177`*^9, {
3.399373685501133*^9, 3.399373715053627*^9}, {3.39937374731001*^9,
3.3993737674890256`*^9}}]
}, Open ]]
}, Open ]],

Cell[BoxData[
RowBox[{
RowBox[{"tbl2", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"x", "[", "i", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "20"}], "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.3992103062407727`*^9, 3.3992103500237293`*^9}, {
3.39921082862192*^9, 3.3992108292628417`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Convergence is faster using the wegstein method (blue dots)", \


"Subsubtitle",
CellChangeTimes->{{3.3993952492082205`*^9, 3.399395298929717*^9}, {
3.3993953381561213`*^9, 3.39939534561685*^9}, {3.39939539835268*^9,
3.3993954403430595`*^9}},
Background->RGBColor[1., 1., 0.6588235294117647]],

Cell[CellGroupData[{

Cell[BoxData[
RowBox[{"ListPlot", "[",
RowBox[{
RowBox[{"{",
RowBox[{"tbl1", ",", "tbl2"}], "}"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"RGBColor", "[",
RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",",
RowBox[{"RGBColor", "[",
RowBox[{"0", ",", "0", ",", "1"}], "]"}]}], "}"}]}]}], "]"}]], "Input",\

CellChangeTimes->{{3.3992104275552144`*^9, 3.3992104892238894`*^9}, {
3.399222262893595*^9, 3.399222266939413*^9}}],

Cell[BoxData[
GraphicsBox[{{},
{RGBColor[1, 0, 0],
PointBox[{{0., 1.5}, {1., 1.8913073750747589`}, {2., 2.251608050280188}, {
3., 2.625801908839891}, {4., 2.9841946712129683`}, {5.,
3.2548927578582476`}, {6., 3.399391528075458}, {7., 3.454754798872858}, {
8., 3.4720944923877366`}, {9., 3.477097781435284}, {10.,
3.4785040692011036`}, {11., 3.4788963370437322`}, {12.,
3.4790055210583195`}, {13., 3.479035893188798}, {14.,
3.479044340510481}, {15., 3.4790466898331114`}, {16.,
3.479047343205365}, {17., 3.479047524914665}, {18., 3.479047575449772}, {
19., 3.4790475895040682`}, {20., 3.479047593412702}}]},
{RGBColor[0, 0, 1],
PointBox[{{0., 1.5}, {1., 2.086961062612138}, {2., 2.6387455513210707`}, {
3., 3.1737223172312907`}, {4., 3.4556795942393372`}, {5.,
3.480709855707204}, {6., 3.478908523315642}, {7., 3.479059105371034}, {
8., 3.4790466413759633`}, {9., 3.4790476739054292`}, {10.,
3.479047588375569}, {11., 3.4790475954604996`}, {12.,
3.479047594873613}, {13., 3.4790475949222284`}, {14.,
3.4790475949182023`}, {15., 3.4790475949185358`}, {16.,
3.479047594918508}, {17., 3.479047594918511}, {18.,
3.4790475949185105`}, {19., 3.4790475949185096`}, {20.,
3.47904759491851}}]}, {}},
AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
Axes->True,
AxesOrigin->{0, 1.5},
PlotRange->{{0., 20.}, {1.5, 3.480709855707204}},
PlotRangeClipping->True,
PlotRangePadding->{
Scaled[0.02],
Scaled[0.02]}]], "Output",
CellChangeTimes->{3.3992104900751133`*^9, 3.3992108712131634`*^9,
3.3992109841956244`*^9, 3.399211027578005*^9, 3.399211063639859*^9,
3.399222167206003*^9, 3.3992222695732*^9, 3.3993736540659313`*^9,
3.399373722554413*^9, 3.399373771655016*^9}]
}, Open ]]
}, Closed]]
}, Open ]]
},
WindowSize->{580, 527},
WindowMargins->{{48, Automatic}, {Automatic, 22}},
FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (April 20, 2007)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)


(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[590, 23, 766, 22, 244, "Title"],
Cell[CellGroupData[{
Cell[1381, 49, 283, 5, 44, "Subsubtitle",
CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[1667, 56, 568, 15, 31, "Input",
CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[2238, 73, 506, 8, 30, "Output",
CellGroupingRules->{GroupTogetherGrouping, 10000.}]
}, Closed]],
Cell[CellGroupData[{
Cell[2781, 86, 272, 5, 44, "Subsubtitle"],
Cell[3056, 93, 564, 15, 31, "Input"],
Cell[3623, 110, 349, 7, 31, "Input"],
Cell[CellGroupData[{
Cell[3997, 121, 676, 17, 31, "Input"],
Cell[CellGroupData[{
Cell[4698, 142, 572, 11, 23, "Print"],
Cell[5273, 155, 571, 11, 23, "Print"],
Cell[5847, 168, 568, 11, 23, "Print"],
Cell[6418, 181, 572, 11, 23, "Print"],
Cell[6993, 194, 572, 11, 23, "Print"],
Cell[7568, 207, 569, 11, 23, "Print"],
Cell[8140, 220, 571, 11, 23, "Print"],
Cell[8714, 233, 571, 11, 23, "Print"],
Cell[9288, 246, 571, 11, 23, "Print"],
Cell[9862, 259, 576, 11, 23, "Print"],
Cell[10441, 272, 574, 11, 23, "Print"],
Cell[11018, 285, 574, 11, 23, "Print"],
Cell[11595, 298, 570, 11, 23, "Print"],
Cell[12168, 311, 573, 11, 23, "Print"],
Cell[12744, 324, 576, 11, 23, "Print"],
Cell[13323, 337, 571, 11, 23, "Print"],
Cell[13897, 350, 573, 11, 23, "Print"],
Cell[14473, 363, 573, 11, 23, "Print"],
Cell[15049, 376, 576, 11, 23, "Print"],
Cell[15628, 389, 571, 11, 23, "Print"]
}, Open ]]
}, Open ]],
Cell[16226, 404, 348, 10, 31, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[16611, 419, 269, 5, 44, "Subsubtitle"],
Cell[16883, 426, 757, 14, 31, "Input"],
Cell[CellGroupData[{
Cell[17665, 444, 1087, 27, 52, "Input"],
Cell[CellGroupData[{
Cell[18777, 475, 399, 10, 23, "Print"],
Cell[19179, 487, 404, 10, 23, "Print"],
Cell[19586, 499, 402, 10, 23, "Print"],
Cell[19991, 511, 404, 10, 23, "Print"],
Cell[20398, 523, 399, 10, 23, "Print"],
Cell[20800, 535, 399, 10, 23, "Print"],
Cell[21202, 547, 398, 10, 23, "Print"],
Cell[21603, 559, 402, 10, 23, "Print"],
Cell[22008, 571, 402, 10, 23, "Print"],
Cell[22413, 583, 401, 10, 23, "Print"],
Cell[22817, 595, 406, 10, 23, "Print"],
Cell[23226, 607, 401, 10, 23, "Print"],
Cell[23630, 619, 404, 10, 23, "Print"],
Cell[24037, 631, 406, 10, 23, "Print"],
Cell[24446, 643, 404, 10, 23, "Print"],
Cell[24853, 655, 403, 10, 23, "Print"],
Cell[25259, 667, 401, 10, 23, "Print"],
Cell[25663, 679, 404, 10, 23, "Print"],
Cell[26070, 691, 404, 10, 23, "Print"],
Cell[26477, 703, 401, 10, 23, "Print"]
}, Open ]]
}, Open ]],
Cell[26905, 717, 398, 11, 31, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[27340, 733, 303, 5, 44, "Subsubtitle"],
Cell[CellGroupData[{
Cell[27668, 742, 503, 14, 52, "Input"],
Cell[28174, 758, 1810, 34, 247, "Output"]
}, Open ]]
}, Closed]]
}, Open ]]
}
]
*)
(* End of internal cache information *)

You might also like