(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 9775, 252] NotebookOptionsPosition[ 9080, 229] NotebookOutlinePosition[ 9434, 245] CellTagsIndexPosition[ 9391, 242] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Seasonal migration : u_t = -A*c*Cos[c, t] u_x, u[x, 0] = u0 (x) >= 0 Instructions: Evaluate notebook to start the module! \ \>", "Section", Evaluatable->False, CellChangeTimes->{{3.7603674368785467`*^9, 3.7603674698813343`*^9}, { 3.76129844411535*^9, 3.761298451634179*^9}, {3.761298517443467*^9, 3.761298550224895*^9}},ExpressionUUID->"f774301f-fd8a-424c-adac-\ 1746364c2bef"], Cell[BoxData[""], "Input", CellChangeTimes->{{3.7612985296444273`*^9, 3.761298534688897*^9}}, CellLabel->"In[31]:=",ExpressionUUID->"b661f96d-5af1-430c-8100-4b7e990bc0e9"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"DynamicModule", "[", RowBox[{ RowBox[{"{", "U", "}"}], ",", RowBox[{ RowBox[{"USeasonal", "=", RowBox[{ RowBox[{"U", "[", RowBox[{"x", ",", "t"}], "]"}], "/.", RowBox[{"First", "[", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"U", "[", RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "\[Equal]", RowBox[{ RowBox[{"-", "A"}], "*", "c", "*", RowBox[{"Cos", "[", RowBox[{"c", "*", "t"}], "]"}], "*", RowBox[{"D", "[", RowBox[{ RowBox[{"U", "[", RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}]}]}], ",", RowBox[{ RowBox[{"U", "[", RowBox[{"x", ",", "0"}], "]"}], "\[Equal]", RowBox[{"PDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"50", ",", "6"}], "]"}], ",", "x"}], "]"}]}]}], "}"}], ",", RowBox[{"U", "[", RowBox[{"x", ",", "t"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "t"}], "}"}]}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"USeasonal", "/.", RowBox[{"{", RowBox[{ RowBox[{"A", "\[Rule]", "amplitude"}], ",", RowBox[{"c", "\[Rule]", "speed"}], ",", RowBox[{"t", "\[Rule]", "time"}]}], "}"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "100"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"x", ",", "u"}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"HoldForm", "@", RowBox[{"D", "[", RowBox[{"u", ",", "t"}], "]"}]}], ",", "\"\<=\>\"", ",", RowBox[{"-", RowBox[{"AcCos", "[", "ct", "]"}]}], ",", RowBox[{"HoldForm", "@", RowBox[{"D", "[", RowBox[{"u", ",", "x"}], "]"}]}]}], "}"}], "]"}]}], ",", RowBox[{"Ticks", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"25", ",", "\"\< \>\""}], "}"}], ",", RowBox[{"{", RowBox[{"50", ",", " ", "\"\< \>\""}], "}"}], ",", RowBox[{"{", RowBox[{"75", ",", " ", "\"\< \>\""}], "}"}], ",", RowBox[{"{", RowBox[{"100", ",", " ", "\"\< \>\""}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{".02", ",", " ", "\"\< \>\""}], "}"}], ",", " ", RowBox[{"{", RowBox[{".04", ",", "\"\< \>\""}], "}"}], ",", RowBox[{"{", RowBox[{".06", ",", " ", "\"\< \>\""}], "}"}]}], "}"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"amplitude", ",", "10", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "30"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"speed", ",", " ", "10", ",", " ", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "20"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"time", ",", "0", ",", "\"\