(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.1' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 17210, 562] NotebookOptionsPosition[ 16177, 524] NotebookOutlinePosition[ 16624, 542] CellTagsIndexPosition[ 16581, 539] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"ClearAll", "[", "\"\\"", "]"}]], "Input", ExpressionUUID -> "52cc5610-42f8-465a-863f-13586a7aa4b3"], Cell[BoxData[ RowBox[{ RowBox[{"x", "=", RowBox[{"R", RowBox[{"(", RowBox[{"1", "+", RowBox[{"\[Epsilon]", " ", RowBox[{"h", "[", RowBox[{"t", ",", "p"}], "]"}]}]}], ")"}], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "p", "]"}], RowBox[{"Sin", "[", "t", "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "p", "]"}], RowBox[{"Sin", "[", "t", "]"}]}], ",", RowBox[{"Cos", "[", "t", "]"}]}], "}"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.823238775053831*^9, 3.823238806535357*^9}, { 3.823238839742552*^9, 3.823238854865306*^9}}, ExpressionUUID -> "eb1e94af-39c9-4ec9-9fda-4872524d4886"], Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"R", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"h", "=", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"t", ",", "p"}], "}"}], ",", RowBox[{ RowBox[{"Cos", "[", RowBox[{"n", " ", "t"}], "]"}], "+", RowBox[{"Cos", "[", RowBox[{"m", " ", "p"}], "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"x", "/.", RowBox[{"\[Epsilon]", "\[Rule]", "ee"}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "\[Pi]"}], "}"}], ",", RowBox[{"{", RowBox[{"p", ",", "0", ",", RowBox[{"2", "\[Pi]"}]}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"ee", ",", ".1"}], "}"}], ",", ".001", ",", ".3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"m", ",", "1"}], "}"}], ",", "0", ",", "5", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n", ",", "1"}], "}"}], ",", "0", ",", "10", ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.823238866509454*^9, 3.823239010925296*^9}, { 3.8232390816719713`*^9, 3.823239097479257*^9}, {3.823239139119034*^9, 3.8232391747613897`*^9}}, ExpressionUUID -> "ee35f441-239c-4ffa-905c-440108bb6c2d"], Cell[BoxData[ RowBox[{ RowBox[{"Clear", "[", RowBox[{"R", ",", "h"}], "]"}], ";"}]], "Input", CellChangeTimes->{{3.823239250445829*^9, 3.8232392557892*^9}}, ExpressionUUID -> "862195b8-dee1-4dbf-a82b-c8790f00c915"], Cell[BoxData[{ RowBox[{ RowBox[{"rt", "=", RowBox[{"Simplify", "[", RowBox[{"D", "[", RowBox[{"x", ",", "t"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"rp", "=", RowBox[{"Simplify", "[", RowBox[{"D", "[", RowBox[{"x", ",", "p"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"n", "=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{"Cross", "[", RowBox[{"rt", ",", "rp"}], "]"}], "/", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"Cross", "[", RowBox[{"rt", ",", "rp"}], "]"}], ".", RowBox[{"Cross", "[", RowBox[{"rt", ",", "rp"}], "]"}]}], "]"}]}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"R", ">", "0"}]}]}], "]"}]}], ";", RowBox[{"G", "=", RowBox[{"Simplify", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"rt", ".", "rt"}], ",", RowBox[{"rt", ".", "rp"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"rp", ".", "rt"}], ",", RowBox[{"rp", ".", "rp"}]}], "}"}]}], "}"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"G1", "=", RowBox[{"Simplify", "[", RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{"G", ",", RowBox[{"{", RowBox[{"\[Epsilon]", ",", "0", ",", "1"}], "}"}]}], "]"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"K", "=", RowBox[{"Simplify", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", RowBox[{"n", ".", RowBox[{"D", "[", RowBox[{"rt", ",", "t"}], "]"}]}]}], ",", RowBox[{"-", RowBox[{"n", ".", RowBox[{"D", "[", RowBox[{"rt", ",", "p"}], "]"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", RowBox[{"n", ".", RowBox[{"D", "[", RowBox[{"rp", ",", "t"}], "]"}]}]}], ",", RowBox[{"-", RowBox[{"n", ".", RowBox[{"D", "[", RowBox[{"rp", ",", "p"}], "]"}]}]}]}], "}"}]}], "}"}], "]"}]}], ";", RowBox[{"K1", "=", RowBox[{"Simplify", "[", RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{"K", ",", RowBox[{"{", RowBox[{"\[Epsilon]", ",", "0", ",", "1"}], "}"}]}], "]"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"L1", "=", RowBox[{"Normal", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{ RowBox[{"Inverse", "[", "G1", "]"}], ".", "K1"}], ",", RowBox[{"{", RowBox[{"\[Epsilon]", ",", "0", ",", "1"}], "}"}]}], "]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.82323926133633*^9, 3.8232392650376987`*^9}, { 3.823239297890106*^9, 3.8232393449988937`*^9}, {3.823239382839087*^9, 3.823239415791595*^9}}, ExpressionUUID -> "5b0f4c1e-5c34-4452-ac20-1f96672c56e2"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"GaussK", "=", RowBox[{"Series", "[", RowBox[{ RowBox[{"Det", "[", "L1", "]"}], ",", RowBox[{"{", RowBox[{"\[Epsilon]", ",", "0", ",", "1"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.8232393847361393`*^9, 3.823239454873789*^9}}, ExpressionUUID -> "7201e851-481c-4e43-aaf5-c6f65811768e"], Cell[BoxData[ InterpretationBox[ RowBox[{ FractionBox["1", SuperscriptBox["R", "2"]], "+", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"h", "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{ SuperscriptBox[ RowBox[{"Csc", "[", "t", "]"}], "2"], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"0", ",", "2"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{ RowBox[{"Cot", "[", "t", "]"}], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], ")"}], " ", "\[Epsilon]"}], SuperscriptBox["R", "2"]], "+", InterpretationBox[ SuperscriptBox[ RowBox[{"O", "[", "\[Epsilon]", "]"}], "2"], SeriesData[$CellContext`\[Epsilon], 0, {}, 0, 2, 1], Editable->False]}], SeriesData[$CellContext`\[Epsilon], 0, {$CellContext`R^(-2), $CellContext`R^(-2) ((-2) \ $CellContext`h[$CellContext`t, $CellContext`p] - Csc[$CellContext`t]^2 Derivative[0, 2][$CellContext`h][$CellContext`t, $CellContext`p] - Cot[$CellContext`t] Derivative[1, 0][$CellContext`h][$CellContext`t, $CellContext`p] - Derivative[2, 0][$CellContext`h][$CellContext`t, $CellContext`p])}, 0, 2, 1], Editable->False]], "Output", CellChangeTimes->{ 3.823239385547971*^9, {3.823239430547853*^9, 3.823239457121738*^9}, 3.823241953139206*^9, 3.8232522437795677`*^9}, ExpressionUUID -> "bd8667fe-63a8-4b2e-9a10-e45a61caccc8"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"H", "=", RowBox[{ FractionBox["1", "2"], RowBox[{"Simplify", "[", RowBox[{"Series", "[", RowBox[{ RowBox[{"Tr", "[", "L1", "]"}], ",", RowBox[{"{", RowBox[{"\[Epsilon]", ",", "0", ",", "1"}], "}"}]}], "]"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.823239475574806*^9, 3.82323948775016*^9}}, ExpressionUUID -> "d1dd5484-01b7-4ff0-ae4b-a6e1b79d5d58"], Cell[BoxData[ InterpretationBox[ RowBox[{ FractionBox[ RowBox[{ RowBox[{"Csc", "[", "t", "]"}], " ", SqrtBox[ SuperscriptBox[ RowBox[{"Sin", "[", "t", "]"}], "2"]]}], "R"], "-", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Csc", "[", "t", "]"}], " ", SqrtBox[ SuperscriptBox[ RowBox[{"Sin", "[", "t", "]"}], "2"]], " ", RowBox[{"(", RowBox[{ RowBox[{"2", " ", RowBox[{"h", "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{ SuperscriptBox[ RowBox[{"Csc", "[", "t", "]"}], "2"], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"0", ",", "2"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{ RowBox[{"Cot", "[", "t", "]"}], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], ")"}]}], ")"}], " ", "\[Epsilon]"}], RowBox[{"2", " ", "R"}]], "+", InterpretationBox[ SuperscriptBox[ RowBox[{"O", "[", "\[Epsilon]", "]"}], "2"], SeriesData[$CellContext`\[Epsilon], 0, {}, 0, 2, 1], Editable->False]}], SeriesData[$CellContext`\[Epsilon], 0, {$CellContext`R^(-1) Csc[$CellContext`t] (Sin[$CellContext`t]^2)^Rational[1, 2], Rational[-1, 2] $CellContext`R^(-1) Csc[$CellContext`t] (Sin[$CellContext`t]^2)^Rational[1, 2] ( 2 $CellContext`h[$CellContext`t, $CellContext`p] + Csc[$CellContext`t]^2 Derivative[0, 2][$CellContext`h][$CellContext`t, $CellContext`p] + Cot[$CellContext`t] Derivative[1, 0][$CellContext`h][$CellContext`t, $CellContext`p] + Derivative[2, 0][$CellContext`h][$CellContext`t, $CellContext`p])}, 0, 2, 1], Editable->False]], "Output", CellChangeTimes->{3.8232394889758244`*^9, 3.82324195701191*^9, 3.823252245159709*^9}, ExpressionUUID -> "8d5e4eda-f220-4ff3-8330-898a572b3e19"] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"k0", "=", RowBox[{"Coefficient", "[", RowBox[{ RowBox[{"\[Epsilon]", " ", "K1"}], ",", "\[Epsilon]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"k1", "=", RowBox[{"Coefficient", "[", RowBox[{"K1", ",", "\[Epsilon]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g0", "=", RowBox[{"Coefficient", "[", RowBox[{ RowBox[{"\[Epsilon]", " ", "G1"}], ",", "\[Epsilon]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g1", "=", RowBox[{"Coefficient", "[", RowBox[{"G1", ",", "\[Epsilon]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.823241940564245*^9, 3.823241940782164*^9}, { 3.8232419754542427`*^9, 3.823242069189599*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a0", "=", RowBox[{ RowBox[{"Inverse", "[", "g0", "]"}], "k0"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a1", "=", RowBox[{ RowBox[{ RowBox[{"Inverse", "[", "g0", "]"}], "k1"}], "-", RowBox[{ RowBox[{"Inverse", "[", "g0", "]"}], "g1", " ", RowBox[{"Inverse", "[", "g0", "]"}], "k0"}]}]}], ";"}]}], "Input", CellChangeTimes->{{3.823242114854019*^9, 3.8232421196909647`*^9}, { 3.8232421794014683`*^9, 3.823242204767763*^9}, {3.823242237013935*^9, 3.823242268639081*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Gauss", "=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Det", "[", "a0", "]"}], RowBox[{"(", RowBox[{"1", "+", RowBox[{"\[Epsilon]", " ", RowBox[{"Tr", "[", RowBox[{ RowBox[{"Inverse", "[", "a0", "]"}], "a1"}], "]"}]}]}], ")"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.823242295506867*^9, 3.8232423443461437`*^9}}], Cell[BoxData[ RowBox[{"-", FractionBox[ RowBox[{ RowBox[{"-", "1"}], "+", RowBox[{"2", " ", "\[Epsilon]", " ", RowBox[{"h", "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{"\[Epsilon]", " ", SuperscriptBox[ RowBox[{"Csc", "[", "t", "]"}], "2"], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"0", ",", "2"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{"\[Epsilon]", " ", RowBox[{"Cot", "[", "t", "]"}], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "+", RowBox[{"\[Epsilon]", " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}]}], SuperscriptBox["R", "2"]]}]], "Output", CellChangeTimes->{{3.823242302345827*^9, 3.823242344764365*^9}, 3.823252272132434*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"H", " ", "=", " ", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"1", "/", "2"}], RowBox[{"(", RowBox[{"Tr", "[", RowBox[{"a0", "+", RowBox[{"\[Epsilon]", " ", "a1"}]}], "]"}], ")"}]}], "]"}]}]], "Input",\ CellChangeTimes->{{3.823242373638419*^9, 3.823242403081411*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ RowBox[{"Sin", "[", "t", "]"}], " ", RowBox[{"(", RowBox[{"2", "-", RowBox[{"2", " ", "\[Epsilon]", " ", RowBox[{"h", "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{"\[Epsilon]", " ", SuperscriptBox[ RowBox[{"Csc", "[", "t", "]"}], "2"], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"0", ",", "2"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{"\[Epsilon]", " ", RowBox[{"Cot", "[", "t", "]"}], " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}], "-", RowBox[{"\[Epsilon]", " ", RowBox[{ SuperscriptBox["h", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"t", ",", "p"}], "]"}]}]}], ")"}]}], RowBox[{"2", " ", "R", " ", SqrtBox[ SuperscriptBox[ RowBox[{"Sin", "[", "t", "]"}], "2"]]}]]], "Output", CellChangeTimes->{{3.8232423974693747`*^9, 3.8232424034059134`*^9}, 3.823252284382477*^9}] }, Open ]] }, WindowSize->{1825, 932}, WindowMargins->{{-167, Automatic}, {1295, Automatic}}, Magnification:>1.5 Inherited, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (July 28, \ 2016)", StyleDefinitions->"Default.nb", ExpressionUUID -> "7e333c92-a937-466d-b128-b47ed3e23ee9" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 135, 2, 48, "Input"], Cell[696, 24, 693, 20, 48, "Input"], Cell[1392, 46, 1464, 43, 142, "Input"], Cell[2859, 91, 223, 5, 48, "Input"], Cell[3085, 98, 2913, 94, 235, "Input"], Cell[CellGroupData[{ Cell[6023, 196, 341, 8, 48, "Input"], Cell[6367, 206, 2075, 60, 74, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8479, 271, 423, 12, 70, "Input"], Cell[8905, 285, 2523, 73, 89, "Output"] }, Open ]], Cell[11443, 361, 769, 23, 142, "Input"], Cell[12215, 386, 563, 16, 80, "Input"], Cell[CellGroupData[{ Cell[12803, 406, 400, 12, 48, "Input"], Cell[13206, 420, 1214, 40, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14457, 465, 329, 10, 48, "Input"], Cell[14789, 477, 1372, 44, 123, "Output"] }, Open ]] } ] *)