(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 851247, 25925] NotebookOptionsPosition[ 784103, 24329] NotebookOutlinePosition[ 822191, 25176] CellTagsIndexPosition[ 822090, 25170] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["University College Utrecht SCI 311: Advanced Mathematics", "Title", Background->RGBColor[0, 0, 0.501961]], Cell[TextData[{ "This is the master ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook for the course: \n ", StyleBox["University College Utrecht SCI 311: Advanced Mathematics I", FontSize->24], StyleBox[" \n", FontSize->36], "\nThe notebook contains some of the material used in the practice sessions, \ answers to most of the questions and some comments. \nThe textbook in the \ course is: \n ", StyleBox["Introduction to Applied Mathematics", FontSize->24, FontSlant->"Italic"], StyleBox[" \n by Gilbert Strang, \n Wellesley -- Cambridge Press, \ Wellesley, 1986.", FontSize->24], "\n\nThis notebook was created by: \n ", StyleBox["W.L.J. van der Kallen", FontSize->24], "\nand modified significantly by: \n ", StyleBox["J.A.C. Kolk (kolk@math.uu.nl) and P. Eendebak.", FontSize->24], " " }], "Comments", FontSize->18, FontColor->RGBColor[0, 0, 0.501961]], Cell[TextData[{ "For the students:\n- Questions in the notebook that have to be answered \ are always in red boxes.\n- Please mark your answers in the following way. \ This will make it easier for the teachers to grade your work. \n For \ every cell with ", StyleBox["input", FontWeight->"Bold"], " you create, select the cell and then select Format \[Rule] Style \[Rule] \ InputAnswer. \n For every cell with ", StyleBox["text,", FontWeight->"Bold"], " select Format \[Rule] Style \[Rule] Answer. \n This will give the \ cells in the notebook with your answer a blue color and make them stand out \ from the other cells.\n- Before sending the notebook first select Kernel \ \[Rule] Delete All Output. \n This will delete all output cells in the \ notebook; this makes the notebook much smaller and therefore easier to be \ sent by email. \n Please also delete all the sections that should not be \ graded. \n After having deleted the output, run ", StyleBox["Mathematica", FontSlant->"Italic"], " on your notebook once more to check that everything still works!\n- \ Completed assignments should be send to byszewsk@math.uu.nl " }], "Comments", FontSize->18, FontColor->RGBColor[0, 0, 0.501961]], Cell[CellGroupData[{ Cell["Initialization", "Subtitle"], Cell["\<\ The cells below are initialization cells. These cells are automatically \ evaluated by Mathematica as soon as the notebook is opened.\ \>", "Text"], Cell[BoxData[ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}]], "Input", InitializationCell->True, FontColor->RGBColor[0, 0, 0.501961]], Cell[BoxData[{ RowBox[{ RowBox[{"lightbluecolor", "=", RowBox[{"RGBColor", "[", RowBox[{ RowBox[{"220", "/", "256"}], ",", RowBox[{"248", "/", "256"}], ",", RowBox[{"248", "/", "256"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"darkbluecolor", "=", RowBox[{"RGBColor", "[", RowBox[{ RowBox[{"34", "/", "256"}], ",", RowBox[{"44", "/", "256"}], ",", RowBox[{"162", "/", "256"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"darkgreencolor", "=", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5", ",", "0"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"redcolor", "=", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"defaultplotoptions", "=", RowBox[{"Sequence", "[", RowBox[{ RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5", ",", "0"}], "]"}]}], ",", " ", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "->", "400"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{"ListPlot", ",", " ", RowBox[{"Evaluate", "[", "defaultplotoptions", "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{"Plot", ",", " ", RowBox[{"Evaluate", "[", "defaultplotoptions", "]"}]}], "]"}], ";"}]}], "Input", InitializationCell->True, FontColor->RGBColor[0, 0, 0.501961]] }, Closed]], Cell[CellGroupData[{ Cell["LU Decomposition", "Subtitle"], Cell[TextData[{ "In the", StyleBox[" Mathematica", FontSlant->"Italic"], " Help Browser, see \n Advanced Documentation->Linear Algebra->Linear \ Algebra in ", StyleBox["Mathematica,", FontSlant->"Italic"], " Matrix Decompositions, LU Decomposition\nfor information on how ", StyleBox["Mathematica", FontSlant->"Italic"], " can be used to find this decomposition." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Least Squares", "Subtitle"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Remark on the notation for vectors in ", FontFamily->"Arial"], StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" ", FontFamily->"Arial"] }], "Subsection"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " does not make a distinction between row and column vectors. This makes is \ easier to multiply all kinds of vectors and matrices using the ", StyleBox[".", "Matica"], " (dot operator). It is very inconvenient, however, if one wants to multiply \ a column vector with a row vector or a column vector with a matrix. This \ happens several times in the book, for example in the decomposition of a \ positive definite matrix on page 25." }], "Text"], Cell[TextData[{ "We define two vectors ", StyleBox["a1", "Matica"], " and ", StyleBox["a2", "Matica"], "." }], "Text"], Cell[BoxData[{ RowBox[{"a1", "=", RowBox[{"{", RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "\n", RowBox[{"a2", "=", RowBox[{"{", RowBox[{"a", ",", "b", ",", "c"}], "}"}]}]}], "Input"], Cell[TextData[{ "If we multiply ", StyleBox["a1", "Matica"], " and ", StyleBox["a2 ", "Matica"], "using the dot operator we get the inner product of ", StyleBox["a1", "Matica"], " and ", StyleBox["a2", "Matica"] }], "Text"], Cell[BoxData[ RowBox[{"a1", ".", "a2"}]], "Input"], Cell[TextData[{ "This is the reason for writing below:\n\t", StyleBox["P[", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["List_] := (", "Matica"], StyleBox["A", "Matica", FontSlant->"Italic"], StyleBox[".", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox[" \[Dash] ", "Matica"], StyleBox["b", "Matica", FontSlant->"Italic"], StyleBox[") . (", "Matica"], StyleBox["A", "Matica", FontSlant->"Italic"], StyleBox[".x \[Dash] ", "Matica"], StyleBox["b", "Matica", FontSlant->"Italic"], StyleBox[")", "Matica"], " \nand not: \n ", StyleBox["P[", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["List_] := Transpose[", "Matica"], StyleBox["A", "Matica", FontSlant->"Italic"], StyleBox[".", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox[" \[Dash] ", "Matica"], StyleBox["b", "Matica", FontSlant->"Italic"], StyleBox["]", "Matica"], StyleBox[" ", "Matica", FontSlant->"Italic"], StyleBox[". (", "Matica"], StyleBox["A", "Matica", FontSlant->"Italic"], StyleBox[".x \[Dash] ", "Matica"], StyleBox["b", "Matica", FontSlant->"Italic"], StyleBox[")", "Matica"], " \n", StyleBox["Mathematica", FontSlant->"Italic"], " does not know how to take the transpose of a vector.\nOne method to deal \ with row and column vectors is to define the vectors ", StyleBox["a1", "Matica"], " and ", StyleBox["a2", "Matica"], " as matrices. For example:" }], "Text"], Cell[BoxData[ RowBox[{"a1", "=", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "3", "}"}]}], "}"}]}]], "Input"], Cell[BoxData[ RowBox[{"a2", "=", RowBox[{"{", RowBox[{"{", RowBox[{"a", ",", "b", ",", "c"}], "}"}], "}"}]}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", "a1", "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", "a2", "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"a2", ".", "a1"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"a1", ".", "a2"}], "]"}], " "}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Remark on MatrixForm ", FontFamily->"Arial"]], "Subsection"], Cell[TextData[{ "The purpose of the wrapper ", StyleBox["MatrixForm", "Matica"], " ", StyleBox["(see the", FontVariations->{"CompatibilityType"->0}], " ", StyleBox["Mathematica", FontSlant->"Italic"], " Help Browser for details", StyleBox[")", FontVariations->{"CompatibilityType"->0}], " is ", StyleBox["not", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], " to make ", StyleBox["A", FontSlant->"Italic"], " into a matrix. Its only purpose is to make the output pretty. That is why \ the assignment ", StyleBox[Cell[BoxData[ RowBox[{" ", RowBox[{"A", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}]}], "}"}], " "}]}]], "Matica"], "Matica"], " below is inside the argument of ", StyleBox["MatrixForm", "Matica"], ". If we would put it outside, as in ", StyleBox[Cell[BoxData[ RowBox[{"A", " ", "=", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}]}], "}"}], "]"}]}]], "Matica"], "Matica"], " , then the result would be disastrous. ", StyleBox["Mathematica", FontSlant->"Italic"], " would not treat ", StyleBox["A", FontSlant->"Italic"], " as a matrix, but as a form of output." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Treatment by ", StyleBox["Mathematica", FontSlant->"Italic"], " of Example 1 in Section 1.4 in the textbook " }], "Section"], Cell[TextData[{ "As a first illustration we verify the calculations in the example by means \ of ", StyleBox["Mathematica", FontSlant->"Italic"], ". The data in the example are the 4 by 2 matrix ", StyleBox["A ", FontSlant->"Italic"], StyleBox["and the vector", FontVariations->{"CompatibilityType"->0}], StyleBox[" b ", FontSlant->"Italic"], StyleBox["in", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["R", FontWeight->"Bold", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], "4"], TraditionalForm]]], StyleBox[".", FontSlant->"Italic"] }], "Text"], Cell[BoxData[{ RowBox[{"MatrixForm", "[", RowBox[{"A", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}]}], "}"}]}], "]"}], "\n", RowBox[{"MatrixForm", "[", RowBox[{"b", "=", RowBox[{"{", RowBox[{"0", ",", "8", ",", "8", ",", "20"}], "}"}]}], "]"}]}], "Input"], Cell[TextData[{ "The minimizing vector ", StyleBox["xmin", FontSlant->"Italic"], " is obtained by solving the following normal equations; we do this using ", StyleBox["the built-in procedure", FontVariations->{"CompatibilityType"->0}], " ", StyleBox["LinearSolve", "Matica"], StyleBox[" in ", FontVariations->{"CompatibilityType"->0}], StyleBox["Mathematica", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" (see the", FontVariations->{"CompatibilityType"->0}], " Help Browser for details", StyleBox["). ", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"K", "=", RowBox[{ RowBox[{"Transpose", "[", "A", "]"}], ".", "A"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c", "=", RowBox[{ RowBox[{"Transpose", "[", "A", "]"}], ".", "b"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"xmin", "=", RowBox[{"LinearSolve", "[", RowBox[{"K", ",", "c"}], "]"}]}], "]"}]}], "Input"], Cell[TextData[{ "Next we compute the orthogonal projection ", StyleBox["p", FontSlant->"Italic"], " of ", StyleBox["b", FontSlant->"Italic"], " onto the column space of ", StyleBox["A, ", FontSlant->"Italic"], StyleBox["the error", FontVariations->{"CompatibilityType"->0}], StyleBox[" e ", FontSlant->"Italic"], StyleBox["and its norm", FontVariations->{"CompatibilityType"->0}], StyleBox[", ", FontSlant->"Italic"], StyleBox["the fact that ", FontVariations->{"CompatibilityType"->0}], StyleBox["e", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" is perpendicular to the column space of ", FontVariations->{"CompatibilityType"->0}], StyleBox["A ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["and therefore to", FontVariations->{"CompatibilityType"->0}], StyleBox[" p ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["in particular", FontVariations->{"CompatibilityType"->0}], StyleBox[", ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["and furthermore that ", FontVariations->{"CompatibilityType"->0}], StyleBox["p + e = b.", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[BoxData[{ RowBox[{"MatrixForm", "[", RowBox[{"p", "=", RowBox[{"A", ".", "xmin"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"e", "=", RowBox[{"b", "-", RowBox[{"A", ".", "xmin"}]}]}], "]"}], "\[IndentingNewLine]", RowBox[{"min1val", "=", RowBox[{"Norm", "[", "e", "]"}]}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"Transpose", "[", "A", "]"}], ".", "e"}], "]"}], "\[IndentingNewLine]", RowBox[{"p", ".", "e"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"p", "+", "e"}], "==", "b"}]}], "Input"], Cell[TextData[{ "The example arises as a minimization problem for a quadratic form", StyleBox[", ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["which is given by", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["the inner product of the vector", FontVariations->{"CompatibilityType"->0}], StyleBox[" A x - b ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["with itself", FontVariations->{"CompatibilityType"->0}], StyleBox[". Mathematica ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["is unable to take the transpose of a vector, unless it is defined \ to be a matrix with one row.", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"P", "[", "x_List", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"A", ".", "x"}], "-", "b"}], ")"}], ".", RowBox[{"(", RowBox[{ RowBox[{"A", ".", "x"}], "-", "b"}], ")"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"{", RowBox[{"x1", ",", "x2"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Expand", "[", RowBox[{"P", "[", "x", "]"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["We use ", FontVariations->{"CompatibilityType"->0}], StyleBox["FindMinimum", "Matica"], StyleBox[" to minimize this function. The output to", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["FindMinimum", "Matica"], StyleBox[" consists of two parts, the value of the minimum and a point where \ it is attained. \nFirst, we check that the two methods yield the same vector \ where the minimum is attained.", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"minimum", ",", "location"}], "}"}], "=", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"P", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", "0"}], "}"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"xxmin", "=", RowBox[{"x", "/.", "location"}]}], "\[IndentingNewLine]", RowBox[{"xmin", "==", "xxmin"}]}], "Input"], Cell["\<\ Furthermore, we verify that both methods yield the same value for the \ minimum.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"min2val", "=", SqrtBox["minimum"]}], ";"}], "\[IndentingNewLine]", RowBox[{"min1val", "==", "min2val"}]}], "Input"], Cell[TextData[{ "We use ", StyleBox["Clear", "Matica"], StyleBox[" to remove the values assigned to the variables we just \ introduced", FontVariations->{"CompatibilityType"->0}], "." }], "Text"], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "A", ",", "b", ",", "K", ",", "c", ",", "xmin", ",", "p", ",", "e", ",", "min1val", ",", "P", ",", "x", ",", "x1", ",", "x2", ",", "minimum", ",", "location", ",", "xxmin", ",", "min2val"}], "]"}]], "Input"], Cell[TextData[{ "A final remark: all built-in ", StyleBox["Mathematica", FontSlant->"Italic"], " expressions begin with a capital letter, while expressions like E and I \ have a fixed meaning already. Therefore it is good practice to use lower case \ to denote your own expressions in ", StyleBox["Mathematica", FontSlant->"Italic"], " code. Furthermore, it is advisable to make them longer than the single \ letter ones used above. For instance, as it happens, A was not yet in use, \ but look at" }], "Text"], Cell[BoxData[ RowBox[{"?", "K"}]], "Input"], Cell[BoxData[ RowBox[{"?", "C"}]], "Input"], Cell[BoxData[ RowBox[{"?", "D"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["The built-in way", "Section"], Cell["\<\ Now we consider a new application of the method of least squares. Here is a \ table of the first 20 primes in the natural numbers. \ \>", "Text"], Cell[BoxData[ RowBox[{"tableprimes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Prime", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}]], "Input"], Cell["\<\ The following is a plot of these data (in correct English a plural). \ \>", "Text"], Cell[BoxData[ RowBox[{"plotprimes", "=", RowBox[{"ListPlot", "[", RowBox[{"tableprimes", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.015`", "]"}]}]}], "]"}]}]], "Input"], Cell[TextData[{ "From the ", StyleBox["Mathematica", FontSlant->"Italic"], " Help Browser we learn about the built-in procedure ", StyleBox["Fit", "Matica"], ". \nThis gives a linear fit to the data. " }], "Text"], Cell[BoxData[ RowBox[{"lfit", "=", RowBox[{"Fit", "[", RowBox[{"tableprimes", ",", RowBox[{"{", RowBox[{"1", ",", "t"}], "}"}], ",", "t"}], "]"}]}]], "Input"], Cell["Below is a plot of the linear fit. ", "Text"], Cell[BoxData[ RowBox[{"plotlfit", "=", RowBox[{"Plot", "[", RowBox[{"lfit", ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Blue"}]}], "]"}]}]], "Input"], Cell["Next we seek a quadratic fit to the data. ", "Text"], Cell[BoxData[ RowBox[{"qfit", "=", RowBox[{"Fit", "[", RowBox[{"tableprimes", ",", RowBox[{"{", RowBox[{"1", ",", "t", ",", SuperscriptBox["t", "2"]}], "}"}], ",", "t"}], "]"}]}]], "Input"], Cell["Here is a plot of the quadratic fit. ", "Text"], Cell[BoxData[ RowBox[{"plotqfit", "=", RowBox[{"Plot", "[", RowBox[{"qfit", ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}]}], "]"}]}]], "Input"], Cell["\<\ We show both fits superimposed on the original data. Visually, the quadratic \ fit is better than the linear one.\ \>", "Text"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"plotqfit", ",", "plotlfit", ",", "plotprimes", ",", RowBox[{"Ticks", "\[Rule]", "None"}]}], "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Comparing the errors", "Section"], Cell["\<\ We compare the errors in the linear and quadratic approximation.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"lfittable", "=", RowBox[{"Table", "[", RowBox[{"lfit", ",", RowBox[{"{", RowBox[{"t", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"qfittable", "=", RowBox[{"Table", "[", RowBox[{"qfit", ",", RowBox[{"{", RowBox[{"t", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lerror", "=", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"tableprimes", "[", RowBox[{"[", "n", "]"}], "]"}], "-", RowBox[{"lfittable", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"qerror", "=", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"tableprimes", "[", RowBox[{"[", "n", "]"}], "]"}], "-", RowBox[{"qfittable", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], ";"}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"pl1", "=", RowBox[{"ListPlot", "[", RowBox[{"lerror", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"PointSize", "[", "0.02`", "]"}]}], "}"}]}], ",", RowBox[{"Joined", "\[Rule]", "True"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"pl2", "=", RowBox[{"ListPlot", "[", RowBox[{"qerror", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "0.02`", "]"}]}], "}"}]}], ",", RowBox[{"Joined", "\[Rule]", "True"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"pl1", ",", "pl2"}], "]"}]}], "Input", CellChangeTimes->{{3.4168159273135*^9, 3.4168159364771976`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["With linear algebra", "Section"], Cell[TextData[{ "Now we want to approach this problem by means of linear algebra. Instead of \ leaving everything to the built-in function ", StyleBox["Fit", "Matica"], ", we set up the equations ourselves. \nWe wish to determine the quadratic \ polynomial whose values at the natural numbers approximate as much as \ possible those of the corresponding primes. The column of values of the \ polynomial at the points 1 through 20 is a linear combination of the columns \ of the following 20 by 3 matrix ", StyleBox["amatrix", "Matica"] }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "n", ",", SuperscriptBox["n", "2"]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[TextData[{ "In order to find the coefficients of this polynomial we must solve the \ normal equations; we do this using ", StyleBox["LinearSolve", "Matica"], ". Geometrically, this comes down to projecting the vector ", StyleBox["tableprimes", "Matica"], " belonging to ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["R", FontWeight->"Bold", FontSlant->"Plain", FontVariations->{"CompatibilityType"->0}], "20"], TraditionalForm]]], " orthogonally onto the three-dimensional linear subspace in ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["R", FontWeight->"Bold", FontSlant->"Plain", FontVariations->{"CompatibilityType"->0}], "20"], TraditionalForm]]], " spanned by the columns of ", StyleBox["amatrix.", "Matica"] }], "Text"], Cell[BoxData[{ RowBox[{"coeff", "=", RowBox[{"LinearSolve", "[", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "amatrix"}], ",", RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "tableprimes"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"myfit", "=", RowBox[{ RowBox[{"coeff", ".", RowBox[{"{", RowBox[{"1", ",", "t", ",", SuperscriptBox["t", "2"]}], "}"}]}], " "}]}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"plotmyfit", "=", RowBox[{"Plot", "[", RowBox[{"myfit", ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Magenta"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"plotmyfit", ",", "plotprimes", ",", RowBox[{"Ticks", "\[Rule]", "None"}]}], "]"}]}], "Input", CellChangeTimes->{{3.41681600597675*^9, 3.4168160137260523`*^9}}], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Show that ", StyleBox["myfit", "Matica"], " evaluated at the numbers from 1 through 20 equals the orthogonal \ projection onto the appropriate space. Then check with ", StyleBox["Mathematica", FontSlant->"Italic"], " that the error is indeed perpendicular to the approximation." }], "Exercise"], Cell[TextData[{ "Now we check that our fit agrees with the quadratic fit obtained with ", StyleBox["Fit", "Matica"], ". " }], "Text"], Cell[BoxData[{ RowBox[{"qfit", "-", "myfit"}], "\[IndentingNewLine]", RowBox[{"Chop", "[", RowBox[{"qfit", "-", "myfit"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Find a third-degree fit with the linear algebra method." }], "Exercise"], Cell["\<\ On larger intervals there are much better ways to approximate the \ distribution of primes. The Prime Number Theorem tells to use logarithms. \ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ (Optional) Approximation of the kth prime number and the number of primes\ \>", "Section"], Cell[BoxData[{ FormBox[ RowBox[{"The", " ", StyleBox[ RowBox[{ StyleBox["k", FontSlant->"Italic"], "\[Dash]th"}]], " ", "prime", " ", "number", FormBox[ SubscriptBox["p", "k"], TraditionalForm], FormBox[ RowBox[{"(", RowBox[{"k", "\[GreaterEqual]", "6"}], ")"}], TraditionalForm], "can", "be", "bounded", "in", "the", "following", RowBox[{"way", ":", FormBox[ FormBox[ RowBox[{ RowBox[{"k", "(", RowBox[{ RowBox[{"log", "(", "k", ")"}], "+", RowBox[{"log", "(", RowBox[{"log", "(", "k", ")"}], ")"}]}], ")"}], "\[GreaterEqual]", SubscriptBox["p", "k"], "\[GreaterEqual]", RowBox[{"k", "(", RowBox[{ RowBox[{"log", "(", "k", ")"}], "+", RowBox[{"log", "(", RowBox[{"log", "(", "k", ")"}], ")"}], "-", "1"}], ")"}]}], TraditionalForm], TraditionalForm]}]}], TraditionalForm], "\n", FormBox[ RowBox[{ "Here", " ", "are", " ", "these", " ", "bounds", " ", "for", " ", "the", " ", "first", " ", "1000", "primes", " ", RowBox[{"visualized", "."}]}], TraditionalForm]}], "Text"], Cell[TextData[{ "With[{n = 1000},\nPrint[Show[Graphics[{Thickness[0.002],\n ", StyleBox["(* upper bound *)", "CodeComment"], "\n {Red, Line[Table[{k, k (Log[k] + Log[Log[k]])}, {k, 2, n}]]},\n ", StyleBox["(* lower bound *)", "CodeComment"], "\n {Green, Line[Table[{k, k (Log[k] + Log[Log[k]] - 1)}, {k, 2, n}]]}, \ \n ", StyleBox["(* the primes *)", "CodeComment"], " \n {Blue, Line[Table[{k, Prime[k]}, {k, 2, \ n}]]}}],AspectRatio->.6,\n PlotRange -> All, Axes->True, \ Background->lightbluecolor, ImageSize->800] // N]] " }], "Input", GeneratedCell->False, CellChangeTimes->{{3.416815607554826*^9, 3.416815629255088*^9}, { 3.4168157529130697`*^9, 3.416815821927704*^9}, 3.4168162427389*^9}], Cell[BoxData[ FormBox[ RowBox[{"Next", " ", "we", " ", "give", " ", StyleBox["a", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[ RowBox[{ StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], " "}]], "more", " ", "precise", " ", "approximation", " ", "of", " ", RowBox[{ FormBox[ SubscriptBox["p", "k"], TraditionalForm], ".", " ", "The"}], " ", "picture", " ", "on", " ", "the", " ", "left", " ", "shows", " ", StyleBox["a", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], "plot", " ", "of", " ", "the", " ", "approximation", " ", "in", " ", "black", " ", RowBox[{"(", RowBox[{"thick", " ", "line"}], ")"}], " ", "and", " ", "the", " ", "primes", " ", "in", " ", RowBox[{"red", ".", " ", "The"}], " ", "right", " ", "picture", " ", "shows", " ", "the", " ", "relative", " ", RowBox[{"error", "."}]}], TraditionalForm]], "Text"], Cell["\<\ pApprox[k_] = k (Log[k] + Log[Log[k]] - 1 + (Log[Log[k]] - 2)/Log[k] \ -(Log[Log[k]]^2 - 6 Log[Log[k]] + 11)/Log[k]^2); With[{n = 10^4}, Print[Show[GraphicsArray[ Block[{$DisplayFunction = Identity}, {Plot[pApprox[k], {k, 2, n}, PlotStyle->{Thickness[0.02]}, (* show primes as points *) Epilog -> Table[{Red, Point[{k, Prime[k]}]}, {k, 2, n}], AxesStyle->RGBColor[0,0.5,0], PlotRange -> \ All], ListPlot[Table[N[{k, (pApprox[k] - Prime[k])/Prime[k]}], {k, 2, 10000}], PlotStyle->RGBColor[1,0,1] \t\t ]}]], ImageSize->800]]] \ \>", "Input", GeneratedCell->False, CellChangeTimes->{{3.41681628999926*^9, 3.416816314279984*^9}, 3.416816498561976*^9, {3.416816612150838*^9, 3.416816618281302*^9}, { 3.416817242317028*^9, 3.416817255173889*^9}}], Cell[TextData[{ "Determining a good approximation of \[Pi](", StyleBox["n", FontSlant->"Italic"], "), i.e. the number of primes smaller or equal to ", StyleBox["n", FontSlant->"Italic"], ", is one of the most interesting problems in mathematics. Here are some \ estimates:" }], "Text"], Cell[TextData[{ StyleBox["(* modeling step curve *)", "CodeComment"], "\nexact\[Pi][n_] := Line[(Sequence @@ {# - {0, 1}, #})& /@\n \ Thread[{Table[Prime[i], {i, n}], Table[i, {i, n}]}]];\n\n", StyleBox["(* Hadamard", "CodeComment"], "\[CloseCurlyQuote]", StyleBox["s approximation *)", "CodeComment"], "\nHadamard\[Pi][n_] := Line[Table[N[{x, x/Log[x]}],\n \ {x, 2, Prime[n], Prime[n]/120}]];\n", StyleBox["(* Gauss", "CodeComment"], "\[CloseCurlyQuote]", StyleBox["s approximation *)", "CodeComment"], "\nGauss\[Pi][n_] := Line[Table[N[{x, LogIntegral[x] - LogIntegral[2]}],\n \ {x, 2, Prime[n], Prime[n]/120}]];\n", StyleBox["(* Guiasu", "CodeComment"], "\[CloseCurlyQuote]", StyleBox["s approximation *)", "CodeComment"], "\nGuiasu\[Pi][n_] := Line[Table[N[{x,\nFunction[h, 1/h \ (LogIntegral[x^(1./h)] - LogIntegral[2.]) +\n Plus @@ \ ((LogIntegral[x^(1/#)] - LogIntegral[\n x^(1/(# + 1))])/#& /@ \ Reverse[N @ Range[h - 1]])][\n \ Floor[Log[2, x] // N]]}],\n {x, 2, Prime[n], Prime[n]/120}]];" }], "Input", GeneratedCell->False], Cell["\<\ The exact curve exhibits a characteristic step shape; the other three are \ good approximations for large numbers. \ \>", "Text", GeneratedCell->False], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"PrimeNumberSet", "[", RowBox[{"n_", ",", "opts___"}], "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"(*", RowBox[{"the", " ", "four", " ", "curves"}], "*)"}], RowBox[{"{", RowBox[{ RowBox[{"exact\[Pi]", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"7", ",", "7"}], "}"}], "]"}], ",", RowBox[{"Hadamard\[Pi]", "[", "n", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"5", ",", "5"}], "}"}], "]"}], ",", RowBox[{"Gauss\[Pi]", "[", "n", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"3", ",", "3"}], "}"}], "]"}], ",", RowBox[{"Guiasu\[Pi]", "[", "n", "]"}]}], "}"}]}], "}"}], "]"}], ",", "opts", ",", RowBox[{"Axes", "\[Rule]", "True"}]}], "]"}]}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"styledText", "[", "text_", "]"}], ":=", RowBox[{"Text", "[", RowBox[{"text", ",", RowBox[{"Background", "\[Rule]", "Blue"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"ShowLegend", "[", RowBox[{ RowBox[{"PrimeNumberSet", "[", RowBox[{"50", ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"\"\\"", "\[Rule]", "lightbluecolor"}]}], "]"}], ",", RowBox[{"(*", RowBox[{ "the", " ", "rest", " ", "is", " ", "all", " ", "for", " ", "the", " ", "legend"}], "*)"}], RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1"}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"styledText", "[", "\"\\"", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"5", ",", "5"}], "}"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0"}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"styledText", "[", "\"\\"", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"3", ",", "3"}], "}"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"styledText", "[", "\"\\"", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"AbsoluteDashing", "[", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", RowBox[{"-", "2"}]}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"styledText", "[", "\"\\"", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"LegendPosition", "\[Rule]", RowBox[{"{", RowBox[{"0.2", ",", RowBox[{"-", "0.4"}]}], "}"}]}], ",", RowBox[{"LegendSize", "\[Rule]", RowBox[{"{", RowBox[{"0.65", ",", "0.4"}], "}"}]}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.416818957022648*^9, 3.4168189639546833`*^9}, { 3.416819133223164*^9, 3.416819138252264*^9}, {3.4168191941385727`*^9, 3.416819240141706*^9}, 3.416819280219556*^9, 3.416819310639606*^9, { 3.4168195681806183`*^9, 3.416819598346422*^9}, 3.416819643637249*^9, { 3.416819705100575*^9, 3.4168197077692013`*^9}, {3.4168197603869143`*^9, 3.4168198098736277`*^9}, {3.416819881429386*^9, 3.416819886459238*^9}, { 3.416819918345943*^9, 3.416819927991447*^9}, {3.416820194140032*^9, 3.416820226920569*^9}, {3.416821360211062*^9, 3.4168213782881937`*^9}, { 3.416821684793755*^9, 3.4168216996642103`*^9}, {3.4168218052963123`*^9, 3.416821807115996*^9}, 3.4168218567880383`*^9, {3.416821900689456*^9, 3.4168220116182404`*^9}, {3.4168283069391193`*^9, 3.416828319626093*^9}, { 3.416829108549623*^9, 3.416829127779008*^9}, {3.416829168951971*^9, 3.4168291782384787`*^9}, {3.416829211348372*^9, 3.416829214657209*^9}, { 3.416829866333282*^9, 3.416829982411869*^9}, {3.4168889062724524`*^9, 3.416888916319161*^9}}, CellID->782405762], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "tableprimes", ",", "plotprimes", ",", "lfit", ",", "plotlfit", ",", "qfit", ",", "plotqfit", ",", "lfittable", ",", "qfittable", ",", "lerror", ",", "qerror", ",", "pl1", ",", "pl2", ",", "amatrix", ",", "coeff", ",", "myfit", ",", "plotmyfit", ",", "myfittable", ",", "error", ",", "amatrix3", ",", "\n", "myfit3", ",", "plotmyfit3", ",", "pApprox", ",", "exact\[Pi]", ",", "Hadamard\[Pi]", ",", "Gauss\[Pi]", ",", "Guiasu\[Pi]", ",", "PrimeNumberSet", ",", "styledText"}], "]"}]], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["A Framework for Applications and Min-Max Duality", "Subtitle"], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["Networks", FontFamily->"Arial"]], "Section"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Building an edge-node incidence matrix", FontFamily->"Arial"]], "Subsection"], Cell["\<\ For building an edge-node incidence matrix, it is helpful to start with a \ list of oriented edges. For example, let us generate the matrix on page 89. \ First we list the oriented edges in the order given by the numbering in the \ book on page 88.\ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}]}], "Input"], Cell[BoxData[ RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "listOfEdges", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", RowBox[{"Apply", "[", RowBox[{"Union", ",", "listOfEdges"}], "]"}], "]"}]}]], "Input"], Cell[TextData[{ "Now we generate the edge-node incidence matrix ", Cell[BoxData[ FormBox[ SubscriptBox["A", "0"], TraditionalForm]]], ":" }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"a0matrix", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"First", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"-", "1"}]}], ";", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"Last", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", "1"}], ";"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfEdges"}], "}"}]}], "]"}], ";", "a0matrix"}], "]"}]], "Input"], Cell[TextData[{ "Let us remove the last column (that is, we are grounding a node), which \ produces the matrix ", StyleBox["A", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"takeColumns", "[", RowBox[{"matrix_", ",", "arg_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"Take", "[", RowBox[{"#", ",", "arg"}], "]"}], "&"}], "/@", "matrix"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"takeColumns", "::", "usage"}], ":=", "\"\\""}], ";"}]}], "Input", CellChangeTimes->{{3.4168309327799664`*^9, 3.416830995005237*^9}, { 3.416831050202115*^9, 3.4168310919904737`*^9}, {3.416831219432211*^9, 3.416831232803403*^9}, {3.416832085259756*^9, 3.416832091378086*^9}, { 3.416832682345674*^9, 3.416832828300788*^9}}], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"takeColumns", "[", RowBox[{"a0matrix", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "}"}]}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.4168321172548437`*^9, 3.416832117892139*^9}}], Cell["Another way to remove the last column is:", "Text"], Cell[BoxData[ RowBox[{" ", RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Drop", "[", RowBox[{"#1", ",", RowBox[{"-", "1"}]}], "]"}], "&"}], ",", "a0matrix"}], "]"}]}], " ", "]"}]}]], "Input"], Cell[TextData[{ "Next we generate the material matrix ", StyleBox["C", FontSlant->"Italic"], ". " }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"cmatrix", "=", RowBox[{"DiagonalMatrix", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"c", ",", RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}]}], "]"}], "]"}]}], "]"}]], "Input"], Cell[TextData[{ "See the Help Browser for the procedures ", StyleBox["Plus", "Matica"], ", ", StyleBox["@@", "Matica"], " and ", StyleBox["Part", "Matica"], ". These can be used for the computation of the sum of the elements in a row \ of a matrix. For instance," }], "Text"], Cell[BoxData[{ RowBox[{"cmatrix", "[", RowBox[{"[", "2", "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Plus", "@@", RowBox[{"cmatrix", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "Input"], Cell["Now we are prepared enough for the following:", "Text"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Make Exercise 2.1.2 from the book by means of the resources of ", StyleBox["Mathematica", FontSlant->"Italic"], ". " }], "Exercise"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " ", StyleBox["Additional question. ", FontWeight->"Bold"], StyleBox["Is", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontWeight->"Bold"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", StyleBox["T", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}]], " ", "A"}], TraditionalForm]]], " an M - matrix?. " }], "Exercise"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Make Exercise 2.1.3 from the book by means of ", StyleBox["Mathematica", FontSlant->"Italic"], ". " }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Repeating a pattern in a matrix", FontFamily->"Arial"]], "Subsection"], Cell["\<\ For building composite matrices it helps if we can overwrite a part of a \ matrix with another matrix.Therefore we introduce overwriteAt\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"overwriteAt", "::", "\"\\""}], ":=", "\"\\""}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"overwriteAt", "[", RowBox[{ RowBox[{"{", "bigmatrix__List", "}"}], ",", RowBox[{"{", "smallmatrix__List", "}"}], ",", "topLeftPositionOfNew_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"block", ",", "starti", ",", "startj"}], "}"}], ",", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"amatrix", "=", RowBox[{"{", "bigmatrix", "}"}]}], ",", RowBox[{"block", "=", RowBox[{"{", "smallmatrix", "}"}]}], ",", RowBox[{"starti", "=", RowBox[{ RowBox[{"First", "[", "topLeftPositionOfNew", "]"}], "-", "1"}]}], ",", RowBox[{"startj", "=", RowBox[{ RowBox[{"Last", "[", "topLeftPositionOfNew", "]"}], "-", "1"}]}], ",", "i", ",", "j"}], "}"}], ",", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"amatrix", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"i", "+", "starti"}], ",", RowBox[{"j", "+", "startj"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"block", "\[LeftDoubleBracket]", RowBox[{"i", ",", "j"}], "\[RightDoubleBracket]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "block", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", RowBox[{"First", "[", "block", "]"}], "]"}]}], "}"}]}], "]"}], ";", "amatrix"}]}], "]"}]}], "]"}]}]], "Input"], Cell["Examples of overwriting:", "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"pmatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"p", ",", RowBox[{ RowBox[{"ToString", "[", "i", "]"}], "<>", RowBox[{"ToString", "[", "j", "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "4"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"overwriteAt", "[", RowBox[{"pmatrix", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}]}], "]"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"pmatrix", "=", RowBox[{"overwriteAt", "[", RowBox[{"pmatrix", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Make Exercise 2.1.4 from the book by means of ", StyleBox["Mathematica,", FontSlant->"Italic"], " in particular, use the technique discussed above. " }], "Exercise"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["The theory of min-max duality", "Section"], Cell[TextData[{ "The following discussion is a preparation for the upcoming lecture (pages \ 97-103); it primarily illustrates one of the results that will derived in \ that lecture. Min-max duality arises when minimizing a quadratic function \ (see page 97)\n ", StyleBox["Q", FontSlant->"Italic"], " (", StyleBox["y", FontSlant->"Italic"], ") = ", Cell[BoxData[ FormBox[ RowBox[{ FractionBox["1", "2"], " ", SuperscriptBox["y", "T"], " ", SuperscriptBox["C", RowBox[{ RowBox[{"-", "1"}], " "}]]}], TraditionalForm]]], StyleBox["y", FontSlant->"Italic"], " \[Dash] ", Cell[BoxData[ FormBox[ SuperscriptBox["b", "T"], TraditionalForm]]], StyleBox["y", FontSlant->"Italic"], " ", StyleBox["qfun[yv_]:=(1/2) (yv).cinverse.yv-bvector.yv", "Matica"], "\nunder the side conditions (or constraints) \n ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f", " "}], TraditionalForm]]], " ", StyleBox["Transpose[amatrix].yv==fvector", "Matica"], " . \nHere ", Cell[BoxData[ FormBox[ SuperscriptBox["C", RowBox[{ RowBox[{"-", "1"}], " "}]], TraditionalForm]]], " ", StyleBox["cinverse", "Matica"], " is the inverse of a given positive definite symmetric matrix ", StyleBox["C", FontSlant->"Italic"], " ", StyleBox["cmatrix", "Matica"], " and ", StyleBox["b", FontSlant->"Italic"], " ", StyleBox["bvector", "Matica"], " is a given vector. Furthermore, the matrix ", StyleBox["A", FontSlant->"Italic"], " ", StyleBox["amatrix", "Matica"], " and the vector ", StyleBox["f", FontSlant->"Italic"], " ", StyleBox["fvector", "Matica"], " are also given. The solution to this constrained minimization problem is \ given by the \"equilibrium equation\" (rewrite the system (3) on page 98 and \ also see (3) on page 91)\n\t", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " "}], TraditionalForm]]], StyleBox["C A x = ", FontSlant->"Italic"], " ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " "}], TraditionalForm]]], StyleBox["C", FontSlant->"Italic"], " ", StyleBox["b \[Dash] f", FontSlant->"Italic"], " ", StyleBox["xvector=LinearSolve[Transpose[amatrix].cmatrix.amatrix, \ Transpose[amatrix].cmatrix.bvector-fvector],", "Matica"], " \nwhere ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["xvector", "Matica"], " is an auxiliary vector from which the minimizing value ", Cell[BoxData[ FormBox[ RowBox[{" ", SubscriptBox["y", "0"], " "}], TraditionalForm]]], " ", StyleBox["yvector", "Matica"], " of ", StyleBox["y", FontSlant->"Italic"], " ", StyleBox["yv", "Matica"], " is computed through the equation \t\t\n\t", Cell[BoxData[ FormBox[ SubscriptBox["y", "0"], TraditionalForm]]], " = ", StyleBox["C", FontSlant->"Italic"], "(", StyleBox["b", FontSlant->"Italic"], " \[Dash] ", StyleBox["A x", FontSlant->"Italic"], ") ", StyleBox["yvector=cmatrix.(bvector-amatrix.xvector)", "Matica"], " .\n\nNow the remarkable fact is that ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["xvector", "Matica"], " is the solution to a different problem, called the dual problem. Indeed, \ this asks for maximizing the function \[Dash] ", StyleBox["P", FontSlant->"Italic"], "(", StyleBox["x", FontSlant->"Italic"], ") ", StyleBox["-pfun[xv],", "Matica"], " where (see (8) on page 101)\n\t", StyleBox["P", FontSlant->"Italic"], " (", StyleBox["x", FontSlant->"Italic"], ") = ", Cell[BoxData[ FormBox[ RowBox[{ FractionBox["1", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"A", " ", "x"}], " ", "-", " ", "b"}], ")"}], "T"], " ", SuperscriptBox["C", " "]}], TraditionalForm]]], StyleBox["(A x \[Dash]", FontSlant->"Italic"], " ", StyleBox["b", FontSlant->"Italic"], ") + ", Cell[BoxData[ FormBox[ SuperscriptBox["x", "T"], TraditionalForm]]], StyleBox["f", FontSlant->"Italic"], " ", StyleBox["pfun[xv_]:=(1/2) \ (amatrix.xv-bvector).cmatrix.(amatrix.xv-bvector)+xv.fvector", "Matica"], " . \nNote that p is the first letter of potential. In examples from \ physics, ", StyleBox["P", FontSlant->"Italic"], " ", StyleBox["pfun", "Matica"], " could be the potential energy. The minus sign explains why one would want \ to maximize, not minimize. If a constrained problem occurs in a model, the \ dual problem tends to have a meaning for the model too. Note that the dual \ problem is a problem without constraints. " }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Examples of duality", "Section"], Cell["\<\ We check min-max duality in a random situation. To this end, we choose a \ symmetric matrix, say 3 by 3.\ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\n", RowBox[{ RowBox[{"n", "=", "3"}], ";"}], "\n", RowBox[{ RowBox[{"randmatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"RandomReal", "[", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "n"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}]}], ";"}], "\n", TagBox[ RowBox[{"cmatrix", "=", RowBox[{"randmatrix", ".", RowBox[{"Transpose", "[", "randmatrix", "]"}]}]}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], "Input"], Cell["\<\ The symmetric matrix is probably positive definite symmetric.\ \>", "Text"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Why is this true?" }], "Exercise"], Cell[BoxData[ RowBox[{ RowBox[{"Min", "[", RowBox[{"Eigenvalues", "[", "cmatrix", "]"}], "]"}], ">", "0"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " What does this output prove? (In connection with the previous question.)" }], "Exercise"], Cell["The inverse is then also positive definite.", "Text"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Give two reasons why this is so, one using diagonalization, the other one \ coordinate-free, utilizing the expression ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["y", "T"], FormBox[ RowBox[{"C", " ", SuperscriptBox["C", RowBox[{"-", "1"}]]}], TraditionalForm], "C", "y"}], TraditionalForm]]], "." }], "Exercise"], Cell[BoxData[ RowBox[{"cinverse", "=", RowBox[{"Inverse", "[", "cmatrix", "]"}]}]], "Input"], Cell["Choose a vector", "Text"], Cell[BoxData[ TagBox[ RowBox[{"bvector", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"RandomReal", "[", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "n"}], "}"}]}], "]"}]}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Input"], Cell["We want to find the minimum of the quadratic function", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"qfun", "[", "yv_", "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"yv", ".", "cinverse", ".", "yv"}], "2"], "-", RowBox[{"bvector", ".", "yv"}]}]}]], "Input"], Cell["\<\ under some side conditions. As described above, the side conditions are in \ terms of a vector\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"m", "=", "2"}], ";"}], "\n", TagBox[ RowBox[{"fvector", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"RandomReal", "[", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}]}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], "Input"], Cell["and a matrix", "Text"], Cell[BoxData[ RowBox[{"amatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"RandomReal", "[", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "n"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "m"}], "}"}]}], "]"}]}]], "Input"], Cell[TextData[{ "To minimize ", StyleBox["Q ", FontSlant->"Italic"], "(", StyleBox["y", FontSlant->"Italic"], ") ", StyleBox["qfun[yvector]", "Matica"], " under the condition ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f"}], TraditionalForm]]], " ", StyleBox["yvector.amatrix==fvector", "Matica"], " one solves the standard equilibrium equation:" }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"xvector", "=", RowBox[{"LinearSolve", "[", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "cmatrix", ".", "amatrix"}], ",", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "cmatrix", ".", "bvector"}], "-", "fvector"}]}], "]"}]}], "]"}]], "Input"], Cell[TextData[{ "and then substitutes the resulting ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["xvector", "Matica"], " into" }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"yvector", "=", RowBox[{"cmatrix", ".", RowBox[{"(", RowBox[{"bvector", "-", RowBox[{"amatrix", ".", "xvector"}]}], ")"}]}]}], "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " ", Cell[BoxData[""], "Input", CellTags->"UCU311"], "Check that the constraint ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f"}], TraditionalForm]]], " ", StyleBox["yvector.amatrix==fvector", "Matica"], " is satisfied." }], "Exercise"], Cell["\<\ Next we compare the constrained minimum with the maximum of the dual problem. \ Put\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"pfun", "[", "xv_", "]"}], ":=", RowBox[{ RowBox[{ FractionBox["1", "2"], " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"amatrix", ".", "xv"}], "-", "bvector"}], ")"}], ".", "cmatrix", ".", RowBox[{"(", RowBox[{ RowBox[{"amatrix", ".", "xv"}], "-", "bvector"}], ")"}]}]}], "+", RowBox[{"xv", ".", "fvector"}]}]}]], "Input"], Cell[BoxData[ RowBox[{"Then", " ", "compare"}]], "Text"], Cell[BoxData[ RowBox[{"-", RowBox[{"pfun", "[", "xvector", "]"}]}]], "Input"], Cell[BoxData["with"], "Text"], Cell[BoxData[ RowBox[{"qfun", "[", "yvector", "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " ", "What do we conclude?" }], "Exercise"], Cell[TextData[{ "Apparently ", StyleBox["Mathematica", FontSlant->"Italic"], " does not contain a built-in function for \"minimizing with constraints\", \ but there is a built-in function for finding a minimum without constraints. \ We may apply it to ", StyleBox["P", FontSlant->"Italic"], " ", StyleBox["pfun", "Matica"], "." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{"minimum", ",", "location"}], "}"}], "=", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"pfun", "[", RowBox[{"{", RowBox[{"u", ",", "v"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"u", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"v", ",", "0"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"u", ",", "v"}], "}"}], "/.", "\[InvisibleSpace]", "location"}], ")"}], "-", "xvector"}]], "Input"], Cell["Did the built-in function come closer?", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"pfun", "[", RowBox[{ RowBox[{"{", RowBox[{"u", ",", "v"}], "}"}], "/.", "\[InvisibleSpace]", "location"}], "]"}], "<", RowBox[{"pfun", "[", "xvector", "]"}]}]], "Input"], Cell[TextData[{ "Weak duality is the statement that if ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f"}], TraditionalForm]]], " ", StyleBox["yvector.amatrix==fvector", "Matica"], " and ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["xv", "Matica"], " is arbitrary, then ", StyleBox["Q", FontSlant->"Italic"], " (", StyleBox["y", FontSlant->"Italic"], ") \[GreaterEqual] - ", StyleBox["P", FontSlant->"Italic"], " (", StyleBox["x", FontSlant->"Italic"], ") ", StyleBox["qfun[yv]\[GreaterEqual] -pfun[xv]", "Matica"], " ." }], "Text"], Cell[BoxData[ RowBox[{"NullSpace", "[", RowBox[{"Transpose", "[", "amatrix", "]"}], "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " What is the dimension of the set of solutions of ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f"}], TraditionalForm]]], " ", StyleBox["Transpose[amatrix].yvector==fvector", "Matica"], " ?" }], "Exercise"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Find an experimental confirmation of weak duality, using random \ perturbations of ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["xvector", "Matica"], " and admissible perturbations of ", StyleBox["y", FontSlant->"Italic"], " ", StyleBox["yvector", "Matica"], " . Here a perturbation (= small change) of ", StyleBox["y", FontSlant->"Italic"], " ", StyleBox["yvector", "Matica"], " is said to be admissible if it still satisfies ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", RowBox[{"T", " "}]], "y"}], " ", "=", " ", "f"}], TraditionalForm]]], " ", StyleBox["yvector.amatrix.==fvector", "Matica"], "." }], "Exercise"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Try other dimensions. Why does one not expect good behavior when ", StyleBox["m ", FontSlant->"Italic"], "> ", StyleBox["n", FontSlant->"Italic"], " ? Try it." }], "Exercise"], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "a1", ",", "a2", ",", "n", ",", "randmatrix", ",", "cmatrix", ",", "cinverse", ",", "bvector", ",", "qfun", ",", "m", ",", "fvector", ",", "xvector", ",", "yvector", ",", "pfun", ",", "qfun", ",", "minimum", ",", "location"}], "]"}]], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Electrical Networks", "Subtitle"], Cell[CellGroupData[{ Cell["An Exercise", "Section"], Cell["\<\ We repeat a procedure which has been introduced above, because it is needed \ once again. For building an edge-node incidence matrix, it is helpful to start with a \ list of oriented edges. For example, let us generate the matrix on page 89. \ First we list the oriented edges in the order given by the numbering in the \ book on page 88.\ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}]}], "Input"], Cell[BoxData[ RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "listOfEdges", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", RowBox[{"Apply", "[", RowBox[{"Union", ",", "listOfEdges"}], "]"}], "]"}]}]], "Input"], Cell[TextData[{ "Now we generate the edge-node incidence matrix ", Cell[BoxData[ FormBox[ SubscriptBox["A", "0"], TraditionalForm]]], ":" }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"a0matrix", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"First", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"-", "1"}]}], ";", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"Last", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", "1"}], ";"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfEdges"}], "}"}]}], "]"}], ";", "a0matrix"}], "]"}]], "Input"], Cell[TextData[{ "Let us remove the last column (that is, we are grounding a node), which \ produces the matrix ", StyleBox["A", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"takeColumns", "[", RowBox[{"matrix_", ",", "arg_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"Take", "[", RowBox[{"#", ",", "arg"}], "]"}], "&"}], "/@", "matrix"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"takeColumns", "::", "usage"}], ":=", "\"\\""}], ";"}]}], "Input", CellChangeTimes->{{3.4168309327799664`*^9, 3.416830995005237*^9}, { 3.416831050202115*^9, 3.4168310919904737`*^9}, {3.416831219432211*^9, 3.416831232803403*^9}, {3.416832085259756*^9, 3.416832091378086*^9}, { 3.416832682345674*^9, 3.416832828300788*^9}}], Cell[BoxData[ RowBox[{"?", "takeColumns"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"takeColumns", "[", RowBox[{"a0matrix", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "}"}]}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.416831893793363*^9, 3.416831894942471*^9}}], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Make Exercise 2.3.2 from the book by means of ", StyleBox["Mathematica", FontSlant->"Italic"], ". \nBefore starting the formal computations, try to determine the strengths \ of the currents, by using the symmetry in the network. \nIn addition, \ describe in physical terms the meaning of the five equations ", StyleBox["e", FontSlant->"Italic"], " = \[Dash] ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "0"], " ", "x"}], TraditionalForm]]], " and also of the two equations ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", "T"], " ", "y"}], " ", "=", " ", "f"}], TraditionalForm]]], ". \n\nFor the formal computation, note that ", StyleBox["1 ", FontWeight->"Bold"], StyleBox["on page 113 may be helpful", FontVariations->{"CompatibilityType"->0}], StyleBox[". ", FontWeight->"Bold"], StyleBox["Further", FontVariations->{"CompatibilityType"->0}], StyleBox[", ", FontWeight->"Bold"], StyleBox["n", FontVariations->{"CompatibilityType"->0}], "otice that the last question in the exercise amounts to determining the Th\ \[EAcute]venin equivalent of the network, as defined at the bottom of page \ 117. \n\nWarning: ", StyleBox["in ", FontVariations->{"CompatibilityType"->0}], StyleBox["Mathematica", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontVariations->{"CompatibilityType"->0}], StyleBox["I", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" denotes a square root of \[Dash]1, so do not use this symbol in \ your code to denote current.", FontVariations->{"CompatibilityType"->0}] }], "Exercise"], Cell["\<\ Before starting on a new problem, use Clear to remove your current \ definitions. These depend on your choice of nomenclature, below you find the \ choices of the authors of this notebook.\ \>", "Text"], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "listOfEdges", ",", "numberOfEdges", ",", "numberOfNodes", ",", "a0matrix", ",", "amatrix", ",", "xvector", ",", "vvector", ",", "ivector", ",", "bvector", ",", "xxvector", ",", "aamatrix", ",", "fvector"}], "]"}]], "Input"], Cell["To find out what has been introduced so far, you may use", "Text"], Cell[BoxData[ RowBox[{"?", "Global`*"}]], "Input"], Cell[TextData[{ "You probably do not want to clear them all. For instance ", StyleBox["lightbluecolor", "Matica"], " may stay." }], "Text"], Cell["What also works:", "Text"], Cell[BoxData[ RowBox[{"?", "`*"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["An Example", "Section"], Cell[TextData[{ "We discuss part 2 of Exercise 2.3.4 concerning the network on page 110. We \ set up de matrices ", Cell[BoxData[ FormBox[ SubscriptBox["A", "0"], TraditionalForm]]], " and ", StyleBox["A", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "listOfEdges", "]"}]}], "\[IndentingNewLine]", RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", RowBox[{"Apply", "[", RowBox[{"Union", ",", "listOfEdges"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"a0matrix", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"First", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"-", "1"}]}], ";", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"Last", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", "1"}], ";"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfEdges"}], "}"}]}], "]"}], ";", "a0matrix"}], "]"}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Drop", "[", RowBox[{"#1", ",", RowBox[{"-", "1"}]}], "]"}], "&"}], ",", "a0matrix"}], "]"}]}], " ", "]"}]}]}], "Input"], Cell[TextData[{ "According to the data the matrix ", StyleBox["C", FontSlant->"Italic"], " is the identity matrix. We determine the new forcing term ", StyleBox["b ", FontSlant->"Italic"], StyleBox["in terms of", FontVariations->{"CompatibilityType"->0}], StyleBox[" V", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"takeColumns", "[", RowBox[{"matrix_", ",", "arg_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"Take", "[", RowBox[{"#", ",", "arg"}], "]"}], "&"}], "/@", "matrix"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"takeColumns", "::", "usage"}], ":=", "\"\\""}], ";"}]}], "Input", CellChangeTimes->{{3.4168309327799664`*^9, 3.416830995005237*^9}, { 3.416831050202115*^9, 3.4168310919904737`*^9}, {3.416831219432211*^9, 3.416831232803403*^9}, {3.416832085259756*^9, 3.416832091378086*^9}, { 3.416832682345674*^9, 3.416832828300788*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"aamatrix", "=", RowBox[{"takeColumns", "[", RowBox[{"amatrix", ",", "1"}], "]"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"bvector", "=", RowBox[{"-", RowBox[{"aamatrix", ".", RowBox[{"{", RowBox[{"{", "vol", "}"}], "}"}]}]}]}]}]}]], "Input", CellChangeTimes->{{3.4168321304186773`*^9, 3.4168321375551577`*^9}, { 3.416832170520702*^9, 3.416832171247961*^9}}], Cell[TextData[{ "Furthermore, the matrix A has to be replaced by the A with its first column \ removed; we denote this again by ", StyleBox["amatrix", "Matica"], ". Then we solve the equilibrium equation ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["A", "T"], " ", "A", " ", "x"}], " ", "=", " ", RowBox[{ SuperscriptBox["A", "T"], " ", "b"}]}], TraditionalForm]]], " for the 1 by 1 vector ", StyleBox["x", FontSlant->"Italic"], " with component ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["x", FontSlant->"Italic"], "2"], TraditionalForm]]], ", the potential of node 2." }], "Text"], Cell[BoxData[{ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"takeColumns", "[", RowBox[{"amatrix", ",", RowBox[{"-", "1"}]}], "]"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "amatrix", " ", ".", RowBox[{"{", RowBox[{"{", "x2", "}"}], "}"}]}], "==", RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "bvector"}]}], ",", "x2"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"x2", "=", RowBox[{"x2", "/.", "%"}]}]}], "Input", CellChangeTimes->{{3.4168321800173197`*^9, 3.416832181240553*^9}}], Cell[TextData[{ "The vector ", StyleBox["y", FontSlant->"Italic"], " of currents in the network is given by the defining equation ", StyleBox["y", FontSlant->"Italic"], " = ", StyleBox["b \[Dash] ", FontSlant->"Italic"], Cell[BoxData[ FormBox["A", TraditionalForm]]], StyleBox[" x", FontSlant->"Italic"], ". According to Kirchhoff's current law the currents into the three nodes \ are given by the vector ", Cell[BoxData[ FormBox[ SuperscriptBox[ SubscriptBox["A", "0"], "T"], TraditionalForm]]], StyleBox["y ", FontSlant->"Italic"], "; hence the", StyleBox[" ", FontSlant->"Italic"], "desired current ", StyleBox["I", FontSlant->"Italic"], " into node 3 is obtained by taking the third component of that vector. \ Furthermore, the network resistance is given by ", Cell[BoxData[ RowBox[{ StyleBox["R", FontSlant->"Italic"], StyleBox["=", FontSlant->"Italic"], FractionBox[ StyleBox["V", FontSlant->"Italic"], StyleBox["I", FontSlant->"Italic"]]}]]], "." }], "Text"], Cell[BoxData[{ RowBox[{"yvector", "=", RowBox[{"bvector", "-", RowBox[{"amatrix", " ", "x2"}]}]}], "\[IndentingNewLine]", RowBox[{"current", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Transpose", "[", "a0matrix", "]"}], ".", "yvector"}], ")"}], "[", RowBox[{"[", RowBox[{"3", ",", "1"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"vol", "/", "current"}]}], "Input"], Cell[TextData[{ "Finally, an independent computation of ", StyleBox["I", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Apply", "[", RowBox[{"Plus", ",", "yvector"}], "]"}], "-", RowBox[{"yvector", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{ "listOfEdges", ",", "numberOfEdges", ",", "numberOfNodes", ",", "a0matrix", ",", "amatrix", ",", "aamatrix", ",", "bvector", ",", "vol", ",", "x2", ",", "yvector", ",", "current"}], "]"}]}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["An Exercise", "Section"], Cell["\<\ Now we go back to the network from page 89, described at the beginning of \ this Subsection Networks. Let us consider the case where there are no \ batteries, while a current flows from node 1 to node 4, which is grounded. \ Say all edges have a resistance of 1 Ohm. \ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "listOfEdges", "]"}]}], "\[IndentingNewLine]", RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", RowBox[{"Apply", "[", RowBox[{"Union", ",", "listOfEdges"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"a0matrix", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"First", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"-", "1"}]}], ";", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"a0matrix", "\[LeftDoubleBracket]", RowBox[{"j", ",", RowBox[{"Last", "[", RowBox[{ "listOfEdges", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "\[RightDoubleBracket]"}], "=", "1"}], ";"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfEdges"}], "}"}]}], "]"}], ";", "a0matrix"}], "]"}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Drop", "[", RowBox[{"#1", ",", RowBox[{"-", "1"}]}], "]"}], "&"}], ",", "a0matrix"}], "]"}]}], " ", "]"}]}]}], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Find the resistance between nodes 1 and 4 in the sense of ", StyleBox["1", FontWeight->"Bold"], " on page 113 of the network from page 89 by means of the equilibrium \ equation \n", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " "}], TraditionalForm]]], StyleBox["C A x = ", FontSlant->"Italic"], " ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " "}], TraditionalForm]]], StyleBox["C", FontSlant->"Italic"], " ", StyleBox["b \[Dash] f", FontSlant->"Italic"], " . To this end, ground node 1 and fix the potential at node 4.\nCan you \ give a physical explanation of your results?" }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell["(Optional) Plotting graphs", "Section"], Cell["\<\ The package Graphplot can be used to make nice pictures of graphs. We do it \ here for the graph defined above and leave it to the students to explore the \ options of the package and apply it to other graphs.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"<<", "\"\\""}], ";"}]], "Input"], Cell[BoxData[{ RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"edges", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"#1", "[", RowBox[{"[", "1", "]"}], "]"}], "->", RowBox[{"#1", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "&"}], " ", "/@", " ", "listOfEdges"}]}]}], "Input"], Cell[BoxData[{ RowBox[{"vertices", "=", RowBox[{"VertexList", "[", "edges", "]"}]}], "\n", RowBox[{ RowBox[{"coord", "=", RowBox[{"GraphCoordinates", "[", "edges", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"vertexfn", "=", RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"White", ",", RowBox[{"EdgeForm", "[", "Black", "]"}], ",", RowBox[{"Disk", "[", RowBox[{"#", ",", ".1"}], "]"}], ",", "Black", ",", RowBox[{"Text", "[", RowBox[{"#2", ",", "#1"}], "]"}]}], "}"}], "&"}], ")"}]}], ";"}]}], "Input", CellChangeTimes->{{3.416890149966178*^9, 3.416890161515547*^9}, { 3.416890243431129*^9, 3.416890250739848*^9}, {3.416890680017008*^9, 3.4168907265571213`*^9}, {3.41689089017843*^9, 3.416890911276204*^9}}], Cell[BoxData[ RowBox[{"GraphPlot", "[", RowBox[{"edges", ",", RowBox[{"VertexRenderingFunction", "\[Rule]", "vertexfn"}]}], "]"}]], "Input", CellChangeTimes->{{3.4168901282185287`*^9, 3.416890133280387*^9}, { 3.4168902594798594`*^9, 3.416890270396872*^9}, {3.416890349154821*^9, 3.416890452850049*^9}, {3.41689060855121*^9, 3.416890615662623*^9}, { 3.416890749335376*^9, 3.4168907562944317`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["Impedances", FontFamily->"Arial"]], "Section"], Cell[TextData[{ "Impedances arise when a circuit is driven by an alternating voltage of \ frequency \[Omega] (see pages 115-118). A typical RLC circuit has impedance \n\ \t", StyleBox["R ", FontSlant->"Italic"], "+ i (\[Omega]", StyleBox["L ", FontSlant->"Italic"], "\[Dash] ", Cell[BoxData[ FormBox[ FractionBox["1", StyleBox[ RowBox[{"\[Omega]", StyleBox["C", FontSlant->"Italic"]}]]], TraditionalForm]]], "), \nwhich is a complex number. In tuning to a frequency one exploits the \ dependence of the impedance on frequency. One then cares about the location \ of the minimum of the absolute value. The frequency where the minimum is \ attained is called the resonance frequency." }], "Text"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Choose some values for ", StyleBox["R", FontSlant->"Italic"], ", ", StyleBox["L", FontSlant->"Italic"], ", ", StyleBox["C", FontSlant->"Italic"], " and find the minimum of the magnitude of the corresponding impedance of \ the circuit. Make a plot of the magnitude of the impedance in a neighborhood \ of this minimum. Next, keeping the resonant frequency \[Omega] fixed, modify \ your choices of ", StyleBox["R", FontSlant->"Italic"], ", ", StyleBox["L", FontSlant->"Italic"], ", ", StyleBox["C", FontSlant->"Italic"], " so that the magnitude of the impedance of the circuit is at least twice as \ large as the impedance at resonance, for a current of frequency that is one \ percent less than \[Omega]." }], "Exercise"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Trusses: Part I", FontFamily->"Arial"]], "Subtitle"], Cell[TextData[{ StyleBox["Conventions. ", FontFamily->"Arial", FontWeight->"Bold"], StyleBox["In order to describe a truss, one usually starts by labeling the \ nodes linearly but in a two\[Dash]dimensional manner, that is, alternating \ from left to right, and then from bottom to top; in other words, just \ contrary to the conventions for matrices. Horizontal, and vertical, \ displacements at a node are said to be positive if they are to the right, and \ upward, respectively. The edges are labeled by means of the lexicographic \ ordering determined by the nodes. One usually starts with a listOfNodes \ containing the coordinates of the nodes and then produces the listOfEdges in \ lexicographic order: this list consists of pairs of labels of the nodes which \ determine an edge ", FontFamily->"Arial"], "with the lower label coming first", StyleBox[". In case of symmetry one uses ", FontFamily->"Arial"], StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" as much as possible to create these lists. On the basis of these \ data plots and ", FontFamily->"Arial"], "edge-node incidence matrices, etc. are generated employing ", StyleBox["Mathematica", FontSlant->"Italic"], StyleBox[" too. In particular, we successively develop the modules: \n\ \[FilledSmallCircle] ", FontFamily->"Arial"], "trussData", StyleBox["\n\[FilledSmallCircle] ", FontFamily->"Arial"], "trussPlot", StyleBox["\n\[FilledSmallCircle] ", FontFamily->"Arial"], "trussMatrix", StyleBox["\n\[FilledSmallCircle] ", FontFamily->"Arial"], "trussComputation", StyleBox["\n\[FilledSmallCircle] ", FontFamily->"Arial"], "trussDisplacePlot\n\[FilledSmallCircle] trussTensionPlot\n\ \[FilledSmallCircle] trussVerification\n\[FilledSmallCircle] trussEigenPlot\n\ \[FilledSmallCircle] trussBending" }], "Text", Background->RGBColor[0.835294, 1, 0.835294]], Cell[TextData[{ StyleBox["Plotting trusses.", FontFamily->"Arial", FontWeight->"Bold"], " Here is a method for quickly plotting rather arbitrary trusses composed of \ isosceles triangles with one right angle by hand." }], "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\n", RowBox[{ RowBox[{"W", "=", "1"}], ";", RowBox[{"H", "=", "1"}], ";"}], "\n", RowBox[{ RowBox[{"shift", "[", RowBox[{"fr_", ",", "k_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", RowBox[{"k", " ", "W"}]}], ",", RowBox[{"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"reflh", "[", "fr_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{ "#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "+", "W"}], ",", RowBox[{"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"reflv", "[", "fr_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{ RowBox[{"-", RowBox[{ "#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "+", "W"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"framebr", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "H"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"framebl", "=", RowBox[{"reflh", "[", "framebr", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frametr", "=", RowBox[{"reflv", "[", "framebr", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frametl", "=", RowBox[{"reflv", "[", "framebl", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frameGraph", "[", "f_List", "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"darkbluecolor", ",", RowBox[{"AbsoluteThickness", "[", "2.5`", "]"}], ",", RowBox[{"Line", "[", "f", "]"}]}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"frames", "=", RowBox[{"GraphicsRow", "[", RowBox[{"frameGraph", "/@", RowBox[{"{", RowBox[{"framebr", ",", "framebl", ",", "frametr", ",", "frametl"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"frames", ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "1", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", "0"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "2", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametl", ",", "0"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "3", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", RowBox[{"-", "1"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "4", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametr", ",", RowBox[{"-", "1"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "5", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", RowBox[{"-", "2"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "6", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametr", ",", RowBox[{"-", "2"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "7", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", RowBox[{"-", "3"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "8", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", "1"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "9", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametl", ",", "1"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "10", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", "2"}], "]"}]}], ";"}], "\n", RowBox[{"trussfig", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"darkbluecolor", ",", RowBox[{"AbsoluteThickness", "[", "2.5`", "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"Line", "[", RowBox[{"frame", "[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "10"}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{"trussfig", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Pratt truss", FontFamily->"Arial", FontWeight->"Bold"], StyleBox[": ", FontFamily->"Arial", FontSize->14], StyleBox["a simple truss structure. Except for the end sections, the \ diagonal edges all slant down toward the center of the span. Patented by \ Caleb and Thomas Pratt in 1844, this was among the most common American \ bridge types for the ensuing decades and was built in both wood and metal. \ Since almost all diagonal edges are subject to tension forces only, they can \ be thinner, allowing for a more economical design. The top chord and \ verticals are mainly in compression and were made of wood, while the bottom \ chord and inclined edges were made of iron. This Pratt truss was built \ through the 19th century and was cited as a continued form by bridge \ engineers as late as 1908. The Pratt truss survived the transition to metal \ construction and was widely built as an all-metal truss well into the 20th \ century. There are many variations on the basic Pratt truss. \nHere is a \ plot.", FontFamily->"Arial"] }], "Text"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .25397 %%ImageSize: 800 203.175 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Background color .859 .969 .969 r MFill % Scaling calculations 0.5 0.15873 0.047619 0.15873 [ [ 0 0 0 0 ] [ 1 .25397 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .25397 L 0 .25397 L closepath clip newpath .133 .172 .633 r .015 w .02381 .04762 Mdot .18254 .04762 Mdot .18254 .20635 Mdot .34127 .04762 Mdot .34127 .20635 Mdot .5 .04762 Mdot .5 .20635 Mdot .65873 .04762 Mdot .65873 .20635 Mdot .81746 .04762 Mdot .81746 .20635 Mdot .97619 .04762 Mdot .5 Mabswid [ ] 0 setdash .02381 .04762 m .18254 .04762 L .02381 .04762 L .18254 .20635 L .18254 .04762 L .18254 .20635 L .18254 .04762 L .34127 .04762 L .18254 .20635 L .34127 .04762 L .18254 .20635 L .34127 .20635 L .34127 .04762 L .34127 .20635 L .34127 .04762 L .5 .04762 L .34127 .20635 L .5 .04762 L .34127 .20635 L .5 .20635 L .5 .04762 L .5 .20635 L .5 .04762 L .65873 .04762 L .5 .04762 L .65873 .20635 L .5 .20635 L .65873 .20635 L .65873 .04762 L .65873 .20635 L .65873 .04762 L .81746 .04762 L .65873 .04762 L .81746 .20635 L .65873 .20635 L .81746 .20635 L .81746 .04762 L .81746 .20635 L .81746 .04762 L .97619 .04762 L .81746 .20635 L .97619 .04762 L s 1 0 0 r .015 w .02381 .04762 Mdot .97619 .04762 Mdot .133 .172 .633 r [(1)] .10317 .06349 0 0 Mshowa [(2)] .07937 .12698 0 0 Mshowa [(3)] .16667 .12698 0 0 Mshowa [(4)] .2619 .06349 0 0 Mshowa [(5)] .28571 .12698 0 0 Mshowa [(6)] .2619 .22222 0 0 Mshowa [(7)] .3254 .12698 0 0 Mshowa [(8)] .42063 .06349 0 0 Mshowa [(9)] .44444 .12698 0 0 Mshowa [(10)] .42063 .22222 0 0 Mshowa [(11)] .48413 .12698 0 0 Mshowa [(12)] .57937 .06349 0 0 Mshowa [(13)] .55556 .12698 0 0 Mshowa [(14)] .57937 .22222 0 0 Mshowa [(15)] .64286 .12698 0 0 Mshowa [(16)] .7381 .06349 0 0 Mshowa [(17)] .71429 .12698 0 0 Mshowa [(18)] .7381 .22222 0 0 Mshowa [(19)] .80159 .12698 0 0 Mshowa [(20)] .89683 .06349 0 0 Mshowa [(21)] .92063 .12698 0 0 Mshowa 1 0 0 r [(1)] .02381 .02381 0 0 Mshowa [(2)] .18254 .02381 0 0 Mshowa [(3)] .18254 .23016 0 0 Mshowa [(4)] .34127 .02381 0 0 Mshowa [(5)] .34127 .23016 0 0 Mshowa [(6)] .5 .02381 0 0 Mshowa [(7)] .5 .23016 0 0 Mshowa [(8)] .65873 .02381 0 0 Mshowa [(9)] .65873 .23016 0 0 Mshowa [(10)] .81746 .02381 0 0 Mshowa [(11)] .81746 .23016 0 0 Mshowa [(12)] .97619 .02381 0 0 Mshowa % End of Graphics MathPictureEnd \ \>"], "InlineFormula", ImageSize->{800, 203.125}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztndl3VFUWxouqCgptG0W7OyhoDCBT4qwEwQkVR+xRxdmAKKgIQkImwHme 6NX/Qf877bLbB5/8H/rZt3TurXBqV9XvVH3JR7OyVvcDlcve+9v3+845996q c8+wb2z88KGjY+NHDo4NPnJi7PjhIwdPDu49dmLeVFtRqdQGK5XKPwYrxfHc /OHCx1zlp7mfmh8bio/C9/MvvzQ/hoqPFf93LVvXmuK4XlTpTDo6UxxVamU9 F0fFv9JbLUyn09F0QtSSbSLZqunoinC+qyH3NNjOZuPqLbbzxHPmvhbzgqvB rS37eJf4q3oomMnZ+noSvEC8W20U16sWZvUSL0NrrY1h9gLQroGtvwft00KD Kv6SvNn/Xg3UwXZ5+3VXaxZcB4n2kpWYT6WsNQ4Y7xXQq5U07wN0hc60qsrS rybvZFfvlYHNMrlhLhNX2X5WpjpfWRka/nvzaBpsHd628i2PLy2spxpH85HN o0mwdXjb2k95vDo1u9VFZPNoAmwd3nls/0XKOFcElR//Lj4u6rmXb8buraI8 WpVrFacWru35w/L6Lv6tbG8kzYa8cEsqoou/E6m9xjznI/rIUfwrEdlU8jka qdoukWsgaAJslKwmYinOwRIXwg4EndeCf1zMUxexFOdgiQth1wad68B/UszT J2IpzsESF8JeE3SuB/8JMc9KEUtxDpa4EPbaoPM68L8r5rlExFKcgyUuhF0X dF4P/puLz3phuge8ZLsVbJeCbVfxWS1Mt4sIsg0nftV0dPeisbXEZTfE7YC4 WyBufSjLQfAThs5HpUrYVWBraK+32OaPqVIITraR8rOvxbaQFqkuNkcV4nfm qgEfTR1yb4LQ60Lt3JBr6ULtlCXcl2sDq/U6UeFkGwYblSNdCvl8Xv2MZjl1 SB+B0OtD/QyBn+o0Wz9aaf8KbM3bkoog2/ZsW+1djvl89fb6qeVuWTsXWZ/b wDYYKmQD+KkSicuuNlvxly62y/TKpLZAcLKRVPrmR805n4+L+l5dEtXKVrDd EGplY45OaaKT706tm4rw1zpdqnyCk21zopi5fdNdS0nUuy3u6Fb4HWZqKkOh /DeBn6589SFP2MtzV1Q1Vw2EINsWsFVT5vardtFZarkso+kc9XREJb0hlPSN 4D8CtjfB1i9iKc7BEhfCbgw6N4P/sJjnChFLcQ6WuBB2U9BJreYNMc+VIpbi HCxxIeyNQSfdwV8X86wRsRTnYIkLYTcHnXT9HhLzXCViKc7BEhfCbgk66Q79 mpjnahFLcQ6WuBB2a9BJvy8Oinl+I2IpzsESF8JuCzrp+XlAzPNbEUtxDpa4 EHZ70Enf9sbEPL8TsRTnYIkLYYeDTvpd8aqYZ0DEUpyDJS6EHQk66bfpK2Ke tSKW4hwscSHsTUEn9Vu9LOah1yqEpTgHS1wIe3PQeRv4XxLz0GsVwlKcgyUu hL0l6KSu3hfFPPRahbAU52CJC2FvDTrvAP8LYh56rUJYinOwxIWwtwWdd4L/ eTEPvVYhLMU5WOJC2NuDzrvA/5yYh16rEJbiHCxxIewdQSf1se8X89ArD8JS nIMlLoS9M+gcBf+zYh56eUBYinOwxIWwdwWd1L/8jJhnSMRSnIMlLoTdEXRS j+HTYh7q2yYsxTlY4kLY0aCT+tP+Iuah3mLCUpyDJS6E3Rl0Uo/pn8U81CtL WIpzsMSFsHcHndQL/CcxD/WJEpbiHCxxIeyuoJPeRfxRzEN9ooSlOAdLXAi7 O+i8D/x/EPNQnyhhKc7BEhfC3hN03g/+34t5qE+UsBTnYIkLYe8NOh8A/1Ni HuoTJSzFOVjiQtj7gs494N8n5qE+UcJSnIMlLoS9P+h8EPxPinmoT5SwFOdg iQthHwg6HwL/E2Ie6hMlLMU5WOJC2D1B58Pgf1zMQ32ihKU4B0tcCPtg0LkX /I+JeahPlLAU52CJC2EfCjofAf+jYh7qEyUsxTlY4kLYh4NO8qvaqU+UsBTn YFXOe4NOKhtqy5SH+kQJS3EONquJ4hZ0UlunexPloT5RwlKcgyUuhH006KR7 Fz1rKA/1iRKW4hwscSHsY0EnPYvouwPloT5RwlKcgyUuhH086KTvFvRdkPJQ nyhhKc7BEhfCPhF00ndF+m5PeahPlLAU52CJC2GfDDrpuz/9VqM8oyKW4hws cSHsvqCTfsvRb2/KQ32ihKU4B0tcCPtU0Fn+Fi3HJdIIs/IpXY6fozHDlLuM K030ZoSyUM/NZSnL2sSvmo5oqsXG5G1OoaARnSOt+Wq5fJta8wk6KDPNVCC9 q0Bl7PUhDI0ga3xL7hhmSgPyKSU1AXoxS/Kpo5EG8w2AjYqY5hw1Ogv1QefE k34w0ehsmsNGnXh0XhrFrZ6X5pRR2VKdEufYSUoXLDUjdYaVWuf00pv4U6c8 8fPbUO96oDqkTgWn7RBn57zUdqhM6RyUL7YderhQXZe3oOwjg9iUg75LE71k VttJf8pCQ2ac1lFNiuj+OLJQem33pOyDRW0H9PDKTsrKno1KijITg1j79BWK ap+6L7JzM4WnD72Op4dqPl/Hw/BCNw+6cPKVxw8vauTUUNRzbe9yLnpg0Y1D rSLK1/lmrqMaaMD0MIfmpzz2bpDrOSXdm/IpO+AD6aKrpSNqlhtb4zoTEeWt baDeV9OmpZxmSy8QnSk/cYqnPJWR8b1e+RWkvJnSCOvh5KUKot885deD8tzr 0pGKXZPORl9yL8wjg+Y/bIMCO8+dzrC5Szx9PaJ3k01G1E6pdPoTotfXShpP MyranH4C5/e/yu/poHM/+NU+mT1iHHF1+nNUfs8EnTTeTe1jc/rxyOacg2zP Bp00flHtM3X6ZZ3+VpXf/qCTxqOqfeBOP7vTf67yey7opPHF6jsN572J8z5E 5fd80EnjxdV3VM57MOf9lsrvhaCTxv+r7xyd95rO+0qV34tBJ83nUN8hO++p nffPKr+Xgk6an6OOCXDGHTjjCVR+LwedNN9KHePhjCNxxoeo/F4JOg+AXx2z 44wLcsb7qPxeDTppPqQ6BssZ5+WM31L5jQWdNL9VHVPnjNtzxuOp/A4EnTRf WR0j6YzDdMZXqvwOBp00/1wd8+qMq3XGy6r8Xgs6aT0BdQyzM07aGf+s8jsU dNL6EOqYdGfcuzOeXeX3etBJ632ocwyceQzO/ASV3xtBJ63fos4ZcealOPNN VH6Hg863wK/OAXLmGTnzh1R+R4LOt8Gvzuly5o0588FUfm8GnUfBPyTanHmA zvw+ld9bQec74FfnXO4X44irM19T5fd20HkM/OocWmeeLtmcc5DtaNB5HPzq nGhn3rUzn1rl907QScvwqnPcnXn0zvx4ld+xoJOWIFbXLHDWRXDWO1D5HQ86 aUlpdQ0KZ50LZ/0Kld+7QSctEa6uKeKsW+KsR6LyOxF00pLv6hoxzjo0zvoy Kr+TQSct4a+u+eOsK+SsF6TyGw86J8E/INqcdaKc9Z9UfhNB5xT41TW5Dohx xNVZz0vldyronAa/usaas44b2ZxzkG0y6JwBv7pmnrMun7PenspvKuicBb+6 BqKzzqKzfqLKbzroPA1+dU1LZ91MZz1Mld9M0HkG/Ooapc46qM76piq/2aDz LPjVNWeddW2d9WpVfqeDzvfAr64h7KxT7Kw/rPI7E3S+D351TWhn3WlnPWmV 39mg8wPwq2uGU18hxRFXsjnnINt7QeeH4FeXqKe+QoojrmRzzkG294POj8Cv boZAfYUUR1zJ5pyDbB8EnR+DX92Pg/oKKY64ks05B9k+DDo/Ab+6Lwz1FVIc cSWbcw6yfRR0fgp+dU8i6iukOOJKNuccZPs46PwM/Or2VtRXSHHElWzOOcj2 SdD5OfjVbc2crdOcLdFUfp8GnV+AX92mztkKz9niTuX3WdD5JfjVbQedrQ2d LQtVfp8HnV+BX91G0tmq0tmCUuX3RdD5NfjVbUGdrUedLUVVfl8Gnd9gWy/+ l9ultZqrndJL/LtvIEv5vgoMvy2Om/vbtu10OwHeb9vRi9qDd1mhmxsi9y0n bt+l8ld3p/4uoM+l1jKVjrrvln0uoJfJ5t8/FsfVRLNtuYaJZKMbzUlA/DPk /lcZ1TELrdGXq8+EpHtm/j6k5/3+4lAN20sb3Er3zJLoSNvO0Q2v2qVWWyOX RuwSjD//d9Kuzlb/VCrGzOTK8RTQ3KNsohfoh/ZrqdZsN7nSpJdT6oOV6+Sv DevcQodzLR1VysPWeipN041rd/6omo7irfHcgtyInmv2f0bzNNjOgG0KbDWw fRNo/A38WWFC3FI4UOGSvmbhEpulKKWSpRqY4spaCo1Mvc8CbLbbWTvMU6l0 aukoPk3bSrmeUtXT+as5Jr1ELZNn7f+gq7LiPwnO64M=\ \>"], ImageRangeCache->{{{0, 799}, {202.125, 0}} -> {-3.16246, -0.300008, \ 0.00791604, 0.00791604}}], Cell[TextData[{ "For building an edge-node incidence matrix of a truss, start with a list of \ nodes, ", StyleBox["listOfNodes", "Matica"], ", with the ordering as given. \nIn case of this specific Pratt truss, \ assume that the shorter edges have lengths equal to 1 and that node 6 is \ located at (0,0). \nThen create a list of edges, ", StyleBox["listOfEdges", "Matica"], ". All our constructions will be based on these two lists. Begin by \ introducing the module trussData." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"listOfNodes", "=", RowBox[{"Union", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "listOfNodes", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfRestrictions", "=", "4"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"n", "[", "j_", "]"}], ":=", RowBox[{ "listOfNodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"coordinates", " ", "of", " ", "j"}], "-", RowBox[{"th", " ", "node"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"listOfFixedNodes", "=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "1", "]"}], ",", RowBox[{"n", "[", "numberOfNodes", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"len", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12"}], "}"}]}], "}"}]}], " ", ";"}], " ", RowBox[{"(*", " ", "endpoints", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"lh", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{"numberOfNodes", "-", "2"}], ",", "1"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"lv", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{"numberOfNodes", "-", "2"}], ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", "vertical", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ldu", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "6", ",", "8", ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ldd", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "3", ",", "5", ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "down"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"listOfEdges", "=", RowBox[{"Union", "[", RowBox[{"len", ",", "lh", ",", "lv", ",", "ldu", ",", "ldd"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"end", " ", "input", " ", "data"}], " ", "*)"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"trussData", "[", RowBox[{ "lnodes_List", ",", "r_", ",", "lfnodes_List", ",", "ledges_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "e", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "lnodes", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"numberOfFreeNodVar", "=", RowBox[{ RowBox[{"2", "numberOfNodes"}], "-", "numberOfRestrictions"}]}], ";", "\[IndentingNewLine]", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "ledges", "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"e", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "j", "]"}], ",", RowBox[{"n", "[", "k", "]"}]}], "}"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "pair", " ", "of", " ", "coordinates", " ", "of", " ", "nodes"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"listOfEdgeEnds", "=", RowBox[{"Map", "[", RowBox[{"e", ",", "ledges"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "coordinates", " ", "of", " ", "begin", " ", "and", " ", "end", " ", "of", " ", "edges"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"nodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015", "]"}], ",", RowBox[{"Point", "[", RowBox[{ "lnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "lnodes", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fixnodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"redcolor", ",", RowBox[{"PointSize", "[", "0.015", "]"}], ",", RowBox[{"Point", "[", RowBox[{ "lfnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "lfnodes", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"edges", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"listOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "now", " ", "we", " ", "represent", " ", "the", " ", "information"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", RowBox[{"Length", "[", "lnodes", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "numberOfFreeNodVar", "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", RowBox[{"Length", "[", "ledges", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "lnodes", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "ledges", "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Clear", "[", "e", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trussData", "[", RowBox[{ "listOfNodes", ",", "numberOfRestrictions", ",", "listOfFixedNodes", ",", "listOfEdges"}], "]"}], ";"}]}], "Input"], Cell["\<\ One can use the data above for directly creating a plot of the truss. \ Actually, we create the module trussPlot to do this. It requires the output \ of the module trussData.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"trussPlot", "[", RowBox[{"lnodes_List", ",", "ledges_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "n", ",", "e", ",", "ee", ",", "p", ",", "ntext", ",", "nodestext", ",", "etext", ",", "edgestext"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"n", "[", "j_", "]"}], ":=", RowBox[{ "lnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "positioning", " ", "of", " ", "label", " ", "near", " ", "node"}], ",", " ", RowBox[{"first", " ", "bottom"}], ",", " ", RowBox[{"then", " ", "top"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ntext", "[", "j_", "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"n", "[", "j", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "==", "0"}], ",", RowBox[{"Text", "[", RowBox[{"j", ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "-", RowBox[{"{", RowBox[{"0", ",", ".15"}], "}"}]}]}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"n", "[", "j", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "==", "1"}], ",", RowBox[{"Text", "[", RowBox[{"j", ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{"0", ",", ".15"}], "}"}]}]}], "]"}]}], "]"}]}], " ", ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"all", " ", "labels", " ", "near", " ", "all", " ", "nodes"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"nodestext", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ntext", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"preparation", " ", "for", " ", "the", " ", "following"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"e", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "j", "]"}], ",", RowBox[{"n", "[", "k", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}], "]"}]}], " ", ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "label", " ", "of", " ", "the", " ", "edge", " ", "from", " ", "j"}], "-", RowBox[{"th", " ", "to", " ", "k"}], "-", RowBox[{"th", " ", "node"}]}], " ", "*)"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"p", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Position", "[", RowBox[{"listOfEdgeEnds", ",", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "positioning", " ", "of", " ", "label", " ", "near", " ", "edge"}], " ", "*)"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"etext", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], " ", "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", " ", RowBox[{".5", ",", " ", ".1"}], "}"}]}]}], "]"}], ",", " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}], "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{ RowBox[{"-", ".1"}], ",", " ", ".5"}], " ", "}"}]}]}], "]"}], ",", " ", RowBox[{"(*", " ", "vertical", " ", "*)"}], "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", " ", RowBox[{".65", ",", RowBox[{"-", ".5"}]}], " ", "}"}]}]}], "]"}], " ", ",", " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "down"}], " ", "*)"}], "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", " ", RowBox[{".35", ",", " ", ".5"}], " ", "}"}]}]}], "]"}]}], "]"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "all", " ", "labels", " ", "after", " ", "removal", " ", "of", " ", "some", " ", "superfluous", " ", "text"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"edgestext", "=", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"etext", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberOfNodes"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "numberOfNodes"}], "}"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"{", "n_", "}"}], "}"}], "->", "n"}], ",", RowBox[{"Null", "->", RowBox[{"Sequence", "[", "]"}]}], ",", RowBox[{ RowBox[{"Text", "[", RowBox[{ RowBox[{"{", "}"}], ",", "_"}], "]"}], "->", RowBox[{"Sequence", "[", "]"}]}]}], "}"}]}], "/.", RowBox[{ RowBox[{"{", "}"}], "->", RowBox[{"Sequence", "[", "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ "darkbluecolor", ",", "nodes", ",", "edges", ",", "fixnodes", ",", "edgestext"}], "}"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "nodestext"}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"-", "0.3"}], ",", "1.3"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}]}], " ", "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"trussPlot", "[", RowBox[{"listOfNodes", ",", "listOfEdges"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Below we express the elongation of an ", FontFamily->"Arial"], "edge", StyleBox[" in terms of the coordinates ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ RowBox[{ StyleBox["(", FontSize->16], StyleBox[ RowBox[{ StyleBox["xr", FontSlant->"Italic"], ",", StyleBox["xu", FontSlant->"Italic"]}], FontSize->14], StyleBox[")", FontSize->16]}], TraditionalForm]], FontSize->18], " of the displacements of certain nodes. ", StyleBox["The variable in the description of the ", FontFamily->"Arial"], "edge", StyleBox[" is the label of the node from which the ", FontFamily->"Arial"], "edge", StyleBox[" is issuing, except for the ", FontFamily->"Arial"], "edge", StyleBox["s issuing from the fixed nodes. Furthermore, diagonal down or up \ is reckoned from left to right.", FontFamily->"Arial"], StyleBox[" ", FontFamily->"Arial", FontSize->14] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"s", "=", FractionBox["1", SqrtBox["2"]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"eh", "[", "1", "]"}], " ", "=", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "1", "]"}]}], "+", RowBox[{"xr", "[", "2", "]"}]}]}], ";"}], " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"eh", "[", "j_", "]"}], " ", ":=", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "2"}], "]"}]}]}], " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ev", "[", "j_", "]"}], " ", ":=", RowBox[{ RowBox[{"-", RowBox[{"xu", "[", "j", "]"}]}], "+", RowBox[{"xu", "[", RowBox[{"j", "+", "1"}], "]"}]}]}], " ", RowBox[{"(*", " ", "vertical", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"edd", "[", "j_", "]"}], ":=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "+", RowBox[{"xu", "[", "j", "]"}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "1"}], "]"}], "-", RowBox[{"xu", "[", RowBox[{"j", "+", "1"}], "]"}]}], ")"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "down"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"edu", "[", "j_", "]"}], ":=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "-", RowBox[{"xu", "[", "j", "]"}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "3"}], "]"}], "+", RowBox[{"xu", "[", RowBox[{"j", "+", "3"}], "]"}]}], ")"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"edu", "[", "1", "]"}], " ", "=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "1", "]"}]}], "-", RowBox[{"xu", "[", "1", "]"}], "+", RowBox[{"xr", "[", "3", "]"}], "+", RowBox[{"xu", "[", "3", "]"}]}], ")"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}]}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Give arguments that the formulae above indeed describe the elongations of \ the edges of the truss as depicted above. " }], "Exercise"], Cell["\<\ We use the procedure Join in order to display the elongations of all 21 \ edges: first the 10 horizontal edges, then the 5 vertical and finally the 6 \ diagonal ones.\ \>", "Text"], Cell[BoxData[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"eh", "[", "1", "]"}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"eh", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{"numberOfNodes", "-", "2"}]}], "}"}]}], "]"}]}], "]"}], "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{"ev", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{"numberOfNodes", "-", "2"}], ",", "2"}], "}"}]}], "]"}], "\n", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"edu", "[", "1", "]"}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"edd", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "3", ",", "5", ",", "2"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"edu", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "6", ",", "8", ",", "2"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"edd", "[", "11", "]"}], "}"}]}], "]"}], StyleBox[" ", FormatType->StandardForm]}]}], "Input"], Cell[TextData[{ "We reconstruct the ", StyleBox["21 by 24", FontFamily->"Arial"], " edge\[Dash]node incidence matrix ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->14], TraditionalForm]]], " from the system of equations ", StyleBox["e = ", FontSize->14, FontSlant->"Italic"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->14], TraditionalForm]]], StyleBox[" x", FontSize->14, FontSlant->"Italic"], StyleBox[".", FontSlant->"Italic"], " A simple but not so smart method is as follows. " }], "Text"], Cell[BoxData[{ RowBox[{"elongtable", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"eh", "[", "1", "]"}], ",", RowBox[{"edu", "[", "1", "]"}], ",", RowBox[{"ev", "[", "2", "]"}], ",", RowBox[{"eh", "[", "2", "]"}], ",", RowBox[{"edd", "[", "3", "]"}], ",", RowBox[{"eh", "[", "3", "]"}], ",", RowBox[{"ev", "[", "4", "]"}], ",", RowBox[{"eh", "[", "4", "]"}], ",", RowBox[{"edd", "[", "5", "]"}], ",", RowBox[{"eh", "[", "5", "]"}], ",", RowBox[{"ev", "[", "6", "]"}], ",", RowBox[{"eh", "[", "6", "]"}], ",", RowBox[{"edu", "[", "6", "]"}], ",", RowBox[{"eh", "[", "7", "]"}], ",", RowBox[{"ev", "[", "8", "]"}], ",", RowBox[{"eh", "[", "8", "]"}], ",", RowBox[{"edu", "[", "8", "]"}], ",", RowBox[{"eh", "[", "9", "]"}], ",", RowBox[{"ev", "[", "10", "]"}], ",", RowBox[{"eh", "[", "10", "]"}], ",", RowBox[{"edd", "[", "11", "]"}]}], "}"}], ",", RowBox[{"Range", "[", "21", "]"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"elong", "=", RowBox[{"elongtable", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"displ", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"xr", "[", "j", "]"}], ",", RowBox[{"xu", "[", "j", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"a00matrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Coefficient", "[", RowBox[{ RowBox[{"elong", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{ "displ", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"2", "numberOfNodes"}]}], "}"}]}], "]"}]}]}], "Input"], Cell[TextData[{ "Here is the module trussMatrix that also can be applied in different \ situations. We want to verify that it leads to the matrix ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->16], TraditionalForm]], FontSize->18], " just computed. Furthermore, we will determine the matrix ", StyleBox["A ", FontSlant->"Italic"], StyleBox["occurring in the compatibility equation ", FontVariations->{"CompatibilityType"->0}], StyleBox["e", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" = ", FontVariations->{"CompatibilityType"->0}], StyleBox["A x, ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["whose dimensions are", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], "numberOfEdges by numberOfFreeNodVar, that is, 21 by 20 in the present \ situation. \nTo this end we introduce the following notation for the fixed \ nodes:\n1, for one left and one right; \n2, for two left;\n3, for \ two left and two right. \nThis is necessary, because conditions can not be \ symbolic (which would introduce ambiguities)." }], "Text", CellTags->"UCU311"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"takeColumns", "[", RowBox[{"matrix_", ",", "arg_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"Take", "[", RowBox[{"#", ",", "arg"}], "]"}], "&"}], "/@", "matrix"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"takeColumns", "::", "usage"}], ":=", "\"\\""}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trussMatrix", "[", RowBox[{"lnodes_List", ",", "ledges_List", ",", "fix_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "lnodes", "]"}]}], ",", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "ledges", "]"}]}], ",", "j", ",", "k", ",", "n", ",", "e", ",", "ee", ",", "p", ",", "cond"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"n", "[", "j_", "]"}], ":=", RowBox[{ "lnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"e", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "j", "]"}], ",", RowBox[{"n", "[", "k", "]"}]}], "}"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}], "]"}]}], " ", ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"p", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Position", "[", RowBox[{"listOfEdgeEnds", ",", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"cond", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], " ", "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"eh", " ", "[", "j", "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"ev", " ", "[", "j", "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"edd", "[", "j", "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "==", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ")"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"edu", "[", "j", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"elongtable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"cond", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberOfNodes"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"elongtable", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"Union", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"elongtable", ",", "1"}], "]"}], "/.", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", "_"}], "}"}], "\[Rule]", "Null"}]}], "]"}], ",", "1"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"All", ",", "2"}], "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{"displ", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"xr", "[", "j", "]"}], ",", RowBox[{"xu", "[", "j", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"a0matrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Coefficient", "[", RowBox[{ RowBox[{ "elongtable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{ "displ", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"2", "numberOfNodes"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Plain\"]], FontSlant->\"Italic\"]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "a0matrix", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{ "j", ",", "k", ",", "n", ",", "e", ",", "ee", ",", "p", ",", "cond"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"takeColumns", "[", RowBox[{"a0matrix", ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"-", "3"}]}], "}"}]}], "]"}], ",", RowBox[{"fix", "==", "2"}], ",", RowBox[{"takeColumns", "[", RowBox[{"a0matrix", ",", RowBox[{"-", "numberOfFreeNodVar"}]}], "]"}], ",", RowBox[{"fix", "==", "3"}], ",", RowBox[{"takeColumns", "[", RowBox[{"a0matrix", ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{"-", "5"}]}], "}"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{{3.41683199700362*^9, 3.416832065441815*^9}, { 3.416833029524214*^9, 3.416833031371148*^9}}], Cell[TextData[{ "We determine the matrix ", StyleBox["A ", FontSlant->"Italic"], StyleBox["occurring in the compatibility equation ", FontVariations->{"CompatibilityType"->0}], StyleBox["e", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" = ", FontVariations->{"CompatibilityType"->0}], StyleBox["A x, ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["whose dimensions are", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], "numberOfEdges by numberOfFreeNodVar, that is, 21 by 20 in the present \ situation. " }], "Text"], Cell[BoxData[ RowBox[{"amatrix", "=", RowBox[{"trussMatrix", "[", RowBox[{"listOfNodes", ",", "listOfEdges", ",", "1"}], "]"}]}]], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Explain the relation between this ", StyleBox["A", FontSlant->"Italic"], " and the matrix ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->16], TraditionalForm]], FontSize->18], " computed above." }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Is the Pratt truss stable or unstable?", StyleBox[" If stable, is it statically determinate or indeterminate?", FontFamily->"Arial"] }], "Exercise"], Cell[TextData[{ StyleBox["Suppose the elastic constant of every ", FontFamily->"Arial"], "edge", StyleBox[" equals 80 and apply external downward forces equal to 0.4 at all \ the free bottom nodes and equal to 0.2 at all top nodes. Then we compute the \ norm of the total force ", FontFamily->"Arial"], StyleBox["f, ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" the vector ", FontFamily->"Arial"], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" of displacements of the free nodes and its norm, as well as the \ vector y of internal forces in the ", FontFamily->"Arial"], "edge", StyleBox["s and its norm by means of the following module. ", FontFamily->"Arial"] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"cmatrix", "=", RowBox[{"DiagonalMatrix", "[", RowBox[{"Table", "[", RowBox[{"80.", ",", RowBox[{"{", RowBox[{"k", ",", "numberOfEdges"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"EvenQ", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "0.4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "0.2"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{ RowBox[{"numberOfFreeNodVar", "/", "2"}], "+", "1"}]}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"trussComputation", "[", RowBox[{"cmat_List", ",", "f_List", ",", "fix_", ",", RowBox[{"showMatrices_:", "False"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"kmatrix", "=", RowBox[{"Chop", "[", RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "cmat", ".", "amatrix"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"x", "=", RowBox[{"LinearSolve", "[", RowBox[{"kmatrix", ",", "f"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"e", "=", RowBox[{"amatrix", ".", "x"}]}], ";", "\[IndentingNewLine]", RowBox[{"y", "=", RowBox[{"cmatrix", ".", "e"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"showMatrices", ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"action", " ", "if", " ", "True"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"Italic\"]\) of elastic constants\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "cmat", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "kmatrix", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) at free nodes jointly with labels of corresponding \ nodes\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"2", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "2"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "numberOfNodes"}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "3"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", RowBox[{"numberOfNodes", "-", "2"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"Italic\"]\)\[VerticalSeparator]\[VerticalSeparator] of external \ force\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "f", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) of free nodes\!\(\* StyleBox[\" \", FontSlant->\"Italic\"]\)jointly with labels of corresponding nodes\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"2", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "2"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "numberOfNodes"}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "3"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", RowBox[{"numberOfNodes", "-", "2"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "x", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) in edges jointly with labels of corresponding \ edges\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", "numberOfEdges", "]"}], ",", "y"}], "}"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "y", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"action", " ", "if", " ", "False"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"Italic\"]\) at free nodes jointly with labels of corresponding \ nodes\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"2", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "2"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "numberOfNodes"}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "3"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", RowBox[{"numberOfNodes", "-", "2"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"f", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"Italic\"]\)\[VerticalSeparator]\[VerticalSeparator] of external \ force\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "f", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) of free nodes\!\(\* StyleBox[\" \", FontSlant->\"Italic\"]\)jointly with labels of corresponding nodes\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"2", ",", RowBox[{"numberOfNodes", "-", "1"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "2"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "numberOfNodes"}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"fix", "==", "3"}], ",", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", RowBox[{"numberOfNodes", "-", "2"}]}], "]"}], ",", RowBox[{"Partition", "[", RowBox[{"x", ",", "2"}], "]"}]}], "}"}], "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "x", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) in edges jointly with labels of corresponding \ edges\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Table", "[", RowBox[{"{", RowBox[{ RowBox[{"Range", "[", "numberOfEdges", "]"}], ",", "y"}], "}"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Norm", "[", "y", "]"}], "]"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trussComputation", "[", RowBox[{"cmatrix", ",", "f", ",", "1", ",", "True"}], "]"}], ";"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " ", StyleBox["List which horizontal ", FontFamily->"Arial"], "edge", StyleBox["s are in compression or in tension, and the same question for the \ vertical ", FontFamily->"Arial"], "edge", StyleBox["s and the diagonal ones. ", FontFamily->"Arial"], StyleBox[" \n", FontFamily->"Arial", FontSize->18], StyleBox["Use the symmetry of the truss with respect to the central vertical \ ", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], "edge", StyleBox[" as a check on the validity of your computations", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[".", FontFamily->"Arial", FontSize->18] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " ", StyleBox["Finally, compute the reaction forces at the fixed nodes. Verify \ that the vector sum of the applied and the reaction forces equals 0, in \ particular, that the sum of the vertical components of the applied forces \ equals minus the sum of the vertical components of the reaction forces.", FontFamily->"Arial"] }], "Exercise"], Cell[TextData[{ "We depict the results graphically. ", StyleBox["In the code below ", FontFamily->"Arial"], StyleBox["x ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["is as usual the nodal displacement", FontFamily->"Arial"], StyleBox[".", FontFamily->"Arial", FontSlant->"Italic"] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"trussDisplacePlot", "[", "fix_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"xx", ",", "dn", ",", "de", ",", "dedges"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"truss", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ "darkbluecolor", ",", "nodes", ",", "edges", ",", "fixnodes"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xx", ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "==", "1"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "x", ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "]"}], ",", RowBox[{"fix", "==", "2"}], ",", " ", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", "x"}], "]"}], ",", RowBox[{"fix", "==", "3"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", "x", ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"dn", "[", "j_", "]"}], ":=", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{ RowBox[{"xx", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", "j"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"xx", "\[LeftDoubleBracket]", RowBox[{"2", "j"}], "\[RightDoubleBracket]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"de", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"dn", "[", "j", "]"}], ",", RowBox[{"dn", "[", "k", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"dlistOfEdgeEnds", "=", RowBox[{"Map", "[", RowBox[{"de", ",", "listOfEdges"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dnodes", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015", "]"}], ",", RowBox[{"Point", "[", RowBox[{"dn", "[", "j", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dedges", " ", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"dlistOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dtruss", " ", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "dnodes", ",", "dedges", ",", "fixnodes"}], "}"}], "]"}]}], ";", "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"{", RowBox[{"truss", ",", "dtruss"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"-", "0.6"}], ",", "1.2"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"produces", ":", " ", RowBox[{"dlistOfEdgeEnds", " ", "and", " ", "dtruss"}]}], ",", " ", RowBox[{"for", " ", "use", " ", "in", " ", "trussTensionPlot"}]}], " ", "*)"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"trussDisplacePlot", "[", "1", "]"}]}], "Input"], Cell[BoxData[{ RowBox[{"trussTensionPlot", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tens", ",", "dtrusstens"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"tens", "[", "i_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"y", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "\[GreaterSlantEqual]", "0"}], ",", "darkbluecolor", ",", "redcolor"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dtrusstens", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"tens", "[", "i", "]"}], ",", RowBox[{"Line", "[", RowBox[{"dlistOfEdgeEnds", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberOfEdges"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"Thickness", "[", ".002", "]"}], "]"}], ",", "dtruss", ",", "dtrusstens", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "dnodes"}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"-", "0.6"}], ",", "1.2"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "trussTensionPlot"}], "Input", CellChangeTimes->{{3.416833201711033*^9, 3.4168333040925713`*^9}, { 3.416833374043589*^9, 3.416833555081506*^9}}] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Trusses: Part II", FontFamily->"Arial"]], "Subtitle"], Cell[TextData[{ StyleBox["We", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontWeight->"Bold"], StyleBox["verify that the principle of virtual work, Castigliano's energy \ principle and the Hellinger\[Dash]Reissner principle all apply in the case of \ the preceding Pratt truss.\nTo this end, evaluate the cells in Trusses: Part \ I. This can be done at one stroke by selecting this part of the notebook and \ pressing shift \[Dash] enter. ", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[BoxData[{ RowBox[{"trussVerification", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"P1", ",", "P2", ",", "minsol", ",", "xmin"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"f", ".", "x"}], "==", RowBox[{"y", ".", "e"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"potential\", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\" \", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"energy\", FontVariations->{\"CompatibilityType\"->0}]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"P1", ":=", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"x", ".", RowBox[{"(", RowBox[{"kmatrix", ".", "x"}], ")"}]}]}], "-", RowBox[{"f", ".", "x"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "P1", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\{\"CompatibilityType\"->0}]\)]\)\!\(\* StyleBox[\" \", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"energy\", FontVariations->{\"CompatibilityType\"->0}]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"P2", ":=", RowBox[{ FractionBox["1", "2"], RowBox[{"y", ".", RowBox[{"(", RowBox[{ RowBox[{"Inverse", "[", "cmatrix", "]"}], ".", "y"}], ")"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "P2", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\<\!\(\* StyleBox[\"Castigliano\", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"'\", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"s\", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\" \", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"energy\", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\" \", FontVariations->{\"CompatibilityType\"->0}]\)\!\(\* StyleBox[\"principle\", FontVariations->{\"CompatibilityType\"->0}]\)\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"P1", "==", RowBox[{"-", "P2"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"Italic\"]\) found above by solving the equilibrium equation\>\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Off", "[", RowBox[{"FindMinimum", "::", "lstol"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"P", "[", "\[Xi]_List", "]"}], ":=", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"\[Xi]", ".", RowBox[{"(", RowBox[{"kmatrix", ".", "\[Xi]"}], ")"}]}]}], "-", RowBox[{"f", ".", "\[Xi]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Xi]vec", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"\[Xi]", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfFreeNodVar"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"minsol", ":=", RowBox[{ RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"P", "[", "\[Xi]vec", "]"}], ",", RowBox[{"{", RowBox[{"\[Xi]vec", ",", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"j", ",", "numberOfFreeNodVar"}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{ StyleBox["AccuracyGoal", "MR"], " ", StyleBox["->", "MR"], " ", StyleBox["Infinity", "MR"]}]}], " ", "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xmin", "=", RowBox[{"\[Xi]vec", "/.", "minsol"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"P", "[", "xmin", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Chop", "[", RowBox[{"Norm", "[", RowBox[{"xmin", "-", "x"}], "]"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{"P1", ",", "P2", ",", "minsol", ",", "xmin"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", RowBox[{"trussVerification", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) found above\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{"yy", "=", RowBox[{"LinearSolve", "[", RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ",", "f"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)\>\"", StyleBox["]", FontSlant->"Italic"]}], "\[IndentingNewLine]", RowBox[{"ynullvec", "=", RowBox[{"Flatten", "[", RowBox[{"NullSpace", "[", RowBox[{"Transpose", "[", "amatrix", "]"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"q", "[", "\[Tau]_", "]"}], ":=", RowBox[{"FullSimplify", "[", RowBox[{ FractionBox["1", "2"], RowBox[{ RowBox[{"(", RowBox[{"yy", "+", RowBox[{"\[Tau]", " ", "ynullvec"}]}], ")"}], ".", RowBox[{"(", RowBox[{ RowBox[{"Inverse", "[", "cmatrix", "]"}], ".", RowBox[{"(", RowBox[{"yy", "+", RowBox[{"\[Tau]", " ", "ynullvec"}]}], ")"}]}], ")"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Off", "[", RowBox[{"FindMinimum", "::", "fmgz"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"q", "[", "\[Tau]", "]"}], ",", RowBox[{"{", RowBox[{"\[Tau]", ",", "0"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"q", "[", "\[Tau]", "]"}], ",", RowBox[{"{", RowBox[{"\[Tau]", ",", "0"}], "}"}]}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ymin", "=", RowBox[{ RowBox[{"yy", "+", RowBox[{"\[Tau]", " ", "ynullvec"}]}], "/.", "%"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Chop", "[", RowBox[{"Norm", "[", RowBox[{"ymin", "-", "y"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{"yy", ",", "ynullvec", ",", "ymin", ",", "q"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) found above\>\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Q", "[", "y_List", "]"}], ":=", RowBox[{ FractionBox["1", "2"], RowBox[{"y", ".", RowBox[{"(", RowBox[{ RowBox[{"Inverse", "[", "cmatrix", "]"}], ".", "y"}], ")"}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"L", "[", RowBox[{"y_List", ",", "x_List"}], "]"}], ":=", RowBox[{ RowBox[{"Q", "[", "y", "]"}], "+", RowBox[{"x", ".", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", "amatrix", "]"}], ".", "y"}], "-", "f"}], ")"}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Eta]vec", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"\[Eta]", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"\[Eta]", "[", "i", "]"}]], " ", RowBox[{"L", "[", RowBox[{"\[Eta]vec", ",", "\[Xi]vec"}], "]"}]}], "==", "0"}], ",", RowBox[{"{", RowBox[{"i", ",", "numberOfEdges"}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"\[Xi]", "[", "j", "]"}]], " ", RowBox[{"L", "[", RowBox[{"\[Eta]vec", ",", "\[Xi]vec"}], "]"}]}], "==", "0"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfFreeNodVar"}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cond", "=", RowBox[{"Join", "[", RowBox[{"%%", ",", "%"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"var", "=", RowBox[{"Join", "[", RowBox[{"\[Eta]vec", ",", "\[Xi]vec"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol", "=", RowBox[{"Solve", "[", RowBox[{"cond", ",", "var"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yymin", "=", RowBox[{"\[Eta]vec", "/.", RowBox[{"Flatten", "[", "sol", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"xxmin", "=", RowBox[{"\[Xi]vec", "/.", RowBox[{"Flatten", "[", "sol", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Chop", "[", RowBox[{"Norm", "[", RowBox[{"yymin", "-", "y"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"L", "[", RowBox[{"yymin", ",", "xxmin"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yymin", "==", RowBox[{"cmatrix", ".", "amatrix", ".", "x"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"yymin", "-", RowBox[{"cmatrix", ".", "amatrix", ".", "x"}]}], "]"}], "==", RowBox[{"0", " ", "yymin"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{ "Q", ",", "L", ",", "\[Xi]vec", ",", "\[Eta]vec", ",", "cond", ",", "var", ",", "sol", ",", "yymin", ",", "xxmin"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], StyleBox["Explain concisely, in words and formulae, what the code above does \ establish precisely. References to statements in the book are appreciated.", FontVariations->{"CompatibilityType"->0}] }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Midterm Project", FontFamily->"Arial"]], "Subtitle"], Cell[TextData[{ StyleBox["This part of the notebook contains problems that jointly \ constitute the Midterm Project. \nThe first questions all apply to the \ preceding case of the Pratt truss. To this end, evaluate the cells in \ Trusses: Parts I and II. \nThe ultimate time of electronic submission of this \ part of the notebook is ", FontVariations->{"CompatibilityType"->0}], StyleBox["Thursday, March 22 at 14:00 hour", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}], StyleBox[".", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell[TextData[{ StyleBox["Exercise. Answer the following five questions.\n\n", FontWeight->"Bold"], "Study the spectral properties of the stiffness matrix ", StyleBox["K = ", FontSlant->"Italic"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " ", "C", " ", "A"}], TraditionalForm]]], StyleBox[" ", FontSlant->"Italic"], StyleBox["that", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], StyleBox["occurs in the equilibrium equation", FontVariations->{"CompatibilityType"->0}], StyleBox[" K x = f ", FontSlant->"Italic"], StyleBox["; here ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" represents the displacements at the free nodes and ", FontVariations->{"CompatibilityType"->0}], StyleBox["f", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" the external forces at these nodes, see page 126.", FontVariations->{"CompatibilityType"->0}], " In other words, study the eigenvalues of ", StyleBox["K", FontSlant->"Italic"], " and the corresponding, say normalized, eigenvectors of ", StyleBox["K", FontSlant->"Italic"], ". \nWhat do these eigenvalues and eigenvectors mean for the truss? To this \ end, note that a, say normalized, eigenvector ", StyleBox["x", FontSlant->"Italic"], " of ", StyleBox["K ", FontSlant->"Italic"], StyleBox["corresponding to an eigenvalue", FontVariations->{"CompatibilityType"->0}], StyleBox[" \[Lambda] ", FontSlant->"Italic"], StyleBox["satisfies", FontVariations->{"CompatibilityType"->0}], StyleBox[" K ", FontSlant->"Italic"], "x ", StyleBox["= f ", FontSlant->"Italic"], "where", StyleBox[" f = ", FontSlant->"Italic"], "\[Lambda]", StyleBox[" x ", FontSlant->"Italic"], StyleBox[".", FontVariations->{"CompatibilityType"->0}], StyleBox[" \n", FontSlant->"Italic"], StyleBox["Determine", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], "what kind of changes of shape in the truss require little force and which \ need probably much more.\n\n\[FilledSmallCircle] 1. In particular, consider \ its eigenvalues and the corresponding eigenvectors. Furthermore, determine \ whether all eigenvalues are distinct and compute the matrix formed by \n \ the inner products of the eigenvectors. Could one have predicted the \ result? How should one normalize an eigenvector ", StyleBox["x", FontSlant->"Italic"], " corresponding to an eigenvalue \[Lambda] in order to have \n a \ force ", StyleBox["f", FontSlant->"Italic"], " of norm 1, where ", StyleBox["K x = f ", FontSlant->"Italic"], "?\n\[FilledSmallCircle] 2. Write the force ", StyleBox["f", FontSlant->"Italic"], " considered in an exercise above (that is, ", StyleBox["external downward forces equal to 0.4 at all the free bottom nodes \ and equal to 0.2 at all top nodes) ", FontFamily->"Arial"], "\n as a linear combination of the eigenvectors. \n For which \ eigenvalue makes the corresponding eigenvector the largest contribution to \ this sum? \n Which multiple of a unit eigenvector corresponding to the \ smallest eigenvalue is the least squares approximation to ", StyleBox["f", FontSlant->"Italic"], ". \n Using the preceding representation of ", StyleBox["f,", FontSlant->"Italic"], " it is easy to find the solution ", StyleBox["x ", FontSlant->"Italic"], "; do this and compare the results. Do some experiments as to which \ eigenvectors give the main contributions to ", StyleBox["x.", FontSlant->"Italic"], "\n\[FilledSmallCircle] 3. Study the eigendeformations of the truss, that \ is, deformations determined by an eigenvector. Notice that sometimes the plot \ of the truss when deformed by an \n eigendeformation, is a \ asymmetric, more specifically., it is not invariant under the reflection in \ the vertical axis passing through (0,0) . Show how to obtain the \ \"reflected\" \n deformation. Hint: keep in mind that the eigenspaces \ all are of dimension one.\n\[FilledSmallCircle] 4. Compute formally the total \ potential energy of the truss when deformed by an eigendeformation. Deduce \ that an eigenvector corresponding to the eigenvalue \[Lambda] should \n \ have norm ", Cell[BoxData[ FormBox[ StyleBox[ FractionBox["1", SqrtBox["\[Lambda]"]], FontSize->18], TraditionalForm]]], "if one wants this energy to have the constant value \[Dash]", Cell[BoxData[ StyleBox[ FractionBox["1", "2"], FontSize->18]]], ". (As the potential energy is energy stored in the deformed truss, it costs \ energy ", Cell[BoxData[ StyleBox[ FractionBox["1", "2"], FontSize->18]]], "to deform the \n original truss.)\n\[FilledSmallCircle] 5. Do you \ think this truss provided with its elasticity as given would make a safe \ bridge for trains hauling freight? To this end, subject the truss to forces \ of norm 1, but also deformations of energy \n equal to \[Dash]", Cell[BoxData[ StyleBox[ FractionBox["1", "2"], FontSize->18]]], "." }], "Exercise"], Cell[TextData[{ "For simplicity we now give the stiffness matrix ", StyleBox["K", FontSlant->"Italic"], ". " }], "Text"], Cell[BoxData[ FormBox[ RowBox[{"kmatrix", "=", RowBox[{"(", "\[NoBreak]", GridBox[{ {"160.`", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "80.`", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "160.`", "0", RowBox[{"-", "40.00000000000001`"}], "40.00000000000001`", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", RowBox[{"-", "80.`"}], "0", "160.`", "40.00000000000001`", RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, { RowBox[{"-", "80.`"}], "0", RowBox[{"-", "40.00000000000001`"}], "40.00000000000001`", "200.`", RowBox[{"-", "40.00000000000001`"}], "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "40.00000000000001`", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "120.`", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "200.`", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "40.00000000000001`", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", RowBox[{"-", "80.`"}], RowBox[{"-", "40.00000000000001`"}], "120.`", "40.00000000000001`", RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", RowBox[{"-", "80.`"}], "0", RowBox[{"-", "40.00000000000001`"}], "40.00000000000001`", "240.`", "0", "0", "0", RowBox[{"-", "80.`"}], "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "40.00000000000001`", RowBox[{"-", "40.00000000000001`"}], "0", "160.`", "0", RowBox[{"-", "80.`"}], "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "160.`", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "80.`", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "200.`", "40.00000000000001`", "0", "0", RowBox[{"-", "80.`"}], "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}]}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "40.00000000000001`", "120.`", "0", RowBox[{"-", "80.`"}], "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}]}, {"0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "80.`"}], "0", "0", "0", "200.`", "40.00000000000001`", "0", "0", RowBox[{"-", "80.`"}], "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", RowBox[{"-", "80.`"}], "40.00000000000001`", "120.`", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "80.`"}], "0", "0", "0", "160.`", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "80.`", "0", RowBox[{"-", "80.`"}]}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "80.`"}], "0", "0", "0", "160.`", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "40.00000000000001`"}], RowBox[{"-", "40.00000000000001`"}], "0", "0", "0", RowBox[{"-", "80.`"}], "0", "160.`"} }], "\[NoBreak]", ")"}]}], TraditionalForm]], "Input"], Cell[TextData[{ StyleBox["In answering the questions above one might use the following ", FontVariations->{"CompatibilityType"->0}], StyleBox["Mathematica", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" module. As input variables, it requires an eigenvalue ", FontVariations->{"CompatibilityType"->0}], StyleBox["l", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[", one of the numbers 1, 2 or 3 as in the ", FontVariations->{"CompatibilityType"->0}], "module trussMatrix, a text of your choice, and a function ", StyleBox["mul ", FontSlant->"Italic"], "(of multiplier), for instance, 1/Sqrt[#] & denotes the function \[Lambda] \ \[RightTeeArrow]", Cell[BoxData[ FormBox[ FractionBox["1", SqrtBox["\[Lambda]"]], TraditionalForm]]], ". It also needs eigenvec and ", "eigenval." }], "Text", CellChangeTimes->{{3.416835489311369*^9, 3.416835528939666*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"trussEigenPlot", "[", RowBox[{"l_", ",", "fix_", ",", "text_", ",", "mul_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "x", "}"}], ",", RowBox[{ RowBox[{"truss", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ "darkbluecolor", ",", "nodes", ",", "edges", ",", "fixnodes"}], "}"}], "]"}]}], ";", RowBox[{"x", ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"fix", "\[Equal]", "1"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{ "eigenvec", "\[LeftDoubleBracket]", "l", "\[RightDoubleBracket]"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "]"}], ",", RowBox[{"fix", "\[Equal]", "2"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", RowBox[{ "eigenvec", "\[LeftDoubleBracket]", "l", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"fix", "\[Equal]", "3"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", RowBox[{ "eigenvec", "\[LeftDoubleBracket]", "l", "\[RightDoubleBracket]"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"dn", "[", "j_", "]"}], ":=", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{ RowBox[{"mul", "[", RowBox[{ "eigenval", "\[LeftDoubleBracket]", "l", "\[RightDoubleBracket]"}], "]"}], " ", RowBox[{"{", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "j"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"x", "\[LeftDoubleBracket]", RowBox[{"2", " ", "j"}], "\[RightDoubleBracket]"}]}], "}"}]}]}]}], ";", RowBox[{ RowBox[{"de", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"dn", "[", "j", "]"}], ",", RowBox[{"dn", "[", "k", "]"}]}], "}"}]}], ";", RowBox[{"dlistOfEdgeEnds", "=", RowBox[{"de", "/@", "listOfEdges"}]}], ";", RowBox[{"dnodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"dn", "[", "j", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";", RowBox[{"dedges", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"dlistOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";", RowBox[{"dtruss", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "dnodes", ",", "dedges", ",", "fixnodes"}], "}"}], "]"}]}], ";", RowBox[{"Show", "[", RowBox[{ RowBox[{"{", RowBox[{"truss", ",", "dtruss"}], "}"}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "[", "l", "]"}], "<>", RowBox[{"ToString", "[", "text", "]"}], "<>", RowBox[{"ToString", "[", RowBox[{ "eigenval", "\[LeftDoubleBracket]", "l", "\[RightDoubleBracket]"}], "]"}]}], ",", RowBox[{"FontSize", "\[Rule]", "13"}]}], "]"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", "1.3`"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}]}], "]"}]}]], "Input",\ CellChangeTimes->{3.416835263220244*^9}], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "a00matrix", ",", "a0matrix", ",", "amatrix", ",", "c", ",", "cmat", ",", "cmatrix", ",", "cond", ",", "de", ",", "dedges", ",", "displ", ",", "dlistOfEdgeEnds", ",", "dnodes", ",", "dtruss", ",", "dtrusstens", ",", "edd", ",", "edges", ",", "edgestext", ",", "edu", ",", "ee", ",", "eh", ",", "eigenval", ",", "eigenvec", ",", "elong", ",", "elongtable", ",", "etext", ",", "ev", ",", "f", ",", "fix", ",", "fixnodes", ",", "kmatrix", ",", "ldd", ",", "ldu", ",", "ledges", ",", "lfnodes", ",", "lh", ",", "listOfEdgeEnds", ",", "listOfEdges", ",", "listOfFixedNodes", ",", "listOfNodes", ",", "listOfNodesfunc", ",", "lnodes", ",", "lv", ",", "numberOfEdges", ",", "numberOfFreeNodVar", ",", "numberOfNodes", ",", "numberOfRestrictions", ",", "truss", ",", "trussData", ",", "trussPlot", ",", "trussMatrix", ",", "x", ",", "y"}], "]"}]], "Input"], Cell[TextData[{ StyleBox["\nCorrect solutions to the exercise above lead to a grade of \ maximally 8 (out of 10) for the Midterm Project, but (partial) solutions to \ the following exercises are required for obtaining a higher grade.", FontSize->18, FontVariations->{"CompatibilityType"->0}], StyleBox["\n\nNext we apply our knowledge in order to study a different kind \ of truss.", FontVariations->{"CompatibilityType"->0}], StyleBox["\n\nCross trusses", FontWeight->"Bold"], ". Trusses made up of crosses for which the two left most nodes or all the \ left and right most are kept fixed, can also be studied by means of the code \ developed so far. We consider the truss depicted below." }], "Text"], Cell[BoxData[Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .19048 %%ImageSize: 800 152.381 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Background color .859 .969 .969 r MFill % Scaling calculations 0.5 0.119048 0.0357143 0.119048 [ [ 0 0 0 0 ] [ 1 .19048 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .19048 L 0 .19048 L closepath clip newpath .133 .172 .633 r .015 w .02381 .03571 Mdot .02381 .15476 Mdot .14286 .03571 Mdot .14286 .15476 Mdot .2619 .03571 Mdot .2619 .15476 Mdot .38095 .03571 Mdot .38095 .15476 Mdot .5 .03571 Mdot .5 .15476 Mdot .61905 .03571 Mdot .61905 .15476 Mdot .7381 .03571 Mdot .7381 .15476 Mdot .85714 .03571 Mdot .85714 .15476 Mdot .97619 .03571 Mdot .97619 .15476 Mdot .5 Mabswid [ ] 0 setdash .02381 .03571 m .14286 .03571 L .02381 .03571 L .14286 .15476 L .02381 .15476 L .14286 .03571 L .02381 .15476 L .14286 .15476 L .14286 .03571 L .14286 .15476 L .14286 .03571 L .2619 .03571 L .14286 .03571 L .2619 .15476 L .14286 .15476 L .2619 .03571 L .14286 .15476 L .2619 .15476 L .2619 .03571 L .2619 .15476 L .2619 .03571 L .38095 .03571 L .2619 .03571 L .38095 .15476 L .2619 .15476 L .38095 .03571 L .2619 .15476 L .38095 .15476 L .38095 .03571 L .38095 .15476 L .38095 .03571 L .5 .03571 L .38095 .03571 L .5 .15476 L .38095 .15476 L .5 .03571 L .38095 .15476 L .5 .15476 L .5 .03571 L .5 .15476 L .5 .03571 L .61905 .03571 L .5 .03571 L .61905 .15476 L .5 .15476 L .61905 .03571 L .5 .15476 L .61905 .15476 L .61905 .03571 L .61905 .15476 L Mistroke .61905 .03571 L .7381 .03571 L .61905 .03571 L .7381 .15476 L .61905 .15476 L .7381 .03571 L .61905 .15476 L .7381 .15476 L .7381 .03571 L .7381 .15476 L .7381 .03571 L .85714 .03571 L .7381 .03571 L .85714 .15476 L .7381 .15476 L .85714 .03571 L .7381 .15476 L .85714 .15476 L .85714 .03571 L .85714 .15476 L .85714 .03571 L .97619 .03571 L .85714 .03571 L .97619 .15476 L .85714 .15476 L .97619 .03571 L .85714 .15476 L .97619 .15476 L .97619 .03571 L .97619 .15476 L Mfstroke 1 0 0 r .015 w .02381 .03571 Mdot .02381 .15476 Mdot .133 .172 .633 r [(1)] .08333 .04762 0 0 Mshowa [(2)] .06548 .09524 0 0 Mshowa [(3)] .10119 .09524 0 0 Mshowa [(4)] .08333 .16667 0 0 Mshowa [(5)] .13095 .09524 0 0 Mshowa [(6)] .20238 .04762 0 0 Mshowa [(7)] .18452 .09524 0 0 Mshowa [(8)] .22024 .09524 0 0 Mshowa [(9)] .20238 .16667 0 0 Mshowa [(10)] .25 .09524 0 0 Mshowa [(11)] .32143 .04762 0 0 Mshowa [(12)] .30357 .09524 0 0 Mshowa [(13)] .33929 .09524 0 0 Mshowa [(14)] .32143 .16667 0 0 Mshowa [(15)] .36905 .09524 0 0 Mshowa [(16)] .44048 .04762 0 0 Mshowa [(17)] .42262 .09524 0 0 Mshowa [(18)] .45833 .09524 0 0 Mshowa [(19)] .44048 .16667 0 0 Mshowa [(20)] .4881 .09524 0 0 Mshowa [(21)] .55952 .04762 0 0 Mshowa [(22)] .54167 .09524 0 0 Mshowa [(23)] .57738 .09524 0 0 Mshowa [(24)] .55952 .16667 0 0 Mshowa [(25)] .60714 .09524 0 0 Mshowa [(26)] .67857 .04762 0 0 Mshowa [(27)] .66071 .09524 0 0 Mshowa [(28)] .69643 .09524 0 0 Mshowa [(29)] .67857 .16667 0 0 Mshowa [(30)] .72619 .09524 0 0 Mshowa [(31)] .79762 .04762 0 0 Mshowa [(32)] .77976 .09524 0 0 Mshowa [(33)] .81548 .09524 0 0 Mshowa [(34)] .79762 .16667 0 0 Mshowa [(35)] .84524 .09524 0 0 Mshowa [(36)] .91667 .04762 0 0 Mshowa [(37)] .89881 .09524 0 0 Mshowa [(38)] .93452 .09524 0 0 Mshowa [(39)] .91667 .16667 0 0 Mshowa [(40)] .96429 .09524 0 0 Mshowa 1 0 0 r [(1)] .02381 .01786 0 0 Mshowa [(2)] .02381 .17262 0 0 Mshowa [(3)] .14286 .01786 0 0 Mshowa [(4)] .14286 .17262 0 0 Mshowa [(5)] .2619 .01786 0 0 Mshowa [(6)] .2619 .17262 0 0 Mshowa [(7)] .38095 .01786 0 0 Mshowa [(8)] .38095 .17262 0 0 Mshowa [(9)] .5 .01786 0 0 Mshowa [(10)] .5 .17262 0 0 Mshowa [(11)] .61905 .01786 0 0 Mshowa [(12)] .61905 .17262 0 0 Mshowa [(13)] .7381 .01786 0 0 Mshowa [(14)] .7381 .17262 0 0 Mshowa [(15)] .85714 .01786 0 0 Mshowa [(16)] .85714 .17262 0 0 Mshowa [(17)] .97619 .01786 0 0 Mshowa [(18)] .97619 .17262 0 0 Mshowa % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{800, 152.375}, ImageMargins->{{0, 0}, {0, 0}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztndlyHLcVhkfTw0V0bG6SY0uMQpGyKClSVjtRNi9Z7GyOl3AZilKqVK5U 2ReppBw/TK7zTr7yg9h3DBucQaN7PnT/3RgagqsvNIQOcM7/4xwsvQDod59+ 9vE//vn0s08+err9zqdP//3xJx/9Z/vtf316JsouDQbZ9mAw+O/2IE+fniUn P6eDz08/L352858874uvvip+dvKfS33WbNZmnh7lvjzJU8M89ThPZTY1MEmT yv+d2Nxjqzu0qX2byqy9w3I5o3tQLlfBWHcYXoV8gzwYlWRn6b97i5ZlVG4M MqJmiA8WSrIJ/Hn1sHxZNgLZPsjIXpNrKGQkewSyJ8F+aa5niD8Id63BH4+g WVM9i2ZNnlFrPLRoY2iiU4SjOdWN4qq2d08XCqm8P9zcXYgq2Vh13LBpnXjC FTjxxdZXdEY8thCZTR2UZbNK1QLghTr1pl5dacUjG6qRlQ19tZ9b2x3ZwdyT 59biGZnfNvL0op2tFgc79/83tqljSFEuyTYcFFPxZdu1l/P8Q5s6ghTlksx1 qRkOVmxrW8nz923qAFKUS7K1bzzKaZ5lfr6MTeUiUb6ehlh0qsngcpZv/k4n 7en/87+L1uKS+X8bjTmaUjUWqn37WqVQ/u8DkA1F2YcBurFwU+Ss4m46sb4O +e+BLBNl7wfoxsJNkbOK68Z6C/J3899RLroNuSNRdiv/HeaiOwFWti2XoU3t Bti7aa1klt+tOfObj7358NuxVrL5+c/YG7Xm57a77/hajCBbEGU7EyYlGTdq 1eRNsYtRuXa0F0qyCXUcurcDsL7bitP8MKY3gJXQhMBss0lvIw6qzQzMMKxC bte4AfnUZUm2KMpuMt1XAkxSM6SuQeXa0da7BjU9FYt01cYUguFpSSEw1ArV kSSwRYVExe0UpEPVItmSKDPVz3z9QLXiH+6ay7ViWnH2lDs1lHlzp4bSDuOC uJvrEXUSUi3fsJaz1kzdNkxeIzskWxZlVE+6hlLt0WRELYLKtePMozr15xBf qONROwxp3ldNUjMh2uEu70zbbdXUWm/YfkIWL4sy9UJItXfdsir6McVetbdV tie0qlZMPZOpKUltZB7G51iHraY6XJSDOtbBbdPUaskOyVZEWdFHqAepVuj5 DbVGKqdi0L16EUbKVS2bMHrn7PlYHs2F6VYt0xDvhjB12yyNjG+A7DlR9maA bizcFDmruG6s6Yru1yD7lih7PUA3Fm6KnFVcN9Z0L/pLkD0vyn4VoBsLN0XO Kq4ba3o0/XOQvSDKfhGgGws3Rc4qrhvrPcj/GchWRdnDAN1YuClyVnHdWNMb 0NdAtibKfhqgGws3Rc4qrhvru5D/E5Cti7JXA3Rj4abIWcV1Y30P8n8Esg1R 9uMA3Vi4KXJWcd1Yfw/yf+DTEWQ/DNCNhZsi51a4k1jfh/wHILsiyr4foBsL N0XOKq4ba9Khvn5VlFHbUXVj4abIWcV1Y01ti67XXhRlNP+rurFwU+Ss4rqx pnGf7rm/LcroHk7VjYWbImcV1401XR/Qc9OXRBk9h1N1Y+GmyFnFdWNN1+70 7utlUUbvUlTdWLgpclZx3VjTPR69LafdSSTbCdCNhZsiZxXXjTU9f6H1FbQ7 iWS0REbVjYWbImcV1401PaejNQ+0roJktFJM1Y2FmyJnFdeNNT1Dp/ZBtlU8 VTcWboqcVVw31vSuheZ4aoMkozlD1Y2FmyJnFdeNNb0Hpfs0dd3kSwG6sXBT 5KziurF+CPn0rI2uI0hGz25U3Vi4KXJWcd1Y01oWel+i7lyh5++qbizcFDmr uG6sac0TvfPeEWX0DlXVjYWbImcV1401rUekdUvqVmNaB6PqxsJNkbOK68Za XbeqnrhAaxlV3Vi4KXJWcd1Y05py2j9Az9pJRuvRVd1YuClyVnHdWNPeA9rL Ru9kSEZ7ilTdWLgpclZx3VjTviDaYU7vS0lG+3hV3Vi4KXJWcd1Y0/4x2mdI 79VJRqdpqLqxcFPkrOK6sX4L8mnHLq15IRmdSaPqxsJNkbOKO/Oey+xSX5m0 F7dk/i//v8kzO4DN8xpjjkYgdVfwEGTLFmPdcipOmKM+8LItN7SppZpaLILd 1bINA0B95lpZV+ihVMdRLYNCRgz8tW3GzcSa13uZat7W32s2Naqt7TWbm7Wu 7QJgrJbteWt7razborZLgEpPQYa19W56B129nre9c/aoCXqMrh5i8Byb9CBt 1LjF2xwrsus1Nqo3Ivnfyy0x6aaXQky69JKSyi2xe9pSpXs2z3GEVAN6VUYe v8wmqVd40MmnfvVmllSb6jRju1obiuphiH53Sge5eDzqaRYeDs+zmHqu368z 6lTU71qV61rLlk2yppUY6skF9CaJnEZvjc0AY8Zkz8A3vxGu2SF0K04XW9RY 5z3Keaf8YTEd6F6hh4cteiKtH/AObIYguY3aBBFTOxyxUgYy60rNIessVnvZ Vk2oqq2/uc7UzNQzwNXJlPzlGWBJ3VRloeVY37RSqHovU/Ze/b0RjTue66nC 5GbLHqaOO/5LebrK8l3AUpv8ouYmSh1hFtktCpmwuaidq2YIUtg1b9FV08XF rbgJa3FZWdwZUWjrPBJ8K+YHLNea0DwXgC0q3rSkbLmm4dGFCr1WVw8H9bYw LRwXdRlDbluowWp3OVNzvy0MMOp3A6j+iy39tcpubzdJN4eA+oOffrM9D22K UjuK7LkWs/gz5lD/jSe122fRofT8qONY+Cqr0dTTYpKnBWZ+v0noVBEPupkZ s5oJwvtktk5J7YdZk6EXKgWaW/G1LhUih2ncLu5Ji+RU/7iuWq2tRfPoGl4F /23UXKoQMRDtauF5DJZSICoXuu1H2NesARrWqOcuWg1zM+p9bbJlc2ls9X5R w7kn9d1bqHcy9RrqqFRY8dxdjXx+pvmjrnyr4abjq66inPpNkyHoVu7uRs24 9eW8D8K8uBdXX8JdjVTfsJd7/eKpNDl3WTzVL4pMk3OXRZH9Yuc0OXdZ7Nxv YkiTc5dNDP3mpDQ5d9mc1G86TJNzl02H/WbiNDl32Uz8EPKf9Y3v/SEB3Q4J 6A//SJNzl8M/+kN90uTc5VCf/rCuNDl3OayrP4QvTc5dDuHrD9dMk3OXwzX7 Q3PT5Nzl0Nz+MOw0OXc5DLs/5D5Nzl0Oue8/XpEm5y4fr+g/SpMm5y4fpek/ NpUm5y4fm+o/Ipcm5y4fkes/Dpkm5y4fh+w/+pom5y4ffe0/5pwm5y4fc+4/ 0p4m5y4faaf7NHqnTeubSPYwQDcWboqcVVw31vTshtYl0ZpHktH6NVU3Fm6K nFVcN9b0rI3WltIaVZKpa5BJFgs3Rc4qrhtrev5O+wPUI65oH4mqGws3Rc4q rhtrel9Ce7xonwHJ6MBlVTcWboqcVVw31juQT4cm094jkv0mQDcWboqcVVw3 1vTO+7cgo71iJPtdgG4s3BQ5q7hurGkdzO9BRvtHSfZ2gG4s3BQ5q7hurGnd 0jsgo/2+JPtDgG4s3BQ5q7hurGkt4x9Bpp5C8KcA3Vi4KXJWcd1Y09rTP4NM PfnhLwG6sXBT5KziurGmNcXvgkw9AvCvAbqxcFPkrOK6saY1xe+BTD2G+P0A 3Vi4KXJWcd1Y05riD0A2FGUfBujGwk2Rs4rrxtq8314cnA4Gk2YxLbhfUcz/ Lua/h/l/l8z/22jM0ZSqYU7r3HAqa17wLueVPTpPTS2a1BGkKJdk6w6KebW4 kqMcnKfO8vdt6gBSlEuytYgop3mW+fkyNpX0Ub6ehlj07ePz1Fn+2KaOIUW5 JHM71WmeLn52tCx6tmTsZxbJexbgvs0dWo2D1hrGZ96z4vZtbnHy6lsN/B+D bAwymn+rY2T+j2pC84OXf0VG925/myC5Mo8TPUUJ/XXHU8ZrZih+IvpnwYZH cAixmgKSU4kuTVAjHwmK3kx9Z9302DajR1yAZmqqQNGCD+dqaFjozpgsCoys 0ptOnTfP+9fp7DrX/O90rW1+kTE1eo+BHpwDWUNL1biWDN+zpe8XDWemNPlj 1xLOrI27k05SoTT9u2dVhjZ1R49AgThtxa477tRj3/bSbYldqLtD+CYwemBD 3iJ89ydit+jUTZltPsbqXS561xb1HNq7N4m0qzfRtZF283bZTFYhwgZr4+uh VobPQPZKE6U786ljLU3d+qrTUq5APi2HN05dsD1zaPv2bMRptTSNsXusTgvr h509ectq0jxBASYrt62VUYVJuZzhtVcLebtzBarQ3QJ+FfLHHInJDDdNmVHm pCX0gdiFDpgCmTyEolOiR1B+aMm7Q+SLUHJckeV/H0O5Eyb7aA6+obnk/NJv Ce1O/45rsI8DmssmV/XE+rSFf8Y2TBkXOGgqsG8LjCyBw4oS+LjOpHt/dcUa feKrVVau/Ulte6u2p3IutVWqwqHPSmarL7X4bvd139SswaX/A8rIWAo=\ \>"], ImageRangeCache->{{{0, 799}, {151.375, 0}} -> {-4.22274, -0.300007, 0.0105701, 0.0105701}}]], "InlineFormula"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"listOfNodesfunc", "[", RowBox[{"n_", ",", "m_"}], "]"}], ":=", RowBox[{"Union", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "n"}], ",", "m"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "n"}], ",", "m"}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"listOfNodes", "=", RowBox[{"listOfNodesfunc", "[", RowBox[{"4", ",", "4"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "listOfNodes", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfRestrictions", "=", "4"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"n", "[", "j_", "]"}], ":=", RowBox[{ "listOfNodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], ";"}], " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"coordinates", " ", "of", " ", "j"}], "-", RowBox[{"th", " ", "node"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"listOfFixedNodes", "=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "1", "]"}], ",", RowBox[{"n", "[", "2", "]"}]}], "}"}]}], ";"}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"lh", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", RowBox[{"numberOfNodes", "-", "2"}], ",", "1"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"lv", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "3", ",", "numberOfNodes", " ", ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", "vertical", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ldu", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", RowBox[{"numberOfNodes", "-", "3"}], ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ldd", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", RowBox[{"j", "+", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{"numberOfNodes", "-", "2"}], ",", "2"}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "down"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"listOfEdges", "=", RowBox[{"Union", "[", RowBox[{"lh", ",", "lv", ",", "ldu", ",", "ldd"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"end", " ", "input", " ", "data"}], " ", "*)"}]}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"trussData", "[", RowBox[{ "lnodes_List", ",", "r_", ",", "lfnodes_List", ",", "ledges_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "e", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "lnodes", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", RowBox[{"Length", "[", "lnodes", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"numberOfFreeNodVar", "=", RowBox[{ RowBox[{"2", "numberOfNodes"}], "-", "numberOfRestrictions"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "numberOfFreeNodVar", "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "ledges", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", RowBox[{"Length", "[", "ledges", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "lnodes", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "ledges", "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "pair", " ", "of", " ", "coordinates", " ", "of", " ", "nodes"}], " ", "*)"}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"e", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "j", "]"}], ",", RowBox[{"n", "[", "k", "]"}]}], "}"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "coordinates", " ", "of", " ", "begin", " ", "and", " ", "end", " ", "of", " ", "edges"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"listOfEdgeEnds", "=", RowBox[{"Map", "[", RowBox[{"e", ",", "ledges"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"nodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015", "]"}], ",", RowBox[{"Point", "[", RowBox[{ "lnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "lnodes", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fixnodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"redcolor", ",", RowBox[{"PointSize", "[", "0.015", "]"}], ",", RowBox[{"Point", "[", RowBox[{ "lfnodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "lfnodes", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"edges", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"listOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Clear", "[", "e", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", RowBox[{"trussData", "[", RowBox[{ "listOfNodes", ",", "numberOfRestrictions", ",", "listOfFixedNodes", ",", "listOfEdges"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], "Determine the corresponding edge\[Dash]node incidence matrix ", Cell[BoxData[ FormBox[ SubscriptBox["A", "0"], TraditionalForm]]], " and the edge\[Dash]free node incidence matrix ", StyleBox["A.", FontSlant->"Italic"] }], "Exercise"], Cell[TextData[{ "Suppose the vertical edges are much stiffer than the horizontal and \ diagonal ones. More precisely, the elastic constants of the edges are \ recorded in the following matrix ", StyleBox["C", FontSlant->"Italic"], "." }], "Text", CellTags->"UCU311"], Cell[BoxData[{ RowBox[{"Print", "[", "\"\\"Italic\"]\) of elastic constants\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"cmatrix", "=", RowBox[{"DiagonalMatrix", "[", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"100.", ",", "100.", ",", "100.", ",", "100.", ",", "10000"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ FractionBox["numberOfNodes", "2"], "-", "1"}]}], "}"}]}], "]"}], "]"}], "]"}]}]}], "Input", CellTags->"UCU311"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " In this situation, what kind of changes of shape in the truss require \ little force and which need probably much more? \nFirst try to think of your \ own explanation. \nThen analyze the eigenvalues and eigenvectors of the \ stiffness matrix ", StyleBox["K = ", FontSlant->"Italic"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " ", "C", " ", "A"}], TraditionalForm]]], StyleBox[" ", FontSlant->"Italic"], StyleBox["that", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], StyleBox["occur in the equilibrium equation", FontVariations->{"CompatibilityType"->0}], StyleBox[" K x = f ", FontSlant->"Italic"], StyleBox["; here ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" represents the displacements at the free nodes and ", FontVariations->{"CompatibilityType"->0}], StyleBox["f", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" the external forces at these nodes, see page 126.", FontVariations->{"CompatibilityType"->0}], " What do these eigenvalues and eigenvectors mean for the truss? \nTo this \ end, note that a, say normalized, eigenvector ", StyleBox["x", FontSlant->"Italic"], " of ", StyleBox["K ", FontSlant->"Italic"], StyleBox["corresponding to an eigenvalue", FontVariations->{"CompatibilityType"->0}], StyleBox[" \[Lambda] ", FontSlant->"Italic"], StyleBox["satisfies", FontVariations->{"CompatibilityType"->0}], StyleBox[" K ", FontSlant->"Italic"], "x ", StyleBox["= f ", FontSlant->"Italic"], "where", StyleBox[" f = ", FontSlant->"Italic"], "\[Lambda]", StyleBox[" x ", FontSlant->"Italic"], StyleBox[".", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"] }], "Exercise", CellTags->"UCU311"] }, Closed]], Cell[CellGroupData[{ Cell["Older version", "Subtitle"], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["Trusses", FontFamily->"Arial"]], "Section"], Cell[CellGroupData[{ Cell[TextData[StyleBox["A repeating truss", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}]], "Subsection"], Cell["\<\ We want to study the following type of truss, with the same unit repeated \ several times.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"W", "=", "100"}], ";", RowBox[{"H", "=", "100"}], ";"}], "\n", RowBox[{ RowBox[{"shift", "[", "fr_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "W"}], ",", RowBox[{"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"frame", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "H"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "H"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "H"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "H"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"frame2", "=", RowBox[{"shift", "[", "frame", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frame3", "=", RowBox[{"shift", "[", "frame2", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frame4", "=", RowBox[{"shift", "[", "frame3", "]"}]}], ";"}], "\n", RowBox[{"trussfig", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"darkbluecolor", ",", RowBox[{"AbsoluteThickness", "[", "3.5`", "]"}], ",", RowBox[{"Line", "[", "frame", "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", "W"}], ",", "0"}], "}"}]}], "}"}], "]"}], ",", RowBox[{"Line", "[", "frame2", "]"}], ",", RowBox[{"Line", "[", "frame3", "]"}], ",", RowBox[{"Line", "[", "frame4", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"AspectRatio", "\[Rule]", "1"}], "}"}]}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{"trussfig", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}]}], "Input"], Cell["\<\ This truss could serve as a model for a thin beam, or \[Dash] when the \ picture is rotated by a right angle \[Dash] for a tower in the wind. Let us \ number the nodes like the entries of the following matrix:\ \>", "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"Transpose", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"2", " ", "k"}], "-", "1"}], ",", RowBox[{"2", " ", "k"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "5"}], "}"}]}], "]"}], "]"}], "]"}]], "Input"], Cell["\<\ So we only put nodes at the top and the bottom, not at the intersections of \ the diagonal bars. Think of the diagonal bars as passing behind each other. \ We fix nodes 1 and 2 to a wall.\ \>", "Text"], Cell[TextData[{ "We consider the nodes 3, 4, 5, 6 and the bars connecting these. With ", StyleBox["xjr", "Matica", FontVariations->{"CompatibilityType"->0}], " ", StyleBox["denoting", "Matica", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}, Background->None], " the displacement of node ", StyleBox["j ", FontSlant->"Italic"], "to the right, and ", StyleBox["xju", "Matica", FontVariations->{"CompatibilityType"->0}], StyleBox[" the ", FontVariations->{"CompatibilityType"->0}], "displacement of node ", StyleBox["j ", FontSlant->"Italic"], StyleBox["in upward direction", FontVariations->{"CompatibilityType"->0}], ", we obtain the following compatibility equations ", StyleBox["e", FontSlant->"Italic"], " = ", StyleBox["A x", FontSlant->"Italic"], " for the elongations of the bars (neglecting higher\[Dash]order terms):" }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"s", "=", FractionBox["1", SqrtBox["2"]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["e", "34"], "=", RowBox[{"x3u", "-", "x4u"}]}], ";"}], "\n", RowBox[{ RowBox[{ SubscriptBox["e", "35"], "=", RowBox[{ RowBox[{"-", "x3r"}], "+", "x5r"}]}], ";"}], "\n", RowBox[{ RowBox[{ SubscriptBox["e", "36"], "=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "x3r"}], "+", "x3u", "+", "x6r", "-", "x6u"}], ")"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ SubscriptBox["e", "45"], "=", RowBox[{"Expand", "[", RowBox[{"s", RowBox[{"(", RowBox[{ RowBox[{"-", "x4r"}], "-", "x4u", "+", "x5r", "+", "x5u"}], ")"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ SubscriptBox["e", "46"], "=", RowBox[{ RowBox[{"-", "x4r"}], "+", "x6r"}]}], ";"}], "\n", RowBox[{ RowBox[{ SubscriptBox["e", "56"], "=", RowBox[{"x5u", "-", "x6u"}]}], ";"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Explain why." }], "Exercise"], Cell[TextData[{ "For the 3, 4, 5, 6 part of the connectivity matrix ", Cell[BoxData[ FormBox[ SubscriptBox["A", "0"], TraditionalForm]]], " we therefore obtain the following matrix, which we call ", StyleBox["repeat", "Matica"], StyleBox[" ", "Matica", Background->None], StyleBox[":", "Matica", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}, Background->None] }], "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"repeat", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Coefficient", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ SubscriptBox["e", "34"], ",", SubscriptBox["e", "35"], ",", SubscriptBox["e", "36"], ",", SubscriptBox["e", "45"], ",", SubscriptBox["e", "46"], ",", SubscriptBox["e", "56"]}], "}"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{ RowBox[{"{", RowBox[{ "x3r", ",", "x3u", ",", "x4r", ",", "x4u", ",", "x5r", ",", "x5u", ",", "x6r", ",", "x6u"}], "}"}], "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "8"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ SubscriptBox["e", "34"], ",", SubscriptBox["e", "35"], ",", SubscriptBox["e", "36"], ",", SubscriptBox["e", "45"], ",", SubscriptBox["e", "46"], ",", SubscriptBox["e", "56"]}], "}"}], "\[Equal]", RowBox[{"repeat", ".", RowBox[{"{", RowBox[{ "x3r", ",", "x3u", ",", "x4r", ",", "x4u", ",", "x5r", ",", "x5u", ",", "x6r", ",", "x6u"}], "}"}]}]}]], "Input"], Cell[TextData[{ "Now we wish to set up the equations for a larger number of crosses, using \ the matrix ", StyleBox["repeat", "Matica"], " as a building block." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"numberOfCrosses", "=", "16"}], ";"}], "\n", RowBox[{ RowBox[{"numberOfBars", "=", RowBox[{"5", " ", "numberOfCrosses"}]}], ";"}], "\n", RowBox[{ RowBox[{"numberOfFreeNodes", "=", RowBox[{"2", " ", "numberOfCrosses"}]}], ";"}]}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Repeating a pattern in a matrix", FontFamily->"Arial"]], "Subsection"], Cell["\<\ For building repetitive matrices it helps if we can quickly overwrite a part \ of a matrix with another matrix.Therefore we introduce overwriteAt\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"overwriteAt", "::", "\"\\""}], ":=", "\"\\""}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"overwriteAt", "[", RowBox[{ RowBox[{"{", "bigmatrix__List", "}"}], ",", RowBox[{"{", "smallmatrix__List", "}"}], ",", "topLeftPositionOfNew_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"block", ",", "starti", ",", "startj"}], "}"}], ",", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"amatrix", "=", RowBox[{"{", "bigmatrix", "}"}]}], ",", RowBox[{"block", "=", RowBox[{"{", "smallmatrix", "}"}]}], ",", RowBox[{"starti", "=", RowBox[{ RowBox[{"First", "[", "topLeftPositionOfNew", "]"}], "-", "1"}]}], ",", RowBox[{"startj", "=", RowBox[{ RowBox[{"Last", "[", "topLeftPositionOfNew", "]"}], "-", "1"}]}], ",", "i", ",", "j"}], "}"}], ",", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"amatrix", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"i", "+", "starti"}], ",", RowBox[{"j", "+", "startj"}]}], "\[RightDoubleBracket]"}], "=", RowBox[{"block", "\[LeftDoubleBracket]", RowBox[{"i", ",", "j"}], "\[RightDoubleBracket]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "block", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", RowBox[{"First", "[", "block", "]"}], "]"}]}], "}"}]}], "]"}], ";", "amatrix"}]}], "]"}]}], "]"}]}]], "Input"], Cell["Examples of overwriting:", "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"a", ",", RowBox[{ RowBox[{"ToString", "[", "i", "]"}], "<>", RowBox[{"ToString", "[", "j", "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "4"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"overwriteAt", "[", RowBox[{"amatrix", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}]}], "]"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"overwriteAt", "[", RowBox[{"amatrix", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1"}], "}"}]}], "]"}]}], "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ StyleBox[ RowBox[{ "The", " ", "matrices", " ", "describing", " ", "the", " ", "repeating", " ", "truss"}], FontFamily->"Arial"]], "Subsection"], Cell["Start with a clean slate and fill it with copies of repeat.", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"<<", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"amatrix", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "numberOfBars"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"2", " ", "numberOfFreeNodes"}]}], "}"}]}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{"amatrix", "=", RowBox[{"overwriteAt", "[", RowBox[{"amatrix", ",", "repeat", ",", RowBox[{"{", RowBox[{ RowBox[{"5", " ", RowBox[{"(", RowBox[{"k", "-", "1"}], ")"}]}], ",", RowBox[{ RowBox[{"4", " ", "k"}], "-", "7"}]}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "2", ",", "numberOfCrosses"}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MatrixForm", "[", "amatrix", "]"}], ";"}]}], "Input"], Cell["\<\ We still have to put in the part for the left-most cross (nodes 1 and 2 are \ fixed to the wall, so there are no columns corresponding to them, while the \ bar connecting the two is also omitted).\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"amatrix", "=", RowBox[{"overwriteAt", "[", RowBox[{"amatrix", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"repeat", "\[LeftDoubleBracket]", RowBox[{"i", ",", "j"}], "\[RightDoubleBracket]"}], ",", RowBox[{"{", RowBox[{"i", ",", "2", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "5", ",", "8"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "]"}]}], ";"}]], "Input"], Cell[TextData[{ "The matrix ", StyleBox["amatrix", "Matica"], " corresponds to the matrix ", StyleBox["A", FontSlant->"Italic"], " in the book. This matrix relates the displacements at the free nodes to \ the elongations of the bars. Try to understand how ", StyleBox["amatrix", "Matica"], " has been defined in the two commands above. One can visualize part of ", StyleBox["amatrix", "Matica"], " using the command below." }], "Comments"], Cell[BoxData[ RowBox[{ RowBox[{"SubMatrix", "[", RowBox[{"amatrix", ",", " ", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"16", ",", "16"}], "}"}]}], "]"}], " ", "//", " ", "MatrixForm"}]], "InputComments"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Visualizing trusses", FontFamily->"Arial"]], "Subsection"], Cell[TextData[{ "Below are some methods to visualize trusses. These can be helpful in \ understanding the results.\n", StyleBox["cnode", "Matica"], " gives the coordinates of nodes in the standard truss and ", StyleBox["zerotruss", "Matica"], " given the standard truss in a format that can be used by ", StyleBox["trusspl", "Matica"], ", where ", StyleBox["trusspl", "Matica"], " plots a given truss. ", StyleBox["dtruss", "Matica"], " gives a truss that is disturbed by some vector (for example an \ eigenvector).\nFinally, ", StyleBox["comparetruss", "Matica"], " can be used to compare two trusses, as it plots them in different colors." }], "Comments"], Cell[BoxData[{ RowBox[{ RowBox[{"cnode", "[", "n_", "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"EvenQ", "[", "n", "]"}], ",", RowBox[{"-", "1"}], ",", "0"}], "]"}]}], "}"}]}], "\n", RowBox[{ RowBox[{"zerotruss", "[", "nrCrosses_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"cnode", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{ RowBox[{"2", " ", "nrCrosses"}], "+", "2"}]}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"dcnode", "[", RowBox[{"n_", ",", "ev_", ",", "t_"}], "]"}], ":=", RowBox[{ RowBox[{"cnode", "[", "n", "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{"t", "/", "20"}], ")"}], " ", RowBox[{"{", RowBox[{ RowBox[{"ev", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "n"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"ev", "\[LeftDoubleBracket]", RowBox[{"2", " ", "n"}], "\[RightDoubleBracket]"}]}], "}"}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dtruss", "[", RowBox[{"ev_", ",", RowBox[{"t_:", "10"}]}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"dcnode", "[", RowBox[{"n", ",", "ev", ",", "t"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{ RowBox[{"Length", "[", "ev", "]"}], "/", "2"}]}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"trusspl", "[", RowBox[{"l_", ",", RowBox[{"color_:", "darkbluecolor"}], ",", " ", RowBox[{"showDiagonal_:", "False"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"nrNodes", "=", RowBox[{"Length", "[", "l", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.01", "]"}], ",", RowBox[{"Point", "[", RowBox[{ "l", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "nrNodes"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"vlines", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{"2", " ", "i"}], "\[RightDoubleBracket]"}]}], "}"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"nrNodes", "/", "2"}]}], "}"}]}], "]"}]}], ";", RowBox[{"hlines", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "+", "1"}], "\[RightDoubleBracket]"}]}], "}"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"(", RowBox[{"nrNodes", "/", "2"}], ")"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{"2", " ", "i"}], "\[RightDoubleBracket]"}], ",", RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "+", "2"}], "\[RightDoubleBracket]"}]}], "}"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"(", RowBox[{"nrNodes", "/", "2"}], ")"}], "-", "1"}]}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dlines", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "+", "2"}], "\[RightDoubleBracket]"}]}], "}"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"(", RowBox[{"nrNodes", "/", "2"}], ")"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "i"}], "+", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"l", "\[LeftDoubleBracket]", RowBox[{"2", " ", "i"}], "\[RightDoubleBracket]"}]}], "}"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"(", RowBox[{"nrNodes", "/", "2"}], ")"}], "-", "1"}]}], "}"}]}], "]"}]}], " ", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"showDiagonal", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ "color", ",", "t", ",", "hlines", ",", "vlines", ",", " ", "darkgreencolor", ",", "dlines"}], "}"}], "]"}], ",", " ", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"color", ",", "t", ",", "hlines", ",", "vlines"}], "}"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"comparetruss", "[", RowBox[{"t1_", ",", "t2_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"trusspl", "[", "t1", "]"}], ",", RowBox[{"trusspl", "[", RowBox[{"t2", ",", "Red"}], "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"showtruss", "[", RowBox[{"tstruc_", ",", " ", RowBox[{"plotr_:", RowBox[{"{", RowBox[{ RowBox[{"-", "1.5"}], ",", "0.5"}], "}"}]}], ",", " ", RowBox[{"imSize_:", "800"}]}], "]"}], ":=", RowBox[{"Show", "[", RowBox[{"tstruc", ",", " ", RowBox[{"AspectRatio", "->", "Automatic"}], ",", " ", RowBox[{"PlotRange", "->", "plotr"}], ",", " ", RowBox[{"Background", "->", "lightbluecolor"}], ",", " ", RowBox[{"ImageSize", "->", "imSize"}]}], "]"}]}]}], "Input"], Cell["Example 1: plot the standard truss with 7 crosses.", "Comments"], Cell[BoxData[{ RowBox[{ RowBox[{"trusspl", "[", RowBox[{"zerotruss", "[", "7", "]"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"showtruss", "[", "%", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trusspl", "[", RowBox[{ RowBox[{"zerotruss", "[", "7", "]"}], ",", " ", "Red", ",", " ", "True"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"showtruss", "[", "%", "]"}], ";"}]}], "Input"], Cell["\<\ Example 2: perturb a truss by some random vector and compare it with the \ standard truss.\ \>", "Comments"], Cell[BoxData[{ RowBox[{ RowBox[{"nrCrosses", "=", "7"}], ";"}], "\n", RowBox[{ RowBox[{"nrNodes", "=", RowBox[{ RowBox[{"2", " ", "nrCrosses"}], "+", "2"}]}], ";"}], "\n", RowBox[{ RowBox[{"dvector", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ FractionBox["1", "3"], " ", RowBox[{"(", RowBox[{ RowBox[{"RandomReal", "[", "]"}], "-", "0.5`"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", RowBox[{ RowBox[{"2", " ", "nrNodes"}], "-", "4"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"xvector", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", "dvector"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"comparetruss", "[", RowBox[{ RowBox[{"zerotruss", "[", "nrCrosses", "]"}], ",", RowBox[{"dtruss", "[", "xvector", "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"showtruss", "[", "%", "]"}], ";"}]}], "Input"], Cell[TextData[{ "Let us make the horizontal bars much less rigid than the non-horizontal \ ones. The strengths of the bars are recorded in ", StyleBox["cmatrix", "Matica"], "." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"cmatrix", "=", RowBox[{"DiagonalMatrix", "[", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ "100.", ",", "10000.", ",", "10000.", ",", "100.", ",", "10000."}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "numberOfCrosses"}], "}"}]}], "]"}], "]"}], "]"}]}], ";"}]], "Input"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " In this situation, what kind of changes of shape in the truss require \ little force and which need probably much more? \nFirst try to think of your \ own explanation. \nThen analyze the eigenvalues and eigenvectors of the \ stiffness matrix ", StyleBox["K = ", FontSlant->"Italic"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " ", "C", " ", "A"}], TraditionalForm]]], StyleBox[" ", FontSlant->"Italic"], StyleBox["that", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], StyleBox["occurs in the equilibrium equation", FontVariations->{"CompatibilityType"->0}], StyleBox[" K x = f ", FontSlant->"Italic"], StyleBox["; here ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" represents the displacements at the free nodes and ", FontVariations->{"CompatibilityType"->0}], StyleBox["f", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" the external forces at these nodes, see page 126.", FontVariations->{"CompatibilityType"->0}], " What do these eigenvalues and eigenvectors mean for the truss? \nTo this \ end, note that a, say normalized, eigenvector ", StyleBox["x", FontSlant->"Italic"], " of ", StyleBox["K ", FontSlant->"Italic"], StyleBox["corresponding to an eigenvalue", FontVariations->{"CompatibilityType"->0}], StyleBox[" \[Lambda] ", FontSlant->"Italic"], StyleBox["satisfies", FontVariations->{"CompatibilityType"->0}], StyleBox[" K ", FontSlant->"Italic"], "x ", StyleBox["= f ", FontSlant->"Italic"], "where", StyleBox[" f = ", FontSlant->"Italic"], "\[Lambda]", StyleBox[" x ", FontSlant->"Italic"], StyleBox[".", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise.", FontWeight->"Bold"], " Put equal vertical loads at all free nodes. What happens to the shape of \ the structure?" }], "Exercise"], Cell["\<\ Note that the high frequency oscillations have a low eigenvalue and the low \ frequency oscillations have a high eigenvalue. This is in contrast with the \ properties of a guitar string, or similar examples in physics where standing \ waves occur.\ \>", "Comments"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " In the case of equal vertical loads", StyleBox[",", FontWeight->"Bold"], " investigate what is significant for the amount of bending. Is it the \ stiffness of the horizontal bars, the non-horizontal bars, their ratio? (We \ assume all horizontal bars are equally stiff, and all non-horizontal bars are \ equally stiff.) Back to the case where the horizontal bars have low \ stiffness. How should one choose the external forces at the free end of the \ truss to illustrate its bendability? " }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ StyleBox[ RowBox[{"Two", " ", "fixed", " ", "ends"}], FontFamily->"Arial"]], "Subsection"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Now clamp down the other end too. Calculate the structure of a truss with \ vertical load." }], "Exercise"], Cell[TextData[{ StyleBox["Extra Exercise. ", FontWeight->"Bold"], " Consider the truss with two fixed ends and a vertical load. Use the \ solution of this truss as the model for a new truss. Analyze the properties \ of this new \"pre-stressed truss\"." }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Midterm Assignment about Pratt Trusses", FontFamily->"Arial", FontSize->16]], "Subsection"], Cell[TextData[{ StyleBox["Pratt truss", FontFamily->"Arial", FontWeight->"Bold"], StyleBox[": ", FontFamily->"Arial", FontSize->14], StyleBox["a simple truss structure. Except for the end sections, the \ diagonal edges all slant down toward the center of the span. Patented by \ Caleb and Thomas Pratt in 1844, this was among the most common American \ bridge types for the ensuing decades and was built in both wood and metal. \ Since almost all diagonal edges are subject to tension forces only, they can \ be thinner, allowing for a more economical design. The top chord and \ verticals are mainly in compression and were made of wood, while the bottom \ chord and inclined edges were made of iron. This Pratt truss was built \ through the 19th century and was cited as a continued form by bridge \ engineers as late as 1908. The Pratt truss survived the transition to metal \ construction and was widely built as an all-metal truss well into the 20th \ century. There are many variations on the basic Pratt truss. \nHere is a \ plot.", FontFamily->"Arial"] }], "Text"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .25397 %%ImageSize: 800 203.175 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Background color .859 .969 .969 r MFill % Scaling calculations 0.5 0.15873 0.047619 0.15873 [ [ 0 0 0 0 ] [ 1 .25397 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .25397 L 0 .25397 L closepath clip newpath .133 .172 .633 r .015 w .18254 .04762 Mdot .34127 .04762 Mdot .5 .04762 Mdot .65873 .04762 Mdot .81746 .04762 Mdot .18254 .20635 Mdot .34127 .20635 Mdot .5 .20635 Mdot .65873 .20635 Mdot .81746 .20635 Mdot .5 Mabswid [ ] 0 setdash .02381 .04762 m .97619 .04762 L s .18254 .20635 m .81746 .20635 L s .18254 .20635 m .18254 .04762 L s .34127 .20635 m .34127 .04762 L s .5 .20635 m .5 .04762 L s .65873 .20635 m .65873 .04762 L s .81746 .20635 m .81746 .04762 L s .18254 .20635 m .34127 .04762 L s .34127 .20635 m .5 .04762 L s .65873 .20635 m .5 .04762 L s .81746 .20635 m .65873 .04762 L s .02381 .04762 m .18254 .20635 L s .97619 .04762 m .81746 .20635 L s 1 0 0 r .015 w .02381 .04762 Mdot .97619 .04762 Mdot .133 .172 .633 r [(1)] .02381 .02381 0 0 Mshowa [(2)] .18254 .02381 0 0 Mshowa [(4)] .34127 .02381 0 0 Mshowa [(6)] .5 .02381 0 0 Mshowa [(8)] .65873 .02381 0 0 Mshowa [(10)] .81746 .02381 0 0 Mshowa [(12)] .97619 .02381 0 0 Mshowa [(3)] .18254 .23016 0 0 Mshowa [(5)] .34127 .23016 0 0 Mshowa [(7)] .5 .23016 0 0 Mshowa [(9)] .65873 .23016 0 0 Mshowa [(11)] .81746 .23016 0 0 Mshowa [(2)] .10317 .06349 0 0 Mshowa [(4)] .2619 .06349 0 0 Mshowa [(8)] .42063 .06349 0 0 Mshowa [(12)] .57937 .06349 0 0 Mshowa [(16)] .7381 .06349 0 0 Mshowa [(20)] .89683 .06349 0 0 Mshowa [(3)] .16667 .12698 0 0 Mshowa [(7)] .3254 .12698 0 0 Mshowa [(11)] .48413 .12698 0 0 Mshowa [(15)] .64286 .12698 0 0 Mshowa [(19)] .80159 .12698 0 0 Mshowa [(6)] .2619 .19048 0 0 Mshowa [(10)] .42063 .19048 0 0 Mshowa [(14)] .57937 .19048 0 0 Mshowa [(18)] .7381 .19048 0 0 Mshowa [(1)] .07937 .12698 0 0 Mshowa [(5)] .2381 .12698 0 0 Mshowa [(9)] .39683 .12698 0 0 Mshowa [(13)] .55556 .12698 0 0 Mshowa [(17)] .71429 .12698 0 0 Mshowa [(21)] .87302 .12698 0 0 Mshowa % End of Graphics MathPictureEnd \ \>"], "InlineFormula", ImageSize->{800, 203.125}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztnel7FUUWxi/3Jqg4Iy6j4h4DMSCERdQEQVRUXHFfcDcgCiqCkEBIcN93 55n/YP6d+eyn+R/ms98y6U5u9cm9v7r3vXkzPnme8QM3zTnnPf2equrq7upT VQfGJ44eOT4+cezw+MBDp8ZPHj12+PTA/hOn5kSNVbVaY6BWq/1roFYcz84d LvzM1n6b/a36WV/8FLp///579TNY/Kz6U7ViVZcXx321wS3/nE5HHxVHtUZx WB4V/0ptvRCdT0fnEqKRZJNJVk9Hl4bz/Q18nwPZx1m7vkWyJvGcuH+ReEFV q4P3iQ72V3SJYDon6+9KcJl4L5aRXbdamNFLvDRtLG4MM8tAuwGytV1onxca VPGXwpv539VAH8guab3uGlXBtZFoLVmJ+VTy2mCDiW4G3VpJ1Q/QFTq9OKos /XrSnu2ovSywWSEd5gpRle1ndXErnpo/atb+6tQzt8jatHPYWL7l8YWF9Mz8 0ZxldXQWZG3aOWxsP+XxmkI6MX/UbIBr0p2iRdamncOu/YM8zhZG5c9/ip8/ 9Nwr12PnVlEeXZRrFWfCtT278Ny4urWRVA15oftv9gSTqb1GP02LflIU/0pE 1pV8jnlXLZfItWA0CTJyRvc2wpKdgyUuhF0X4rwO9HSTIz9041NvkA6WuBD2 mhDn9aA/LfrpF7Fk52CJC2GvDXHeAPpTop/VIpbsHCxxIex1Ic4bQf+h6OcC EUt2Dpa4EPb6EOdNoN9W/JaPc3eDlmQ7QHYhyHYXv+Xj2E4RQbItiV/1YnhX z9jqRXMP2I2C3XawuyGU5QDot4Jsr1iqdL6LQDYfe9vzN1UKwUk2Uv7yewtR 7dUHvfvsylUD3prawqWSvjHUzs1i7VB4ZQn359rAGr1OVDjJtoCMypEuhbw/ r37GspzaQh8B05tC/QyK9UNXaw+lfTHIqm5JRZBsc7atdi/HvL++1vpp5Lqs XT3W560gGwgVsl6skN2CrPi7Dez+olcmnZrgJKNQ6cmPmnPeHxc19e6ZkKhW NoHs5lArG7J02txTT7YnNXUqz7/q3OlyJjjJhlM7zvTl1IUpjrr3FKOdaqJN TO1mMFTGUK4yyhJW7/PUcVySu6jqucInBMk2gqyePNPF3JOXRs7LWDpHXzqi 8l0fyvcW0B8D2bsgWytiyc7BEhfCbghxDoP+qOjnUhFLdg6WuBB2KMRJreYd 0c9lIpbsHCxxIewtIU7qxN8W/VwuYsnOwRIXwg6HOOn6PSL6uULEkp2DJS6E 3RjipB76LdEPffogLNk5WOJC2E0hTnrFOCz6uVLEkp2DJS6EvTXESffPQ6Kf q0Qs2TlY4kLYzSFOesYbF/1cLWLJzsESF8JuCXHSq8Wbop91IpbsHCxxIexI iJNeT98Q/VwjYsnOwRIXwm4NcdLQ1euiH/qyQliyc7DEhbDbQpy3gf410Q99 WSEs2TlY4kLY7SFOGu19VfRDX1YIS3YOlrgQdkeI83bQvyL6oS8rhCU7B0tc CHtbiPMO0L8s+qEvK4QlOwdLXAi7M8R5J+hfEv3QlxXCkp2DJS6EvT3EScPs B0U/9NWDsGTnYIkLYe8IcY6B/kXRD30/ICzZOVjiQtg7Q5w0xPyC6GdQxJKd gyUuhB0NcdI44fOiHxreJizZOVjiQtixECeNpz0n+qEBY8KSnYMlLoTdFeKk EdtnRT80FktYsnOwxIWwd4U4aRT4GdEPjYkSluwcLHEh7O4QJ42APy36oTFR wpKdgyUuhN0T4rwH9E+JfmhMlLBk52CJC2HvDnHeC/onRT80JkpYsnOwxIWw e0Oc94H+CdEPjYkSluwcLHEh7D0hzn2gPyD6oTFRwpKdgyUuhL03xHk/6B8X /dCYKGHJzsESF8LeF+J8APSPiX5oTJSwZOdgiQth94U4HwT9o6IfGhMlLNk5 WOJC2PtDnPtB/4joh8ZECUt2Dpa4EPaBEOdDoH9Y9ENjooQlOwdLXAj7YIiT 9GrsNCZKWLJzsCrn/SFOKhtqy+SHxkQJS3YONhsT2S3ESW2d+ibyQ2OihCU7 B0tcCPtwiJP6LrrXkB8aEyUs2TlY4kLYR0KcdC+iZwfyQ2OihCU7B0tcCPto iJOeLehZkPzQmChhyc7BEhfCPhbipGdFerYnPzQmSliyc7DEhbCPhzjp2Z/e 1cjPmIglOwdLXAh7IMRJ73L07k1+aEyUsGTnYIkLYZ8IcZbvomU2ImWYlXfp Mn+O0obLd/1SRFkh9KZBXoY7etmY+NXTEc222JC01SwKyuMcWeyvkfM3tNif EAd5pskKGyAiynp7MtQS1SzV1/xTcltyKeXk0wsv0aAXKQqfBgrIn5q7TtOO 5gcL9bxz4kkvTJSgTdPYaBCPzkuJ3Op5aVoZDXoTP0qffapLM6I6UidZUV3m m+ViGbVJakPkj7qW3tpQ93qgOqRrwWk7xNk5L7Ud+pBAWOosn15C2ynrWrhl UAKsOmeps5flbh31FBG1xZGFEm3pk7I3FrUdUH1k52Vlz0bxqGfrVvtqDRIv +kxArYlen+mmOgy1kLmv0sW03J1HvvL45kWNnBqKeq7NHc5FNyzqOJyb3TOh 6exNDTT/lCg9sVCboStyO7vMPnu2m2bvOaWokY6yj3eVndYmN7WAul9AQ0s5 zcZuoOyTdWYeU2lJDfDZ0ACo76B0+bKEO985+nLn25G0WWy2B6enk+W5X9Dk B5pB1+ROZ6Am2rSnHpg+TFaMqMUOJS09t9CV+FyoXUqmGRNlziCB8/Kv8ns+ xHkQ9OqAzD7Rjrg6gzkqvxdCnJTspg6wOYN4JHPOQbIXQ5yUvKgOmDqDss5g q8rvYIiTklHVAXBnkN0ZPFf5vRTipORi9YOG89HE+Rii8ns5xEnJ4uoHKucj mPNxS+X3SoiTkv/VD47OR03nY6XK79UQJ03mUD8gOx+pnY/PKr/XQpw0OUdN CHCSDpxkApXf6yFOmmylJng4SSROcojK740Q5yHQqwk7TlKQk+yj8nszxEmT IdUELCfJy0neUvmNhzhpcquaUOck7TnJeCq/QyFOmqysJkg6SZhOcqXK73CI kyafqwmvTlKtkyyr8nsrxEmLCagJzE6StJP8rPI7EuKkxSHUhHQn6d1JZlf5 vR3ipMU+1AkGziQGZ3KCyu+dECct3qJOGHEmpTiTTVR+R0Oc74FenQDkTDJy Jg+p/I6FON8HvTqhy5k05kwGU/m9G+I8DvpBUeZMAnQm96n83gtxfgB6dcLl QdGOuDqTNVV+74c4T4BenUDrTNIlmXMOkh0PcZ4EvToh2pl07UymVvl9EOKk ZXjVCe7OJHpncrzK70SIk5YgVhcscBZFcBY7UPmdDHHSktLqAhTOIhfO4hUq vw9DnLREuLqgiLNoibMYicrvVIiTlnxXF4hxFqFxFpdR+Z0OcdIS/uqCP86i Qs5iQSq/iRAn7QWzTpQ5i0Q5iz+p/CZDnFOgVxfkOiTaEVdnMS+V35kQJ+3r pS6w5iziRjLnHCQ7G+Kk3b/UBfOcRfmcxfZUflMhTtrJSV0A0Vlk0Vk8UeV3 LsRJW4qpC1o6i2Y6i2Gq/KZDnLTPn7pAqbMIqrO4qcpvJsRJO5WpC846i9o6 i9Wq/M6HOD8BvbqAsLNIsbP4sMrvoxDnp6BXF4R2Fp12FpNW+X0c4vwM9OqC 4TRWSHbElWTOOUj2SYjzc9Crq9LTWCHZEVeSOecg2achzi9Ar26GUH5bzS5Q T4gqy7OaxkVLUlWb5lBKNH0bo7PR1jv0PViN97NQbl+CXt3fg+YUDPIuC/nt PPTs7zGQ0fxCSoqlz63EqdctQ1S/JPs8VMNXoFe3wdmqV8Ny7HqjVkN/rpkS iV7LndIE1PL6IpT716BXt4QqU2wauW5jOTaAyhe1tHMKFT7Rotor/WV3AFKL 6MtQ1N+AXt3gjDhQoRN267IV+gXoo/lXnVPUa1OnDCe13L4K5f8t6NUN9yg7 kMqfsCPpMulhb5vRBKr2RiESdMLRbidUHZHs61Ci34Fe3apxZyJJ/TQhqH1V Vyk9fag3R/JMDDr3E5QRrJbGN6FUvwe9utGns5mos0moyu/bEOcPoFc3bnU2 h3U2fVX5fRfi/FFsheoGu+qGvc4mviq/70OcP2FbL/6X2xeZevuJpCX+nbds Jn8/BIY/F8fVjtIte0tPgvbnVnRPu16vKHS1BXn/SuL2Syp/dT/4XwL619Ra ptJR5/3pfw3o2flyaf4M/qnqXfX34ri8/5WjhY101HIdTidtWT8tC6vEFlHW UPtDCw200kcgGnieAhl1Zz8FGv8AfTYwwW4pHKhwKb6qcInNUiKlkqUamOLK WgqNTL3Th6GZTmdtE0+l0qmmhMdOpKWU+5KrvnT+eo5Jt6BWyFX6f6iqrfov 13we5g==\ \>"], ImageRangeCache->{{{0, 799}, {202.125, 0}} -> {-3.16246, -0.300008, \ 0.00791604, 0.00791604}}], Cell[TextData[{ StyleBox["Of the 12 nodes, 10 are free (blue) while the 2 extremal bottom \ ones (red) are fixed. \nThe 21 edges are labeled by means of the \ lexicographic ordering determined by the nodes, with the exception that the \ diagonal, and the horizontal, ", FontFamily->"Arial"], "edge", StyleBox[" issuing from node 1 get label 1, and 2, respectively. In this \ way, one obtains a more symmetric description of the final results. \n", FontFamily->"Arial"], "Furthermore, all angles in the truss are equal to either ", Cell[BoxData[ FormBox[ FractionBox["\[Pi]", "2"], TraditionalForm]]], " or ", Cell[BoxData[ FormBox[ FractionBox["\[Pi]", "4"], TraditionalForm]]], ".\n\nWe remove variables occurring in code above" }], "Text"], Cell[BoxData[ RowBox[{"Remove", "[", RowBox[{ "elongtable", ",", "amatrix", ",", "a0matrix", ",", "cmatrix", ",", "kmatrix", ",", "f", ",", "x", ",", "e", ",", "y", ",", "q", ",", "t", ",", "ynullvec", ",", "shift", ",", "frame", ",", "eh", ",", "ev", ",", "edu", ",", "edd", ",", "xmin", ",", "ymin"}], "]"}]], "Input"], Cell["\<\ Here is a method for quickly plotting rather arbitrary trusses composed of \ isosceles triangles with one right angle.\ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\n", RowBox[{ RowBox[{"W", "=", "1"}], ";", RowBox[{"H", "=", "1"}], ";"}], "\n", RowBox[{ RowBox[{"shift", "[", RowBox[{"fr_", ",", "k_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", RowBox[{"k", " ", "W"}]}], ",", RowBox[{"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"reflh", "[", "fr_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{ "#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "+", "W"}], ",", RowBox[{"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"reflv", "[", "fr_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{ RowBox[{"-", RowBox[{ "#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "+", "W"}]}], "}"}], "&"}], ")"}], "/@", "fr"}]}], "\n", RowBox[{ RowBox[{"framebr", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "H"}], "}"}], ",", RowBox[{"{", RowBox[{"W", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"framebl", "=", RowBox[{"reflh", "[", "framebr", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frametr", "=", RowBox[{"reflv", "[", "framebr", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frametl", "=", RowBox[{"reflv", "[", "framebl", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"frameGraph", "[", "f_List", "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"darkbluecolor", ",", RowBox[{"AbsoluteThickness", "[", "2.5`", "]"}], ",", RowBox[{"Line", "[", "f", "]"}]}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"frames", "=", RowBox[{"GraphicsRow", "[", RowBox[{"frameGraph", "/@", RowBox[{"{", RowBox[{"framebr", ",", "framebl", ",", "frametr", ",", "frametl"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"frames", ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "1", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", "0"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "2", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametl", ",", "0"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "3", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", RowBox[{"-", "1"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "4", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametr", ",", RowBox[{"-", "1"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "5", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", RowBox[{"-", "2"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "6", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametr", ",", RowBox[{"-", "2"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "7", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", RowBox[{"-", "3"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "8", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebr", ",", "1"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "9", "]"}], "=", RowBox[{"shift", "[", RowBox[{"frametl", ",", "1"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"frame", "[", "10", "]"}], "=", RowBox[{"shift", "[", RowBox[{"framebl", ",", "2"}], "]"}]}], ";"}], "\n", RowBox[{"trussfig", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"darkbluecolor", ",", RowBox[{"AbsoluteThickness", "[", "2.5`", "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"Line", "[", RowBox[{"frame", "[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "10"}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{"trussfig", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}]}], "Input"], Cell["\<\ For building an edge-node incidence matrix of a truss, start with a list of \ nodes with the ordering as given. In case of the Pratt truss, label from left to right and assume that the \ shorter edges have lengths equal to 1 and that node 6 is located at (0,0). Then create a list of edges; more precisely, list the edges in lexicographic \ order determined by the enumeration of the nodes, that is, list the labels of \ the two nodes connected by the edges with the lower coming first.\ \>", "Text"], Cell[BoxData[{ RowBox[{"listOfNodes", "=", RowBox[{"Union", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"k", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "]"}]}], "]"}]}], "\n", RowBox[{"numberOfNodes", "=", RowBox[{"Length", "[", "listOfNodes", "]"}]}], "\n", RowBox[{ RowBox[{"n", "[", "j_", "]"}], ":=", RowBox[{ "listOfNodes", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "\n", RowBox[{"listOfEdges", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"e", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"n", "[", "j", "]"}], ",", RowBox[{"n", "[", "k", "]"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"listOfEdgeEnds", "=", RowBox[{"Map", "[", RowBox[{"e", ",", "listOfEdges"}], "]"}]}], "\n", RowBox[{"numberOfEdges", "=", RowBox[{"Length", "[", "listOfEdges", "]"}]}], "\[IndentingNewLine]", RowBox[{"numberOfRestrictions", "=", "4"}], "\[IndentingNewLine]", RowBox[{"numberOfFreeNodVar", "=", RowBox[{ RowBox[{"2", "numberOfNodes"}], "-", "numberOfRestrictions"}]}]}], "Input"], Cell["\<\ One can use the data above for directly creating a plot of the truss.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"nodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"n", "[", "j", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"fixnodes", "=", RowBox[{"{", RowBox[{"redcolor", ",", RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"n", "[", "1", "]"}], "]"}], ",", RowBox[{"Point", "[", RowBox[{"n", "[", "numberOfNodes", "]"}], "]"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"edges", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"listOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"ntext", "[", "j_", "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"n", "[", "j", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", "0"}], ",", RowBox[{"Text", "[", RowBox[{"j", ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "-", RowBox[{"{", RowBox[{"0", ",", "0.15`"}], "}"}]}]}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"n", "[", "j", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", "1"}], ",", RowBox[{"Text", "[", RowBox[{"j", ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{"0", ",", "0.15`"}], "}"}]}]}], "]"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"nodestext", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ntext", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"ee", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}], "]"}]}], "\n", RowBox[{ RowBox[{"p", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Position", "[", RowBox[{"listOfEdgeEnds", ",", RowBox[{"e", "[", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}], "]"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"etext", "[", RowBox[{"j_", ",", "k_"}], "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{"0.5`", ",", "0.15`"}], "}"}]}]}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{ RowBox[{"-", "0.1`"}], ",", "0.5`"}], "}"}]}]}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{"0.65`", ",", RowBox[{"-", "0.5`"}]}], "}"}]}]}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", "1"}], "\[Equal]", RowBox[{ RowBox[{"ee", "[", RowBox[{"j", ",", "k"}], "]"}], "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"p", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{"0.35`", ",", "0.5`"}], "}"}]}]}], "]"}]}], "}"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"etext", "[", RowBox[{"j", ",", "k"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberOfNodes"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "numberOfNodes"}], "}"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"Union", "[", RowBox[{"Flatten", "[", RowBox[{"%", ",", "1"}], "]"}], "]"}], ",", "4"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"edgestext", "=", RowBox[{ RowBox[{ RowBox[{"Rest", "[", "%", "]"}], "\[LeftDoubleBracket]", RowBox[{"All", ",", "2"}], "\[RightDoubleBracket]"}], "/.", "\[InvisibleSpace]", RowBox[{"Thread", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"{", "i", "}"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberOfEdges"}], "}"}]}], "]"}], "\[Rule]", RowBox[{"Table", "[", RowBox[{"i", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberOfEdges"}], "}"}]}], "]"}]}], "]"}]}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ "darkbluecolor", ",", "nodes", ",", "edges", ",", "fixnodes", ",", "edgestext"}], "}"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "nodestext"}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.3`"}], ",", "1.3`"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Below we express the elongation of an ", FontFamily->"Arial"], "edge", StyleBox[" in terms of the coordinates ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ RowBox[{ StyleBox["(", FontSize->16], StyleBox[ RowBox[{ StyleBox["xr", FontSlant->"Italic"], ",", StyleBox["xu", FontSlant->"Italic"]}], FontSize->14], StyleBox[")", FontSize->16]}], TraditionalForm]], FontSize->18], " of the displacements of certain nodes. ", StyleBox["The variable in the description of the ", FontFamily->"Arial"], "edge", StyleBox[" is the label of the node from which the ", FontFamily->"Arial"], "edge", StyleBox[" is issuing, except for the ", FontFamily->"Arial"], "edge", StyleBox["s issuing from the fixed nodes. Furthermore, diagonal down or up \ is reckoned from left to right.", FontFamily->"Arial"], StyleBox[" ", FontFamily->"Arial", FontSize->14] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"s", "=", FractionBox["1", SqrtBox["2"]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"eh", "[", "1", "]"}], " ", "=", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "1", "]"}]}], "+", RowBox[{"xr", "[", "2", "]"}]}]}], ";", " ", RowBox[{"(*", " ", "horizontal", " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"eh", "[", "j_", "]"}], " ", ":=", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "2"}], "]"}], " ", RowBox[{ "(*", " ", "horizontal", " ", "*)"}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ev", "[", "j_", "]"}], " ", ":=", RowBox[{ RowBox[{"-", RowBox[{"xu", "[", "j", "]"}]}], "+", RowBox[{"xu", "[", RowBox[{"j", "+", "1"}], "]"}], " ", RowBox[{"(*", " ", "vertical", " ", "*)"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"edd", "[", "j_", "]"}], ":=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "+", RowBox[{"xu", "[", "j", "]"}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "1"}], "]"}], "-", RowBox[{"xu", "[", RowBox[{"j", "+", "1"}], "]"}]}], ")"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "down"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"edu", "[", "j_", "]"}], ":=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "j", "]"}]}], "-", RowBox[{"xu", "[", "j", "]"}], "+", RowBox[{"xr", "[", RowBox[{"j", "+", "3"}], "]"}], "+", RowBox[{"xu", "[", RowBox[{"j", "+", "3"}], "]"}]}], ")"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{"diagonal", " ", "up"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"edu", "[", "1", "]"}], " ", "=", RowBox[{"Expand", "[", RowBox[{"s", " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"xr", "[", "1", "]"}]}], "-", RowBox[{"xu", "[", "1", "]"}], "+", RowBox[{"xr", "[", "3", "]"}], "+", RowBox[{"xu", "[", "3", "]"}]}], ")"}]}], "]"}]}], ";"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Give arguments that the formulae above indeed describe the truss as \ depicted above. Furthermore use ", StyleBox["Mathematica", FontSlant->"Italic"], StyleBox[" to display the elongations of all 21 ", FontFamily->"Arial"], "edge", StyleBox["s: first the 10 horizontal ", FontFamily->"Arial"], "edge", StyleBox["s, then the 5 vertical and finally the 6 diagonal ones.", FontFamily->"Arial"] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Use the formulae for the elongations in order to set up ", StyleBox["the 21 \[Times] 24 connectivity matrix ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->16], TraditionalForm]], FontSize->18], " in a systematic manner, that is, in a way that is different from listing \ all of its entries manually. \n\n", StyleBox["If one has serious problems in writing the desired", FontSize->18], StyleBox[" ", FontSize->24], StyleBox["Mathematica ", FontSize->18, FontSlant->"Italic"], StyleBox["code, one may mail the lecturer and receive code that works. In \ that case, however, the maximal grade for the assignment is 80% of the \ maximally possible grade.", FontSize->18], " " }], "Exercise"], Cell[TextData[{ StyleBox["In order to make sure that the correct matrix is used in the \ remainder of the exercise, ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["A", "0"], FontSize->16], TraditionalForm]], FontSize->18], StyleBox[" is given below in textform. ", FontFamily->"Arial"] }], "Text"], Cell[TextData[{ " ", Cell[BoxData[ FormBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], "0", "0", FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, { RowBox[{"-", "1"}], "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", RowBox[{"-", "1"}], "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], "0", "0", "0", "0", FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "1", "0", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], "0", "0", "0", "0", FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "1", "0", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", "1"}], "0", "0", "0", "1", "0"}, {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", RowBox[{"-", FractionBox["1", SqrtBox["2"]]}], FractionBox["1", SqrtBox["2"]], FractionBox["1", SqrtBox["2"]], RowBox[{"-", FractionBox["1", SqrtBox["2"]]}]} }], "\[NoBreak]", ")"}], TraditionalForm]]] }], "Text"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Next determine the 21 by 20 matrix ", StyleBox["A ", FontSlant->"Italic"], StyleBox["occurring in the compatibility equation", FontVariations->{"CompatibilityType"->0}], ". " }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Is the Pratt truss stable or unstable?", StyleBox[" If stable, is it statically determinate or indeterminate?", FontFamily->"Arial"] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " ", StyleBox["Suppose the elastic constant of every ", FontFamily->"Arial"], "edge", StyleBox[" equals 20 and apply external downward forces equal to 0.1 at all \ the free bottom nodes and equal to 0.05 at all top nodes. Then compute the \ norm of the total force ", FontFamily->"Arial"], StyleBox["f, ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" the vector ", FontFamily->"Arial"], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" of displacements of the free nodes, and the vector y of internal \ forces in the ", FontFamily->"Arial"], "edge", StyleBox["s. List which horizontal ", FontFamily->"Arial"], "edge", StyleBox["s are in compression or in tension, and the same question for the \ vertical ", FontFamily->"Arial"], "edge", StyleBox["s and the diagonal ones. ", FontFamily->"Arial"], StyleBox[" \n", FontFamily->"Arial", FontSize->18], StyleBox["Use the symmetry of the truss with respect to the central vertical \ ", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], "edge", StyleBox[" as a check on the validity of your computations", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[".", FontFamily->"Arial", FontSize->18] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " ", StyleBox["Finally, compute the reaction forces at the fixed nodes.", FontFamily->"Arial"] }], "Exercise"], Cell[TextData[{ "We depict the results graphically. ", StyleBox["In the code below one needs ", FontFamily->"Arial"], StyleBox["x ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["from the preceding exercise", FontFamily->"Arial"], StyleBox[".", FontFamily->"Arial", FontSlant->"Italic"] }], "Text"], Cell[BoxData[{ RowBox[{"truss", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"darkbluecolor", ",", "nodes", ",", "edges", ",", "fixnodes"}], "}"}], "]"}]}], "\n", RowBox[{ RowBox[{"xx", ":=", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "x", ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"dn", "[", "j_", "]"}], ":=", RowBox[{ RowBox[{"n", "[", "j", "]"}], "+", RowBox[{"{", RowBox[{ RowBox[{"xx", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"2", " ", "j"}], "-", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"xx", "\[LeftDoubleBracket]", RowBox[{"2", " ", "j"}], "\[RightDoubleBracket]"}]}], "}"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"de", "[", RowBox[{"{", RowBox[{"j_", ",", "k_"}], "}"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"dn", "[", "j", "]"}], ",", RowBox[{"dn", "[", "k", "]"}]}], "}"}]}], "\n", RowBox[{ RowBox[{"dlistOfEdgeEnds", "=", RowBox[{"de", "/@", "listOfEdges"}]}], ";"}], "\n", RowBox[{ RowBox[{"dnodes", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"dn", "[", "j", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "numberOfNodes"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"dedges", "=", RowBox[{"Line", "[", RowBox[{"Flatten", "[", RowBox[{"dlistOfEdgeEnds", ",", "1"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{"dtruss", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "dnodes", ",", "dedges", ",", "fixnodes"}], "}"}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"{", RowBox[{"truss", ",", "dtruss"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.5`"}], ",", "1.2`"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"tens", "[", "i_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"y", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "\[GreaterEqual]", "0"}], ",", "darkbluecolor", ",", "redcolor"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"dtrusstens", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"tens", "[", "i", "]"}], ",", RowBox[{"Line", "[", RowBox[{ "dlistOfEdgeEnds", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberOfEdges"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"dtruss", ",", "dtrusstens", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"redcolor", ",", "dnodes"}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.5`"}], ",", "1.2`"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], StyleBox["Verify that the principle of virtual work, Castigliano's energy \ principle and the Hellinger\[Dash]Reissner principle all apply.", FontVariations->{"CompatibilityType"->0}] }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. Answer one of the following five questions. Correct \ answers to more than one questions lead to extra credit. \n\n", FontWeight->"Bold"], "Study the spectral properties of the stiffness matrix ", StyleBox["K = ", FontSlant->"Italic"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["A", "T"], " ", "C", " ", "A"}], TraditionalForm]]], StyleBox[" ", FontSlant->"Italic"], StyleBox["that", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], StyleBox["occurs in the equilibrium equation", FontVariations->{"CompatibilityType"->0}], StyleBox[" K x = f ", FontSlant->"Italic"], StyleBox["; here ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" represents the displacements at the free nodes and ", FontVariations->{"CompatibilityType"->0}], StyleBox["f", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" the external forces at these nodes, see page 126.", FontVariations->{"CompatibilityType"->0}], " What do these eigenvalues and eigenvectors mean for the truss? To this \ end, note that a, say normalized, eigenvector ", StyleBox["x", FontSlant->"Italic"], " of ", StyleBox["K ", FontSlant->"Italic"], StyleBox["corresponding to an eigenvalue", FontVariations->{"CompatibilityType"->0}], StyleBox[" \[Lambda] ", FontSlant->"Italic"], StyleBox["satisfies", FontVariations->{"CompatibilityType"->0}], StyleBox[" K ", FontSlant->"Italic"], "x ", StyleBox["= f ", FontSlant->"Italic"], "where", StyleBox[" f = ", FontSlant->"Italic"], "\[Lambda]", StyleBox[" x ", FontSlant->"Italic"], StyleBox[".", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], "\n\n\[FilledSmallCircle] 1. In particular, consider its eigenvalues and the \ corresponding eigenvectors. Furthermore, determine whether all eigenvalues \ are distinct and compute the matrix formed by the inner products of the \ eigenvectors. Could one have predicted the result? How should one normalize \ an eigenvector ", StyleBox["x", FontSlant->"Italic"], " corresponding to an eigenvalue \[Lambda] in order to have a force ", StyleBox["f", FontSlant->"Italic"], " of norm 1, where ", StyleBox["K x = f ", FontSlant->"Italic"], "?\n\[FilledSmallCircle] 2. Write the force ", StyleBox["f", FontSlant->"Italic"], " considered in an exercise above as a linear combination of the \ eigenvectors. For which eigenvalue makes the corresponding eigenvector the \ largest contribution to this sum? Which multiple of a unit eigenvector \ corresponding to the smallest eigenvalue is the least squares approximation \ to ", StyleBox["f", FontSlant->"Italic"], ". Using the preceding representation of ", StyleBox["f,", FontSlant->"Italic"], " it is easy to find the ", StyleBox["x ", FontSlant->"Italic"], "; do this and compare the results. Do some experiments as to which \ eigenvectors give the main contributions to ", StyleBox["x.", FontSlant->"Italic"], "\n\[FilledSmallCircle] 3. Study the eigendeformations of the truss, that \ is, deformations determined by an eigenvector. Notice that sometimes the plot \ of the truss when deformed by an eigendeformation, is a asymmetric, more \ specifically., it is not invariant under the reflection in the vertical axis \ passing through (0,0) . Show how to obtain the \"reflected\" deformation. \ Hint: keep in mind that the eigenspaces all are of dimension one.\n\ \[FilledSmallCircle] 4. Compute formally the total potential energy of the \ truss when deformed by an eigendeformation. Deduce that an eigenvector \ corresponding to the eigenvalue \[Lambda] should have norm ", Cell[BoxData[ FormBox[ StyleBox[ FractionBox["1", SqrtBox["\[Lambda]"]], FontSize->18], TraditionalForm]]], "if one wants this energy to have the constant value \[Dash]", Cell[BoxData[ StyleBox[ FractionBox["1", "2"], FontSize->18]]], ". (As the potential energy is energy stored in the deformed truss, it costs \ energy ", Cell[BoxData[ StyleBox[ FractionBox["1", "2"], FontSize->18]]], "to deform the original truss.)\n\[FilledSmallCircle] 5. Do you think this \ truss provided with its elasticity as given would make a safe bridge? " }], "Exercise"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Sturm\[Dash]Liouville Problem", "Subtitle"], Cell[TextData[{ "We consider a differential equation of Sturm\[Dash]Liouville type \n ", StyleBox["\[Dash] ", FontSize->24], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", "x"], " ", RowBox[{"(", RowBox[{"c", " ", RowBox[{"(", "x", ")"}], RowBox[{ SubscriptBox["\[PartialD]", "x"], " ", "u"}], " ", RowBox[{"(", "x", ")"}]}], ")"}]}], TraditionalForm]], FontSize->18], StyleBox[" + ", FontSize->18], StyleBox["q ", FontSize->18, FontSlant->"Italic"], StyleBox["(", FontSize->18], StyleBox["x", FontSize->18, FontSlant->"Italic"], StyleBox[") ", FontSize->18], StyleBox["u ", FontSize->18, FontSlant->"Italic"], StyleBox["(", FontSize->18], StyleBox["x", FontSize->18, FontSlant->"Italic"], StyleBox[") = ", FontSize->18], StyleBox["f ", FontSize->18, FontSlant->"Italic"], StyleBox["(", FontSize->18], StyleBox["x", FontSize->18, FontSlant->"Italic"], StyleBox[")", FontSize->18], "\nand we allow four types of boundary conditions, successively indicated by \ the numbers 1 through 4. Here\n1 stands for ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"u", " ", RowBox[{"(", "0", ")"}]}], "=", SubscriptBox["c", "1"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"u", " ", RowBox[{"(", "1", ")"}]}], "=", SubscriptBox["c", "2"]}], TraditionalForm]]], " ,\n2 stands for ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"u", " ", RowBox[{"(", "0", ")"}]}], "=", SubscriptBox["c", "1"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"w", " ", RowBox[{"(", "1", ")"}]}], "=", SubscriptBox["c", "2"]}], TraditionalForm]]], ",\n3 stands for ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"u", " ", RowBox[{"(", "0", ")"}]}], "=", SubscriptBox["c", "1"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{"u", "'"}], RowBox[{"(", "0", ")"}]}], "=", SubscriptBox["c", "2"]}], TraditionalForm]]], ",\n4 stands for ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"u", " ", RowBox[{"(", "1", ")"}]}], "=", SubscriptBox["c", "1"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{"u", "'"}], " ", RowBox[{"(", "1", ")"}]}], "=", SubscriptBox["c", "2"]}], TraditionalForm]]], ".\nWe create the ", StyleBox["Mathematica", FontSlant->"Italic"], " module slSolution to handle all these cases simultaneously. " }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c_", ",", "q_", ",", "u_"}], "]"}], "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{ SubscriptBox["\[PartialD]", "\[Xi]"], " ", RowBox[{"(", RowBox[{ RowBox[{"c", "[", "\[Xi]", "]"}], " ", RowBox[{ SubscriptBox["\[PartialD]", "\[Xi]"], RowBox[{"u", "[", "\[Xi]", "]"}]}]}], ")"}]}]}], "+", " ", RowBox[{ RowBox[{"q", "[", "\[Xi]", "]"}], RowBox[{"u", "[", "\[Xi]", "]"}]}]}], "/.", RowBox[{"\[Xi]", "\[Rule]", "x"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"slSolution", "[", RowBox[{ "c_", ",", "q_", ",", "f_", ",", "c1_", ",", "c2_", ",", "t_", ",", "opts___"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"\[Sigma]", ",", "\[Upsilon]", ",", "\[Xi]", ",", "u"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Sigma]", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "\[Upsilon]"}], "]"}], "[", "\[Xi]", "]"}], "==", RowBox[{"f", "[", "\[Xi]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{"t", "==", "1"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "[", "0", "]"}], "==", "c1"}], ",", RowBox[{ RowBox[{"\[Upsilon]", "[", "1", "]"}], "\[Equal]", "c2"}]}], "}"}], ",", RowBox[{"t", "==", "2"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "[", "0", "]"}], "==", "c1"}], ",", RowBox[{ RowBox[{ RowBox[{"c", "[", "1", "]"}], RowBox[{ RowBox[{"\[Upsilon]", "'"}], "[", "1", "]"}]}], "\[Equal]", "c2"}]}], "}"}], ",", RowBox[{"t", "==", "3"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "[", "0", "]"}], "==", "c1"}], ",", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "'"}], "[", "0", "]"}], "\[Equal]", "c2"}]}], "}"}], ",", RowBox[{"t", "==", "4"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "[", "1", "]"}], "==", "c1"}], ",", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "'"}], "[", "1", "]"}], "\[Equal]", "c2"}]}], "}"}]}], "]"}]}], "}"}], ",", "\[Upsilon]", ",", "\[Xi]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"u", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"Simplify", "[", " ", RowBox[{"\[Upsilon]", "[", "x", "]"}], "]"}], "/.", RowBox[{"Flatten", "[", "\[Sigma]", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"Italic\"]\)\!\(\* StyleBox[\" \", FontSlant->\"Italic\"]\) \[RightTeeArrow] \>\"", ",", RowBox[{"Expand", "[", RowBox[{"u", "[", "x", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"u", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "->", "Red"}], ",", RowBox[{"AspectRatio", "->", "Automatic"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"u", "[", "0", "]"}], ",", RowBox[{"1.05", RowBox[{"u", "[", "1", "]"}]}]}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "Input"], Cell["Example 1 on page 159", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"q", "=", RowBox[{"0", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c2", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", "2"}], ";"}], "\n", RowBox[{"slSolution", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t"}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t"}], "]"}]}], "Input"], Cell["Example 2 on page 160", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"q", "=", RowBox[{"0", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c2", "=", RowBox[{"\[Pi]", "/", "5"}]}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", "1"}], ";"}], "\n", RowBox[{"slSolution", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t"}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t"}], "]"}]}], "Input"], Cell["\<\ Sturm\[Dash]Liouville problem with constant coefficients on page 161\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"q", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"0", "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "==", RowBox[{"f", "[", "x", "]"}]}], ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "/.", RowBox[{"Rule", "->", "Equal"}]}], ")"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{"c", ",", "q", ",", "f"}], "]"}]}], "Input"], Cell["Regular perturbation on page 162", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"1", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"q", "=", RowBox[{"0", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"1", "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c2", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", "1"}], ";"}], "\n", RowBox[{"slSolution", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t", ",", RowBox[{"AspectRatio", "->", "Automatic"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"-", "0.1"}], ",", "0.2"}], "}"}]}]}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "q", ",", "f", ",", "c1", ",", "c2", ",", "t"}], "]"}]}], "Input"], Cell[TextData[{ "We create the ", StyleBox["Mathematica", FontSlant->"Italic"], " module displSolution to compute and plot the functions of displacement and \ of bar force in an elastic bar. " }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"displSolution", "[", RowBox[{"c_", ",", "f_", ",", "c1_", ",", "c2_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"\[Sigma]", ",", "\[Upsilon]", ",", "\[Xi]", ",", "u"}], "}"}], ",", RowBox[{ RowBox[{"\[Sigma]", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", RowBox[{"0", "&"}], ",", "\[Upsilon]"}], "]"}], "[", "\[Xi]", "]"}], "\[Equal]", RowBox[{"f", "[", "\[Xi]", "]"}]}], ",", RowBox[{ RowBox[{"\[Upsilon]", "[", "0", "]"}], "\[Equal]", "c1"}], ",", RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"\[Upsilon]", "'"}], "[", "1", "]"}]}], "\[Equal]", "c2"}]}], "}"}], ",", "\[Upsilon]", ",", "\[Xi]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"u", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"\[Upsilon]", "[", "x", "]"}], "]"}], "/.", RowBox[{"Flatten", "[", "\[Sigma]", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", RowBox[{"Expand", "[", RowBox[{"u", "[", "x", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"u", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"u", "[", "0", "]"}], ",", RowBox[{"1.1", RowBox[{"u", "[", "1", "]"}]}]}], "}"}]}]}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", RowBox[{"Expand", "[", RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "x", "]"}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"c", "[", "0", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{"c", "[", "1", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "1", "]"}]}]}], "}"}]}]}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{ RowBox[{"u", "'"}], "[", "1", "]"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.417154153504653*^9, 3.417154155640321*^9}, { 3.417154333481715*^9, 3.4171543342738523`*^9}}], Cell["Problem 3.1.1", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"\[Pi]", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{ RowBox[{"1", "-", "#"}], "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{"displSolution", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c1"}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c2"}], "]"}]}], "Input"], Cell["Problem 3.1.2", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{ RowBox[{"1", "-", "#"}], "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"\[Pi]", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c2", "=", "0"}], ";"}], "\n", RowBox[{"displSolution", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c2"}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c2"}], "]"}]}], "Input", CellChangeTimes->{{3.417154299910746*^9, 3.417154325883148*^9}}], Cell[TextData[{ "Problem 3.1.6. This ", StyleBox["Mathematica", FontSlant->"Italic"], " can only do if you introduce the function by means of ", StyleBox["Piecewise ", "Matica"], ". \nAt least it looks as if it can do it, but the answers are wrong! As the \ book says, the bar force should not jump.\n(Action is reaction.)" }], "Text", CellChangeTimes->{{3.41714814808401*^9, 3.417148184164118*^9}, { 3.41714838953937*^9, 3.4171484363599157`*^9}, {3.417156268641036*^9, 3.4171562771208467`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "c", "]"}], ";", RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{"x", "\[LessEqual]", RowBox[{"1", "/", "2"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"x", ">", RowBox[{"1", "/", "2"}]}]}], "}"}]}], "}"}], "]"}]}]}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"c", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "->", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".01", "]"}], ",", "Red"}], "}"}]}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"c", "[", "0", "]"}], ",", RowBox[{ RowBox[{"c", "[", "1", "]"}], "+", "0.1"}]}], "}"}]}]}], "]"}], "\n", RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", "\[Pi]"}], "\n", RowBox[{ RowBox[{"c1", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"c2", "=", "0"}], ";"}], "\n", RowBox[{"displSolution", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c2"}], "]"}], "\n", RowBox[{"Clear", "[", RowBox[{"c", ",", "f", ",", "c1", ",", "c2"}], "]"}]}], "Input"], Cell["\<\ This result is nonsense: the bar force jumped. So let us do it more slowly. We first do it with c=1, having in mind x<1/2.\ \>", "Text", CellChangeTimes->{{3.41714814808401*^9, 3.417148184164118*^9}, { 3.41714838953937*^9, 3.4171484363599157`*^9}, {3.41715160709063*^9, 3.4171516625162497`*^9}, {3.4171553203029127`*^9, 3.41715536749039*^9}, { 3.417156120405545*^9, 3.417156183592601*^9}, {3.417156474772953*^9, 3.4171565063182993`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "c", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", "1"}], "\n", RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", "\[Pi]"}], "\n", RowBox[{ RowBox[{"\[Sigma]", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", RowBox[{"0", "&"}], ",", "\[Upsilon]"}], "]"}], "[", "\[Xi]", "]"}], "\[Equal]", RowBox[{"f", "[", "\[Xi]", "]"}]}], ",", RowBox[{ RowBox[{"\[Upsilon]", "[", "0", "]"}], "\[Equal]", "0"}]}], "}"}], ",", "\[Upsilon]", ",", "\[Xi]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"u1", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"\[Upsilon]", "[", "x", "]"}], "]"}], "/.", RowBox[{"Flatten", "[", "\[Sigma]", "]"}]}]}]}], "Input", CellChangeTimes->{{3.417154449138871*^9, 3.417154469821383*^9}, { 3.4171552555470543`*^9, 3.417155276780258*^9}, 3.41715533537602*^9, { 3.417155434258645*^9, 3.4171554422364397`*^9}}], Cell["Next with c=2, having in mind x>1/2", "Text", CellChangeTimes->{{3.41714814808401*^9, 3.417148184164118*^9}, { 3.41714838953937*^9, 3.4171484363599157`*^9}, {3.41715160709063*^9, 3.4171516625162497`*^9}, {3.4171553203029127`*^9, 3.417155344292221*^9}, { 3.417155375985618*^9, 3.4171553856326437`*^9}, {3.4171561934635983`*^9, 3.4171562036708117`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "c", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", "2"}], "\n", RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", "\[Pi]"}], "\n", RowBox[{ RowBox[{"\[Sigma]", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", RowBox[{"0", "&"}], ",", "\[Upsilon]"}], "]"}], "[", "\[Xi]", "]"}], "\[Equal]", RowBox[{"f", "[", "\[Xi]", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"\[Upsilon]", "'"}], "[", "1", "]"}], "\[Equal]", "0"}]}], "}"}], ",", "\[Upsilon]", ",", "\[Xi]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"u2", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"\[Upsilon]", "[", "x", "]"}], "]"}], "/.", RowBox[{"Flatten", "[", "\[Sigma]", "]"}]}]}]}], "Input", CellChangeTimes->{{3.417154449138871*^9, 3.417154469821383*^9}, { 3.4171552555470543`*^9, 3.417155276780258*^9}, 3.41715533537602*^9, { 3.417155411057866*^9, 3.4171554118722067`*^9}, {3.417155450084942*^9, 3.4171554627878017`*^9}, {3.4171555592772417`*^9, 3.417155559995326*^9}}], Cell["Now match at x=1/2, both displacement and bar force", "Text", CellChangeTimes->{{3.41714814808401*^9, 3.417148184164118*^9}, { 3.41714838953937*^9, 3.4171484363599157`*^9}, {3.41715160709063*^9, 3.4171516625162497`*^9}, {3.4171553203029127`*^9, 3.417155344292221*^9}, { 3.417155375985618*^9, 3.4171553856326437`*^9}, {3.417155530556975*^9, 3.4171555553310413`*^9}, {3.417155739780073*^9, 3.417155740172118*^9}, { 3.417156211981995*^9, 3.417156255906609*^9}}], Cell[BoxData[ RowBox[{"solvC", "=", RowBox[{"Flatten", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"u1", "[", RowBox[{"1", "/", "2"}], "]"}], "==", RowBox[{"u2", "[", RowBox[{"1", "/", "2"}], "]"}]}], "&&", " ", RowBox[{ RowBox[{"1", " ", RowBox[{ RowBox[{"u1", "'"}], "[", RowBox[{"1", "/", "2"}], "]"}]}], "==", RowBox[{"2", " ", RowBox[{ RowBox[{"u2", "'"}], "[", RowBox[{"1", "/", "2"}], "]"}]}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"C", "[", "1", "]"}], ",", RowBox[{"C", "[", "2", "]"}]}], "}"}]}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.417152026192135*^9, 3.41715202828555*^9}, { 3.4171556154314327`*^9, 3.417155643415742*^9}, {3.4171557058528967`*^9, 3.41715576980731*^9}}], Cell["Now use Piecewise and show the results.", "Text", CellChangeTimes->{{3.41714814808401*^9, 3.417148184164118*^9}, { 3.41714838953937*^9, 3.4171484363599157`*^9}, {3.41715160709063*^9, 3.4171516625162497`*^9}, {3.4171553203029127`*^9, 3.417155344292221*^9}, { 3.417155375985618*^9, 3.4171553856326437`*^9}, {3.417155530556975*^9, 3.4171555553310413`*^9}, {3.417155739780073*^9, 3.417155740172118*^9}, { 3.417156211981995*^9, 3.417156255906609*^9}, {3.4171569667225533`*^9, 3.417156992687158*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"u", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"u1", "[", "x", "]"}], ",", RowBox[{"x", "\[LessEqual]", RowBox[{"1", "/", "2"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"u2", "[", "x", "]"}], ",", RowBox[{"x", ">", RowBox[{"1", "/", "2"}]}]}], "}"}]}], "}"}], "]"}], "/.", "solvC"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{"x", "\[LessEqual]", RowBox[{"1", "/", "2"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"x", ">", RowBox[{"1", "/", "2"}]}]}], "}"}]}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", RowBox[{"Expand", "[", RowBox[{"u", "[", "x", "]"}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ "Print", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"u", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}]}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", RowBox[{"Expand", "[", RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "x", "]"}]}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"c", "[", "0", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{"c", "[", "1", "]"}], RowBox[{ RowBox[{"u", "'"}], "[", "1", "]"}]}]}], "}"}]}]}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{ RowBox[{"u", "'"}], "[", "1", "]"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.417151835183264*^9, 3.417151849312351*^9}, { 3.417151887329855*^9, 3.417151892108367*^9}, {3.417151929033984*^9, 3.417151929824469*^9}, {3.4171520740733643`*^9, 3.417152110626485*^9}, { 3.4171521464158573`*^9, 3.417152149367497*^9}, {3.417154586813242*^9, 3.417154588890675*^9}, 3.4171558964818487`*^9, {3.4171559739464703`*^9, 3.417155977081047*^9}, {3.41715693715879*^9, 3.417156940622848*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Clear", "[", RowBox[{ "\[Sigma]", ",", "\[Upsilon]", ",", "\[Xi]", ",", "u", ",", "u1", ",", "u2", ",", "c", ",", "c1", ",", "c2", ",", "f", ",", "q", ",", "t"}], "]"}], ";"}]], "Input", CellChangeTimes->{{3.417156010921773*^9, 3.417156056063334*^9}, { 3.417156647985997*^9, 3.4171566546226597`*^9}, {3.4171570802465143`*^9, 3.4171570838602743`*^9}}], Cell[TextData[{ "The Sturm\[Dash]Liouville operator can be conceived of as a perturbation of \ the Laplace operator on the real line. The eigenvalue problem for the Laplace \ operator leads to Fourier theory: the eigenfunctions are the exponential \ functions with imaginary exponent of suitable frequency and the arbitrary \ periodic function ", StyleBox["f", FontSlant->"Italic"], " on [ \[Dash] \[Pi], \[Pi] ] can be written as a Fourier series ", StyleBox["f", FontSlant->"Italic"], " (", StyleBox["x", FontSlant->"Italic"], ") = ", Cell[BoxData[ FormBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"n", "=", RowBox[{"-", "\[Infinity]"}]}], "\[Infinity]"], RowBox[{ SubscriptBox["a", "n"], SuperscriptBox["\[DoubleStruckE]", RowBox[{"\[DoubleStruckI]", " ", "n", " ", "x"}]]}]}], TraditionalForm]]], ", where ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["a", "n"], " ", "=", RowBox[{ FractionBox["1", RowBox[{"2", " ", "\[Pi]"}]], " ", RowBox[{ SubsuperscriptBox["\[Integral]", RowBox[{"-", " ", "\[Pi]"}], "\[Pi]"], " ", RowBox[{ RowBox[{"f", "(", "x", ")"}], " ", SuperscriptBox["\[DoubleStruckE]", RowBox[{ RowBox[{"-", " ", "\[DoubleStruckI]"}], " ", "n", " ", "x"}]], RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], TraditionalForm]]], ". We study the properties of solutions of the Sturm-Liouville problem and \ shall discover that these lead to a generalization of Fourier theory which \ mimics the latter theory in almost al aspects." }], "Text"], Cell[TextData[{ "Next, we consider the Sturm-Liouville eigenvalue problem. The first example \ is so easy that ", StyleBox["Mathematica", FontSlant->"Italic"], " can solve the differential equation symbolically." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{"1", "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"q", "=", RowBox[{"1", "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "\[Equal]", RowBox[{"\[Lambda]", " ", RowBox[{"u", "[", "x", "]"}]}]}], ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "/.", RowBox[{"Rule", "->", "Equal"}]}], ")"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{"c", ",", "q"}], "]"}]}], "Input"], Cell["Let us make it somewhat more difficult. ", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c", "=", RowBox[{ RowBox[{"1", "+", RowBox[{"Exp", "[", "#", "]"}]}], "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"q", "=", RowBox[{"1", "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "\[Equal]", RowBox[{"\[Lambda]", " ", RowBox[{"u", "[", "x", "]"}]}]}], ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "/.", RowBox[{"Rule", "->", "Equal"}]}], ")"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "Input"], Cell[TextData[{ "Famous examples like the Legendre equation (1 \[Dash] ", Cell[BoxData[ FormBox[ SuperscriptBox["x", "2"], TraditionalForm]]], ")", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{ RowBox[{ RowBox[{ RowBox[{"u", "''"}], RowBox[{"(", "x", ")"}]}], " ", "-", RowBox[{"2", "x", " ", RowBox[{"u", "'"}], RowBox[{"(", "x", ")"}]}], " ", "+", " ", RowBox[{"\[Lambda]", " ", "u"}]}], " ", "=", " ", "0", " "}]}], TraditionalForm]]], "on [ -1, 1] are even harder than this. In that case, ", StyleBox["c[x]", "Matica"], " has a zero at both the end points. But we made it hard enough for now." }], "Text"], Cell[TextData[{ "We return to the Sturm-Liouville eigenvalue problem with ", StyleBox["c", FontSlant->"Italic"], " (", StyleBox["x", FontSlant->"Italic"], ") = 1 + ", Cell[BoxData[ FormBox[ SuperscriptBox["\[DoubleStruckE]", "x"], TraditionalForm]]], " and ", StyleBox["q", FontSlant->"Italic"], " (", StyleBox["x", FontSlant->"Italic"], ") = 1, but now we also impose kinematic boundary conditions, viz., ", StyleBox["u", FontSlant->"Italic"], " (0) = ", StyleBox["u", FontSlant->"Italic"], " (1) = 0. \nThe following random point may have to be changed. We tried to \ choose it such that the eigenfunctions that are of interest to us do not have \ a small value at ", StyleBox["random", "Matica"], "." }], "Text"], Cell[BoxData[ RowBox[{"random", "=", ".1"}]], "Input"], Cell["\<\ We turn off a warning. We know that we are not going to get highest \ precision.\ \>", "Text"], Cell[BoxData[ RowBox[{"Off", "[", RowBox[{"NDSolve", "::", "inaccur"}], "]"}]], "Input"], Cell["We introduce a possible eigenfunction.", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"specialFunction", "[", "\[Lambda]_", "]"}], ":=", RowBox[{"First", "[", RowBox[{"(", RowBox[{"u", "/.", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "\[Equal]", RowBox[{"\[Lambda]", " ", RowBox[{"u", "[", "x", "]"}]}]}], ",", RowBox[{ RowBox[{"u", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"u", "'"}], "[", "0", "]"}], "\[Equal]", "1"}]}], "}"}], ",", "u", ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}], ")"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"specialFunction2", "[", "\[Lambda]_", "]"}], ":=", RowBox[{"First", "[", RowBox[{"(", RowBox[{"u", "/.", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"slDiffeq", "[", RowBox[{"c", ",", "q", ",", "u"}], "]"}], "[", "x", "]"}], "\[Equal]", RowBox[{"\[Lambda]", " ", RowBox[{"u", "[", "x", "]"}]}]}], ",", RowBox[{ RowBox[{"u", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"u", "[", "random", "]"}], "\[Equal]", "1"}]}], "}"}], ",", "u", ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}], ")"}], "]"}]}]}], "Input"], Cell["\<\ Actually, it is only an eigenfunction if a boundary value vanishes.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"boundaryVal", "[", RowBox[{"\[Lambda]_", "?", "NumberQ"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"specialFunction", "[", "\[Lambda]", "]"}], "[", "x", "]"}], "/.", RowBox[{"x", "\[Rule]", "1"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaryVal2", "[", RowBox[{"\[Lambda]_", "?", "NumberQ"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"specialFunction2", "[", "\[Lambda]", "]"}], "[", "x", "]"}], "/.", RowBox[{"x", "\[Rule]", "1"}]}]}]}], "Input"], Cell["\<\ The reason for the _?NumberQ Pattern is that we do not want FindRoot below to \ do anything before \[Lambda] is assigned a numerical value.\ \>", "Comments", CellChangeTimes->{{3.416891235222178*^9, 3.41689137572007*^9}}, CellTags->"Comment"], Cell[TextData[{ "Here is an eigenfunction for which the boundary value at ", StyleBox["x=1", "Matica"], " is too large." }], "Text"], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"specialFunction2", "[", "20", "]"}], "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]], "Input"], Cell[TextData[{ "And one for which the boundary value at ", StyleBox["x=1", "Matica"], " is too small." }], "Text"], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"specialFunction", "[", "30", "]"}], "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "->", "Automatic"}]}], "]"}]], "Input"], Cell[TextData[{ "To get an idea of the values of the first eigenvalues, we plot ", StyleBox["boundaryVal", "Matica"], " in a range. As it takes a while to evaluate ", StyleBox["boundaryVal", "Matica"], " at any point, we only ask for a list plot." }], "Text"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"\[Lambda]", ",", RowBox[{"boundaryVal", "[", "\[Lambda]", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\[Lambda]", ",", RowBox[{"start", "=", "0"}], ",", "100", ",", "10"}], "}"}]}], "]"}], ",", RowBox[{"AxesOrigin", "\[Rule]", RowBox[{"{", RowBox[{"start", ",", "0"}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.015", "]"}]}], "}"}]}]}], "]"}]], "Input"], Cell[TextData[{ "We recognize the values for ", StyleBox["\[Lambda]=20", "Matica"], " and for ", StyleBox["\[Lambda]=30", "Matica"], " from the previous plots." }], "Text"], Cell[TextData[{ "We now search for the first eigenvalue by the so-called shooting method. In \ naval history, one had ships shoot at one another. An observer at the top of \ the mast was shouting how far short or long a shot was; the cannon changed \ its aim accordingly. Here we aim by means of ", StyleBox["\[Lambda]", "Matica"], " and we try to hit the water line at ", StyleBox["x=1", "Matica"], "." }], "Text"], Cell[BoxData[ RowBox[{"l1", "=", RowBox[{"\[Lambda]", "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"boundaryVal", "[", "\[Lambda]", "]"}], ",", RowBox[{"{", RowBox[{"\[Lambda]", ",", "25", ",", "30"}], "}"}]}], "]"}]}]}]], "Input"], Cell[BoxData[ RowBox[{"l2", "=", RowBox[{"\[Lambda]", "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"boundaryVal", "[", "\[Lambda]", "]"}], ",", RowBox[{"{", RowBox[{"\[Lambda]", ",", "100", ",", "105"}], "}"}]}], "]"}]}]}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"f1", "=", RowBox[{"specialFunction", "[", "l1", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f2", "=", RowBox[{"specialFunction", "[", "l2", "]"}]}], ";"}]}], "Input"], Cell["\<\ This is what the first two eigenvalues and their eigenfunctions look like.\ \>", "Text"], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"{", RowBox[{ RowBox[{"f1", "[", "x", "]"}], ",", RowBox[{"f2", "[", "x", "]"}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "->", "Automatic"}]}], "]"}]], "Input"], Cell[TextData[{ "The theory says ", StyleBox["f1", "Matica"], " and ", StyleBox["f2", "Matica"], " are perpendicular. Let us verify this. As ", StyleBox["f1", "Matica"], " and ", StyleBox["f2", "Matica"], " are only numerical approximations, we should ask for low precision." }], "Text"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " What is the theoretical result that is being alluded to above." }], "Exercise"], Cell[BoxData[ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"f1", "[", "x", "]"}], RowBox[{"f2", "[", "x", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PrecisionGoal", "\[Rule]", "1"}]}], "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Find the next eigenvalue and check that its eigenfunction is perpendicular \ to the preceding ones. How many zeroes do you expect the fourth eigenfunction \ to have?" }], "Exercise"], Cell[TextData[{ "It is no surprise that ", StyleBox["f1", "Matica"], " and ", StyleBox["f2", "Matica"], " look pretty much like sine functions. We are not very far from Fourier \ analysis; the case ", StyleBox["c[x]=1, q[x]=0", "Matica"], " would lead us to Fourier analysis. This suggests to look at the analogue \ of Fourier expansion." }], "Text"], Cell[TextData[{ "Recall the projection of a vector ", StyleBox["v", "Matica"], " along a vector ", StyleBox["w", "Matica"], " is given by ", Cell[BoxData[ FormBox[ FractionBox[ StyleBox[ RowBox[{"(", RowBox[{"v", ",", "w"}], ")"}], "Matica"], StyleBox[ RowBox[{"(", RowBox[{"w", ",", "w"}], ")"}], "Matica"]], TraditionalForm]]], StyleBox["w", "Matica"], " ." }], "Text"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " ", "Approximate the function ", StyleBox["x", FontSlant->"Italic"], " \[Dash] ", Cell[BoxData[ FormBox[ SuperscriptBox["x", "2"], TraditionalForm]]], " with a linear combination of ", StyleBox["f1", "Matica"], " and ", StyleBox["f2", "Matica"], " , so that the error is orthogonal to the approximation. Plot the error. Of \ which function does this error remind you? Do you have an explanation for \ this similarity?" }], "Exercise"], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"specialFunction", "[", "1000", "]"}], "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]], "Input"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " How many eigenvalues do you expect below 1000? What seems to be the \ behavior of the zeroes of ", StyleBox["specialFunction[\[Lambda]]", "Matica"], " as a function of ", StyleBox["\[Lambda]", "Matica"], " ? Sturm proved the theorem about this." }], "Exercise"], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], " Extra question: choose your favorite (smooth) function ", StyleBox["G", FontSlant->"Italic"], " on the interval [ 0,1 ]. For each ", StyleBox["n ", FontSlant->"Italic"], "> 0 we can approximate this function ", StyleBox["G", FontSlant->"Italic"], " using the first ", StyleBox["n", FontSlant->"Italic"], " eigenfunctions. Find this approximation and calculate the error (using the \ integral norm). Plot the error using Listplot for ", StyleBox["n", FontSlant->"Italic"], " = 1 to 30. What do you notice?" }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell["Soap Bubbles in the Plane", "Subtitle"], Cell[TextData[{ "The web has quite a lot of material on the shape of soap bubbles in space, \ see for instance:\n", StyleBox["http://www.exploratorium.edu/ronh/bubbles/bubble_meets_bubble.\ html", "Matica"], " \n", StyleBox["http://www.scidiv.bcc.ctc.edu/Math/Plateau.html", "Matica"], " \n", StyleBox["http://www.math.uiuc.edu/~jms/Images/double/\n\ http://math.ucdavis.edu/~hass/bubbles.html", "Matica"] }], "Text"], Cell["\<\ A film of soap minimizes area under constraints. The constraints are of two \ types. The amount of air trapped in a bubble does not change, so the volume \ of a bubble is fixed. The film may adhere to a substrate or to a wire. That \ gives boundary conditions. As the study of soap bubbles in space is rather \ nontrivial, we now look at a lower\[Dash]dimensional analog. Our \"film of soap\" will consist of one\[Dash]dimensional walls in the plane \ and the functional to be minimized is arc length. In this case, the amount of \ \"air\" trapped in a bubble is now given by the area of a bubble. The soap \ has \"arc tension\" instead of surface tension and the soap tries to minimize \ arc length. (One may also think of true soap bubbles between two sheets of \ clear glass that are close together, with the bubbles reaching from one sheet \ of glass to the other. Then what we are looking at is how the soap meets a \ sheet.) Here are some plots.\ \>", "Text"], Cell["A free floating bubble.", "Text"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "1"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"Background", "->", "lightbluecolor"}]}], "]"}]], "Input"], Cell["Two bubbles, attached to each other, also floating free.", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"\[Theta]", "=", RowBox[{"15", " ", "\[Degree]"}]}], ";"}], "\n", RowBox[{ RowBox[{"a", "=", RowBox[{"Cot", "[", "\[Theta]", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"b", "=", RowBox[{"Cot", "[", RowBox[{"\[Theta]", "+", RowBox[{"120", " ", "\[Degree]"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"c", "=", RowBox[{"Cot", "[", RowBox[{"\[Theta]", "+", RowBox[{"240", " ", "\[Degree]"}]}], "]"}]}], ";", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", "0.09`"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}]}], "}"}], ",", "0.09`"}], "]"}], ",", "Blue", ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "0"}], "}"}], ",", SqrtBox[ RowBox[{"1", "+", SuperscriptBox["a", "2"]}]], ",", RowBox[{"{", RowBox[{ RowBox[{"\[Pi]", "-", "\[Theta]"}], ",", RowBox[{"\[Pi]", "+", "\[Theta]"}]}], "}"}]}], "]"}], ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{"b", ",", "0"}], "}"}], ",", SqrtBox[ RowBox[{"1", "+", SuperscriptBox["b", "2"]}]], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"60", " ", "\[Degree]"}], "-", "\[Theta]"}], ",", RowBox[{ RowBox[{ RowBox[{"-", "60"}], " ", "\[Degree]"}], "+", "\[Theta]", "+", RowBox[{"2", " ", "\[Pi]"}]}]}], "}"}]}], "]"}], ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{"c", ",", "0"}], "}"}], ",", SqrtBox[ RowBox[{"1", "+", SuperscriptBox["c", "2"]}]], ",", RowBox[{"{", RowBox[{ RowBox[{"\[Theta]", "-", RowBox[{"480", " ", "\[Degree]"}]}], ",", RowBox[{ RowBox[{"-", "\[Theta]"}], "-", RowBox[{"240", " ", "\[Degree]"}]}]}], "}"}]}], "]"}]}], "}"}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}]}], "]"}]}]}], "Input"], Cell["\<\ It is much harder to draw the case of three bubbles, when one does not take a \ very special case. Here is code that seems to work.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"rot", "[", "\[Phi]_", "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]", "]"}], ",", RowBox[{"-", RowBox[{"Sin", "[", "\[Phi]", "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Sin", "[", "\[Phi]", "]"}], ",", RowBox[{"Cos", "[", "\[Phi]", "]"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"setup3bubbles", "[", RowBox[{"\[Theta]1_", ",", "\[Theta]2_", ",", "\[Theta]3_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"(", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "p1", ",", "p2", ",", "p3", ",", "p4", ",", "t12", ",", "t23", ",", "t13", ",", "m12", ",", "m23", ",", "m13", ",", "m3", ",", "m4", ",", "m5", ",", "t4", ",", "t5", ",", "t24", ",", "t14", ",", "t34", ",", "xp4", ",", "yp4", ",", "u"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"p1", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Theta]1", "]"}], ",", RowBox[{"Sin", "[", "\[Theta]1", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"p2", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Theta]2", "]"}], ",", RowBox[{"Sin", "[", "\[Theta]2", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"p3", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Theta]3", "]"}], ",", RowBox[{"Sin", "[", "\[Theta]3", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"m3", "=", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"circumcenter", " ", "first", " ", "bubble"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"m4", "=", RowBox[{"t4", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"circumcenter", " ", "second", " ", "bubble"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"m5", "=", RowBox[{"t5", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]3"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]3"}], ")"}], "/", "2"}], "]"}]}], "}"}]}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"circumcenter", " ", "third", " ", "bubble"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"t4", "=", RowBox[{ RowBox[{"t4", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"m4", "==", RowBox[{"p1", "+", RowBox[{"u", " ", RowBox[{ RowBox[{"rot", "[", RowBox[{"60", "Degree"}], "]"}], ".", "p1"}]}]}]}], "]"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"t5", "=", RowBox[{ RowBox[{"t5", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"m5", "==", RowBox[{"p1", "+", RowBox[{"u", " ", RowBox[{ RowBox[{"rot", "[", RowBox[{ RowBox[{"-", "60"}], "Degree"}], "]"}], ".", "p1"}]}]}]}], "]"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"p4", "=", RowBox[{"{", RowBox[{"xp4", ",", "yp4"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"p4pair", "=", RowBox[{ RowBox[{"p4", "/.", RowBox[{"Solve", "[", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"p4", "-", "m4"}], ")"}], ".", RowBox[{"(", RowBox[{"p4", "-", "m4"}], ")"}]}], "==", RowBox[{ RowBox[{"(", RowBox[{"p1", "-", "m4"}], ")"}], ".", RowBox[{"(", RowBox[{"p1", "-", "m4"}], ")"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"p4", "-", "m5"}], ")"}], ".", RowBox[{"(", RowBox[{"p4", "-", "m5"}], ")"}]}], "==", RowBox[{ RowBox[{"(", RowBox[{"p1", "-", "m5"}], ")"}], ".", RowBox[{"(", RowBox[{"p1", "-", "m5"}], ")"}]}]}]}], "}"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"p4", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{ RowBox[{"First", "[", "p4pair", "]"}], "-", "p1"}], "]"}], "==", RowBox[{"{", RowBox[{"0.", ",", "0."}], "}"}]}], ",", RowBox[{"Last", "[", "p4pair", "]"}], ",", RowBox[{"First", "[", "p4pair", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"the", " ", "fourth", " ", "meeting", " ", "point"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"m12", "=", RowBox[{"t12", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]1", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"m23", "=", RowBox[{"t23", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]3", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]3", "+", "\[Theta]2"}], ")"}], "/", "2"}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"m13", "=", RowBox[{"t13", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]3", "+", "\[Theta]1"}], ")"}], "/", "2"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{ RowBox[{"(", RowBox[{"\[Theta]3", "+", "\[Theta]1"}], ")"}], "/", "2"}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"t12", "=", RowBox[{ RowBox[{"t12", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"m12", "==", RowBox[{"p2", "+", RowBox[{"u", " ", RowBox[{ RowBox[{"rot", "[", RowBox[{"150", "Degree"}], "]"}], ".", "p2"}]}]}]}], "]"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"t23", "=", RowBox[{ RowBox[{"t23", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"m23", "==", RowBox[{"p3", "+", RowBox[{"u", " ", RowBox[{ RowBox[{"rot", "[", RowBox[{"150", "Degree"}], "]"}], ".", "p3"}]}]}]}], "]"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"t13", "=", RowBox[{ RowBox[{"t13", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{"m13", "==", RowBox[{"p3", "+", RowBox[{"u", " ", RowBox[{ RowBox[{"rot", "[", RowBox[{"30", "Degree"}], "]"}], ".", "p3"}]}]}]}], "]"}], "]"}]}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"m24", "=", RowBox[{ RowBox[{"t24", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}]}], "}"}], ".", RowBox[{"(", RowBox[{"p2", "-", "p4"}], ")"}]}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"p2", "+", "p4"}], ")"}], "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"m14", "=", RowBox[{ RowBox[{"t14", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}]}], "}"}], ".", RowBox[{"(", RowBox[{"p1", "-", "p4"}], ")"}]}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"p1", "+", "p4"}], ")"}], "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"m34", "=", RowBox[{ RowBox[{"t34", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}]}], "}"}], ".", RowBox[{"(", RowBox[{"p3", "-", "p4"}], ")"}]}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"p3", "+", "p4"}], ")"}], "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"t24", "=", RowBox[{"t24", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"m24", "-", "p2"}], ")"}], ".", "p2"}], "==", "0"}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"t14", "=", RowBox[{"t14", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"m14", "-", "p1"}], ")"}], ".", "p1"}], "==", "0"}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"t34", "=", RowBox[{"t34", "/.", RowBox[{"First", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"m34", "-", "p3"}], ")"}], ".", "p3"}], "==", "0"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ")"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"arc", "[", RowBox[{"direction_", ",", "center_", ",", "start_", ",", "end_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"a", "=", RowBox[{"Arg", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "I"}], "}"}], ".", RowBox[{"(", RowBox[{"start", "-", "center"}], ")"}]}], "]"}]}], ",", RowBox[{"b", "=", RowBox[{"Arg", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "I"}], "}"}], ".", RowBox[{"(", RowBox[{"end", "-", "center"}], ")"}]}], "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"a", "-", "b"}], "]"}], "==", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"start", ",", "end"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Det", "[", RowBox[{"{", RowBox[{ RowBox[{"start", "-", "center"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"p4", ".", "p4"}], "<", "1"}], ",", "1", ",", RowBox[{"-", "1"}]}], "]"}], "direction"}]}], "}"}], "]"}], ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Circle", "[", RowBox[{"center", ",", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"(", RowBox[{"center", "-", "start"}], ")"}], ".", RowBox[{"(", RowBox[{"center", "-", "start"}], ")"}]}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"a", ">", "b"}], ",", RowBox[{"b", "+", RowBox[{"2", "\[Pi]"}]}], ",", "b"}], "]"}]}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Circle", "[", RowBox[{"center", ",", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"(", RowBox[{"center", "-", "start"}], ")"}], ".", RowBox[{"(", RowBox[{"center", "-", "start"}], ")"}]}], "]"}], ",", RowBox[{"{", RowBox[{"b", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"b", ">", "a"}], ",", RowBox[{"a", "+", RowBox[{"2", "\[Pi]"}]}], ",", "a"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input"], Cell["An example with some auxiliary lines drawn in:", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"setup3bubbles", "[", RowBox[{ RowBox[{"60", "Degree"}], ",", RowBox[{"80", "Degree"}], ",", RowBox[{"40", "Degree"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p1", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p2", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p3", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p4", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", "Blue", ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p1"}]}], ",", "m12", ",", "p1", ",", "p2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p2"}]}], ",", "m23", ",", "p2", ",", "p3"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p3"}]}], ",", "m13", ",", "p3", ",", "p1"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p1"}], ",", "m14", ",", "p1", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p2"}], ",", "m24", ",", "p2", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p3"}], ",", "m34", ",", "p3", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", "Green", ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p1"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p2"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p3"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m4", ",", "p1"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m4", ",", "p2"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m4", ",", "p4"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m5", ",", "p1"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m5", ",", "p3"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m5", ",", "p4"}], "}"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "->", "All"}], ",", RowBox[{"Background", "->", "lightbluecolor"}]}], "]"}]}], "Input"], Cell["An example without the extra lines:", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"setup3bubbles", "[", RowBox[{ RowBox[{"57", "Degree"}], ",", RowBox[{"80", "Degree"}], ",", RowBox[{ RowBox[{"-", "40"}], "Degree"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p1", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p2", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p3", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"p4", ",", ".09"}], "]"}], ",", "\[IndentingNewLine]", "Blue", ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p1"}]}], ",", "m12", ",", "p1", ",", "p2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p2"}]}], ",", "m23", ",", "p2", ",", "p3"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p3"}]}], ",", "m13", ",", "p3", ",", "p1"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p1"}], ",", "m14", ",", "p1", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p2"}], ",", "m24", ",", "p2", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p3"}], ",", "m34", ",", "p3", ",", "p4"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "->", "All"}], ",", RowBox[{"Background", "->", "lightbluecolor"}]}], "]"}]}], "Input"], Cell["Or, if one wants many examples in one movie:", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"film", ":=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{".01", "+", RowBox[{"n", " ", ".02"}]}], ",", RowBox[{"2", "\[Pi]"}]}], "]"}], ">", " ", RowBox[{"Mod", "[", RowBox[{ RowBox[{".02", "+", RowBox[{"n", " ", ".1"}]}], ",", RowBox[{"2", "\[Pi]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"setup3bubbles", "[", RowBox[{"0", ",", RowBox[{".01", "+", RowBox[{"n", " ", ".02"}]}], ",", RowBox[{".02", "+", RowBox[{"n", " ", ".1"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"setup3bubbles", "[", RowBox[{"0", ",", RowBox[{".02", "+", RowBox[{"n", " ", ".1"}]}], ",", RowBox[{".01", "+", RowBox[{"n", " ", ".02"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"Green", ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p1"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p2"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"m3", ",", "p3"}], "}"}], "]"}], ",", "\[IndentingNewLine]", "Blue", ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p1"}]}], ",", "m12", ",", "p1", ",", "p2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p2"}]}], ",", "m23", ",", "p2", ",", "p3"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"rot", "[", RowBox[{"120", "Degree"}], "]"}], ".", "p3"}]}], ",", "m13", ",", "p3", ",", "p1"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p1"}], ",", "m14", ",", "p1", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p2"}], ",", "m24", ",", "p2", ",", "p4"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arc", "[", RowBox[{ RowBox[{"-", "p3"}], ",", "m34", ",", "p3", ",", "p4"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}]}], "}"}]}], ",", RowBox[{"ImageSize", "->", "600"}], ",", RowBox[{"Background", "->", "lightbluecolor"}]}], "]"}]}], "\n", ",", RowBox[{"{", RowBox[{"n", ",", "30", ",", "343"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ListAnimate", "[", "film", "]"}]}], "Input", CellChangeTimes->{{3.416891441053791*^9, 3.416891447554994*^9}, { 3.4169117633881617`*^9, 3.416911765856957*^9}}], Cell[TextData[{ "One may turn the pictures inside out by changing\n", StyleBox["Mod[.01+n .02,2", FontWeight->"Bold"], "\[Pi]", StyleBox["] > Mod[.02+n .1,2", FontWeight->"Bold"], "\[Pi]", StyleBox["]", FontWeight->"Bold"], " into\n", StyleBox["Mod[.01+n .02,2", FontWeight->"Bold"], "\[Pi]", StyleBox["] < Mod[.02+n .1,2", FontWeight->"Bold"], "\[Pi]", StyleBox["]", FontWeight->"Bold"], " or vice versa." }], "Text"], Cell[TextData[{ "In the pictures we tried to illustrate some facts:\n* Fact 1. ", StyleBox["The wall of a bubble is made up of circular arcs", FontWeight->"Bold"], ".\n* Fact 2. ", StyleBox["The arcs meet each other at an angle of 120 degree", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}], StyleBox["s", FontWeight->"Bold"], "." }], "Text"], Cell[TextData[{ "In this project you should at least prove these two facts.\nThe first fact \ is an application of variational principles, and is usually proved by means \ of a differential equation.\nFor the second fact one also uses a variational \ principle, but the perturbation may be done more geometrically. To this end, \ study the following picture and the code that generates it .\nUnder what ", StyleBox["conditions on the directions", FontColor->RGBColor[0, 0, 1]], " of the red arms is it true, for ", StyleBox["very small", FontColor->RGBColor[0, 0, 1]], " ", StyleBox["h", "Matica"], " , that the total length of the blue bars is less than the total length of \ the red arms ? Which areas in the picture are the same ?\nImagine that the \ green circle represents the field of view of a microscope. Then the red arms \ could be pieces of circles that just look straight because of the \ magnification. Apply repeatedly what you have learnt about the red arms and \ the blue bars." }], "Exercise"], Cell[BoxData[{ RowBox[{ RowBox[{"\[Phi]1", "=", RowBox[{"120", "Degree"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction1", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]1", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]1", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]2", "=", RowBox[{ RowBox[{"-", "5"}], "Degree"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction2", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]2", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]2", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]3", "=", RowBox[{"210", " ", "Degree"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction3", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]3", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]3", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "=", "0.08"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"Red", ",", RowBox[{"Thickness", "[", ".05", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "direction1"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "direction2"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "direction3"}], "}"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", "Green", ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "0.04"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"direction1", ",", "0.05"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"direction2", ",", "0.05"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"direction3", ",", "0.05"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "1"}], "]"}], ",", "Blue", ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".012", "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"direction3", ",", RowBox[{ RowBox[{".75", "direction3"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", RowBox[{".5", "direction3"}], ",", RowBox[{"h", " ", "direction1"}], ",", RowBox[{".5", "direction2"}], ",", RowBox[{ RowBox[{".75", "direction2"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", "direction2"}], "}"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"h", " ", "direction1"}], ",", "direction1"}], "}"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{ RowBox[{ RowBox[{".75", "direction3"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{ RowBox[{".5", "direction3"}], ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{ RowBox[{"h", " ", "direction1"}], ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{ RowBox[{".5", "direction2"}], ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{ RowBox[{ RowBox[{".75", "direction2"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", RowBox[{"direction1", ",", "0.02"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{"direction2", ",", "0.02"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Disk", "[", " ", RowBox[{"direction3", ",", "0.02"}], "]"}]}], "}"}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "->", "All"}], ",", RowBox[{"Background", "->", "lightbluecolor"}]}], "]"}]}], "Input"], Cell["\<\ There many more facts. For instance * When a bubble has three corners, the position of these corners determines \ the shape of that bubble. In our picture of three bubbles, the corners of the \ bubbles are displayed as red disks. * When a bubble has four corners, there exists a circle passing through those \ corners. * When a bubble has five corners, the position of these corners determines \ the shape of that bubble.\ \>", "Text"], Cell["\<\ We explore the total length of the blue bars. First for actual values.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"linelength", "[", RowBox[{"Line", "[", "a_List", "]"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"a", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], "-", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"Length", "[", "a", "]"}], "-", "1"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"linelength", "::", "usage"}], ":=", "\"\\""}], "\[IndentingNewLine]", RowBox[{"?", "linelength"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"bluelength", "[", "h_", "]"}], ":=", RowBox[{ RowBox[{"linelength", "[", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"h", " ", "direction1"}], ",", "direction1"}], "}"}], "]"}], "]"}], "+", RowBox[{"linelength", "[", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"direction3", ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"3", "/", "4"}], ")"}], "direction3"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "direction3"}], ",", RowBox[{"h", " ", "direction1"}], ",", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "direction2"}], ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"3", "/", "4"}], ")"}], "direction2"}], "-", RowBox[{"h", " ", "direction1"}]}], ",", "direction2"}], "}"}], "]"}], "]"}]}]}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "h", "]"}], ";"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"bluelength", "[", "h", "]"}], ",", RowBox[{"{", RowBox[{"h", ",", RowBox[{"-", "0.08`"}], ",", "0.08`"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "redcolor"}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}]}], "]"}]}], "Input"], Cell["\<\ Next we explore the total length of the blue bars in a formal manner. As the \ picture may be rotated about the origin, let us take \[Phi]1 = 0 degree.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"h", ",", "\[Phi]1", ",", "\[Phi]2", ",", "\[Phi]3"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]1", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction1", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]1", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]1", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction2", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]2", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]2", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"direction3", "=", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Phi]3", "]"}], ",", RowBox[{"Sin", "[", "\[Phi]3", "]"}]}], "}"}]}], ";"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"simplebluelength", "[", "h_", "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"bluelength", "[", "h", "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Im", "[", "h", "]"}], "==", "0"}], ",", RowBox[{"0", "<", "h", "<", "1"}], ",", RowBox[{ RowBox[{"Im", "[", "\[Phi]2", "]"}], "==", "0"}], ",", RowBox[{ RowBox[{"Im", "[", "\[Phi]3", "]"}], "==", "0"}]}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"slope", "[", "h_", "]"}], "=", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"simplebluelength", "[", "h", "]"}], ",", "h"}], "]"}], " ", "//", " ", "Simplify"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"slope", "[", "0", "]"}], "//", "Simplify"}]], "Input"], Cell["\<\ There is of course a geometrical explanation for the simplicity of this \ answer. In order to find this, compare with\ \>", "Text"], Cell[BoxData[ RowBox[{"direction1", ".", RowBox[{"(", RowBox[{"direction1", "+", "direction2", "+", "direction3"}], ")"}]}]], "Input"], Cell["\<\ Contemplate the question whether \[Phi]1 really plays a special role in the \ computations. Deduce the final answer by means of \ \>", "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"Solve", "::", "ifun"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"direction1", "+", "direction2", "+", "direction3"}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{"\[Phi]2", ",", "\[Phi]3"}], "}"}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "/.", RowBox[{"Rule", "->", "Equal"}]}]}], "Input"], Cell["Or graphically:", "Text", CellTags->"UCU311"], Cell[BoxData[{ RowBox[{ RowBox[{"p1", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{ RowBox[{"1", "+", RowBox[{"Cos", "[", "\[Phi]2", "]"}], "+", RowBox[{"Cos", "[", "\[Phi]3", "]"}]}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{"\[Phi]2", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\[Phi]3", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"ContourStyle", "\[Rule]", "Red"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{ RowBox[{"1", "+", RowBox[{"Cos", "[", "\[Phi]2", "]"}], "+", RowBox[{"Cos", "[", RowBox[{"\[Phi]2", "-", "\[Phi]3"}], "]"}]}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{"\[Phi]2", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\[Phi]3", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"ContourStyle", "\[Rule]", "Blue"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{ RowBox[{"1", "+", RowBox[{"Cos", "[", "\[Phi]3", "]"}], "+", RowBox[{"Cos", "[", RowBox[{"\[Phi]2", "-", "\[Phi]3"}], "]"}]}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{"\[Phi]2", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\[Phi]3", ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"ContourStyle", "\[Rule]", "Green"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"p1", ",", "p2", ",", "p3", ",", RowBox[{"Ticks", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Table", "[", RowBox[{ FractionBox[ RowBox[{"k", " ", "\[Pi]"}], "3"], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "6"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ FractionBox[ RowBox[{"k", " ", "\[Pi]"}], "3"], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "6"}], "}"}]}], "]"}]}], "}"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\[Phi]2", ",", "\[Phi]3"}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightbluecolor"}], ",", RowBox[{"ImageSize", "\[Rule]", "600"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{ 3.416656857064642*^9, 3.4168915723918867`*^9, {3.4168917118849897`*^9, 3.416891728362891*^9}}], Cell["\<\ For extra credit, discover and/or prove more facts, if you can.\ \>", "Exercise"], Cell["\<\ Along the way, you may have use for the following goniometric formula.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Cos", "[", "p", "]"}], "+", RowBox[{"Cos", "[", "q", "]"}]}], "==", RowBox[{"2", RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"p", "+", "q"}], ")"}], "/", "2"}], "]"}], RowBox[{"Cos", "[", RowBox[{ RowBox[{"(", RowBox[{"p", "-", "q"}], ")"}], "/", "2"}], "]"}]}]}], "//", "Simplify"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Galerkin's Method", "Subtitle"], Cell[TextData[{ "See Section 5.4 ", StyleBox["The Finite Element Method", FontSlant->"Italic"], "\nWe consider the Sturm-Liouville eigenvalue problem \n ", StyleBox["- ", "Matica"], StyleBox["c ", "Matica", FontSlant->"Italic"], StyleBox["[", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["] ", "Matica"], StyleBox["u", "Matica", FontSlant->"Italic"], StyleBox["'' [", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["] - ", "Matica"], StyleBox["c", "Matica", FontSlant->"Italic"], StyleBox["' [", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["] ", "Matica"], StyleBox["u", "Matica", FontSlant->"Italic"], StyleBox["' [", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["] + ", "Matica"], StyleBox["q ", "Matica", FontSlant->"Italic"], StyleBox["[x] ", "Matica"], StyleBox["u ", "Matica", FontSlant->"Italic"], StyleBox["[", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["] = \[Lambda] ", "Matica"], StyleBox["u ", "Matica", FontSlant->"Italic"], StyleBox["[", "Matica"], StyleBox["x", "Matica", FontSlant->"Italic"], StyleBox["]", "Matica"], " \nwith Dirichlet boundary conditions ", StyleBox["u ", "Matica", FontSlant->"Italic"], StyleBox["[0] = ", "Matica"], StyleBox["u ", "Matica", FontSlant->"Italic"], StyleBox["[1] = 0", "Matica"], ". Let us start with a case where we know all the answers. " }], "Text"], Cell[BoxData[{ RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"q", "[", "x_", "]"}], ":=", "0"}], ";"}]}], "Input"], Cell[TextData[{ "We will try to solve the eigenvalue problem by Galerkin's method, also \ known as the method of finite elements. Let us introduce a bump function: it \ is the continuous piecewice linear function ", StyleBox["x", FontSlant->"Italic"], " \[RightTeeArrow]1+", StyleBox["x", FontSlant->"Italic"], " on [ -1, 0 ] and ", StyleBox["x", FontSlant->"Italic"], " \[RightTeeArrow]1-", StyleBox["x", FontSlant->"Italic"], " on [ 0, 1 ]. " }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"bump", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"UnitStep", "[", RowBox[{"-", "x"}], "]"}], " ", RowBox[{"(", RowBox[{"1", "+", "x"}], ")"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "+", "x"}], "]"}]}], "+", RowBox[{ RowBox[{"UnitStep", "[", "x", "]"}], " ", RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "-", "x"}], "]"}]}]}]}], ";"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"bump", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.007`", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "Input"], Cell["\<\ We will use a finite-dimensional vector space of test functions, to wit, the \ linear span of a number of shifted and horizontally scaled bump (or piecewise \ linear) functions. We will look for weak solutions with respect to the test \ functions, and the solutions themselves will also belong to the space of test \ functions. In addition, the test functions satisfy Dirichlet boundary \ conditions. But note that our bump function does not possess a second \ derivative; therefore, the test functions have no second derivatives. \ Possessing a second derivative, however, is not needed for weak solutions. \ For this very reason, it will certainly not be a strong solution, that is, a \ classical solution of the differential equation.\ \>", "Text"], Cell[TextData[{ "We specify a mesh size by means of an integer ", StyleBox["n", "Matica", FontSlant->"Italic"], ". The rescaled bump functions that we use, will be supported on an interval \ of length ", Cell[BoxData[ FormBox[ FractionBox["1", "n"], TraditionalForm]]], " . More specifically, put ", StyleBox["\[Delta] = ", "Matica"], Cell[BoxData[ FormBox[ FractionBox["1", StyleBox[ RowBox[{"2", "n"}], "Matica"]], TraditionalForm]]], ". We seek a weak solution of the form \n\n ", Cell[BoxData[ RowBox[{ RowBox[{"u", "[", "x", "]"}], "=", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], RowBox[{ RowBox[{"2", "n"}], "-", "1"}]], RowBox[{ RowBox[{"a", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], " ", RowBox[{"bump", "[", RowBox[{ FractionBox["x", "\[Delta]"], "-", "i"}], "]"}]}]}]}]]], " , \n \nwith respect to test functions of the same form. Thus, let us \ put" }], "Text", CellChangeTimes->{{3.4168917591576443`*^9, 3.416891761500679*^9}, { 3.418096923951378*^9, 3.418096940932384*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"uFinite", "[", RowBox[{"x_", ",", "a_List"}], "]"}], ":=", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}]}], RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "+", "1"}], "]"}], ",", "dim"}], "]"}]], RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"uFinite", "[", "x_", "]"}], ":=", RowBox[{"uFinite", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";"}]}], "Input"], Cell[TextData[{ "Then the test functions will be the functions ", StyleBox["uFinite", "Matica"], " as the ", StyleBox["List", FontColor->RGBColor[0, 0, 1]], " ", StyleBox["a", "Matica"], " varies. The dimension ", StyleBox["dim", "Matica"], " of the space of test functions is thus ", StyleBox["2n - 1", "Matica"], ". For example, take" }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"n", "=", "3"}], ";"}], "\n", RowBox[{ RowBox[{"\[Delta]", "=", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "n"}], ")"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"dim", "=", RowBox[{ RowBox[{"2", "n"}], "-", "1"}]}], ";"}]}], "Input"], Cell[TextData[{ "The test functions will be linear combinations of the following ", StyleBox["2n - 1", "Matica"], " functions." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"a", "=", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "a"}], "]"}], ";", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"uFinite", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".007", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "->", "Automatic"}], ",", " ", RowBox[{"ImageSize", "->", "200"}]}], "]"}], "]"}], ";", RowBox[{"a", "=", RowBox[{"RotateRight", "[", "a", "]"}]}], ";"}], ",", RowBox[{"{", "dim", "}"}]}], "\[IndentingNewLine]", "]"}]}], "Input", CellChangeTimes->{{3.416891785331818*^9, 3.416891797961948*^9}}], Cell["\<\ It may also be instructive to plot derivatives of these functions.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"bumpprime", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"UnitStep", "[", RowBox[{"x", "+", "1"}], "]"}], " ", RowBox[{"UnitStep", "[", RowBox[{"-", "x"}], "]"}]}], "-", RowBox[{ RowBox[{"UnitStep", "[", "x", "]"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "-", "x"}], "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"uFiniteDerivative", "[", RowBox[{"x_", ",", "a_"}], "]"}], ":=", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}]}], RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "+", "1"}], "]"}], ",", "dim"}], "]"}]], RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"uFiniteDerivative", "[", "x_", "]"}], ":=", RowBox[{"uFiniteDerivative", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";"}]}], "Input"], Cell["Here they are.", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"a", "=", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "a"}], "]"}], ";", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"uFiniteDerivative", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".007", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}], ",", RowBox[{"ImageSize", "->", "200"}]}], "]"}], "]"}], ";", RowBox[{"a", "=", RowBox[{"RotateRight", "[", "a", "]"}]}], ";"}], ",", RowBox[{"{", "dim", "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4168920579878817`*^9, 3.416892065625489*^9}}], Cell[TextData[{ "The weak equation demands that the weak solution ", StyleBox["u", FontSlant->"Italic"], " satisfy the following identity, for all admissible ", StyleBox["v ", FontSlant->"Italic"], ":\n\n ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{ RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], " ", RowBox[{ RowBox[{"(", " ", RowBox[{ RowBox[{ RowBox[{"c", " ", "[", "x", "]"}], " ", RowBox[{ RowBox[{"u", "'"}], " ", "[", "x", "]"}], RowBox[{ RowBox[{"v", "'"}], " ", "[", "x", "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"q", " ", "[", "x", "]"}], "-", "\[Lambda]"}], ")"}], RowBox[{"u", " ", "[", "x", "]"}], " ", RowBox[{"v", " ", "[", "x", "]"}]}]}], ")"}], " ", RowBox[{"\[DifferentialD]", "x"}]}]}], "=", "0"}], "Matica"], TraditionalForm]]], ". \n \nAs a consequence, we need this integral for all test functions \ ", StyleBox["u", FontSlant->"Italic"], " and ", StyleBox["v", FontSlant->"Italic"], " . Therefore we now want to compute the integrals \n\n ", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{ RowBox[{"kmatrix", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"c", " ", "[", "x", "]"}], RowBox[{ RowBox[{"bump", "'"}], " ", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "i"}], "]"}], " ", RowBox[{ RowBox[{ RowBox[{"bump", "'"}], " ", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}], "/", RowBox[{"(", RowBox[{"\[Delta]", "^", "2"}], ")"}]}]}], " ", "+", " ", RowBox[{ RowBox[{"q", " ", "[", "x", "]"}], " ", RowBox[{"bump", " ", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "i"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}]}]}], ")"}], " ", RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], TraditionalForm]]], "\n \nand \n\n ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"fmatrix", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "i"}], "]"}], RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}], RowBox[{"\[DifferentialD]", "x"}]}]}]}], TraditionalForm]]], " . \n \nAll of this leads to the following code" }], "Text", CellChangeTimes->{{3.4168918515460167`*^9, 3.416891868031047*^9}, { 3.418096969497409*^9, 3.41809704727614*^9}}], Cell[TextData[{ "Here we define weakintegral by a general function. We can make the \ execution of this function faster by using ", StyleBox["NIntegrate", "Matica"], " instead of ", StyleBox["Integrate", "Matica"], " or by defining a special ", StyleBox["weakintegal", "Matica"], " function for the special function ", StyleBox["bump", "Matica"], "." }], "Comments", CellTags->"Comment"], Cell[BoxData[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], " ", RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{ RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}], "/", RowBox[{"\[Delta]", "^", "2"}]}]}], " ", "+", " ", RowBox[{ RowBox[{"q", "[", "x", "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", " ", "j"}], "]"}]}]}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"Integrate", "[", " ", RowBox[{ RowBox[{ RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"kmatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"fmatrix", "=", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";"}]}], "Input"], Cell[TextData[{ "The eigenvalue ", StyleBox["\[Lambda]", "Matica"], " should be such that there is a nontrivial ", StyleBox["u", "Matica"], " which is a weak solution. In terms of the corresponding ", StyleBox["List", FontColor->RGBColor[0, 0, 1]], " ", StyleBox["a", "Matica"], " this means one must have \n\n ", StyleBox["b . (kmatrix -\[Lambda] fmatrix) . a = 0", "Matica"], " \n \nfor all test ", StyleBox["List", FontColor->RGBColor[0, 0, 1]], "s ", StyleBox["b", "Matica"], ", where ", StyleBox["b", "Matica"], " corresponds to a test function ", StyleBox["v", "Matica"], ". In other words, \n\n ", StyleBox["(kmatrix -\[Lambda] fmatrix) . a = 0", "Matica"], " and ", StyleBox["\[Lambda]", "Matica"], " should be eigenvalue ofthe 2", StyleBox["n", FontSlant->"Italic"], "\[Dash]1 by 2", StyleBox["n", FontSlant->"Italic"], "\[Dash]1 matrix\n ", Cell[BoxData[ FormBox[ SuperscriptBox["fmatrix", RowBox[{ RowBox[{"-", "1"}], " "}]], TraditionalForm]]], "kmatrix\n with eigenvector ", StyleBox["a", "Matica"], " . \nWe compute" }], "Text", CellChangeTimes->{{3.416891886724205*^9, 3.4168918924806433`*^9}, { 3.418097073589651*^9, 3.4180971476777077`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"quotientmatrix", "=", RowBox[{ RowBox[{"Inverse", "[", "fmatrix", "]"}], ".", "kmatrix"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"eigenvalues", ",", "eigenvectors"}], "}"}], "=", RowBox[{"Eigensystem", "[", "quotientmatrix", "]"}]}], ";"}]}], "Input"], Cell[TextData[{ "The exact eigenvalues in the classical equation are of the form ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"m", " ", "\[Pi]"}], ")"}], "2"], TraditionalForm]]], " with ", StyleBox["m", "Matica"], " an integer, while the corresponding eigenfunctions are sine functions. Let \ us look what we have in the Galerkin approximation." }], "Text"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"eigenvalues", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}]}], "]"}]], "Input"], Cell["\<\ If we divide these approximate eigenvalues by the exact ones, the ratios are\ \>", "Text"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ FractionBox["eigenvalues", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"Reverse", "[", RowBox[{"Range", "[", "dim", "]"}], "]"}], " ", "\[Pi]"}], ")"}], "2"]], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}]}], "]"}]], "Input"], Cell[TextData[{ "So even for ", StyleBox["n", FontSlant->"Italic"], " as low as this, the approximate eigenvalues are not far from the exact \ ones. \nNext, let us compare the computed eigenfunctions with the exact ones. \ We plot the approximating eigenfunction (red), a multiple of its derivative \ (blue) and an exact solution to the classical equation (green), and we do \ this for the eigenvalues computed above. " }], "Text"], Cell[BoxData[ RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\<\[Lambda] = \>\"", ",", RowBox[{"eigenvalues", "[", RowBox[{"[", "i", "]"}], "]"}], ",", " ", "\"\<, exact value = \>\"", ",", RowBox[{ RowBox[{"number", "=", RowBox[{"(", RowBox[{ RowBox[{"Length", "[", "eigenvectors", "]"}], "-", "i", "+", "1"}], ")"}]}], ";", RowBox[{"N", "[", RowBox[{ RowBox[{"\[Pi]", "^", "2"}], RowBox[{ RowBox[{"(", "number", ")"}], "^", "2"}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"a", "=", RowBox[{"eigenvectors", "[", RowBox[{"[", "i", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"uFinite", "[", "x", "]"}], ",", RowBox[{ RowBox[{"uFiniteDerivative", "[", "x", "]"}], "/", RowBox[{"(", RowBox[{"number", " ", "\[Pi]"}], ")"}]}], ",", RowBox[{ RowBox[{ RowBox[{"uFiniteDerivative", "[", RowBox[{".9", " ", "\[Delta]"}], "]"}], "/", RowBox[{"(", RowBox[{"number", " ", "\[Pi]"}], ")"}]}], RowBox[{"Sin", "[", RowBox[{"number", " ", "\[Pi]", " ", "x"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotRange", "->", "All"}], ",", RowBox[{"PlotPoints", "->", RowBox[{"4", "n"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}]}], "}"}]}]}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "eigenvectors", "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.416892102008007*^9, 3.416892131939809*^9}}], Cell["\<\ The term uFiniteDerivative[0.9 \[Delta]] is just the value of \ uFiniteDerivative at x = 0. This guarantees that the exact eigenfunction and \ the approximation are scaled in the same way.\ \>", "Comments", CellTags->"Comment"], Cell[TextData[{ "We wish to repeat the experiment with various choices of ", StyleBox["n", FontSlant->"Italic"], ", ", StyleBox["c", FontSlant->"Italic"], ", ", StyleBox["q", FontSlant->"Italic"], ". Therefore we put the required code together in one function ", StyleBox["setup", "Matica"], " which assumes that ", StyleBox["n", FontSlant->"Italic"], ", ", StyleBox["c", FontSlant->"Italic"], ", ", StyleBox["q", FontSlant->"Italic"], " have been specified." }], "Text", CellChangeTimes->{{3.4180971725199947`*^9, 3.4180973017538357`*^9}}], Cell[BoxData[ RowBox[{"setup", ":=", RowBox[{"(", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "bump", ",", "bumpprime", ",", "uFinite", ",", "uFiniteDerivative", ",", "weakintegral0", ",", "weakintegral1"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"\[Delta]", "=", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "n"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{ RowBox[{"2", "n"}], "-", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"bump", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"UnitStep", "[", RowBox[{"-", "x"}], "]"}], RowBox[{"(", RowBox[{"1", "+", "x"}], ")"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "+", "x"}], "]"}]}], "+", RowBox[{ RowBox[{"UnitStep", "[", "x", "]"}], RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "-", "x"}], "]"}]}]}]}], ";", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"bumpprime", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"UnitStep", "[", RowBox[{"x", "+", "1"}], "]"}], " ", RowBox[{"UnitStep", "[", RowBox[{"-", "x"}], "]"}]}], "-", RowBox[{ RowBox[{"UnitStep", "[", "x", "]"}], " ", RowBox[{"UnitStep", "[", RowBox[{"1", "-", "x"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFinite", "[", RowBox[{"x_", ",", "a_"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "+", "1"}], "]"}], ",", "dim"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFinite", "[", "x_", "]"}], ":=", RowBox[{"uFinite", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFiniteDerivative", "[", RowBox[{"x_", ",", "a_"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{ RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], "/", "\[Delta]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "+", "1"}], "]"}], ",", "dim"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFiniteDerivative", "[", "x_", "]"}], ":=", RowBox[{"uFiniteDerivative", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "the", " ", "weak", " ", "integrals", " ", "are", " ", "zero", " ", "if", " ", "i", " ", "and", " ", "j", " ", "are", " ", "too", " ", "far", " ", "apart"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"0", "/;", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "j"}], "]"}], ">", "1"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"0", "/;", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "j"}], "]"}], ">", "1"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"the", " ", "original", " ", "general", " ", "code"}], ",", " ", RowBox[{"this", " ", "works", " ", "but", " ", "is", " ", "slow"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], " ", RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{ RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}], "/", RowBox[{"\[Delta]", "^", "2"}]}]}], " ", "+", " ", RowBox[{ RowBox[{"q", "[", "x", "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", " ", "j"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"NIntegrate", "[", " ", RowBox[{ RowBox[{ RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "j"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "a", " ", "fast", " ", "version", " ", "of", " ", "weakintegral"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "i_"}], "]"}], "=", RowBox[{ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", "i"}], ")"}], "^", "2"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i", "+", "1"}], ")"}], "^", "2"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], "=", "\[IndentingNewLine]", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"c", "[", "x", "]"}]}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{"(", RowBox[{"1", "+", RowBox[{"x", "/", "\[Delta]"}], " ", "-", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}], RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", RowBox[{"Min", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "i_"}], "]"}], "=", RowBox[{ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", "i"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i", "+", "1"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], "=", "\[IndentingNewLine]", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "+", RowBox[{"x", "/", "\[Delta]"}], " ", "-", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}], RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", RowBox[{"Min", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"kmatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fmatrix", "=", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"quotientmatrix", "=", RowBox[{ RowBox[{"Inverse", "[", "fmatrix", "]"}], ".", "kmatrix"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"eigenvalues", ",", "eigenvectors"}], "}"}], "=", RowBox[{"Eigensystem", "[", "quotientmatrix", "]"}]}], ";"}], "\[IndentingNewLine]", ")"}]}]], "Input"], Cell["The situation above corresponds to", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"n", "=", "3"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"c", "[", "x_", "]"}], ":=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"q", "[", "x_", "]"}], ":=", "0"}], ";"}], "\[IndentingNewLine]", "setup"}], "Input"], Cell["Here is an experiment", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"n", "=", "30"}], ";"}], "\[IndentingNewLine]", RowBox[{"setup", ";"}]}], "Input"], Cell[BoxData[{ RowBox[{"ListPlot", "[", RowBox[{"eigenvalues", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}]}], "]"}], "\n", RowBox[{"ListPlot", "[", RowBox[{ FractionBox["eigenvalues", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"Reverse", "[", RowBox[{"Range", "[", "dim", "]"}], "]"}], " ", "\[Pi]"}], ")"}], "2"]], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}]}], "]"}], "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\<\[Lambda] = \>\"", ",", RowBox[{ "eigenvalues", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", "\"\<, exact value = \>\"", ",", RowBox[{ RowBox[{"number", "=", RowBox[{ RowBox[{"Length", "[", "eigenvectors", "]"}], "-", "i", "+", "1"}]}], ";", RowBox[{"N", "[", RowBox[{ SuperscriptBox["\[Pi]", "2"], " ", SuperscriptBox["number", "2"]}], "]"}]}], ",", "\"\<, number = \>\"", ",", "number"}], "]"}], ";", RowBox[{"a", "=", RowBox[{ "eigenvectors", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ";", RowBox[{"Print", "[", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"uFinite", "[", "x", "]"}], ",", FractionBox[ RowBox[{"uFiniteDerivative", "[", "x", "]"}], RowBox[{"number", " ", "\[Pi]"}]], ",", FractionBox[ RowBox[{ RowBox[{"uFiniteDerivative", "[", RowBox[{"0.9`", " ", "\[Delta]"}], "]"}], " ", RowBox[{"Sin", "[", RowBox[{"number", " ", "\[Pi]", " ", "x"}], "]"}]}], RowBox[{"number", " ", "\[Pi]"}]]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotPoints", "->", RowBox[{"4", "n"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}]}], "}"}]}]}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "eigenvectors", "]"}]}], "}"}]}], "]"}]}], "Input",\ CellChangeTimes->{{3.416892257297831*^9, 3.416892281013618*^9}}], Cell["\<\ Note the funny inversion that takes place: the eigenfunction of lowest \ eigenvalue looks like the hull of the eigenfunction of highest eigenvalue, \ the second lowest eigenvalue like the hull of the eigenfunction of second \ highest eigenvalue, etc. Can you explain this? Is it a general feature of \ our methods?\ \>", "Comments", CellTags->"Comment"], Cell["\<\ Which eigenfunctions and eigenvalues as computed by the Galerkin method are \ close to the truth? How do you see that, and what could be the reason? \ \>", "Exercise"], Cell[BoxData[{"kmatrix", "\[IndentingNewLine]", "fmatrix"}], "Input"], Cell[TextData[{ "The matrices ", StyleBox["kmatrix", "Matica"], " and ", StyleBox["fmatrix", "Matica"], " are sparse. Why? " }], "Exercise"], Cell[BoxData[ RowBox[{"Chop", "[", "quotientmatrix", "]"}]], "Input"], Cell[TextData[{ "But ", StyleBox["quotientmatrix", "Matica"], " is not sparse. So we are rather brute when computing the eigenvalues in \ the manner above. There ought to be alternative ways that keep things sparse. \ " }], "Text"], Cell[TextData[{ "Now return to the model problem treated earlier: ", StyleBox["c[ x_ ]:=1+Exp[x]", "Matica"], " and ", StyleBox["q[ x_ ]=1", "Matica"], " . Study the performance of the Galerkin method. Compare with the shooting \ method. By which method do you get a better estimate of the first eigenvalue \ ?" }], "Exercise"], Cell[TextData[{ "It is not difficult to change a Dirichlet boundary condition into a Neumann \ one. Say we want to have a Dirichlet condition at ", StyleBox["x=0", "Matica"], " and a Neumann condition at ", StyleBox["x=1", "Matica"], " . One replaces in the last element ", StyleBox["bump[x/\[Delta] -dim]", "Matica"], " the downward slope by a horizontal line. Then one must recompute the \ integrals. In terms of code, we replace ", StyleBox["setup", "Matica"], " by ", StyleBox["setupDN", "Matica"], " , where" }], "Text"], Cell[BoxData[ RowBox[{"setupDN", ":=", RowBox[{"(", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "bump", ",", "bumpprime", ",", "uFinite", ",", "uFiniteDerivative", ",", "weakintegral0", ",", "weakintegral1"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"\[Delta]", "=", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "n"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{ RowBox[{"2", "n"}], "-", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"bump", "[", "x_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", "x", "]"}], "<", "1"}], ",", RowBox[{"1", "-", RowBox[{"Abs", "[", "x", "]"}]}], ",", "0"}], "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"bumpprime", "[", "x_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", "x", "]"}], "<", "1"}], ",", RowBox[{"-", RowBox[{"Sign", "[", "x", "]"}]}], ",", "0"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFinite", "[", RowBox[{"x_", ",", "a_"}], "]"}], ":=", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{"bump", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "+", "1"}], "]"}], ",", "dim"}], "]"}]}], "}"}]}], "]"}], "+", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Floor", "[", RowBox[{"x", "/", "\[Delta]"}], "]"}], "==", "dim"}], ",", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "dim", "]"}], "]"}], RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], "-", "dim"}], ")"}]}], ",", "0"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFinite", "[", "x_", "]"}], ":=", RowBox[{"uFinite", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFiniteDerivative", "[", RowBox[{"x_", ",", "a_"}], "]"}], ":=", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], " ", RowBox[{ RowBox[{"bumpprime", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i"}], "]"}], "/", "\[Delta]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "1"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"Min", "[", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "+", "1"}], "]"}], ",", "dim"}], "]"}]}], "}"}]}], "]"}], "+", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Floor", "[", RowBox[{"x", "/", "\[Delta]"}], "]"}], "==", "dim"}], ",", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "dim", "]"}], "]"}], "/", "\[Delta]"}], ",", "0"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"uFiniteDerivative", "[", "x_", "]"}], ":=", RowBox[{"uFiniteDerivative", "[", RowBox[{"x", ",", "a"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"0", "/;", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "j"}], "]"}], ">", "1"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], ":=", RowBox[{"0", "/;", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "j"}], "]"}], ">", "1"}]}]}], ";", RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "i_"}], "]"}], "=", RowBox[{ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", "i"}], ")"}], "^", "2"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i", "+", "1"}], ")"}], "^", "2"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i_", ",", "j_"}], "]"}], "=", "\[IndentingNewLine]", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"c", "[", "x", "]"}]}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{"(", RowBox[{"1", "+", RowBox[{"x", "/", "\[Delta]"}], " ", "-", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}], RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", RowBox[{"Min", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "i_"}], "]"}], "=", RowBox[{ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", "i"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"r", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "i", "+", "1"}], ")"}], "^", "2"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "i", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i_", ",", "j_"}], "]"}], "=", "\[IndentingNewLine]", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "+", RowBox[{"x", "/", "\[Delta]"}], " ", "-", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}], RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "/", "\[Delta]"}], " ", "+", RowBox[{"Min", "[", RowBox[{"i", ",", "j"}], "]"}]}], ")"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"Max", "[", RowBox[{"i", ",", "j"}], "]"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"kmatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"weakintegral0", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"kmatrix", "[", RowBox[{"[", RowBox[{"dim", ",", "dim"}], "]"}], "]"}], "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"q", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "dim", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"dim", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"c", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "/", "\[Delta]"}], " ", ")"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"q", "[", "x", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "dim", "+", "1"}], ")"}], "^", "2"}]}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"dim", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "dim", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fmatrix", "=", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"weakintegral1", "[", RowBox[{"i", ",", "j"}], "]"}], "//", "N"}], ",", RowBox[{"{", RowBox[{"i", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"fmatrix", "[", RowBox[{"[", RowBox[{"dim", ",", "dim"}], "]"}], "]"}], "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Integrate", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", "dim", ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"dim", "+", "1"}], ")"}], "\[Delta]"}]}], "}"}]}], "]"}], "+", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "/", "\[Delta]"}], " ", "-", "dim", "+", "1"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"(", RowBox[{"dim", "-", "1"}], ")"}], "\[Delta]"}], ",", RowBox[{ RowBox[{"(", "dim", ")"}], "\[Delta]"}]}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"quotientmatrix", "=", RowBox[{ RowBox[{"Inverse", "[", "fmatrix", "]"}], ".", "kmatrix"}]}], ";", RowBox[{ RowBox[{"{", RowBox[{"eigenvalues", ",", "eigenvectors"}], "}"}], "=", RowBox[{"Eigensystem", "[", "quotientmatrix", "]"}]}], ";"}], "\[IndentingNewLine]", ")"}]}]], "Input"], Cell[TextData[{ "This code contains an auxiliary function ", StyleBox["r[x]", "Matica"], " which we take equal to ", StyleBox["1", "Matica"], " for now." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"r", "[", "x_", "]"}], "=", "1"}], ";"}]], "Input"], Cell[TextData[{ "Plot the new test functions for ", StyleBox["n=3", "Matica"], " and pay attention to the Neumann condition." }], "Exercise", CellChangeTimes->{{3.4168930507602243`*^9, 3.416893067246616*^9}}], Cell[TextData[{ "What functions should you get with ", StyleBox["c[ x_ ]:=1", "Matica"], " and ", StyleBox["q[ x_ ]:=0", "Matica"], " ? Try it." }], "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Interpolation: Displacements and Slopes and Cubic Splines", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSize->16] }], "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell["\<\ We consider the part of Section 3.2 Differential Equations of Equilibrium \ that is concerned with interpolation.\ \>", "Text"], Cell[TextData[{ StyleBox["Page 176: Interpolation by polynomials ", "Subsection", FontFamily->"Arial"], StyleBox["of sufficiently high degree", FontFamily->"Arial", FontSize->14, FontWeight->"Bold"], StyleBox["\nThe algorithms for this venerable problem, which go back to \ Newton, are quite unstable from the numerical point of view. \nWe perform \ some experiments with approximation by means of polynomials of sufficiently \ high degree. The first example seems to work well.", FontFamily->"Arial"] }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ FractionBox["220", "256"], ",", FractionBox["248", "256"], ",", FractionBox["248", "256"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", RowBox[{"x", "+", RowBox[{ FractionBox["1", "10"], " ", RowBox[{"Sin", "[", RowBox[{ RowBox[{"2", " ", "x"}], "-", "1"}], "]"}]}], "+", RowBox[{"Sin", "[", RowBox[{ RowBox[{"25", " ", "x"}], "+", SuperscriptBox["x", "2"]}], "]"}]}]}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "10.`"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}], "\n", RowBox[{ RowBox[{"data1", ":=", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"{", RowBox[{ RowBox[{"f", "[", "i", "]"}], ",", RowBox[{ SuperscriptBox["f", "\[Prime]", MultilineFunction->None], "[", "i", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "1", ",", "0.1`"}], "}"}]}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"p", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"data1", ",", "x"}], "]"}]}], ";"}], "\n", RowBox[{"Expand", "[", RowBox[{"p", "[", "x", "]"}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"f", "[", "x", "]"}], "-", RowBox[{"p", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "10.`"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}], "\n", RowBox[{ RowBox[{"interpoldata1", "=", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", "i", "]"}], ",", RowBox[{ SuperscriptBox["p", "\[Prime]", MultilineFunction->None], "[", "i", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "1", ",", "0.1`"}], "}"}]}], "]"}], "]"}]}], ";"}], "\n", RowBox[{"Chop", "[", RowBox[{"data1", "-", "interpoldata1"}], "]"}], "\n", RowBox[{"Clear", "[", "p", "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[StyleBox["The second example seems to be less successful.", FontFamily->"Arial"]], "Text"], Cell[BoxData[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "3"}], "}"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "10.`"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotPoints", "\[Rule]", "1000"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}], "\n", RowBox[{ RowBox[{"data2", ":=", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"{", RowBox[{ RowBox[{"f", "[", "i", "]"}], ",", RowBox[{ SuperscriptBox["f", "\[Prime]", MultilineFunction->None], "[", "i", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "3", ",", "0.1`"}], "}"}]}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"p", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"data2", ",", "x"}], "]"}]}], ";"}], "\n", RowBox[{"Expand", "[", RowBox[{"p", "[", "x", "]"}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"p", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "3"}], "}"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "10.`"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}], "\n", RowBox[{ RowBox[{"interpoldata2", "=", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", "i", "]"}], ",", RowBox[{ SuperscriptBox["p", "\[Prime]", MultilineFunction->None], "[", "i", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "3", ",", "0.1`"}], "}"}]}], "]"}], "]"}]}], ";"}], "\n", RowBox[{"Chop", "[", RowBox[{"data2", "-", "interpoldata2"}], "]"}], "\n", RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[StyleBox["Page 175: Hermite cubic", FontSize->14, FontWeight->"Bold"]], "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"her", "[", RowBox[{"a_", ",", "b_", ",", "c_", ",", "d_", ",", "x_"}], "]"}], ":=", RowBox[{ RowBox[{"a", SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "2"], RowBox[{"(", RowBox[{ RowBox[{"2", "x"}], "+", "1"}], ")"}]}], "+", RowBox[{"b", " ", "x", SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "2"]}], "+", RowBox[{"c", " ", SuperscriptBox["x", "2"], RowBox[{"(", RowBox[{"3", "-", RowBox[{"2", "x"}]}], ")"}]}], "+", RowBox[{"d", " ", SuperscriptBox["x", "2"], RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "[", "x_", "]"}], ":=", RowBox[{"her", "[", RowBox[{"a", ",", "b", ",", "c", ",", "d", ",", "x"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "[", "0", "]"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "'"}], "[", "0", "]"}], "\[IndentingNewLine]", RowBox[{"hermite", "[", "1", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "'"}], "[", "1", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "''"}], "[", "0", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"hermite", "''"}], "[", "1", "]"}]}], "Input"], Cell[TextData[StyleBox["Example of application of Hermite cubic", FontSize->14, FontWeight->"Bold"]], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ FractionBox["220", "256"], ",", FractionBox["248", "256"], ",", FractionBox["248", "256"]}], "]"}]}], ";"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"her", "[", RowBox[{"0.5`", ",", "5", ",", RowBox[{"-", "0.5`"}], ",", "1", ",", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " achieves the same result with the function Interpolation, in which the \ default setting yields cubic curves." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Interpolation", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{"0.5`", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.5`"}], ",", "1"}], "}"}]}], "}"}]}], "}"}], "]"}], ";"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"%", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " contains also a higher-dimensional variant, which performs pretty well \ under regularly varying condtions." }], "Text"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"InterpolatingFunction", "::", "\"\\""}], "]"}], "\n", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"Sin", "[", RowBox[{ FractionBox["1", "20"], " ", RowBox[{"(", RowBox[{"n", "+", "m"}], ")"}], " ", "\[Pi]"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"{", RowBox[{"m", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}]}], "]"}], "\n", RowBox[{ RowBox[{"tab", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sin", "[", RowBox[{ FractionBox["1", "20"], " ", RowBox[{"(", RowBox[{"n", "+", "m"}], ")"}], " ", "\[Pi]"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"{", RowBox[{"m", ",", "0", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListInterpolation", "[", "tab", "]"}], ";"}], "\n", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{ RowBox[{"ListInterpolation", "[", "tab", "]"}], "[", RowBox[{"x1", ",", "x2"}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}]}], "]"}]}], "Input"], Cell[TextData[StyleBox["Properties of the Hermite cubic", FontSize->14, FontWeight->"Bold"]], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Collect", "[", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"hermite", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "k"}], "}"}]}], "]"}], ",", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "4"}], "}"}]}], "]"}], "//", "MatrixForm"}]], "Input"], Cell[TextData[{ "The Hermite cubic is a linear combination of four special cubics ", Cell[BoxData[ FormBox[ SubscriptBox["h", "0"], TraditionalForm]]], ", ... ", Cell[BoxData[ FormBox[ SubscriptBox["h", "3"], TraditionalForm]]], "." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", "x_", "]"}], ":=", RowBox[{"her", "[", RowBox[{"1", ",", "0", ",", "0", ",", "0", ",", "x"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", "x_", "]"}], ":=", RowBox[{"her", "[", RowBox[{"0", ",", "1", ",", "0", ",", "0", ",", "x"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", "2", "]"}], "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", "3", "]"}], "[", "x_", "]"}], ":=", RowBox[{"-", RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"h", "[", "i", "]"}], "[", "x", "]"}], "//", "Simplify"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "3"}], "}"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"], \"i\"]\) and their derivatives at the endpoints\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"h", "[", "i", "]"}], "[", "0", "]"}], ",", RowBox[{ RowBox[{ RowBox[{"h", "[", "i", "]"}], "'"}], "[", "0", "]"}], ",", RowBox[{ RowBox[{"h", "[", "i", "]"}], "[", "1", "]"}], ",", RowBox[{ RowBox[{ RowBox[{"h", "[", "i", "]"}], "'"}], "[", "1", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "3"}], "}"}]}], "]"}]}], "Input"], Cell[TextData[StyleBox["Page 177: Piecewise cubic with matching heights and \ slopes at the interpolation points", FontSize->14, FontWeight->"Bold"]], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"c1", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", "x", "]"}], "+", RowBox[{ RowBox[{"h", "[", "2", "]"}], "[", "x", "]"}]}], "//", "Simplify"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c2", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", RowBox[{"x", "-", "1"}], "]"}], "//", "Simplify"}]}], "\[IndentingNewLine]", RowBox[{"c1", "[", "x", "]"}], "\[IndentingNewLine]", RowBox[{"c2", "[", "x", "]"}], "\[IndentingNewLine]", RowBox[{"Expand", "[", "%", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"c1", "[", "1", "]"}], "\[Equal]", RowBox[{"c2", "[", "1", "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"c1", "'"}], "[", "1", "]"}], "\[Equal]", RowBox[{ RowBox[{"c2", "'"}], "[", "1", "]"}]}]}], "Input"], Cell[TextData[{ "Corresponding plots of this piecewise cubic and its ", StyleBox["i\[Dash]", FontSlant->"Italic"], "th", StyleBox[" ", FontSlant->"Italic"], StyleBox["derivatives, for", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontSlant->"Italic"], StyleBox["1 \[NotLessEqual]", FontVariations->{"CompatibilityType"->0}], StyleBox[" i \[NotLessEqual] ", FontSlant->"Italic"], StyleBox["3", FontVariations->{"CompatibilityType"->0}], ". Note the discontinuity of the second and third derivatives." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"pc", "[", "x_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"x", "<", "1"}], ",", RowBox[{"c1", "[", "x", "]"}], ",", RowBox[{"c2", "[", "x", "]"}]}], "]"}]}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"pc", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["pc", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["pc", "\[Prime]\[Prime]", MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["pc", TagBox[ RowBox[{"(", "3", ")"}], Derivative], MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}]}], "Input"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Page 178: Interpolating spline", "Subsection", FontFamily->"Arial"]], "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell["Derivation of equations (27) and (29).", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"a1", "=", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], " ", RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"x", ",", "x"}]], RowBox[{"her", "[", RowBox[{ SubscriptBox["u", "0"], ",", SubscriptBox["s", "0"], ",", SubscriptBox["u", "1"], ",", SubscriptBox["s", "1"], ",", "x"}], "]"}]}]}], "/.", RowBox[{"x", "\[Rule]", "0"}]}], "//", "Simplify"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"a1", "\[Equal]", "0"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a2", "=", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], " ", RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"x", ",", "x"}]], RowBox[{"her", "[", RowBox[{ SubscriptBox["u", "0"], ",", SubscriptBox["s", "0"], ",", SubscriptBox["u", "1"], ",", SubscriptBox["s", "1"], ",", "x"}], "]"}]}]}], "/.", RowBox[{"x", "\[Rule]", "1"}]}], "//", "Simplify"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a3", "=", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"x", ",", "x"}]], RowBox[{"her", "[", RowBox[{ SubscriptBox["u", "1"], ",", SubscriptBox["s", "1"], ",", SubscriptBox["u", "2"], ",", SubscriptBox["s", "2"], ",", RowBox[{"x", "-", "1"}]}], "]"}]}]}], "/.", RowBox[{"x", "\[Rule]", "1"}]}], "//", "Simplify"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"a2", "\[Equal]", "a3"}], "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{"2", SubscriptBox["s", "1"]}], "+", SubscriptBox["s", "2"], "+", RowBox[{"2", SubscriptBox["s", "1"]}], "+", SubscriptBox["s", "0"]}], "==", RowBox[{ RowBox[{"3", SubscriptBox["u", "2"]}], "-", RowBox[{"3", SubscriptBox["u", "1"]}], "+", RowBox[{"3", SubscriptBox["u", "1"]}], "-", RowBox[{"3", SubscriptBox["u", "0"]}]}]}], "]"}]}], "Input"], Cell["Solution of equation (30).", "Text"], Cell[BoxData[{ RowBox[{"matrix", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4", ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "4", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", "4", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "1", ",", "2"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"vector", "=", RowBox[{"{", RowBox[{"1", ",", "4", ",", "0", ",", RowBox[{"-", "4"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"LinearSolve", "[", RowBox[{"matrix", ",", RowBox[{"3", "vector"}]}], "]"}]}], "Input"], Cell["\<\ Basic spline. Note the continuity of the second drivative and the \ discontinuity of the third.\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"spline", "[", "x_", "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"0", "\[LessEqual]", "x", "<", "1"}], ",", RowBox[{"her", "[", RowBox[{"0", ",", "0", ",", "1", ",", "3", ",", "x"}], "]"}], ",", RowBox[{"1", "\[LessEqual]", "x", "<", "2"}], ",", RowBox[{"her", "[", RowBox[{"1", ",", "3", ",", "4", ",", "0", ",", RowBox[{"x", "-", "1"}]}], "]"}], ",", RowBox[{"2", "\[LessEqual]", "x", "<", "3"}], ",", RowBox[{"her", "[", RowBox[{"4", ",", "0", ",", "1", ",", RowBox[{"-", "3"}], ",", RowBox[{"x", "-", "2"}]}], "]"}], ",", RowBox[{"3", "\[LessEqual]", "x", "<", "4"}], ",", RowBox[{"her", "[", RowBox[{"1", ",", RowBox[{"-", "3"}], ",", "0", ",", "0", ",", RowBox[{"x", "-", "3"}]}], "]"}]}], "]"}]}], "\n", RowBox[{"Simplify", "[", RowBox[{"her", "[", RowBox[{"0", ",", "0", ",", "1", ",", "3", ",", "x"}], "]"}], "]"}], "\n", RowBox[{"Simplify", "[", RowBox[{"her", "[", RowBox[{"1", ",", "3", ",", "4", ",", "0", ",", RowBox[{"x", "-", "1"}]}], "]"}], "]"}], "\n", RowBox[{"Simplify", "[", RowBox[{"%", "\[Equal]", RowBox[{"4", "-", RowBox[{"6", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"2", "-", "x"}], ")"}], "2"]}], "+", RowBox[{"3", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"2", "-", "x"}], ")"}], "3"]}]}]}], "]"}], "\n", RowBox[{"Simplify", "[", RowBox[{"her", "[", RowBox[{"4", ",", "0", ",", "1", ",", RowBox[{"-", "3"}], ",", RowBox[{"x", "-", "2"}]}], "]"}], "]"}], "\n", RowBox[{"Simplify", "[", RowBox[{"%", "\[Equal]", RowBox[{"4", "-", RowBox[{"6", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"2", "-", "x"}], ")"}], "2"]}], "-", RowBox[{"3", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"2", "-", "x"}], ")"}], "3"]}]}]}], "]"}], "\n", RowBox[{"Simplify", "[", RowBox[{"her", "[", RowBox[{"1", ",", RowBox[{"-", "3"}], ",", "0", ",", "0", ",", RowBox[{"x", "-", "3"}]}], "]"}], "]"}], "\n", RowBox[{ SuperscriptBox["spline", "\[Prime]", MultilineFunction->None], "[", "1", "]"}], "\n", RowBox[{ SuperscriptBox["spline", "\[Prime]", MultilineFunction->None], "[", "3", "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spline", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["spline", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], "\n", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["spline", "\[Prime]\[Prime]", MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], ";", RowBox[{"Plot", "[", RowBox[{ RowBox[{ SuperscriptBox["spline", TagBox[ RowBox[{"(", "3", ")"}], Derivative], MultilineFunction->None], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"600", ",", "600"}], "}"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.416908634884843*^9, 3.4169086444957733`*^9}, { 3.41690873993827*^9, 3.416908743479368*^9}}], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " has built-in programmes for computing cubic splines (in red below) but \ only with continuity of the first derivative, Bezier curves (in green) and \ composite Bezier curves (in darkblue) ." }], "Text"], Cell[BoxData[{ RowBox[{"Needs", "[", "\"\\"", "]"}], "\n", RowBox[{ RowBox[{"data", "=", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"Sin", "[", "x", "]"}], "+", RowBox[{ FractionBox["1", "4"], " ", RowBox[{"Sin", "[", RowBox[{"8", " ", "x"}], "]"}]}], "-", RowBox[{ FractionBox["1", "15"], " ", RowBox[{"Sin", "[", RowBox[{"20", " ", "x"}], "]"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0.`", ",", "1.`", ",", "0.1`"}], "}"}]}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"cubSpline", "=", RowBox[{"SplineFit", "[", RowBox[{"data", ",", "Cubic"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"bezSpline", "=", RowBox[{"SplineFit", "[", RowBox[{"data", ",", "Bezier"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"combezSpline", "=", RowBox[{"SplineFit", "[", RowBox[{"data", ",", "CompositeBezier"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.015`", "]"}], ",", RowBox[{"Point", "/@", "data"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", "0.`", "]"}], ",", RowBox[{"Line", "[", RowBox[{"cubSpline", "/@", RowBox[{"Range", "[", RowBox[{"0", ",", "10", ",", FractionBox["1", "10"]}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", "0.3`", "]"}], ",", RowBox[{"Line", "[", RowBox[{"bezSpline", "/@", RowBox[{"Range", "[", RowBox[{"0", ",", "10", ",", FractionBox["1", "10"]}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", "0.6`", "]"}], ",", RowBox[{"Line", "[", RowBox[{"combezSpline", "/@", RowBox[{"Range", "[", RowBox[{"0", ",", "10", ",", FractionBox["1", "10"]}], "]"}]}], "]"}]}], "}"}]}], "}"}], "]"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"AxesStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}]}], "]"}], "\n", RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}]}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Bezier Curves", "Subsection", FontFamily->"Arial", FontSize->24, FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontFamily->"Arial"] }], "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell[TextData[StyleBox["We consider the Bezier curves as defined in the \ Bezier Curve Demo. Plot the four constituents of the Hermite cubic as well as \ the Bernstein cubics separately and describe the similarities as well as the \ differences. Explain why the position of all the control points contribute to \ every point on the Bezier curve (except at the end points). In particular, \ the shape of the curve is changed most in the region near to the control \ point being moved, all of he curve is affected to some extent. This \ 'non-locality' of control is a disadvantage and it is one of the motivations \ for using splines. ", FontFamily->"Arial"]], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], ";"}], "\n", RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ FractionBox["220", "256"], ",", FractionBox["248", "256"], ",", FractionBox["248", "256"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", "x_", "]"}], ":=", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"2", " ", "x"}], "+", "1"}], ")"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", "x_", "]"}], ":=", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "2"], " ", "x"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "2", "]"}], "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}], ";", RowBox[{"Expand", "[", RowBox[{ RowBox[{"h", "[", "2", "]"}], "[", "x", "]"}], "]"}]}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"h", "[", "3", "]"}], "[", "x_", "]"}], ":=", RowBox[{"-", RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}]}], ";", RowBox[{"Expand", "[", RowBox[{ RowBox[{"h", "[", "3", "]"}], "[", "x", "]"}], "]"}]}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", "0", "]"}], "[", "x_", "]"}], ":=", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "3"]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", "1", "]"}], "[", "x_", "]"}], ":=", RowBox[{"3", " ", "x", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "2"]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", "2", "]"}], "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"b", "[", "1", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", "3", "]"}], "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"b", "[", "0", "]"}], "[", RowBox[{"1", "-", "x"}], "]"}]}], ";"}], "\n", RowBox[{"<<", "\"\\""}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"h", "[", "0", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"h", "[", "1", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"h", "[", "2", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"h", "[", "3", "]"}], "[", "x", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "1"}], "]"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ TagBox[ FormBox["\"\\"", TraditionalForm], TraditionalForm, Editable->True], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ",", RowBox[{"PlotLegend", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"h", " "}], RowBox[{" ", "0", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"h", " "}], RowBox[{" ", "1", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"h", " "}], RowBox[{" ", "2", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"h", " "}], RowBox[{" ", "3", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}]}], "}"}]}], ",", RowBox[{"LegendPosition", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "0.4`"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"b", "[", "0", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"b", "[", "1", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"b", "[", "2", "]"}], "[", "x", "]"}], ",", RowBox[{ RowBox[{"b", "[", "3", "]"}], "[", "x", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "1"}], "]"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ TagBox[ FormBox["\"\\"", TraditionalForm], TraditionalForm, Editable->True], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ",", RowBox[{"PlotLegend", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"b", " "}], RowBox[{" ", "0", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"b", " "}], RowBox[{" ", "1", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"b", " "}], RowBox[{" ", "2", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Text", "[", " ", RowBox[{ SubscriptBox[ RowBox[{"b", " "}], RowBox[{" ", "3", " "}]], " ", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}]}], "}"}]}], ",", RowBox[{"LegendPosition", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "0.4`"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416899886782703*^9, 3.416899916632299*^9}, { 3.416902543068928*^9, 3.416902557567074*^9}, {3.416902592235713*^9, 3.416902630362625*^9}, 3.4169026767409763`*^9, {3.416902707064815*^9, 3.416902709231872*^9}, {3.416902755852512*^9, 3.4169027867075367`*^9}, { 3.416902820132428*^9, 3.416902864459318*^9}, {3.416902908824849*^9, 3.4169029559819517`*^9}, {3.416908855084228*^9, 3.4169089466790533`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell["\<\ According to the Bezier Curve Demo the Bezier curve is defined by the \ following.\ \>", "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"pp", "=", RowBox[{"{", RowBox[{ SubscriptBox["p", "0"], ",", SubscriptBox["p", "1"], ",", SubscriptBox["p", "2"], ",", SubscriptBox["p", "3"]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bez", "[", "x_", "]"}], ":=", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "0"}], "3"], RowBox[{ RowBox[{"pp", "\[LeftDoubleBracket]", RowBox[{"j", "+", "1"}], "\[RightDoubleBracket]"}], RowBox[{ RowBox[{"b", "[", "j", "]"}], "[", "x", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"bez", "[", "x", "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell["\<\ Show that the Bezier curve also can be given by the following.\ \>", "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"m3", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "3", ",", RowBox[{"-", "3"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"-", "6"}], ",", "3", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "m3", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bezz", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"Table", "[", RowBox[{ SuperscriptBox["x", RowBox[{"3", "-", "j"}]], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], ".", "m3", ".", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"Table", "[", RowBox[{ RowBox[{"pp", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "4"}], "}"}]}], "]"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"bezz", "[", "x", "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"bez", "[", "x", "]"}], "-", RowBox[{"bezz", "[", "x", "]"}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[StyleBox["Compute the sum of the Bernstein functions.", FontFamily->"Arial"]], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Expand", "[", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "0"}], "3"], RowBox[{ RowBox[{"b", "[", "j", "]"}], "[", "x", "]"}]}], "]"}]], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "This result is obvious once we realize that for every natural number ", StyleBox["n", FontSlant->"Italic"], " we have on the basis of the Binomial Theorem\n\t1=", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "+", "x"}], ")"}], "n"], TraditionalForm]]], "=", Cell[BoxData[ FormBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "0"}], "n"], RowBox[{ FormBox[ FormBox[ RowBox[{"(", GridBox[{ {"n"}, {"j"} }], ")"}], TraditionalForm], TraditionalForm], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], RowBox[{"n", "-", "j"}]], SuperscriptBox["x", "j"]}]}], TraditionalForm]]], "\t with ", Cell[BoxData[ FormBox[ RowBox[{"(", GridBox[{ {"n"}, {"j"} }], ")"}], TraditionalForm]]], " a binomial coefficient.\nVerify that the Bernstein polynomials arise as \ the summands in the sum above in the case of ", StyleBox["n ", FontSlant->"Italic"], "= 3, and write down the list of all the Bernstein polynomials different \ from ", Cell[BoxData[ FormBox[ SuperscriptBox["x", "4"], TraditionalForm]]], " in the case of ", StyleBox["n ", FontSlant->"Italic"], "= 4.\t" }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"n_", ",", "j_"}], "]"}], "[", "x_", "]"}], ":=", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], RowBox[{"n", "-", "j"}]], RowBox[{"Coefficient", "[", RowBox[{ RowBox[{"Expand", "[", RowBox[{ RowBox[{"(", RowBox[{"y", "+", "x"}], ")"}], "^", "n"}], "]"}], ",", RowBox[{"y", "^", RowBox[{"(", RowBox[{"n", "-", "j"}], ")"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"3", ",", "j"}], "]"}], "[", "x", "]"}], "-", RowBox[{ RowBox[{"b", "[", "j", "]"}], "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "2"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"4", ",", "j"}], "]"}], "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], "//", "MatrixForm"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Expand", "[", "%", "]"}], "//", "MatrixForm"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "Of course, the result for arbitrary ", StyleBox["n", FontSlant->"Italic"], " can also be obtained using a matrix, which is related to Pascal's triangle \ upside down. Demonstrate this in the case of ", StyleBox["n ", FontSlant->"Italic"], "= 4." }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"m4", ":=", RowBox[{"{", " ", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "4"}], ",", "6", ",", RowBox[{"-", "4"}], ",", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", "12", ",", RowBox[{"-", "12"}], ",", "4", ",", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"6", ",", RowBox[{"-", "12"}], ",", "6", ",", "0", ",", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", "4", ",", "0", ",", "0", ",", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "m4", "]"}], "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"-", "1"}], ")"}], RowBox[{"i", "-", "j"}]], RowBox[{"Binomial", "[", RowBox[{"4", ",", "i"}], "]"}], RowBox[{"Binomial", "[", RowBox[{"i", ",", "j"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "i"}], "}"}]}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ SuperscriptBox["x", "j"], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "4"}], "}"}]}], "]"}], ".", "m4"}], "//", "TableForm"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "Show that the Bezier curve ", StyleBox["is contained within the convex hull of the four control points. \ Here", FontVariations->{"CompatibilityType"->0}], " the convex hull ", StyleBox["C", FontSlant->"Italic"], " of a set of points ", StyleBox["P", FontSlant->"Italic"], " is the intersection of all convex sets containing ", StyleBox["P", FontSlant->"Italic"], ". For ", StyleBox["four", FontVariations->{"CompatibilityType"->0}], " control points ", Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]]], ",...,", Cell[BoxData[ FormBox[ SubscriptBox["p", "3"], TraditionalForm]]], ", the convex hull ", StyleBox["C", FontSlant->"Italic"], " is then given by \n\tC \[Congruent] ", Cell[BoxData[ FormBox[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ UnderoverscriptBox[ RowBox[{" ", RowBox[{"\[Sum]", " "}]}], RowBox[{"j", "=", "0"}], "3"], RowBox[{ SubscriptBox["\[Lambda]", "j"], SubscriptBox["p", "j"]}]}], " ", "|", " ", RowBox[{ SubscriptBox["\[Lambda]", "j"], "\[GreaterSlantEqual]", RowBox[{"0", " ", "for", " ", "all", " ", "j", " ", "and", " ", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "0"}], "3"], " ", SubscriptBox["\[Lambda]", "j"]}]}]}]}], " ", "=", "1"}], " ", "}"}], TraditionalForm]]], ".\nIn fact, this is obvious now from the preceding result.\t" }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "Show that the Bezier curve ", StyleBox["B", FontSlant->"Italic"], " at ", Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]]], " is tangent to the line from ", Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]]], " to ", Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]]], " and that the same applies at ", Cell[BoxData[ FormBox[ SubscriptBox["p", RowBox[{"3", "\[IndentingNewLine]"}]], TraditionalForm]]], "." }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"bez", "'"}], "[", "0", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"bez", "'"}], "[", "1", "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Prove both mathematically and experimentally that the Bezier curve \ may quickly move away from the line from ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "0"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[" to ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["p", FontFamily->"Arial"], "1"], TraditionalForm]]], StyleBox[" if ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "1"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[" gets close to ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "0"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[". On the other hand, explain why the Bezier curve clings to the \ line from ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "0"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[" to ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox[" if ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox[" gets far away from ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]], FontFamily->"Arial"], StyleBox[". In particular, the inner control points ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox[" and ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "2"], TraditionalForm]], FontFamily->"Arial"], StyleBox[" a", FontFamily->"Arial"], StyleBox["lso control the magnitude of the tangent vectors. ", FontFamily->"Arial"] }], "Text", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"bez", "'"}], "[", "x", "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{"bez", "'"}], "[", "x", "]"}], "-", RowBox[{"(", RowBox[{ RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["p", "1"], "-", SubscriptBox["p", "0"]}], ")"}], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}], "2"]}], "+", RowBox[{"6", RowBox[{"(", RowBox[{ SubscriptBox["p", "2"], "-", SubscriptBox["p", "1"]}], ")"}], "x", RowBox[{"(", RowBox[{"1", "-", "x"}], ")"}]}], "+", RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["p", "3"], "-", SubscriptBox["p", "2"]}], ")"}], SuperscriptBox["x", "2"]}]}], ")"}]}], "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.501961], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Note that this results yields the preceding calculations of the \ derivatives. Furthermore, consider the behavior of bez' (", FontFamily->"Arial"], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[") near ", FontFamily->"Arial"], StyleBox["x ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["= 0. If ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox["-", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]], FontFamily->"Arial"], StyleBox["becomes small, the contributions of the other terms become \ significant. Neglecting the terms with factor ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SuperscriptBox["x", "2"], TraditionalForm]], FontFamily->"Arial"], StyleBox["as ", FontFamily->"Arial"], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" is small, the dominant term is then 6(", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "2"], TraditionalForm]], FontFamily->"Arial"], StyleBox["-", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], ")", StyleBox["x, ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["which may become large if the distance between", FontFamily->"Arial"], StyleBox[" ", FontFamily->"Arial", FontSlant->"Italic"], Cell[BoxData[ FormBox[ SubscriptBox["p", "2"], TraditionalForm]], FontFamily->"Arial"], StyleBox["and", FontFamily->"Arial"], StyleBox[" ", FontFamily->"Arial", FontSlant->"Italic"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox["is large", FontFamily->"Arial"], StyleBox[". ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["On the other hand, if the distance between ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "1"], TraditionalForm]], FontFamily->"Arial"], StyleBox["and ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]], FontFamily->"Arial"], " ", StyleBox["becomes large, the other terms stay negligible for a longer time \ than normal, and the dominant term is ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["p", "1"], "-", SubscriptBox["p", "0"]}], ")"}]}], TraditionalForm]], FontFamily->"Arial"], StyleBox[", causing the clinging to the tangent vector 3", FontFamily->"Arial"], Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{ SubscriptBox["p", "1"], "-", SubscriptBox["p", "0"]}], ")"}], TraditionalForm]], FontFamily->"Arial"], StyleBox[".", FontFamily->"Arial"] }], "Text", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "Study experimentally whether all Bezier curves that can be created using \ the demo are really smooth in the practical sense of the word. Can you \ simulate interesting situations in ", StyleBox["Mathematica", FontSlant->"Italic"], " and, in particular, zoom in on the interesting point? ", StyleBox["In fact, ", FontFamily->"Arial"], StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" has a package for generating Bezier curves.", FontFamily->"Arial"] }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"<<", "\"\\""}], "\n", RowBox[{ RowBox[{"splinegraph", "[", "l_", "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", "l", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Spline", "[", RowBox[{"l", ",", "Bezier", ",", RowBox[{"SplineDots", "\[Rule]", "Automatic"}]}], "]"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"pts1", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"pts2", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsRow", "[", RowBox[{"{", RowBox[{ RowBox[{"splinegraph", "[", "pts1", "]"}], ",", RowBox[{"splinegraph", "[", "pts2", "]"}]}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "900"}]}], "]"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", "pts2", "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Spline", "[", RowBox[{"pts2", ",", "Bezier", ",", RowBox[{"SplineDots", "\[Rule]", "Automatic"}]}], "]"}]}], "}"}], "]"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.49999`", ",", "0.50001`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.7495`", ",", "0.75`"}], "}"}]}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"400", ",", "400"}], "}"}]}]}], "]"}]}], "Input", CellChangeTimes->{{3.416903048495449*^9, 3.416903060100322*^9}, { 3.41690311881824*^9, 3.416903167283863*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ "The default constraint on two different Bezier curves is positional \ continuity. Show that the connection vector being twice the sum of the \ vectors adjacent to the connection vector is the condition needed to ensure \ tangential continuity. To this end, consider two connected Bezier curves, \ with control points ", Cell[BoxData[ FormBox[ SubscriptBox["p", "0"], TraditionalForm]]], ",...,", Cell[BoxData[ FormBox[ SubscriptBox["p", "3"], TraditionalForm]]], ", and ", Cell[BoxData[ FormBox[ SubscriptBox["p", "3"], TraditionalForm]]], ",...,", Cell[BoxData[ FormBox[ SubscriptBox["p", "6"], TraditionalForm]]], ", respectively. " }], "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["p", "3"], "-", SubscriptBox["p", "2"]}], ")"}]}], "\[Equal]", RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["p", "4"], "-", SubscriptBox["p", "3"]}], ")"}]}]}], ",", SubscriptBox["p", "3"]}], "]"}], "]"}], "/.", RowBox[{"Rule", "\[Rule]", "Equal"}]}], ")"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell["Illustrate tangential continuity in an example. ", "Text", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"pts3", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"pts4", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{"Reduce", "[", RowBox[{ RowBox[{"2", " ", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "\[Equal]", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], "+", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}]}], "}"}]}]}], "]"}], "\n", RowBox[{ RowBox[{"pl34", "=", RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"splinegraph", "[", "pts3", "]"}], "}"}], ",", RowBox[{"{", RowBox[{"splinegraph", "[", "pts4", "]"}], "}"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"pl43", "=", RowBox[{"Show", "[", RowBox[{ RowBox[{"splinegraph", "[", "pts3", "]"}], ",", RowBox[{"splinegraph", "[", "pts4", "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{"{", RowBox[{"pl34", ",", "pl43"}], "}"}], "}"}], "]"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "600"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Splines", "Subsection", FontFamily->"Arial"], StyleBox["\nNext we study splines as in the Spline Demo. Perform some \ experiments in ", FontFamily->"Arial"], StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" to verify that the following defines a spline determined by four \ points as in the Spline Demo.", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"m2", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "3", ",", RowBox[{"-", "3"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"-", "6"}], ",", "3", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "0", ",", "3", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4", ",", "1", ",", "0"}], "}"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "m2", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sp", "[", "x", "]"}], "=", RowBox[{ RowBox[{"1", "/", "6"}], " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "^", RowBox[{"(", RowBox[{"3", "-", "j"}], ")"}]}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], ".", "m2", ".", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"Table", "[", RowBox[{ RowBox[{"pp", "[", RowBox[{"[", RowBox[{"4", "-", "j"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], "}"}], "]"}]}]}]}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Now we use the result above in order to obtain a ", FontFamily->"Arial"], StyleBox["B", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["-spline in the sense of Strang's book, page 179. The normalization \ constant is selected as to guarantee that splines that are translated by 1/2 \ add up to 1 everywhere. Show this.", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"s", "[", "0", "]"}], "[", "x_", "]"}], ":=", FractionBox[ SuperscriptBox["x", "3"], "6"]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", "x_", "]"}], ":=", RowBox[{ FractionBox["1", "6"], " ", RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"1", "+", "x"}], ")"}], "3"], "-", RowBox[{"4", " ", SuperscriptBox["x", "3"]}]}], ")"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{"0", "/;", RowBox[{"x", "<", RowBox[{"-", "2"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"s", "[", "0", "]"}], "[", RowBox[{"x", "+", "2"}], "]"}], "/;", RowBox[{ RowBox[{"-", "2"}], "<", "x", "<", RowBox[{"-", "1"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", RowBox[{"x", "+", "1"}], "]"}], "/;", RowBox[{ RowBox[{"-", "1"}], "<", "x", "<", "0"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", RowBox[{ RowBox[{"-", "x"}], "+", "1"}], "]"}], "/;", RowBox[{"0", "<", "x", "<", "1"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"s", "[", "0", "]"}], "[", RowBox[{ RowBox[{"-", "x"}], "+", "2"}], "]"}], "/;", RowBox[{"1", "<", "x", "<", "2"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"s", "[", "x_", "]"}], ":=", RowBox[{"0", "/;", RowBox[{"2", "<", "x"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"spl", "[", "x_", "]"}], ":=", RowBox[{"s", "[", RowBox[{"2", " ", "x"}], "]"}]}], ";"}], "\n", RowBox[{"spl0", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spl", "[", RowBox[{"x", "+", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "0"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{"spl1", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spl", "[", RowBox[{"x", "+", FractionBox["1", "2"]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1.5`"}], ",", "0.5`"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{"spl2", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spl", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{"spl3", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spl", "[", RowBox[{"x", "-", FractionBox["1", "2"]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "0.5`"}], ",", "1.5`"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{"spl4", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"spl", "[", RowBox[{"x", "-", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{"spl0", ",", "spl1", ",", "spl2", ",", "spl3", ",", "spl4", ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.7`"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "None"}], ",", RowBox[{"Ticks", "\[Rule]", "None"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}], "\n", RowBox[{"ssp", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", RowBox[{"-", "2"}]}], "2"], RowBox[{"spl", "[", RowBox[{"x", "+", FractionBox["j", "2"]}], "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Here are some experiments. Obviously, a spline curve does not \ interpolate the control points ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "j"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[",", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" for ", FontFamily->"Arial"], StyleBox["j", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" between 0 and 3. In particular, the curves are no splines with \ control points ", FontFamily->"Arial"], Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["p", "j"], FontFamily->"Arial"], TraditionalForm]]], StyleBox[". Try to understand the role of the control points, in this case.", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3", ",", "sp"}], "]"}], "\n", RowBox[{ RowBox[{"p0", "=", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"{", RowBox[{"1.5`", ",", "2"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"{", RowBox[{"2.5`", ",", "1"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p", "=", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"sp", "[", "x_", "]"}], ":=", RowBox[{ FractionBox["1", "6"], " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ SuperscriptBox["x", RowBox[{"3", "-", "j"}]], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], ".", "m2", ".", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"Table", "[", RowBox[{ RowBox[{"p", "\[LeftDoubleBracket]", RowBox[{"4", "-", "j"}], "\[RightDoubleBracket]"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "3"}], "}"}]}], "]"}], "}"}], "]"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{"splot", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"sp", "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Point", "[", RowBox[{"p", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"tplot", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}], ",", "t"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}], "]"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"splot", ",", "tplot", ",", "lplot", ",", RowBox[{"Axes", "\[Rule]", "False"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416903308178254*^9, 3.416903328019826*^9}, 3.416903370284067*^9}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3", ",", "p"}], "]"}], "\n", RowBox[{ RowBox[{"p0", "=", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"{", RowBox[{"2.5`", ",", "3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "3"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"{", RowBox[{"2.5`", ",", RowBox[{"-", "3"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p", "=", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"splot", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"sp", "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Point", "[", RowBox[{"p", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"tplot", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}], ",", "t"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}], "]"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"splot", ",", "tplot", ",", "lplot", ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "Input", CellChangeTimes->{{3.4169034261699553`*^9, 3.4169034381725883`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "]"}], "\n", RowBox[{ RowBox[{"p0", "=", RowBox[{"{", RowBox[{"2", ",", RowBox[{"-", "2"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"{", RowBox[{"2", ",", "7"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p", "=", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"splot", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"sp", "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Point", "[", RowBox[{"p", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"tplot", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}], ",", "t"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}], "]"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"splot", ",", "tplot", ",", "lplot", ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416903457367509*^9, 3.416903475748735*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "]"}], "\n", RowBox[{ RowBox[{"p0", "=", RowBox[{"{", RowBox[{"2", ",", RowBox[{"-", "2"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "1"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"{", RowBox[{"1.8`", ",", "4"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"{", RowBox[{"2.5`", ",", "1"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"p", "=", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"splot", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"sp", "[", "x", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"t", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Point", "[", RowBox[{"p", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"tplot", "=", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}], ",", "t"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{"p0", ",", "p1", ",", "p2", ",", "p3"}], "}"}], "]"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"splot", ",", "tplot", ",", "lplot", ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416903486629458*^9, 3.4169035010190268`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" is able to plot a spline given the interpolation points.", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"points", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1.5`", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"2.5`", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3.5`", ",", "2"}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", "0", "]"}], ",", RowBox[{"Line", "[", "points", "]"}], ",", RowBox[{"GrayLevel", "[", "0", "]"}], ",", RowBox[{"Spline", "[", RowBox[{"points", ",", "Cubic"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]] }, Closed]], Cell[CellGroupData[{ Cell["Calculus of Variations", "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" is capable of handling some problems in the calculus of \ variations. As a first example we determine the shortest path between two \ points, see Strang, Section 3.6, ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["One-dimensional Problems", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[".", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"<<", "\"\\""}], "\n", RowBox[{ RowBox[{"F", "[", RowBox[{"u_", ",", "x_"}], "]"}], ":=", SqrtBox[ RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"u", "[", "x", "]"}]}], ")"}], "2"]}]]}], "\n", RowBox[{"EulerEquations", "[", RowBox[{ RowBox[{"F", "[", RowBox[{"u", ",", "x"}], "]"}], ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "\n", RowBox[{"sol", "=", RowBox[{"Flatten", "[", RowBox[{"DSolve", "[", RowBox[{"%", ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "]"}]}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\<\\!\\(\\*\\nStyleBox[\>\"", " ", "u", " ", "\"\<,\\n FontSlant->\>\"", " ", "Italic", " ", "\"\<]\\)(\\!\\(\\*\\nStyleBox[\>\"", " ", "x", " ", "\"\<,\\n FontSlant->\>\"", " ", "Italic", " ", "\"\<]\\)) equals\>\""}], "]"}], "\n", RowBox[{ RowBox[{"u", "[", "x", "]"}], "/.", "\[InvisibleSpace]", "sol"}], "\n", RowBox[{"Clear", "[", RowBox[{"F", ",", "u", ",", "sol"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Also the constrained problem in that section can be solved", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[".", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"F", "[", RowBox[{"u_", ",", "x_"}], "]"}], ":=", RowBox[{ SqrtBox[ RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"u", "[", "x", "]"}]}], ")"}], "2"]}]], "+", RowBox[{"m", " ", RowBox[{"u", "[", "x", "]"}]}]}]}], "\[IndentingNewLine]", RowBox[{"EulerEquations", "[", RowBox[{ RowBox[{"F", "[", RowBox[{"u", ",", "x"}], "]"}], ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "\[IndentingNewLine]", RowBox[{"sol", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"DSolve", "[", RowBox[{"%", ",", RowBox[{"u", "[", "x", "]"}], ",", "x"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", RowBox[{"-", "c"}]}], ",", RowBox[{ RowBox[{"C", "[", "2", "]"}], "\[Rule]", FractionBox["d", "m"]}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"uu", "[", "x_", "]"}], ":=", RowBox[{"PowerExpand", "[", RowBox[{ RowBox[{"u", "[", "x", "]"}], "/.", RowBox[{"sol", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\<\!\(\* StyleBox[\"u\", FontSlant->\"Italic\"]\)(\!\(\* StyleBox[\"x\", FontSlant->\"Italic\"]\)) equals\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"uu", "[", "x", "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\) is contained in a circle\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"uu", "[", "x", "]"}], "-", FractionBox["d", "m"]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", FractionBox["c", "m"]}], ")"}], "2"]}], "]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{ "F", ",", "u", ",", "uu", ",", "m", ",", "sol", ",", "c", ",", "d"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Next we derive the minimal surface equation for ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["nonparametric", FontWeight->"Bold", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["surfaces, that is, surfaces that arise as a graph", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[", see Strang, Section 3.6, ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["The Minimal Surface Problem", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[".", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"energy", "[", RowBox[{"u_", ",", "x1_", ",", "x2_"}], "]"}], ":=", SqrtBox[ RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", "x1"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", "x2"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}], ")"}], "2"]}]]}], "\[IndentingNewLine]", RowBox[{"VariationalD", "[", RowBox[{ RowBox[{"energy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], ",", RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", "x2"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff1", "[", "u_", "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"-", SuperscriptBox[ RowBox[{"energy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], "3"]}], RowBox[{"VariationalD", "[", RowBox[{ RowBox[{"energy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], ",", RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", "x2"}], "}"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff1", "[", "u", "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", SubscriptBox["x", "1"]}], ",", RowBox[{"x2", "\[Rule]", SubscriptBox["x", "2"]}]}], "}"}]}]}], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" writes the equation in the form\n", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], " ", StyleBox[" ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontSize->9, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", SubscriptBox["x", "2"]], "u"}], ")"}], "2"]}]}], TraditionalForm]], FontSize->14], StyleBox[") ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "1"]}]], "u"}], TraditionalForm]], FontSize->14], StyleBox[" \[Dash] 2 ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", SubscriptBox["x", "1"]], "u"}], TraditionalForm]], FontSize->14], StyleBox[" ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", SubscriptBox["x", "2"]], "u"}], TraditionalForm]], FontSize->14], StyleBox[" ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}]], "u"}], TraditionalForm]], FontSize->14], StyleBox[" + ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[PartialD]", SubscriptBox["x", "1"]], "u"}], ")"}], "2"]}]}], TraditionalForm]], FontSize->14], StyleBox[") ", FontSize->14], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{ SubscriptBox["x", "2"], ",", SubscriptBox["x", "2"]}]], "u"}], TraditionalForm]], FontSize->14], " ", StyleBox["= 0", FontSize->14], StyleBox[".", FontSize->10], "\nWe verify that this equation is identical to the one in Strang. " }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"recipenergy", "[", RowBox[{"u_", ",", "x1_", ",", "x2_"}], "]"}], ":=", FractionBox["1", RowBox[{"energy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff", "[", RowBox[{"u_", ",", "x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"Numerator", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x1"], RowBox[{"(", RowBox[{ RowBox[{"recipenergy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{ SubscriptBox["\[PartialD]", "x1"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}]}], ")"}]}], "+", RowBox[{ SubscriptBox["\[PartialD]", "x2"], RowBox[{"(", RowBox[{ RowBox[{"recipenergy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{ SubscriptBox["\[PartialD]", "x2"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}]}], ")"}]}]}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", SubscriptBox["x", "1"]}], ",", RowBox[{"x2", "\[Rule]", SubscriptBox["x", "2"]}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff1", "[", "u", "]"}], "\[Equal]", RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Clear", "[", "diff1", "]"}]}], "Input"], Cell[CellGroupData[{ Cell["Examples of minimal surfaces", "Section", FontColor->RGBColor[0.0156252, 0.191409, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Scherk's surface", FontWeight->"Bold", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\nFirst we verify that Scherk's surface satisfies the \ Euler\[Dash]Lagrange equation for a nonparametric minimal surface. ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"minimaldiffeq", "[", "f_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "u"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"u", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{ RowBox[{"f", "[", RowBox[{"x1", ",", "x2"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"-", RowBox[{ SubscriptBox["\[PartialD]", "x1"], RowBox[{"(", RowBox[{ RowBox[{"recipenergy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{ SubscriptBox["\[PartialD]", "x1"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}]}], ")"}]}]}], "-", RowBox[{ SubscriptBox["\[PartialD]", "x2"], RowBox[{"(", RowBox[{ RowBox[{"recipenergy", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{ SubscriptBox["\[PartialD]", "x2"], RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}]}]}], ")"}]}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"scherk", "[", "a_", "]"}], "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"{", RowBox[{"x1", ",", "x2", ",", RowBox[{ FractionBox["1", "a"], RowBox[{"Log", "[", FractionBox[ RowBox[{"Cos", "[", RowBox[{"a", " ", "x2"}], "]"}], RowBox[{"Cos", "[", RowBox[{"a", " ", "x1"}], "]"}]], "]"}]}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"minimaldiffeq", "[", RowBox[{"scherk", "[", "a", "]"}], "]"}]}], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[StyleBox["Next we set up a module for plotting parametrically \ defined surfaces and apply this to Scherk's surface. The resulting plot of \ that surface is incomplete: it is doubly periodic on the plane as can be seen \ from the next plot.", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]]], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ RowBox[{"220", "/", "256"}], ",", RowBox[{"248", "/", "256"}], ",", RowBox[{"248", "/", "256"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"myParametricPlot3D", "[", RowBox[{ "\[Phi]_", ",", "x1min_", ",", "x1max_", ",", "x2min_", ",", "x2max_", ",", "p1plot_", ",", "p2plot_", ",", "imagesize_", ",", RowBox[{"viewpoint_:", RowBox[{"{", RowBox[{"1.3", ",", RowBox[{"-", "2.4"}], ",", "2"}], "}"}]}], ",", "opts___"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", "x2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"\[Phi]", "[", RowBox[{"x1", ",", "x2"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x1", ",", "x1min", ",", "x1max"}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", "x2min", ",", "x2max"}], "}"}], ",", "opts", ",", RowBox[{"PlotPoints", "->", RowBox[{"{", RowBox[{"p1plot", ",", "p2plot"}], "}"}]}], ",", RowBox[{"Axes", "\[Rule]", "None"}], ",", RowBox[{"Boxed", "\[Rule]", "False"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", "\[IndentingNewLine]", RowBox[{"Lighting", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", "Red", ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "Red", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"0", ",", "2", ",", "2"}], "}"}]}], "}"}]}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "imagesize"}], ",", RowBox[{"ViewPoint", "\[Rule]", "viewpoint"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"myParametricPlot3D", "[", RowBox[{ RowBox[{"scherk", "[", "1", "]"}], ",", RowBox[{ RowBox[{"-", FractionBox["\[Pi]", "2"]}], "+", "0.01"}], ",", RowBox[{ FractionBox["\[Pi]", "2"], "-", "0.01"}], ",", RowBox[{ RowBox[{"-", FractionBox["\[Pi]", "2"]}], "+", "0.01"}], ",", RowBox[{ FractionBox["\[Pi]", "2"], "-", "0.01"}], ",", "81", ",", "81", ",", "500", ",", RowBox[{"2", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "1.5"}], ",", "0.5"}], "}"}]}], ",", RowBox[{"Lighting", "\[Rule]", "Automatic"}]}], "]"}]}], "Input", CellChangeTimes->{{3.41690907320105*^9, 3.4169090740453587`*^9}, { 3.416909105038183*^9, 3.416909207130628*^9}, {3.416909240259749*^9, 3.416909292197783*^9}, {3.416909475295555*^9, 3.416909484329915*^9}, { 3.4169095149938097`*^9, 3.416909557557191*^9}, {3.416909596667584*^9, 3.416909609521391*^9}, {3.416909641320826*^9, 3.416909690829853*^9}, { 3.416909733084291*^9, 3.416909734501342*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ RowBox[{"220", "/", "256"}], ",", RowBox[{"248", "/", "256"}], ",", RowBox[{"248", "/", "256"}]}], "]"}]}], ";"}], "\n", RowBox[{"ContourPlot3D", "[", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", "x3"], " ", RowBox[{"Cos", "[", "x2", "]"}]}], "-", RowBox[{"Cos", "[", "x1", "]"}]}], ",", RowBox[{"{", RowBox[{"x1", ",", RowBox[{ RowBox[{"-", "2"}], " ", "\[Pi]"}], ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", RowBox[{ RowBox[{"-", "2"}], " ", "\[Pi]"}], ",", RowBox[{"2", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x3", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", RowBox[{"{", RowBox[{"3", " ", ",", "3", ",", "4"}], "}"}]}], ",", RowBox[{"ContourStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0.7`", ",", "0.7`", ",", "1"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Boxed", "\[Rule]", "False"}], ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"4", " ", RowBox[{"{", RowBox[{"1", ",", "0.4`", ",", "0.4`"}], "}"}]}]}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"1000", ",", "1000"}], "}"}]}]}], "]"}]}], "Input", CellChangeTimes->{ 3.416909763332529*^9, {3.416909800241582*^9, 3.416909918426092*^9}, 3.416909958129302*^9}], Cell[TextData[StyleBox["The execution of the following code takes a while, \ but shows Scherk's surface from an interesting perspective. It has been \ commented out. ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]]], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"<<", "Graphics`ContourPlot3D`"}], "\[IndentingNewLine]", RowBox[{"ContourPlot3D", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Exp", "[", "x3", "]"}], RowBox[{"Cos", "[", "x2", "]"}]}], "-", RowBox[{"Cos", "[", "x1", "]"}]}], ",", RowBox[{"{", RowBox[{"x1", ",", RowBox[{ RowBox[{"-", "2"}], "\[Pi]"}], ",", RowBox[{"2", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", RowBox[{ RowBox[{"-", "2"}], "\[Pi]"}], ",", RowBox[{"2", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x3", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", RowBox[{"{", RowBox[{"3", ",", "3", ",", "4"}], "}"}]}], ",", RowBox[{"ContourStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0.7", ",", "0.7", ",", "1"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"Boxed", "->", "False"}], ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0", ",", "100"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "1000"}]}], "]"}]}], ";"}], " ", "*)"}]], "Input", CellChangeTimes->{{3.4169099918235807`*^9, 3.416910020793591*^9}}], Cell[TextData[{ StyleBox["Exercise. ", FontWeight->"Bold"], "Show that Scherk's surface can be obtained from the Euler\[Dash]Lagrange \ equation for a minimal surface by setting \n ", StyleBox["u", FontSlant->"Italic"], StyleBox[" (", FontVariations->{"CompatibilityType"->0}], Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], ", ", Cell[BoxData[ FormBox[ SubscriptBox["x", "2"], TraditionalForm]]], ") = ", StyleBox["f", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], StyleBox["(", FontVariations->{"CompatibilityType"->0}], Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], ") + ", StyleBox["g ", FontSlant->"Italic"], "(", Cell[BoxData[ FormBox[ SubscriptBox["x", "2"], TraditionalForm]]], "). \nNext one separates the variables. One obtains ordinary differential \ equations that can be solved by integrating twice. It is the unique minimal \ surface having this property. \n", StyleBox["Below this", FontVariations->{"CompatibilityType"->0}], " is worked out with", StyleBox[" ", FontWeight->"Bold"], StyleBox["Mathematica.", FontSlant->"Italic"], StyleBox[" The assignment is to offer more explanation of what is going on \ mathematically.", FontWeight->"Bold"] }], "Exercise"], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"u", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{ RowBox[{"f", "[", "x1", "]"}], "+", RowBox[{"g", "[", "x2", "]"}]}]}], "\[IndentingNewLine]", RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sep", "[", RowBox[{"f_", ",", "g_"}], "]"}], ":=", RowBox[{"Apart", "[", FractionBox[ RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{ RowBox[{"(", RowBox[{"1", "+", SuperscriptBox[ RowBox[{ RowBox[{"f", "'"}], "[", "x1", "]"}], "2"]}], ")"}], RowBox[{"(", RowBox[{"1", "+", SuperscriptBox[ RowBox[{ RowBox[{"g", "'"}], "[", "x2", "]"}], "2"]}], ")"}]}]], "]"}]}], "\[IndentingNewLine]", RowBox[{"sep", "[", RowBox[{"f", ",", "g"}], "]"}], "\[IndentingNewLine]", RowBox[{"solf", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{"First", "[", RowBox[{"sep", "[", RowBox[{"f", ",", "g"}], "]"}], "]"}], "\[Equal]", "a"}], ",", RowBox[{ RowBox[{"f", "'"}], "[", "x1", "]"}], ",", "x1"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", "0"}], ",", RowBox[{ RowBox[{"C", "[", "2", "]"}], "\[Rule]", "0"}]}], "}"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", SubscriptBox["x", "1"]}], ",", RowBox[{"x2", "\[Rule]", SubscriptBox["x", "2"]}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{"solg", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{"Last", "[", RowBox[{"sep", "[", RowBox[{"f", ",", "g"}], "]"}], "]"}], "\[Equal]", RowBox[{"-", "a"}]}], ",", RowBox[{ RowBox[{"g", "'"}], "[", "x2", "]"}], ",", "x2"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", "0"}], ",", RowBox[{ RowBox[{"C", "[", "2", "]"}], "\[Rule]", "0"}]}], "}"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", SubscriptBox["x", "1"]}], ",", RowBox[{"x2", "\[Rule]", SubscriptBox["x", "2"]}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\<\!\(\* StyleBox[\"u\", FontSlant->\"Italic\"]\)(\!\(\*SubscriptBox[ StyleBox[\"x\", FontSlant->\"Italic\"], \"1\"]\),\!\(\*SubscriptBox[\(x\), \(2\)]\)) equals\>\ \"", "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{"u", "[", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}], "]"}], "/.", "solf"}], "/.", "solg"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"scherk", "[", "a", "]"}], "[", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], "\[Equal]", "%"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{"u", ",", "f", ",", "g"}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Catenoid ", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["\nThis minimal surface has a graph that locally is invariant under \ rotation about the ", FontColor->RGBColor[0, 0, 0.500008]], Cell[BoxData[ FormBox[ SubscriptBox["x", "3"], TraditionalForm]]], "\[Dash]axis and is uniquely determined by this property" }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"r", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", SqrtBox[ RowBox[{ SuperscriptBox["x1", "2"], "+", SuperscriptBox["x2", "2"]}]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"u", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"k", "[", RowBox[{"r", "[", RowBox[{"x1", ",", "x2"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"u", "[", RowBox[{"x1", ",", "x2"}], "]"}], "\[IndentingNewLine]", RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff1", "[", "u_", "]"}], ":=", RowBox[{"Apart", "[", FractionBox[ RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], RowBox[{"r", "[", RowBox[{"x1", ",", "x2"}], "]"}]], "]"}]}], "\[IndentingNewLine]", RowBox[{"diff1", "[", "u", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"diff2", "[", "r_", "]"}], ":=", RowBox[{ RowBox[{"diff1", "[", "u", "]"}], "/.", RowBox[{ RowBox[{"r", "[", RowBox[{"x1", ",", "x2"}], "]"}], "\[Rule]", "r"}]}]}], "\[IndentingNewLine]", RowBox[{"diff2", "[", "r", "]"}], "\[IndentingNewLine]", RowBox[{"sol", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"%", "\[Equal]", "0"}], ",", RowBox[{"k", "[", "r", "]"}], ",", "r"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) given by\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"sol", "=", RowBox[{ RowBox[{ RowBox[{"k", "[", "r", "]"}], "/.", RowBox[{"sol", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", "0"}], ",", RowBox[{ RowBox[{"C", "[", "2", "]"}], "\[Rule]", RowBox[{"I", " ", FractionBox["\[Pi]", "2"]}]}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) equals i arctan \!\(\*FractionBox[SqrtBox[ RowBox[{\"1\", \"-\", SuperscriptBox[ StyleBox[\"r\", FontSlant->\"Italic\"], \"2\"]}]], StyleBox[\"r\", FontSlant->\"Italic\"]]\), as follows from\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "I"], "sol"}], "-", RowBox[{"ArcTan", "[", FractionBox[ SqrtBox[ RowBox[{"1", "-", SuperscriptBox["r", "2"]}]], "r"], "]"}]}], ",", "r"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"kk", "[", "r_", "]"}], ":=", RowBox[{"I", " ", RowBox[{"ArcTan", "[", FractionBox[ SqrtBox[ RowBox[{"1", "-", SuperscriptBox["r", "2"]}]], "r"], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) and subtract 1\>\"", "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ SuperscriptBox[ RowBox[{"Tanh", "[", RowBox[{"kk", "[", "r", "]"}], "]"}], "2"], "-", "1"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) - 1 = -\!\(\*FractionBox[\"1\", RowBox[{SuperscriptBox[\"cosh\", \"2\"], StyleBox[\"k\", FontSlant->\"Italic\"], RowBox[{\"(\", StyleBox[\"r\", FontSlant->\"Italic\"], \")\"}]}]]\)\>\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{"Tanh", "[", "x", "]"}], "^", "2"}], "-", "1"}], "]"}], "\[Equal]", RowBox[{"-", FractionBox["1", SuperscriptBox[ RowBox[{"Cosh", "[", "x", "]"}], "2"]]}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) = arccosh \!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\) leads to a solution of the minimal surface \ equation\>\"", "]"}], "\n", RowBox[{ RowBox[{"k", "[", "r_", "]"}], ":=", RowBox[{"ArcCosh", "[", "r", "]"}]}], "\[IndentingNewLine]", RowBox[{"diff", "[", RowBox[{"u", ",", "x1", ",", "x2"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "\"\\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) is given by \!\(\* StyleBox[\"k\", FontSlant->\"Italic\"]\)(\!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)) = \[ImaginaryI] arcsinh \!\(\* StyleBox[\"r\", FontSlant->\"Italic\"]\)\>\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"k", "[", "r_", "]"}], ":=", RowBox[{"\[ImaginaryI]", " ", RowBox[{"ArcSinh", "[", "r", "]"}]}]}], "\[IndentingNewLine]", RowBox[{"diff2", "[", "r", "]"}], "\[IndentingNewLine]", RowBox[{"Clear", "[", RowBox[{ "r", ",", "x1", ",", "x2", ",", "u", ",", "k", ",", "kk", ",", "diff1", ",", "diff2", ",", "sol"}], "]"}]}], "Input"], Cell[TextData[StyleBox["As a consequence, a parametrization and a plot of the \ catenoid are given by ", FontColor->RGBColor[0, 0, 0.500008]]], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"cat", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}], ",", "x2"}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"myParametricPlot3D", "[", RowBox[{"cat", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]", ",", RowBox[{ RowBox[{"-", "\[Pi]"}], "/", "2"}], ",", RowBox[{"\[Pi]", "/", "2"}], ",", "120", ",", "60", ",", "600", ",", RowBox[{"5", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0.2"}], "}"}]}]}], "]"}], ";"}]}], "Input"], Cell[TextData[{ StyleBox["Helicoid and catenoid", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["\nThese two minimal surfaces can be continuously deformed into \ each other through a family of minimal surfaces. The first plot shows the ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["helicoid", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[", which is the only ruled minimal surface.", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"heltocat", "[", "t_", "]"}], "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "t", "]"}], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Sin", "[", "x1", "]"}], RowBox[{"Sinh", "[", "x2", "]"}]}], ",", RowBox[{ RowBox[{"-", RowBox[{"Cos", "[", "x1", "]"}]}], RowBox[{"Sinh", "[", "x2", "]"}]}], ",", "x1"}], "}"}]}], "+", RowBox[{ RowBox[{"Sin", "[", "t", "]"}], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}], ",", "x2"}], "}"}]}]}]}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "p", "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"p", "[", "k_", "]"}], ":=", RowBox[{"myParametricPlot3D", "[", RowBox[{ RowBox[{"heltocat", "[", FractionBox[ RowBox[{"k", " ", "\[Pi]"}], "10"], "]"}], ",", "0", ",", RowBox[{"2", " ", "\[Pi]"}], ",", RowBox[{"-", FractionBox["\[Pi]", "2"]}], ",", FractionBox["\[Pi]", "2"], ",", "120", ",", "60", ",", "600", ",", RowBox[{"5", " ", RowBox[{"{", RowBox[{"1", ",", "0.2`", ",", "0.2`"}], "}"}]}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"p", "[", "0", "]"}], ",", RowBox[{"p", "[", "1", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", "2", "]"}], ",", RowBox[{"p", "[", "3", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"p", "[", "4", "]"}], ",", RowBox[{"p", "[", "5", "]"}]}], "}"}]}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "1200"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Weierstrass representation of minimal surface", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["\nDiscuss this representation, in particular, its relation to the \ results above. Here, ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["f", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" and ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["g", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" are suitable functions on a connected domain in ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["C", FontWeight->"Bold", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[".", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "t", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"weierstrass", "[", RowBox[{"f_", ",", "g_"}], "]"}], "[", "z_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"w", ",", "integral"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"integral", "=", RowBox[{"\[Integral]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ FractionBox[ RowBox[{"f", "[", "w", "]"}], "2"], RowBox[{"(", RowBox[{"1", "-", SuperscriptBox[ RowBox[{"g", "[", "w", "]"}], "2"]}], ")"}]}], ",", RowBox[{"\[ImaginaryI]", FractionBox[ RowBox[{"f", "[", "w", "]"}], "2"], RowBox[{"(", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"g", "[", "w", "]"}], "2"]}], ")"}]}], ",", RowBox[{ RowBox[{"f", "[", "w", "]"}], " ", RowBox[{"g", "[", "w", "]"}]}]}], "}"}], RowBox[{"\[DifferentialD]", "w"}]}]}]}], ";", RowBox[{"Simplify", "[", RowBox[{"integral", "/.", RowBox[{"w", "\[Rule]", "z"}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"weierstrass", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"-", SuperscriptBox["\[ExponentialE]", RowBox[{"-", "#"}]]}], ")"}], "&"}], ",", RowBox[{ RowBox[{"(", RowBox[{"-", SuperscriptBox["\[ExponentialE]", "#"]}], ")"}], "&"}]}], "]"}], "[", "z", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"analytictominimal", "[", "\[CurlyPhi]_", "]"}], "[", "t_", "]"}], "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"ComplexExpand", "[", RowBox[{"Re", "[", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "t"}]], RowBox[{"\[CurlyPhi]", "[", RowBox[{"x1", "+", RowBox[{"\[ImaginaryI]", " ", "x2"}]}], "]"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ExpToTrig", "[", RowBox[{ RowBox[{ RowBox[{"analytictominimal", "[", RowBox[{"weierstrass", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"-", SuperscriptBox["\[ExponentialE]", RowBox[{"-", "#"}]]}], ")"}], "&"}], ",", RowBox[{ RowBox[{"(", RowBox[{"-", SuperscriptBox["\[ExponentialE]", "#"]}], ")"}], "&"}]}], "]"}], "]"}], "[", "t", "]"}], "[", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}], "]"}], "]"}], "==", "\[IndentingNewLine]", RowBox[{"ComplexExpand", "[", RowBox[{ RowBox[{"heltocat", "[", RowBox[{ FractionBox["\[Pi]", "2"], "-", "t"}], "]"}], "[", RowBox[{ SubscriptBox["x", "2"], ",", SubscriptBox["x", "1"]}], "]"}], "]"}]}]}], "Input"], Cell[TextData[{ StyleBox["Enneper's", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["and", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["Henneberg's surfaces", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["\nWe plot two other minimal surfaces, one due to Enneper and one \ to Henneberg", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[".", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" Enneper's surface has two holes.", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"enneper", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"x1", "-", FractionBox[ SuperscriptBox["x1", "3"], "3"], "+", RowBox[{"x1", " ", SuperscriptBox["x2", "2"]}]}], ",", RowBox[{"x2", "-", FractionBox[ SuperscriptBox["x2", "3"], "3"], "+", RowBox[{ SuperscriptBox["x1", "2"], " ", "x2"}]}], ",", RowBox[{ SuperscriptBox["x1", "2"], "-", SuperscriptBox["x2", "2"]}]}], "}"}]}], "\n", RowBox[{ RowBox[{"<<", "\"\\""}], ";", RowBox[{"<<", "\"\\""}]}], "\n", RowBox[{ RowBox[{"Shadow", "[", RowBox[{ RowBox[{"myParametricPlot3D", "[", RowBox[{"enneper", ",", RowBox[{"-", "2"}], ",", "2", ",", RowBox[{"-", "2"}], ",", "2", ",", "80", ",", "80", ",", "800"}], "]"}], ",", RowBox[{"ZShadow", "\[Rule]", "False"}], ",", RowBox[{"BoxStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0.5`", ",", "0"}], "]"}]}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"henneberg", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"2", " ", RowBox[{"Sinh", "[", "x1", "]"}], " ", RowBox[{"Cos", "[", "x2", "]"}]}], "-", RowBox[{ FractionBox["2", "3"], " ", RowBox[{"Sinh", "[", RowBox[{"3", " ", "x1"}], "]"}], " ", RowBox[{"Cos", "[", RowBox[{"3", " ", "x2"}], "]"}]}]}], ",", RowBox[{ RowBox[{"2", " ", RowBox[{"Sinh", "[", "x1", "]"}], " ", RowBox[{"Sin", "[", "x2", "]"}]}], "+", RowBox[{ FractionBox["2", "3"], " ", RowBox[{"Sinh", "[", RowBox[{"3", " ", "x1"}], "]"}], " ", RowBox[{"Sin", "[", RowBox[{"3", " ", "x2"}], "]"}]}]}], ",", RowBox[{"2", " ", RowBox[{"Cosh", "[", RowBox[{"2", " ", "x1"}], "]"}], " ", RowBox[{"Cos", "[", RowBox[{"2", " ", "x2"}], "]"}]}]}], "}"}]}], "\n", RowBox[{ RowBox[{"myParametricPlot3D", "[", RowBox[{"henneberg", ",", "0", ",", "1", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]", ",", "60", ",", "180", ",", "800"}], "]"}], ";"}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[StyleBox["After reparametrization Henneberg's surface also has \ a Weierstrass representation.", FontColor->RGBColor[0, 0, 0.500008]]], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"FullSimplify", "[", RowBox[{"ExpToTrig", "[", RowBox[{ RowBox[{ RowBox[{"analytictominimal", "[", RowBox[{"Composition", "[", RowBox[{ RowBox[{"weierstrass", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", FractionBox["1", SuperscriptBox["#", "4"]]}], ")"}], "&"}], ",", RowBox[{"#", "&"}]}], "]"}], ",", "Exp"}], "]"}], "]"}], "[", "0", "]"}], "[", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}], "]"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"%", "-", RowBox[{ FractionBox["1", "2"], RowBox[{"henneberg", "[", RowBox[{ SubscriptBox["x", "1"], ",", RowBox[{"-", SubscriptBox["x", "2"]}]}], "]"}]}]}], "]"}]}], "Input"], Cell[TextData[{ StyleBox["Catalan's surface", FontWeight->"Bold", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" \nNote that this surface contains a cycloid", FontColor->RGBColor[0, 0, 0.500008]], ".", StyleBox[" ", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"catalan", "[", RowBox[{"x1_", ",", "x2_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"x1", "-", RowBox[{ RowBox[{"Sin", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}]}], ",", RowBox[{"1", "-", RowBox[{ RowBox[{"Cos", "[", "x1", "]"}], RowBox[{"Cosh", "[", "x2", "]"}]}]}], ",", RowBox[{"4", RowBox[{"Sin", "[", FractionBox["x1", "2"], "]"}], RowBox[{"Sinh", "[", FractionBox["x2", "2"], "]"}]}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"catalan", "[", RowBox[{"t", ",", "0"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"myParametricPlot3D", "[", RowBox[{"catalan", ",", "0", ",", RowBox[{"4", "\[Pi]"}], ",", RowBox[{"-", "2"}], ",", "2", ",", "201", ",", "141", ",", "1000"}], "]"}], ";"}]}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Laplace's Equation and Steady Fluid Flow", "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell[TextData[{ StyleBox["The following is an illustration of Exercise 3.3.14 in G. Strang's \ book ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Introduction to Applied Mathematics", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[". ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["The", FontFamily->"Arial", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" plot contains the equipotentials ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["(", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x,y) ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["= ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["c", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" and streamlines ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["s", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["(", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x,y) ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["= ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["c", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" for the steady flow ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of an inviscid fluid", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" in parts of the plane separated by the vertical axis and by lines \ making an angle of \[PlusMinus]", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ StyleBox[ FractionBox["\[Pi]", "6"], FontSize->14, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], TraditionalForm]]], " with the positive direction of the x\[Dash]axis", StyleBox[". Show that the magnitude of the associated velocity vector field \ ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["v", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["(", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x,y) ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["= grad ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["(", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x,y)", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" at the point (", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[",", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["y", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[") equals ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ SuperscriptBox["x", "2"], TraditionalForm]], FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["+", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ SuperscriptBox["y", "2"], TraditionalForm]], FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], ". ", StyleBox["Deduce that the speed of the flow is proportional to the square of \ the distance to the origin. ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\n", RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], "\n", RowBox[{"<<", "\"\\""}], "\n", RowBox[{ RowBox[{"SetCoordinates", "[", RowBox[{"Cartesian", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"u", "[", RowBox[{"x_", ",", "y_", ",", "z_"}], "]"}], ":=", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], " ", "y"}], "-", FractionBox[ SuperscriptBox["y", "3"], "3"]}]}], "\n", RowBox[{ RowBox[{"s", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"x", " ", SuperscriptBox["y", "2"]}], "-", FractionBox[ SuperscriptBox["x", "3"], "3"]}]}], "\n", RowBox[{ RowBox[{"v", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"Grad", "[", RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}]}], "\n", RowBox[{"PowerExpand", "[", SqrtBox[ RowBox[{"Simplify", "[", RowBox[{ SuperscriptBox[ RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "2"]}], "]"}]], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"uplot", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ContourShading", "\[Rule]", "False"}], ",", RowBox[{"Contours", "\[Rule]", "12"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"splot", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"Abs", "[", RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"Contours", "\[Rule]", "12"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot1", "=", RowBox[{"Plot", "[", RowBox[{ FractionBox["x", SqrtBox["3"]], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "1"}], "]"}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot2", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"-", FractionBox["x", SqrtBox["3"]]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "1"}], "]"}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"lplot3", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "3"}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{ "uplot", ",", "splot", ",", "lplot1", ",", "lplot2", ",", "lplot3", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416910070250223*^9, 3.4169101277757883`*^9}, { 3.416910224619739*^9, 3.416910227929854*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Next we consider Exercise 3.3.17. Here the goal is to ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["describe", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["the steady flow of a inviscid fluid past a circle in \ two-dimensional space and past a cylinder in three-dimensional space. ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["We begin by studying the potential ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" from that exercise. Prove that ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["is a harmonic function both in cylindrical and Cartesian \ coordinates, and determine the corresponding irrotational velocity vector \ field ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v = ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["(", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["", "1"], TraditionalForm]], FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[",", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["v", "2"], TraditionalForm]], FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[") in the plane", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[". ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"u", ",", "s", ",", "v"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Laplacian", "[", RowBox[{ RowBox[{ RowBox[{"r", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}], "+", FractionBox[ RowBox[{"Cos", "[", "\[Theta]", "]"}], "r"]}], ",", RowBox[{"Cylindrical", "[", RowBox[{"r", ",", "\[Theta]", ",", "\[Phi]"}], "]"}]}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetCoordinates", "[", RowBox[{"Cartesian", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"u", "[", RowBox[{"x_", ",", "y_", ",", "z_"}], "]"}], ":=", RowBox[{"x", "+", FractionBox["x", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"Laplacian", "[", RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], "]"}], "]"}], " "}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"v", "[", RowBox[{"x_", ",", "y_", ",", "z_"}], "]"}], ":=", RowBox[{"Grad", "[", RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"v1", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}]}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"v2", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], " "}], "\[IndentingNewLine]", RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], "\[IndentingNewLine]", RowBox[{"Together", "[", RowBox[{"v1", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Curl", "[", RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], " \ "}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Verify that ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["(", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["x,y", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[")", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["is the real part of the complex-analytic function", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["z", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["+", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], Cell[BoxData[ FormBox[ FractionBox["1", "z"], TraditionalForm]], FontSize->14], StyleBox[", ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["for ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["z = x + iy.", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"ComplexExpand", "[", RowBox[{"Re", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}], "+", FractionBox["1", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}]]}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"%", "==", RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}]}]}], "Input", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Plot the graph of ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[". Note that ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" becomes infinite at the origin. ", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["Study ", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["u", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" also by creating a contour plot. ", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1.5`"}], ",", "1.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "1.5`"}], ",", "1.5`"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", "101"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\< x \>\"", ",", "\"\< y \>\"", ",", "\"\< z \>\""}], "}"}]}], ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.1`"}], ",", RowBox[{"-", "2"}], ",", "1.3`"}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "8"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}], "\n", RowBox[{"conplot", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"PlotPoints", "->", "150"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"Contours", "\[Rule]", "12"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.416910330980352*^9, 3.416910384978549*^9}, { 3.416910428640533*^9, 3.416910539397964*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{ "In", " ", "order", " ", "to", " ", "block", " ", "out", " ", "the", " ", "singular", " ", "behavior", " ", "at", " ", "the", " ", "origin"}], FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[",", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], RowBox[{ RowBox[{ RowBox[{ StyleBox["restrict", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["to", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["the", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["domain", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[ RowBox[{ StyleBox[" ", FontFamily->"Arial"], StyleBox[" ", "Text"]}], FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[ SuperscriptBox["x", "2"], FontSlant->"Italic"]}], StyleBox["+", FontVariations->{"CompatibilityType"->0}], StyleBox[ SuperscriptBox["y", "2"], FontSlant->"Italic"]}], ">", "1"}], StyleBox[",", "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[ RowBox[{ "which", " ", "is", " ", "bounded", " ", "by", " ", "the", " ", "circle", " ", RowBox[{ StyleBox["C", FontSlant->"Italic"], ".", " "}]}], "Text", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]]}]], "Text", FontFamily->"Helvetica", FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"conplot", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "1"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Verify that the contour lines of u are perpendicular to the circle \ ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox["C", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox[". ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ".", RowBox[{"{", RowBox[{"x", ",", "y", ",", "0"}], "}"}]}], "]"}], "/.", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "\[Rule]", "1"}]}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Next plot the velocity vector field ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" = grad ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" associated with the potential ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[". Show that the points in the plane where ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["vanishes", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[", are given by \[PlusMinus] (1,0). Note the abrupt reversal of \ direction of the vector field near those points and furthermore, that the \ flow determined by ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" has a positive speed at all points of the unit circle with the \ exception of the aforementioned two.", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"Power", "::", "\"\\""}], "]"}], "\n", RowBox[{"Off", "[", RowBox[{"ScaleFunction", "::", "\"\\""}], "]"}], "\n", RowBox[{"Off", "[", RowBox[{"\[Infinity]", "::", "\"\\""}], "]"}], "\n", RowBox[{"<<", "\"\\""}], "\n", RowBox[{ RowBox[{"colorgradplot", "=", RowBox[{"(", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";", RowBox[{"VectorFieldPlots`GradientFieldPlot", "[", RowBox[{ RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", "41"}], ",", RowBox[{"ScaleFunction", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"Tanh", "[", "#1", "]"}], "&"}], ")"}]}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ")"}]}], ";"}], "\n", RowBox[{ RowBox[{"circle", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "t", "]"}], ",", RowBox[{"Sin", "[", "t", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"colorgradplot", ",", "circle", ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}], "\n", RowBox[{"zerov", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"Rule", "\[Rule]", "Equal"}]}]}]}], "Input", CellChangeTimes->{{3.4169106372167473`*^9, 3.416910668692725*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Now verify by inspection that everywhere the velocity vector field \ ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" and the contour lines of the potential ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["u", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" are perpendicular.", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"gradplot", "=", RowBox[{"(", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";", RowBox[{"VectorFieldPlots`GradientFieldPlot", "[", RowBox[{ RowBox[{"u", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", "35"}], ",", RowBox[{"ScaleFunction", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"Tanh", "[", "#1", "]"}], "&"}], ")"}]}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ")"}]}], ";"}], "\n", RowBox[{ RowBox[{"conplot1", "=", RowBox[{"Show", "[", RowBox[{"conplot", ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"conplot1", ",", "gradplot", ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416910733770173*^9, 3.416910759718997*^9}, 3.416910809634872*^9}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["In particular, show that", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox[" v.n = 0 ", FontFamily->"Arial", FontSlant->"Italic", Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox["on the circle", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, Background->RGBColor[0.832044, 0.996109, 0.832044]], StyleBox[" C.", FontFamily->"Arial", FontSlant->"Italic", Background->RGBColor[0.832044, 0.996109, 0.832044]] }], "Text", FontFamily->"Helv", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ".", RowBox[{"{", RowBox[{"x", ",", "y", ",", "0"}], "}"}]}], "]"}], "/.", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "\[Rule]", "1"}]}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Verify that the streamlines (a more precise definition of this \ notion is given below) of the velocity vector field ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["are given by the equation", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["s(x,y) = y ", FontSize->14, FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["- ", FontSize->14, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ FractionBox["y", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]], TraditionalForm]], FontSize->14, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], " ", StyleBox["= ", FontSize->14, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["c", FontSize->14, FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[", for real numbers ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["c", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[". This will be explained below too. The streamlines of ", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["describe", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["the steady flow of a inviscid fluid past a circle in \ two-dimensional space and past a cylinder in three-dimensional space, as can \ be seen in the following plots. Note that by taking the absolute value of ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["s ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["the streamlines do not change. ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"s", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"y", "-", FractionBox["y", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]]}]}], "\n", RowBox[{"streamplot", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"Abs", "[", RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"PlotPoints", "\[Rule]", "10"}], ",", RowBox[{"Contours", "\[Rule]", "81"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}]}], "\n", RowBox[{"Show", "[", RowBox[{"streamplot", ",", "gradplot", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "1"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{3.416910880853739*^9}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Verify that s", FontFamily->"Helvetica", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["(", FontFamily->"Helvetica", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["x,y", FontFamily->"Helvetica", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[")", FontFamily->"Helvetica", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Helvetica", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["is the imaginary part of the complex-analytic function", FontFamily->"Helvetica", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" z+", FontFamily->"Helvetica", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], Cell[BoxData[ FormBox[ FractionBox["1", "z"], TraditionalForm]]], StyleBox[", ", FontFamily->"Helvetica", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["where", FontFamily->"Helvetica", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" z = x+iy.", FontFamily->"Helvetica", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Helvetica", FontColor->RGBColor[0, 0, 0.500008]] }], "Text", FontFamily->"Arial", Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"ComplexExpand", "[", RowBox[{"Im", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}], "+", FractionBox["1", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}]]}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"%", "==", RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}]}]}], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Show that the velocity vector field ", FontFamily->"Arial"], StyleBox["v", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" is divergence-free.", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{"Div", "[", RowBox[{"v", "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "]"}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["This implies that the vector field ", FontFamily->"Arial"], StyleBox["w = ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["-", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["v", "2"], TraditionalForm]]], StyleBox[",v", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["", "1"], TraditionalForm]], FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[") is irrotational. Check this.", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"-", RowBox[{"v2", "[", RowBox[{"x", ",", "y"}], "]"}]}], ",", RowBox[{"v1", "[", RowBox[{"x", ",", "y"}], "]"}], ",", "0"}], "}"}]}], "\[IndentingNewLine]", RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Curl", "[", RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}]}], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["According to vector analysis the vector field ", FontFamily->"Arial"], StyleBox["w", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" therefore has a potential ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["s", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[", which is said to be the ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["stream function", FontFamily->"Arial", FontWeight->"Bold", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" of ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["v", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[". Below we shall actually construct such a potential ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["s", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[". Check that ", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["s", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox[" as defined above indeed is a solution.", FontFamily->"Arial", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Grad", "[", RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}], "-", RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}]}], "]"}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["A ", FontFamily->"Arial"], "streamline", StyleBox[" for v is a function ", FontFamily->"Arial"], StyleBox["t \[RightArrow] ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(t", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["), y", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["))", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[" satisfying ", FontFamily->"Arial"], StyleBox["x'", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[")", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["=", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["v", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["", "1"], TraditionalForm]], FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(t", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["), y", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["))", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[" ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["and", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[" y'", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[")", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["=", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["v", FontFamily->"Arial", FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ SubscriptBox["", "2"], TraditionalForm]], FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(t", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["), y", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["(", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["))", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["; ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["in other words", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox[", ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["it is an integral curve for the vector field ", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], StyleBox["v. ", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["This terminology is explained by the following fact:\n \ ", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}], Cell[BoxData[ FormBox[ StyleBox[ FractionBox["ds", "dt"], FontSize->18], TraditionalForm]], FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[",y", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")) ", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["= ", FontSize->16], Cell[BoxData[ FormBox[ StyleBox[ FractionBox[ RowBox[{"\[PartialD]", "s"}], RowBox[{"\[PartialD]", "x"}]], FontSize->18], TraditionalForm]], FontSize->16], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[",y", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox["))", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[" x'", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[") ", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["+ ", FontSize->16, FontSlant->"Italic"], Cell[BoxData[ FormBox[ StyleBox[ FractionBox[ RowBox[{"\[PartialD]", "s"}], RowBox[{"\[PartialD]", "y"}]], FontSize->18], TraditionalForm]], FontSize->16], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[",y", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox["))", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[" y'", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[") ", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["= ", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["-", FontFamily->"Arial", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[0.0195315, 0.17969, 0.55079]], Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["v", "2"], SubscriptBox["v", "1"]}], TraditionalForm]], FontSize->16], StyleBox["+", FontSize->16], Cell[BoxData[ FormBox[ SubscriptBox["v", "1"], TraditionalForm]], FontSize->16], Cell[BoxData[ FormBox[ SubscriptBox["v", "2"], TraditionalForm]], FontSize->16], StyleBox[")(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox[",y", FontSize->16, FontSlant->"Italic"], StyleBox["(", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["t", FontSize->16, FontSlant->"Italic"], StyleBox[")) ", FontSize->16, FontVariations->{"CompatibilityType"->0}], StyleBox["= 0.\n", FontSize->16], StyleBox["Prove this by ", FontFamily->"Arial"], StyleBox["Mathematica", FontSlant->"Italic"], StyleBox[".", FontSize->16, FontSlant->"Italic"], StyleBox[" ", FontSize->16], StyleBox["In fact, this means that the ", FontFamily->"Arial"], "streamline", StyleBox["s are contained within the level curves of the stream function. ", FontFamily->"Arial"], StyleBox[" ", FontSize->16] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"s", "[", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}]}], "]"}], ",", "t"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], ",", "x"}], "]"}], "\[Rule]", RowBox[{"-", RowBox[{"v2", "[", RowBox[{"x", ",", "y"}], "]"}]}]}], ",", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], ",", "y"}], "]"}], "\[Rule]", RowBox[{"v1", "[", RowBox[{"x", ",", "y"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "\[Rule]", RowBox[{"v1", "[", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}]}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "->", RowBox[{"v2", "[", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}]}], "]"}]}]}], "}"}]}], "]"}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Now we want to determine", FontVariations->{"CompatibilityType"->0}], StyleBox[" s. ", FontSlant->"Italic"], StyleBox["Two approaches are possible: \n (i) solution of the differential \ equations", FontVariations->{"CompatibilityType"->0}], StyleBox[" s ", FontSlant->"Italic"], StyleBox["has to satisfy;\n(ii) applying a well-known formula from vector \ calculus for", FontVariations->{"CompatibilityType"->0}], StyleBox[" s. \n", FontSlant->"Italic"], StyleBox["We begin with the first method. ", FontVariations->{"CompatibilityType"->0}], StyleBox["Mathematica", FontSlant->"Italic"], " is not capable of solving simultaneously the two differential equations \ that the potential ", StyleBox["s ", FontSlant->"Italic"], StyleBox["has to satisfy; it is of the opinion that it is dealing with an \ overdetermined system, despite the fact that the integrability conditions are \ satisfied. Therefore, solve these equations consecutively, starting with the \ one which prescribes the partial derivative of ", FontVariations->{"CompatibilityType"->0}], StyleBox["s", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" with respect to the variable ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[". ", FontVariations->{"CompatibilityType"->0}] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{" ", RowBox[{ RowBox[{"sol1", "=", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"ssx", "[", RowBox[{"x", ",", "y"}], "]"}]}], "\[Equal]", RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ",", RowBox[{"ssx", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}], "//", "Flatten"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sx", "[", RowBox[{"x", ",", "y"}], "]"}], "=", RowBox[{ RowBox[{ RowBox[{"ssx", "[", RowBox[{"x", ",", "y"}], "]"}], "/.", "sol1"}], "/.", RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", "c"}]}]}], "\[IndentingNewLine]", " ", RowBox[{"sol2", "=", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"sx", "[", RowBox[{"x", ",", "y"}], "]"}]}], "\[Equal]", RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ",", " ", RowBox[{"c", "[", "y", "]"}], ",", " ", "y"}], "]"}], "//", "Flatten"}]}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"s", "[", RowBox[{"x", ",", "y"}], "]"}], "=", RowBox[{ RowBox[{ RowBox[{"sx", "[", RowBox[{"x", ",", "y"}], "]"}], "/.", "sol2"}], "/.", RowBox[{ RowBox[{"C", "[", "1", "]"}], "\[Rule]", "0"}]}]}]}]}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["For the second method one usually integrates components of the \ vector field ", FontVariations->{"CompatibilityType"->0}], StyleBox["w", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" along a line from the origin to ", FontVariations->{"CompatibilityType"->0}], StyleBox["(", FontVariations->{"CompatibilityType"->0}], StyleBox["x,y", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[")", FontVariations->{"CompatibilityType"->0}], StyleBox[". The singularity of the vector field at the origin affects the \ convergence of the integral, and therefore ", FontVariations->{"CompatibilityType"->0}], StyleBox["Mathematica", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox[" cannot evaluate this integral. Instead we would have to integrate \ along a broken line parallel to the coordinate axes. Note that ", FontVariations->{"CompatibilityType"->0}], StyleBox["w ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["vanishes along the ", FontVariations->{"CompatibilityType"->0}], StyleBox["x", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["-axis, which makes the latter integral convergent.", FontVariations->{"CompatibilityType"->0}] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"sss", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"Integrate", "[", " ", RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"t", ",", "0"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "x"}], "}"}], ",", RowBox[{"Assumptions", "->", RowBox[{"{", RowBox[{"x", "\[Element]", "Reals"}], "}"}]}]}], "]"}], "+", RowBox[{"Integrate", "[", " ", RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "t"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], " ", ",", " ", RowBox[{"{", RowBox[{"t", ",", "0", ",", "y"}], "}"}], ",", RowBox[{"Assumptions", "->", RowBox[{"{", RowBox[{ RowBox[{"y", "\[Element]", "Reals"}], ",", RowBox[{"x", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"Apart", "[", RowBox[{"sss", "[", RowBox[{"x", ",", "y"}], "]"}], "]"}]}], "Input", CellChangeTimes->{{3.416911280859621*^9, 3.4169113150670567`*^9}, { 3.416911361678658*^9, 3.41691139514039*^9}, {3.416911490608076*^9, 3.416911502014822*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["From the results above we know already that the geometry of the ", FontVariations->{"CompatibilityType"->0}], StyleBox["complex-analytic function", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["jou(", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["z", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[") ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["= ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], Cell[BoxData[ FormBox[ RowBox[{ FractionBox["1", "2"], "("}], TraditionalForm]]], StyleBox["z+", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], Cell[BoxData[ FormBox[ FractionBox["1", "z"], TraditionalForm]]], StyleBox["), ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["for ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["z = x+iy, ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["plays a dominant role in this problem; it is called the Joukowski \ function. In the current context the function 2 jou is", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["called the ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["complex potential ", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["of the flow.", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" Consider this function ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["w", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" as a mapping of the complex plane into itself and study the image \ under the mapping of a family of concentric circles about the origin and a \ family of lines through the origin. Note that the images are a family of \ ellipses and a family of branches of hyperbolae, while these families are ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["confocal", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[", that is, they all share the same foci. Furthermore, the families \ are mutually perpendicular. \n\n", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["We now make a movie", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]] }], "Text", CellChangeTimes->{{3.416912114318542*^9, 3.416912137606263*^9}}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"pc", "[", RowBox[{"{", RowBox[{"r_", ",", "\[Alpha]_"}], "}"}], "]"}], ":=", RowBox[{"r", " ", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "\[Alpha]", "]"}], ",", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{ RowBox[{"jou", "[", RowBox[{"{", RowBox[{"x_", ",", "y_"}], "}"}], "]"}], ":=", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"{", RowBox[{ RowBox[{"x", "+", FractionBox["x", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]]}], ",", RowBox[{"y", "-", FractionBox["y", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]]}]}], "}"}]}]}], " ", ";"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"joupc", "[", RowBox[{"{", RowBox[{"r_", ",", "\[Alpha]_"}], "}"}], "]"}], ":=", RowBox[{"jou", "[", RowBox[{"pc", "[", RowBox[{"{", RowBox[{"r", ",", "\[Alpha]"}], "}"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"id", "=", "Identity"}], ";", RowBox[{"aut", "=", "Automatic"}], ";", RowBox[{"no", "=", "None"}], " ", ";", RowBox[{"p1", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"pc", "[", RowBox[{"{", RowBox[{"r", ",", "\[Alpha]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"r", ",", "1", ",", "4", ",", FractionBox["1", "3"]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"\[Alpha]", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"Axes", "\[Rule]", "no"}]}], "]"}]}], " ", ";"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"p2", "[", "n_", "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"pc", "[", RowBox[{"{", RowBox[{"r", ",", "\[Alpha]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"\[Alpha]", ",", "0", ",", FractionBox[ RowBox[{"n", " ", "\[Pi]"}], "8"], ",", FractionBox["\[Pi]", "48"]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"r", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"Axes", "\[Rule]", "no"}]}], "]"}]}], ";", RowBox[{"p3", "=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"2", " ", RowBox[{"joupc", "[", RowBox[{"{", RowBox[{"r", ",", "\[Alpha]"}], "}"}], "]"}]}], ",", RowBox[{"{", RowBox[{"r", ",", "1", ",", "4", ",", FractionBox["1", "3"]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"\[Alpha]", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"Axes", "\[Rule]", "no"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"p4", "[", "n_", "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"2", " ", RowBox[{"joupc", "[", RowBox[{"{", RowBox[{"r", ",", "\[Alpha]"}], "}"}], "]"}]}], ",", RowBox[{"{", RowBox[{"\[Alpha]", ",", "0", ",", FractionBox[ RowBox[{"n", " ", "\[Pi]"}], "8"], ",", FractionBox["\[Pi]", "48"]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"r", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"Axes", "\[Rule]", "no"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "id"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"q1", "[", "n_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{"p1", ",", RowBox[{"p2", "[", "n", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"q2", "[", "n_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{"p3", ",", RowBox[{"p4", "[", "n", "]"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "4.4`"}], ",", "4.4`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "4.2`"}], ",", "4.2`"}], "}"}]}], "}"}]}]}], "]"}]}], " ", ";", RowBox[{"joumovie", ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"q1", "[", "n", "]"}], ",", RowBox[{"q2", "[", "n", "]"}]}], "}"}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "700"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "16"}], "}"}]}], "]"}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ListAnimate", "[", RowBox[{"(", "joumovie", ")"}], "]"}], " "}]}], "Input", CellChangeTimes->{{3.416911560805335*^9, 3.416911720046208*^9}, { 3.416911786646072*^9, 3.416911799246612*^9}, {3.41691183804506*^9, 3.41691207291925*^9}, {3.416912159288533*^9, 3.4169121603422956`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{ StyleBox["In", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["study", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["fluid", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["flow", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["in", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["space", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["along", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["a", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["cylinder", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["an", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["important", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["role", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["is", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["played", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["by", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[ RowBox[{ StyleBox["complex", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008]], "\[Dash]", StyleBox["analytic", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008]]}]], StyleBox[" ", FontFamily->"Arial", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["function", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["z", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]]}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["\[RightTeeArrow]", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[ RowBox[{ StyleBox[ RowBox[{ FormBox[ FractionBox["1", "2"], TraditionalForm], RowBox[{ StyleBox["(", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], RowBox[{ StyleBox["z", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox["+", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], FractionBox["1", "z"]}], StyleBox[")", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]]}]}], FontSlant->"Plain"], StyleBox["-", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[ RowBox[{ StyleBox["ik", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], StyleBox["log", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Italic"], RowBox[{ StyleBox["z", FontSlant->"Italic"], StyleBox[".", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], StyleBox["Here", FontSlant->"Plain"]}], StyleBox[" ", FontSlant->"Plain"], StyleBox["z", FontSlant->"Plain"]}], FontColor->RGBColor[0, 0, 0.500008]]}], FontFamily->"Arial", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}]}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["=", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], RowBox[{ StyleBox["x", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["+", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], RowBox[{ StyleBox["iy", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["and", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["k", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["is", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["a", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["real", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[ RowBox[{"parameter", ".", " ", "\[IndentingNewLine]", "We"}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["consider", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["situation", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["in", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["real", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox[ RowBox[{ StyleBox["plane", FontColor->RGBColor[0, 0, 0.500008]], StyleBox[".", FontColor->RGBColor[0, 0, 0.500008]], "\[IndentingNewLine]", StyleBox[" ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"(", "i", ")"}], FontColor->RGBColor[0.0156252, 0.191409, 0.55079]]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Determine", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["corresponding", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["potential", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ SubscriptBox["p", "k"], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"(", StyleBox[ RowBox[{"x", ",", "y"}], FontSlant->"Italic"], ")"}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["and", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["stream", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["function", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ SubscriptBox["s", "k"], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{ RowBox[{"(", StyleBox[ RowBox[{"x", ",", "y"}], FontSlant->"Italic"], ")"}], ".", " ", "\[IndentingNewLine]", " ", RowBox[{"(", "ii", ")"}]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Verify", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["both", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["potential", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["and", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["stream", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["function", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["satisfy", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"Laplace", "'"}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["s", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"equation", ".", " ", "\[IndentingNewLine]", " ", RowBox[{"(", "iii", ")"}]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Verify", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["level", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["curves", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["potential", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["have", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["a", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["point", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["in", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["common", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["with", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["unit", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["circle", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["are", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["perpendicular", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", "Text", FontFamily->"Arial", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["to", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["unit", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"circle", ".", "\[IndentingNewLine]", " ", RowBox[{"(", "iv", ")"}]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ StyleBox[ RowBox[{ StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", "Text"]}]], FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Verify", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["unit", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["circle", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["is", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["a", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["level", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["curve", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["stream", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"function", ".", "\[IndentingNewLine]", " ", RowBox[{"(", "v", ")"}]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Verify", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["level", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["curves", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["potential", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["and", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["stream", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["function", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["are", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["mutually", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["perpendicular", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{"everywhere", ".", " ", "\[IndentingNewLine]", " ", RowBox[{"(", "vi", ")"}]}], FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Determine", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["critical", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["points", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["stream", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["function", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["in", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["dependance", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["of", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["the", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["parameter", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[ RowBox[{ StyleBox["k", FontSlant->"Italic"], StyleBox[".", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["Note", FontSlant->"Plain"]}], FontFamily->"Arial", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["that", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["given", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["k", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["there", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["exist", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["two", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["distinct", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["solutions", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]]}]}]}], StyleBox[",", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], RowBox[{ StyleBox[ RowBox[{ StyleBox["except", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["for", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["k", FontSlant->"Italic"]}], FontFamily->"Arial", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["=", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["1.", FontFamily->"Arial", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], " "}]}]], Background->RGBColor[0.832044, 0.996109, 0.832044]], "\n (vii) Prove that the potential vanishes at the critical points \ of the stream function. These points are said to be the ", StyleBox["stagnation points", FontWeight->"Bold"], " of the flow. Explain this terminology. \n The \ corresponding stream lines usually display interesting behavior." }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Off", "[", RowBox[{"Solve", "::", "dinv"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ComplexExpand", "[", " ", RowBox[{"Re", "[", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}], "+", FractionBox["1", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}]]}], ")"}]}], "-", RowBox[{"k", " ", "\[ImaginaryI]", " ", RowBox[{"Log", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}]}]}], "]"}], "]"}], " ", RowBox[{"(*", " ", RowBox[{ "potential", " ", "as", " ", "real", " ", "part", " ", "of", " ", "complex", " ", "function"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ComplexExpand", "[", " ", RowBox[{"Im", "[", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}], "+", FractionBox["1", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}]]}], ")"}]}], "-", RowBox[{"k", " ", "\[ImaginaryI]", " ", RowBox[{"Log", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}]}]}], "]"}], "]"}], " ", RowBox[{"(*", " ", RowBox[{ "stream", " ", "function", " ", "as", " ", "imaginary", " ", "part", " ", "of", " ", "complex", " ", "function"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"p", "[", "k_", "]"}], "[", RowBox[{"x_", ",", "y_", ",", "z_"}], "]"}], ":=", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", RowBox[{"x", "+", FractionBox["x", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]]}], ")"}]}], "+", RowBox[{"k", " ", RowBox[{"ArcTan", "[", FractionBox["y", "x"], "]"}]}]}]}], " ", RowBox[{"(*", " ", "potential", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"s", "[", "k_", "]"}], "[", RowBox[{"x_", ",", "y_", ",", "z_"}], "]"}], ":=", RowBox[{ FractionBox["1", "2"], RowBox[{"(", RowBox[{"y", "-", FractionBox["y", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}]], "-", RowBox[{"k", " ", RowBox[{"Log", "[", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "]"}]}]}], ")"}]}]}], " ", RowBox[{"(*", " ", RowBox[{"stream", " ", "function"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetCoordinates", "[", RowBox[{"Cartesian", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"Laplacian", "[", RowBox[{ RowBox[{"p", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], " ", "]"}], " \ ", RowBox[{"(*", " ", RowBox[{"potential", " ", "satisfies", " ", "Laplace", " ", "equation"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"Laplacian", "[", RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], " ", "]"}], " \ ", RowBox[{"(*", " ", RowBox[{ "stream", " ", "function", " ", "satisfies", " ", "Laplace", " ", "equation"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Grad", "[", RowBox[{ RowBox[{"p", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], ".", RowBox[{"{", RowBox[{"x", ",", "y", ",", "0"}], "}"}]}], "]"}], "/.", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "\[Rule]", "1"}]}], " ", RowBox[{"(*", " ", RowBox[{ "level", " ", "curves", " ", "of", " ", "potential", " ", "perpendicular", " ", "to", " ", "unit", " ", "circle"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "/.", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "\[Rule]", "1"}]}], " \ ", RowBox[{"(*", " ", RowBox[{ "unit", " ", "circle", " ", "is", " ", "level", " ", "curve", " ", "of", " ", "stream", " ", "function"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Grad", "[", RowBox[{ RowBox[{"p", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], ".", RowBox[{"Grad", "[", RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}]}], "]"}], " ", RowBox[{"(*", " ", RowBox[{ "level", " ", "curves", " ", "of", " ", "potential", " ", "and", " ", "stream", " ", "function", " ", "are", " ", "perpendicular"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Grad", "[", RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crits", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Grad", "[", RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"Grad", "[", RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{ "critical", " ", "points", " ", "of", " ", "stream", " ", "function"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Grad", "[", RowBox[{ RowBox[{"p", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"valp", "[", "j_", "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"Grad", "[", RowBox[{ RowBox[{"p", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], "]"}], "/.", RowBox[{ "crits", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{ "value", " ", "of", " ", "velocity", " ", "vector", " ", "field", " ", "at", " ", "critical", " ", "point", " ", "of", " ", "stream", " ", "function"}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"valp", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "4"}], "}"}]}], "]"}]}], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Next create plots of the flow lines for values of the parameter ", FontFamily->"Arial"], StyleBox["k", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" running between 0 and 1 in steps of 0.1. This might be achieved \ by the following. Note that the two stagnation points belong to the unit \ circle and coalesce for ", FontFamily->"Arial"], StyleBox["k", FontFamily->"Arial", FontSlant->"Italic"], StyleBox["=1.\n\n", FontFamily->"Arial"], StyleBox["Another movie.", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]] }], "Text", CellChangeTimes->{{3.416912265385915*^9, 3.41691227469742*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"contlist0", "[", RowBox[{"d_", ",", "n_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"j", " ", "d"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"-", "n"}], ",", "n"}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"streamplot0", "[", RowBox[{"k_", ",", "d_", ",", "n_"}], "]"}], ":=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1.5`"}], ",", "1.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "1.4`"}], ",", "2"}], "}"}]}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"PlotPoints", "\[Rule]", "10"}], ",", RowBox[{"Contours", "\[Rule]", RowBox[{"contlist0", "[", RowBox[{"d", ",", "n"}], "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{"N", "[", "k", "]"}], "]"}]}], ",", RowBox[{"FontSize", "\[Rule]", "13"}]}], "]"}]}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}]}], "\n", RowBox[{ RowBox[{"streammovie0", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"streamplot0", "[", RowBox[{"k", ",", "0.02`", ",", "120"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "0.98`"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "600"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "1", ",", FractionBox["1", "10"]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"ListAnimate", "[", "streammovie0", "]"}]}], "Input", CellChangeTimes->{{3.416912313505945*^9, 3.41691239942019*^9}, 3.4169125010061607`*^9, {3.416912875618786*^9, 3.4169128787500057`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Consider the flow lines for the value of the parameter ", FontFamily->"Arial"], StyleBox["k", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" equal to 1 in a very small neighborhood of the point (0,1) on \ the unit circle. Furthermore, make a plot of the graph of the stream \ function and of its absolute value. It is clear from the plots that ", FontFamily->"Arial"], StyleBox["Mathematica", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" has difficulties drawing correctly the stream lines near critical \ points; this is a consequence of the flatness of a function near its critical \ points. ", FontFamily->"Arial"] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"streamplot1", "=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "0.001`"}], ",", "0.001`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0.999`", ",", "1.001`"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"PlotPoints", "\[Rule]", "30"}], ",", RowBox[{"Contours", "\[Rule]", RowBox[{"contlist0", "[", RowBox[{"1.`*^-11", ",", "50"}], "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"streamplot1", ",", RowBox[{"ImageSize", "\[Rule]", "600"}]}], "]"}], "\n", RowBox[{ RowBox[{"ps", "=", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "0.001`"}], ",", "0.001`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0.999`", ",", "1.001`"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotPoints", "\[Rule]", "51"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\< x \>\"", ",", "\"\< y \>\""}], "}"}]}], ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "2", ",", "0.7`"}], "}"}]}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"ps", ",", RowBox[{"ImageSize", "\[Rule]", "600"}]}], "]"}], "\n", RowBox[{ RowBox[{"pps", "=", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"s", "[", "1", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "0.001`"}], ",", "0.001`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0.999`", ",", "1.001`"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotPoints", "\[Rule]", "51"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\< x \>\"", ",", "\"\< y \>\"", ",", "\"\< z \>\""}], "}"}]}], ",", RowBox[{"ViewPoint", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "2", ",", "0.7`"}], "}"}]}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"pps", ",", RowBox[{"ImageSize", "\[Rule]", "600"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{{3.41691272235271*^9, 3.4169128486033773`*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Finally create plots of the flow lines for values of the parameter \ ", FontFamily->"Arial"], StyleBox["k", FontFamily->"Arial", FontSlant->"Italic"], StyleBox[" running between 1 and 1.4 in steps of 0.05. Now the stagnation \ point moves away from the unit circle, into the exterior of the disk. Make \ sure that the stream line to which it belongs is included in the plots. Note \ that in this case fluid may make a full turn around the cylinder. The plots \ might be achieved by the following code. \n\n", FontFamily->"Arial"], StyleBox["Movie", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]] }], "Text", CellChangeTimes->{{3.4169129370466843`*^9, 3.416912941732058*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"sc", "[", "k_", "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{ "crits", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"contlist2", "[", RowBox[{"k_", ",", "n_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"sc", "[", "k", "]"}], "+", FractionBox["j", "100"]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"-", "n"}], ",", "n"}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"streamplot2", "[", RowBox[{"k_", ",", "n_"}], "]"}], ":=", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{ RowBox[{"s", "[", "k", "]"}], "[", RowBox[{"x", ",", "y", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1.5`"}], ",", "1.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "1.1`"}], ",", "2.5`"}], "}"}]}], "]"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"ColorFunction", "\[Rule]", "Hue"}], ",", RowBox[{"PlotPoints", "\[Rule]", "15"}], ",", RowBox[{"Contours", "\[Rule]", RowBox[{"contlist2", "[", RowBox[{"k", ",", "n"}], "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "False"}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{"N", "[", "k", "]"}], "]"}]}], ",", RowBox[{"FontSize", "\[Rule]", "13"}]}], "]"}]}]}], "]"}]}], ";", RowBox[{"streammovie2", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"streamplot2", "[", RowBox[{"k", ",", "500"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "1", ",", "0"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "0.99`"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "600"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1.05`", ",", "1.4`", ",", "0.05`"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ListAnimate", "[", "streammovie2", "]"}]}], "Input", CellChangeTimes->{{3.41691294956634*^9, 3.4169130715918694`*^9}, { 3.416913170600212*^9, 3.416913171110189*^9}}, FontColor->RGBColor[0, 0, 0.500008], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ RowBox[{"strip", "[", "p_", "]"}], ":=", RowBox[{ RowBox[{"Apply", "[", RowBox[{"Sequence", ",", "p"}], "]"}], " ", "needed", " ", "for", " ", "defining", " ", "the", " ", "composition", " ", "of", " ", "two", " ", "functions"}]}], " ", "*)"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Examples of Conformal Mappings", "Subtitle", Background->RGBColor[0.835294, 1, 0.835294]], Cell[TextData[{ StyleBox["We develop a ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], " module for plotting the images under complex-analytic mappings. " }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lightblue", "=", RowBox[{"RGBColor", "[", RowBox[{ RowBox[{"220", "/", "256"}], ",", RowBox[{"248", "/", "256"}], ",", RowBox[{"248", "/", "256"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"gridImage", "::", "usage"}], ":=", "\"\\""}], " "}], "\[IndentingNewLine]", RowBox[{"?", "gridImage"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gridImage", "[", RowBox[{"f_", ",", RowBox[{"{", RowBox[{"x_", ",", "xmin_", ",", "xmax_", ",", "xdi_"}], "}"}], ",", RowBox[{"{", RowBox[{"y_", ",", "ymin_", ",", "ymax_", ",", "ydi_"}], "}"}], ",", "opts___Rule"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "gr", "}"}], ",", RowBox[{ RowBox[{"gr", "=", RowBox[{"Union", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", RowBox[{"0.1", "+", RowBox[{"0.9", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "xmin"}], ")"}], "/", RowBox[{"(", RowBox[{"xmax", "-", "xmin"}], ")"}]}]}]}], "]"}], ",", RowBox[{"Cases", "[", RowBox[{ RowBox[{"ParametricPlot", "[", RowBox[{"f", ",", RowBox[{"{", RowBox[{"y", ",", "ymin", ",", "ymax"}], "}"}], ",", "opts", ",", RowBox[{"Compiled", "\[Rule]", "False"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}], ",", "_Line", ",", "Infinity"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", "xmax", ",", "xdi"}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", RowBox[{"0.1", "+", RowBox[{"0.9", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "ymin"}], ")"}], "/", RowBox[{"(", RowBox[{"ymax", "-", "ymin"}], ")"}]}]}]}], "]"}], ",", RowBox[{"Cases", "[", RowBox[{ RowBox[{"ParametricPlot", "[", RowBox[{"f", ",", RowBox[{"{", RowBox[{"x", ",", "xmin", ",", "xmax"}], "}"}], ",", "opts", ",", RowBox[{"Compiled", "\[Rule]", "False"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}]}], "]"}], ",", "_Line", ",", "Infinity"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "ymin", ",", "ymax", ",", "ydi"}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"Graphics", "[", RowBox[{"gr", ",", "opts", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"Background", "\[Rule]", "lightblue"}], ",", RowBox[{"ImageSize", "\[Rule]", "800"}]}], "]"}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"toCart", "[", "z_", "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"Re", "[", "z", "]"}], ",", RowBox[{"Im", "[", "z", "]"}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"complexListGridPlot", "[", RowBox[{"f_List", ",", "more__"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"gridImage", "[", RowBox[{ RowBox[{"toCart", "[", "#", "]"}], ",", "more"}], "]"}], "&"}], "/@", "f"}]}], "\[IndentingNewLine]", RowBox[{" ", RowBox[{ RowBox[{"par", "[", RowBox[{"r_", ",", "a_"}], "]"}], ":=", RowBox[{"r", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "a"}]], " "}]}]}]}], "Input", CellChangeTimes->{{3.416913197340857*^9, 3.416913228609117*^9}, { 3.4169133775339317`*^9, 3.416913388269362*^9}, {3.416913493206367*^9, 3.416913538644902*^9}}, FontFamily->"Courier New", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["First some simple applications.", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], " " }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"gridImage", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1", ",", ".005"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "1", ",", ".005"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"gridImage", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1", ",", ".002"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "1", ",", ".001"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"gridImage", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1", ",", ".001"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "0", ",", "1", ",", ".001"}], "}"}]}], "]"}]}], "Input",\ CellChangeTimes->{{3.4169133335138597`*^9, 3.41691334915107*^9}}, FontFamily->"Courier New", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["We consider the mapping ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\[RightTeeArrow] ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ SuperscriptBox["e", "z"], TraditionalForm]]], ". It maps the horizontal strip between the lines ", StyleBox["y ", FontSlant->"Italic"], "= 0 and ", StyleBox["y ", FontSlant->"Italic"], "= \[DoubledPi] onto the upper half-plane. " }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"f", "[", "z_", "]"}], ":=", SuperscriptBox["\[ExponentialE]", "z"]}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"f", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3", ",", RowBox[{"\[Pi]", "/", "40"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", "0", ",", "\[Pi]", ",", RowBox[{"\[Pi]", "/", "40"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"f", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2", ",", "0.01"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", "0", ",", "\[Pi]", ",", "0.01"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416913575573935*^9, 3.4169135777894173`*^9}}, FontFamily->"Courier New", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["We consider the mapping ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\[RightTeeArrow] ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ StyleBox[ FractionBox[ StyleBox["1", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], "z"], FontSlant->"Italic"], TraditionalForm]]], ". It maps the exterior of the unit circle onto the interior of the unit \ circle. " }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "f", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "z_", "]"}], ":=", FractionBox["1", "z"]}], ";"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"par", "[", RowBox[{"r", ",", "\[Phi]"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"par", "[", RowBox[{"r", ",", "\[Phi]"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", "1", ",", "4", ",", RowBox[{"1", "/", "16"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"\[Phi]", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]", ",", RowBox[{"\[Pi]", "/", "48"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"par", "[", RowBox[{"r", ",", "\[Phi]"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"par", "[", RowBox[{"r", ",", "\[Phi]"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", "1", ",", "4", ",", "0.04"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"\[Phi]", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]", ",", "0.04"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.4169137477337914`*^9, 3.416913760498384*^9}}, FontFamily->"Courier New", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[""], "Input"], Cell[TextData[{ StyleBox["We consider the mapping ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\[RightTeeArrow] ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ StyleBox[ FractionBox[ RowBox[{"z", "-", "i"}], RowBox[{"z", "+", "i"}]], FontSlant->"Italic"], TraditionalForm]]], ". It maps the upper half-plane onto the unit disk. " }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "f", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "z_", "]"}], ":=", FractionBox[ RowBox[{"z", "-", "\[ImaginaryI]"}], RowBox[{"z", "+", "\[ImaginaryI]"}]]}], ";"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", "0", ",", "6", ",", RowBox[{"1", "/", "16"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"a", ",", "0", ",", "\[Pi]", ",", RowBox[{"\[Pi]", "/", "48"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", "0", ",", "6", ",", "0.04"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"a", ",", "0", ",", "\[Pi]", ",", "0.04"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416913810143051*^9, 3.416913816733728*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Here is another example of a conformal map. It maps the upper \ half-plane onto the union of the positive quadrant and the infinite strip of \ width \[DoubledPi] along the negative ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["real axis. ", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["It is given by \n ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" \[RightTeeArrow] ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ RowBox[{ RowBox[{"2", " ", SqrtBox[ StyleBox["z", FontSlant->"Italic"]]}], "+", RowBox[{"log", RowBox[{"(", FractionBox[ RowBox[{ SqrtBox[ StyleBox["z", FontSlant->"Italic"]], "-", "1"}], RowBox[{ SqrtBox[ StyleBox["z", FontSlant->"Italic"]], "+", "1"}]], ")"}]}]}]]], ".\n", StyleBox["There exist methods due to Christoffel and Schwarz for finding \ such mappings with prescribed properties. ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{"Clear", "[", "f", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", "z_", "]"}], ":=", RowBox[{ RowBox[{"2", SqrtBox["z"]}], "+", RowBox[{"Log", "[", FractionBox[ RowBox[{ SqrtBox["z"], "-", "1"}], RowBox[{ SqrtBox["z"], "+", "1"}]], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"1", "+", RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}]}], ",", RowBox[{"f", "[", RowBox[{"1", "+", RowBox[{"par", "[", RowBox[{ SuperscriptBox["r", "2"], ",", "a"}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", RowBox[{"1", "/", "1000"}], ",", "3", ",", "0.05"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"a", ",", "0", ",", "\[Pi]", ",", RowBox[{"\[Pi]", "/", "48"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"complexListGridPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"1", "+", RowBox[{"par", "[", RowBox[{"r", ",", "a"}], "]"}]}], ",", RowBox[{"f", "[", RowBox[{"1", "+", RowBox[{"par", "[", RowBox[{ SuperscriptBox["r", "2"], ",", "a"}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", " ", "0.01", ",", "3", ",", "0.01"}], "}"}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", "\[Pi]", ",", "0.01"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.416913831711865*^9, 3.4169138331514683`*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["The boundary of the image is singular at the point ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["f ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["(0) = \[Pi] \[ImaginaryI]. In order to understand the behavior of \ ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["f", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" near 0, determine a series expansion of ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["f", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" in powers of ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z.", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[ RowBox[{"Series", "[", RowBox[{ RowBox[{"f", "[", "z", "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "2"}], "}"}]}], "]"}]], "Input", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[TextData[{ StyleBox["Write a ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" program displaying the conformal property of your favorite \ complex-analytic function ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["w", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" at a point ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["z", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["=", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["x+iy", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[" of your choice belonging to the domain of ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["w", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox[". \n\nWe know that w is conformal if ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["w", FontSlant->"Italic"], "'(", StyleBox["z", FontSlant->"Italic"], ") \[NotEqual] 0. The function ", StyleBox["z ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\[RightTeeArrow] ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], Cell[BoxData[ FormBox[ SuperscriptBox["z", "2"], TraditionalForm]]], " at ", StyleBox["z ", FontSlant->"Italic"], "= 0 is a standard counter example. Indeed, in that case the argument of \ points belonging to the image of a curve starting from 0 equals twice that of \ points belonging to the original curve. The first increasing angle in the \ plot arises by plotting two line segments issuing from the point ", StyleBox["z ", FontSlant->"Italic"], StyleBox["of your choice", FontVariations->{"CompatibilityType"->0}], StyleBox[". ", FontSlant->"Italic"], " One of these is horizontal and the second points in a direction that \ increases by steps of ", Cell[BoxData[ FormBox[ FractionBox["\[Pi]", "10"], TraditionalForm]]], ". Adjacent to that the images of the line segments are being plotted \ issuing from the point ", StyleBox["w", FontSlant->"Italic"], "(", StyleBox["z", FontSlant->"Italic"], "). Generally these images are curves, but by making the scale enough ", StyleBox["Mathematica", FontSlant->"Italic"], " will render these as line segments. Because the local stretching of the \ image is determined by |", StyleBox["w", FontSlant->"Italic"], "' (", StyleBox["z", FontSlant->"Italic"], ")|, that number is being used in setting the scale factor.\n", StyleBox["\n", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["Conformality is not automatic at points where the derivative \ vanishes, as is demonstrated now.\n", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["\n", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]], StyleBox["Movie.", FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0, 0, 0.500008]] }], "Text", CellChangeTimes->{{3.416913864043947*^9, 3.416913869009574*^9}, { 3.4169145299515953`*^9, 3.416914534277688*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"w", "[", "z_", "]"}], ":=", SuperscriptBox["z", "2"]}], ";"}], "\n", RowBox[{ RowBox[{"xx", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"yy", "=", "0"}], ";"}], "\n", RowBox[{ RowBox[{"aa", "=", FractionBox["\[Pi]", "10"]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"sscale", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"Abs", "[", RowBox[{ SuperscriptBox["w", "\[Prime]", MultilineFunction->None], "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}], "]"}]}], ";", RowBox[{ RowBox[{"scale", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"sscale", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LessEqual]", "0"}], ",", "0.01`", ",", RowBox[{"0.1`", " ", RowBox[{"sscale", "[", RowBox[{"x", ",", "y"}], "]"}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"ComplexExpand", "[", RowBox[{"Re", "[", RowBox[{"w", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}], "]"}], "]"}], ",", RowBox[{"ComplexExpand", "[", RowBox[{"Im", "[", RowBox[{"w", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}], "]"}], "]"}]}], "}"}]}], ";", RowBox[{ RowBox[{"p", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"l", "[", RowBox[{"x_", ",", "y_", ",", "a_", ",", "t_"}], "]"}], ":=", RowBox[{ RowBox[{"p", "[", RowBox[{"x", ",", "y"}], "]"}], "+", RowBox[{"t", " ", RowBox[{"p", "[", RowBox[{ RowBox[{"Cos", "[", "a", "]"}], ",", RowBox[{"Sin", "[", "a", "]"}]}], "]"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"strip", "[", "p_", "]"}], ":=", RowBox[{"Sequence", "@@", "p"}]}], ";", RowBox[{ RowBox[{"wl", "[", RowBox[{"x_", ",", "y_", ",", "a_", ",", "t_"}], "]"}], ":=", RowBox[{"w", "[", RowBox[{"strip", "[", RowBox[{"l", "[", RowBox[{"x", ",", "y", ",", "a", ",", "t"}], "]"}], "]"}], "]"}]}], ";", RowBox[{ RowBox[{"pp", "[", RowBox[{"x_", ",", "y_", ",", "a_", ",", "k_"}], "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"l", "[", RowBox[{"x", ",", "y", ",", RowBox[{"k", " ", "a"}], ",", "t"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "None"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "-", "1"}], ",", RowBox[{"x", "+", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"y", "-", "1"}], ",", RowBox[{"y", "+", "1"}]}], "}"}]}], "}"}]}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}]}], "\n", RowBox[{ RowBox[{ RowBox[{"qp", "[", RowBox[{"x_", ",", "y_", ",", "a_", ",", "k_"}], "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"wl", "[", RowBox[{"x", ",", "y", ",", RowBox[{"k", " ", "a"}], ",", "t"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "0.1`"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", RowBox[{"scale", "[", RowBox[{"x", ",", "y"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", RowBox[{"scale", "[", RowBox[{"x", ",", "y"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", RowBox[{"scale", "[", RowBox[{"x", ",", "y"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"w", "[", RowBox[{"x", ",", "y"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", RowBox[{"scale", "[", RowBox[{"x", ",", "y"}], "]"}]}]}], "}"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"Axes", "\[Rule]", "None"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";", RowBox[{"p1", "=", RowBox[{"pp", "[", RowBox[{"xx", ",", "yy", ",", "0", ",", "1"}], "]"}]}], ";", RowBox[{ RowBox[{"p2", "[", "k_", "]"}], ":=", RowBox[{"pp", "[", RowBox[{"xx", ",", "yy", ",", "aa", ",", "k"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p3", "=", RowBox[{"qp", "[", RowBox[{"xx", ",", "yy", ",", "0", ",", "1"}], "]"}]}], ";", RowBox[{ RowBox[{"p4", "[", "k_", "]"}], ":=", RowBox[{"qp", "[", RowBox[{"xx", ",", "yy", ",", "aa", ",", "k"}], "]"}]}], ";", RowBox[{ RowBox[{"q1", "[", "k_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{"p1", ",", RowBox[{"p2", "[", "k", "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"q2", "[", "k_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{"p3", ",", RowBox[{"p4", "[", "k", "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";", RowBox[{"movie", ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"q1", "[", "k", "]"}], ",", RowBox[{"q2", "[", "k", "]"}]}], "}"}], "}"}], "]"}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{ "\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{"N", "[", "k", "]"}], "]"}]}], ",", RowBox[{"FontSize", "\[Rule]", "13"}]}], "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"ListAnimate", "[", "movie", "]"}]}], "Input", CellChangeTimes->{{3.416913888576251*^9, 3.416913899157044*^9}, { 3.4169140128683023`*^9, 3.416914056599285*^9}}], Cell[TextData[{ StyleBox["We consider the Kutta-Joukowski mapping, which maps an offset \ circle with center at (", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["c,c", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["), for ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["c ", FontSlant->"Italic", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]], StyleBox["> 0, and passing through (1,0) to an airfoil. ", FontColor->RGBColor[0.0156252, 0.191409, 0.55079]] }], "Text", FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], ";"}], "\n", RowBox[{ RowBox[{"j", "[", "z_", "]"}], ":=", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{"z", "+", FractionBox["1", "z"]}], ")"}]}]}], "\n", RowBox[{ RowBox[{ RowBox[{"j", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"ComplexExpand", "[", RowBox[{"Re", "[", RowBox[{"j", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}], "]"}], "]"}], ",", RowBox[{"ComplexExpand", "[", RowBox[{"Im", "[", RowBox[{"j", "[", RowBox[{"x", "+", RowBox[{"\[ImaginaryI]", " ", "y"}]}], "]"}], "]"}], "]"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"pc", "[", RowBox[{"c_", ",", "r_", ",", "a_"}], "]"}], ":=", RowBox[{ RowBox[{"c", " ", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "+", RowBox[{"{", RowBox[{ RowBox[{"r", " ", RowBox[{"Cos", "[", "a", "]"}]}], ",", RowBox[{"r", " ", RowBox[{"Sin", "[", "a", "]"}]}]}], "}"}]}]}], "\n", RowBox[{ RowBox[{"strip", "[", "p_", "]"}], ":=", RowBox[{"Sequence", "@@", "p"}]}], "\n", RowBox[{ RowBox[{"jpc", "[", RowBox[{"c_", ",", "r_", ",", "a_"}], "]"}], ":=", RowBox[{"j", "[", RowBox[{"strip", "[", RowBox[{"pc", "[", RowBox[{"c", ",", "r", ",", "a"}], "]"}], "]"}], "]"}]}], "\n", RowBox[{ RowBox[{ RowBox[{"r", "[", "c_", "]"}], ":=", SqrtBox[ RowBox[{ SuperscriptBox["c", "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "c"}], ")"}], "2"]}]]}], ";"}], "\n", RowBox[{ RowBox[{"aut", "=", "Automatic"}], ";"}], "\n", RowBox[{ RowBox[{"id", "=", "Identity"}], ";"}], "\n", RowBox[{ RowBox[{"j1", "[", "c_", "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"pc", "[", RowBox[{"c", ",", RowBox[{"r", "[", "c", "]"}], ",", "a"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "id"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"j2", "[", "c_", "]"}], ":=", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"jpc", "[", RowBox[{"c", ",", RowBox[{"r", "[", "c", "]"}], ",", "a"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"a", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"AspectRatio", "\[Rule]", "aut"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "id"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"s1", "[", "c_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"j1", "[", "c", "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "id"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"s2", "[", "c_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"j2", "[", "c", "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "id"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"c", "=", "0.02`"}], ";"}], "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"s1", "[", RowBox[{"n", " ", "c"}], "]"}], ",", RowBox[{"s2", "[", RowBox[{"n", " ", "c"}], "]"}]}], "}"}], "}"}], "]"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "14"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.4169145776231747`*^9, 3.4169145832222233`*^9}}, FontColor->RGBColor[0.0195315, 0.17969, 0.55079], Background->RGBColor[0.832044, 0.996109, 0.832044]] }, Closed]] }, Open ]] }, AutoGeneratedPackage->None, CellGrouping->Manual, WindowSize->{1149, 933}, WindowMargins->{{-1, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, ShowSelection->True, ShowCellTags->True, SpellingDictionaries->{"CorrectWords"->{ "tableprimes", "plotprimes", "lfit", "plotlfit", "qfit", "plotqfit", "amatrix", "amatrix.", "myfit", "plotmyfit", "cmatrix", "cinverse", "bvector", "qfun", "yv", "fvector", "yvector", "xvector", "pfun", "xv", "varvector", "var"}}, AnimationDisplayTime->0.1, FontColor->RGBColor[0, 0, 0.501961], Background->RGBColor[0.835294, 1, 0.835294], FrontEndVersion->"6.0 for Linux x86 (64-bit) (April 20, 2007)", StyleDefinitions->Notebook[{ Cell[ CellGroupData[{ Cell["Style Definitions", "Subtitle"], Cell[ "Modify the definitions below to change the default appearance of all \ cells in a given style. Make modifications to any definition using commands \ in the Format menu.", "Text"], Cell[ CellGroupData[{ Cell["Style Environment Names", "Section"], Cell[ StyleData[All, "Working"], PageWidth -> WindowWidth, ScriptMinSize -> 9], Cell[ StyleData[All, "Presentation"], PageWidth -> WindowWidth, ScriptMinSize -> 12, FontSize -> 16], Cell[ StyleData[All, "Condensed"], PageWidth -> WindowWidth, CellBracketOptions -> {"Margins" -> {1, 1}, "Widths" -> {0, 5}}, ScriptMinSize -> 8, FontSize -> 11], Cell[ StyleData[All, "Printout"], PageWidth -> PaperWidth, ScriptMinSize -> 5, FontSize -> 10, PrivateFontOptions -> {"FontType" -> "Outline"}]}, Open]], Cell[ CellGroupData[{ Cell["Notebook Options", "Section"], Cell[ "The options defined for the style below will be used at the \ Notebook level.", "Text"], Cell[ StyleData["Notebook"], PageHeaders -> {{ Cell[ TextData[{ CounterBox["Page"]}], "PageNumber"], None, Cell[ TextData[{ ValueBox["FileName"]}], "Header"]}, { Cell[ TextData[{ ValueBox["FileName"]}], "Header"], None, Cell[ TextData[{ CounterBox["Page"]}], "PageNumber"]}}, CellFrameLabelMargins -> 6, StyleMenuListing -> None]}, Open]], Cell[ CellGroupData[{ Cell["Custom styles for UCU 311", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Matica"], CellFrame -> 1, CellDingbat -> None, CellMargins -> {{12, 5}, {10, 10}}, CellGroupingRules -> {"SectionGrouping", 50}, PageBreakBelow -> False, CounterIncrements -> "Matica", FontWeight -> "Bold", FontColor -> GrayLevel[0.500008], Background -> RGBColor[1, 0.919997, 0.700008]], Cell[ StyleData["Matica", "Presentation"], CellMargins -> {{34, 10}, {11, 26}}, LineSpacing -> {1, 0}, FontSize -> 18], Cell[ StyleData["Matica", "Condensed"], CellMargins -> {{17, Inherited}, {6, 12}}, FontSize -> 10], Cell[ StyleData["Matica", "Printout"], CellMargins -> {{9, 0}, {7, 14}}, FontSize -> 11]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Exercise"], CellFrame -> 1, CellMargins -> {{12, 10}, {6, 6}}, LineSpacing -> {1, 3}, CounterIncrements -> "Exercise", FontFamily -> "Helvetica", FontSize -> 16, FontColor -> GrayLevel[1], Background -> RGBColor[1, 0, 0]], Cell[ StyleData["Exercise", "Presentation"], CellMargins -> {{24, 10}, {8, 8}}, LineSpacing -> {1, 5}, FontSize -> 12], Cell[ StyleData["Exercise", "Condensed"], CellMargins -> {{8, 10}, {5, 5}}, LineSpacing -> {1, 2}, FontSize -> 12], Cell[ StyleData["Exercise", "Printout"], CellMargins -> {{2, 2}, {5, 5}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Answer"], CellFrame -> 1, CellMargins -> {{12, 10}, {6, 6}}, LineSpacing -> {1, 3}, CounterIncrements -> "Exercise", FontFamily -> "Helvetica", FontSize -> 16, FontColor -> GrayLevel[0], Background -> RGBColor[0.698039, 0.8, 1]], Cell[ StyleData["Answer", "Presentation"], CellMargins -> {{24, 10}, {8, 8}}, LineSpacing -> {1, 5}, FontSize -> 12], Cell[ StyleData["Answer", "Condensed"], CellMargins -> {{8, 10}, {5, 5}}, LineSpacing -> {1, 2}, FontSize -> 12], Cell[ StyleData["Answer", "Printout"], CellMargins -> {{2, 2}, {5, 5}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Comments"], CellFrame -> 1, CellMargins -> {{12, 10}, {6, 6}}, LineSpacing -> {1, 3}, CounterIncrements -> "Exercise", FontFamily -> "Helvetica", FontSize -> 16, FontColor -> GrayLevel[0], Background -> RGBColor[0.415686, 0.823529, 0.509804]], Cell[ StyleData["Comments", "Presentation"], CellMargins -> {{24, 10}, {8, 8}}, LineSpacing -> {1, 5}, FontSize -> 12], Cell[ StyleData["Comments", "Condensed"], CellMargins -> {{8, 10}, {5, 5}}, LineSpacing -> {1, 2}, FontSize -> 12], Cell[ StyleData["Comments", "Printout"], CellMargins -> {{2, 2}, {5, 5}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Grading"], CellFrame -> 1, CellMargins -> {{12, 10}, {6, 6}}, LineSpacing -> {1, 3}, CounterIncrements -> "Exercise", FontFamily -> "Helvetica", FontSize -> 16, FontColor -> GrayLevel[0], Background -> RGBColor[0.996002, 0.770001, 0.452995]], Cell[ StyleData["Grading", "Presentation"], CellMargins -> {{24, 10}, {8, 8}}, LineSpacing -> {1, 5}, FontSize -> 12], Cell[ StyleData["Grading", "Condensed"], CellMargins -> {{8, 10}, {5, 5}}, LineSpacing -> {1, 2}, FontSize -> 12], Cell[ StyleData["Grading", "Printout"], CellMargins -> {{2, 2}, {5, 5}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["InputAnswer"], CellMargins -> {{45, 10}, {5, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, CounterIncrements -> "Input", FontSize -> 12, FontWeight -> "Bold", FontColor -> GrayLevel[0], Background -> RGBColor[0.698039, 0.8, 1]], Cell[ StyleData["InputAnswer", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}, Background -> RGBColor[0.698039, 0.8, 1]], Cell[ StyleData["InputAnswer", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}, Background -> RGBColor[0.698039, 0.8, 1]], Cell[ StyleData["InputAnswer", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, FontSize -> 9, Background -> RGBColor[0.698039, 0.8, 1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["InputComments"], CellMargins -> {{45, 10}, {5, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, CounterIncrements -> "Input", FontSize -> 12, FontWeight -> "Bold", FontColor -> GrayLevel[0], Background -> RGBColor[0.415686, 0.823529, 0.509804]], Cell[ StyleData["InputComments", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}], Cell[ StyleData["InputComments", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}], Cell[ StyleData["InputComments", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["InputGrading"], CellMargins -> {{45, 10}, {5, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, CounterIncrements -> "Input", FontSize -> 12, FontWeight -> "Bold", FontColor -> GrayLevel[0], Background -> RGBColor[0.996002, 0.770001, 0.452995]], Cell[ StyleData["InputGrading", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}], Cell[ StyleData["InputGrading", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}], Cell[ StyleData["InputGrading", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, FontSize -> 9]}, Closed]]}, Open]], Cell[ CellGroupData[{ Cell["Styles for Headings", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Title"], CellMargins -> {{12, Inherited}, {20, 40}}, CellGroupingRules -> {"TitleGrouping", 0}, PageBreakBelow -> False, CounterIncrements -> "Title", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}, {"Subtitle", 0}, {"Subsubtitle", 0}}, FontFamily -> "Helvetica", FontSize -> 36, FontWeight -> "Bold", FontColor -> GrayLevel[1], Background -> RGBColor[1, 0, 0]], Cell[ StyleData["Title", "Presentation"], CellMargins -> {{24, 10}, {20, 40}}, LineSpacing -> {1, 0}, FontSize -> 44], Cell[ StyleData["Title", "Condensed"], CellMargins -> {{8, 10}, {4, 8}}, FontSize -> 20], Cell[ StyleData["Title", "Printout"], CellMargins -> {{2, 10}, {15, 30}}, FontSize -> 24]}, Open]], Cell[ CellGroupData[{ Cell[ StyleData["Subtitle"], CellMargins -> {{12, Inherited}, {10, 15}}, CellGroupingRules -> {"TitleGrouping", 10}, PageBreakBelow -> False, CounterIncrements -> "Subtitle", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}, {"Subsubtitle", 0}}, FontFamily -> "Helvetica", FontSize -> 24], Cell[ StyleData["Subtitle", "Presentation"], CellMargins -> {{24, 10}, {15, 20}}, LineSpacing -> {1, 0}, FontSize -> 36], Cell[ StyleData["Subtitle", "Condensed"], CellMargins -> {{8, 10}, {4, 4}}, FontSize -> 14], Cell[ StyleData["Subtitle", "Printout"], CellMargins -> {{2, 10}, {10, 15}}, FontSize -> 18]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsubtitle"], CellMargins -> {{12, Inherited}, {10, 20}}, CellGroupingRules -> {"TitleGrouping", 20}, PageBreakBelow -> False, CounterIncrements -> "Subsubtitle", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}}, FontFamily -> "Helvetica", FontSize -> 14, FontSlant -> "Italic"], Cell[ StyleData["Subsubtitle", "Presentation"], CellMargins -> {{24, 10}, {10, 20}}, LineSpacing -> {1, 0}, FontSize -> 24], Cell[ StyleData["Subsubtitle", "Condensed"], CellMargins -> {{8, 10}, {8, 12}}, FontSize -> 12], Cell[ StyleData["Subsubtitle", "Printout"], CellMargins -> {{2, 10}, {8, 10}}, FontSize -> 14]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Section"], CellDingbat -> "\[FilledSquare]", CellMargins -> {{25, Inherited}, {8, 24}}, CellGroupingRules -> {"SectionGrouping", 30}, PageBreakBelow -> False, CounterIncrements -> "Section", CounterAssignments -> {{"Subsection", 0}, {"Subsubsection", 0}}, FontFamily -> "Helvetica", FontSize -> 16, FontWeight -> "Bold"], Cell[ StyleData["Section", "Presentation"], CellMargins -> {{40, 10}, {11, 32}}, LineSpacing -> {1, 0}, FontSize -> 24], Cell[ StyleData["Section", "Condensed"], CellMargins -> {{18, Inherited}, {6, 12}}, FontSize -> 12], Cell[ StyleData["Section", "Printout"], CellMargins -> {{13, 0}, {7, 22}}, FontSize -> 14]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsection"], CellDingbat -> None, CellMargins -> {{22, Inherited}, {8, 20}}, CellGroupingRules -> {"SectionGrouping", 40}, PageBreakBelow -> False, CounterIncrements -> "Subsection", CounterAssignments -> {{"Subsubsection", 0}}, FontSize -> 14, FontWeight -> "Bold"], Cell[ StyleData["Subsection", "Presentation"], CellMargins -> {{36, 10}, {11, 32}}, LineSpacing -> {1, 0}, FontSize -> 22], Cell[ StyleData["Subsection", "Condensed"], CellMargins -> {{16, Inherited}, {6, 12}}, FontSize -> 12], Cell[ StyleData["Subsection", "Printout"], CellMargins -> {{9, 0}, {7, 22}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsubsection"], CellDingbat -> "\[FilledSmallSquare]", CellMargins -> {{22, Inherited}, {8, 18}}, CellGroupingRules -> {"SectionGrouping", 50}, PageBreakBelow -> False, CounterIncrements -> "Subsubsection", FontWeight -> "Bold"], Cell[ StyleData["Subsubsection", "Presentation"], CellMargins -> {{34, 10}, {11, 26}}, LineSpacing -> {1, 0}, FontSize -> 18], Cell[ StyleData["Subsubsection", "Condensed"], CellMargins -> {{17, Inherited}, {6, 12}}, FontSize -> 10], Cell[ StyleData["Subsubsection", "Printout"], CellMargins -> {{9, 0}, {7, 14}}, FontSize -> 11]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Styles for Body Text", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Text"], CellMargins -> {{12, 10}, {7, 7}}, LineSpacing -> {1, 3}, CounterIncrements -> "Text", FontFamily -> "Helvetica", FontSize -> 16], Cell[ StyleData["Text", "Presentation"], CellMargins -> {{24, 10}, {10, 10}}, LineSpacing -> {1, 5}], Cell[ StyleData["Text", "Condensed"], CellMargins -> {{8, 10}, {6, 6}}, LineSpacing -> {1, 1}], Cell[ StyleData["Text", "Printout"], CellMargins -> {{2, 2}, {6, 6}}]}, Open]]}, Open]], Cell[ CellGroupData[{ Cell["Styles for Input/Output", "Section"], Cell[ "The cells in this section define styles used for input and output \ to the kernel. Be careful when modifying, renaming, or removing these \ styles, because the front end associates special meanings with these style \ names.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Input"], CellMargins -> {{45, 10}, {5, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, CounterIncrements -> "Input", FontSize -> 12, FontWeight -> "Bold", FontColor -> GrayLevel[0]], Cell[ StyleData["Input", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}], Cell[ StyleData["Input", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}], Cell[ StyleData["Input", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, FontSize -> 9]}, Closed]], Cell[ StyleData["InputOnly"], Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, DefaultFormatType -> DefaultInputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, CounterIncrements -> "Input", StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ CellGroupData[{ Cell[ StyleData["Output"], CellMargins -> {{47, 10}, {7, 5}}, CellEditDuplicate -> True, CellGroupingRules -> "OutputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultOutputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, CounterIncrements -> "Output"], Cell[ StyleData["Output", "Presentation"], CellMargins -> {{72, Inherited}, {10, 8}}, LineSpacing -> {1, 0}], Cell[ StyleData["Output", "Condensed"], CellMargins -> {{41, Inherited}, {3, 2}}], Cell[ StyleData["Output", "Printout"], CellMargins -> {{39, 0}, {6, 4}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Message"], CellMargins -> {{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "OutputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultOutputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, CounterIncrements -> "Message", StyleMenuListing -> None, FontColor -> RGBColor[0, 0, 1]], Cell[ StyleData["Message", "Presentation"], CellMargins -> {{72, Inherited}, {Inherited, Inherited}}, LineSpacing -> {1, 0}], Cell[ StyleData["Message", "Condensed"], CellMargins -> {{41, Inherited}, {Inherited, Inherited}}], Cell[ StyleData["Message", "Printout"], CellMargins -> {{39, Inherited}, {Inherited, Inherited}}, FontSize -> 8, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Print"], CellMargins -> {{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "OutputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, CellLabelMargins -> {{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultOutputFormatType, AutoItalicWords -> {}, FormatType -> InputForm, CounterIncrements -> "Print", StyleMenuListing -> None], Cell[ StyleData["Print", "Presentation"], CellMargins -> {{72, Inherited}, {Inherited, Inherited}}, LineSpacing -> {1, 0}], Cell[ StyleData["Print", "Condensed"], CellMargins -> {{41, Inherited}, {Inherited, Inherited}}], Cell[ StyleData["Print", "Printout"], CellMargins -> {{39, Inherited}, {Inherited, Inherited}}, FontSize -> 8]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Graphics"], CellMargins -> {{4, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, DefaultFormatType -> DefaultOutputFormatType, FormatType -> InputForm, CounterIncrements -> "Graphics", ImageMargins -> {{43, Inherited}, {Inherited, 0}}, StyleMenuListing -> None], Cell[ StyleData["Graphics", "Presentation"], ImageMargins -> {{62, Inherited}, {Inherited, 0}}], Cell[ StyleData["Graphics", "Condensed"], ImageSize -> {175, 175}, ImageMargins -> {{38, Inherited}, {Inherited, 0}}], Cell[ StyleData["Graphics", "Printout"], ImageSize -> {250, 250}, ImageMargins -> {{30, Inherited}, {Inherited, 0}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["CellLabel"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 9, FontColor -> RGBColor[0, 0, 1]], Cell[ StyleData["CellLabel", "Presentation"], FontSize -> 12], Cell[ StyleData["CellLabel", "Condensed"], FontSize -> 9], Cell[ StyleData["CellLabel", "Printout"], FontFamily -> "Courier", FontSize -> 8, FontSlant -> "Italic", FontColor -> GrayLevel[0]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Formulas and Programming", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["InlineFormula"], CellMargins -> {{10, 4}, {0, 8}}, CellHorizontalScrolling -> True, ScriptLevel -> 1, SingleLetterItalics -> True], Cell[ StyleData["InlineFormula", "Presentation"], CellMargins -> {{24, 10}, {10, 10}}, LineSpacing -> {1, 5}], Cell[ StyleData["InlineFormula", "Condensed"], CellMargins -> {{8, 10}, {6, 6}}, LineSpacing -> {1, 1}], Cell[ StyleData["InlineFormula", "Printout"], CellMargins -> {{2, 0}, {6, 6}}]}, Open]], Cell[ CellGroupData[{ Cell[ StyleData["DisplayFormula"], CellMargins -> {{42, Inherited}, {Inherited, Inherited}}, CellHorizontalScrolling -> True, ScriptLevel -> 0, SingleLetterItalics -> True, StyleMenuListing -> None, UnderoverscriptBoxOptions -> {LimitsPositioning -> True}], Cell[ StyleData["DisplayFormula", "Presentation"], LineSpacing -> {1, 5}], Cell[ StyleData["DisplayFormula", "Condensed"], LineSpacing -> {1, 1}], Cell[ StyleData["DisplayFormula", "Printout"]]}, Open]]}, Closed]], Cell[ CellGroupData[{ Cell["Styles for Headers and Footers", "Section"], Cell[ StyleData["Header"], CellMargins -> {{0, 0}, {4, 1}}, StyleMenuListing -> None, FontSize -> 10, FontSlant -> "Italic"], Cell[ StyleData["Footer"], CellMargins -> {{0, 0}, {0, 4}}, StyleMenuListing -> None, FontSize -> 9, FontSlant -> "Italic"], Cell[ StyleData["PageNumber"], CellMargins -> {{0, 0}, {4, 1}}, StyleMenuListing -> None, FontFamily -> "Times", FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell["Palette Styles", "Section"], Cell[ "The cells below define styles that define standard ButtonFunctions, \ for use in palette buttons.", "Text"], Cell[ StyleData["Paste"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, After]}]& )}], Cell[ StyleData["Evaluate"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], SelectionEvaluate[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["EvaluateCell"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionMove[ FrontEnd`InputNotebook[], All, Cell, 1], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["CopyEvaluate"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionEvaluate[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["CopyEvaluateCell"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[], All]}]& )}]}, Closed]], Cell[ CellGroupData[{ Cell["Hyperlink Styles", "Section"], Cell[ "The cells below define styles useful for making hypertext \ ButtonBoxes. The \"Hyperlink\" style is for links within the same Notebook, \ or between Notebooks.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Hyperlink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookLocate[#2]}]& ), ButtonNote -> ButtonData}], Cell[ StyleData["Hyperlink", "Presentation"]], Cell[ StyleData["Hyperlink", "Condensed"]], Cell[ StyleData["Hyperlink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ "The following styles are for linking automatically to the on-line \ help system.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["MainBookLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFrame -> "None", ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["MainBook", #]}]& )}], Cell[ StyleData["MainBookLink", "Presentation"]], Cell[ StyleData["MainBookLink", "Condensed"]], Cell[ StyleData["MainBookLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["AddOnsLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontFamily -> "Courier", FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFrame -> "None", ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["AddOns", #]}]& )}], Cell[ StyleData["AddOnsLink", "Presentation"]], Cell[ StyleData["AddOnsLink", "Condensed"]], Cell[ StyleData["AddOnLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["RefGuideLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontFamily -> "Courier", FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFrame -> "None", ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["RefGuideLink", #]}]& )}], Cell[ StyleData["RefGuideLink", "Presentation"]], Cell[ StyleData["RefGuideLink", "Condensed"]], Cell[ StyleData["RefGuideLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["GettingStartedLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFrame -> "None", ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["GettingStarted", #]}]& )}], Cell[ StyleData["GettingStartedLink", "Presentation"]], Cell[ StyleData["GettingStartedLink", "Condensed"]], Cell[ StyleData["GettingStartedLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["OtherInformationLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0, 0, 1], ButtonBoxOptions -> { Active -> True, ButtonFrame -> "None", ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["OtherInformation", #]}]& )}], Cell[ StyleData["OtherInformationLink", "Presentation"]], Cell[ StyleData["OtherInformationLink", "Condensed"]], Cell[ StyleData["OtherInformationLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Placeholder Styles", "Section"], Cell[ "The cells below define styles useful for making placeholder objects \ in palette templates.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Placeholder"], Editable -> False, Selectable -> False, StyleBoxAutoDelete -> True, Placeholder -> True, StyleMenuListing -> None], Cell[ StyleData["Placeholder", "Presentation"]], Cell[ StyleData["Placeholder", "Condensed"]], Cell[ StyleData["Placeholder", "Printout"]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SelectionPlaceholder"], Editable -> False, Selectable -> False, StyleBoxAutoDelete -> True, Placeholder -> PrimaryPlaceholder, StyleMenuListing -> None, DrawHighlighted -> True], Cell[ StyleData["SelectionPlaceholder", "Presentation"]], Cell[ StyleData["SelectionPlaceholder", "Condensed"]], Cell[ StyleData["SelectionPlaceholder", "Printout"]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["FormatType Styles", "Section"], Cell[ "The cells below define styles that are mixed in with the styles of \ most cells. If a cell's FormatType matches the name of one of the styles \ defined below, then that style is applied between the cell's style and its \ own options.", "Text"], Cell[ StyleData["CellExpression"], PageWidth -> Infinity, CellMargins -> {{6, Inherited}, {Inherited, Inherited}}, ShowCellLabel -> False, ShowSpecialCharacters -> False, AllowInlineCells -> False, AutoItalicWords -> {}, StyleMenuListing -> None, FontFamily -> "Courier", Background -> GrayLevel[1]], Cell[ StyleData["InputForm"], AllowInlineCells -> False, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["OutputForm"], PageWidth -> Infinity, TextAlignment -> Left, LineSpacing -> {1, -5}, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["StandardForm"], LineSpacing -> {1.25, 0}, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["TraditionalForm"], LineSpacing -> {1.25, 0}, SingleLetterItalics -> True, TraditionalFunctionNotation -> True, DelimiterMatching -> None, StyleMenuListing -> None], Cell[ "The style defined below is mixed in to any cell that is in an \ inline cell within another.", "Text"], Cell[ StyleData["InlineCell"], TextAlignment -> Left, ScriptLevel -> 1, StyleMenuListing -> None], Cell[ StyleData["InlineCellEditing"], StyleMenuListing -> None, Background -> RGBColor[1, 0.749996, 0.8]]}, Closed]]}, Open]]}, Visible -> False, FrontEndVersion -> "6.0 for Linux x86 (64-bit) (April 20, 2007)", StyleDefinitions -> "Default.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "UCU311"->{ Cell[129608, 4205, 1252, 33, 226, "Text", CellTags->"UCU311"], Cell[208403, 6384, 272, 8, 76, "Text", CellTags->"UCU311"], Cell[208678, 6394, 596, 18, 102, "Input", CellTags->"UCU311"], Cell[209277, 6414, 1954, 64, 244, "Exercise", CellTags->"UCU311"], Cell[368729, 11333, 52, 1, 51, "Text", CellTags->"UCU311"]}, "Comment"->{ Cell[320100, 9890, 254, 5, 92, "Comments", CellTags->"Comment"], Cell[386024, 11890, 397, 12, 92, "Comments", CellTags->"Comment"], Cell[394161, 12148, 238, 5, 92, "Comments", CellTags->"Comment"], Cell[411873, 12656, 366, 7, 117, "Comments", CellTags->"Comment"]} } *) (*CellTagsIndex CellTagsIndex->{ {"UCU311", 821428, 25147}, {"Comment", 821781, 25158} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 113, 1, 167, "Title"], Cell[706, 26, 931, 27, 461, "Comments"], Cell[1640, 55, 1249, 24, 432, "Comments"], Cell[CellGroupData[{ Cell[2914, 83, 34, 0, 56, "Subtitle"], Cell[2951, 85, 157, 3, 61, "Text"], Cell[3111, 90, 163, 4, 29, "Input", InitializationCell->True], Cell[3277, 96, 1573, 46, 162, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[4887, 147, 36, 0, 45, "Subtitle"], Cell[4926, 149, 392, 12, 86, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[5355, 166, 33, 0, 45, "Subtitle"], Cell[CellGroupData[{ Cell[5413, 170, 219, 8, 47, "Subsection"], Cell[5635, 180, 515, 10, 111, "Text"], Cell[6153, 192, 123, 6, 36, "Text"], Cell[6279, 200, 200, 6, 52, "Input"], Cell[6482, 208, 231, 9, 36, "Text"], Cell[6716, 219, 51, 1, 29, "Input"], Cell[6770, 222, 1489, 53, 161, "Text"], Cell[8262, 277, 182, 6, 29, "Input"], Cell[8447, 285, 132, 4, 29, "Input"], Cell[8582, 291, 64, 1, 29, "Input"], Cell[8649, 294, 64, 1, 29, "Input"], Cell[8716, 297, 88, 2, 29, "Input"], Cell[8807, 301, 107, 3, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[8951, 309, 85, 1, 31, "Subsection"], Cell[9039, 312, 1657, 59, 111, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[10733, 376, 146, 5, 34, "Section"], Cell[10882, 383, 867, 32, 63, "Text"], Cell[11752, 417, 509, 16, 52, "Input"], Cell[12264, 435, 612, 19, 61, "Text"], Cell[12879, 456, 421, 14, 74, "Input"], Cell[13303, 472, 1280, 43, 61, "Text"], Cell[14586, 517, 592, 16, 140, "Input"], Cell[15181, 535, 841, 23, 61, "Text"], Cell[16025, 560, 465, 15, 74, "Input"], Cell[16493, 577, 667, 17, 86, "Text"], Cell[17163, 596, 541, 17, 74, "Input"], Cell[17707, 615, 104, 3, 36, "Text"], Cell[17814, 620, 157, 4, 62, "Input"], Cell[17974, 626, 201, 7, 36, "Text"], Cell[18178, 635, 266, 5, 29, "Input"], Cell[18447, 642, 519, 12, 111, "Text"], Cell[18969, 656, 44, 1, 29, "Input"], Cell[19016, 659, 44, 1, 29, "Input"], Cell[19063, 662, 44, 1, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19144, 668, 35, 0, 34, "Section"], Cell[19182, 670, 155, 3, 61, "Text"], Cell[19340, 675, 201, 6, 29, "Input"], Cell[19544, 683, 93, 2, 36, "Text"], Cell[19640, 687, 210, 5, 29, "Input"], Cell[19853, 694, 220, 7, 61, "Text"], Cell[20076, 703, 177, 5, 29, "Input"], Cell[20256, 710, 51, 0, 36, "Text"], Cell[20310, 712, 228, 6, 29, "Input"], Cell[20541, 720, 58, 0, 36, "Text"], Cell[20602, 722, 215, 6, 29, "Input"], Cell[20820, 730, 53, 0, 36, "Text"], Cell[20876, 732, 227, 6, 29, "Input"], Cell[21106, 740, 137, 3, 36, "Text"], Cell[21246, 745, 160, 3, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[21443, 753, 39, 0, 34, "Section"], Cell[21485, 755, 88, 2, 36, "Text"], Cell[21576, 759, 1176, 39, 96, "Input"], Cell[22755, 800, 777, 21, 74, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[23569, 826, 38, 0, 34, "Section"], Cell[23610, 828, 552, 10, 136, "Text"], Cell[24165, 840, 296, 9, 29, "Input"], Cell[24464, 851, 799, 24, 90, "Text"], Cell[25266, 877, 466, 14, 52, "Input"], Cell[25735, 893, 453, 11, 52, "Input"], Cell[26191, 906, 366, 10, 77, "Exercise"], Cell[26560, 918, 136, 4, 36, "Text"], Cell[26699, 924, 146, 3, 52, "Input"], Cell[26848, 929, 137, 4, 52, "Exercise"], Cell[26988, 935, 166, 3, 61, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[27191, 943, 100, 2, 34, "Section"], Cell[27294, 947, 1169, 35, 65, "Text"], Cell[28466, 984, 735, 14, 173, "Input"], Cell[29204, 1000, 1874, 61, 65, "Text"], Cell[31081, 1063, 837, 19, 227, "Input"], Cell[31921, 1084, 294, 9, 61, "Text"], Cell[32218, 1095, 1179, 23, 317, "Input"], Cell[33400, 1120, 162, 4, 36, "Text"], Cell[33565, 1126, 5889, 153, 316, "Input", CellID->782405762], Cell[39457, 1281, 567, 9, 74, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[40073, 1296, 68, 0, 45, "Subtitle"], Cell[CellGroupData[{ Cell[40166, 1300, 71, 2, 55, "Section"], Cell[CellGroupData[{ Cell[40262, 1306, 102, 1, 47, "Subsection"], Cell[40367, 1309, 272, 5, 86, "Text"], Cell[40642, 1316, 553, 17, 52, "Input"], Cell[41198, 1335, 104, 2, 29, "Input"], Cell[41305, 1339, 166, 4, 29, "Input"], Cell[41474, 1345, 157, 6, 36, "Text"], Cell[41634, 1353, 1155, 34, 52, "Input"], Cell[42792, 1389, 170, 6, 36, "Text"], Cell[42965, 1397, 704, 18, 52, "Input"], Cell[43672, 1417, 327, 9, 29, "Input"], Cell[44002, 1428, 57, 0, 36, "Text"], Cell[44062, 1430, 298, 10, 29, "Input"], Cell[44363, 1442, 116, 5, 36, "Text"], Cell[44482, 1449, 373, 11, 29, "Input"], Cell[44858, 1462, 283, 9, 61, "Text"], Cell[45144, 1473, 197, 5, 52, "Input"], Cell[45344, 1480, 61, 0, 36, "Text"], Cell[45408, 1482, 201, 7, 52, "Exercise"], Cell[45612, 1491, 659, 26, 54, "Exercise"], Cell[46274, 1519, 184, 7, 52, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[46495, 1531, 95, 1, 47, "Subsection"], Cell[46593, 1534, 160, 3, 61, "Text"], Cell[46756, 1539, 198, 4, 29, "Input"], Cell[46957, 1545, 1622, 44, 74, "Input"], Cell[48582, 1591, 40, 0, 36, "Text"], Cell[48625, 1593, 443, 13, 29, "Input"], Cell[49071, 1608, 353, 11, 29, "Input"], Cell[49427, 1621, 392, 12, 29, "Input"], Cell[49822, 1635, 234, 7, 77, "Exercise"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[50105, 1648, 48, 0, 54, "Section"], Cell[50156, 1650, 4653, 175, 579, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[54846, 1830, 38, 0, 54, "Section"], Cell[54887, 1832, 128, 3, 36, "Text"], Cell[55018, 1837, 602, 19, 96, "Input"], Cell[55623, 1858, 85, 2, 36, "Text"], Cell[55711, 1862, 99, 4, 52, "Exercise"], Cell[55813, 1868, 124, 3, 29, "Input"], Cell[55940, 1873, 154, 4, 52, "Exercise"], Cell[56097, 1879, 59, 0, 36, "Text"], Cell[56159, 1881, 425, 15, 79, "Exercise"], Cell[56587, 1898, 96, 2, 29, "Input"], Cell[56686, 1902, 31, 0, 36, "Text"], Cell[56720, 1904, 264, 9, 29, "Input"], Cell[56987, 1915, 69, 0, 36, "Text"], Cell[57059, 1917, 203, 6, 50, "Input"], Cell[57265, 1925, 118, 3, 36, "Text"], Cell[57386, 1930, 317, 11, 52, "Input"], Cell[57706, 1943, 28, 0, 36, "Text"], Cell[57737, 1945, 257, 8, 29, "Input"], Cell[57997, 1955, 460, 19, 63, "Text"], Cell[58460, 1976, 393, 11, 29, "Input"], Cell[58856, 1989, 154, 7, 36, "Text"], Cell[59013, 1998, 218, 6, 29, "Input"], Cell[59234, 2006, 392, 16, 54, "Exercise"], Cell[59629, 2024, 107, 3, 36, "Text"], Cell[59739, 2029, 419, 14, 49, "Input"], Cell[60161, 2045, 57, 1, 35, "Text"], Cell[60221, 2048, 81, 2, 29, "Input"], Cell[60305, 2052, 29, 0, 35, "Text"], Cell[60337, 2054, 63, 1, 29, "Input"], Cell[60403, 2057, 107, 5, 52, "Exercise"], Cell[60513, 2064, 352, 12, 61, "Text"], Cell[60868, 2078, 369, 12, 29, "Input"], Cell[61240, 2092, 186, 6, 29, "Input"], Cell[61429, 2100, 54, 0, 36, "Text"], Cell[61486, 2102, 225, 7, 29, "Input"], Cell[61714, 2111, 656, 30, 63, "Text"], Cell[62373, 2143, 104, 2, 29, "Input"], Cell[62480, 2147, 359, 13, 54, "Exercise"], Cell[62842, 2162, 758, 29, 104, "Exercise"], Cell[63603, 2193, 248, 10, 52, "Exercise"], Cell[63854, 2205, 306, 6, 29, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[64209, 2217, 39, 0, 45, "Subtitle"], Cell[CellGroupData[{ Cell[64273, 2221, 30, 0, 54, "Section"], Cell[64306, 2223, 364, 7, 86, "Text"], Cell[64673, 2232, 553, 17, 52, "Input"], Cell[65229, 2251, 104, 2, 29, "Input"], Cell[65336, 2255, 166, 4, 29, "Input"], Cell[65505, 2261, 157, 6, 36, "Text"], Cell[65665, 2269, 1155, 34, 52, "Input"], Cell[66823, 2305, 170, 6, 36, "Text"], Cell[66996, 2313, 704, 18, 52, "Input"], Cell[67703, 2333, 54, 1, 29, "Input"], Cell[67760, 2336, 325, 9, 29, "Input"], Cell[68088, 2347, 1727, 52, 279, "Exercise"], Cell[69818, 2401, 212, 4, 61, "Text"], Cell[70033, 2407, 286, 6, 29, "Input"], Cell[70322, 2415, 72, 0, 36, "Text"], Cell[70397, 2417, 51, 1, 29, "Input"], Cell[70451, 2420, 142, 4, 36, "Text"], Cell[70596, 2426, 32, 0, 36, "Text"], Cell[70631, 2428, 45, 1, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[70713, 2434, 29, 0, 54, "Section"], Cell[70745, 2436, 255, 10, 36, "Text"], Cell[71003, 2448, 2162, 64, 162, "Input"], Cell[73168, 2514, 323, 12, 36, "Text"], Cell[73494, 2528, 704, 18, 52, "Input"], Cell[74201, 2548, 506, 13, 74, "Input"], Cell[74710, 2563, 651, 22, 63, "Text"], Cell[75364, 2587, 733, 20, 74, "Input"], Cell[76100, 2609, 1050, 42, 90, "Text"], Cell[77153, 2653, 413, 12, 74, "Input"], Cell[77569, 2667, 115, 5, 36, "Text"], Cell[77687, 2674, 515, 13, 52, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[78239, 2692, 30, 0, 54, "Section"], Cell[78272, 2694, 291, 5, 86, "Text"], Cell[78566, 2701, 2284, 68, 162, "Input"], Cell[80853, 2771, 726, 26, 129, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[81616, 2802, 45, 0, 54, "Section"], Cell[81664, 2804, 233, 4, 61, "Text"], Cell[81900, 2810, 85, 2, 29, "Input"], Cell[81988, 2814, 749, 25, 52, "Input"], Cell[82740, 2841, 786, 20, 74, "Input"], Cell[83529, 2863, 415, 8, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[83981, 2876, 73, 2, 55, "Section"], Cell[84057, 2880, 734, 21, 167, "Text"], Cell[84794, 2903, 809, 27, 127, "Exercise"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[85652, 2936, 77, 1, 44, "Subtitle"], Cell[85732, 2939, 1897, 46, 431, "Text"], Cell[87632, 2987, 235, 6, 61, "Text"], Cell[87870, 2995, 5116, 161, 536, "Input"], Cell[92989, 3158, 1085, 21, 203, "Text"], Cell[94077, 3181, 7296, 216, 212, 2676, 138, "GraphicsData", "PostScript", \ "InlineFormula"], Cell[101376, 3399, 497, 10, 136, "Text"], Cell[101876, 3411, 8189, 227, 844, "Input"], Cell[110068, 3640, 198, 4, 61, "Text"], Cell[110269, 3646, 11371, 296, 646, "Input"], Cell[121643, 3944, 974, 37, 87, "Text"], Cell[122620, 3983, 2768, 83, 191, "Input"], Cell[125391, 4068, 201, 5, 77, "Exercise"], Cell[125595, 4075, 190, 4, 61, "Text"], Cell[125788, 4081, 1132, 35, 74, "Input"], Cell[126923, 4118, 589, 25, 61, "Text"], Cell[127515, 4145, 2090, 58, 133, "Input"], Cell[129608, 4205, 1252, 33, 226, "Text", CellTags->"UCU311"], Cell[130863, 4240, 9868, 264, 551, "Input"], Cell[140734, 4506, 676, 21, 61, "Text"], Cell[141413, 4529, 147, 3, 44, "Input"], Cell[141563, 4534, 320, 14, 52, "Exercise"], Cell[141886, 4550, 217, 6, 52, "Exercise"], Cell[142106, 4558, 733, 22, 85, "Text"], Cell[142842, 4582, 12372, 299, 1123, "Input"], Cell[155217, 4883, 741, 27, 106, "Exercise"], Cell[155961, 4912, 408, 9, 100, "Exercise"], Cell[156372, 4923, 319, 12, 36, "Text"], Cell[156694, 4937, 4068, 106, 353, "Input"], Cell[160765, 5045, 1847, 46, 177, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[162649, 5096, 78, 1, 44, "Subtitle"], Cell[162730, 5099, 518, 11, 111, "Text"], Cell[163251, 5112, 10700, 301, 1483, "Input"], Cell[173954, 5415, 280, 6, 77, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[174271, 5426, 77, 1, 44, "Subtitle"], Cell[174351, 5429, 566, 12, 86, "Text"], Cell[174920, 5443, 5205, 144, 918, "Exercise"], Cell[180128, 5589, 125, 5, 36, "Text"], Cell[180256, 5596, 4498, 92, 365, "Input"], Cell[184757, 5690, 946, 25, 95, "Text"], Cell[185706, 5717, 4227, 116, 199, "Input"], Cell[189936, 5835, 943, 14, 111, "Input"], Cell[190882, 5851, 714, 14, 217, "Text"], Cell[191599, 5867, 8938, 288, 167, "InlineFormula"], Cell[200540, 6157, 1555, 48, 177, "Input"], Cell[202098, 6207, 1957, 61, 155, "Input"], Cell[204058, 6270, 4031, 100, 507, "Input"], Cell[208092, 6372, 308, 10, 52, "Exercise"], Cell[208403, 6384, 272, 8, 76, "Text", CellTags->"UCU311"], Cell[208678, 6394, 596, 18, 102, "Input", CellTags->"UCU311"], Cell[209277, 6414, 1954, 64, 244, "Exercise", CellTags->"UCU311"] }, Closed]], Cell[CellGroupData[{ Cell[211268, 6483, 33, 0, 45, "Subtitle"], Cell[CellGroupData[{ Cell[211326, 6487, 70, 2, 55, "Section"], Cell[CellGroupData[{ Cell[211421, 6493, 124, 2, 47, "Subsection"], Cell[211548, 6497, 114, 3, 36, "Text"], Cell[211665, 6502, 2196, 65, 206, "Input"], Cell[213864, 6569, 233, 4, 61, "Text"], Cell[214100, 6575, 348, 11, 29, "Input"], Cell[214451, 6588, 211, 4, 61, "Text"], Cell[214665, 6594, 896, 29, 86, "Text"], Cell[215564, 6625, 1055, 40, 191, "Input"], Cell[216622, 6667, 94, 4, 52, "Exercise"], Cell[216719, 6673, 407, 13, 36, "Text"], Cell[217129, 6688, 936, 26, 29, "Input"], Cell[218068, 6716, 457, 14, 29, "Input"], Cell[218528, 6732, 175, 5, 36, "Text"], Cell[218706, 6739, 289, 8, 74, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[219032, 6752, 95, 1, 47, "Subsection"], Cell[219130, 6755, 169, 3, 61, "Text"], Cell[219302, 6760, 198, 4, 29, "Input"], Cell[219503, 6766, 1622, 44, 74, "Input"], Cell[221128, 6812, 40, 0, 36, "Text"], Cell[221171, 6814, 443, 13, 29, "Input"], Cell[221617, 6829, 353, 11, 29, "Input"], Cell[221973, 6842, 392, 12, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[222402, 6859, 169, 5, 47, "Subsection"], Cell[222574, 6866, 75, 0, 36, "Text"], Cell[222652, 6868, 1054, 32, 96, "Input"], Cell[223709, 6902, 220, 4, 61, "Text"], Cell[223932, 6908, 518, 14, 29, "Input"], Cell[224453, 6924, 450, 12, 102, "Comments"], Cell[224906, 6938, 270, 8, 45, "InputComments"] }, Closed]], Cell[CellGroupData[{ Cell[225213, 6951, 83, 1, 47, "Subsection"], Cell[225299, 6954, 670, 16, 152, "Comments"], Cell[225972, 6972, 659, 22, 52, "Input"], Cell[226634, 6996, 923, 29, 52, "Input"], Cell[227560, 7027, 4983, 137, 162, "Input"], Cell[232546, 7166, 847, 24, 74, "Input"], Cell[233396, 7192, 70, 0, 52, "Comments"], Cell[233469, 7194, 415, 12, 96, "Input"], Cell[233887, 7208, 118, 3, 52, "Comments"], Cell[234008, 7213, 1022, 34, 161, "Input"], Cell[235033, 7249, 191, 5, 61, "Text"], Cell[235227, 7256, 413, 13, 29, "Input"], Cell[235643, 7271, 1934, 63, 229, "Exercise"], Cell[237580, 7336, 171, 5, 52, "Exercise"], Cell[237754, 7343, 275, 5, 102, "Comments"], Cell[238032, 7350, 576, 12, 127, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[238645, 7367, 109, 3, 47, "Subsection"], Cell[238757, 7372, 173, 5, 52, "Exercise"], Cell[238933, 7379, 272, 6, 77, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[239242, 7390, 117, 2, 49, "Subsection"], Cell[239362, 7394, 1085, 21, 203, "Text"], Cell[240450, 7417, 7123, 212, 212, 2413, 131, "GraphicsData", "PostScript", \ "InlineFormula"], Cell[247576, 7631, 763, 19, 187, "Text"], Cell[248342, 7652, 338, 6, 29, "Input"], Cell[248683, 7660, 142, 3, 36, "Text"], Cell[248828, 7665, 5116, 161, 536, "Input"], Cell[253947, 7828, 512, 8, 136, "Text"], Cell[254462, 7838, 2781, 86, 228, "Input"], Cell[257246, 7926, 93, 2, 36, "Text"], Cell[257342, 7930, 8674, 266, 360, "Input"], Cell[266019, 8198, 974, 37, 87, "Text"], Cell[266996, 8237, 2619, 79, 191, "Input"], Cell[269618, 8318, 486, 15, 101, "Exercise"], Cell[270107, 8335, 835, 26, 190, "Exercise"], Cell[270945, 8363, 344, 12, 36, "Text"], Cell[271292, 8377, 4680, 120, 581, "Text"], Cell[275975, 8499, 263, 9, 52, "Exercise"], Cell[276241, 8510, 217, 6, 52, "Exercise"], Cell[276461, 8518, 1342, 46, 155, "Exercise"], Cell[277806, 8566, 177, 6, 52, "Exercise"], Cell[277986, 8574, 322, 12, 36, "Text"], Cell[278311, 8588, 2327, 71, 228, "Input"], Cell[280641, 8661, 1266, 36, 96, "Input"], Cell[281910, 8699, 266, 6, 77, "Exercise"], Cell[282179, 8707, 4398, 122, 693, "Exercise"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[286638, 8836, 49, 0, 45, "Subtitle"], Cell[286690, 8838, 2619, 110, 220, "Text"], Cell[289312, 8950, 4392, 120, 250, "Input"], Cell[293707, 9072, 37, 0, 36, "Text"], Cell[293747, 9074, 608, 21, 184, "Input"], Cell[294358, 9097, 37, 0, 36, "Text"], Cell[294398, 9099, 636, 22, 184, "Input"], Cell[295037, 9123, 92, 2, 36, "Text"], Cell[295132, 9127, 781, 25, 118, "Input"], Cell[295916, 9154, 49, 0, 36, "Text"], Cell[295968, 9156, 795, 25, 184, "Input"], Cell[296766, 9183, 209, 6, 61, "Text"], Cell[296978, 9191, 3749, 103, 228, "Input"], Cell[300730, 9296, 29, 0, 36, "Text"], Cell[300762, 9298, 473, 15, 140, "Input"], Cell[301238, 9315, 29, 0, 36, "Text"], Cell[301270, 9317, 539, 16, 140, "Input"], Cell[301812, 9335, 509, 11, 86, "Text"], Cell[302324, 9348, 1295, 40, 162, "Input"], Cell[303622, 9390, 458, 8, 61, "Text"], Cell[304083, 9400, 1157, 32, 118, "Input"], Cell[305243, 9434, 368, 5, 36, "Text"], Cell[305614, 9441, 1283, 34, 118, "Input"], Cell[306900, 9477, 477, 6, 36, "Text"], Cell[307380, 9485, 880, 26, 29, "Input"], Cell[308263, 9513, 516, 7, 36, "Text"], Cell[308782, 9522, 3435, 103, 228, "Input"], Cell[312220, 9627, 407, 9, 29, "Input"], Cell[312630, 9638, 1620, 46, 167, "Text"], Cell[314253, 9686, 229, 6, 61, "Text"], Cell[314485, 9694, 769, 24, 96, "Input"], Cell[315257, 9720, 56, 0, 36, "Text"], Cell[315316, 9722, 748, 25, 74, "Input"], Cell[316067, 9749, 695, 22, 63, "Text"], Cell[316765, 9773, 750, 28, 111, "Text"], Cell[317518, 9803, 55, 1, 29, "Input"], Cell[317576, 9806, 104, 3, 36, "Text"], Cell[317683, 9811, 92, 2, 29, "Input"], Cell[317778, 9815, 54, 0, 36, "Text"], Cell[317835, 9817, 1628, 49, 52, "Input"], Cell[319466, 9868, 91, 2, 36, "Text"], Cell[319560, 9872, 537, 16, 52, "Input"], Cell[320100, 9890, 254, 5, 92, "Comments", CellTags->"Comment"], Cell[320357, 9897, 135, 4, 36, "Text"], Cell[320495, 9903, 377, 11, 29, "Input"], Cell[320875, 9916, 118, 4, 36, "Text"], Cell[320996, 9922, 429, 12, 29, "Input"], Cell[321428, 9936, 265, 6, 61, "Text"], Cell[321696, 9944, 738, 21, 52, "Input"], Cell[322437, 9967, 177, 6, 36, "Text"], Cell[322617, 9975, 420, 9, 86, "Text"], Cell[323040, 9986, 270, 8, 29, "Input"], Cell[323313, 9996, 272, 8, 29, "Input"], Cell[323588, 10006, 230, 7, 67, "Input"], Cell[323821, 10015, 98, 2, 36, "Text"], Cell[323922, 10019, 466, 13, 44, "Input"], Cell[324391, 10034, 297, 10, 61, "Text"], Cell[324691, 10046, 145, 4, 52, "Exercise"], Cell[324839, 10052, 317, 9, 29, "Input"], Cell[325159, 10063, 248, 6, 77, "Exercise"], Cell[325410, 10071, 357, 10, 61, "Text"], Cell[325770, 10083, 417, 17, 44, "Text"], Cell[326190, 10102, 516, 18, 104, "Exercise"], Cell[326709, 10122, 378, 11, 44, "Input"], Cell[327090, 10135, 331, 9, 77, "Exercise"], Cell[327424, 10146, 609, 20, 102, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[328070, 10171, 45, 0, 45, "Subtitle"], Cell[328118, 10173, 423, 10, 136, "Text"], Cell[328544, 10185, 977, 16, 261, "Text"], Cell[329524, 10203, 39, 0, 36, "Text"], Cell[329566, 10205, 450, 13, 29, "Input"], Cell[330019, 10220, 72, 0, 36, "Text"], Cell[330094, 10222, 2577, 76, 178, "Input"], Cell[332674, 10300, 155, 3, 61, "Text"], Cell[332832, 10305, 13690, 396, 932, "Input"], Cell[346525, 10703, 62, 0, 36, "Text"], Cell[346590, 10705, 3444, 85, 558, "Input"], Cell[350037, 10792, 51, 0, 36, "Text"], Cell[350091, 10794, 2278, 58, 338, "Input"], Cell[352372, 10854, 60, 0, 36, "Text"], Cell[352435, 10856, 4069, 101, 492, "Input"], Cell[356507, 10959, 443, 20, 86, "Text"], Cell[356953, 10981, 371, 11, 86, "Text"], Cell[357327, 10994, 1021, 19, 252, "Exercise"], Cell[358351, 11015, 4872, 137, 602, "Input"], Cell[363226, 11154, 446, 9, 136, "Text"], Cell[363675, 11165, 94, 2, 36, "Text"], Cell[363772, 11169, 734, 22, 74, "Input"], Cell[364509, 11193, 1022, 31, 74, "Input"], Cell[365534, 11226, 385, 10, 52, "Input"], Cell[365922, 11238, 175, 3, 61, "Text"], Cell[366100, 11243, 835, 26, 118, "Input"], Cell[366938, 11271, 502, 15, 29, "Input"], Cell[367443, 11288, 227, 7, 29, "Input"], Cell[367673, 11297, 89, 2, 29, "Input"], Cell[367765, 11301, 141, 3, 36, "Text"], Cell[367909, 11306, 146, 4, 29, "Input"], Cell[368058, 11312, 153, 3, 61, "Text"], Cell[368214, 11317, 512, 14, 52, "Input"], Cell[368729, 11333, 52, 1, 51, "Text", CellTags->"UCU311"], Cell[368784, 11336, 3006, 85, 146, "Input"], Cell[371793, 11423, 91, 2, 52, "Exercise"], Cell[371887, 11427, 94, 2, 36, "Text"], Cell[371984, 11431, 422, 15, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[372443, 11451, 37, 0, 45, "Subtitle"], Cell[372483, 11453, 1482, 53, 111, "Text"], Cell[373968, 11508, 267, 7, 74, "Input"], Cell[374238, 11517, 473, 16, 61, "Text"], Cell[374714, 11535, 986, 30, 52, "Input"], Cell[375703, 11567, 761, 11, 161, "Text"], Cell[376467, 11580, 1133, 35, 169, "Text"], Cell[377603, 11617, 926, 31, 82, "Input"], Cell[378532, 11650, 361, 13, 61, "Text"], Cell[378896, 11665, 294, 11, 74, "Input"], Cell[379193, 11678, 142, 4, 36, "Text"], Cell[379338, 11684, 1097, 28, 140, "Input"], Cell[380438, 11714, 90, 2, 36, "Text"], Cell[380531, 11718, 1366, 44, 106, "Input"], Cell[381900, 11764, 30, 0, 36, "Text"], Cell[381933, 11766, 994, 26, 74, "Input"], Cell[382930, 11794, 3091, 94, 351, "Text"], Cell[386024, 11890, 397, 12, 92, "Comments", CellTags->"Comment"], Cell[386424, 11904, 1385, 42, 52, "Input"], Cell[387812, 11948, 711, 23, 52, "Input"], Cell[388526, 11973, 1241, 42, 288, "Text"], Cell[389770, 12017, 347, 10, 52, "Input"], Cell[390120, 12029, 396, 11, 63, "Text"], Cell[390519, 12042, 305, 8, 29, "Input"], Cell[390827, 12052, 100, 2, 36, "Text"], Cell[390930, 12056, 495, 15, 53, "Input"], Cell[391428, 12073, 436, 9, 111, "Text"], Cell[391867, 12084, 2291, 62, 162, "Input"], Cell[394161, 12148, 238, 5, 92, "Comments", CellTags->"Comment"], Cell[394402, 12155, 568, 23, 61, "Text"], Cell[394973, 12180, 13469, 371, 778, "Input"], Cell[408445, 12553, 50, 0, 36, "Text"], Cell[408498, 12555, 302, 9, 96, "Input"], Cell[408803, 12566, 37, 0, 36, "Text"], Cell[408843, 12568, 119, 3, 52, "Input"], Cell[408965, 12573, 2905, 81, 182, "Input"], Cell[411873, 12656, 366, 7, 117, "Comments", CellTags->"Comment"], Cell[412242, 12665, 178, 3, 77, "Exercise"], Cell[412423, 12670, 69, 0, 52, "Input"], Cell[412495, 12672, 145, 6, 52, "Exercise"], Cell[412643, 12680, 70, 1, 29, "Input"], Cell[412716, 12683, 234, 6, 61, "Text"], Cell[412953, 12691, 333, 8, 102, "Exercise"], Cell[413289, 12701, 537, 14, 86, "Text"], Cell[413829, 12717, 13626, 392, 646, "Input"], Cell[427458, 13111, 172, 6, 36, "Text"], Cell[427633, 13119, 97, 3, 29, "Input"], Cell[427733, 13124, 213, 5, 52, "Exercise"], Cell[427949, 13131, 167, 6, 52, "Exercise"] }, Closed]], Cell[CellGroupData[{ Cell[428153, 13142, 224, 6, 45, "Subtitle"], Cell[428380, 13150, 137, 3, 36, "Text"], Cell[428520, 13155, 526, 12, 81, "Text"], Cell[429049, 13169, 3624, 106, 344, "Input"], Cell[432676, 13277, 105, 1, 35, "Text"], Cell[432784, 13280, 3077, 86, 259, "Input"], Cell[435864, 13368, 96, 2, 33, "Text"], Cell[435963, 13372, 1426, 42, 221, "Input"], Cell[437392, 13416, 111, 2, 33, "Text"], Cell[437506, 13420, 925, 24, 109, "Input"], Cell[438434, 13446, 190, 5, 36, "Text"], Cell[438627, 13453, 998, 29, 89, "Input"], Cell[439628, 13484, 188, 5, 36, "Text"], Cell[439819, 13491, 1455, 41, 175, "Input"], Cell[441277, 13534, 103, 2, 33, "Text"], Cell[441383, 13538, 400, 13, 44, "Input"], Cell[441786, 13553, 259, 10, 36, "Text"], Cell[442048, 13565, 1893, 58, 221, "Input"], Cell[443944, 13625, 161, 3, 33, "Text"], Cell[444108, 13630, 903, 27, 162, "Input"], Cell[445014, 13659, 548, 18, 61, "Text"], Cell[445565, 13679, 3005, 78, 221, "Input"], Cell[CellGroupData[{ Cell[448595, 13761, 152, 2, 44, "Subtitle"], Cell[448750, 13765, 54, 0, 36, "Text"], Cell[448807, 13767, 2238, 74, 217, "Input"], Cell[451048, 13843, 42, 0, 36, "Text"], Cell[451093, 13845, 831, 22, 89, "Input"], Cell[451927, 13869, 119, 3, 36, "Text"], Cell[452049, 13874, 5283, 141, 419, "Input"], Cell[457335, 14017, 270, 6, 61, "Text"], Cell[457608, 14025, 2691, 76, 313, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[460348, 14107, 263, 9, 44, "Subtitle"], Cell[460614, 14118, 760, 11, 147, "Text"], Cell[461377, 14131, 7536, 223, 522, "Input"], Cell[468916, 14356, 219, 6, 51, "Text"], Cell[469138, 14364, 757, 23, 134, "Input"], Cell[469898, 14389, 199, 5, 51, "Text"], Cell[470100, 14396, 1743, 51, 171, "Input"], Cell[471846, 14449, 192, 3, 51, "Text"], Cell[472041, 14454, 291, 8, 86, "Input"], Cell[472335, 14464, 1477, 56, 141, "Text"], Cell[473815, 14522, 1290, 42, 127, "Input"], Cell[475108, 14566, 396, 12, 75, "Text"], Cell[475507, 14580, 1643, 50, 127, "Input"], Cell[477153, 14632, 1622, 54, 147, "Text"], Cell[478778, 14688, 633, 25, 74, "Text"], Cell[479414, 14715, 242, 6, 83, "Input"], Cell[479659, 14723, 2021, 76, 100, "Text"], Cell[481683, 14801, 946, 31, 83, "Input"], Cell[482632, 14834, 3019, 114, 149, "Text"], Cell[485654, 14950, 637, 17, 99, "Text"], Cell[486294, 14969, 2741, 79, 215, "Input"], Cell[489038, 15050, 805, 25, 99, "Text"], Cell[489846, 15077, 727, 22, 60, "Input"], Cell[490576, 15101, 177, 3, 51, "Text"], Cell[490756, 15106, 2097, 68, 171, "Input"], Cell[492856, 15176, 498, 14, 97, "Text"], Cell[493357, 15192, 1321, 41, 105, "Input"], Cell[494681, 15235, 486, 12, 75, "Text"], Cell[495170, 15249, 5605, 173, 549, "Input"], Cell[500778, 15424, 868, 30, 75, "Text"], Cell[501649, 15456, 3056, 92, 324, "Input"], Cell[504708, 15550, 2346, 71, 281, "Input"], Cell[507057, 15623, 2305, 70, 281, "Input"], Cell[509365, 15695, 2334, 71, 266, "Input"], Cell[511702, 15768, 284, 8, 51, "Text"], Cell[511989, 15778, 974, 28, 83, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[513000, 15811, 88, 1, 45, "Subtitle"], Cell[513091, 15814, 601, 14, 77, "Text"], Cell[513695, 15830, 1124, 31, 188, "Input"], Cell[514822, 15863, 297, 7, 52, "Text"], Cell[515122, 15872, 2081, 64, 280, "Input"], Cell[517206, 15938, 766, 18, 77, "Text"], Cell[517975, 15958, 1588, 51, 122, "Input"], Cell[519566, 16011, 2181, 87, 103, "Text"], Cell[521750, 16100, 1619, 49, 156, "Input"], Cell[CellGroupData[{ Cell[523394, 16153, 152, 2, 70, "Section"], Cell[523549, 16157, 376, 8, 77, "Text"], Cell[523928, 16167, 1953, 57, 173, "Input"], Cell[525884, 16226, 370, 5, 77, "Text"], Cell[526257, 16233, 3765, 93, 217, "Input"], Cell[530025, 16328, 1576, 45, 74, "Input"], Cell[531604, 16375, 282, 4, 77, "Text"], Cell[531889, 16381, 1411, 38, 74, "Input"], Cell[533303, 16421, 1296, 46, 202, "Exercise"], Cell[534602, 16469, 3375, 106, 295, "Input"], Cell[537980, 16577, 439, 12, 77, "Text"], Cell[538422, 16591, 5338, 161, 776, "Input"], Cell[543763, 16754, 206, 3, 52, "Text"], Cell[543972, 16759, 733, 22, 52, "Input"], Cell[544708, 16783, 549, 13, 102, "Text"], Cell[545260, 16798, 796, 26, 29, "Input"], Cell[546059, 16826, 1320, 39, 95, "Input"], Cell[547382, 16867, 895, 27, 102, "Text"], Cell[548280, 16896, 3124, 97, 221, "Input"], Cell[551407, 16995, 748, 23, 77, "Text"], Cell[552158, 17020, 2447, 72, 216, "Input"], Cell[554608, 17094, 211, 3, 52, "Text"], Cell[554822, 17099, 887, 28, 109, "Input"], Cell[555712, 17129, 331, 10, 77, "Text"], Cell[556046, 17141, 869, 26, 109, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[556964, 17173, 106, 1, 45, "Subtitle"], Cell[557073, 17176, 3865, 108, 157, "Text"], Cell[560941, 17286, 4486, 132, 517, "Input"], Cell[565430, 17420, 2090, 53, 127, "Text"], Cell[567523, 17475, 2544, 73, 332, "Input"], Cell[570070, 17550, 1344, 46, 55, "Text"], Cell[571417, 17598, 463, 13, 91, "Input"], Cell[571883, 17613, 755, 24, 52, "Text"], Cell[572641, 17639, 1654, 45, 112, "Input"], Cell[574298, 17686, 2263, 68, 55, "Text"], Cell[576564, 17756, 578, 16, 45, "Input"], Cell[577145, 17774, 699, 19, 51, "Text"], Cell[577847, 17795, 445, 13, 45, "Input"], Cell[578295, 17810, 1437, 35, 127, "Text"], Cell[579735, 17847, 2343, 62, 222, "Input"], Cell[582081, 17911, 705, 20, 51, "Text"], Cell[582789, 17933, 1484, 39, 127, "Input"], Cell[584276, 17974, 703, 20, 51, "Text"], Cell[584982, 17996, 445, 13, 60, "Input"], Cell[585430, 18011, 2399, 65, 133, "Text"], Cell[587832, 18078, 1551, 44, 171, "Input"], Cell[589386, 18124, 1405, 47, 55, "Text"], Cell[590794, 18173, 466, 13, 106, "Input"], Cell[591263, 18188, 324, 10, 51, "Text"], Cell[591590, 18200, 259, 6, 60, "Input"], Cell[591852, 18208, 972, 31, 52, "Text"], Cell[592827, 18241, 632, 19, 105, "Input"], Cell[593462, 18262, 1613, 47, 75, "Text"], Cell[595078, 18311, 330, 9, 60, "Input"], Cell[595411, 18322, 8580, 356, 164, "Text"], Cell[603994, 18680, 1321, 41, 60, "Input"], Cell[605318, 18723, 1539, 40, 202, "Text"], Cell[606860, 18765, 1868, 56, 127, "Input"], Cell[608731, 18823, 1455, 37, 127, "Text"], Cell[610189, 18862, 1325, 37, 90, "Input"], Cell[611517, 18901, 3205, 87, 233, "Text"], Cell[614725, 18990, 5847, 174, 429, "Input"], Cell[620575, 19166, 111521, 3661, 371, "Text"], Cell[732099, 22829, 8116, 231, 578, "Input"], Cell[740218, 23062, 804, 22, 124, "Text"], Cell[741025, 23086, 2580, 68, 227, "Input"], Cell[743608, 23156, 796, 19, 99, "Text"], Cell[744407, 23177, 2947, 79, 237, "Input"], Cell[747357, 23258, 876, 20, 148, "Text"], Cell[748236, 23280, 2847, 78, 216, "Input"], Cell[751086, 23360, 356, 8, 29, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[751479, 23373, 96, 1, 45, "Subtitle"], Cell[751578, 23376, 383, 9, 52, "Text"], Cell[751964, 23387, 4891, 121, 341, "Input"], Cell[756858, 23510, 235, 6, 52, "Text"], Cell[757096, 23518, 1075, 31, 100, "Input"], Cell[758174, 23551, 669, 20, 77, "Text"], Cell[758846, 23573, 1338, 38, 100, "Input"], Cell[760187, 23613, 897, 28, 58, "Text"], Cell[761087, 23643, 1456, 41, 146, "Input"], Cell[762546, 23686, 26, 0, 29, "Input"], Cell[762575, 23688, 620, 18, 59, "Text"], Cell[763198, 23708, 1420, 40, 150, "Input"], Cell[764621, 23750, 1322, 37, 140, "Text"], Cell[765946, 23789, 1669, 50, 167, "Input"], Cell[767618, 23841, 947, 24, 77, "Text"], Cell[768568, 23867, 274, 7, 60, "Input"], Cell[768845, 23876, 3421, 96, 383, "Text"], Cell[772269, 23974, 7264, 211, 459, "Input"], Cell[779536, 24187, 661, 16, 77, "Text"], Cell[780200, 24205, 3875, 120, 403, "Input"] }, Closed]] }, Open ]] } ] *) (* End of internal cache information *)