(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 8.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 27278, 762] NotebookOptionsPosition[ 26135, 735] NotebookOutlinePosition[ 26550, 751] CellTagsIndexPosition[ 26507, 748] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"Context", "[", "]"}], "<>", "\"\<*\>\""}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"arg2d", "[", "r_", "]"}], ":=", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"(", RowBox[{"xx", " ", RowBox[{"r", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "^", "2"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{"yy", " ", RowBox[{"r", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "^", "2"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"g2d", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"Exp", "[", RowBox[{"e", "+", RowBox[{"arg2d", "[", RowBox[{ RowBox[{"RotationMatrix", "[", "\[Alpha]", "]"}], ".", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"Collect", "[", RowBox[{ RowBox[{"FullSimplify", "[", RowBox[{ RowBox[{"Log", "@", RowBox[{"g2d", "[", RowBox[{"x", ",", "y"}], "]"}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"x", ">", "0"}], ",", RowBox[{"y", ">", "0"}], ",", RowBox[{"\[Alpha]", ">", "0"}], ",", RowBox[{"e", ">", "0"}], ",", RowBox[{"xx", ">", "0"}], ",", RowBox[{"yy", ">", "0"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"vEx", "-", "of", "-", RowBox[{"g2d", "[", RowBox[{ RowBox[{"x", "-", "x0"}], ",", RowBox[{"y", "-", "y0"}]}], "]"}]}], ")"}], "^", "2"}], ",", "#"}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{ "of", ",", "e", ",", "xx", ",", "yy", ",", "x0", ",", "y0", ",", "\[Alpha]"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"grad", "/.", RowBox[{"{", RowBox[{ RowBox[{"g2d", "[", RowBox[{ RowBox[{"x", "-", "x0"}], ",", RowBox[{"y", "-", "y0"}]}], "]"}], "\[Rule]", "vFit"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{ RowBox[{"grad", "/", RowBox[{"(", RowBox[{"vEx", "-", "vFit", "-", "of"}], ")"}]}], "/", RowBox[{"-", "2"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"First", "@", "grad"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{ RowBox[{"Rest", "@", "grad"}], "/", "vFit"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"MatrixForm", "[", RowBox[{"grad", "[", RowBox[{"[", RowBox[{"1", ";;", "3"}], "]"}], "]"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"Rest", "@", RowBox[{"Rest", "@", RowBox[{"Rest", "@", "grad"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"FullSimplify", "@", "grad"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"grad", "/.", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"xx", "^", "2"}], RowBox[{ RowBox[{"Cos", "[", "\[Alpha]", "]"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"yy", "^", "2"}], RowBox[{ RowBox[{"Sin", "[", "\[Alpha]", "]"}], "^", "2"}]}]}], "\[Rule]", RowBox[{"-", "xxs"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"yy", "^", "2"}], RowBox[{ RowBox[{"Cos", "[", "\[Alpha]", "]"}], "^", "2"}]}], "\[Rule]", RowBox[{ RowBox[{"-", "yys"}], "-", RowBox[{ RowBox[{"xx", "^", "2"}], RowBox[{ RowBox[{"Sin", "[", "\[Alpha]", "]"}], "^", "2"}]}]}]}]}], "\[IndentingNewLine]", "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"FullSimplify", "@", "grad"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"grad", "/.", RowBox[{"{", RowBox[{ RowBox[{"Sin", "[", RowBox[{"2", "\[Alpha]"}], "]"}], "\[Rule]", RowBox[{"xys", "/", RowBox[{"(", RowBox[{ RowBox[{"xx", "^", "2"}], "-", RowBox[{"yy", "^", "2"}]}], ")"}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"grad", "=", RowBox[{"FullSimplify", "@", "grad"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "@", RowBox[{"Collect", "[", RowBox[{"grad", ",", RowBox[{"{", RowBox[{"xxs", ",", "yys", ",", "xys"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"v", "-", "v1", "-", "v2", "-", "v3"}], ")"}], "^", "2"}], ",", "#"}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{"v1", ",", "v2", ",", "v3"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.753609000042264*^9, 3.753609109599412*^9}, { 3.753609166430565*^9, 3.753609210683228*^9}, {3.753610502865098*^9, 3.753610547389407*^9}, {3.753610685030005*^9, 3.753610724175441*^9}, { 3.753613975995905*^9, 3.753614047305752*^9}, {3.753614109773117*^9, 3.7536141836411963`*^9}, {3.753614275749501*^9, 3.753614348955834*^9}, { 3.753614614991173*^9, 3.7536147276984167`*^9}, {3.753615313269506*^9, 3.753615326654551*^9}, {3.753615384419899*^9, 3.753615414088451*^9}, { 3.753615580614621*^9, 3.753615740712741*^9}, {3.7536157813953323`*^9, 3.753615786308958*^9}, {3.7536158874108458`*^9, 3.7536160378832207`*^9}, { 3.753675831337633*^9, 3.7536758318774357`*^9}, {3.753693682122699*^9, 3.753693692881207*^9}}, CellLabel->"In[18]:=",ExpressionUUID->"14171ecc-591a-4b96-af22-9f7860bde8cd"], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"arg = \"\>", "\[InvisibleSpace]", RowBox[{"e", "+", RowBox[{"x", " ", "y", " ", RowBox[{"(", RowBox[{ RowBox[{"2", " ", SuperscriptBox["xx", "2"], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}], "-", RowBox[{"2", " ", SuperscriptBox["yy", "2"], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox["y", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox["yy", "2"]}], " ", SuperscriptBox[ RowBox[{"Cos", "[", "\[Alpha]", "]"}], "2"]}], "-", RowBox[{ SuperscriptBox["xx", "2"], " ", SuperscriptBox[ RowBox[{"Sin", "[", "\[Alpha]", "]"}], "2"]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox["x", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox["xx", "2"]}], " ", SuperscriptBox[ RowBox[{"Cos", "[", "\[Alpha]", "]"}], "2"]}], "-", RowBox[{ SuperscriptBox["yy", "2"], " ", SuperscriptBox[ RowBox[{"Sin", "[", "\[Alpha]", "]"}], "2"]}]}], ")"}]}]}]}], SequenceForm[ "arg = ", $CellContext`e + $CellContext`x $CellContext`y ( 2 $CellContext`xx^2 Cos[$CellContext`\[Alpha]] Sin[$CellContext`\[Alpha]] - 2 $CellContext`yy^2 Cos[$CellContext`\[Alpha]] Sin[$CellContext`\[Alpha]]) + $CellContext`y^2 (-$CellContext`yy^2 Cos[$CellContext`\[Alpha]]^2 - $CellContext`xx^2 Sin[$CellContext`\[Alpha]]^2) + $CellContext`x^2 (-$CellContext`xx^2 Cos[$CellContext`\[Alpha]]^2 - $CellContext`yy^2 Sin[$CellContext`\[Alpha]]^2)], Editable->False]], "Print", CellChangeTimes->{{3.75361429503148*^9, 3.753614318831056*^9}, 3.753614349506106*^9, {3.7536146194785757`*^9, 3.7536146510571117`*^9}, { 3.753614692263749*^9, 3.753614728244631*^9}, 3.75361532702458*^9, { 3.753615392673814*^9, 3.753615414437355*^9}, 3.753615604136612*^9, { 3.753615728195951*^9, 3.7536157412988*^9}, 3.753615786835373*^9, 3.75361588966605*^9, {3.753615931942144*^9, 3.75361603888466*^9}, 3.753675833094645*^9, 3.753693693517261*^9}, CellLabel-> "During evaluation of \ In[18]:=",ExpressionUUID->"a0fcd95d-d8f4-4b41-af48-0f9b52476c1d"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"d/dof = \"\>", "\[InvisibleSpace]", "1"}], SequenceForm["d/dof = ", 1], Editable->False]], "Print", CellChangeTimes->{{3.75361429503148*^9, 3.753614318831056*^9}, 3.753614349506106*^9, {3.7536146194785757`*^9, 3.7536146510571117`*^9}, { 3.753614692263749*^9, 3.753614728244631*^9}, 3.75361532702458*^9, { 3.753615392673814*^9, 3.753615414437355*^9}, 3.753615604136612*^9, { 3.753615728195951*^9, 3.7536157412988*^9}, 3.753615786835373*^9, 3.75361588966605*^9, {3.753615931942144*^9, 3.75361603888466*^9}, 3.753675833094645*^9, 3.753693693520195*^9}, CellLabel-> "During evaluation of \ In[18]:=",ExpressionUUID->"33c683e5-22cc-4c32-af0c-3f0c99474830"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"1"}, { RowBox[{ RowBox[{"-", "2"}], " ", "xx", " ", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}]}], ")"}], "2"]}]}, { RowBox[{ RowBox[{"-", "2"}], " ", "yy", " ", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}]}], ")"}], "2"]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", CellChangeTimes->{{3.75361429503148*^9, 3.753614318831056*^9}, 3.753614349506106*^9, {3.7536146194785757`*^9, 3.7536146510571117`*^9}, { 3.753614692263749*^9, 3.753614728244631*^9}, 3.75361532702458*^9, { 3.753615392673814*^9, 3.753615414437355*^9}, 3.753615604136612*^9, { 3.753615728195951*^9, 3.7536157412988*^9}, 3.753615786835373*^9, 3.75361588966605*^9, {3.753615931942144*^9, 3.75361603888466*^9}, 3.753675833094645*^9, 3.7536936935228853`*^9}, CellLabel-> "During evaluation of \ In[18]:=",ExpressionUUID->"afc8061c-203e-4634-8d5d-559be671b5eb"] }, Open ]], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ { RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "x"}], "+", RowBox[{"2", " ", "x0"}]}], ")"}], " ", "xxs"}], "+", RowBox[{"xys", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "y"}], "+", "y0"}], ")"}]}]}]}, { RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "x"}], "+", "x0"}], ")"}], " ", "xys"}], "+", RowBox[{"2", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "y"}], "+", "y0"}], ")"}], " ", "yys"}]}]}, { RowBox[{"2", " ", RowBox[{"(", RowBox[{"xx", "-", "yy"}], ")"}], " ", RowBox[{"(", RowBox[{"xx", "+", "yy"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"y", "-", "y0"}], ")"}], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}]}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"x", "-", "x0"}], ")"}], " ", RowBox[{"Cos", "[", "\[Alpha]", "]"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "y"}], "+", "y0"}], ")"}], " ", RowBox[{"Sin", "[", "\[Alpha]", "]"}]}]}], ")"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.7536107127691*^9, 3.753610724693427*^9}, 3.753613979180334*^9, {3.753614013881706*^9, 3.753614047823874*^9}, { 3.7536141246760674`*^9, 3.753614142523868*^9}, 3.753614184108453*^9, { 3.7536142950445347`*^9, 3.7536143188455753`*^9}, 3.7536143495149937`*^9, { 3.7536146194771233`*^9, 3.753614651052931*^9}, {3.753614692259658*^9, 3.753614728264624*^9}, 3.753615327050393*^9, {3.753615392700618*^9, 3.7536154144500237`*^9}, 3.7536156041660557`*^9, {3.753615728219289*^9, 3.7536157416101847`*^9}, 3.753615787964911*^9, 3.753615889682477*^9, { 3.7536159322147493`*^9, 3.7536160389144897`*^9}, 3.7536758343040447`*^9, 3.7536936935257397`*^9}, CellLabel-> "Out[34]//MatrixForm=",ExpressionUUID->"0d7de383-9a8d-4be7-b9bc-\ bc103daa06be"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{"v", "-", "v1", "-", "v2", "-", "v3"}], ")"}]}], ",", RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{"v", "-", "v1", "-", "v2", "-", "v3"}], ")"}]}], ",", RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{"v", "-", "v1", "-", "v2", "-", "v3"}], ")"}]}]}], "}"}]], "Output", CellChangeTimes->{{3.7536107127691*^9, 3.753610724693427*^9}, 3.753613979180334*^9, {3.753614013881706*^9, 3.753614047823874*^9}, { 3.7536141246760674`*^9, 3.753614142523868*^9}, 3.753614184108453*^9, { 3.7536142950445347`*^9, 3.7536143188455753`*^9}, 3.7536143495149937`*^9, { 3.7536146194771233`*^9, 3.753614651052931*^9}, {3.753614692259658*^9, 3.753614728264624*^9}, 3.753615327050393*^9, {3.753615392700618*^9, 3.7536154144500237`*^9}, 3.7536156041660557`*^9, {3.753615728219289*^9, 3.7536157416101847`*^9}, 3.753615787964911*^9, 3.753615889682477*^9, { 3.7536159322147493`*^9, 3.7536160389144897`*^9}, 3.7536758343040447`*^9, 3.753693693528349*^9}, CellLabel->"Out[35]=",ExpressionUUID->"6ecb8d93-2f3f-41ed-8550-c9e9ec844fcc"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"Context", "[", "]"}], "<>", "\"\<*\>\""}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "2"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"parameter", "=", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "of", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Flatten", "@", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"e", "[", "i", "]"}], ",", RowBox[{"xx", "[", "i", "]"}], ",", RowBox[{"yy", "[", "i", "]"}], ",", RowBox[{"x0", "[", "i", "]"}], ",", RowBox[{"y0", "[", "i", "]"}], ",", RowBox[{"\[Alpha]", "[", "i", "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dxs", "[", "i_", "]"}], ":=", RowBox[{"x", "-", RowBox[{"x0", "[", "i", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dys", "[", "i_", "]"}], ":=", RowBox[{"y", "-", RowBox[{"y0", "[", "i", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"xxs", "[", "i_", "]"}], ":=", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"xx", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], ")"}], "^", "2"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"yy", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], ")"}], "^", "2"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"yys", "[", "i_", "]"}], ":=", RowBox[{ RowBox[{"-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"yy", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], ")"}], "^", "2"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"xx", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], ")"}], "^", "2"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"xys", "[", "i_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"xx", "[", "i", "]"}], "^", "2"}], "-", RowBox[{ RowBox[{"yy", "[", "i", "]"}], "^", "2"}]}], ")"}], "2", RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"gausz", "[", "i_", "]"}], ":=", RowBox[{"Exp", "[", RowBox[{ RowBox[{"e", "[", "i", "]"}], "+", RowBox[{ RowBox[{"xxs", "[", "i", "]"}], RowBox[{ RowBox[{"dxs", "[", "i", "]"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"yys", "[", "i", "]"}], RowBox[{ RowBox[{"dys", "[", "i", "]"}], "^", "2"}]}], "+", RowBox[{ RowBox[{"xys", "[", "i", "]"}], RowBox[{"dxs", "[", "i", "]"}], RowBox[{"dys", "[", "i", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"tmp", "=", RowBox[{"of", "-", "val", "+", RowBox[{"Sum", "[", RowBox[{ RowBox[{"gausz", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"abstand", "=", RowBox[{"tmp", "^", "2"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gradAnalytisch", "=", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{"abstand", ",", "#"}], "]"}], "&"}], ",", "parameter"}], "]"}], "/", "2"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gradNumerisch", "=", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "tmp", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Flatten", "@", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"tmp", "*", RowBox[{"gausz", "[", "i", "]"}], "*", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"1", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"-", "2"}], RowBox[{"xx", "[", "i", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"dxs", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], "-", RowBox[{ RowBox[{"dys", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}]}], ")"}], "^", "2"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"-", "2"}], RowBox[{"yy", "[", "i", "]"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"dys", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], "+", RowBox[{ RowBox[{"dxs", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}]}], ")"}], "^", "2"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"-", "2"}], RowBox[{"dxs", "[", "i", "]"}], RowBox[{"xxs", "[", "i", "]"}]}], "-", RowBox[{ RowBox[{"xys", "[", "i", "]"}], RowBox[{"dys", "[", "i", "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"-", "2"}], RowBox[{"dys", "[", "i", "]"}], RowBox[{"yys", "[", "i", "]"}]}], "-", RowBox[{ RowBox[{"xys", "[", "i", "]"}], RowBox[{"dxs", "[", "i", "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"2", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"xx", "[", "i", "]"}], "^", "2"}], "-", RowBox[{ RowBox[{"yy", "[", "i", "]"}], "^", "2"}]}], ")"}], RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"dys", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], "+", RowBox[{ RowBox[{"dxs", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}]}], ")"}], RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"dxs", "[", "i", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}], "-", RowBox[{ RowBox[{"dys", "[", "i", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Alpha]", "[", "i", "]"}], "]"}]}]}], ")"}]}]}], "\[IndentingNewLine]", "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "/", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], ",", RowBox[{"Transpose", "@", RowBox[{"{", RowBox[{"gradAnalytisch", ",", "gradNumerisch"}], "}"}]}]}], "]"}], "//", "FullSimplify"}]}], "Input", CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGAQBWIQfU3TwHHW99eOs5arhINove2B0SB6ytq7vSCa4VrL FBA97Uv6VBDtcHvWTBD90sJ0IYiWe/xnCVjce8kdEM2vrv4YRAdPXfIMRPve /PwNRJ/8bPoHRK96d4NhNpAWmB7DBqLDrroKgmg3b3dhEL2Jz0cCRD/S2gam XdesVATRIqzvwPQllyOqIFri9SpTED1N+I8diNZY+9AZRG9oeOAOop9ui/QE 0f7C6lEgelZZZDSI/uy5JxFEp52alw+iH/Q0V4PoXRzzmkF0fNDlThB9yLql G8x/4DMBRDstTZ4Eotekv5sOog0aW9aA6CXdLgdB9L9nYodBNABjjsh3 "], CellLabel-> "In[1111]:=",ExpressionUUID->"34a6f57a-8574-41c4-a939-95322a68b897"], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}]], "Output", CellChangeTimes->{{3.75369466155869*^9, 3.753694950324045*^9}, { 3.753695003404076*^9, 3.75369502978017*^9}, 3.7536952083998823`*^9, { 3.753695251583177*^9, 3.753695283663467*^9}, {3.753695382017359*^9, 3.7536953868153563`*^9}, 3.7536954306696663`*^9, 3.753695503918879*^9, { 3.753695537175337*^9, 3.753695582122876*^9}, {3.753695612293651*^9, 3.753695631181015*^9}, 3.7536956623065987`*^9, {3.753695767340137*^9, 3.753695775511874*^9}, {3.753695809155635*^9, 3.753695819281898*^9}, 3.753695963777269*^9, {3.7536960258027277`*^9, 3.75369609424415*^9}, 3.753696125358079*^9, {3.7536962224536953`*^9, 3.753696285505844*^9}, 3.7536963488743362`*^9, 3.753696404011689*^9, {3.753696463438328*^9, 3.7536965756628036`*^9}, 3.753696608022929*^9, 3.753696647705496*^9, 3.7536967933270683`*^9}, CellLabel-> "Out[1124]=",ExpressionUUID->"f765aec1-d1fe-460a-a1ee-acfdd6d2dfd3"] }, Open ]] }, WindowSize->{1920, 1032}, WindowMargins->{{1920, Automatic}, {3, Automatic}}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 6, 2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 6372, 191, 492, "Input",ExpressionUUID->"14171ecc-591a-4b96-af22-9f7860bde8cd"], Cell[CellGroupData[{ Cell[6976, 217, 2466, 61, 33, "Print",ExpressionUUID->"a0fcd95d-d8f4-4b41-af48-0f9b52476c1d"], Cell[9445, 280, 729, 14, 25, "Print",ExpressionUUID->"33c683e5-22cc-4c32-af0c-3f0c99474830"], Cell[10177, 296, 2114, 56, 65, "Print",ExpressionUUID->"afc8061c-203e-4634-8d5d-559be671b5eb"] }, Open ]], Cell[12306, 355, 2936, 79, 83, "Output",ExpressionUUID->"0d7de383-9a8d-4be7-b9bc-bc103daa06be"], Cell[15245, 436, 1207, 26, 35, "Output",ExpressionUUID->"6ecb8d93-2f3f-41ed-8550-c9e9ec844fcc"] }, Open ]], Cell[CellGroupData[{ Cell[16489, 467, 8526, 245, 768, "Input",ExpressionUUID->"34a6f57a-8574-41c4-a939-95322a68b897"], Cell[25018, 714, 1101, 18, 35, "Output",ExpressionUUID->"f765aec1-d1fe-460a-a1ee-acfdd6d2dfd3"] }, Open ]] } ] *)