(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 4924, 162] NotebookOptionsPosition[ 4307, 135] NotebookOutlinePosition[ 4645, 150] CellTagsIndexPosition[ 4602, 147] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Picard Iteration for solutions of initial value problems\ \>", "Title", CellChangeTimes->{{3.592130024445784*^9, 3.592130053060416*^9}}], Cell[CellGroupData[{ Cell["\<\ We seek the solution of an initial value problem y\[CloseCurlyQuote] = \ f(t,y), y(t0) = y0. \ \>", "Subsubsection", CellChangeTimes->{{3.592130070844843*^9, 3.592130129155674*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"t_", ",", "y_"}], "]"}], " ", "=", " ", "y"}], "\[IndentingNewLine]", RowBox[{"y0", " ", "=", " ", "1"}], "\[IndentingNewLine]", RowBox[{"t0", " ", "=", " ", "0"}]}]}]], "Input", CellChangeTimes->{{3.592129418389987*^9, 3.592129470661085*^9}, { 3.592129789970077*^9, 3.592129792498618*^9}, {3.592129893065578*^9, 3.592129901096983*^9}, {3.592130136319426*^9, 3.592130136847169*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Picard iteration gives us a way to take a `reasonable\[CloseCurlyQuote] guess \ y(t,n) (n is an integer that indexes our guesses) at a solution y(t) and \ improve it to a new (and hopefully better) guess y(t,n+1). The idea is to replace the given initial value problem by an equivalent \ integral equation of the general form y = T(y) and then set y( . , n+1) = \ T(y( . , n)). y(t,0) = y0 makes for a reasonable first guess.\ \>", "Subsubsection", CellChangeTimes->{{3.592130133547886*^9, 3.592130338250367*^9}, { 3.5921304446651373`*^9, 3.5921305825836897`*^9}, {3.592130671366598*^9, 3.592130690246113*^9}}], Cell[BoxData[{ RowBox[{"n", "=", "0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"y", "[", RowBox[{"t_", ",", "n"}], "]"}], " ", "=", " ", "y0"}], "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"y", "[", RowBox[{"t", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{"-", "4"}], ",", "4"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", "4"}], "}"}]}]}], "]"}]}], "Input", CellChangeTimes->{{3.592129528346964*^9, 3.5921295486921463`*^9}, { 3.592129623459865*^9, 3.592129664458996*^9}, {3.5921297480610037`*^9, 3.5921297527004957`*^9}, {3.592129803660302*^9, 3.592129807922926*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ And now we try to improve it by applying T.\ \>", "Subsubsection", CellChangeTimes->{{3.592130703413872*^9, 3.592130715414238*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"y", "[", RowBox[{"t_", ",", RowBox[{"n", "+", "1"}]}], "]"}], " ", "=", RowBox[{"y0", " ", "+", " ", RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"s", ",", RowBox[{"y", "[", RowBox[{"s", ",", "n"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"s", ",", "t0", ",", "t"}], "}"}]}], "]"}]}]}], ";"}], "\n", RowBox[{"n", "=", RowBox[{"n", "+", "1"}]}], "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"y", "[", RowBox[{"t", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"n", "-", "1"}], ",", "n"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{"-", "3"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "40"}], ",", "40"}], "}"}]}]}], "]"}]}], "Input", CellChangeTimes->{{3.592129552294855*^9, 3.592129626980625*^9}, { 3.592129689808189*^9, 3.592129695148773*^9}, {3.592129732813834*^9, 3.59212973994135*^9}, {3.5921298137895737`*^9, 3.592129873564591*^9}, { 3.592129909428672*^9, 3.592129947763783*^9}}] }, Open ]] }, Open ]] }, WindowSize->{740, 867}, WindowMargins->{{Automatic, 381}, {-39, Automatic}}, FrontEndVersion->"9.0 for Linux x86 (64-bit) (February 7, 2013)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 147, 3, 150, "Title"], Cell[CellGroupData[{ Cell[751, 29, 193, 4, 59, "Subsubsection"], Cell[947, 35, 507, 11, 99, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[1491, 51, 632, 13, 251, "Subsubsection"], Cell[2126, 66, 720, 19, 77, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[2883, 90, 142, 3, 35, "Subsubsection"], Cell[3028, 95, 1251, 36, 77, "Input"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)