(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 82533, 3269]*) (*NotebookOutlinePosition[ 83675, 3309]*) (* CellTagsIndexPosition[ 83578, 3302]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ CLOSE APPROACH TO CONSTRAINT SET:OPTIMAL CONTROL PROBLEM \t\t\t\t by Paul J. Scott\ \>", "Title"], Cell["Introduction", "Section"], Cell[TextData[{ "This notebook performs the numerical calculations proposed in a paper with \ same title. References below refer to this paper. This is a shooting method \ in which one varies the inital values of the costate until the constraint set \ is reached.\n\nThere are six parts. Part zero contains a Runge Kutta DE \ solver for a vector system of equations. These were copied from a ", StyleBox["MathSource", FontSlant->"Italic"], " package by Roman E. Maeder. Part One sets of the optimal control problem \ in the same notation as the paper. Part Two sets up variables for use in \ the Runge-Kutta solver. Part Three is a function, (Module), for evaluating \ the right hand side of all DE's for use in the Runge-Kutta solver. This \ function includes computing the control. Part Four sets up initial values \ for the state y and z. Part Five is a shooting step where initial values of \ the costates are adjusted until the constraint set is reached." }], "Text"], Cell[CellGroupData[{ Cell["Part Zero", "Subsubtitle"], Cell["\<\ This function performs one Runge Kutta step for vector right hand side \ function f with vector y for initial vector y0 and step size dt. \ \>", "Text"], Cell[BoxData[ \(rkStep[f_, \ y_, \ y0_, \ dt_]\ := \n\t Module[{\ k1, \ k2, \ k3, \ k4\ }, \n\t\t k1\ = \ dt\ N[\ f\ /. \ Thread[y\ -> \ y0]\ ]; \n\t\t k2\ = \ dt\ N[\ f\ /. \ Thread[y\ -> \ y0\ + \ k1/2]\ ]; \n\t\t k3\ = \ dt\ N[\ f\ /. \ Thread[y\ -> \ y0\ + \ k2/2]\ ]; \n\t\t k4\ = \ dt\ N[\ f\ /. \ Thread[y\ -> \ y0\ + \ k3]\ ]; \n\t\t y0\ + \ \((k1\ + \ 2\ k2\ + \ 2\ k3\ + \ k4)\)/6\n\t]\)], "Input"], Cell["\<\ This function performs a series of fixed step size Runge Kutta steps to \ generate a trajectory.\ \>", "Text"], Cell[BoxData[ \(\(rk[f_List, \ y_List, \ y0_List, \ {t1_, \ dt_}]\ := \n\t NestList[\ rkStep[f, \ y, \ #, \ N[dt]]&, \ N[y0], \ Round[N[t1/dt]]\ ] \ /; \n\t\tLength[f]\ == \ Length[y]\ == \ Length[y0]\n\)\)], "Input"], Cell[TextData[{ "BOTH FUNCTIONS BASED ON A PACKAGE BY ROMAN E. MAEDER IN ", StyleBox["MathSource", FontSlant->"Italic"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Part One", "Subsubtitle"], Cell["\<\ We set up equations using the same notation as in the paper. \ \>", "Text"], Cell["Declaring Variables", "Section"], Cell["Number of y state variables (called n).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(n\ = \ 2\)], "Input"], Cell[BoxData[ \(2\)], "Output"] }, Open ]], Cell["Declaration of y state variables.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(yy\ = \ Table[\ y\_i\ , \ {\ i\ , \ 1\ , \ n\ }\ ]\)], "Input"], Cell[BoxData[ \({y\_1, y\_2}\)], "Output"] }, Open ]], Cell[TextData[ "Declaration of y- costate variables (called \[Lambda])."], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\[Lambda]\[Lambda]\ = \ Table[\ \ \[Lambda]\_i\ \ , \ {\ i\ , 1\ , \ Length[\ yy\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({\[Lambda]\_1, \[Lambda]\_2}\)], "Output"] }, Open ]], Cell["Number of z state variables (called m).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(m\ = \ 2\)], "Input"], Cell[BoxData[ \(2\)], "Output"] }, Open ]], Cell["Declaration of z-state variables.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(zz\ = \ Table[\ \ z\_i\ \ , \ {\ i\ , 1\ , m\ }\ \ ]\)], "Input"], Cell[BoxData[ \({z\_1, z\_2}\)], "Output"] }, Open ]], Cell[TextData["Declaration of z-costate variables (called \[Xi])."], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\[Xi]\[Xi]\ = \ Table[\ \ \[Xi]\_i\ \ , \ {\ i\ , 1\ , Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({\[Xi]\_1, \[Xi]\_2}\)], "Output"] }, Open ]], Cell["\<\ Declaration of control variables (called u). See paper (1.3).\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(uu\ = \ Table[\ \ u\_i\ \ , \ {\ i\ , 1\ , \ Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({u\_1, u\_2}\)], "Output"] }, Open ]], Cell["\<\ The following \"nuu\" will be needed for numerical calculations.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(nuu\ = \ Table[\ \ nu\_i\ \ , \ {\ i\ , 1\ , \ Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({nu\_1, nu\_2}\)], "Output"] }, Open ]], Cell["Declaration of K-T multipliers. ", "Text"], Cell["See paper (4.1)", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(llm\ = \ Table[\ \ lm\_i\ \ , \ {\ i\ , 1\ , Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({lm\_1, lm\_2}\)], "Output"] }, Open ]], Cell["\<\ The following \"nllm\" will be needed for numerical calculations.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(nllm\ = \ Table[\ \ nlm\_i\ \ , \ {\ i\ , 1\ , Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(nllm\)\" is similar to \ existing symbol \"\!\(llm\)\"."\)], "Message"], Cell[BoxData[ \({nlm\_1, nlm\_2}\)], "Output"] }, Open ]], Cell["See paper (4.2).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(llp\ \ = \ \ DiagonalMatrix[\ \ Table[\ \ lp\_i\ , \ {i, 1, Length[\ zz\ ]\ }\ ]\ ] \)], "Input"], Cell[BoxData[ \({{lp\_1, 0}, {0, lp\_2}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[\ llp\ ]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {\(lp\_1\), "0"}, {"0", \(lp\_2\)} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], (TableForm[ #]&)]], "Output"] }, Open ]], Cell["\<\ The following \"nllp\" will be needed for numerical calculations.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(nllp\ \ = \ \ DiagonalMatrix[\ \ Table[\ \ nlp\_i\ , \ {i, 1, Length[\ zz\ ]\ }\ ]\ ] \)], "Input"], Cell[BoxData[ \(General::"spell" \( : \ \) "Possible spelling error: new symbol name \"\!\(nllp\)\" is similar to \ existing symbols \!\({llp, nllm}\)."\)], "Message"], Cell[BoxData[ \({{nlp\_1, 0}, {0, nlp\_2}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Id\ \ = \ \ IdentityMatrix[\ Length[\ zz\ ]\ ]\)], "Input"], Cell[BoxData[ \({{1, 0}, {0, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[\ Id\ ]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"1", "0"}, {"0", "1"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], (TableForm[ #]&)]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["Defining the differential equation and constraint", "Section"], Cell[CellGroupData[{ Cell["Definition of rhs of ODE F. See paper (1.1)", "Subsection"], Cell["Each component of F is defined.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(f\_1\ \ = \ \ \(-y\_1\)\ \ + \ \ z\_1\)], "Input"], Cell[BoxData[ \(\(-y\_1\) + z\_1\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f\_2\ \ = \ \ \(-y\_2\)\ \ + \ \ z\_2\)], "Input"], Cell[BoxData[ \(\(-y\_2\) + z\_2\)], "Output"] }, Open ]], Cell["The components are listed in vector F.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(F\ = \ Table[\ \ f\_i\ \ , \ {\ i\ , 1\ , Length[\ yy\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({\(-y\_1\) + z\_1, \(-y\_2\) + z\_2}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Definition of constraint function G. See paper (1.2)", "Subsection"], Cell["Each component of g is defined.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(g\_1\ = \ \ y\_1^2\ \ + \ \ y\_2^2\ \ - \ \((z\_1^2\ \ + \ \ z\_2^2\ )\)\)], "Input"], Cell[BoxData[ \(y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(g\_2\ = \ \ \ y\_1\ \ - \ \ z\_1\)], "Input"], Cell[BoxData[ \(y\_1 - z\_1\)], "Output"] }, Open ]], Cell["The components are listed in a vector G.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(G\ = \ Table[\ \ g\_i\ \ , \ {\ i\ , 1\ , Length[\ zz\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2, y\_1 - z\_1}\)], "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[TextData[{ "The Jacobian Matrix ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_y\ G\)]] }], "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(DyG\ \ = \ \ Transpose[\ \ Table[\ \[PartialD]\_\(y\_i\)\ G\ , \ {i, 1, Length[\ yy\ ]}\ ]\ \ ] \)], "Input"], Cell[BoxData[ \({{2\ y\_1, 2\ y\_2}, {1, 0}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[\ DyG\ ]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {\(2\ y\_1\), \(2\ y\_2\)}, {"1", "0"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], (TableForm[ #]&)]], "Output"] }, Open ]], Cell[TextData[{ "The Jacobian Matrix ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_z\ G\)]] }], "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(DzG\ \ = \ \ Transpose[\ \ Table[\ \[PartialD]\_\(z\_i\)\ G\ , \ {i, 1, Length[\ zz\ ]}\ ]\ \ ] \)], "Input"], Cell[BoxData[ \({{\(-2\)\ z\_1, \(-2\)\ z\_2}, {\(-1\), 0}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[\ DzG\ ]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {\(\(-2\)\ z\_1\), \(\(-2\)\ z\_2\)}, {\(-1\), "0"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], (TableForm[ #]&)]], "Output"] }, Open ]], Cell["We will need the following definition later.", "Text"], Cell["Define of G2. See paper (1.5)", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(G2\ = \ Table[\ \ G[\([\ i\ ]\)]^2\ \ , \ {\ i\ , 1\ , Length[\ G\ ]\ }\ \ ]\)], "Input"], Cell[BoxData[ \({\((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2)\)\^2, \((y\_1 - z\_1)\)\^2} \)], "Output"] }, Open ]], Cell["Definition of Hamiltonian. See paper (4.3)", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(H\ = \ \ G\ \ .\ \((\ Id\ - \ llp\ )\)\ .\ G\ \ + \ \n\t\t\t\ \ \ \((\ \[Lambda]\[Lambda]\ \ \ + \ \ Transpose[\ DyG\ ]\ .\ llm\ )\).\ F\ \ + \ \ \n\ \ \ \ \ \ \ \ \ \ \((\ \[Xi]\[Xi]\ \ \ \ + \ Transpose[\ DzG\ ]\ .\ llm\ )\).\ uu\)], "Input"], Cell[BoxData[ \(\((1 - lp\_2)\)\ \((y\_1 - z\_1)\)\^2 + \((1 - lp\_1)\)\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2)\)\^2 + \((\(-y\_1\) + z\_1)\)\ \((lm\_2 + 2\ lm\_1\ y\_1 + \[Lambda]\_1)\) + \((\(-y\_2\) + z\_2)\)\ \((2\ lm\_1\ y\_2 + \[Lambda]\_2)\) + u\_1\ \((\(-lm\_2\) - 2\ lm\_1\ z\_1 + \[Xi]\_1)\) + u\_2\ \((\(-2\)\ lm\_1\ z\_2 + \[Xi]\_2)\)\)], "Output"] }, Open ]], Cell["Setting up the right hand side of state costate equations", "Section"], Cell[TextData[{ "\"stcst\" consists of the rhs of all differential equations. Its \ first component 1 is for integrating the time equation ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_t\ t\)]], " = 1. The order of all the components is t,y, z, \[Lambda], \[Xi]." }], "Text"], Cell["First we include the rhs of (1.1) and (1.3).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(stcst\ = \ Flatten[\ {\ 1\ , \ F\ \ , \ uu\ }\ ]\)], "Input"], Cell[BoxData[ \({1, \(-y\_1\) + z\_1, \(-y\_2\) + z\_2, u\_1, u\_2}\)], "Output"] }, Open ]], Cell["Next we set up and append the rhs of system (3.2)", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\[Lambda]rhs\ = \ Table[\ \(-\[PartialD]\_\(y\_i\)\ H\)\ , \ {i, 1, Length[\[Lambda]\[Lambda]]}\ \ ]\)], "Input"], Cell[BoxData[ \({lm\_2 + 2\ lm\_1\ y\_1 - 2\ \((1 - lp\_2)\)\ \((y\_1 - z\_1)\) - 2\ lm\_1\ \((\(-y\_1\) + z\_1)\) - 4\ \((1 - lp\_1)\)\ y\_1\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_1, 2\ lm\_1\ y\_2 - 2\ lm\_1\ \((\(-y\_2\) + z\_2)\) - 4\ \((1 - lp\_1)\)\ y\_2\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(stcst\ = \ Flatten[\ {\ stcst\ , \ \[Lambda]rhs\ }\ ]\)], "Input"], Cell[BoxData[ \({1, \(-y\_1\) + z\_1, \(-y\_2\) + z\_2, u\_1, u\_2, lm\_2 + 2\ lm\_1\ y\_1 - 2\ \((1 - lp\_2)\)\ \((y\_1 - z\_1)\) - 2\ lm\_1\ \((\(-y\_1\) + z\_1)\) - 4\ \((1 - lp\_1)\)\ y\_1\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_1, 2\ lm\_1\ y\_2 - 2\ lm\_1\ \((\(-y\_2\) + z\_2)\) - 4\ \((1 - lp\_1)\)\ y\_2\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_2}\)], "Output"] }, Open ]], Cell["Next we set up and append the rhs of system (3.3)", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\[Xi]rhs\ = \ Table[\ \(-\[PartialD]\_\(z\_i\)\ H\)\ , \ {i, 1, Length[\[Xi]\[Xi]]}\ \ ]\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(\\[Xi]rhs\)\" is \ similar to existing symbol \"\!\(\\[Lambda]rhs\)\"."\)], "Message"], Cell[BoxData[ \({\(-lm\_2\) + 2\ lm\_1\ u\_1 - 2\ lm\_1\ y\_1 + 2\ \((1 - lp\_2)\)\ \((y\_1 - z\_1)\) + 4\ \((1 - lp\_1)\)\ z\_1\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) - \[Lambda]\_1, 2\ lm\_1\ u\_2 - 2\ lm\_1\ y\_2 + 4\ \((1 - lp\_1)\)\ z\_2\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) - \[Lambda]\_2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(stcst\ = \ Flatten[\ {\ stcst\ , \ \[Xi]rhs\ }\ ]\)], "Input"], Cell[BoxData[ \({1, \(-y\_1\) + z\_1, \(-y\_2\) + z\_2, u\_1, u\_2, lm\_2 + 2\ lm\_1\ y\_1 - 2\ \((1 - lp\_2)\)\ \((y\_1 - z\_1)\) - 2\ lm\_1\ \((\(-y\_1\) + z\_1)\) - 4\ \((1 - lp\_1)\)\ y\_1\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_1, 2\ lm\_1\ y\_2 - 2\ lm\_1\ \((\(-y\_2\) + z\_2)\) - 4\ \((1 - lp\_1)\)\ y\_2\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) + \[Lambda]\_2, \(-lm\_2\) + 2\ lm\_1\ u\_1 - 2\ lm\_1\ y\_1 + 2\ \((1 - lp\_2)\)\ \((y\_1 - z\_1)\) + 4\ \((1 - lp\_1)\)\ z\_1\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) - \[Lambda]\_1, 2\ lm\_1\ u\_2 - 2\ lm\_1\ y\_2 + 4\ \((1 - lp\_1)\)\ z\_2\ \((y\_1\%2 + y\_2\%2 - z\_1\%2 - z\_2\%2) \) - \[Lambda]\_2}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Part Two", "Subsubtitle"], Cell["Vector Input For Runge Kutta Step", "Section"], Cell[CellGroupData[{ Cell["Vector variables and substitutions.", "Subsubsection"], Cell[TextData[ "\"st\" will be the vector input to rkStep. The order of the components of \ \"st\" is: t,y,z,\[Lambda], \[Xi]. "], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(st\ \ = \ \ Table[\ s[\ i\ ]\ , \ {i, 1\ , \ 1\ + \ n\ + \ m\ + \ n\ + \ m\ }\ ] \)], "Input"], Cell[BoxData[ \({s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9]}\)], "Output"] }, Open ]], Cell["\"st0\" will store initial values set up later.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(st0\ \ = \ \ Table[\ \ in\ , \ {i, 1\ , \ 1\ + \ n\ + \ m\ + \ n\ + \ m\ }\ ]\)], "Input"], Cell[BoxData[ \({in, in, in, in, in, in, in, in, in}\)], "Output"] }, Open ]], Cell["\<\ In all the equations developed in Part One we must insert the correct \ components of \"st\". To do this we make the following lists of \ substitutions.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(ysub\ = \ Table[\ yy[\([i]\)]\ -> \ st[\([\ 1\ + \ i\ ]\)]\ , \ {i, 1, Length[\ yy\ ]\ }\ ]\)], "Input"], Cell[BoxData[ \({y\_1 \[Rule] s[2], y\_2 \[Rule] s[3]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zsub\ = \ Table[\ zz[\([i]\)]\ -> \ st[\([\ 1\ + n\ + \ i\ ]\)]\ , \ {i, 1, Length[zz]}\ ]\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(zsub\)\" is similar to \ existing symbol \"\!\(ysub\)\"."\)], "Message"], Cell[BoxData[ \({z\_1 \[Rule] s[4], z\_2 \[Rule] s[5]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\[Lambda]sub\ = \ Table[\ \[Lambda]\[Lambda][\([i]\)]\ -> \ st[\([\ 1\ \ + n\ + m\ + \ i\ ]\)]\ , \ \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ yy\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \({\[Lambda]\_1 \[Rule] s[6], \[Lambda]\_2 \[Rule] s[7]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\[Xi]sub\ = \ Table[\ \[Xi]\[Xi][\([i]\)]\ -> \ st[\([\ 1\ \ + \ n\ + m\ + n\ + \ i\ ]\)]\ , \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[zz]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(\\[Xi]sub\)\" is \ similar to existing symbol \"\!\(\\[Lambda]sub\)\"."\)], "Message"], Cell[BoxData[ \({\[Xi]\_1 \[Rule] s[8], \[Xi]\_2 \[Rule] s[9]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(usub\ = \ Table[\ uu[\([i]\)]\ -> \ \ nuu[\([i]\)], \ {i, 1, Length[zz]}\ ]\)], "Input"], Cell[BoxData[ \(General::"spell" \( : \ \) "Possible spelling error: new symbol name \"\!\(usub\)\" is similar to \ existing symbols \!\({ysub, zsub}\)."\)], "Message"], Cell[BoxData[ \({u\_1 \[Rule] nu\_1, u\_2 \[Rule] nu\_2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(llmsub\ = \ Table[\ llm[\([i]\)]\ -> \ \ nllm[\([i]\)]\ \ , \ {i, 1, Length[zz]}\ ] \)], "Input"], Cell[BoxData[ \({lm\_1 \[Rule] nlm\_1, lm\_2 \[Rule] nlm\_2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(llpsub\ = \ Table[\ llp[\([i, i]\)]\ -> \ \ nllp[\([i, i]\)]\ \ , \ {i, 1, Length[zz]}\ ]\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(llpsub\)\" is similar \ to existing symbol \"\!\(llmsub\)\"."\)], "Message"], Cell[BoxData[ \({lp\_1 \[Rule] nlp\_1, lp\_2 \[Rule] nlp\_2}\)], "Output"] }, Open ]], Cell["The following, \"ssub\", is a master list of substitutions.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(ssub\ = \ Union[\ ysub\ , \ zsub\ , \ \[Lambda]sub\ , \ \[Xi]sub\ , \ usub\ , llmsub\ , \ llpsub\ ]\)], "Input"], Cell[BoxData[ \(General::"spell" \( : \ \) "Possible spelling error: new symbol name \"\!\(ssub\)\" is similar to \ existing symbols \!\({usub, ysub, zsub}\)."\)], "Message"], Cell[BoxData[ \({lm\_1 \[Rule] nlm\_1, lm\_2 \[Rule] nlm\_2, lp\_1 \[Rule] nlp\_1, lp\_2 \[Rule] nlp\_2, u\_1 \[Rule] nu\_1, u\_2 \[Rule] nu\_2, y\_1 \[Rule] s[2], y\_2 \[Rule] s[3], z\_1 \[Rule] s[4], z\_2 \[Rule] s[5], \[Lambda]\_1 \[Rule] s[6], \[Lambda]\_2 \[Rule] s[7], \[Xi]\_1 \[Rule] s[8], \[Xi]\_2 \[Rule] s[9]} \)], "Output"] }, Open ]] }, Open ]], Cell["Objects needed in vector calculations", "Subsubsection"], Cell["\<\ In the following we insert the components of \"st\" into the objects set up \ in Part One. These objects have names starting with \"n\". These objects \ will be used in a function, called \"df\", for numerically computing the rhs \ of the DE's during the rkStep.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(n\[Xi]\[Xi]\ = \ \[Xi]\[Xi]\ //. \ ssub\)], "Input"], Cell[BoxData[ \({s[8], s[9]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nF\ = \ F\ //. \ ssub\)], "Input"], Cell[BoxData[ \({\(-s[2]\) + s[4], \(-s[3]\) + s[5]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nG\ = \ G\ //. \ ssub\)], "Input"], Cell[BoxData[ \({s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2, s[2] - s[4]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nG2\ = \ G2\ //. \ ssub\)], "Input"], Cell[BoxData[ \({\((s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2)\)\^2, \((s[2] - s[4])\)\^2} \)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nDyG\ = \ DyG\ //. \ ssub\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(nDyG\)\" is similar to \ existing symbol \"\!\(DyG\)\"."\)], "Message"], Cell[BoxData[ \({{2\ s[2], 2\ s[3]}, {1, 0}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nDzG\ = \ DzG\ //. \ ssub\)], "Input"], Cell[BoxData[ \(General::"spell" \( : \ \) "Possible spelling error: new symbol name \"\!\(nDzG\)\" is similar to \ existing symbols \!\({DzG, nDyG}\)."\)], "Message"], Cell[BoxData[ \({{\(-2\)\ s[4], \(-2\)\ s[5]}, {\(-1\), 0}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(nstcst\ = \ stcst\ //. \ ssub\ \ \)\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(nstcst\)\" is similar \ to existing symbol \"\!\(stcst\)\"."\)], "Message"], Cell[BoxData[ \({1, \(-s[2]\) + s[4], \(-s[3]\) + s[5], nu\_1, nu\_2, s[6] + 2\ s[2]\ nlm\_1 - 2\ \((\(-s[2]\) + s[4])\)\ nlm\_1 + nlm\_2 - 4\ s[2]\ \((s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2)\)\ \((1 - nlp\_1)\) - 2\ \((s[2] - s[4])\)\ \((1 - nlp\_2)\), s[7] + 2\ s[3]\ nlm\_1 - 2\ \((\(-s[3]\) + s[5])\)\ nlm\_1 - 4\ s[3]\ \((s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2)\)\ \((1 - nlp\_1)\), \(-s[6]\) - 2\ s[2]\ nlm\_1 - nlm\_2 + 4\ s[4]\ \((s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2)\)\ \((1 - nlp\_1)\) + 2\ \((s[2] - s[4])\)\ \((1 - nlp\_2)\) + 2\ nlm\_1\ nu\_1, \(-s[7]\) - 2\ s[3]\ nlm\_1 + 4\ s[5]\ \((s[2]\^2 + s[3]\^2 - s[4]\^2 - s[5]\^2)\)\ \((1 - nlp\_1)\) + 2\ nlm\_1\ nu\_2}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Part Three", "Subsubtitle"], Cell["\<\ The following module, called \"df\", numerically computes the right hand side \ of all DE's. It uses the numerical variables set up in Part Two. The module \ begins with computing the K-T multipliers and control.\ \>", "Text"], Cell[BoxData[ \(\(\ df\ \ := \ \(Module[\ {\ }\ , {\n\n\ (*\ The\ following\ solves\ for\ the\ K - \n\t\t\t\ T\ multiplier\ "\".\ \ See\ paper\n \t\t\t\t equations\ \((4.4)\)\ and\ \(\((4.5)\).\)\ \ \ \ \ \ \ \ \ \ *) \n\nnllm\ = \ \ LinearSolve[\ \ Transpose[\ nDzG\ ]\ , \ \(-n\[Xi]\[Xi]\)\ \ ] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ; \n\n (*\ The\ next\ line\ assigns\ the\ numerical\ values\n \t\t\t nllm[\([i]\)]\ to\ the\ corresponding\ variable\ nlm\_i\ \ *) \n \ Do[\ nlm\_i\ = \ nllm[\([i]\)]\ , \ {i, 1, Length[zz]}\ ] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ; \ \n\t\t\t\n\ \ \ \ \ \ \ \ (*\ \ The\ following\ solves\ for\ the\ K - T\ multiplier\ "\".\ \ See\ paper\ equation\ \ \(\((4.8)\).\)\ \ *) \n nllp\ \ = \ DiagonalMatrix[\ \ \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Table[\ \ Sign[\ \ nllm[\([i]\)]\ \ ]\ \ \ nllm[\([i]\)]\ \ , \n\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\ i, 1, Length[\ nllm\ ]\ } \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\ \ \ \ \ \ ]\ \ \ ; \n\n\ Do[\ nlp\_i\ = \ nllp[\([i, i]\)]\ , \ {i, 1, Length[zz]}\ ] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ; \ \ \n\t\t\t\n\ \ \ \ \ \ \ \ (*\ \ The\ following\ "\"\ is\ the\ right\ hand\ side\ of \ the\ linear\ system\ for\ the\ \n \ \ \ \ \ \ \ \ \ \ \ \ \ \ control\ "\".\ See\ paper\ \(\((4.11)\).\)\ \ \ \ \ \ \ \ \ *) \n uurhs\ = \ Table[\ Sign[\ nllm[\([i]\)]\ ] nG2[\([i]\)]\ , \ \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ zz\ ]}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\ - \ nDyG\ .\ nF\ \ \ \ ; \n\n\ \ \ \ \ \ \ \ \ (*\ \ The\ following\ numerically\ \ solves\ \((4.11)\)\ for\ the \ control\ \("\".\)\ \ *) \n\ nuu\ = \ LinearSolve[\ \ nDzG\ \ , \ uurhs\ \ ] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ; \n\n\ Do[\ nu\_i\ = \ nuu[\([i]\)]\ , \ {i, 1, Length[zz]}\ ] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ; \ \ \n (*\ The\ next\ instruction\ returns\ the\ numerical\ value\ of\n \t\t\t\tthe\ rhs\ of\ all\ DE' s\ \ \ \ \ *) \n\t\t\t\t\t\n\ nstcst\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }]\)[\([1]\)]\n\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Part Four", "Subsubtitle"], Cell[CellGroupData[{ Cell["Set initial values for y-state and z-state.", "Section"], Cell[BoxData[ \({{\(-1.4943103777899374`\), 1.96159753751494587`}, { \(-1.49653988075041199`\), 1.96050355465956549`}, { 13.1197056931072975`, \(-11.1222483263655536`\)}, { \(-13.1201993253816473`\), 11.1210971974510286`}}\)], "Output"], Cell[CellGroupData[{ Cell[BoxData[ \(initialy\ = \ {\ \(-1.37611771672183436\), 2.01517134821346122}\)], "Input"], Cell[BoxData[ \({\(-1.37611771672183436`17.301\), 2.01517134821346122`17.6021}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(initialz\ = \ {\ \ \(-1.37862693518152723\), 2.01412547534158692\ }\)], "Input"], Cell[BoxData[ \(General::"spell1" \( : \ \) "Possible spelling error: new symbol name \"\!\(initialz\)\" is similar \ to existing symbol \"\!\(initialy\)\"."\)], "Message"], Cell[BoxData[ \({\(-1.37862693518152723`17.301\), 2.01412547534158692`17.6021}\)], "Output"] }, Open ]] }, Open ]], Cell["Set the initial time equal zero", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(st0[\([1]\)]\ = \ 0\)], "Input"], Cell[BoxData[ \(0\)], "Output"] }, Open ]], Cell["\<\ Put the initial values of y and z into the initial data vector \"st0\".\ \>", "Text"], Cell[BoxData[ \(Do[\ \ st0[\([1 + i]\)]\ = \ initialy[\([i]\)]\ , \ {i, 1, Length[\ yy\ ]}\ \ ]\)], "Input"], Cell[BoxData[ \(Do[\ st0[\([1 + Length[\ yy\ ] + i]\)]\ = \ initialz[\([i]\)]\ , \n \t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ zz\ ]}\ \ ]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(st0\)], "Input"], Cell[BoxData[ \({0, \(-1.37611771672183436`17.301\), 2.01517134821346122`17.6021, \(-1.37862693518152723`17.301\), 2.01412547534158692`17.6021, in, in, in, in}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Part Five", "Subsubtitle"], Cell["\<\ Set initial values of costate. Run Runge-Kutta solver. View graphs of output.\ \ \>", "Text"], Cell[CellGroupData[{ Cell["Set initial costate values", "Section", CellTags->"costate"], Cell["\<\ Adjust initial costate values until constraint set is approached.\ \>", "Text"], Cell[BoxData[ \(initial\[Lambda]\ = \ {\ 10.\ \ , \(-10.\)\ \ }\)], "Input", CellTags->"il"], Cell[BoxData[ RowBox[{"{", RowBox[{ StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2], ",", RowBox[{"-", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}]}], "}"}]], "Output"], Cell[CellGroupData[{ Cell[BoxData[ \(initial\[Xi]\ = \ {\ \(-10.\)\ \ , 10.\ }\)], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}], ",", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}], "}"}]], "Output"], Cell[TextData[ "Put the initial values of \[Lambda] and \[Xi] into the initial data vector \ \"st0\"."], "Text"], Cell[BoxData[ \(Do[\ \ st0[\([1 + Length[\ yy\ ] + Length[\ zz\ ] + i]\)]\ = \ initial\[Lambda][\([i]\)]\ , \n \t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ yy\ ]}\ \ ]\)], "Input"], Cell[BoxData[ \(Do[\ st0[\([1 + Length[\ yy\ ] + Length[\ zz\ ] + Length[\ yy\ ] + i]\)]\ = \ \n\t\ \ \ \ \ \ \ initial\[Xi][\([i]\)]\ , \ \ {i, 1, Length[\ zz\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \(st0\)], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", \(-1.37611771672183436`17.301\), ",", "2.01517134821346122`17.6021", ",", \(-1.37862693518152723`17.301\), ",", "2.01412547534158692`17.6021", ",", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2], ",", RowBox[{"-", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}], ",", RowBox[{"-", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}], ",", StyleBox["10.`", StyleBoxAutoDelete->True, PrintPrecision->2]}], "}"}]], "Output"] }, Open ]], Cell["\<\ \"tend\" is the end time for solving the trajectories. You might want to \ change this sometimes.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(tend\ \ = \ \ 50.\)], "Input"], Cell[BoxData[ StyleBox["50.`", StyleBoxAutoDelete->True, PrintPrecision->2]], "Output"] }, Open ]] }, Open ]], Cell["\"dt\" is the step size used in the Runge-Kutta step.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(dt\ = \ .05\)], "Input"], Cell[BoxData[ StyleBox["0.05`", StyleBoxAutoDelete->True, PrintPrecision->1]], "Output"] }, Open ]], Cell["Run Runge-Kutta Solver", "Section"], Cell["\<\ Solution is kept in table \"sol\". Since this is a big table I have ended \ the command with a \";\" so the table is not printed. Remove the \";\" to \ see the table.\ \>", "Text"], Cell[BoxData[ \(\(sol\ = \ rk[\ df, \ st\ , \ st0, \ {\ tend, \ dt\ }]\ ; \)\)], "Input"], Cell["Set up interpolating functions for graphics.", "Section"], Cell[BoxData[ \(\(s\ = Flatten[\ sol[\([\ \ Range[1, Length[sol]\ ]\ , \ Range[1, 1]\ \ ]\)]] \ ; \)\)], "Input"], Cell[BoxData[ \(Do[\ gy[i]\ = Interpolation[\ \ Transpose[{\ s\ , \ Flatten[\ \n\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sol[\([\ \ Range[1, Length[sol]\ ]\ , \n \t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Range[1 + i, 1 + i]\ \ ] \)]]\ }]\ ]\ \ \ , \n \t\ \ \ \ \ {i, 1, Length[\ yy\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \(Do[\ gz[i]\ = Interpolation[\ \ Transpose[{\ s\ , \ Flatten[\ \n\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ sol[\([\ \ Range[1, Length[sol]\ ]\ \ , \n \t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Range[1 + Length[yy] + i, 1 + \n\t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \t Length[yy] + i]\ \ ]\)]]\ }]\ ]\ \ \ , \n \t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ zz\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \(Do[\ g\[Lambda][i]\ = Interpolation[\ \ Transpose[{\ s\ , \ Flatten[\ \n\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ sol[\([\ \ Range[1, Length[sol]\ ]\ \ , \n \t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Range[1 + Length[yy] + Length[zz] + i, 1 + \n\t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \t Length[yy] + Length[zz] + i]\ \ ]\)]]\ }]\ ]\ \ \ , \n \t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ yy\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ \(Do[\ g\[Xi][i]\ = Interpolation[\ \ Transpose[{\ s\ , \ Flatten[\ \n\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ sol[\([\ \ Range[1, Length[sol]\ ]\ \ , \n \t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Range[1 + Length[yy] + Length[zz] + Length[yy] + i, 1 + \n\t\t\t\t\t\t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \t Length[yy] + Length[zz] + Length[yy] + i]\ \ ]\)]]\ }] \ ]\ \ \ , \n \t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, 1, Length[\ zz\ ]} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(gsub\ = \ Union[\ Table[\ y\_i\ -> \ \(gy[i]\)[t]\ , \ {i, 1, Length[yy]\ }\ ] \ , \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Table[\ z\_i\ -> \ \(gz[i]\)[t]\ , \ {i, 1, Length[zz]\ }\ ] \ \ \ \ \ \ ]\)], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{\(y\_1\), "\[Rule]", RowBox[{ TagBox[\(InterpolatingFunction[{{0, 49.9999999999992983`}}, "<>"] \), False, Editable->False], "[", "t", "]"}]}], ",", RowBox[{\(y\_2\), "\[Rule]", RowBox[{ TagBox[\(InterpolatingFunction[{{0, 49.9999999999992983`}}, "<>"] \), False, Editable->False], "[", "t", "]"}]}], ",", RowBox[{\(z\_1\), "\[Rule]", RowBox[{ TagBox[\(InterpolatingFunction[{{0, 49.9999999999992983`}}, "<>"] \), False, Editable->False], "[", "t", "]"}]}], ",", RowBox[{\(z\_2\), "\[Rule]", RowBox[{ TagBox[\(InterpolatingFunction[{{0, 49.9999999999992983`}}, "<>"] \), False, Editable->False], "[", "t", "]"}]}]}], "}"}]], "Output"] }, Open ]], Cell["Plots of the components of the constraint G", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\ Do[\ \ Plot[\ Evaluate[\ G[\([i]\)]\ /. \ gsub\ ]\ , \ {\ t, 0, tend\ }\ , \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\ AxesOrigin\ -> \ {0, 0}\ , \n \t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ PlotLabel\ -> \ i\ \ \ }\ ]\ \ \ \ \ \ \ \ \ , \ {i, 1, Length[zz]}\ \ ]\ \ \ \ \)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 4.96638 1835.22 [ [.21429 4.95388 -6 -9 ] [.21429 4.95388 6 0 ] [.40476 4.95388 -6 -9 ] [.40476 4.95388 6 0 ] [.59524 4.95388 -6 -9 ] [.59524 4.95388 6 0 ] [.78571 4.95388 -6 -9 ] [.78571 4.95388 6 0 ] [.97619 4.95388 -6 -9 ] [.97619 4.95388 6 0 ] [.01131 .01127 -42 -4.5 ] [.01131 .01127 0 4.5 ] [.01131 .10303 -48 -4.5 ] [.01131 .10303 0 4.5 ] [.01131 .19479 -42 -4.5 ] [.01131 .19479 0 4.5 ] [.01131 .28656 -48 -4.5 ] [.01131 .28656 0 4.5 ] [.01131 .37832 -42 -4.5 ] [.01131 .37832 0 4.5 ] [.01131 .47008 -48 -4.5 ] [.01131 .47008 0 4.5 ] [.01131 .56184 -42 -4.5 ] [.01131 .56184 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 0 0 0 ] [ 1 4.97263 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 4.96638 m .21429 4.97263 L s [(10)] .21429 4.95388 0 1 Mshowa .40476 4.96638 m .40476 4.97263 L s [(20)] .40476 4.95388 0 1 Mshowa .59524 4.96638 m .59524 4.97263 L s [(30)] .59524 4.95388 0 1 Mshowa .78571 4.96638 m .78571 4.97263 L s [(40)] .78571 4.95388 0 1 Mshowa .97619 4.96638 m .97619 4.97263 L s [(50)] .97619 4.95388 0 1 Mshowa .125 Mabswid .0619 4.96638 m .0619 4.97013 L s .1 4.96638 m .1 4.97013 L s .1381 4.96638 m .1381 4.97013 L s .17619 4.96638 m .17619 4.97013 L s .25238 4.96638 m .25238 4.97013 L s .29048 4.96638 m .29048 4.97013 L s .32857 4.96638 m .32857 4.97013 L s .36667 4.96638 m .36667 4.97013 L s .44286 4.96638 m .44286 4.97013 L s .48095 4.96638 m .48095 4.97013 L s .51905 4.96638 m .51905 4.97013 L s .55714 4.96638 m .55714 4.97013 L s .63333 4.96638 m .63333 4.97013 L s .67143 4.96638 m .67143 4.97013 L s .70952 4.96638 m .70952 4.97013 L s .74762 4.96638 m .74762 4.97013 L s .82381 4.96638 m .82381 4.97013 L s .8619 4.96638 m .8619 4.97013 L s .9 4.96638 m .9 4.97013 L s .9381 4.96638 m .9381 4.97013 L s .25 Mabswid 0 4.96638 m 1 4.96638 L s .02381 .01127 m .03006 .01127 L s [(-0.0027)] .01131 .01127 1 0 Mshowa .02381 .10303 m .03006 .10303 L s [(-0.00265)] .01131 .10303 1 0 Mshowa .02381 .19479 m .03006 .19479 L s [(-0.0026)] .01131 .19479 1 0 Mshowa .02381 .28656 m .03006 .28656 L s [(-0.00255)] .01131 .28656 1 0 Mshowa .02381 .37832 m .03006 .37832 L s [(-0.0025)] .01131 .37832 1 0 Mshowa .02381 .47008 m .03006 .47008 L s [(-0.00245)] .01131 .47008 1 0 Mshowa .02381 .56184 m .03006 .56184 L s [(-0.0024)] .01131 .56184 1 0 Mshowa .125 Mabswid .02381 .02962 m .02756 .02962 L s .02381 .04798 m .02756 .04798 L s .02381 .06633 m .02756 .06633 L s .02381 .08468 m .02756 .08468 L s .02381 .12139 m .02756 .12139 L s .02381 .13974 m .02756 .13974 L s .02381 .15809 m .02756 .15809 L s .02381 .17644 m .02756 .17644 L s .02381 .21315 m .02756 .21315 L s .02381 .2315 m .02756 .2315 L s .02381 .24985 m .02756 .24985 L s .02381 .2682 m .02756 .2682 L s .02381 .30491 m .02756 .30491 L s .02381 .32326 m .02756 .32326 L s .02381 .34161 m .02756 .34161 L s .02381 .35996 m .02756 .35996 L s .02381 .39667 m .02756 .39667 L s .02381 .41502 m .02756 .41502 L s .02381 .43337 m .02756 .43337 L s .02381 .45173 m .02756 .45173 L s .02381 .48843 m .02756 .48843 L s .02381 .50678 m .02756 .50678 L s .02381 .52513 m .02756 .52513 L s .02381 .54349 m .02756 .54349 L s .02381 .58019 m .02756 .58019 L s .02381 .59854 m .02756 .59854 L s .02381 .6169 m .02756 .6169 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(1)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .06244 .04167 L .10458 .07073 L .14415 .09771 L .18221 .12338 L .22272 .15041 L .26171 .17614 L .30316 .20319 L .34309 .22897 L .3815 .2535 L .42237 .27933 L .46172 .30393 L .49955 .32734 L .53984 .35201 L .57861 .3755 L .61984 .40023 L .65954 .42379 L .69774 .44622 L .73838 .46985 L .77751 .49237 L .81909 .51606 L .85916 .53864 L .89771 .56016 L .93871 .58281 L .97619 .60332 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-223.812, -0.00277057, 1.51054, 1.56778*^-05}}], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 -4.67682 2104.29 [ [.21429 -4.68932 -6 -9 ] [.21429 -4.68932 6 0 ] [.40476 -4.68932 -6 -9 ] [.40476 -4.68932 6 0 ] [.59524 -4.68932 -6 -9 ] [.59524 -4.68932 6 0 ] [.78571 -4.68932 -6 -9 ] [.78571 -4.68932 6 0 ] [.97619 -4.68932 -6 -9 ] [.97619 -4.68932 6 0 ] [.01131 .05785 -42 -4.5 ] [.01131 .05785 0 4.5 ] [.01131 .16306 -36 -4.5 ] [.01131 .16306 0 4.5 ] [.01131 .26828 -42 -4.5 ] [.01131 .26828 0 4.5 ] [.01131 .37349 -36 -4.5 ] [.01131 .37349 0 4.5 ] [.01131 .47871 -42 -4.5 ] [.01131 .47871 0 4.5 ] [.01131 .58392 -36 -4.5 ] [.01131 .58392 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 -4.67682 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 -4.67682 m .21429 -4.67057 L s [(10)] .21429 -4.68932 0 1 Mshowa .40476 -4.67682 m .40476 -4.67057 L s [(20)] .40476 -4.68932 0 1 Mshowa .59524 -4.67682 m .59524 -4.67057 L s [(30)] .59524 -4.68932 0 1 Mshowa .78571 -4.67682 m .78571 -4.67057 L s [(40)] .78571 -4.68932 0 1 Mshowa .97619 -4.67682 m .97619 -4.67057 L s [(50)] .97619 -4.68932 0 1 Mshowa .125 Mabswid .0619 -4.67682 m .0619 -4.67307 L s .1 -4.67682 m .1 -4.67307 L s .1381 -4.67682 m .1381 -4.67307 L s .17619 -4.67682 m .17619 -4.67307 L s .25238 -4.67682 m .25238 -4.67307 L s .29048 -4.67682 m .29048 -4.67307 L s .32857 -4.67682 m .32857 -4.67307 L s .36667 -4.67682 m .36667 -4.67307 L s .44286 -4.67682 m .44286 -4.67307 L s .48095 -4.67682 m .48095 -4.67307 L s .51905 -4.67682 m .51905 -4.67307 L s .55714 -4.67682 m .55714 -4.67307 L s .63333 -4.67682 m .63333 -4.67307 L s .67143 -4.67682 m .67143 -4.67307 L s .70952 -4.67682 m .70952 -4.67307 L s .74762 -4.67682 m .74762 -4.67307 L s .82381 -4.67682 m .82381 -4.67307 L s .8619 -4.67682 m .8619 -4.67307 L s .9 -4.67682 m .9 -4.67307 L s .9381 -4.67682 m .9381 -4.67307 L s .25 Mabswid 0 -4.67682 m 1 -4.67682 L s .02381 .05785 m .03006 .05785 L s [(0.00225)] .01131 .05785 1 0 Mshowa .02381 .16306 m .03006 .16306 L s [(0.0023)] .01131 .16306 1 0 Mshowa .02381 .26828 m .03006 .26828 L s [(0.00235)] .01131 .26828 1 0 Mshowa .02381 .37349 m .03006 .37349 L s [(0.0024)] .01131 .37349 1 0 Mshowa .02381 .47871 m .03006 .47871 L s [(0.00245)] .01131 .47871 1 0 Mshowa .02381 .58392 m .03006 .58392 L s [(0.0025)] .01131 .58392 1 0 Mshowa .125 Mabswid .02381 .07889 m .02756 .07889 L s .02381 .09993 m .02756 .09993 L s .02381 .12098 m .02756 .12098 L s .02381 .14202 m .02756 .14202 L s .02381 .1841 m .02756 .1841 L s .02381 .20515 m .02756 .20515 L s .02381 .22619 m .02756 .22619 L s .02381 .24723 m .02756 .24723 L s .02381 .28932 m .02756 .28932 L s .02381 .31036 m .02756 .31036 L s .02381 .33141 m .02756 .33141 L s .02381 .35245 m .02756 .35245 L s .02381 .39453 m .02756 .39453 L s .02381 .41558 m .02756 .41558 L s .02381 .43662 m .02756 .43662 L s .02381 .45766 m .02756 .45766 L s .02381 .49975 m .02756 .49975 L s .02381 .52079 m .02756 .52079 L s .02381 .54183 m .02756 .54183 L s .02381 .56288 m .02756 .56288 L s .02381 .0368 m .02756 .0368 L s .02381 .01576 m .02756 .01576 L s .02381 .60496 m .02756 .60496 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(2)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .60332 m .06244 .57658 L .10458 .54773 L .14415 .52092 L .18221 .49539 L .22272 .4685 L .26171 .44287 L .30316 .41591 L .34309 .3902 L .3815 .36572 L .42237 .33992 L .46172 .31534 L .49955 .29192 L .53984 .26723 L .57861 .2437 L .61984 .21892 L .65954 .19529 L .69774 .17278 L .73838 .14904 L .77751 .12641 L .81909 .1026 L .85916 .07987 L .89771 .05821 L .93871 .03539 L .97619 .01472 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{436, 269.313}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg[o 0`37o`00j_l00`o`aol00>_o00"], ImageRangeCache->{{{0, 435}, {268.313, 0}} -> {-238.096, -9.68518*^-05, 1.11579, 1.00999*^-05}}] }, Open ]] }, Open ]], Cell["Click the \"il\" to go back to initial costate conditions.", "Text"], Cell[TextData[ButtonBox["il", ButtonData:>"costate", ButtonStyle->"Hyperlink"]], "Text"], Cell[CellGroupData[{ Cell["Compute some numerical values", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(tset\ = \ 50.\)], "Input"], Cell[BoxData[ StyleBox["50.`", StyleBoxAutoDelete->True, PrintPrecision->2]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({\ Table[\ \(gy[i]\)[t]\ , \ {i, 1, Length[yy]}]\ , \n\t\ Table[\ \(gz[i]\)[t]\ , \ {i, 1, Length[zz]}]\ , \n\t\ Table[\ \(g\[Lambda][i]\)[t]\ , \ {i, 1, Length[yy]}]\ , \n\t\ Table[\ \(g\[Xi][i]\)[t]\ , \ {i, 1, Length[zz]}]\ \ \ \ \ \ \ }\ /. \ t\ -> \ tset\)], "Input"], Cell[BoxData[ \({{\(-1.4943103777899374`\), 1.96159753751494587`}, { \(-1.49653988075041199`\), 1.96050355465956549`}, { 13.1197056931072975`, \(-11.1222483263655536`\)}, { \(-13.1201993253816473`\), 11.1210971974510286`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\ Do[\ \ Plot[\ Evaluate[\ \(g\[Lambda][i]\)[t]\ ]\ , \ {\ t, 0, tend\ }\ , \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\ AxesOrigin\ -> \ {0, 0}\ , \n \t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ PlotLabel\ -> \ i\ \ \ }\ ]\ \ \ \ \ \ \ \ \ , \ {i, 1, Length[zz]}\ \ ]\ \ \ \ \)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 -1.87201 0.188673 [ [.21429 -1.88451 -6 -9 ] [.21429 -1.88451 6 0 ] [.40476 -1.88451 -6 -9 ] [.40476 -1.88451 6 0 ] [.59524 -1.88451 -6 -9 ] [.59524 -1.88451 6 0 ] [.78571 -1.88451 -6 -9 ] [.78571 -1.88451 6 0 ] [.97619 -1.88451 -6 -9 ] [.97619 -1.88451 6 0 ] [.01131 .01472 -12 -4.5 ] [.01131 .01472 0 4.5 ] [.01131 .10905 -24 -4.5 ] [.01131 .10905 0 4.5 ] [.01131 .20339 -12 -4.5 ] [.01131 .20339 0 4.5 ] [.01131 .29772 -24 -4.5 ] [.01131 .29772 0 4.5 ] [.01131 .39206 -12 -4.5 ] [.01131 .39206 0 4.5 ] [.01131 .4864 -24 -4.5 ] [.01131 .4864 0 4.5 ] [.01131 .58073 -12 -4.5 ] [.01131 .58073 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 -1.87201 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 -1.87201 m .21429 -1.86576 L s [(10)] .21429 -1.88451 0 1 Mshowa .40476 -1.87201 m .40476 -1.86576 L s [(20)] .40476 -1.88451 0 1 Mshowa .59524 -1.87201 m .59524 -1.86576 L s [(30)] .59524 -1.88451 0 1 Mshowa .78571 -1.87201 m .78571 -1.86576 L s [(40)] .78571 -1.88451 0 1 Mshowa .97619 -1.87201 m .97619 -1.86576 L s [(50)] .97619 -1.88451 0 1 Mshowa .125 Mabswid .0619 -1.87201 m .0619 -1.86826 L s .1 -1.87201 m .1 -1.86826 L s .1381 -1.87201 m .1381 -1.86826 L s .17619 -1.87201 m .17619 -1.86826 L s .25238 -1.87201 m .25238 -1.86826 L s .29048 -1.87201 m .29048 -1.86826 L s .32857 -1.87201 m .32857 -1.86826 L s .36667 -1.87201 m .36667 -1.86826 L s .44286 -1.87201 m .44286 -1.86826 L s .48095 -1.87201 m .48095 -1.86826 L s .51905 -1.87201 m .51905 -1.86826 L s .55714 -1.87201 m .55714 -1.86826 L s .63333 -1.87201 m .63333 -1.86826 L s .67143 -1.87201 m .67143 -1.86826 L s .70952 -1.87201 m .70952 -1.86826 L s .74762 -1.87201 m .74762 -1.86826 L s .82381 -1.87201 m .82381 -1.86826 L s .8619 -1.87201 m .8619 -1.86826 L s .9 -1.87201 m .9 -1.86826 L s .9381 -1.87201 m .9381 -1.86826 L s .25 Mabswid 0 -1.87201 m 1 -1.87201 L s .02381 .01472 m .03006 .01472 L s [(10)] .01131 .01472 1 0 Mshowa .02381 .10905 m .03006 .10905 L s [(10.5)] .01131 .10905 1 0 Mshowa .02381 .20339 m .03006 .20339 L s [(11)] .01131 .20339 1 0 Mshowa .02381 .29772 m .03006 .29772 L s [(11.5)] .01131 .29772 1 0 Mshowa .02381 .39206 m .03006 .39206 L s [(12)] .01131 .39206 1 0 Mshowa .02381 .4864 m .03006 .4864 L s [(12.5)] .01131 .4864 1 0 Mshowa .02381 .58073 m .03006 .58073 L s [(13)] .01131 .58073 1 0 Mshowa .125 Mabswid .02381 .03358 m .02756 .03358 L s .02381 .05245 m .02756 .05245 L s .02381 .07132 m .02756 .07132 L s .02381 .09018 m .02756 .09018 L s .02381 .12792 m .02756 .12792 L s .02381 .14679 m .02756 .14679 L s .02381 .16565 m .02756 .16565 L s .02381 .18452 m .02756 .18452 L s .02381 .22226 m .02756 .22226 L s .02381 .24112 m .02756 .24112 L s .02381 .25999 m .02756 .25999 L s .02381 .27886 m .02756 .27886 L s .02381 .31659 m .02756 .31659 L s .02381 .33546 m .02756 .33546 L s .02381 .35433 m .02756 .35433 L s .02381 .37319 m .02756 .37319 L s .02381 .41093 m .02756 .41093 L s .02381 .4298 m .02756 .4298 L s .02381 .44866 m .02756 .44866 L s .02381 .46753 m .02756 .46753 L s .02381 .50526 m .02756 .50526 L s .02381 .52413 m .02756 .52413 L s .02381 .543 m .02756 .543 L s .02381 .56187 m .02756 .56187 L s .02381 .5996 m .02756 .5996 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(1)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .06244 .03689 L .10458 .06123 L .14415 .08425 L .18221 .10652 L .22272 .13039 L .26171 .15351 L .30316 .17825 L .34309 .20224 L .3815 .22546 L .42237 .25033 L .46172 .27442 L .49955 .29773 L .53984 .3227 L .57861 .34688 L .61984 .37275 L .65954 .39783 L .69774 .42209 L .73838 .44807 L .77751 .47324 L .81909 .50014 L .85916 .52623 L .89771 .55147 L .93871 .57849 L .97619 .60332 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgo`030?2Co`00L?l<013o00Ol00`o`J?l007;o00"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-102.021, -0.82116, 0.830773, 0.0838712}}], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 5.84818 0.524486 [ [.21429 5.83568 -6 -9 ] [.21429 5.83568 6 0 ] [.40476 5.83568 -6 -9 ] [.40476 5.83568 6 0 ] [.59524 5.83568 -6 -9 ] [.59524 5.83568 6 0 ] [.78571 5.83568 -6 -9 ] [.78571 5.83568 6 0 ] [.97619 5.83568 -6 -9 ] [.97619 5.83568 6 0 ] [.01131 .07883 -18 -4.5 ] [.01131 .07883 0 4.5 ] [.01131 .18373 -30 -4.5 ] [.01131 .18373 0 4.5 ] [.01131 .28863 -30 -4.5 ] [.01131 .28863 0 4.5 ] [.01131 .39352 -30 -4.5 ] [.01131 .39352 0 4.5 ] [.01131 .49842 -30 -4.5 ] [.01131 .49842 0 4.5 ] [.01131 .60332 -18 -4.5 ] [.01131 .60332 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 0 0 0 ] [ 1 5.85443 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 5.84818 m .21429 5.85443 L s [(10)] .21429 5.83568 0 1 Mshowa .40476 5.84818 m .40476 5.85443 L s [(20)] .40476 5.83568 0 1 Mshowa .59524 5.84818 m .59524 5.85443 L s [(30)] .59524 5.83568 0 1 Mshowa .78571 5.84818 m .78571 5.85443 L s [(40)] .78571 5.83568 0 1 Mshowa .97619 5.84818 m .97619 5.85443 L s [(50)] .97619 5.83568 0 1 Mshowa .125 Mabswid .0619 5.84818 m .0619 5.85193 L s .1 5.84818 m .1 5.85193 L s .1381 5.84818 m .1381 5.85193 L s .17619 5.84818 m .17619 5.85193 L s .25238 5.84818 m .25238 5.85193 L s .29048 5.84818 m .29048 5.85193 L s .32857 5.84818 m .32857 5.85193 L s .36667 5.84818 m .36667 5.85193 L s .44286 5.84818 m .44286 5.85193 L s .48095 5.84818 m .48095 5.85193 L s .51905 5.84818 m .51905 5.85193 L s .55714 5.84818 m .55714 5.85193 L s .63333 5.84818 m .63333 5.85193 L s .67143 5.84818 m .67143 5.85193 L s .70952 5.84818 m .70952 5.85193 L s .74762 5.84818 m .74762 5.85193 L s .82381 5.84818 m .82381 5.85193 L s .8619 5.84818 m .8619 5.85193 L s .9 5.84818 m .9 5.85193 L s .9381 5.84818 m .9381 5.85193 L s .25 Mabswid 0 5.84818 m 1 5.84818 L s .02381 .07883 m .03006 .07883 L s [(-11)] .01131 .07883 1 0 Mshowa .02381 .18373 m .03006 .18373 L s [(-10.8)] .01131 .18373 1 0 Mshowa .02381 .28863 m .03006 .28863 L s [(-10.6)] .01131 .28863 1 0 Mshowa .02381 .39352 m .03006 .39352 L s [(-10.4)] .01131 .39352 1 0 Mshowa .02381 .49842 m .03006 .49842 L s [(-10.2)] .01131 .49842 1 0 Mshowa .02381 .60332 m .03006 .60332 L s [(-10)] .01131 .60332 1 0 Mshowa .125 Mabswid .02381 .10506 m .02756 .10506 L s .02381 .13128 m .02756 .13128 L s .02381 .15751 m .02756 .15751 L s .02381 .20995 m .02756 .20995 L s .02381 .23618 m .02756 .23618 L s .02381 .2624 m .02756 .2624 L s .02381 .31485 m .02756 .31485 L s .02381 .34108 m .02756 .34108 L s .02381 .3673 m .02756 .3673 L s .02381 .41975 m .02756 .41975 L s .02381 .44597 m .02756 .44597 L s .02381 .4722 m .02756 .4722 L s .02381 .52465 m .02756 .52465 L s .02381 .55087 m .02756 .55087 L s .02381 .57709 m .02756 .57709 L s .02381 .05261 m .02756 .05261 L s .02381 .02638 m .02756 .02638 L s .02381 .00016 m .02756 .00016 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(2)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .60332 m .06244 .58004 L .10458 .55459 L .14415 .53063 L .18221 .50754 L .22272 .4829 L .26171 .45913 L .30316 .43381 L .34309 .40936 L .3815 .38578 L .42237 .36065 L .46172 .33639 L .49955 .31302 L .53984 .28809 L .57861 .26404 L .61984 .23842 L .65954 .21369 L .69774 .18985 L .73838 .16443 L .77751 .13992 L .81909 .11381 L .85916 .08861 L .89771 .06431 L .93871 .03842 L .97619 .01472 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-248.767, -11.2874, 1.75845, 0.063861}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\ Do[\ \ Plot[\ Evaluate[\ \(g\[Xi][i]\)[t]\ ]\ , \ {\ t, 0, tend\ }\ , \n \t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\ AxesOrigin\ -> \ {0, 0}\ , \n \t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ PlotLabel\ -> \ i\ \ \ }\ ]\ \ \ \ \ \ \ \ \ , \ {i, 1, Length[zz]}\ \ ]\ \ \ \ \)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 2.48975 0.188643 [ [.21429 2.47725 -6 -9 ] [.21429 2.47725 6 0 ] [.40476 2.47725 -6 -9 ] [.40476 2.47725 6 0 ] [.59524 2.47725 -6 -9 ] [.59524 2.47725 6 0 ] [.78571 2.47725 -6 -9 ] [.78571 2.47725 6 0 ] [.97619 2.47725 -6 -9 ] [.97619 2.47725 6 0 ] [.01131 .03739 -18 -4.5 ] [.01131 .03739 0 4.5 ] [.01131 .13171 -30 -4.5 ] [.01131 .13171 0 4.5 ] [.01131 .22603 -18 -4.5 ] [.01131 .22603 0 4.5 ] [.01131 .32035 -30 -4.5 ] [.01131 .32035 0 4.5 ] [.01131 .41468 -18 -4.5 ] [.01131 .41468 0 4.5 ] [.01131 .509 -30 -4.5 ] [.01131 .509 0 4.5 ] [.01131 .60332 -18 -4.5 ] [.01131 .60332 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 0 0 0 ] [ 1 2.496 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 2.48975 m .21429 2.496 L s [(10)] .21429 2.47725 0 1 Mshowa .40476 2.48975 m .40476 2.496 L s [(20)] .40476 2.47725 0 1 Mshowa .59524 2.48975 m .59524 2.496 L s [(30)] .59524 2.47725 0 1 Mshowa .78571 2.48975 m .78571 2.496 L s [(40)] .78571 2.47725 0 1 Mshowa .97619 2.48975 m .97619 2.496 L s [(50)] .97619 2.47725 0 1 Mshowa .125 Mabswid .0619 2.48975 m .0619 2.4935 L s .1 2.48975 m .1 2.4935 L s .1381 2.48975 m .1381 2.4935 L s .17619 2.48975 m .17619 2.4935 L s .25238 2.48975 m .25238 2.4935 L s .29048 2.48975 m .29048 2.4935 L s .32857 2.48975 m .32857 2.4935 L s .36667 2.48975 m .36667 2.4935 L s .44286 2.48975 m .44286 2.4935 L s .48095 2.48975 m .48095 2.4935 L s .51905 2.48975 m .51905 2.4935 L s .55714 2.48975 m .55714 2.4935 L s .63333 2.48975 m .63333 2.4935 L s .67143 2.48975 m .67143 2.4935 L s .70952 2.48975 m .70952 2.4935 L s .74762 2.48975 m .74762 2.4935 L s .82381 2.48975 m .82381 2.4935 L s .8619 2.48975 m .8619 2.4935 L s .9 2.48975 m .9 2.4935 L s .9381 2.48975 m .9381 2.4935 L s .25 Mabswid 0 2.48975 m 1 2.48975 L s .02381 .03739 m .03006 .03739 L s [(-13)] .01131 .03739 1 0 Mshowa .02381 .13171 m .03006 .13171 L s [(-12.5)] .01131 .13171 1 0 Mshowa .02381 .22603 m .03006 .22603 L s [(-12)] .01131 .22603 1 0 Mshowa .02381 .32035 m .03006 .32035 L s [(-11.5)] .01131 .32035 1 0 Mshowa .02381 .41468 m .03006 .41468 L s [(-11)] .01131 .41468 1 0 Mshowa .02381 .509 m .03006 .509 L s [(-10.5)] .01131 .509 1 0 Mshowa .02381 .60332 m .03006 .60332 L s [(-10)] .01131 .60332 1 0 Mshowa .125 Mabswid .02381 .05625 m .02756 .05625 L s .02381 .07512 m .02756 .07512 L s .02381 .09398 m .02756 .09398 L s .02381 .11285 m .02756 .11285 L s .02381 .15058 m .02756 .15058 L s .02381 .16944 m .02756 .16944 L s .02381 .1883 m .02756 .1883 L s .02381 .20717 m .02756 .20717 L s .02381 .2449 m .02756 .2449 L s .02381 .26376 m .02756 .26376 L s .02381 .28263 m .02756 .28263 L s .02381 .30149 m .02756 .30149 L s .02381 .33922 m .02756 .33922 L s .02381 .35808 m .02756 .35808 L s .02381 .37695 m .02756 .37695 L s .02381 .39581 m .02756 .39581 L s .02381 .43354 m .02756 .43354 L s .02381 .4524 m .02756 .4524 L s .02381 .47127 m .02756 .47127 L s .02381 .49013 m .02756 .49013 L s .02381 .52786 m .02756 .52786 L s .02381 .54673 m .02756 .54673 L s .02381 .56559 m .02756 .56559 L s .02381 .58445 m .02756 .58445 L s .02381 .01853 m .02756 .01853 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(1)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .60332 m .06244 .58115 L .10458 .5568 L .14415 .53379 L .18221 .51151 L .22272 .48764 L .26171 .46452 L .30316 .43978 L .34309 .41579 L .3815 .39257 L .42237 .36771 L .46172 .34361 L .49955 .3203 L .53984 .29533 L .57861 .27115 L .61984 .24528 L .65954 .2202 L .69774 .19594 L .73838 .16996 L .77751 .1448 L .81909 .11789 L .85916 .09181 L .89771 .06656 L .93871 .03955 L .97619 .01472 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-91.7279, -13.3402, 0.748552, 0.0755826}}], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0190476 -5.23553 0.525025 [ [.21429 -5.24803 -6 -9 ] [.21429 -5.24803 6 0 ] [.40476 -5.24803 -6 -9 ] [.40476 -5.24803 6 0 ] [.59524 -5.24803 -6 -9 ] [.59524 -5.24803 6 0 ] [.78571 -5.24803 -6 -9 ] [.78571 -5.24803 6 0 ] [.97619 -5.24803 -6 -9 ] [.97619 -5.24803 6 0 ] [.01131 .01472 -12 -4.5 ] [.01131 .01472 0 4.5 ] [.01131 .11972 -24 -4.5 ] [.01131 .11972 0 4.5 ] [.01131 .22472 -24 -4.5 ] [.01131 .22472 0 4.5 ] [.01131 .32973 -24 -4.5 ] [.01131 .32973 0 4.5 ] [.01131 .43473 -24 -4.5 ] [.01131 .43473 0 4.5 ] [.01131 .53974 -12 -4.5 ] [.01131 .53974 0 4.5 ] [.5 .63053 -3 0 ] [.5 .63053 3 9 ] [ 0 -5.23553 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid .21429 -5.23553 m .21429 -5.22928 L s [(10)] .21429 -5.24803 0 1 Mshowa .40476 -5.23553 m .40476 -5.22928 L s [(20)] .40476 -5.24803 0 1 Mshowa .59524 -5.23553 m .59524 -5.22928 L s [(30)] .59524 -5.24803 0 1 Mshowa .78571 -5.23553 m .78571 -5.22928 L s [(40)] .78571 -5.24803 0 1 Mshowa .97619 -5.23553 m .97619 -5.22928 L s [(50)] .97619 -5.24803 0 1 Mshowa .125 Mabswid .0619 -5.23553 m .0619 -5.23178 L s .1 -5.23553 m .1 -5.23178 L s .1381 -5.23553 m .1381 -5.23178 L s .17619 -5.23553 m .17619 -5.23178 L s .25238 -5.23553 m .25238 -5.23178 L s .29048 -5.23553 m .29048 -5.23178 L s .32857 -5.23553 m .32857 -5.23178 L s .36667 -5.23553 m .36667 -5.23178 L s .44286 -5.23553 m .44286 -5.23178 L s .48095 -5.23553 m .48095 -5.23178 L s .51905 -5.23553 m .51905 -5.23178 L s .55714 -5.23553 m .55714 -5.23178 L s .63333 -5.23553 m .63333 -5.23178 L s .67143 -5.23553 m .67143 -5.23178 L s .70952 -5.23553 m .70952 -5.23178 L s .74762 -5.23553 m .74762 -5.23178 L s .82381 -5.23553 m .82381 -5.23178 L s .8619 -5.23553 m .8619 -5.23178 L s .9 -5.23553 m .9 -5.23178 L s .9381 -5.23553 m .9381 -5.23178 L s .25 Mabswid 0 -5.23553 m 1 -5.23553 L s .02381 .01472 m .03006 .01472 L s [(10)] .01131 .01472 1 0 Mshowa .02381 .11972 m .03006 .11972 L s [(10.2)] .01131 .11972 1 0 Mshowa .02381 .22472 m .03006 .22472 L s [(10.4)] .01131 .22472 1 0 Mshowa .02381 .32973 m .03006 .32973 L s [(10.6)] .01131 .32973 1 0 Mshowa .02381 .43473 m .03006 .43473 L s [(10.8)] .01131 .43473 1 0 Mshowa .02381 .53974 m .03006 .53974 L s [(11)] .01131 .53974 1 0 Mshowa .125 Mabswid .02381 .04097 m .02756 .04097 L s .02381 .06722 m .02756 .06722 L s .02381 .09347 m .02756 .09347 L s .02381 .14597 m .02756 .14597 L s .02381 .17222 m .02756 .17222 L s .02381 .19847 m .02756 .19847 L s .02381 .25098 m .02756 .25098 L s .02381 .27723 m .02756 .27723 L s .02381 .30348 m .02756 .30348 L s .02381 .35598 m .02756 .35598 L s .02381 .38223 m .02756 .38223 L s .02381 .40848 m .02756 .40848 L s .02381 .46099 m .02756 .46099 L s .02381 .48724 m .02756 .48724 L s .02381 .51349 m .02756 .51349 L s .02381 .56599 m .02756 .56599 L s .02381 .59224 m .02756 .59224 L s .25 Mabswid .02381 0 m .02381 .61803 L s [(2)] .5 .63053 0 -1 Mshowa 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .06244 .03799 L .10458 .06344 L .14415 .0874 L .18221 .11049 L .22272 .13513 L .26171 .1589 L .30316 .18422 L .34309 .20867 L .3815 .23225 L .42237 .25738 L .46172 .28164 L .49955 .30501 L .53984 .32995 L .57861 .35399 L .61984 .37962 L .65954 .40435 L .69774 .42818 L .73838 .4536 L .77751 .47812 L .81909 .50422 L .85916 .52943 L .89771 .55372 L .93871 .57961 L .97619 .60332 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-271.455, -0.657897, 1.94182, 0.070448}}] }, Open ]] }, Open ]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 832}, {0, 604}}, CellGrouping->Manual, WindowSize->{512, 349}, WindowMargins->{{-3, Automatic}, {Automatic, 5}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, MacintoshSystemPageSetup->"\<\ 00<0001804P000000]P2:?oQon82n@960dL5:0?l0080001804P000000]P2:001 0000I00000400`<300000BL?00400@00000000000000060001T1T00000000000 00000000000000000000000000000000\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{ "costate"->{ Cell[30163, 1054, 68, 1, 46, "Section", CellTags->"costate"]}, "il"->{ Cell[30326, 1061, 99, 2, 22, "Input", CellTags->"il"]} } *) (*CellTagsIndex CellTagsIndex->{ {"costate", 83404, 3292}, {"il", 83487, 3295} } *) (*NotebookFileOutline Notebook[{ Cell[1709, 49, 108, 6, 411, "Title"], Cell[1820, 57, 31, 0, 51, "Section"], Cell[1854, 59, 991, 15, 192, "Text"], Cell[CellGroupData[{ Cell[2870, 78, 32, 0, 53, "Subsubtitle"], Cell[2905, 80, 162, 3, 46, "Text"], Cell[3070, 85, 478, 7, 139, "Input"], Cell[3551, 94, 120, 3, 30, "Text"], Cell[3674, 99, 244, 4, 91, "Input"], Cell[3921, 105, 146, 5, 32, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[4104, 115, 31, 0, 53, "Subsubtitle"], Cell[4138, 117, 85, 2, 30, "Text"], Cell[4226, 121, 38, 0, 51, "Section"], Cell[4267, 123, 55, 0, 30, "Text"], Cell[CellGroupData[{ Cell[4347, 127, 42, 1, 27, "Input"], Cell[4392, 130, 35, 1, 27, "Output"] }, Open ]], Cell[4442, 134, 49, 0, 30, "Text"], Cell[CellGroupData[{ Cell[4516, 138, 84, 1, 27, "Input"], Cell[4603, 141, 46, 1, 27, "Output"] }, Open ]], Cell[4664, 145, 82, 1, 30, "Text"], Cell[CellGroupData[{ Cell[4771, 150, 135, 3, 27, "Input"], Cell[4909, 155, 62, 1, 27, "Output"] }, Open ]], Cell[4986, 159, 55, 0, 30, "Text"], Cell[CellGroupData[{ Cell[5066, 163, 42, 1, 27, "Input"], Cell[5111, 166, 35, 1, 27, "Output"] }, Open ]], Cell[5161, 170, 49, 0, 30, "Text"], Cell[CellGroupData[{ Cell[5235, 174, 86, 1, 27, "Input"], Cell[5324, 177, 46, 1, 27, "Output"] }, Open ]], Cell[5385, 181, 76, 0, 30, "Text"], Cell[CellGroupData[{ Cell[5486, 185, 121, 3, 27, "Input"], Cell[5610, 190, 54, 1, 27, "Output"] }, Open ]], Cell[5679, 194, 86, 2, 30, "Text"], Cell[CellGroupData[{ Cell[5790, 200, 104, 2, 27, "Input"], Cell[5897, 204, 46, 1, 27, "Output"] }, Open ]], Cell[5958, 208, 88, 2, 30, "Text"], Cell[CellGroupData[{ Cell[6071, 214, 110, 2, 27, "Input"], Cell[6184, 218, 48, 1, 27, "Output"] }, Open ]], Cell[6247, 222, 48, 0, 30, "Text"], Cell[6298, 224, 31, 0, 30, "Text"], Cell[CellGroupData[{ Cell[6354, 228, 104, 2, 27, "Input"], Cell[6461, 232, 48, 1, 27, "Output"] }, Open ]], Cell[6524, 236, 89, 2, 30, "Text"], Cell[CellGroupData[{ Cell[6638, 242, 110, 2, 27, "Input"], Cell[6751, 246, 174, 3, 39, "Message"], Cell[6928, 251, 50, 1, 27, "Output"] }, Open ]], Cell[6993, 255, 32, 0, 30, "Text"], Cell[CellGroupData[{ Cell[7050, 259, 133, 3, 44, "Input"], Cell[7186, 264, 58, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7281, 270, 51, 1, 22, "Input"], Cell[7335, 273, 257, 9, 42, "Output"] }, Open ]], Cell[7607, 285, 89, 2, 26, "Text"], Cell[CellGroupData[{ Cell[7721, 291, 135, 3, 22, "Input"], Cell[7859, 296, 178, 3, 29, "Message"], Cell[8040, 301, 60, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8137, 307, 80, 1, 22, "Input"], Cell[8220, 310, 50, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8307, 316, 50, 1, 22, "Input"], Cell[8360, 319, 245, 9, 42, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8642, 333, 68, 0, 46, "Section"], Cell[CellGroupData[{ Cell[8735, 337, 68, 0, 43, "Subsection"], Cell[8806, 339, 47, 0, 26, "Text"], Cell[CellGroupData[{ Cell[8878, 343, 72, 1, 22, "Input"], Cell[8953, 346, 50, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9040, 352, 72, 1, 22, "Input"], Cell[9115, 355, 50, 1, 22, "Output"] }, Open ]], Cell[9180, 359, 54, 0, 26, "Text"], Cell[CellGroupData[{ Cell[9259, 363, 101, 2, 22, "Input"], Cell[9363, 367, 70, 1, 22, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[9482, 374, 75, 0, 43, "Subsection"], Cell[9560, 376, 47, 0, 26, "Text"], Cell[CellGroupData[{ Cell[9632, 380, 119, 3, 22, "Input"], Cell[9754, 385, 71, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9862, 391, 67, 1, 22, "Input"], Cell[9932, 394, 45, 1, 22, "Output"] }, Open ]], Cell[9992, 398, 56, 0, 26, "Text"], Cell[CellGroupData[{ Cell[10073, 402, 101, 2, 22, "Input"], Cell[10177, 406, 86, 1, 22, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[10302, 412, 119, 4, 46, "Section"], Cell[CellGroupData[{ Cell[10446, 420, 154, 4, 22, "Input"], Cell[10603, 426, 62, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10702, 432, 51, 1, 22, "Input"], Cell[10756, 435, 261, 9, 42, "Output"] }, Open ]], Cell[11032, 447, 119, 4, 46, "Section"], Cell[CellGroupData[{ Cell[11176, 455, 154, 4, 22, "Input"], Cell[11333, 461, 77, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[11447, 467, 51, 1, 22, "Input"], Cell[11501, 470, 274, 9, 42, "Output"] }, Open ]], Cell[11790, 482, 60, 0, 26, "Text"], Cell[11853, 484, 49, 0, 46, "Section"], Cell[CellGroupData[{ Cell[11927, 488, 120, 3, 22, "Input"], Cell[12050, 493, 111, 2, 25, "Output"] }, Open ]], Cell[12176, 498, 62, 0, 46, "Section"], Cell[CellGroupData[{ Cell[12263, 502, 309, 6, 48, "Input"], Cell[12575, 510, 402, 6, 35, "Output"] }, Open ]], Cell[12992, 519, 76, 0, 46, "Section"], Cell[13071, 521, 303, 6, 41, "Text"], Cell[13377, 529, 60, 0, 26, "Text"], Cell[CellGroupData[{ Cell[13462, 533, 82, 1, 22, "Input"], Cell[13547, 536, 85, 1, 22, "Output"] }, Open ]], Cell[13647, 540, 66, 0, 26, "Text"], Cell[CellGroupData[{ Cell[13738, 544, 150, 3, 22, "Input"], Cell[13891, 549, 414, 7, 34, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14342, 561, 87, 1, 22, "Input"], Cell[14432, 564, 472, 8, 46, "Output"] }, Open ]], Cell[14919, 575, 65, 0, 26, "Text"], Cell[CellGroupData[{ Cell[15009, 579, 138, 3, 22, "Input"], Cell[15150, 584, 189, 3, 29, "Message"], Cell[15342, 589, 383, 7, 34, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15762, 601, 83, 1, 22, "Input"], Cell[15848, 604, 828, 15, 70, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[16725, 625, 31, 0, 34, "Subsubtitle"], Cell[16759, 627, 52, 0, 46, "Section"], Cell[CellGroupData[{ Cell[16836, 631, 60, 0, 34, "Subsubsection"], Cell[16899, 633, 139, 2, 26, "Text"], Cell[CellGroupData[{ Cell[17063, 639, 134, 3, 22, "Input"], Cell[17200, 644, 88, 1, 22, "Output"] }, Open ]], Cell[17303, 648, 63, 0, 26, "Text"], Cell[CellGroupData[{ Cell[17391, 652, 125, 3, 22, "Input"], Cell[17519, 657, 70, 1, 22, "Output"] }, Open ]], Cell[17604, 661, 177, 4, 41, "Text"], Cell[CellGroupData[{ Cell[17806, 669, 143, 3, 22, "Input"], Cell[17952, 674, 72, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18061, 680, 143, 3, 22, "Input"], Cell[18207, 685, 175, 3, 29, "Message"], Cell[18385, 690, 72, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18494, 696, 374, 7, 35, "Input"], Cell[18871, 705, 88, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18996, 711, 366, 7, 35, "Input"], Cell[19365, 720, 189, 3, 29, "Message"], Cell[19557, 725, 80, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19674, 731, 120, 3, 22, "Input"], Cell[19797, 736, 179, 3, 29, "Message"], Cell[19979, 741, 74, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[20090, 747, 134, 3, 22, "Input"], Cell[20227, 752, 78, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[20342, 758, 140, 3, 22, "Input"], Cell[20485, 763, 179, 3, 29, "Message"], Cell[20667, 768, 78, 1, 22, "Output"] }, Open ]], Cell[20760, 772, 75, 0, 26, "Text"], Cell[CellGroupData[{ Cell[20860, 776, 149, 3, 22, "Input"], Cell[21012, 781, 185, 3, 29, "Message"], Cell[21200, 786, 373, 6, 33, "Output"] }, Open ]] }, Open ]], Cell[21600, 796, 62, 0, 34, "Subsubsection"], Cell[21665, 798, 289, 5, 55, "Text"], Cell[CellGroupData[{ Cell[21979, 807, 74, 1, 22, "Input"], Cell[22056, 810, 46, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22139, 816, 56, 1, 22, "Input"], Cell[22198, 819, 70, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22305, 825, 56, 1, 22, "Input"], Cell[22364, 828, 86, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22487, 834, 58, 1, 22, "Input"], Cell[22548, 837, 111, 2, 25, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22696, 844, 60, 1, 22, "Input"], Cell[22759, 847, 174, 3, 29, "Message"], Cell[22936, 852, 62, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[23035, 858, 60, 1, 22, "Input"], Cell[23098, 861, 178, 3, 29, "Message"], Cell[23279, 866, 77, 1, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[23393, 872, 72, 1, 22, "Input"], Cell[23468, 875, 178, 3, 29, "Message"], Cell[23649, 880, 812, 14, 83, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[24510, 900, 33, 0, 34, "Subsubtitle"], Cell[24546, 902, 238, 4, 41, "Text"], Cell[24787, 908, 3115, 53, 449, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[27939, 966, 32, 0, 34, "Subsubtitle"], Cell[CellGroupData[{ Cell[27996, 970, 62, 0, 46, "Section"], Cell[28061, 972, 264, 4, 22, "Output"], Cell[CellGroupData[{ Cell[28350, 980, 100, 2, 22, "Input"], Cell[28453, 984, 99, 2, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[28589, 991, 104, 2, 22, "Input"], Cell[28696, 995, 183, 3, 29, "Message"], Cell[28882, 1000, 99, 2, 22, "Output"] }, Open ]] }, Open ]], Cell[29008, 1006, 47, 0, 26, "Text"], Cell[CellGroupData[{ Cell[29080, 1010, 53, 1, 22, "Input"], Cell[29136, 1013, 35, 1, 22, "Output"] }, Open ]], Cell[29186, 1017, 95, 2, 26, "Text"], Cell[29284, 1021, 120, 2, 22, "Input"], Cell[29407, 1025, 289, 4, 35, "Input"], Cell[CellGroupData[{ Cell[29721, 1033, 36, 1, 22, "Input"], Cell[29760, 1036, 191, 3, 33, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[30000, 1045, 32, 0, 34, "Subsubtitle"], Cell[30035, 1047, 103, 3, 26, "Text"], Cell[CellGroupData[{ Cell[30163, 1054, 68, 1, 46, "Section", CellTags->"costate"], Cell[30234, 1057, 89, 2, 26, "Text"], Cell[30326, 1061, 99, 2, 22, "Input", CellTags->"il"], Cell[30428, 1065, 284, 9, 22, "Output"], Cell[CellGroupData[{ Cell[30737, 1078, 75, 1, 22, "Input"], Cell[30815, 1081, 284, 9, 22, "Output"], Cell[31102, 1092, 112, 2, 26, "Text"], Cell[31217, 1096, 360, 6, 35, "Input"], Cell[31580, 1104, 304, 6, 35, "Input"], Cell[31887, 1112, 36, 1, 22, "Input"], Cell[31926, 1115, 691, 19, 33, "Output"] }, Open ]], Cell[32632, 1137, 122, 3, 26, "Text"], Cell[CellGroupData[{ Cell[32779, 1144, 51, 1, 22, "Input"], Cell[32833, 1147, 103, 3, 22, "Output"] }, Open ]] }, Open ]], Cell[32963, 1154, 69, 0, 26, "Text"], Cell[CellGroupData[{ Cell[33057, 1158, 45, 1, 22, "Input"], Cell[33105, 1161, 104, 3, 22, "Output"] }, Open ]], Cell[33224, 1167, 41, 0, 46, "Section"], Cell[33268, 1169, 192, 4, 41, "Text"], Cell[33463, 1175, 97, 2, 22, "Input"], Cell[33563, 1179, 63, 0, 46, "Section"], Cell[33629, 1181, 133, 3, 22, "Input"], Cell[33765, 1186, 667, 13, 61, "Input"], Cell[34435, 1201, 721, 14, 74, "Input"], Cell[35159, 1217, 755, 14, 74, "Input"], Cell[35917, 1233, 790, 15, 74, "Input"], Cell[CellGroupData[{ Cell[36732, 1252, 289, 5, 35, "Input"], Cell[37024, 1259, 1044, 30, 57, "Output"] }, Open ]], Cell[38083, 1292, 62, 0, 46, "Section"], Cell[CellGroupData[{ Cell[38170, 1296, 371, 7, 48, "Input"], Cell[38544, 1305, 7223, 331, 185, 4162, 289, "GraphicsData", "PostScript", "Graphics"], Cell[45770, 1638, 7940, 324, 277, 3974, 271, "GraphicsData", "PostScript", "Graphics"] }, Open ]] }, Open ]], Cell[53737, 1966, 74, 0, 26, "Text"], Cell[53814, 1968, 92, 2, 26, "Text"], Cell[CellGroupData[{ Cell[53931, 1974, 48, 0, 46, "Section"], Cell[CellGroupData[{ Cell[54004, 1978, 47, 1, 22, "Input"], Cell[54054, 1981, 103, 3, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[54194, 1989, 328, 5, 61, "Input"], Cell[54525, 1996, 264, 4, 22, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[54826, 2005, 369, 7, 48, "Input"], Cell[55198, 2014, 7232, 326, 185, 4131, 283, "GraphicsData", "PostScript", "Graphics"], Cell[62433, 2342, 6247, 292, 185, 3719, 256, "GraphicsData", "PostScript", "Graphics"] }, Open ]], Cell[CellGroupData[{ Cell[68717, 2639, 365, 7, 48, "Input"], Cell[69085, 2648, 7216, 327, 185, 4026, 283, "GraphicsData", "PostScript", "Graphics"], Cell[76304, 2977, 6201, 288, 186, 3757, 253, "GraphicsData", "PostScript", "Graphics"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)