(* 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[ 35778, 997] NotebookOptionsPosition[ 33929, 931] NotebookOutlinePosition[ 34272, 946] CellTagsIndexPosition[ 34229, 943] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["3A7 Assignment 1", "Title", CellChangeTimes->{{3.5921058831347704`*^9, 3.592105914553714*^9}}], Cell["Mark Lawrenson -20934034", "Subtitle", CellChangeTimes->{{3.592105922163705*^9, 3.5921059252000513`*^9}}], Cell[TextData[{ "Considering the map:\n", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["x", RowBox[{"n", "+", "1"}]], "=", RowBox[{"\[Alpha]", " ", SuperscriptBox[ RowBox[{ SubscriptBox["x", "n"], "(", RowBox[{"1", "-", SubscriptBox["x", "n"]}], ")"}], "2"]}]}], TraditionalForm]], FormatType->"TraditionalForm"] }], "Text", CellChangeTimes->{{3.5921059453635826`*^9, 3.592105973622161*^9}}], Cell[CellGroupData[{ Cell["1)", "Section", CellChangeTimes->{{3.5921059319058914`*^9, 3.5921059408830233`*^9}}], Cell[TextData[{ "Trapping region is wehre any point within D", StyleBox[" ", FontSlant->"Italic"], "maps back to another point in D.\nso, if ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["x", "n"], "\[Element]"}], TraditionalForm]]], "[0,1]\n", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox["x", "n"], "(", RowBox[{"1", "-", SubscriptBox["x", "n"]}], ")"}], "2"], "=", RowBox[{ SubscriptBox["x", "n"], "-", RowBox[{"2", SuperscriptBox[ SubscriptBox["x", "n"], "2"]}], "+", SuperscriptBox[ SubscriptBox["x", "n"], "3"]}]}], TraditionalForm]]], "\n\nThen, the maximum of this is where the derivative=0 and the second \ derivative<0\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"1", "-", RowBox[{"4", "x"}], "+", RowBox[{"3", SuperscriptBox["x", "2"]}]}], "=", "0"}], TraditionalForm]]], "\n(x=1/3,x=1)\n6x-4<0\n\nSo, the maxima is at x=1/3\nand maximum is 4/27\n\n\ So now for \n\[Alpha]", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox["x", "n"], "(", RowBox[{"1", "-", SubscriptBox["x", "n"]}], ")"}], "2"], " ", "to", " ", "be"}], "\[Subset]", RowBox[{"[", RowBox[{"0", ",", "1"}], "]"}]}], TraditionalForm]]], ", \[Alpha] must be >0 clearly, and \[Alpha]<", Cell[BoxData[ FormBox[ FractionBox["1", RowBox[{"Max", "(", SuperscriptBox[ RowBox[{ SubscriptBox["x", "n"], "(", RowBox[{"1", "-", SubscriptBox["x", "n"]}], ")"}], "2"], ")"}]], TraditionalForm]]], "\n", Cell[BoxData[ FormBox[ RowBox[{"\[Therefore]", RowBox[{ RowBox[{"Interval", " ", "A", " ", "is", " ", "\[Alpha]"}], "\[Element]", RowBox[{"[", RowBox[{"0", ",", FractionBox["27", "4"]}], "]"}]}]}], TraditionalForm]]] }], "Text", CellChangeTimes->{{3.5921059802679996`*^9, 3.5921060213211336`*^9}, { 3.5921070960990376`*^9, 3.592107344601224*^9}, {3.592108013145173*^9, 3.592108120811688*^9}, {3.5921082114360285`*^9, 3.592108329390835*^9}, { 3.592108387158121*^9, 3.592108453835462*^9}, {3.5921085026275797`*^9, 3.5921085187186337`*^9}, {3.59210854998153*^9, 3.5921087342706704`*^9}, { 3.59219671052832*^9, 3.5921967112187824`*^9}, 3.5921970828008604`*^9, { 3.5922350235543394`*^9, 3.5922350647107525`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["2)", "Section", CellChangeTimes->{{3.592107399416108*^9, 3.5921074032705956`*^9}}], Cell[TextData[{ "At a fixed point, ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["x", RowBox[{"n", "+", "1"}]], "=", SubscriptBox["x", "n"]}], TraditionalForm]]], "\n\[Rule] ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["x", "*"], "=", RowBox[{"\[Alpha]", " ", SuperscriptBox["x", "*"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["x", "*"]}], ")"}], "2"]}]}], TraditionalForm]]], ", within \[Alpha]\[Element][0,1] and x\[Element][0,1].\n", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["x", "*"], "=", "0"}], TraditionalForm]]], " \n", Cell[BoxData[ FormBox[ RowBox[{"1", "=", RowBox[{"\[Alpha]", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["x", "*"]}], ")"}], "2"]}]}], TraditionalForm]]], "\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"1", " ", "-", SuperscriptBox["x", "*"]}], "=", RowBox[{"\[PlusMinus]", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]}], TraditionalForm]]], "\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[Therefore]", SuperscriptBox["x", "*"]}], "=", RowBox[{"1", "\[PlusMinus]", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]}], TraditionalForm]]], "\nNow, the + part of the square root will always be outside the domain of \ the function,\n\nSo the fixed point\n", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "=", RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]}]]], "\nappears for ", Cell[BoxData[ FormBox[ RowBox[{"1", "<", "\[Alpha]", "<", FractionBox["27", "4"]}], TraditionalForm]]], " within domain.\n\t(when \[Alpha]<1, ", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "<", "0"}]]], " since ", Cell[BoxData[ SqrtBox[ FractionBox["1", "\[Alpha]"]]]], ">1.)\nStablity:\nf(x)=\[Alpha] x ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "2"], TraditionalForm]]], "\nf\[CloseCurlyQuote](x)=\[Alpha](x-1)(3x-1)\n\nSo, ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"|", RowBox[{ RowBox[{"f", "'"}], RowBox[{"(", "0", ")"}]}], "|"}], "=", "\[Alpha]"}], TraditionalForm]]], " \n\[Therefore] x*=0 is Stable for 0<\[Alpha]<1, Unstable for \[Alpha]>1\n\n\ |f\[CloseCurlyQuote](", Cell[BoxData[ RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]]], ")|=|", Cell[BoxData[ RowBox[{"3", "-", FractionBox["2", SqrtBox[ FractionBox["1", "\[Alpha]"]]]}]], CellChangeTimes->{{3.592113324176262*^9, 3.592113332305318*^9}}], "| \n\[Therefore]", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "=", RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]}]]], " is Stable for \[Alpha]>1, unstable(and ouside of domain) for 0<\[Alpha]<1\n" }], "Text", CellChangeTimes->{{3.5921074442437353`*^9, 3.5921074500434895`*^9}, { 3.5921075006808443`*^9, 3.59210768718023*^9}, {3.592107806876281*^9, 3.5921078401524315`*^9}, {3.592107909551177*^9, 3.5921079103852835`*^9}, { 3.592107946784835*^9, 3.592107952088475*^9}, {3.592108744377963*^9, 3.5921087808075075`*^9}, {3.5921088609295645`*^9, 3.592108873934236*^9}, { 3.5921089088095665`*^9, 3.592108937249136*^9}, {3.592108980453578*^9, 3.5921089910038834`*^9}, {3.592113302218504*^9, 3.592113305510949*^9}, { 3.5921133373089156`*^9, 3.592113351973782*^9}, {3.592113416135811*^9, 3.592113438900704*^9}, {3.5921134732649813`*^9, 3.592113529788104*^9}, { 3.5921145208124666`*^9, 3.592114541185068*^9}, {3.592114572765025*^9, 3.592114576128445*^9}, {3.59219868217331*^9, 3.5921986861592703`*^9}, { 3.5921988098140483`*^9, 3.5921988170177574`*^9}, {3.592235070012477*^9, 3.5922352005926213`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["3", "Section", CellChangeTimes->{3.5921088562680035`*^9}], Cell[TextData[{ "Transcritical bifurcaiton occurs when both ", Cell[BoxData[ FormBox[ RowBox[{"|", RowBox[{ RowBox[{"f", "'"}], RowBox[{"(", SuperscriptBox["x", "*"], ")"}]}], "|"}], TraditionalForm]]], "=1, and the fp\[CloseCurlyQuote]s swap stability.\nSolving for ", Cell[BoxData[ FormBox[ RowBox[{"|", RowBox[{ RowBox[{"f", "'"}], RowBox[{"(", SuperscriptBox["x", "0"], ")"}]}], "|"}], TraditionalForm]]], "=", Cell[BoxData[ FormBox[ RowBox[{"|", RowBox[{ RowBox[{"f", "'"}], RowBox[{"(", SuperscriptBox["x", "*"], ")"}]}], "|"}], TraditionalForm]]], "=1:" }], "Text", CellChangeTimes->{{3.59211294090915*^9, 3.592113001361771*^9}, { 3.592113172894305*^9, 3.592113221879419*^9}, 3.5921133008913374`*^9, { 3.592113503555785*^9, 3.592113512665953*^9}, {3.5921973728589115`*^9, 3.5921974485030384`*^9}, {3.592197546863472*^9, 3.592197562571784*^9}, { 3.592197765414331*^9, 3.5921978483636456`*^9}, {3.592198013617326*^9, 3.5921981274249945`*^9}, {3.592198192269665*^9, 3.5921982009281917`*^9}, { 3.592198273801261*^9, 3.5921982974056535`*^9}, {3.592198473351433*^9, 3.5921985039527764`*^9}, {3.5921985541420608`*^9, 3.5921985991077757`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"\[Alpha]", RowBox[{"(", RowBox[{"-", "1"}], ")"}], RowBox[{"(", RowBox[{"-", "1"}], ")"}]}], "]"}], "\[Equal]", RowBox[{"Abs", "[", RowBox[{"\[Alpha]", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}], ")"}], "-", "1"}], ")"}], RowBox[{"(", RowBox[{ RowBox[{"3", RowBox[{"(", RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}], ")"}]}], "-", "1"}], ")"}]}], "]"}]}], "&&", RowBox[{ RowBox[{"Abs", "[", RowBox[{"\[Alpha]", RowBox[{"(", RowBox[{"-", "1"}], ")"}], RowBox[{"(", RowBox[{"-", "1"}], ")"}]}], "]"}], "\[Equal]", "1"}]}], ",", "\[Alpha]"}], "]"}], "//", "Quiet"}]], "Input", CellChangeTimes->{{3.592198298796056*^9, 3.592198334969429*^9}, { 3.592198404866062*^9, 3.592198417376179*^9}, {3.5921986015629745`*^9, 3.592198643051462*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{"\[Alpha]", "\[Rule]", "1"}], "}"}], "}"}]], "Output", CellChangeTimes->{{3.5921984058820057`*^9, 3.5921984179065886`*^9}, { 3.5921986358845053`*^9, 3.5921986433478827`*^9}}] }, Open ]], Cell[TextData[{ "So, the only \[Alpha] where both fixed points are hyperbolic is at 1. \ However, the fixed point ", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "=", RowBox[{"1", "-", SqrtBox[ FractionBox["1", "\[Alpha]"]]}]}]]], " is not within D for \[Alpha]<1. As such, in the domain [0,1], we see the \ stable fixed point ", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "=", "0"}]]], " become unstable, and the stable fixed pont ", Cell[BoxData[ RowBox[{ SuperscriptBox["x", "*"], "=", "1"}]]], "-", Cell[BoxData[ SqrtBox[ FractionBox["1", "\[Alpha]"]]]], " appear.\nie: ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[Alpha]", "0"], "=", "1"}], TraditionalForm]], FormatType->"TraditionalForm"] }], "Text", CellChangeTimes->{{3.592198647507556*^9, 3.5921988046694593`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["4", "Section", CellChangeTimes->{{3.592114583202299*^9, 3.5921145835263395`*^9}}], Cell["", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"f", "[", "a_", "]"}], "[", "x_", "]"}], ":=", RowBox[{"a", "*", "x", "*", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "2"]}]}], ";"}]], "Input", CellChangeTimes->{{3.5921152241617546`*^9, 3.5921152521392717`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"nestedFun", "[", RowBox[{"a_", ",", "x_", ",", "n_"}], "]"}], ":=", RowBox[{"NestList", "[", RowBox[{ RowBox[{"f", "[", "a", "]"}], ",", "x", ",", "n"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.592200987611388*^9, 3.5922010105073743`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"xNpN", "[", RowBox[{"a_", ",", "x_", ",", "n_"}], "]"}], ":=", RowBox[{ RowBox[{"nestedFun", "[", RowBox[{"a", ",", "x", ",", "n"}], "]"}], "[", RowBox[{"[", RowBox[{"n", "+", "1"}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.592200419804037*^9, 3.5922004506949196`*^9}, { 3.5922004927073913`*^9, 3.592200526388547*^9}, {3.592200971255152*^9, 3.592200985173382*^9}, {3.592201015383379*^9, 3.592201018937085*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"plotFnAl", "[", RowBox[{"aDiv_", ",", "n_"}], "]"}], ":=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"xNpN", "[", RowBox[{"a", ",", "x", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"27", "/", "4"}], ",", "aDiv"}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\!\(\*SubscriptBox[\(x\), \(n\)]\)\>\"", ",", RowBox[{"StringJoin", "[", RowBox[{"\"\<\!\(\*SubscriptBox[\(x\), \(\(n\)\(+\)\)]\)\>\"", ",", RowBox[{"ToString", "[", "n", "]"}]}], "]"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"StringJoin", "[", RowBox[{ "\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}]}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.592120701159227*^9, 3.592120768456457*^9}, { 3.5921208263771334`*^9, 3.5921208671373577`*^9}, {3.592200285532173*^9, 3.592200306127725*^9}, {3.592200473670071*^9, 3.5922004841559925`*^9}, { 3.5922005931423388`*^9, 3.5922008079133153`*^9}, {3.5922008394125547`*^9, 3.592200845687129*^9}, {3.59220102324553*^9, 3.592201024677123*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"plotAlN", "[", RowBox[{"a_", ",", "n_"}], "]"}], ":=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", RowBox[{"xNpN", "[", RowBox[{"a", ",", "x", ",", "n"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\!\(\*SubscriptBox[\(x\), \(n\)]\)\>\"", ",", RowBox[{"StringJoin", "[", RowBox[{"\"\<\!\(\*SubscriptBox[\(x\), \(\(n\)\(+\)\)]\)\>\"", ",", RowBox[{"ToString", "[", "n", "]"}]}], "]"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"StringJoin", "[", RowBox[{ "\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\< for \[Alpha]=\>\"", ",", RowBox[{"ToString", "[", "a", "]"}]}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.5922012140713897`*^9, 3.592201339185896*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"plotAlN", "[", RowBox[{"a", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"27", "/", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "10", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.592201298181024*^9, 3.5922013054530163`*^9}, { 3.5922013479036655`*^9, 3.5922014039512825`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`a$$ = 0, $CellContext`n$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`a$$], 0, Rational[27, 4]}, { Hold[$CellContext`n$$], 1, 10, 1}}, Typeset`size$$ = { 360., {124., 127.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`a$1429$$ = 0, $CellContext`n$1430$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`a$$ = 0, $CellContext`n$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`a$$, $CellContext`a$1429$$, 0], Hold[$CellContext`n$$, $CellContext`n$1430$$, 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`plotAlN[$CellContext`a$$, $CellContext`n$$], "Specifications" :> {{$CellContext`a$$, 0, Rational[27, 4]}, {$CellContext`n$$, 1, 10, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{411., {184., 189.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.592201305751336*^9, {3.592201343954322*^9, 3.592201366864072*^9}, 3.592201404374527*^9, 3.5922124365853987`*^9, 3.592232697965925*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"plotFnAl", "[", RowBox[{"step", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"step", ",", "0.5", ",", "3", ",", "0.25"}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "15", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5922008101444955`*^9, 3.592200826184848*^9}, { 3.5922079409839153`*^9, 3.5922079892462635`*^9}, {3.592208045812704*^9, 3.5922080490470963`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`n$$ = 4, $CellContext`step$$ = 0.5, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`step$$], 0.5, 3, 0.25}, { Hold[$CellContext`n$$], 1, 15, 1}}, Typeset`size$$ = { 360., {133., 136.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`step$2570$$ = 0, $CellContext`n$2571$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`n$$ = 1, $CellContext`step$$ = 0.5}, "ControllerVariables" :> { Hold[$CellContext`step$$, $CellContext`step$2570$$, 0], Hold[$CellContext`n$$, $CellContext`n$2571$$, 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`plotFnAl[$CellContext`step$$, $CellContext`n$$], "Specifications" :> {{$CellContext`step$$, 0.5, 3, 0.25}, {$CellContext`n$$, 1, 15, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{411., {193., 198.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.5922008180242157`*^9, 3.5922008526832004`*^9}, 3.5922010335768647`*^9, 3.592207989559279*^9, 3.5922080528935947`*^9, 3.592212441074011*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"nestedFun", "[", RowBox[{"a", ",", "0.1", ",", "1000"}], "]"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\<\!\(\*SubscriptBox[\(x\), \(n\)]\)\>\""}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"27", "/", "4"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5921835295713243`*^9, 3.5921835662372694`*^9}, { 3.5921836266303897`*^9, 3.592183626708401*^9}, {3.5922002140217547`*^9, 3.5922002145158377`*^9}, {3.592200321355963*^9, 3.5922003219818707`*^9}, { 3.5922003622111864`*^9, 3.5922003873099165`*^9}, {3.59220094645457*^9, 3.59220095673905*^9}, {3.5922010382657843`*^9, 3.5922010387533455`*^9}, { 3.5922010910173807`*^9, 3.592201191856251*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`a$$ = 5.0355, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`a$$], 0, Rational[27, 4]}}, Typeset`size$$ = {360., {120., 124.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`a$9684$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`a$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`a$$, $CellContext`a$9684$$, 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" :> ListPlot[ $CellContext`nestedFun[$CellContext`a$$, 0.1, 1000], PlotRange -> {0, 1}, AxesLabel -> {"n", "\!\(\*SubscriptBox[\(x\), \(n\)]\)"}], "Specifications" :> {{$CellContext`a$$, 0, Rational[27, 4]}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{411., {166., 171.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.5922011922657847`*^9, 3.5922124543807373`*^9, 3.5922341324182634`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"bifParts", "[", RowBox[{"aLow_", ",", "aHigh_", ",", "nParts_"}], "]"}], ":=", RowBox[{"Parallelize", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"NestList", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"a", ",", RowBox[{ RowBox[{"f", "[", "a", "]"}], "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "}"}], "&"}], ",", RowBox[{"{", RowBox[{"a", ",", RowBox[{"RandomReal", "[", "]"}]}], "}"}], ",", "400"}], "]"}], "[", RowBox[{"[", RowBox[{"200", ";;", "400"}], "]"}], "]"}], ",", RowBox[{"Evaluate", "[", RowBox[{"{", RowBox[{"a", ",", "aLow", ",", "aHigh", ",", RowBox[{ RowBox[{"(", RowBox[{"aHigh", "-", "aLow"}], ")"}], "/", " ", "nParts"}]}], "}"}], "]"}]}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.59223183212024*^9, 3.592231850645671*^9}, { 3.592232005164973*^9, 3.5922320981281767`*^9}, {3.592232170999769*^9, 3.5922321751893206`*^9}, {3.5922322540816517`*^9, 3.5922322566990213`*^9}, { 3.592232753889288*^9, 3.592232760380119*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"plotBif", "[", RowBox[{"aLow_", ",", "aHigh_", ",", "nParts_"}], "]"}], ":=", RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"bifParts", "[", RowBox[{"aLow", ",", "aHigh", ",", "nParts"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "Tiny", "]"}]}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.592209574030078*^9, 3.592209593273775*^9}, { 3.592213920553276*^9, 3.592213957899145*^9}, {3.592231315861492*^9, 3.5922313194399652`*^9}, {3.5922315625528517`*^9, 3.5922316057015495`*^9}, { 3.5922318310831056`*^9, 3.5922318681250057`*^9}, {3.5922321828653283`*^9, 3.592232186146757*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"plotBif", "[", RowBox[{"aLow", ",", "aHigh", ",", "nParts"}], "]"}], ",", RowBox[{"{", RowBox[{"aLow", ",", "0", ",", "aHigh", ",", "0.00001"}], "}"}], ",", RowBox[{"{", RowBox[{"aHigh", ",", "1", ",", RowBox[{"27", "/", "4"}], ",", "0.00001"}], "}"}], ",", RowBox[{"{", RowBox[{"nParts", ",", "10", ",", "5000", ",", "10"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{ 3.592210206385497*^9, {3.5922120100814314`*^9, 3.592212202301674*^9}, { 3.5922128087352695`*^9, 3.5922128713184896`*^9}, {3.5922129235903797`*^9, 3.5922129520240855`*^9}, {3.5922129864796*^9, 3.5922129892709637`*^9}, { 3.5922130232094226`*^9, 3.59221305429154*^9}, {3.59221320567138*^9, 3.592213254988852*^9}, {3.5922133075507903`*^9, 3.592213346147862*^9}, { 3.5922135041865864`*^9, 3.592213524547246*^9}, {3.592213618568591*^9, 3.592213721696167*^9}, {3.592213776490354*^9, 3.5922138249226847`*^9}, { 3.5922139628638306`*^9, 3.592213970552805*^9}, {3.5922314202441635`*^9, 3.5922314213033347`*^9}, {3.59223149617013*^9, 3.5922314963561563`*^9}, { 3.592231581135323*^9, 3.5922315999067855`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`aHigh$$ = 5.32, $CellContext`aLow$$ = 5.2, $CellContext`nParts$$ = 1000, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`aLow$$], 0, Dynamic[$CellContext`aHigh$$], 0.00001}, { Hold[$CellContext`aHigh$$], 1, Rational[27, 4], 0.00001}, { Hold[$CellContext`nParts$$], 10, 5000, 10}}, Typeset`size$$ = { 360., {114., 119.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`aLow$62779$$ = 0, $CellContext`aHigh$62780$$ = 0, $CellContext`nParts$62781$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`aHigh$$ = 1, $CellContext`aLow$$ = 0, $CellContext`nParts$$ = 10}, "ControllerVariables" :> { Hold[$CellContext`aLow$$, $CellContext`aLow$62779$$, 0], Hold[$CellContext`aHigh$$, $CellContext`aHigh$62780$$, 0], Hold[$CellContext`nParts$$, $CellContext`nParts$62781$$, 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`plotBif[$CellContext`aLow$$, \ $CellContext`aHigh$$, $CellContext`nParts$$], "Specifications" :> {{$CellContext`aLow$$, 0, Dynamic[$CellContext`aHigh$$], 0.00001}, {$CellContext`aHigh$$, 1, Rational[27, 4], 0.00001}, {$CellContext`nParts$$, 10, 5000, 10}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{411., {226., 231.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.592231330800418*^9, 3.5922314218254004`*^9, 3.5922315002047005`*^9, 3.5922316126484327`*^9, 3.5922322701337504`*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"cobLines", "[", RowBox[{"a_", ",", "x0_", ",", "n_", ",", "p_"}], "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"NestList", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"xNpN", "[", RowBox[{"a", ",", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", "p"}], "]"}]}], "}"}]}], "}"}], "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x0", ",", "x0"}], "}"}], ",", RowBox[{"{", RowBox[{"x0", ",", RowBox[{"xNpN", "[", RowBox[{"a", ",", "x0", ",", "p"}], "]"}]}], "}"}]}], "}"}], ",", "n"}], "]"}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"cobwebPlot", "[", RowBox[{"a_", ",", "x_", ",", "n_", ",", "p_"}], "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"plotAlN", "[", RowBox[{"a", ",", "p"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"Arrow", "[", RowBox[{"cobLines", "[", RowBox[{"a", ",", "x", ",", "n", ",", "p"}], "]"}], "]"}], "]"}]}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.5922329789748564`*^9, 3.5922331725732746`*^9}, { 3.5922333280806837`*^9, 3.592233329172839*^9}, {3.5922337799429855`*^9, 3.5922338165728345`*^9}, {3.592233915926874*^9, 3.5922339416052113`*^9}, { 3.592234098594824*^9, 3.592234109539298*^9}, 3.592234787721389*^9, { 3.5922353044752293`*^9, 3.592235305191354*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"cobwebPlot", "[", RowBox[{"a", ",", "x0", ",", "nIterations", ",", "nFun"}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"27", "/", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"nIterations", ",", "10", ",", "500", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"nFun", ",", "1", ",", "15", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5922337841955447`*^9, 3.5922339008949013`*^9}, { 3.5922339401930265`*^9, 3.5922340838898935`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`a$$ = 5.562, $CellContext`nFun$$ = 1, $CellContext`nIterations$$ = 30, $CellContext`x0$$ = 0.464, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[$CellContext`a$$], 0, Rational[27, 4]}, { Hold[$CellContext`x0$$], 0, 1}, { Hold[$CellContext`nIterations$$], 10, 500, 10}, { Hold[$CellContext`nFun$$], 1, 15, 1}}, Typeset`size$$ = { 360., {124., 127.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`a$20739$$ = 0, $CellContext`x0$20740$$ = 0, $CellContext`nIterations$20741$$ = 0, $CellContext`nFun$20742$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`a$$ = 0, $CellContext`nFun$$ = 1, $CellContext`nIterations$$ = 10, $CellContext`x0$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`a$$, $CellContext`a$20739$$, 0], Hold[$CellContext`x0$$, $CellContext`x0$20740$$, 0], Hold[$CellContext`nIterations$$, $CellContext`nIterations$20741$$, 0], Hold[$CellContext`nFun$$, $CellContext`nFun$20742$$, 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`cobwebPlot[$CellContext`a$$, $CellContext`x0$$, \ $CellContext`nIterations$$, $CellContext`nFun$$], "Specifications" :> {{$CellContext`a$$, 0, Rational[27, 4]}, {$CellContext`x0$$, 0, 1}, {$CellContext`nIterations$$, 10, 500, 10}, {$CellContext`nFun$$, 1, 15, 1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{411., {211., 216.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.5922338007817345`*^9, 3.5922338508173*^9}, 3.592233901424969*^9, 3.592234085320116*^9, 3.592234759653721*^9}] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{1424, 773}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 101, 1, 101, "Title"], Cell[683, 25, 112, 1, 56, "Subtitle"], Cell[798, 28, 452, 15, 48, "Text"], Cell[CellGroupData[{ Cell[1275, 47, 91, 1, 86, "Section"], Cell[1369, 50, 2422, 74, 317, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3828, 129, 89, 1, 86, "Section"], Cell[3920, 132, 3823, 120, 606, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[7780, 257, 64, 1, 86, "Section"], Cell[7847, 260, 1258, 34, 61, "Text"], Cell[CellGroupData[{ Cell[9130, 298, 1207, 38, 60, "Input"], Cell[10340, 338, 233, 5, 31, "Output"] }, Open ]], Cell[10588, 346, 846, 29, 122, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[11471, 380, 88, 1, 86, "Section"], Cell[11562, 383, 16, 0, 30, "Text"], Cell[11581, 385, 312, 9, 31, "Input"], Cell[11896, 396, 316, 9, 31, "Input"], Cell[12215, 407, 506, 12, 31, "Input"], Cell[12724, 421, 1505, 34, 75, "Input"], Cell[14232, 457, 1034, 25, 52, "Input"], Cell[CellGroupData[{ Cell[15291, 486, 433, 11, 31, "Input"], Cell[15727, 499, 1901, 40, 390, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17665, 544, 479, 11, 31, "Input"], Cell[18147, 557, 1918, 39, 408, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[20102, 601, 1002, 23, 31, "Input"], Cell[21107, 626, 1720, 36, 354, "Output"] }, Open ]], Cell[22842, 665, 1285, 34, 52, "Input"], Cell[24130, 701, 779, 18, 31, "Input"], Cell[CellGroupData[{ Cell[24934, 723, 1208, 23, 31, "Input"], Cell[26145, 748, 2329, 45, 474, "Output"] }, Open ]], Cell[28489, 796, 2253, 61, 52, "Input"], Cell[CellGroupData[{ Cell[30767, 861, 638, 15, 31, "Input"], Cell[31408, 878, 2481, 48, 444, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)