(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 37418, 1090] NotebookOptionsPosition[ 35959, 1038] NotebookOutlinePosition[ 36317, 1054] CellTagsIndexPosition[ 36274, 1051] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Here", " ", "we", " ", "analyze", " ", "stability", " ", "and", " ", "calculate", " ", "the", " ", "variance", " ", "for", " ", "a", " ", "wide", " ", "range", " ", "of", " ", "control", " ", "networks", " ", "associated", " ", "with", " ", "mouse", " ", "airway", " ", "epithelium"}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.653831501440012*^9, 3.6538315232775917`*^9}, { 3.656962265382415*^9, 3.6569623215441923`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"R", "[", "1", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "2", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "2", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "3", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "4", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "5", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "6", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "7", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "8", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "9", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "10", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}]}], "}"}]}], ";", " ", RowBox[{ RowBox[{"R", "[", "11", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.6181623453980627`*^9, 3.618162402683166*^9}, { 3.6515002067721167`*^9, 3.651500293747311*^9}, {3.651845299148879*^9, 3.651845306971025*^9}, {3.651846405640389*^9, 3.6518464359340343`*^9}, { 3.651846497897087*^9, 3.651846498987771*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"nproc", "=", "11"}], ";", RowBox[{"x0", "=."}], ";", " ", RowBox[{"y0", "=."}], ";", " ", RowBox[{"z0", "=."}], ";", " ", RowBox[{"(*", " ", RowBox[{ "Make", " ", "sure", " ", "that", " ", "all", " ", "the", " ", "functions", " ", "are", " ", "kept", " ", "general", " ", RowBox[{"(", RowBox[{"not", " ", "specified"}], ")"}]}], " ", "*)"}], " ", RowBox[{"Quiet", "[", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Q0", "[", "i", "]"}], "=."}], ";", RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=."}], ";", " ", RowBox[{ RowBox[{"Qy", "[", "i", "]"}], "=."}], ";", " ", RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "=."}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}], "]"}], ";", RowBox[{"Quiet", "[", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"QK0", "[", "i", "]"}], "=."}], ";", RowBox[{ RowBox[{"QKx", "[", "i", "]"}], "=."}], ";", " ", RowBox[{ RowBox[{"QKy", "[", "i", "]"}], "=."}], ";", " ", RowBox[{ RowBox[{"QKz", "[", "i", "]"}], "=."}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}], "]"}]}]], "Input",\ CellChangeTimes->{{3.618164531267374*^9, 3.618164555212758*^9}, { 3.6181739141998672`*^9, 3.618173914992322*^9}, {3.651501184886251*^9, 3.651501244564362*^9}, {3.6515018102966137`*^9, 3.651501824588196*^9}, { 3.6515020634610233`*^9, 3.651502080786681*^9}, {3.651502935307807*^9, 3.651502938481987*^9}, {3.651846441440131*^9, 3.651846450653686*^9}, 3.651866148183094*^9, {3.656962384018482*^9, 3.656962386215414*^9}, { 3.656963385959478*^9, 3.656963386297098*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Siplify", " ", "the", " ", "system", " ", "by", " ", "setting", " ", "some", " ", "of", " ", "the", " ", "controls", " ", "to", " ", "zero"}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.656962397651875*^9, 3.6569624022126093`*^9}, { 3.656963348704454*^9, 3.6569633546549673`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "z", " ", "does", " ", "not", " ", "control", " ", "anything", " ", "except", " ", "Q8"}], " ", "*)"}], " ", RowBox[{ RowBox[{ RowBox[{"Do", "[", " ", RowBox[{ RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "=", "0"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}], ";", RowBox[{ RowBox[{"Qz", "[", "8", "]"}], "=."}], ";", RowBox[{"(*", " ", RowBox[{"y", "-", RowBox[{ "processes", " ", "are", " ", "not", " ", "controlled", " ", "by", " ", "y"}]}], " ", "*)"}], " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Qy", "[", "i", "]"}], "=", "0"}], ",", RowBox[{"{", RowBox[{"i", ",", "4", ",", "8"}], "}"}]}], "]"}], ";", RowBox[{ RowBox[{"Qy", "[", "11", "]"}], "=", "0"}], ";", RowBox[{"(*", " ", RowBox[{"x", "-", RowBox[{ "processes", " ", "are", " ", "not", " ", "controlled", " ", "by", " ", "x"}]}], " ", "*)"}], " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=", "0"}], ",", RowBox[{"{", RowBox[{"i", ",", "7", ",", "8"}], "}"}]}], "]"}], ";", " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=", "0"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "asymmetric", " ", "divisions", " ", "of", " ", "x", " ", "are", " ", "controlled", " ", "by", " ", "y", " ", "only"}], " ", "*)"}], " ", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=", "0"}], ";", " ", RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "=", "0"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "9", ",", "10"}], "}"}]}], "]"}], ";"}], " "}]}]], "Input", CellChangeTimes->{{3.651867210826604*^9, 3.651867252190442*^9}, { 3.651867282827343*^9, 3.651867305689199*^9}, {3.651867335745715*^9, 3.651867484285014*^9}, {3.653831590103857*^9, 3.653831590989995*^9}, { 3.6538318300423527`*^9, 3.653831836912291*^9}, {3.6538318882159843`*^9, 3.653831912332884*^9}, {3.653832677125869*^9, 3.653832677673539*^9}, { 3.653842986191156*^9, 3.653842999799787*^9}, {3.653843402068739*^9, 3.653843406202873*^9}, {3.653843437246475*^9, 3.653843468124913*^9}, { 3.6538437737564917`*^9, 3.653843779027706*^9}, {3.6538441432899313`*^9, 3.6538441560339823`*^9}, {3.653945052890368*^9, 3.653945055983302*^9}, { 3.6539452967652197`*^9, 3.6539452973313*^9}, {3.65399996182449*^9, 3.653999963932835*^9}, {3.6540000718581467`*^9, 3.654000153486197*^9}, { 3.6544679543632402`*^9, 3.654467957416293*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Preparing", " ", "matrixes", " ", "for", " ", "the", " ", "analysis"}], " ", "*)"}], " ", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"QQz", "[", "i", "]"}], "=", RowBox[{ RowBox[{"QK0", "[", "i", "]"}], "+", RowBox[{ RowBox[{"QKx", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}]}], "+", RowBox[{ RowBox[{"QKy", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}]}], "+", RowBox[{ RowBox[{"QKz", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"z", "-", "z0"}], ")"}]}]}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}], ";", RowBox[{"QQQ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"QQz", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}], ";", " ", RowBox[{"RR", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"R", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.651501264943326*^9, 3.651501311112647*^9}, 3.651502980242222*^9, {3.651846454801453*^9, 3.651846461157525*^9}, { 3.653317551719516*^9, 3.653317558014183*^9}, {3.656964105906448*^9, 3.656964107162588*^9}, {3.65696418989115*^9, 3.6569642283711348`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "2", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", RowBox[{"-", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "0", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "0", "}"}], ",", RowBox[{"{", "1", "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.6569641175833187`*^9, 3.656964210570167*^9, 3.6569642410466833`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "Obtain", " ", "the", " ", "constraint", " ", "on", " ", "the", " ", "equilibrium", " ", "values", " ", "of", " ", "the", " ", "rates"}], ",", " ", RowBox[{"equation", " ", RowBox[{"(", "14", ")"}], " ", "of", " ", "the", " ", "main", " ", "text"}]}], " ", "*)"}], " ", RowBox[{"Zerosol", "=", RowBox[{"Simplify", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"QQQ", ".", "RR"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "x0"}], ",", RowBox[{"y", "\[Rule]", "y0"}], ",", RowBox[{"z", "\[Rule]", "z0"}]}], "}"}]}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{ RowBox[{"QK0", "[", "6", "]"}], ",", " ", RowBox[{"QK0", "[", "7", "]"}], ",", " ", RowBox[{"QK0", "[", "8", "]"}]}], "}"}]}], "]"}], "]"}]}]}]], "Input",\ CellChangeTimes->{{3.6533163177249107`*^9, 3.6533163203746777`*^9}, { 3.65331757189447*^9, 3.653317575791205*^9}, {3.653848743693541*^9, 3.653848759687573*^9}, {3.6569634779740543`*^9, 3.656963482432808*^9}, { 3.656964174241295*^9, 3.656964182333478*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"QK0", "[", "6", "]"}], "\[Rule]", RowBox[{ RowBox[{"QK0", "[", "1", "]"}], "+", RowBox[{"QK0", "[", "2", "]"}], "-", RowBox[{"QK0", "[", "3", "]"}]}]}], ",", RowBox[{ RowBox[{"QK0", "[", "7", "]"}], "\[Rule]", RowBox[{ RowBox[{"QK0", "[", "1", "]"}], "-", RowBox[{"QK0", "[", "2", "]"}], "+", RowBox[{"QK0", "[", "3", "]"}], "-", RowBox[{"QK0", "[", "4", "]"}], "+", RowBox[{"QK0", "[", "5", "]"}], "+", RowBox[{"QK0", "[", "9", "]"}]}]}], ",", RowBox[{ RowBox[{"QK0", "[", "8", "]"}], "\[Rule]", RowBox[{ RowBox[{"2", " ", RowBox[{"QK0", "[", "2", "]"}]}], "+", RowBox[{"2", " ", RowBox[{"QK0", "[", "4", "]"}]}], "+", RowBox[{"QK0", "[", "10", "]"}], "+", RowBox[{"QK0", "[", "11", "]"}]}]}]}], "}"}], "}"}]], "Output", CellChangeTimes->{ 3.653843159640567*^9, 3.653843257755741*^9, 3.6538434107812157`*^9, { 3.653843445965993*^9, 3.653843472803423*^9}, 3.6538437067513533`*^9, 3.6538437843868723`*^9, 3.653843900958605*^9, {3.653843965587641*^9, 3.653843990482203*^9}, 3.653844082399993*^9, 3.653844181954595*^9, 3.6538452260452223`*^9, {3.653848751888091*^9, 3.653848760165821*^9}, 3.653945134642262*^9, 3.653945187027111*^9, 3.653945307211924*^9, 3.654000036287836*^9, 3.654000161717177*^9, 3.654048975432919*^9, 3.6540495314983883`*^9, 3.654050074168936*^9, 3.654050258958531*^9, 3.654263688832987*^9, 3.654280005112258*^9, 3.654281053366269*^9, 3.654282946683242*^9, 3.654342579540701*^9, 3.6544473362710247`*^9, 3.654467120693083*^9, 3.6544672093505898`*^9, 3.65446831893416*^9, 3.654468515495924*^9, 3.654468620042117*^9, 3.65447787778863*^9, 3.654479068861435*^9, 3.654479122676372*^9, 3.654480419672472*^9, 3.6545161450548162`*^9, 3.6545216624912577`*^9, {3.6545237735154676`*^9, 3.6545237890368643`*^9}, 3.656859372792245*^9, 3.6568607145771313`*^9, 3.656860980387292*^9, 3.656872361231228*^9, 3.65695901548505*^9, 3.656959219811173*^9, 3.656963483082098*^9, 3.65696357777181*^9, 3.6569636598719597`*^9, 3.6569638077196417`*^9, 3.656964242841607*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Make", " ", "sure", " ", "the", " ", "steady", " ", "state", " ", "is", " ", "balanced"}], " ", "*)"}], RowBox[{ RowBox[{ RowBox[{"Ksub", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"QK0", "[", "i", "]"}], "\[Rule]", RowBox[{"Q0", "[", "i", "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}], ";"}], "\n", " ", RowBox[{ RowBox[{ RowBox[{"Q0", "[", "6", "]"}], "=", RowBox[{ RowBox[{ RowBox[{"QK0", "[", "6", "]"}], "/.", RowBox[{"Zerosol", "[", RowBox[{"[", "1", "]"}], "]"}]}], "/.", "Ksub"}]}], ";", " ", RowBox[{ RowBox[{"Q0", "[", "7", "]"}], "=", RowBox[{ RowBox[{ RowBox[{"QK0", "[", "7", "]"}], "/.", RowBox[{"Zerosol", "[", RowBox[{"[", "1", "]"}], "]"}]}], "/.", "Ksub"}]}], ";", " ", RowBox[{ RowBox[{"Q0", "[", "8", "]"}], "=", RowBox[{ RowBox[{ RowBox[{"QK0", "[", "8", "]"}], "/.", RowBox[{"Zerosol", "[", RowBox[{"[", "1", "]"}], "]"}]}], "/.", "Ksub"}]}], ";", " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"QQ", "[", "i", "]"}], "=", RowBox[{ RowBox[{"Q0", "[", "i", "]"}], "+", RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}]}], "+", RowBox[{ RowBox[{"Qy", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}]}], "+", RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "*", RowBox[{"(", RowBox[{"z", "-", "z0"}], ")"}]}]}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.656963520641739*^9, 3.656963529095538*^9}, { 3.6569638154498863`*^9, 3.656963824799554*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "This", " ", "lists", " ", "the", " ", "functions", " ", "for", " ", "all", " ", "the", " ", "processes", " ", RowBox[{"1", "--"}], "11"}], " ", "*)"}], " ", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"QQ", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nproc"}], "}"}]}], "]"}], "]"}]}]], "Input",\ CellChangeTimes->{{3.653831736540313*^9, 3.653831763215814*^9}, { 3.6538319166678457`*^9, 3.6538319174156523`*^9}, 3.65384333847171*^9, 3.6538437423833637`*^9, {3.6569637696879663`*^9, 3.6569637820458727`*^9}}], Cell[BoxData[ TagBox[ TagBox[GridBox[{ { RowBox[{ RowBox[{"Q0", "[", "1", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Qy", "[", "1", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "2", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Qy", "[", "2", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "3", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Qy", "[", "3", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "4", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Qx", "[", "4", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "5", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Qx", "[", "5", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "1", "]"}], "+", RowBox[{"Q0", "[", "2", "]"}], "-", RowBox[{"Q0", "[", "3", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Qx", "[", "6", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "1", "]"}], "-", RowBox[{"Q0", "[", "2", "]"}], "+", RowBox[{"Q0", "[", "3", "]"}], "-", RowBox[{"Q0", "[", "4", "]"}], "+", RowBox[{"Q0", "[", "5", "]"}], "+", RowBox[{"Q0", "[", "9", "]"}]}]}, { RowBox[{ RowBox[{"2", " ", RowBox[{"Q0", "[", "2", "]"}]}], "+", RowBox[{"2", " ", RowBox[{"Q0", "[", "4", "]"}]}], "+", RowBox[{"Q0", "[", "10", "]"}], "+", RowBox[{"Q0", "[", "11", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"z", "-", "z0"}], ")"}], " ", RowBox[{"Qz", "[", "8", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "9", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Qy", "[", "9", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "10", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Qy", "[", "10", "]"}]}]}]}, { RowBox[{ RowBox[{"Q0", "[", "11", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Qx", "[", "11", "]"}]}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], Function[BoxForm`e$, TableForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.653831737626239*^9, 3.653831763485111*^9}, 3.65383184356566*^9, 3.6538319177139378`*^9, 3.653832378690921*^9, 3.6538327286387863`*^9, 3.653833245390032*^9, 3.653843174342473*^9, 3.6538432775295553`*^9, {3.6538433322066603`*^9, 3.653843338887714*^9}, 3.653843480596642*^9, 3.653843712619379*^9, 3.653843742723671*^9, 3.653843787679349*^9, 3.653843903636919*^9, {3.653843968631309*^9, 3.653843994205781*^9}, 3.6538440853325253`*^9, 3.653844188766498*^9, 3.6538452289509*^9, 3.65384880846215*^9, 3.6539451389236393`*^9, 3.653945191537532*^9, 3.653945310013653*^9, 3.654000046421077*^9, 3.654000165067565*^9, 3.654048982504116*^9, 3.654049539575683*^9, 3.654050079255761*^9, 3.654050263730453*^9, 3.654263695044692*^9, 3.6542800129182673`*^9, 3.654281058401733*^9, 3.654282950778708*^9, 3.654282989963472*^9, 3.6543425849962387`*^9, 3.65444734235148*^9, 3.6544671246616583`*^9, 3.654467212052401*^9, 3.6544683278347273`*^9, 3.654468536709915*^9, 3.654468639354113*^9, 3.654479072396714*^9, 3.65447912578907*^9, 3.654480423509329*^9, 3.654521667527536*^9, 3.654523794811537*^9, 3.656859384489045*^9, 3.656860728862877*^9, 3.65686098427921*^9, 3.6568723642703257`*^9, 3.656959020235219*^9, 3.656959223030241*^9, 3.656960594697484*^9, 3.6569635017030077`*^9, { 3.656963534634459*^9, 3.656963584970973*^9}, 3.656963671016478*^9, 3.656963830390615*^9, 3.656964246524386*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Study", " ", "stability"}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.651846562418408*^9, 3.6518465670084763`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Define", " ", "the", " ", "Jacobian"}], ",", " ", RowBox[{"formula", " ", RowBox[{"(", "15", ")"}], " ", "of", " ", "the", " ", "main", " ", "text"}]}], " ", "*)"}], " ", RowBox[{ RowBox[{ RowBox[{"var", "[", "1", "]"}], "=", "x"}], ";", " ", RowBox[{ RowBox[{"var", "[", "2", "]"}], "=", "y"}], ";", " ", RowBox[{ RowBox[{"var", "[", "3", "]"}], "=", "z"}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"aa", "[", RowBox[{"m", ",", "j"}], "]"}], "=", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"QQ", "[", "k", "]"}], ",", RowBox[{"var", "[", "j", "]"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "x0"}], ",", RowBox[{"y", "\[Rule]", "y0"}], ",", RowBox[{"z", "\[Rule]", "z0"}]}], "}"}]}], ")"}], "*", RowBox[{ RowBox[{ RowBox[{"R", "[", "k", "]"}], "[", RowBox[{"[", "m", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"m", ",", "1", ",", "3"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "3"}], "}"}]}], "]"}], ";", RowBox[{"Q1", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"aa", "[", RowBox[{"m", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"m", ",", "1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "3"}], "}"}]}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.618171751529089*^9, 3.6181717531923227`*^9}, { 3.618171813729747*^9, 3.618171920734436*^9}, {3.651509008052652*^9, 3.651509008711012*^9}, {3.651510372513035*^9, 3.651510375164427*^9}, { 3.6518465971337337`*^9, 3.6518465986399117`*^9}, 3.656963790937374*^9, { 3.65696425906835*^9, 3.6569642702454777`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Qx", "[", "6", "]"}], ",", RowBox[{ RowBox[{"-", RowBox[{"Qy", "[", "1", "]"}]}], "-", RowBox[{"Qy", "[", "2", "]"}], "+", RowBox[{"Qy", "[", "3", "]"}]}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"Qx", "[", "4", "]"}]}], "+", RowBox[{"Qx", "[", "5", "]"}], "-", RowBox[{"Qx", "[", "6", "]"}]}], ",", RowBox[{ RowBox[{"2", " ", RowBox[{"Qy", "[", "1", "]"}]}], "+", RowBox[{"Qy", "[", "9", "]"}]}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"2", " ", RowBox[{"Qx", "[", "4", "]"}]}], "+", RowBox[{"Qx", "[", "11", "]"}]}], ",", RowBox[{ RowBox[{"2", " ", RowBox[{"Qy", "[", "2", "]"}]}], "+", RowBox[{"Qy", "[", "10", "]"}]}], ",", RowBox[{"-", RowBox[{"Qz", "[", "8", "]"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.656964276510701*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "Skip", " ", "the", " ", "next", " ", "two", " ", "lines", " ", "if", " ", "the", " ", "general", " ", "analysis", " ", "is", " ", "performed"}], ";", " ", RowBox[{ "otherwise", " ", "set", " ", "to", " ", "zero", " ", "some", " ", "of", " ", "the", " ", RowBox[{"rates", ".", " ", "The"}], " ", "two", " ", "examples", " ", "below", " ", "correspnd", " ", "to", " ", "purely", " ", "symmetruc", " ", "and", " ", "purely", " ", "asymmetric", " ", "divisions"}]}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.6569638743266*^9, 3.656963933640011*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Only", " ", "asymm", " ", "divisions"}], " ", "*)"}], " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Q0", "[", "i", "]"}], "=", "0"}], ";", " ", RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=", "0"}], ";", " ", RowBox[{ RowBox[{"Qy", "[", "i", "]"}], "=", "0"}], ";", " ", RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "=", "0"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.6569590369305267`*^9, 3.656959082426858*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Only", " ", "symmetric"}], "*)"}], " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Q0", "[", "i", "]"}], "=", "0"}], ";", RowBox[{ RowBox[{"Qx", "[", "i", "]"}], "=", "0"}], ";", " ", RowBox[{ RowBox[{"Qy", "[", "i", "]"}], "=", "0"}], ";", RowBox[{ RowBox[{"Qz", "[", "i", "]"}], "=", "0"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "9", ",", "11"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.656875771641254*^9, 3.656875817722168*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", "Eigenvalues", " ", "*)"}], " ", RowBox[{"EV", "=", RowBox[{"Simplify", "[", RowBox[{"Eigenvalues", "[", "Q1", "]"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.656860806967286*^9, 3.6568608073424273`*^9}, { 3.6569639407767487`*^9, 3.656963944743162*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"Qx", "[", "6", "]"}], ",", RowBox[{"Qy", "[", "9", "]"}], ",", RowBox[{"-", RowBox[{"Qz", "[", "8", "]"}]}]}], "}"}]], "Output", CellChangeTimes->{3.656860808278599*^9, 3.656860899859498*^9, 3.656860995498329*^9, 3.6568723747692432`*^9, 3.656959030005044*^9, 3.656959085157633*^9, 3.656959233790608*^9, 3.6569606138206873`*^9, 3.65696368733235*^9, 3.656963938129208*^9, 3.6569642846200447`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Characteristic", " ", "polynomial"}], " ", "*)"}], " ", RowBox[{"CP", "=", RowBox[{"CharacteristicPolynomial", "[", RowBox[{"Q1", ",", "lam"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.656963976135565*^9, 3.6569639832137938`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "lam"}], "+", RowBox[{"Qx", "[", "6", "]"}]}], ")"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["lam", "2"], "-", RowBox[{"lam", " ", RowBox[{"Qy", "[", "9", "]"}]}], "+", RowBox[{"lam", " ", RowBox[{"Qz", "[", "8", "]"}]}], "-", RowBox[{ RowBox[{"Qy", "[", "9", "]"}], " ", RowBox[{"Qz", "[", "8", "]"}]}]}], ")"}]}]], "Output", CellChangeTimes->{3.6568608297222233`*^9, 3.656860903946357*^9, 3.6568609985562963`*^9, 3.656872376359798*^9, 3.656963948928721*^9, 3.656964287283875*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Study", " ", "variance"}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.65383196300014*^9, 3.6538319670251493`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "This", " ", "calculates", " ", "all", " ", "the", " ", "2", "nd", " ", "moments", " ", "by", " ", "using", " ", "equation", " ", RowBox[{"(", "24", ")"}], " ", "of", " ", "the", " ", "main", " ", RowBox[{"text", ".", " ", "The"}], " ", "output", " ", "is", " ", "the", " ", "variances", " ", "y11"}], ",", " ", "y22", ",", " ", RowBox[{"and", " ", "y33"}]}], " ", "*)"}], " ", RowBox[{ RowBox[{ RowBox[{"var", "[", "1", "]"}], "=", "x"}], ";", " ", RowBox[{ RowBox[{"var", "[", "2", "]"}], "=", "y"}], ";", " ", RowBox[{ RowBox[{"var", "[", "3", "]"}], "=", "z"}], ";", RowBox[{"SOL", "=", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"sol", "[", RowBox[{"i", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "3"}], "}"}]}], "]"}], "]"}], "}"}], "]"}]}], ";", " ", RowBox[{"BigMatr", "=", RowBox[{"(", RowBox[{ RowBox[{"KroneckerProduct", "[", RowBox[{"Q1", ",", RowBox[{"IdentityMatrix", "[", "3", "]"}]}], "]"}], "+", RowBox[{"KroneckerProduct", "[", RowBox[{ RowBox[{"IdentityMatrix", "[", "3", "]"}], ",", "Q1"}], "]"}]}], ")"}]}], ";", RowBox[{"RHS", "=", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"-", RowBox[{"Sum", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"QQ", "[", "k", "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "x0"}], ",", RowBox[{"y", "\[Rule]", "y0"}], ",", RowBox[{"z", "\[Rule]", "z0"}]}], "}"}]}], ")"}], "*", RowBox[{ RowBox[{ RowBox[{"R", "[", "k", "]"}], "[", RowBox[{"[", "i", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "*", RowBox[{ RowBox[{ RowBox[{"R", "[", "k", "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "nproc"}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "3"}], "}"}]}], "]"}], "]"}], "}"}], "]"}]}], ";", RowBox[{"Otv", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"BigMatr", ".", "SOL"}], "\[Equal]", "RHS"}], ",", RowBox[{"Flatten", "[", "SOL", "]"}]}], "]"}]}], ";", " ", RowBox[{"VARI", "=", RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"sol", "[", RowBox[{"i", ",", "i"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}], "/.", "Otv"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}]}]], "Input", CellChangeTimes->{ 3.652117129073826*^9, {3.656963988333741*^9, 3.656964071082465*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", FractionBox[ RowBox[{"Q0", "[", "9", "]"}], RowBox[{"Qy", "[", "9", "]"}]]}], ",", FractionBox[ RowBox[{ RowBox[{ RowBox[{"Q0", "[", "9", "]"}], " ", SuperscriptBox[ RowBox[{"Qy", "[", "10", "]"}], "2"]}], "+", RowBox[{ RowBox[{"Q0", "[", "10", "]"}], " ", RowBox[{"Qy", "[", "9", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Qy", "[", "9", "]"}], "-", RowBox[{"Qz", "[", "8", "]"}]}], ")"}]}], "+", RowBox[{ RowBox[{"Q0", "[", "11", "]"}], " ", RowBox[{"Qy", "[", "9", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Qy", "[", "9", "]"}], "-", RowBox[{"Qz", "[", "8", "]"}]}], ")"}]}]}], RowBox[{ RowBox[{"Qy", "[", "9", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Qy", "[", "9", "]"}], "-", RowBox[{"Qz", "[", "8", "]"}]}], ")"}], " ", RowBox[{"Qz", "[", "8", "]"}]}]]}], "}"}]], "Output", CellChangeTimes->{ 3.6521109971821337`*^9, 3.652130113654801*^9, 3.653831428537756*^9, 3.653831970587525*^9, 3.653832391865095*^9, 3.6538327535866528`*^9, 3.6538332630526333`*^9, 3.653843801794874*^9, 3.653843909006619*^9, { 3.653843974629774*^9, 3.653844000402073*^9}, 3.653844092813033*^9, 3.6538442031193*^9, 3.653845235852974*^9, 3.65384883224794*^9, 3.654050128532702*^9, 3.654050304440175*^9, 3.654279755502632*^9, 3.654280031701519*^9, 3.654281200171302*^9, 3.654283010276795*^9, 3.654447830528151*^9, 3.654467149792529*^9, 3.654467221601581*^9, 3.654468384336443*^9, 3.654468543896492*^9, 3.654468654706476*^9, 3.6544782845385942`*^9, 3.654479079815442*^9, 3.6544791324432707`*^9, 3.654521883006041*^9, 3.656875768465716*^9, 3.656959173755505*^9, 3.656959240075247*^9, 3.656960619388921*^9, 3.6569636948220387`*^9, 3.656964066684325*^9, 3.6569642977966537`*^9}] }, Open ]] }, WindowSize->{808, 755}, WindowMargins->{{257, Automatic}, {25, Automatic}}, FrontEndVersion->"10.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (December 4, \ 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 517, 10, 46, "Input"], Cell[1078, 32, 2672, 88, 97, "Input"], Cell[3753, 122, 1811, 47, 97, "Input"], Cell[5567, 171, 362, 8, 28, "Input"], Cell[5932, 181, 2865, 73, 148, "Input"], Cell[CellGroupData[{ Cell[8822, 258, 1506, 42, 80, "Input"], Cell[10331, 302, 1895, 65, 63, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12263, 372, 1296, 34, 80, "Input"], Cell[13562, 408, 2258, 46, 46, "Output"] }, Open ]], Cell[15835, 457, 1986, 60, 80, "Input"], Cell[CellGroupData[{ Cell[17846, 521, 659, 16, 46, "Input"], Cell[18508, 539, 4528, 122, 210, "Output"] }, Open ]], Cell[23051, 664, 183, 4, 28, "Input"], Cell[CellGroupData[{ Cell[23259, 672, 2258, 60, 114, "Input"], Cell[25520, 734, 1066, 34, 46, "Output"] }, Open ]], Cell[26601, 771, 680, 15, 63, "Input"], Cell[27284, 788, 611, 17, 46, "Input"], Cell[27898, 807, 581, 17, 28, "Input"], Cell[CellGroupData[{ Cell[28504, 828, 314, 7, 28, "Input"], Cell[28821, 837, 469, 10, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[29327, 852, 302, 7, 28, "Input"], Cell[29632, 861, 614, 18, 35, "Output"] }, Open ]], Cell[30261, 882, 181, 4, 28, "Input"], Cell[CellGroupData[{ Cell[30467, 890, 3509, 96, 216, "Input"], Cell[33979, 988, 1964, 47, 52, "Output"] }, Open ]] } ] *) (* End of internal cache information *)