diff options
author | Erich Eckner <git@eckner.net> | 2017-12-13 14:18:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-12-13 14:18:44 +0100 |
commit | 665e7efcf0d6fc1a104bc3382caf51341c2bb793 (patch) | |
tree | 06e8edd4148ca63a357789c3937012c3d2839cb5 | |
parent | 9edcb215f29d19b26f99d17e456f638e70fc9777 (diff) | |
download | epost-665e7efcf0d6fc1a104bc3382caf51341c2bb793.tar.xz |
lineareRegression.nb neu
-rw-r--r-- | lineareRegression.nb | 808 |
1 files changed, 808 insertions, 0 deletions
diff --git a/lineareRegression.nb b/lineareRegression.nb new file mode 100644 index 0000000..0e47478 --- /dev/null +++ b/lineareRegression.nb @@ -0,0 +1,808 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 10.0' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 158, 7] +NotebookDataLength[ 27902, 799] +NotebookOptionsPosition[ 27499, 781] +NotebookOutlinePosition[ 27839, 796] +CellTagsIndexPosition[ 27796, 793] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ + +Cell[CellGroupData[{ +Cell[BoxData[{ + RowBox[{ + RowBox[{ + RowBox[{"Clear", "[", + RowBox[{"Evaluate", "[", + RowBox[{ + RowBox[{"Context", "[", "]"}], "<>", "\"\<*\>\""}], "]"}], "]"}], ";"}], + "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{ + RowBox[{ + RowBox[{"xySum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"x", "[", "i", "]"}], + RowBox[{"y", "[", "i", "]"}]}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"xSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{"x", "[", "i", "]"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"ySum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{"y", "[", "i", "]"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"xxSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"x", "[", "i", "]"}], "^", "2"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"yySum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"y", "[", "i", "]"}], "^", "2"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"xkSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"x", "[", "i", "]"}], + RowBox[{"k", "[", "i", "]"}]}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"kSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{"k", "[", "i", "]"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"ykSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"y", "[", "i", "]"}], + RowBox[{"k", "[", "i", "]"}]}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{ + RowBox[{"kkSum", "[", "n_", "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{ + RowBox[{"k", "[", "i", "]"}], "^", "2"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], ";"}], + "*)"}]}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"a", "[", + RowBox[{"x_", ",", "y_", ",", "k_", ",", "\[CapitalDelta]_", ",", "n_"}], + "]"}], ":=", + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{"n", " ", + RowBox[{"xySum", "[", "n", "]"}]}], "+", + RowBox[{"n", " ", "\[CapitalDelta]", " ", + RowBox[{"xkSum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"ySum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"kSum", "[", "n", "]"}], "\[CapitalDelta]"}]}], ")"}], "/", + RowBox[{"(", + RowBox[{ + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}]}], ")"}]}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"diffSummand", "[", + RowBox[{ + "x_", ",", "y_", ",", "k_", ",", "\[CapitalDelta]_", ",", "i_", ",", + "n_"}], "]"}], ":=", + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"a", "[", + RowBox[{"x", ",", "y", ",", "k", ",", "\[CapitalDelta]", ",", "n"}], + "]"}], " ", + RowBox[{"x", "[", "i", "]"}]}], "-", + RowBox[{"y", "[", "i", "]"}], "-", + RowBox[{ + RowBox[{"k", "[", "i", "]"}], "\[CapitalDelta]"}]}], ")"}], "^", + "2"}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"diff", "[", + RowBox[{"x_", ",", "y_", ",", "k_", ",", "\[CapitalDelta]_", ",", "n_"}], + "]"}], ":=", + RowBox[{"Block", "[", + RowBox[{ + RowBox[{"{", "i", "}"}], ",", + RowBox[{"Sum", "[", + RowBox[{ + RowBox[{"diffSummand", "[", + RowBox[{ + "x", ",", "y", ",", "k", ",", "\[CapitalDelta]", ",", "i", ",", "n"}], + "]"}], ",", + RowBox[{"{", + RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "]"}]}], + ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"a", "[", + RowBox[{"x", ",", "y", ",", "k", ",", "\[CapitalDelta]", ",", "n"}], "]"}], + "\[IndentingNewLine]", + RowBox[{"(*", + RowBox[{"Collect", "[", + RowBox[{ + RowBox[{"Expand", "@", + RowBox[{"diffSummand", "[", + RowBox[{ + "x", ",", "y", ",", "k", ",", "\[CapitalDelta]", ",", "i", ",", "n"}], + "]"}]}], ",", + RowBox[{"k", "[", "i", "]"}]}], "]"}], "*)"}]}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"zwei", "=", + RowBox[{ + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{"kkSum", "[", "n", "]"}]}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"eins", "=", + RowBox[{ + RowBox[{"2", + RowBox[{"xkSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"-", "n"}], " ", + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{"xkSum", "[", "n", "]"}]}], "+", + RowBox[{ + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{"kSum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}]}], "-", + RowBox[{"n", " ", "\[CapitalDelta]", " ", + RowBox[{"xySum", "[", "n", "]"}]}], "+", + RowBox[{"\[CapitalDelta]", " ", + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"ySum", "[", "n", "]"}]}]}], ")"}], "/", + RowBox[{"(", + RowBox[{ + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}]}], ")"}]}]}], "+", + RowBox[{"2", "\[CapitalDelta]", " ", + RowBox[{"ykSum", "[", "n", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{"null", "=", + RowBox[{ + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"n", "^", "2"}], + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"xkSum", "[", "n", "]"}], "^", "2"}]}], "-", + RowBox[{"2", "n", " ", + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{"kSum", "[", "n", "]"}], + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{"xkSum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}]}], "+", + RowBox[{ + RowBox[{"\[CapitalDelta]", "^", "2"}], + RowBox[{ + RowBox[{"kSum", "[", "n", "]"}], "^", "2"}], + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}]}], "+", + RowBox[{"2", + RowBox[{"n", "^", "2"}], "\[CapitalDelta]", " ", + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{"xkSum", "[", "n", "]"}], + RowBox[{"xySum", "[", "n", "]"}]}], "-", + RowBox[{"2", "n", " ", "\[CapitalDelta]", " ", + RowBox[{"kSum", "[", "n", "]"}], + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"xySum", "[", "n", "]"}]}], "+", + RowBox[{ + RowBox[{"n", "^", "2"}], + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"xySum", "[", "n", "]"}], "^", "2"}]}], "-", + RowBox[{"2", "n", " ", "\[CapitalDelta]", " ", + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{"xkSum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"ySum", "[", "n", "]"}]}], "+", + RowBox[{"2", "\[CapitalDelta]", " ", + RowBox[{"kSum", "[", "n", "]"}], " ", + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}], + RowBox[{"ySum", "[", "n", "]"}]}], "-", + RowBox[{"2", "n", " ", + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"xySum", "[", "n", "]"}], + RowBox[{"ySum", "[", "n", "]"}]}], "+", + RowBox[{ + RowBox[{"xxSum", "[", "n", "]"}], + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}], + RowBox[{ + RowBox[{"ySum", "[", "n", "]"}], "^", "2"}]}]}], ")"}], "/", + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}]}], ")"}], "^", "2"}]}], + "+", + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"-", "2"}], "n", " ", "\[CapitalDelta]", " ", + RowBox[{"xySum", "[", "n", "]"}], + RowBox[{"xkSum", "[", "n", "]"}]}], "+", + RowBox[{"2", "\[CapitalDelta]", " ", + RowBox[{"kSum", "[", "n", "]"}], + RowBox[{"xySum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}]}], "-", + RowBox[{"2", "n", " ", + RowBox[{ + RowBox[{"xySum", "[", "n", "]"}], "^", "2"}]}], "+", + RowBox[{"2", + RowBox[{"xySum", "[", "n", "]"}], + RowBox[{"xSum", "[", "n", "]"}], + RowBox[{"ySum", "[", "n", "]"}]}]}], ")"}], "/", + RowBox[{"(", + RowBox[{ + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], "^", "2"}]}], ")"}]}], "+", + RowBox[{"yySum", "[", "n", "]"}]}]}], ";"}], "\[IndentingNewLine]", + RowBox[{"Collect", "[", + RowBox[{ + RowBox[{ + RowBox[{"zwei", "+", "eins", "+", "null"}], "//", "FullSimplify"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"kSum", "[", "n", "]"}], ",", + RowBox[{"kkSum", "[", "n", "]"}], ",", + RowBox[{"xkSum", "[", "n", "]"}], ",", + RowBox[{"ykSum", "[", "n", "]"}]}], "}"}]}], + "]"}], "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + RowBox[{"Dkj", "[", "term_", "]"}], ":=", + RowBox[{ + RowBox[{ + RowBox[{"D", "[", + RowBox[{"term", ",", + RowBox[{"kkSum", "[", "n", "]"}]}], "]"}], "2", + RowBox[{"k", "[", "j", "]"}]}], "+", + RowBox[{"D", "[", + RowBox[{"term", ",", + RowBox[{"kSum", "[", "n", "]"}]}], "]"}], "+", + RowBox[{ + RowBox[{"D", "[", + RowBox[{"term", ",", + RowBox[{"xkSum", "[", "n", "]"}]}], "]"}], + RowBox[{"x", "[", "j", "]"}]}], "+", + RowBox[{ + RowBox[{"D", "[", + RowBox[{"term", ",", + RowBox[{"ykSum", "[", "n", "]"}]}], "]"}], + RowBox[{"y", "[", "j", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", + RowBox[{"Collect", "[", + RowBox[{ + RowBox[{"Dkj", "[", + RowBox[{ + RowBox[{"null", "+", "eins", "+", "zwei"}], "//", "FullSimplify"}], + "]"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"k", "[", "j", "]"}], ",", + RowBox[{"kSum", "[", "n", "]"}], ",", + RowBox[{"kkSum", "[", "n", "]"}], ",", + RowBox[{"xkSum", "[", "n", "]"}], ",", + RowBox[{"ykSum", "[", "n", "]"}]}], "}"}]}], "]"}]}], "Input", + CellChangeTimes->{{3.7221399991730747`*^9, 3.72214003458916*^9}, { + 3.72214006467633*^9, 3.722140328207213*^9}, {3.722140362324456*^9, + 3.722140621668283*^9}, {3.7221406636526403`*^9, 3.7221407419356537`*^9}, { + 3.7221407996564207`*^9, 3.722141000862825*^9}, {3.7221410433500147`*^9, + 3.72214104458597*^9}, {3.72214119578513*^9, 3.7221413874945097`*^9}, { + 3.7221414308834963`*^9, 3.722141482863634*^9}, 3.72214153121861*^9, { + 3.722141561384492*^9, 3.722141701041897*^9}, {3.722141742148883*^9, + 3.722141758666154*^9}, {3.722141802432625*^9, 3.7221418264178457`*^9}, { + 3.7221419935704737`*^9, 3.722142337031705*^9}, {3.722142370738872*^9, + 3.722142421033575*^9}, {3.7221424526918*^9, 3.7221428857722263`*^9}, { + 3.722142927809147*^9, 3.722143054461956*^9}, {3.722143085876277*^9, + 3.722143114761683*^9}, {3.7221442363536863`*^9, 3.722144261359272*^9}, { + 3.7221443102314377`*^9, 3.722144365311356*^9}, {3.722144396528411*^9, + 3.722144490172399*^9}, {3.722156703156259*^9, 3.7221567172890882`*^9}, { + 3.7221567760982447`*^9, 3.722156813228517*^9}, {3.722156945290156*^9, + 3.7221569687679987`*^9}, {3.722157088717531*^9, 3.722157089953614*^9}, { + 3.7221571364981127`*^9, 3.722157139619966*^9}}], + +Cell[BoxData[ + FractionBox[ + RowBox[{ + RowBox[{"n", " ", "\[CapitalDelta]", " ", + RowBox[{"xkSum", "[", "n", "]"}]}], "-", + RowBox[{"\[CapitalDelta]", " ", + RowBox[{"kSum", "[", "n", "]"}], " ", + RowBox[{"xSum", "[", "n", "]"}]}], "+", + RowBox[{"n", " ", + RowBox[{"xySum", "[", "n", "]"}]}], "-", + RowBox[{ + RowBox[{"xSum", "[", "n", "]"}], " ", + RowBox[{"ySum", "[", "n", "]"}]}]}], + RowBox[{ + RowBox[{"-", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"]}], "+", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}]]], "Output", + CellChangeTimes->{ + 3.722141701441442*^9, {3.722141745617346*^9, 3.7221417592891903`*^9}, { + 3.722141805105439*^9, 3.722141827627348*^9}, 3.722142036557823*^9, + 3.722142827593992*^9, {3.722142860190987*^9, 3.722142886504695*^9}, { + 3.722142937865679*^9, 3.722142996701111*^9}, {3.7221430448060427`*^9, + 3.722143055142643*^9}, {3.722143086273982*^9, 3.7221431154307823`*^9}, { + 3.7221442427567596`*^9, 3.722144270279621*^9}, {3.72214432029292*^9, + 3.722144333501185*^9}, 3.722144365896276*^9, {3.7221444714330463`*^9, + 3.72214449082406*^9}, 3.722156540743121*^9, 3.722156718027315*^9, { + 3.7221567821830683`*^9, 3.722156813639886*^9}, {3.7221569549220133`*^9, + 3.7221569691948643`*^9}, 3.7221570904503803`*^9, 3.722157140103266*^9}], + +Cell[BoxData[ + RowBox[{ + RowBox[{ + SuperscriptBox["\[CapitalDelta]", "2"], " ", + RowBox[{"kkSum", "[", "n", "]"}]}], "+", + FractionBox[ + RowBox[{ + SuperscriptBox["\[CapitalDelta]", "2"], " ", + SuperscriptBox[ + RowBox[{"kSum", "[", "n", "]"}], "2"], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + FractionBox[ + RowBox[{"n", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + SuperscriptBox[ + RowBox[{"xkSum", "[", "n", "]"}], "2"], " ", + RowBox[{"(", + RowBox[{ + RowBox[{"2", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"]}], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + FractionBox[ + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "4"]}], "-", + RowBox[{"4", " ", "n", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "+", + RowBox[{"2", " ", + SuperscriptBox["n", "2"], " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xxSum", "[", "n", "]"}], "2"]}]}], ")"}], " ", + RowBox[{"ykSum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + FractionBox[ + RowBox[{ + RowBox[{"xkSum", "[", "n", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"-", "2"}], " ", "n", " ", "\[CapitalDelta]", " ", + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"-", "2"}], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"]}], "+", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], " ", + RowBox[{"xySum", "[", "n", "]"}]}], "-", + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"], " ", + RowBox[{"ySum", "[", "n", "]"}]}]}], ")"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + RowBox[{ + RowBox[{"kSum", "[", "n", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{"-", + FractionBox[ + RowBox[{"2", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + RowBox[{"xkSum", "[", "n", "]"}], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], "+", + FractionBox[ + RowBox[{ + RowBox[{ + RowBox[{"-", "2"}], " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"], " ", + RowBox[{"xySum", "[", "n", "]"}]}], "+", + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}], " ", + RowBox[{"ySum", "[", "n", "]"}]}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], ")"}]}], "+", + + FractionBox[ + RowBox[{ + RowBox[{"2", " ", "n", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + SuperscriptBox[ + RowBox[{"xySum", "[", "n", "]"}], "2"]}], "-", + RowBox[{ + SuperscriptBox["n", "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}], " ", + SuperscriptBox[ + RowBox[{"xySum", "[", "n", "]"}], "2"]}], "-", + RowBox[{"2", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"], " ", + RowBox[{"xySum", "[", "n", "]"}], " ", + RowBox[{"ySum", "[", "n", "]"}]}], "+", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}], " ", + SuperscriptBox[ + RowBox[{"ySum", "[", "n", "]"}], "2"]}], "+", + RowBox[{ + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"], " ", + RowBox[{"yySum", "[", "n", "]"}]}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}]], "Output", + CellChangeTimes->{ + 3.722141701441442*^9, {3.722141745617346*^9, 3.7221417592891903`*^9}, { + 3.722141805105439*^9, 3.722141827627348*^9}, 3.722142036557823*^9, + 3.722142827593992*^9, {3.722142860190987*^9, 3.722142886504695*^9}, { + 3.722142937865679*^9, 3.722142996701111*^9}, {3.7221430448060427`*^9, + 3.722143055142643*^9}, {3.722143086273982*^9, 3.7221431154307823`*^9}, { + 3.7221442427567596`*^9, 3.722144270279621*^9}, {3.72214432029292*^9, + 3.722144333501185*^9}, 3.722144365896276*^9, {3.7221444714330463`*^9, + 3.72214449082406*^9}, 3.722156540743121*^9, 3.722156718027315*^9, { + 3.7221567821830683`*^9, 3.722156813639886*^9}, {3.7221569549220133`*^9, + 3.7221569691948643`*^9}, 3.7221570904503803`*^9, 3.722157140108007*^9}], + +Cell[BoxData[ + RowBox[{ + RowBox[{"2", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + RowBox[{"k", "[", "j", "]"}]}], "+", + RowBox[{ + RowBox[{"kSum", "[", "n", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{"-", + FractionBox[ + RowBox[{"2", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + RowBox[{"x", "[", "j", "]"}], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], "+", + FractionBox[ + RowBox[{"2", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], ")"}]}], "+", + + RowBox[{ + RowBox[{"xkSum", "[", "n", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{"-", + FractionBox[ + RowBox[{"2", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], "+", + FractionBox[ + RowBox[{"2", " ", "n", " ", + SuperscriptBox["\[CapitalDelta]", "2"], " ", + RowBox[{"x", "[", "j", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{"2", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"]}], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}], ")"}]}], "-", + + FractionBox[ + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"], " ", + RowBox[{"xySum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "-", + FractionBox[ + RowBox[{"2", " ", "n", " ", "\[CapitalDelta]", " ", + RowBox[{"x", "[", "j", "]"}], " ", + RowBox[{"(", + RowBox[{ + RowBox[{ + RowBox[{"-", "2"}], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"]}], "+", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], " ", + RowBox[{"xySum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + FractionBox[ + RowBox[{ + RowBox[{"(", + RowBox[{ + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "4"]}], "-", + RowBox[{"4", " ", "n", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}]}], "+", + RowBox[{"2", " ", + SuperscriptBox["n", "2"], " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xxSum", "[", "n", "]"}], "2"]}]}], ")"}], " ", + RowBox[{"y", "[", "j", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "-", + FractionBox[ + RowBox[{"2", " ", "\[CapitalDelta]", " ", + RowBox[{"x", "[", "j", "]"}], " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "3"], " ", + RowBox[{"ySum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]], "+", + FractionBox[ + RowBox[{"2", " ", "\[CapitalDelta]", " ", + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], " ", + RowBox[{"xxSum", "[", "n", "]"}], " ", + RowBox[{"ySum", "[", "n", "]"}]}], + SuperscriptBox[ + RowBox[{"(", + RowBox[{ + SuperscriptBox[ + RowBox[{"xSum", "[", "n", "]"}], "2"], "-", + RowBox[{"n", " ", + RowBox[{"xxSum", "[", "n", "]"}]}]}], ")"}], "2"]]}]], "Output", + CellChangeTimes->{ + 3.722141701441442*^9, {3.722141745617346*^9, 3.7221417592891903`*^9}, { + 3.722141805105439*^9, 3.722141827627348*^9}, 3.722142036557823*^9, + 3.722142827593992*^9, {3.722142860190987*^9, 3.722142886504695*^9}, { + 3.722142937865679*^9, 3.722142996701111*^9}, {3.7221430448060427`*^9, + 3.722143055142643*^9}, {3.722143086273982*^9, 3.7221431154307823`*^9}, { + 3.7221442427567596`*^9, 3.722144270279621*^9}, {3.72214432029292*^9, + 3.722144333501185*^9}, 3.722144365896276*^9, {3.7221444714330463`*^9, + 3.72214449082406*^9}, 3.722156540743121*^9, 3.722156718027315*^9, { + 3.7221567821830683`*^9, 3.722156813639886*^9}, {3.7221569549220133`*^9, + 3.7221569691948643`*^9}, 3.7221570904503803`*^9, 3.722157140113709*^9}] +}, Open ]] +}, +WindowSize->{1404, 906}, +WindowMargins->{{Automatic, 270}, {Automatic, 55}}, +FrontEndVersion->"10.0 for Linux x86 (64-bit) (September 9, 2014)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[CellGroupData[{ +Cell[580, 22, 13616, 382, 561, "Input"], +Cell[14199, 406, 1352, 29, 51, "Output"], +Cell[15554, 437, 6191, 176, 190, "Output"], +Cell[21748, 615, 5735, 163, 143, "Output"] +}, Open ]] +} +] +*) + +(* End of internal cache information *) |