(* 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[ 123263, 3495] NotebookOptionsPosition[ 110565, 3066] NotebookOutlinePosition[ 111051, 3085] CellTagsIndexPosition[ 111008, 3082] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{" ", RowBox[{"(*", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", RowBox[{ "A", " ", "program", " ", "to", " ", "solve", " ", "the", " ", "truncated", " ", "Hamburger", " ", "moment", " ", "problem", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", "Lawrence", " ", "Fialkow"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "*)"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{ "Compute", " ", "the", " ", "densities", " ", "and", " ", "nodes", " ", "\[IndentingNewLine]", " ", "for", " ", "a", " ", "one"}], "-", RowBox[{ "dimensional", " ", "real", " ", "truncated", " ", "power", " ", "moment", " ", RowBox[{"problem", ".", "\[IndentingNewLine]", "Moments"}], " ", "of", " ", "orders", " ", "0"}]}], ",", RowBox[{"...", "."}], ",", " ", RowBox[{ RowBox[{"m", " ", "must", " ", "be", " ", "pre"}], "-", RowBox[{"loaded", " ", "into", "\[IndentingNewLine]", " ", RowBox[{"bb", "[", "0", "]"}]}]}], ",", "...", ",", RowBox[{"bb", "[", "m", "]"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"with", " ", RowBox[{"bb", "[", "0", "]"}]}], " ", ">", " ", RowBox[{"0", " ", RowBox[{ RowBox[{"(", RowBox[{"the", " ", "mass"}], ")"}], ".", " ", "The"}], " ", "program", " ", "will", "\[IndentingNewLine]", "determine", " ", "whether", " ", "or", " ", "not", " ", "there", " ", "exists", " ", "a", " ", "positive", " ", "Borel", " ", "measure", " ", "u", " ", "on", " ", "the", " ", "real", " ", "line", " ", "such", " ", "that", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"bb", "[", "i", "]"}]}]}], " ", "=", " ", RowBox[{ RowBox[{"Integral", "[", RowBox[{"x", "^", "i"}], "]"}], "du", " ", RowBox[{ RowBox[{"(", RowBox[{"0", "\[LessEqual]", "i", "\[LessEqual]", "m"}], ")"}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], " ", "such", " ", "a", " ", "representing", " ", "measure", " ", "exists"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{ "then", " ", "the", " ", "program", " ", "will", " ", "compute", " ", "a", " ", "finitely", " ", "atomic", " ", "representing", " ", "\[IndentingNewLine]", " ", "measure", " ", "with", " ", "the", " ", "fewest", " ", "possible", " ", RowBox[{ "atoms", ".", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", "If"}], " ", "m"}], " ", "=", " ", RowBox[{"2", "n"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{ "the", " ", "moment", " ", "data", " ", "will", " ", "fill", " ", "out", " ", "a", " ", "Hankel", " ", "matrix", " ", "\[IndentingNewLine]", " ", "H"}], " ", "\[Equal]", " ", RowBox[{"H", RowBox[{"(", "n", ")"}]}]}], ":=", " ", RowBox[{ RowBox[{"(", RowBox[{"bb", "[", RowBox[{"i", "+", "j"}], "]"}], ")"}], " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"0", "\[LessEqual]", "i"}], ",", RowBox[{"j", "\[LessEqual]", "n"}]}], ")"}], ".", "\[IndentingNewLine]", "If"}], " ", "H", " ", "is", " ", "positive", " ", "definite"}]}], ",", RowBox[{ RowBox[{ "there", " ", "are", " ", "infinitely", " ", "many", " ", "representing", " ", "measures"}], ";", " ", "\[IndentingNewLine]", " ", RowBox[{"to", " ", "fix", " ", "one"}]}], ",", " ", RowBox[{ RowBox[{ "an", " ", "extra", " ", "\"\\"", " ", "should", " ", "be", " ", "pre"}], "-", RowBox[{"loaded", " ", "into", " ", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"bb", "[", RowBox[{ RowBox[{"2", "n"}], "+", "1"}], "]"}], ".", " ", "An"}], " ", "auxiliary", " ", "column", " ", "vector", " ", "v", " ", "will", " ", "then", " ", "contain", " ", "\[IndentingNewLine]", " ", RowBox[{"bb", "[", RowBox[{"n", "+", "1"}], "]"}]}]}], ",", "...", ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{"bb", "[", RowBox[{ RowBox[{"2", "n"}], "+", "1"}], "]"}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], " ", "m"}], " ", "=", " ", RowBox[{ RowBox[{"2", "n"}], "+", "1"}]}], ",", " ", RowBox[{"the", " ", "moment", " ", "data", " ", RowBox[{"bb", "[", "0", "]"}]}], ",", RowBox[{ RowBox[{"...", RowBox[{"bb", "[", RowBox[{"2", "n"}], "]"}], " ", "will", " ", "fill", " ", "out"}], "\[IndentingNewLine]", " ", RowBox[{"the", " ", "Hankel", " ", "matrix", " ", "H", RowBox[{"(", "n", ")"}], " ", RowBox[{"(", RowBox[{"as", " ", "above"}], ")"}], "and"}], " ", "\[IndentingNewLine]", " ", RowBox[{"bb", "[", RowBox[{"n", "+", "1"}], "]"}]}], ",", "...", ",", RowBox[{ RowBox[{ RowBox[{"bb", "[", RowBox[{ RowBox[{"2", "n"}], "+", "1"}], "]"}], " ", "\[IndentingNewLine]", " ", "will", " ", "reside", " ", "in", " ", "the", " ", "auxiliary", " ", "column", " ", RowBox[{"v", ".", " ", "\[IndentingNewLine]", "If"}], " ", "m"}], " ", "=", " ", RowBox[{ RowBox[{"2", "n"}], "+", RowBox[{ "1", " ", "and", " ", "the", " ", "moments", " ", "correspond", " ", "to", " ", "Lebesgue", " ", "measure", " ", RowBox[{"on", " ", "[", RowBox[{"a", ",", "b"}], "]"}]}]}]}], ",", " ", "\[IndentingNewLine]", " ", RowBox[{ "the", " ", "resulting", " ", "nodes", " ", "and", " ", "weights", " ", "correspond", " ", "to", " ", "classical", " ", "Gaussian", " ", "\[IndentingNewLine]", " ", RowBox[{ "quadrature", ".", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "The"}], " ", "method", " ", "we", " ", "use", " ", "is", " ", "based", " ", RowBox[{"on", " ", "[", "CF", "]"}], " ", RowBox[{"R", ".", "Curto"}], " ", "and", " ", RowBox[{"L", ".", "Fialkow"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{"Houston", " ", RowBox[{"J", ".", " ", "Math", ".", " ", "17"}], RowBox[{"(", "1991", ")"}]}], ",", " ", RowBox[{"603", "-", "635"}], ",", " ", RowBox[{ RowBox[{"MR", " ", "93", RowBox[{"a", ":", "47016."}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"For", " ", "m"}]}], " ", "=", " ", RowBox[{"2", "n"}]}], ",", " ", RowBox[{ RowBox[{ "a", " ", "representing", " ", "measure", " ", "exists", " ", "if", " ", "and", " ", "only", " ", "if", "\[IndentingNewLine]", " ", "the", " ", "Hankel", " ", "H", RowBox[{"(", "n", ")"}], " ", "matrix", " ", "is", " ", "positive", " ", "semidefinite", " ", "and", " ", "\[IndentingNewLine]", " ", "\"\\""}], ";", " ", "equivalently"}], ",", " ", RowBox[{ RowBox[{"H", RowBox[{"(", "n", ")"}], " ", "admits", " ", "a", " ", "\[IndentingNewLine]", " ", "positive", " ", "semidefinite", " ", "Hankel", " ", "extension", " ", "H", RowBox[{ RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", "For"}], " ", "m"}], "=", RowBox[{ RowBox[{"2", "n"}], "+", "1"}]}], ",", " ", RowBox[{ RowBox[{ "a", " ", "representing", " ", "measure", " ", "exists", " ", "if", " ", "and", " ", "only", " ", "if", "\[IndentingNewLine]", " ", "H", RowBox[{"(", "n", ")"}], " ", "is", " ", "positive", " ", "semidefinite", " ", "and", " ", "v", " ", "belongs", " ", "to", " ", "Ran", " ", "H", RowBox[{"(", "n", ")"}]}], ";", "\[IndentingNewLine]", " ", "equivalently"}], ",", " ", RowBox[{ "the", " ", "partially", " ", "defined", " ", "matrix", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"(", " ", RowBox[{"H", RowBox[{"(", "n", ")"}], " ", "v"}], " ", ")"}], " ", "\[IndentingNewLine]", " ", RowBox[{"(", " ", RowBox[{ RowBox[{"v", "^", "T"}], " ", "*"}], " ", ")"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "admits", " ", "a", " ", "positive", " ", "semidefinite", " ", "Hankel", " ", "completion", " ", "H", RowBox[{ RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", "The"}], " ", "columns", " ", "of", " ", "the", " ", "above", " ", "Hankel", " ", "matrices", " ", "are", " ", "denoted", " ", "\[IndentingNewLine]", " ", "1"}], ",", "t", ",", RowBox[{"t", "^", "2"}], ",", "...", ",", RowBox[{ RowBox[{ RowBox[{"t", "^", RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}]}], ".", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", "When"}], " ", "a", " ", "measure", " ", "exists"}], ",", " ", RowBox[{ "we", " ", "find", " ", "a", " ", "minimal", " ", "i", " ", "for", " ", "which", "\[IndentingNewLine]", " ", "column", " ", RowBox[{"t", "^", "i"}], " ", "is", " ", "linearly", " ", "dependent", " ", "on", " ", "columns", " ", "to", " ", "its", " ", "left"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"t", "^", "i"}], " ", "=", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0", " ", "1"}], " ", "+", " ", RowBox[{"a1", " ", "t"}], " ", "+"}], " ", "..."}], ".", " ", RowBox[{"+", " ", "a_"}]}], RowBox[{"{", "i", "}"}], " ", RowBox[{ RowBox[{"t", "^", RowBox[{"{", RowBox[{"i", "-", "1"}], "}"}]}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "The"}], " ", "nodes", " ", "of", " ", "a", " ", "representing", " ", "measure", " ", RowBox[{"(", RowBox[{"with", " ", "the", " ", "fewest", " ", "nodes"}], ")"}]}], " ", "\[IndentingNewLine]", " ", RowBox[{ "consist", " ", "of", " ", "the", " ", "i", " ", "distinct", " ", "real", " ", "roots", " ", "of", " ", "the", " ", "polynomial"}], "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"p", RowBox[{"(", "t", ")"}]}], " ", "=", " ", RowBox[{ RowBox[{"t", "^", "i"}], " ", "-", " ", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"a0", " ", "1"}], " ", "+", " ", RowBox[{"a1", " ", "t"}], " ", "+"}], " ", "..."}], ".", " ", RowBox[{"+", " ", "a_"}]}], RowBox[{"{", "i", "}"}], " ", RowBox[{"t", "^", RowBox[{"{", RowBox[{"i", "-", "1"}], "}"}]}]}], ")"}], ".", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", "The"}], " ", "densities", " ", "of", " ", "the", " ", "measure", " ", "are", " ", "then", " ", "computed", " ", "using", " ", "a", " ", "Vandermonde"}]}]}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"matrix", " ", "based", " ", "on", " ", "the", " ", RowBox[{"nodes", ".", " ", RowBox[{"See", " ", "[", "CF", "]"}]}], " ", "for", " ", "complete", " ", RowBox[{ "details", ".", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "All"}], " ", "the", " ", "way", " ", "down"}], ",", " ", RowBox[{ "the", " ", "Program", " ", "will", " ", "compute", " ", "the", " ", "integral", " ", "approximation"}]}]}]}]}], " ", "*)"}], " "}]], "Input", CellChangeTimes->{{3.435692881184744*^9, 3.435692947239726*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"g", "[", "x_", "]"}], ":=", RowBox[{"x", "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Sin", "[", RowBox[{"4", "x"}], "]"}]}], ")"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "=", "1"}], ";"}]}]}]], "Input", CellChangeTimes->{{3.42115225078125*^9, 3.4211522514375*^9}, { 3.42115296884375*^9, 3.42115296921875*^9}, {3.42115335840625*^9, 3.421153369296875*^9}, {3.421153481625*^9, 3.421153487515625*^9}, { 3.4356919078451505`*^9, 3.4356919085962305`*^9}, 3.435692305627133*^9, 3.4356940483330207`*^9, {3.4356941165410995`*^9, 3.4356941295698338`*^9}, 3.435694815546219*^9, 3.435695446173016*^9, {3.4356956600705853`*^9, 3.435695667721587*^9}, {3.435696048278802*^9, 3.435696050191552*^9}, { 3.435696083519475*^9, 3.435696084480858*^9}, 3.4356961605101824`*^9, { 3.4356963447551136`*^9, 3.435696363421955*^9}, {3.435696478287123*^9, 3.4356964789480734`*^9}, 3.435696627271352*^9, {3.4356966658167777`*^9, 3.4356966661973248`*^9}, {3.435696941102619*^9, 3.4356969473516045`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"g", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "a", ",", "b"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.42115298003125*^9, 3.42115298059375*^9}, { 3.4356935397116594`*^9, 3.4356935397717457`*^9}, {3.4356941491479855`*^9, 3.435694157349779*^9}, {3.435694878036075*^9, 3.4356948960219374`*^9}, { 3.4356954599528303`*^9, 3.435695469136035*^9}, {3.435696165657584*^9, 3.435696174680558*^9}, {3.4356963504432926`*^9, 3.435696352556331*^9}}], Cell[BoxData[ GraphicsBox[{{}, {}, {Hue[0.67, 0.6, 0.6], LineBox[CompressedData[" 1:eJwVjXk41IkDh2dc6RqNqWWIluxGh2QliT7T41pKnlypxYoo7HZIqxJF7mtl 5ScpZ6lVxmZYsYVx5Oco14TNSK7MzPc7sQxNyNo/Ps/71/t+tLzPOvrKUCiU M8v7j3a+E521Apf9FsFjZf9RzkLt3DumEfx0VHffZBjhu5zM7DKmJTgjqUfU 11riYHvv07tMZ1jP6auEUZxx9OTc8zTmSaj0dZxO/eAD/s5Yi2RmMB7Z2Fy8 XnEBuRscYhKYUSilSjRNjt5AhGLZlnhmOjwNdR7aF6TB7Vgee3KqEEMFramd MvlYvRThbqPJhvWifl7x+kf45oh4oj6Rg6ClFZXOZmyEvNqLzJlnMD5f6Fef /RQqHPoglVqD6cLnVK0t5agYtmh7bcbF5KkoH9U//gQ34K76MaIB/IPdBkz5 Kki+NVd68vNL+L9S3Hhpw1+QkRavU/+mBfd4un4PzF/AeMmrwqmkDfOLMXWp arVoizJ61bT1NTRe+/3QT6vDplSR9JG4A197p1hZqXIhmns3yDPogteiYymN UY9CYXULLaUbxV3i23Z6DaBpFH0cHe1BrELcnn6LRiT5l/vl6rwBZ77XwNe1 CbOs4tHT13rBYMdZ6vz6EsGGDZyv6vvQqXbh8mR9M96VNCR2av2N/ta0GTfd FswH9NzRu/IWdWP5DFpuK7YdWPHFr3oAayduZoDZDpt8rVN/qAzC09egub77 FUI0ftR+7/4On2tqj8XZdWA74bK6134IST3XBHqmnWAoTSo2fB7C/USrpQXX LsjV3GFvzn6P9HKj8zGh3Qg0qu5feXAY8XHaCoZ/96DY1jv3xewwlnjpwf8/ 9gYSkdq68YwRdMX3eHw/0YtyJxvZdMtRxHtEWG9q68e176NzOOOjCKRknHFv fgstvl1fQfQYWL9XxpV84sN0T1Q603Acr8wKc21chuCu+VpK7R5HYFr7RGbD e0hakofPRXyAplFB3b6UEWTKeQY76kxgprF1Y93VMTAGy/NlGibgX+RiLnny AfJhEc57zwvg4Zow4RAiBGeKkNZcECBZfYAsiBTipJ9bjvUvAqgdDTi4lCxE g8NOoVOoAHeCzXTbCoWI0uZfOxMtQFXCVmZNlxByzSbFBbcFkHdtPK9kIIIM Y5JK4wpQw766O25SBMojT/awshDat0vHfBJINBG9Z3I2CJFe2Rw1nEkiyeCI vrvq8u+cPz+wiIRKpcUTnoYQHvTp0XsNJPRf6hY36wpB00m5ELtEwn3snwcl +4V4XO1KBIaI8Uwr9t6VACGCKD9/fH32I4Ky2MnKXCEe8O/Id3An8edCViy3 QYjYQ51DAa2TWPCMiQh6KYSLU6LHmp5JxG72uNjVJkTHXR9Xn7FJZD9e5ZHW K0SO5List+IUGl/4blcmhficaef80GEKqiPqrXRVEfSdn0oSRqbwfFucIv2M CNsYX/PdtKdh3KPSnnZOBFPFWJr29mmUXi26uf6CCB7d0qp/dk8jv71JTfXS sr+LVvC77TTizsrv2BQpQoXt4aiL56fhWBZ5ZEeGCI6uAfbh3Gl8MA3Lsn0h gt3pgPXpATOg2wVtj6QRsBmJceD0SJBbp7TalE7gWaiNR857CQz2PhFMMQjc YH5qvyWW4LDuxIMTTAJF4+I19xVnkaDgqXVAh4DmtfpfDpvPQq7e9iuKKYGW zT7jfQ9nMbtPixLuS2Ag/Vbdzvg5DOzo6L78F4Gtkt/c7IKkyBHRw2RrCAht beXORkjh/cjp2+Q6Apa8onV5qVIIdHov5TYRYFFT4newpZhVH9R42UGg0VuP IyCkoK8iTq0fI9C3+yfpQsBnWI+vWChZS+Ky6eUMuaB5rCy0vW+yjoRiSN8u SeQ82k4kHuYqk6AfkrWX/DYPJz4tj6dCgvDystepmIdXzwbrBS0Sfif7YzA/ j1Du5lRbYxILhp01oXELKL0HnVHPZZ9aHp3JXsT0lekVJ06QyDJTDgd3EcZH i0R8HxLYuLJjrmcR1UpKZb2nSZTL1/CyPy+i6frggdag5b6XBbfK+gveeof9 +DSGRHPGD+7Hhr9AYUt11vUSEg9E7ofeMygsW9mz4YulJBpXbzPx0qSwkt5p e18pIzFO1FsJdCksemaCXnAliXDRgJS5n8LauPJ45SkuCZM9PMO50xSWoegT 7/AbEndrebce11JYHmxjusYXErxfa2i+l6isiuOfaB0UMXbN/c/FKprKoilU rbkhK0ZLUlred2lUVq27uaJAUQyLJv/bpo+pLO1Vlkschhjc2VGLmSEqK3qT QtqAthj7ttiNjm6XYf0L8ehwvA== "]]}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0}, PlotRange->{{0, 1}, {0., 2.271920951378801}}, PlotRangeClipping->True, PlotRangePadding->{ Scaled[0.02], Scaled[0.02]}]], "Output", CellChangeTimes->{ 3.4356923089819565`*^9, 3.435692389577848*^9, 3.435692569967235*^9, 3.4356929542498064`*^9, 3.4356930724998417`*^9, 3.4356935435271454`*^9, 3.4356940542815742`*^9, {3.4356941319031887`*^9, 3.435694177418637*^9}, 3.4356948182400928`*^9, {3.435694880229229*^9, 3.435694919285389*^9}, { 3.4356954503690495`*^9, 3.4356954715495057`*^9}, 3.435695674921941*^9, 3.4356960526651087`*^9, 3.4356960860531187`*^9, {3.4356961623928895`*^9, 3.4356961804889107`*^9}, {3.4356963597266417`*^9, 3.435696367718133*^9}, 3.4356964801898594`*^9, 3.4356966290038433`*^9, 3.4356966698425665`*^9, 3.4356969488737936`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"choose", " ", "f"}], ",", " ", "measure"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "xx_", "]"}], " ", "=", " ", RowBox[{"E", "^", RowBox[{"-", "x"}]}]}], ";"}]}]], "Input", CellChangeTimes->{{3.421148905671875*^9, 3.42114891371875*^9}, { 3.42115085215625*^9, 3.42115088084375*^9}, {3.42115094278125*^9, 3.4211509455625*^9}, {3.421150998484375*^9, 3.4211510215625*^9}, { 3.421153815578125*^9, 3.421153824515625*^9}, {3.421406399*^9, 3.4214064035625*^9}, {3.4356922478140016`*^9, 3.435692265629619*^9}, { 3.4356923558393345`*^9, 3.435692369649192*^9}, 3.435692489872064*^9, { 3.4356925416965837`*^9, 3.435692555716744*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "2", "]"}], " ", RowBox[{"(*", "test", "*)"}]}]], "Input", CellChangeTimes->{{3.421151026453125*^9, 3.42115102921875*^9}, { 3.435691929295995*^9, 3.4356919513076468`*^9}}], Cell[BoxData[ SuperscriptBox["\[ExponentialE]", RowBox[{"-", "x"}]]], "Output", CellChangeTimes->{ 3.4356919532504396`*^9, 3.435692311365384*^9, 3.435692391240238*^9, { 3.435692550499242*^9, 3.4356925711188912`*^9}, 3.435692956172571*^9, 3.4356930743525057`*^9, 3.4356935467517824`*^9, 3.435694178620365*^9, 3.4356948224861984`*^9, {3.4356949066572304`*^9, 3.4356949208175917`*^9}, 3.4356954872620993`*^9, 3.435695676233827*^9, 3.435696053506318*^9, 3.4356960868041983`*^9, 3.4356961844245696`*^9, 3.4356963735164704`*^9, 3.43569648201248*^9, 3.4356966301554995`*^9, 3.4356966700428543`*^9, 3.435696950175666*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ "initialization", " ", "for", " ", "Gaussian", " ", "quadrature", " ", RowBox[{"over", " ", "[", RowBox[{"a", ",", "b"}], "]"}], " ", "of", " ", "degree", " ", "m"}], "=", RowBox[{ RowBox[{"2", "n"}], "+", "1"}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "m"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bb", "[", "i", "]"}], " ", "=", " ", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "i"}], " ", RowBox[{"f", "[", "x", "]"}]}], " ", ",", RowBox[{"{", RowBox[{"x", ",", "a", ",", "b"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"bb", "[", "i", "]"}], "]"}]}]}], "]"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.421148905671875*^9, 3.42114891371875*^9}, { 3.42115085215625*^9, 3.42115088084375*^9}, {3.42115094278125*^9, 3.4211509455625*^9}, 3.421150998484375*^9, {3.421151117796875*^9, 3.421151132140625*^9}, {3.421151188140625*^9, 3.421151188515625*^9}, { 3.421153126046875*^9, 3.4211531284375*^9}, {3.42115364790625*^9, 3.421153745171875*^9}, {3.42115378421875*^9, 3.42115379796875*^9}, { 3.42140674778125*^9, 3.421406759328125*^9}, {3.421408312875*^9, 3.421408315171875*^9}, {3.4356922870504208`*^9, 3.4356922874710255`*^9}, { 3.435692966507432*^9, 3.4356929956793795`*^9}, {3.435693589272925*^9, 3.435693589322997*^9}, {3.4356936436711454`*^9, 3.4356936441918945`*^9}, { 3.435694171890688*^9, 3.4356941743842735`*^9}, {3.4356943246703744`*^9, 3.435694326362808*^9}, {3.4356943750428066`*^9, 3.4356943752631235`*^9}, { 3.4356944214194927`*^9, 3.4356944215096226`*^9}, {3.4356944661237745`*^9, 3.435694466544379*^9}, {3.4356945324291167`*^9, 3.4356945328997936`*^9}, { 3.4356948875397406`*^9, 3.4356949150993695`*^9}, {3.435695134725176*^9, 3.4356951619743586`*^9}, {3.435695198146371*^9, 3.4356952276888514`*^9}, { 3.4356952594144707`*^9, 3.435695259785003*^9}, {3.4356953015049934`*^9, 3.4356953029170237`*^9}, {3.4356954814337187`*^9, 3.43569549409192*^9}, { 3.4356957867327166`*^9, 3.435695786812832*^9}, {3.4356958297545795`*^9, 3.435695830135126*^9}, {3.4356958604587297`*^9, 3.4356959116323137`*^9}, { 3.4356963190381346`*^9, 3.435696339687827*^9}}], Cell[CellGroupData[{ Cell[BoxData["0.6321205588285586`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.4356969508266015`*^9}], Cell[BoxData["0.26424111765711567`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.435696950906717*^9}], Cell[BoxData["0.16060279414278858`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.43569695102689*^9}], Cell[BoxData["0.11392894125692303`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.4356969511470623`*^9}], Cell[BoxData["0.08783632385624926`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.4356969512672353`*^9}], Cell[BoxData["0.07130217810980331`"], "Print", CellChangeTimes->{ 3.4356923167331023`*^9, 3.4356925717497983`*^9, 3.435693075163672*^9, 3.435693547673107*^9, 3.4356936007994995`*^9, 3.435693644942974*^9, 3.4356941793414016`*^9, 3.4356943276246223`*^9, 3.435694376514923*^9, 3.4356944227313795`*^9, 3.435694467375574*^9, 3.4356945337710466`*^9, 3.435694823277336*^9, {3.4356949074583826`*^9, 3.4356949215386286`*^9}, { 3.4356951355864143`*^9, 3.435695162745467*^9}, {3.4356952012508354`*^9, 3.4356952285701184`*^9}, 3.4356952608465295`*^9, 3.435695303848363*^9, { 3.435695488033208*^9, 3.43569549534372*^9}, 3.435695676954864*^9, 3.4356957880145597`*^9, 3.43569583107648*^9, {3.43569586328279*^9, 3.4356959123833933`*^9}, 3.4356960539369373`*^9, 3.4356960871647167`*^9, 3.435696185916715*^9, 3.435696374057248*^9, 3.4356964827635603`*^9, 3.4356966306962767`*^9, 3.435696670203085*^9, 3.4356969513773937`*^9}] }, Open ]] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"THMP", "[", "m_", "]"}], ":=", RowBox[{"(", " ", RowBox[{"(*", RowBox[{ RowBox[{ "Solve", " ", "the", " ", "Hamburger", " ", "moment", " ", "problem", " ", "for", " ", "moment", " ", "data", " ", "\[IndentingNewLine]", " ", RowBox[{"bb", "[", "0", "]"}]}], ",", "...", ",", RowBox[{"bb", "[", "m", "]"}]}], "*)"}], " "}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "build", " ", "the", " ", "moment", " ", "table", " ", "from", " ", "the", " ", "moment", " ", RowBox[{"data", ":"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"n", "=", " ", RowBox[{"Floor", "[", RowBox[{"m", "/", "2"}], "]"}]}], ";"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"n", "+", "1"}]}], ",", RowBox[{"i", "=", RowBox[{"i", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"n", "+", "1"}]}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Mtab", "[", RowBox[{"i", ",", "j"}], "]"}], "=", RowBox[{"bb", "[", RowBox[{"i", "+", "j"}], "]"}]}]}], "]"}]}], "]"}], ";"}], " "}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"build", " ", "the", " ", "moment", " ", RowBox[{"(", "Hankel", ")"}], " ", "matrix", " ", "with", " ", "an", " ", "auxiliary", " ", "column", " ", "on", " ", "the", " ", RowBox[{"right", ".", " ", "In"}], " ", "the", " ", "case", " ", "m"}], " ", "=", " ", RowBox[{"2", "n"}]}], ",", " ", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{ "this", " ", "extra", " ", "column", " ", "is", " ", "used", " ", "to", " ", "compute", " ", "a", " ", "representing", " ", "\[IndentingNewLine]", "measure", " ", "with", " ", "a", " ", "prescribed", " ", "moment", " ", "of", " ", "order", " ", "m"}], "+", RowBox[{ "1", " ", "\[IndentingNewLine]", "if", " ", "the", " ", "Hankel", " ", "matrix", " ", "is", " ", "positive", " ", RowBox[{"definite", ".", " ", "In"}], " ", "that", " ", "case"}]}], ",", " ", "\[IndentingNewLine]", " ", RowBox[{"the", " ", "free", " ", "choice", " ", RowBox[{"bb", "[", RowBox[{"m", "+", "1"}], "]"}], " ", "is", " ", "the", " ", "final", " ", "entry", " ", "in", " ", "the", " ", "auxiliary", " ", RowBox[{"column", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"H", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Mtab", "[", RowBox[{"r", ",", "s"}], "]"}], ",", RowBox[{"{", RowBox[{"r", ",", "0", ",", "n"}], "}"}], ",", RowBox[{"{", RowBox[{"s", ",", "0", ",", RowBox[{"n", "+", "1"}]}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"Hankel", " ", "matrix"}], " ", "+", " ", RowBox[{"extra", " ", "column"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"m", "\[Equal]", RowBox[{"2", "n"}]}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", " ", RowBox[{"MatrixForm", "[", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}]}], "]"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"MatrixForm", "[", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "2"}]}], "]"}]}], "]"}], "]"}], "]"}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print", CellChangeTimes->{ 3.4356923252453423`*^9, 3.4356925784894896`*^9, 3.435693077136509*^9, 3.4356935495858574`*^9, 3.4356936029425807`*^9, 3.4356936466153793`*^9, 3.435694181714814*^9, 3.4356943309994755`*^9, 3.4356943796294017`*^9, 3.4356944259159584`*^9, 3.435694471952155*^9, 3.435694537646619*^9, 3.4356948271929665`*^9, 3.435694927226808*^9, {3.4356951381801443`*^9, 3.4356951649886928`*^9}, {3.435695205006235*^9, 3.435695231334093*^9}, 3.435695265062592*^9, 3.435695307854123*^9, 3.435695497536874*^9, 3.435695679037859*^9, 3.435695790147627*^9, 3.435695833409835*^9, { 3.4356958660868225`*^9, 3.435695915868405*^9}, 3.435696056380451*^9, 3.4356960898686047`*^9, 3.4356961896721153`*^9, 3.435696377632389*^9, 3.435696486649147*^9, 3.435696632058235*^9, 3.435696671084352*^9, 3.4356969526191792`*^9}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0.6321205588285586`", "0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`"}, {"0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`"}, {"0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`", "0.07130217810980331`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print", CellChangeTimes->{ 3.4356923252453423`*^9, 3.4356925784894896`*^9, 3.435693077136509*^9, 3.4356935495858574`*^9, 3.4356936029425807`*^9, 3.4356936466153793`*^9, 3.435694181714814*^9, 3.4356943309994755`*^9, 3.4356943796294017`*^9, 3.4356944259159584`*^9, 3.435694471952155*^9, 3.435694537646619*^9, 3.4356948271929665`*^9, 3.435694927226808*^9, {3.4356951381801443`*^9, 3.4356951649886928`*^9}, {3.435695205006235*^9, 3.435695231334093*^9}, 3.435695265062592*^9, 3.435695307854123*^9, 3.435695497536874*^9, 3.435695679037859*^9, 3.435695790147627*^9, 3.435695833409835*^9, { 3.4356958660868225`*^9, 3.435695915868405*^9}, 3.435696056380451*^9, 3.4356960898686047`*^9, 3.4356961896721153`*^9, 3.435696377632389*^9, 3.435696486649147*^9, 3.435696632058235*^9, 3.435696671084352*^9, 3.43569695268928*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "Check", " ", "that", " ", "the", " ", "Hankel", " ", "matrix", " ", "is", " ", "positive", " ", "semidefinite", " ", "and", " ", "recursively", " ", RowBox[{"generated", ".", " ", "First"}]}], ",", " ", RowBox[{ "use", " ", "nested", " ", "determinants", " ", "to", " ", "find", " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", "corner"}], ",", " ", RowBox[{"with", " ", "size", " ", RowBox[{"i", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"det", " ", "=", " ", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"i", " ", "=", " ", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"det", " ", ">", " ", "0"}], ")"}], " ", "&&", " ", RowBox[{"(", RowBox[{"i", "\[LessEqual]", " ", RowBox[{"n", "+", "1"}]}], ")"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"det", " ", "=", " ", RowBox[{"Det", "[", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", "i"}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", "i"}], "]"}]}], "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"N", "[", "det", "]"}], "]"}], ";", "\[IndentingNewLine]", " ", RowBox[{"i", " ", "=", " ", RowBox[{"i", "+", " ", "1"}]}], ";"}]}], "]"}], ";"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["0.6321205588285586`"], "Print", CellChangeTimes->{ 3.4356923264170275`*^9, 3.435692579601088*^9, 3.435693078017776*^9, 3.435693550336938*^9, 3.435693603823848*^9, 3.435693646855725*^9, 3.435694182355736*^9, 3.435694331800627*^9, 3.435694380029978*^9, 3.4356944267171106`*^9, 3.4356944729836383`*^9, 3.4356945385078573`*^9, 3.4356948280041327`*^9, 3.4356949280980606`*^9, {3.435695138480576*^9, 3.43569516536924*^9}, {3.4356952052866383`*^9, 3.4356952320551295`*^9}, 3.435695265643427*^9, 3.4356953082146416`*^9, 3.435695498317997*^9, 3.4356956798590403`*^9, 3.4356957908085775`*^9, 3.4356958340407424`*^9, { 3.435695866757787*^9, 3.435695916529355*^9}, 3.435696056710926*^9, 3.4356960902391376`*^9, 3.435696190373123*^9, 3.435696378483613*^9, 3.4356964875304146`*^9, 3.43569663247884*^9, 3.4356966713847837`*^9, 3.4356969533001585`*^9}], Cell[BoxData["0.031696959722285825`"], "Print", CellChangeTimes->{ 3.4356923264170275`*^9, 3.435692579601088*^9, 3.435693078017776*^9, 3.435693550336938*^9, 3.435693603823848*^9, 3.435693646855725*^9, 3.435694182355736*^9, 3.435694331800627*^9, 3.435694380029978*^9, 3.4356944267171106`*^9, 3.4356944729836383`*^9, 3.4356945385078573`*^9, 3.4356948280041327`*^9, 3.4356949280980606`*^9, {3.435695138480576*^9, 3.43569516536924*^9}, {3.4356952052866383`*^9, 3.4356952320551295`*^9}, 3.435695265643427*^9, 3.4356953082146416`*^9, 3.435695498317997*^9, 3.4356956798590403`*^9, 3.4356957908085775`*^9, 3.4356958340407424`*^9, { 3.435695866757787*^9, 3.435695916529355*^9}, 3.435696056710926*^9, 3.4356960902391376`*^9, 3.435696190373123*^9, 3.435696378483613*^9, 3.4356964875304146`*^9, 3.43569663247884*^9, 3.4356966713847837`*^9, 3.4356969533602448`*^9}], Cell[BoxData["0.00010667579002353953`"], "Print", CellChangeTimes->{ 3.4356923264170275`*^9, 3.435692579601088*^9, 3.435693078017776*^9, 3.435693550336938*^9, 3.435693603823848*^9, 3.435693646855725*^9, 3.435694182355736*^9, 3.435694331800627*^9, 3.435694380029978*^9, 3.4356944267171106`*^9, 3.4356944729836383`*^9, 3.4356945385078573`*^9, 3.4356948280041327`*^9, 3.4356949280980606`*^9, {3.435695138480576*^9, 3.43569516536924*^9}, {3.4356952052866383`*^9, 3.4356952320551295`*^9}, 3.435695265643427*^9, 3.4356953082146416`*^9, 3.435695498317997*^9, 3.4356956798590403`*^9, 3.4356957908085775`*^9, 3.4356958340407424`*^9, { 3.435695866757787*^9, 3.435695916529355*^9}, 3.435696056710926*^9, 3.4356960902391376`*^9, 3.435696190373123*^9, 3.435696378483613*^9, 3.4356964875304146`*^9, 3.43569663247884*^9, 3.4356966713847837`*^9, 3.4356969534804173`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "If", " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", "corner", " ", "is", " ", "followed", " ", "by", " ", "a", " ", "corner", " ", "with", " ", "negative", " ", "determinant"}], ",", " ", RowBox[{ "then", " ", "H", " ", "is", " ", "not", " ", "positive", " ", "semidefinite"}], ",", " ", RowBox[{"so", " ", "there", " ", "is", " ", "no", " ", RowBox[{"measure", ":"}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"det", "<", "0"}], ",", " ", RowBox[{ "Print", "[", " ", "\"\\"", "]"}], " ", ",", " ", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ "The", " ", "rest", " ", "of", " ", "the", " ", "code", " ", "for", " ", "this", " ", "function", " ", "is", " ", "the", " ", "\"\\"", " ", "part", " ", "of", " ", "this", " ", "\"\\""}], "*)"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ "Test", " ", "to", " ", "see", " ", "if", " ", "the", " ", "moment", " ", "data", " ", "is", " ", "recursively", " ", "generated"}], "*)"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ RowBox[{"At", " ", "this", " ", "point"}], ",", " ", RowBox[{ "we", " ", "know", " ", "that", " ", "either", " ", "the", " ", "Hankel", " ", "matrix", " ", "is", " ", "positive", " ", "definite"}], ",", " ", RowBox[{ "or", " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", "corner", " ", "is", " ", "followed", " ", "by", " ", "a", " ", "singular", " ", RowBox[{"corner", ".", " ", "If"}], " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", "corner", " ", "is", " ", "followed", " ", "by", " ", "a", " ", "singular", "\[IndentingNewLine]", "corner"}], ",", " ", RowBox[{ "K", " ", "denotes", " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", RowBox[{"corner", ".", " ", "Otherwise"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{"K", " ", "denotes", " ", "the", " ", RowBox[{"(", RowBox[{"positive", " ", "definite"}], ")"}], " ", "Hankel", " ", "matrix", " ", "H", RowBox[{ RowBox[{"(", "n", ")"}], "."}]}]}], "*)"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"det", " ", "==", " ", "0"}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"K", " ", "=", " ", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"i", "-", "2"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"i", "-", "2"}]}], "]"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}], " ", RowBox[{"(*", RowBox[{ "size", " ", "of", " ", "the", " ", "largest", " ", "positive", " ", "definite", " ", "block", " ", "when", " ", "H", " ", "is", " ", "singular"}], "*)"}], ",", "\[IndentingNewLine]", RowBox[{"K", " ", "=", " ", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"i", "-", "1"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"i", "-", "1"}]}], "]"}]}], "]"}], "]"}]}]}], "]"}], " ", RowBox[{"(*", RowBox[{"K", "=", RowBox[{ "H", " ", "when", " ", "H", " ", "is", " ", "positive", " ", "definite"}]}], "*)"}], ";"}]}], "]"}], "\[IndentingNewLine]", " ", RowBox[{"MatrixForm", "[", "K", "]"}]}]}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0.6321205588285586`", "0.26424111765711567`", "0.16060279414278858`"}, {"0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`"}, {"0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.4356923272281933`*^9, 3.435692580672629*^9, 3.435693078858986*^9, 3.435693550917773*^9, 3.435693604625*^9, 3.4356936472763295`*^9, 3.4356941828864994`*^9, 3.435694333122528*^9, 3.435694381462037*^9, 3.435694428499674*^9, 3.435694475026576*^9, 3.435694540320464*^9, 3.4356948299769697`*^9, 3.4356949287590113`*^9, {3.4356951388511086`*^9, 3.435695166270536*^9}, {3.4356952062179775`*^9, 3.435695233196771*^9}, 3.4356952675862207`*^9, 3.4356953095465565`*^9, 3.4356954991291633`*^9, 3.4356956806401634`*^9, 3.435695791489557*^9, 3.435695834681664*^9, { 3.4356958676891265`*^9, 3.4356959179113426`*^9}, 3.4356960578125105`*^9, 3.435696091470909*^9, 3.435696191444664*^9, 3.4356963836610575`*^9, 3.4356964892929487`*^9, 3.4356966330897183`*^9, 3.4356966717553167`*^9, 3.4356969539510946`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Htest", " ", "is", " ", "the", " ", "moment", " ", "data", " ", "to", " ", "be", " ", "tested", " ", "for", " ", RowBox[{"recursiveness", ":"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"2", "n"}], "\[Equal]", "m"}], ",", " ", RowBox[{"Htest", " ", "=", " ", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}]}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Htest", " ", "=", " ", RowBox[{"H", "[", RowBox[{"[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "1"}]}], "]"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"n", "+", "2"}]}], "]"}]}], "]"}], "]"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "Htest", "]"}]}]}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0.6321205588285586`", "0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`"}, {"0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`"}, {"0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`", "0.07130217810980331`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.4356923280293455`*^9, 3.4356925814437375`*^9, 3.435693079650123*^9, 3.435693551528651*^9, 3.435693605756627*^9, 3.4356936473965025`*^9, 3.4356941836475935`*^9, 3.4356943340138097`*^9, 3.4356943816222672`*^9, 3.435694429431013*^9, 3.4356944758677855`*^9, 3.435694541081558*^9, 3.4356948306479344`*^9, 3.435694929349861*^9, {3.435695139011339*^9, 3.435695166540925*^9}, {3.435695206378208*^9, 3.4356952338076496`*^9}, 3.4356952683272867`*^9, 3.4356953096967726`*^9, 3.435695499780099*^9, 3.435695681231013*^9, 3.435695792190565*^9, 3.435695835262499*^9, { 3.4356958682899904`*^9, 3.435695918251832*^9}, 3.435696057982755*^9, 3.4356960917212687`*^9, 3.4356961921556864`*^9, 3.4356963842919645`*^9, 3.435696489903827*^9, 3.4356966335603952`*^9, 3.4356966719155474`*^9, 3.4356969545619726`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{"Recursiveness", " ", RowBox[{"test", ":"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"MatrixRank", "[", "Htest", "]"}], " ", ">", " ", RowBox[{"MatrixRank", "[", "K", "]"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{ "Print", "[", " ", "\"\\"", "]"}], " ", ",", "\[IndentingNewLine]", " ", RowBox[{"Print", "[", "\"\\"", "]"}]}], "]"}], " "}]], "Input"], Cell[BoxData["\<\"there is a measure\"\>"], "Print", CellChangeTimes->{ 3.4356923287003107`*^9, 3.435692582084659*^9, 3.435693080441261*^9, 3.4356935520894575`*^9, 3.435693606497693*^9, 3.435693647516675*^9, 3.435694184188371*^9, 3.4356943346847744`*^9, 3.435694381772483*^9, 3.435694430292251*^9, 3.4356944767390385`*^9, 3.435694541782566*^9, 3.435694831318899*^9, 3.435694929860595*^9, {3.4356951391615553`*^9, 3.435695166801299*^9}, {3.4356952065384383`*^9, 3.435695234388485*^9}, 3.4356952690282946`*^9, 3.435695309836974*^9, 3.4356955004610786`*^9, 3.435695681851906*^9, 3.435695792721328*^9, 3.4356958357932625`*^9, { 3.435695868830768*^9, 3.4356959187124944`*^9}, 3.435696058203072*^9, 3.4356960918714848`*^9, 3.4356961927365217`*^9, 3.4356963849429007`*^9, 3.435696490504691*^9, 3.4356966340310717`*^9, 3.4356966720657635`*^9, 3.435696955072707*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"data", " ", "is", " ", "recursively", " ", "generated"}], ";", " ", RowBox[{"a", " ", "measure", " ", "exists"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"i", " ", "=", " ", RowBox[{"i", "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"express", " ", "column", " ", RowBox[{"t", "^", "i"}], " ", RowBox[{"(", RowBox[{"the", " ", "first", " ", "column", " ", "beyond", " ", "K"}], ")"}], "as", " ", "a", " ", "linear", " ", "combination", " ", "of", " ", "columns", " ", "1"}], ",", "1", ",", "...", ",", RowBox[{"t", "^", RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}]}]}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"J", " ", "=", " ", RowBox[{"N", "[", RowBox[{ RowBox[{"Inverse", "[", "K", "]"}], ",", "100"}], "]"}]}], ";"}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"v", "[", "j", "]"}], " ", "=", " ", RowBox[{"bb", "[", RowBox[{"i", "+", "j"}], "]"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"w", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"v", "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", RowBox[{"i", "-", "1"}]}], "}"}]}], "]"}]}], ";"}], " ", RowBox[{"(*", RowBox[{"colunmn", " ", RowBox[{"t", "^", "i"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"z", " ", "=", " ", RowBox[{"J", ".", "w"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"N", "[", "z", "]"}], "]"}], ";"}], "\[IndentingNewLine]"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"A measure exists\"\>"], "Print", CellChangeTimes->{ 3.435692329421347*^9, 3.435692582625437*^9, 3.4356930811622972`*^9, 3.435693552620221*^9, 3.435693607178672*^9, 3.435693647586776*^9, 3.43569418470912*^9, 3.435694335345725*^9, 3.4356943818626127`*^9, 3.4356944312235904`*^9, 3.4356944777805357`*^9, 3.4356945425136175`*^9, 3.435694832019907*^9, 3.4356949303613153`*^9, {3.435695139251685*^9, 3.4356951669014435`*^9}, {3.435695206638582*^9, 3.4356952348791904`*^9}, 3.4356952696892447`*^9, 3.435695309927104*^9, 3.435695501102*^9, 3.435695682442755*^9, 3.435695793282134*^9, 3.4356958363640833`*^9, { 3.435695869431632*^9, 3.4356959191431136`*^9}, 3.4356960582932014`*^9, 3.4356960919616146`*^9, 3.4356961933073425`*^9, 3.4356963857340384`*^9, 3.43569649102544*^9, 3.4356966344917345`*^9, 3.435696672155893*^9, 3.4356969555333695`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.04029654272521476`", ",", RowBox[{"-", "0.5378430946034576`"}], ",", "1.4356968683108953`"}], "}"}]], "Print", CellChangeTimes->{ 3.435692329421347*^9, 3.435692582625437*^9, 3.4356930811622972`*^9, 3.435693552620221*^9, 3.435693607178672*^9, 3.435693647586776*^9, 3.43569418470912*^9, 3.435694335345725*^9, 3.4356943818626127`*^9, 3.4356944312235904`*^9, 3.4356944777805357`*^9, 3.4356945425136175`*^9, 3.435694832019907*^9, 3.4356949303613153`*^9, {3.435695139251685*^9, 3.4356951669014435`*^9}, {3.435695206638582*^9, 3.4356952348791904`*^9}, 3.4356952696892447`*^9, 3.435695309927104*^9, 3.435695501102*^9, 3.435695682442755*^9, 3.435695793282134*^9, 3.4356958363640833`*^9, { 3.435695869431632*^9, 3.4356959191431136`*^9}, 3.4356960582932014`*^9, 3.4356960919616146`*^9, 3.4356961933073425`*^9, 3.4356963857340384`*^9, 3.43569649102544*^9, 3.4356966344917345`*^9, 3.435696672155893*^9, 3.4356969556034703`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"build", " ", "the", " ", "characteristic", " ", "polynomial"}], ",", " ", RowBox[{ "whose", " ", "roots", " ", "form", " ", "the", " ", "support", " ", "of", " ", "the", " ", "representing", " ", "measure"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"p", " ", "=", " ", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{"p", " ", "=", " ", RowBox[{"p", " ", "+", " ", RowBox[{ RowBox[{"z", "[", RowBox[{"[", RowBox[{"j", "+", "1"}], "]"}], "]"}], " ", RowBox[{"t", "^", "j"}]}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"q", " ", "=", " ", RowBox[{ RowBox[{"t", "^", RowBox[{"(", "i", ")"}]}], "-", "p"}]}], ";"}], " ", RowBox[{"(*", RowBox[{"characteristic", " ", "polynomial"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"N", "[", "q", "]"}], ",", " ", "\"\< char. poly.\>\""}], "]"}], "\[IndentingNewLine]"}]}]], "Input"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{ RowBox[{"-", "0.04029654272521476`"}], "+", RowBox[{"0.5378430946034576`", " ", "t"}], "-", RowBox[{"1.4356968683108953`", " ", SuperscriptBox["t", "2"]}], "+", SuperscriptBox["t", "3"]}], "\[InvisibleSpace]", "\<\" char. poly.\"\>"}], SequenceForm[-0.04029654272521476 + 0.5378430946034576 $CellContext`t - 1.4356968683108953` $CellContext`t^2 + $CellContext`t^3, " char. poly."], Editable->False]], "Print", CellChangeTimes->{ 3.435692330272571*^9, 3.435692583356488*^9, 3.435693082063594*^9, 3.4356935531409693`*^9, 3.4356936079497805`*^9, 3.435693647817107*^9, 3.4356941852198544`*^9, 3.4356943361168337`*^9, 3.435694382163045*^9, 3.4356944321048574`*^9, 3.4356944787218895`*^9, 3.4356945433848705`*^9, 3.4356948329512463`*^9, 3.435694931092366*^9, {3.4356951395421023`*^9, 3.435695167271976*^9}, {3.435695206949029*^9, 3.4356952353598814`*^9}, 3.4356952705805264`*^9, 3.4356953101974926`*^9, 3.435695501913166*^9, 3.4356956832138643`*^9, 3.4356957938829985`*^9, 3.4356958371752496`*^9, { 3.435695870022482*^9, 3.4356959195637183`*^9}, 3.435696059024253*^9, 3.435696092322133*^9, 3.435696194118509*^9, 3.4356963866353345`*^9, 3.435696491796549*^9, 3.4356966350625553`*^9, 3.43569667244631*^9, 3.435696955903902*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"roots", " ", "=", " ", RowBox[{"Solve", "[", RowBox[{ RowBox[{"q", "\[Equal]", "0"}], ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"N", "[", "roots", "]"}], ",", " ", "\"\< roots of char. poly.\>\""}], "]"}]}], "Input"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"t", "\[Rule]", "0.09953491072144866`"}], "}"}], ",", RowBox[{"{", RowBox[{"t", "\[Rule]", "0.46440510692493236`"}], "}"}], ",", RowBox[{"{", RowBox[{"t", "\[Rule]", "0.8717568506645141`"}], "}"}]}], "}"}], "\[InvisibleSpace]", "\<\" roots of char. poly.\"\>"}], SequenceForm[{{$CellContext`t -> 0.09953491072144866}, {$CellContext`t -> 0.46440510692493236`}, {$CellContext`t -> 0.8717568506645141}}, " roots of char. poly."], Editable->False]], "Print", CellChangeTimes->{ 3.4356923310136366`*^9, 3.4356925839172945`*^9, 3.4356930829248323`*^9, 3.4356935537218046`*^9, 3.435693608680832*^9, 3.435693647887208*^9, 3.435694185730589*^9, 3.43569433676777*^9, 3.4356943822531743`*^9, 3.435694432765808*^9, 3.4356944794228973`*^9, 3.4356945440458207`*^9, 3.4356948336222115`*^9, 3.43569493162313*^9, {3.4356951396422462`*^9, 3.43569516737212*^9}, {3.435695207049173*^9, 3.435695235890645*^9}, 3.435695271121304*^9, 3.435695310297637*^9, 3.4356955026041603`*^9, 3.4356956838047132`*^9, 3.435695794403747*^9, 3.435695837756085*^9, { 3.4356958706133313`*^9, 3.4356959201545677`*^9}, 3.435696061097234*^9, 3.4356960924122624`*^9, 3.4356961946893296`*^9, 3.435696387346357*^9, 3.4356964923673697`*^9, 3.435696635633376*^9, 3.4356966725464544`*^9, 3.435696956294464*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "i"}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "[", RowBox[{"j", "-", "1"}], "]"}], " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}], ";"}], " ", RowBox[{"(*", RowBox[{ "nodes", " ", "of", " ", "the", " ", "representing", " ", "measure"}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", " ", RowBox[{ RowBox[{"ii", "=", "1"}], ",", RowBox[{"ii", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"ii", "=", RowBox[{"ii", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"TTab", "[", RowBox[{"ii", ",", "j"}], "]"}], "=", " ", RowBox[{ RowBox[{"x", "[", "j", "]"}], "^", "ii"}]}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"j", "=", RowBox[{"j", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"TTab", "[", RowBox[{"0", ",", "j"}], "]"}], "=", "1"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"V", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"TTab", "[", RowBox[{"rr", ",", "ss"}], "]"}], ",", RowBox[{"{", RowBox[{"rr", ",", "0", ",", RowBox[{"i", "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"ss", ",", "0", ",", RowBox[{"i", "-", "1"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"N", "[", "V", "]"}], "]"}], RowBox[{"(*", "Vandermonde", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", " ", "\"\\"", "]"}], ";"}]}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1.`", "1.`", "1.`"}, {"0.09953491072144866`", "0.46440510692493236`", "0.8717568506645141`"}, {"0.009907198452326755`", "0.21567210333795786`", "0.759960006680512`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.4356923317947598`*^9, 3.435692584538187*^9, 3.435693083585782*^9, 3.4356935542926254`*^9, 3.435693609852517*^9, 3.4356936502506065`*^9, 3.435694186271366*^9, 3.4356943374487486`*^9, 3.435694382423419*^9, 3.4356944334768305`*^9, 3.435694480173978*^9, 3.4356945446867423`*^9, 3.4356948341930323`*^9, 3.435694932234008*^9, {3.435695139802477*^9, 3.435695167612466*^9}, {3.435695207209403*^9, 3.4356952363613214`*^9}, 3.4356952717622256`*^9, 3.435695310517954*^9, 3.4356955033251967`*^9, 3.4356956846058655`*^9, 3.4356957949144816`*^9, 3.4356958384971504`*^9, { 3.4356958712041807`*^9, 3.4356959207454176`*^9}, {3.4356960626795087`*^9, 3.435696092622565*^9}, 3.4356961952901936`*^9, 3.4356963880373507`*^9, 3.4356964929381905`*^9, 3.4356966362843122`*^9, 3.435696672706685*^9, 3.435696956675011*^9}], Cell[BoxData["\<\"Vandermonde\"\>"], "Print", CellChangeTimes->{ 3.4356923318648605`*^9, 3.435692584608288*^9, 3.4356930836558833`*^9, 3.4356935543527117`*^9, 3.435693609922618*^9, 3.4356936503207073`*^9, 3.435694186341467*^9, 3.435694337528864*^9, 3.43569438249352*^9, 3.4356944335469313`*^9, 3.4356944802540927`*^9, 3.4356945447668576`*^9, 3.4356948342931757`*^9, 3.435694932334152*^9, {3.4356951398725777`*^9, 3.4356951676825666`*^9}, {3.435695207279504*^9, 3.435695236431422*^9}, 3.4356952719324703`*^9, 3.435695310688198*^9, 3.4356955033952975`*^9, 3.4356956846759663`*^9, 3.4356957949845824`*^9, 3.4356958385572367`*^9, { 3.435695871264267*^9, 3.4356959208155184`*^9}, {3.43569606274961*^9, 3.4356960926926656`*^9}, 3.435696195370309*^9, 3.4356963881074514`*^9, 3.435696493098421*^9, 3.4356966363744416`*^9, 3.435696672756757*^9, 3.435696956745112*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"ii", "=", "0"}], ",", " ", RowBox[{"ii", "\[LessEqual]", RowBox[{"i", "-", "1"}]}], ",", RowBox[{"ii", "=", RowBox[{"ii", "+", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"vvv", "[", "ii", "]"}], " ", "=", " ", RowBox[{"bb", "[", "ii", "]"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"w", " ", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"vvv", "[", "ii", "]"}], ",", RowBox[{"{", RowBox[{"ii", ",", "0", ",", RowBox[{"i", "-", "1"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"weights", "=", RowBox[{"N", "[", RowBox[{ RowBox[{ RowBox[{"Inverse", "[", "V", "]"}], ".", "w"}], ",", "100"}], "]"}]}], ";", RowBox[{"(*", RowBox[{"densities", " ", "of", " ", "the", " ", "measure"}], "*)"}], "\[IndentingNewLine]", RowBox[{"PP", "[", "1", "]"}], ";"}]}], RowBox[{"(*", RowBox[{"print", " ", "the", " ", "nodes", " ", "and", " ", "densities"}], "*)"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print", CellChangeTimes->{ 3.435692332776171*^9, 3.4356925852492094`*^9, 3.4356930842767763`*^9, 3.4356935549635906`*^9, 3.435693611595022*^9, 3.4356936512820897`*^9, 3.435694186862216*^9, 3.4356943381096992`*^9, 3.435694382643736*^9, 3.435694434338069*^9, 3.435694481085288*^9, 3.435694545377736*^9, 3.435694834763853*^9, 3.43569493303516*^9, {3.435695140022794*^9, 3.435695167932926*^9}, {3.4356952074397345`*^9, 3.435695236942157*^9}, 3.435695272653507*^9, 3.4356953108283997`*^9, 3.4356955041163344`*^9, 3.435695685437061*^9, 3.4356957953851585`*^9, 3.4356958392181873`*^9, { 3.435695871764987*^9, 3.4356959214664545`*^9}, {3.435696063580805*^9, 3.4356960928428817`*^9}, 3.4356961960512877`*^9, 3.435696388908603*^9, 3.4356964937794*^9, 3.435696636905205*^9, 3.4356966729169874`*^9, 3.435696957015501*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{ "0.09953491072144866`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.22517974986436645`"}], SequenceForm[0.09953491072144866, " ", 0.22517974986436645`], Editable->False]], "Print", CellChangeTimes->{ 3.435692332776171*^9, 3.4356925852492094`*^9, 3.4356930842767763`*^9, 3.4356935549635906`*^9, 3.435693611595022*^9, 3.4356936512820897`*^9, 3.435694186862216*^9, 3.4356943381096992`*^9, 3.435694382643736*^9, 3.435694434338069*^9, 3.435694481085288*^9, 3.435694545377736*^9, 3.435694834763853*^9, 3.43569493303516*^9, {3.435695140022794*^9, 3.435695167932926*^9}, {3.4356952074397345`*^9, 3.435695236942157*^9}, 3.435695272653507*^9, 3.4356953108283997`*^9, 3.4356955041163344`*^9, 3.435695685437061*^9, 3.4356957953851585`*^9, 3.4356958392181873`*^9, { 3.435695871764987*^9, 3.4356959214664545`*^9}, {3.435696063580805*^9, 3.4356960928428817`*^9}, 3.4356961960512877`*^9, 3.435696388908603*^9, 3.4356964937794*^9, 3.435696636905205*^9, 3.4356966729169874`*^9, 3.435696957085602*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{ "0.46440510692493236`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.27721881250519176`"}], SequenceForm[0.46440510692493236`, " ", 0.27721881250519176`], Editable->False]], "Print", CellChangeTimes->{ 3.435692332776171*^9, 3.4356925852492094`*^9, 3.4356930842767763`*^9, 3.4356935549635906`*^9, 3.435693611595022*^9, 3.4356936512820897`*^9, 3.435694186862216*^9, 3.4356943381096992`*^9, 3.435694382643736*^9, 3.435694434338069*^9, 3.435694481085288*^9, 3.435694545377736*^9, 3.435694834763853*^9, 3.43569493303516*^9, {3.435695140022794*^9, 3.435695167932926*^9}, {3.4356952074397345`*^9, 3.435695236942157*^9}, 3.435695272653507*^9, 3.4356953108283997`*^9, 3.4356955041163344`*^9, 3.435695685437061*^9, 3.4356957953851585`*^9, 3.4356958392181873`*^9, { 3.435695871764987*^9, 3.4356959214664545`*^9}, {3.435696063580805*^9, 3.4356960928428817`*^9}, 3.4356961960512877`*^9, 3.435696388908603*^9, 3.4356964937794*^9, 3.435696636905205*^9, 3.4356966729169874`*^9, 3.4356969572858896`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{ "0.8717568506645141`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.12972199645900045`"}], SequenceForm[0.8717568506645141, " ", 0.12972199645900045`], Editable->False]], "Print", CellChangeTimes->{ 3.435692332776171*^9, 3.4356925852492094`*^9, 3.4356930842767763`*^9, 3.4356935549635906`*^9, 3.435693611595022*^9, 3.4356936512820897`*^9, 3.435694186862216*^9, 3.4356943381096992`*^9, 3.435694382643736*^9, 3.435694434338069*^9, 3.435694481085288*^9, 3.435694545377736*^9, 3.435694834763853*^9, 3.43569493303516*^9, {3.435695140022794*^9, 3.435695167932926*^9}, {3.4356952074397345`*^9, 3.435695236942157*^9}, 3.435695272653507*^9, 3.4356953108283997`*^9, 3.4356955041163344`*^9, 3.435695685437061*^9, 3.4356957953851585`*^9, 3.4356958392181873`*^9, { 3.435695871764987*^9, 3.4356959214664545`*^9}, {3.435696063580805*^9, 3.4356960928428817`*^9}, 3.4356961960512877`*^9, 3.435696388908603*^9, 3.4356964937794*^9, 3.435696636905205*^9, 3.4356966729169874`*^9, 3.435696957396048*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", RowBox[{ RowBox[{ RowBox[{"weights", "[", RowBox[{"[", "1", "]"}], "]"}], " ", RowBox[{ RowBox[{"x", "[", "0", "]"}], "^", "5"}]}], "+", " ", RowBox[{ RowBox[{"weights", "[", RowBox[{"[", "2", "]"}], "]"}], " ", RowBox[{ RowBox[{"x", "[", "1", "]"}], "^", "5"}]}], "+", " ", RowBox[{ RowBox[{"weights", "[", RowBox[{"[", "3", "]"}], "]"}], " ", RowBox[{ RowBox[{"x", "[", "2", "]"}], "^", "5"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.421152432515625*^9, 3.42115247015625*^9}, { 3.42115253740625*^9, 3.42115255953125*^9}, {3.421152596828125*^9, 3.421152608203125*^9}, {3.42115265034375*^9, 3.421152706921875*^9}, { 3.421152759375*^9, 3.4211528155625*^9}, {3.4211528465625*^9, 3.421152858453125*^9}}], Cell[BoxData["0.07130217810980366`"], "Output", CellChangeTimes->{ 3.435692333967885*^9, 3.4356925864208946`*^9, 3.4356930855586195`*^9, 3.435693556135275*^9, 3.4356936127066207`*^9, 3.435693652373659*^9, 3.4356941875431952`*^9, 3.4356943394115715`*^9, 3.435694383925579*^9, 3.4356944363309345`*^9, 3.435694483308485*^9, 3.4356948365564303`*^9, 3.4356949343370323`*^9, {3.4356951405735855`*^9, 3.4356951688642654`*^9}, { 3.4356952086414623`*^9, 3.4356952384543314`*^9}, 3.4356952749568195`*^9, 3.4356953122905025`*^9, 3.435695505288019*^9, 3.4356956866588173`*^9, 3.435695795875864*^9, 3.4356958405000305`*^9, {3.43569587322709*^9, 3.435695922758312*^9}, {3.4356960656738143`*^9, 3.4356960940145664`*^9}, 3.435696197823837*^9, 3.4356963907011805`*^9, 3.435696495341646*^9, 3.4356966381269617`*^9, 3.435696673517851*^9, 3.435696957666437*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"bb", "[", "5", "]"}]], "Input", CellChangeTimes->{{3.42115261309375*^9, 3.421152620578125*^9}, { 3.4211527156875*^9, 3.421152716078125*^9}, {3.421152831359375*^9, 3.421152831609375*^9}, {3.42115287409375*^9, 3.4211528743125*^9}}], Cell[BoxData["0.07130217810980331`"], "Output", CellChangeTimes->{ 3.435692335199656*^9, 3.4356925871519456`*^9, 3.435693086499973*^9, 3.435693557337003*^9, 3.4356936135979023`*^9, 3.4356936530546384`*^9, 3.435694188194131*^9, 3.435694340332896*^9, 3.4356943840858097`*^9, 3.4356944374825907`*^9, 3.4356944845803137`*^9, 3.435694837127251*^9, 3.4356949350280256`*^9, {3.4356951407438307`*^9, 3.435695169004467*^9}, 3.435695208781664*^9, 3.435695239375656*^9, 3.435695275517626*^9, 3.435695312430704*^9, 3.4356955062794447`*^9, 3.4356956873698397`*^9, 3.435695796506771*^9, 3.4356958411609807`*^9, {3.4356958736476946`*^9, 3.4356959234292765`*^9}, {3.4356960687382207`*^9, 3.435696094154768*^9}, 3.4356961984747725`*^9, 3.4356963914122033`*^9, 3.4356964954718337`*^9, 3.435696638747854*^9, 3.435696673668067*^9, 3.435696957796624*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", "%", "]"}]], "Input", CellChangeTimes->{{3.42115262378125*^9, 3.421152625015625*^9}}], Cell[BoxData["0.07130217810980331`"], "Output", CellChangeTimes->{ 3.435692336281211*^9, 3.4356925879030256`*^9, 3.435693087210995*^9, 3.435693558068054*^9, 3.4356936143289537`*^9, 3.435693653625459*^9, 3.43569418871488*^9, 3.4356943412241774`*^9, 3.4356943842460403`*^9, 3.4356944380934687`*^9, 3.4356944853013506`*^9, 3.4356948377882013`*^9, 3.4356949356288896`*^9, {3.435695140914075*^9, 3.4356951691446686`*^9}, 3.43569520893188*^9, 3.4356952399164333`*^9, 3.435695276078432*^9, 3.435695312560891*^9, 3.435695507240827*^9, 3.435695687990733*^9, 3.4356957970575633`*^9, 3.43569584184196*^9, {3.4356958740983424`*^9, 3.4356959238498816`*^9}, {3.4356960692789984`*^9, 3.435696094284955*^9}, 3.4356961989955215`*^9, 3.435696392083168*^9, 3.435696496132784*^9, 3.435696639258589*^9, 3.4356966738282976`*^9, 3.4356969583073587`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{ "Gaussian", " ", "quadrature", " ", "estimate", " ", "of", " ", "degree", " ", "m"}], " ", "=", " ", RowBox[{ RowBox[{"2", "n"}], "+", RowBox[{ "1", " ", "for", " ", "integral", " ", "of", " ", "\[IndentingNewLine]", "predefined", " ", "function", " ", RowBox[{"f", "[", "x", "]"}], RowBox[{"over", " ", "[", RowBox[{"a", ",", "b"}], "]"}]}]}]}], ";", " ", RowBox[{ RowBox[{ "uses", " ", "results", " ", "of", " ", "\[IndentingNewLine]", "previous", " ", "call", " ", "to", " ", RowBox[{"THMP", "[", "m", "]"}], " ", "with", " ", "moment", " ", "data", " ", "up", " ", "to", " ", "degree", "\[IndentingNewLine]", "2", "n"}], "+", RowBox[{ "1", " ", "corresponding", " ", "to", " ", "Lebesgue", " ", "measure", " ", RowBox[{"on", " ", "[", RowBox[{"a", ",", "b"}], "]"}]}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"G", "[", "j_", "]"}], ":=", RowBox[{"(", " ", RowBox[{"(*", RowBox[{"j", " ", "is", " ", "ignored"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ss", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", " ", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"ss", " ", "=", " ", RowBox[{"ss", " ", "+", " ", RowBox[{ RowBox[{"weights", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], " ", RowBox[{"g", "[", RowBox[{"x", "[", "i", "]"}], "]"}]}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"ss", "=", " ", RowBox[{"N", "[", "ss", "]"}]}]}], ")"}]}], ";"}]}]], "Input", CellChangeTimes->{{3.4211530040625*^9, 3.42115300446875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ "Print", " ", "the", " ", "nodes", " ", "and", " ", "weights", " ", "of", " ", "the", " ", "measure", " ", "determined", " ", "by", " ", "THMP"}], "*)"}], "\n", RowBox[{ RowBox[{"PP", "[", "mm_", "]"}], ":=", RowBox[{"(", " ", RowBox[{"(*", " ", RowBox[{"mm", " ", "is", " ", "ignored"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", " ", "\"\< \>\"", ",", " ", "\"\\""}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "<", "i"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"N", "[", RowBox[{"x", "[", "j", "]"}], "]"}], ",", " ", "\"\< \>\"", ",", " ", RowBox[{"N", "[", RowBox[{"weights", "[", RowBox[{"[", RowBox[{"j", "+", "1"}], "]"}], "]"}], "]"}]}], "]"}]}], "]"}], ";"}], ")"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"N", "[", RowBox[{"G", "[", "1", "]"}], "]"}], " ", RowBox[{"(*", "Approximation", "*)"}]}]], "Input", CellChangeTimes->{{3.435692109004403*^9, 3.435692125137602*^9}, { 3.4356965525539136`*^9, 3.435696558812914*^9}}], Cell[BoxData["0.2528458072325177`"], "Output", CellChangeTimes->{ 3.435692339455776*^9, 3.435692590206338*^9, 3.4356930896144514`*^9, 3.435693560611712*^9, 3.4356936166923523`*^9, 3.4356936553479357`*^9, 3.4356941921297903`*^9, 3.435694347423091*^9, 3.435694386929899*^9, 3.435694439956147*^9, 3.435694487294216*^9, 3.4356948395907936`*^9, 3.4356949381024466`*^9, {3.435695141134392*^9, 3.435695169375*^9}, 3.435695209152197*^9, 3.4356952424901342`*^9, 3.4356952779010525`*^9, 3.435695312751165*^9, 3.4356955094239664`*^9, 3.435695689603051*^9, 3.435695798359435*^9, 3.4356958449063663`*^9, {3.4356958757306895`*^9, 3.4356959252418833`*^9}, {3.4356960714621377`*^9, 3.4356960951962657`*^9}, 3.43569620076807*^9, 3.4356963939859037`*^9, 3.435696497815203*^9, 3.4356965789418573`*^9, 3.4356966407307053`*^9, 3.435696674068643*^9, 3.4356969596192446`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", "%", "]"}]], "Input", CellChangeTimes->{3.4356965332461505`*^9}], Cell[BoxData["0.2528458072325177`"], "Output", CellChangeTimes->{ 3.4356965345980945`*^9, {3.4356965765183725`*^9, 3.435696581555616*^9}, 3.4356966418523183`*^9, 3.435696674208845*^9, 3.435696960280195*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"N", "[", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"g", "[", "x", "]"}], " ", RowBox[{"f", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "a", ",", "b"}], "}"}]}], "]"}], "]"}], " ", RowBox[{"(*", RowBox[{"Mathematica", " ", "Result"}], "*)"}]}]], "Input", CellChangeTimes->{{3.42115303525*^9, 3.421153035609375*^9}, { 3.421153432375*^9, 3.421153438078125*^9}, {3.421154082171875*^9, 3.42115408940625*^9}, {3.421408632171875*^9, 3.421408636265625*^9}, { 3.4214087176875*^9, 3.421408721484375*^9}, {3.435692095515006*^9, 3.435692134531109*^9}, {3.4356921649147987`*^9, 3.4356921884486384`*^9}}], Cell[BoxData[ RowBox[{"0.269956229358191`", "\[InvisibleSpace]", "-", RowBox[{"2.4841240175987878`*^-15", " ", "\[ImaginaryI]"}]}]], "Output", CellChangeTimes->{ 3.4356921048584414`*^9, 3.4356923409979935`*^9, 3.435692591848699*^9, 3.4356930910965824`*^9, 3.435693562193987*^9, 3.435693619065765*^9, 3.4356936590432496`*^9, 3.435694209264429*^9, 3.4356944018513556`*^9, 3.435694466043659*^9, 3.4356945138123474`*^9, 3.4356948587182975`*^9, 3.4356949647607794`*^9, {3.435695149566517*^9, 3.435695177316419*^9}, 3.4356952174240913`*^9, 3.4356952510023746`*^9, 3.4356953201417923`*^9, 3.4356955134597692`*^9, 3.4356956927175293`*^9, 3.4356958021649075`*^9, 3.4356958483913774`*^9, {3.4356958790754995`*^9, 3.435695905633688*^9}, { 3.435696075327696*^9, 3.4356960982106*^9}, 3.435696206286005*^9, 3.435696399463781*^9, 3.4356965025319853`*^9, 3.4356966812389536`*^9, 3.4356969670299006`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", "%", "]"}]], "Input"], Cell[BoxData[ RowBox[{"0.269956229358191`", "\[InvisibleSpace]", "-", RowBox[{"2.4841240175987878`*^-15", " ", "\[ImaginaryI]"}]}]], "Output", CellChangeTimes->{3.435692596705683*^9, 3.435693093840528*^9, 3.4356936592335234`*^9, 3.435695149626603*^9, 3.4356952174641485`*^9, 3.435695320281994*^9, 3.435696277398259*^9, 3.4356966813891697`*^9, 3.435696967160088*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", "H", "]"}]], "Input", CellChangeTimes->{{3.421151299953125*^9, 3.421151307609375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0.6321205588285586`", "0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`"}, {"0.26424111765711567`", "0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`"}, {"0.16060279414278858`", "0.11392894125692303`", "0.08783632385624926`", "0.07130217810980331`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.4356952175242352`*^9, 3.4356953204221954`*^9, 3.4356966815494003`*^9, 3.435696967290275*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[BoxData[ RowBox[{"THMP", "[", "5", "]"}]], "Output", CellChangeTimes->{3.4356952175743074`*^9, 3.435695320562397*^9, 3.435696681749688*^9, 3.435696967410448*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{".55", "+", ".55", "+", ".89"}]], "Input"], Cell[BoxData["1.99`"], "Output", CellChangeTimes->{3.435695217624379*^9, 3.435695320712613*^9, 3.435696681929947*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"x", "[", "0", "]"}]], "Input"], Cell[BoxData["2.8744738955925713`"], "Output", CellChangeTimes->{3.4356953208628287`*^9, 3.4356966821102066`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"weights", "[", "1", "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"0.03503200919672622`", "\[InvisibleSpace]", "+", RowBox[{"7.642646836838387`*^-15", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.05475025492694385`", "\[InvisibleSpace]", "-", RowBox[{"2.4122872485713186`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.1152044031632613`", "\[InvisibleSpace]", "+", RowBox[{"3.8212151272834795`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.061165194779960075`", "\[InvisibleSpace]", "-", RowBox[{"4.6251489027320117`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.15190232989334618`", "\[InvisibleSpace]", "+", RowBox[{"4.3956111702899524`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{ RowBox[{"-", "0.005165644409544257`"}], "-", RowBox[{"4.459646254923745`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.14794756151331967`", "\[InvisibleSpace]", "+", RowBox[{"3.0875065794482204`*^-14", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.02923816513103361`", "\[InvisibleSpace]", "+", RowBox[{"0.018423407349644094`", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.029238165131232563`", "\[InvisibleSpace]", "-", RowBox[{"0.01842340734941672`", " ", "\[ImaginaryI]"}]}], ",", RowBox[{"0.012808119505002935`", "\[InvisibleSpace]", "-", RowBox[{"9.727231527038476`*^-16", " ", "\[ImaginaryI]"}]}]}], "}"}], "[", "1", "]"}]], "Output", CellChangeTimes->{3.4356953210030303`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "[", "0", "]"}], "^", "2"}], " ", RowBox[{"Sin", "[", RowBox[{"x", "[", "0", "]"}], "]"}], " ", RowBox[{"weights", "[", RowBox[{"[", "1", "]"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{ RowBox[{"x", "[", "1", "]"}], "^", "2"}], " ", RowBox[{"Sin", "[", RowBox[{"x", "[", "1", "]"}], "]"}], " ", RowBox[{"weights", "[", RowBox[{"[", "2", "]"}], "]"}]}], "+", RowBox[{ RowBox[{ RowBox[{"x", "[", "2", "]"}], "^", "2"}], " ", RowBox[{"Sin", "[", RowBox[{"x", "[", "2", "]"}], "]"}], " ", RowBox[{"weights", "[", RowBox[{"[", "3", "]"}], "]"}]}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"0.00043391397214156377`", "\[InvisibleSpace]", "+", RowBox[{"1.325554221879246`*^-16", " ", "\[ImaginaryI]"}]}]], "Output", CellChangeTimes->{3.435695321133218*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"N", "[", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], " ", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "3"}], "}"}]}], "]"}], "]"}], "\[IndentingNewLine]"}]], "Input"], Cell[BoxData["5.553423249078389`"], "Output", CellChangeTimes->{3.4356953213735633`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"-", RowBox[{"Cos", "[", "3", "]"}]}], "+", RowBox[{"Cos", "[", "1", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"Cos", "[", "1", "]"}], "-", RowBox[{"Cos", "[", "3", "]"}]}]], "Output", CellChangeTimes->{3.435695321523779*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", "%", "]"}]], "Input"], Cell[BoxData["1.5302948024685852`"], "Output", CellChangeTimes->{3.4356953216639805`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", RowBox[{"364", "/", "3"}], "]"}]], "Input"], Cell[BoxData["121.33333333333333`"], "Output", CellChangeTimes->{3.435695321804182*^9}] }, Open ]], Cell[BoxData[ RowBox[{"N", "["}]], "Input", EmphasizeSyntaxErrors->True], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "test", " ", "the", " ", "rule", " ", "with", " ", "some", " ", "examples"}], "*)"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", " ", RowBox[{"Sin", "[", "x", "]"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"G", "[", "1", "]"}]], "Input"], Cell[BoxData["1.530350795286579`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "3"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["1.5302948024685852`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", " ", RowBox[{"x", "^", "6"}], " ", RowBox[{"(*", RowBox[{ RowBox[{"polynomial", " ", "of", " ", "degree"}], " ", ">", " ", "5"}], "*)"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"G", "[", "1", "]"}]], "Input"], Cell[BoxData["312.24`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "3"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["312.2857142857143`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", " ", RowBox[{"Exp", "[", RowBox[{"x", "^", "2"}], "]"}], " ", RowBox[{"(*", RowBox[{"rapidly", " ", "growing", " ", "function"}], "*)"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"G", "[", "1", "]"}]], "Input"], Cell[BoxData["1275.9078061041184`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "3"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["1443.0824711468072`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{"increase", " ", "the", " ", "degree"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"m", "=", "9"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "=", "3"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "m"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"bb", "[", "i", "]"}], " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"b", "^", RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}]}], "-", RowBox[{"a", "^", RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"2", "4", FractionBox["26", "3"], "20", FractionBox["242", "5"], FractionBox["364", "3"]}, {"4", FractionBox["26", "3"], "20", FractionBox["242", "5"], FractionBox["364", "3"], FractionBox["2186", "7"]}, { FractionBox["26", "3"], "20", FractionBox["242", "5"], FractionBox["364", "3"], FractionBox["2186", "7"], "820"}, {"20", FractionBox["242", "5"], FractionBox["364", "3"], FractionBox["2186", "7"], "820", FractionBox["19682", "9"]}, { FractionBox["242", "5"], FractionBox["364", "3"], FractionBox["2186", "7"], "820", FractionBox["19682", "9"], FractionBox["29524", "5"]} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.093820154061336`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.23692688505618908`"}], SequenceForm[1.093820154061336, " ", 0.23692688505618908`], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.461530689894317`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.47862867049936647`"}], SequenceForm[1.461530689894317, " ", 0.47862867049936647`], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "2.`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.5688888888888889`"}], SequenceForm[2., " ", 0.5688888888888889], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "2.538469310105683`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.47862867049936647`"}], SequenceForm[2.538469310105683, " ", 0.47862867049936647`], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "2.906179845938664`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.23692688505618908`"}], SequenceForm[2.906179845938664, " ", 0.23692688505618908`], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"G", "[", "1", "]"}]], "Input"], Cell[BoxData["1439.959638155832`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"f", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "a", ",", "b"}], "}"}]}], "]"}], " "}]], "Input", CellChangeTimes->{{3.435693052681344*^9, 3.4356930547142673`*^9}}], Cell[BoxData["0.31809237280357877`"], "Output", CellChangeTimes->{3.435693056977522*^9}] }, Open ]], Cell[BoxData[ RowBox[{"(*", RowBox[{"much", " ", "better", " ", "estimate"}], "*)"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ "Some", " ", "examples", " ", "with", " ", "moment", " ", "problems"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"m", "=", "4"}]}]], "Input"], Cell[BoxData["4"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "0", "]"}], "=", RowBox[{ RowBox[{"bb", "[", "1", "]"}], "=", RowBox[{ RowBox[{"bb", "[", "2", "]"}], "=", RowBox[{ RowBox[{"bb", "[", "3", "]"}], "=", "1"}]}]}]}]], "Input"], Cell[BoxData["1"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "2"}]], "Input"], Cell[BoxData["2"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "1"}, {"1", "1", "1"}, {"1", "1", "2"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment data not recursively generated\"\>"], \ "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "1"}]], "Input"], Cell[BoxData["1"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "1"}, {"1", "1", "1"}, {"1", "1", "1"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.`"}], SequenceForm[1., " ", 1.], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"bb", "[", "2", "]"}], "=", "2"}]}]], "Input"], Cell[BoxData["2"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "3", "]"}], "=", "3"}]], "Input"], Cell[BoxData["3"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "5"}]], "Input"], Cell[BoxData["5"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2"}, {"1", "2", "3"}, {"2", "3", "5"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "0.6180339887498949`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.276393202250021`"}], SequenceForm[-0.6180339887498949, " ", 0.276393202250021], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.618033988749895`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7236067977499789`"}], SequenceForm[1.618033988749895, " ", 0.7236067977499789], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[BoxData[ RowBox[{"(*", RowBox[{ RowBox[{"H", " ", "positive"}], ",", " ", RowBox[{ RowBox[{"rank", " ", "2"}], ";", " ", RowBox[{"2", "-", RowBox[{"atomic", " ", "measure"}]}]}]}], "*)"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "4"}]], "Input"], Cell[BoxData["4"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2"}, {"1", "2", "3"}, {"2", "3", "4"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment matrix not positive semidefinite\"\>"], \ "Print"] }, Open ]] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "6"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bb", "[", "5", "]"}], "=", " ", "0"}], ";"}]}], " ", RowBox[{"(*", RowBox[{ "supply", " ", "an", " ", "extra", " ", "moment", " ", "to", " ", "determine", " ", "a", " ", "particular", " ", "representing", " ", "measure"}], "*)"}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2"}, {"1", "2", "3"}, {"2", "3", "6"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "10.099901985167726`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.00008019774726564291`"}], SequenceForm[-10.099901985167726`, " ", 0.00008019774726564291], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "0.5425433326913511`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.293595853642608`"}], SequenceForm[-0.5425433326913511, " ", 0.293595853642608], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.6424453178590765`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7063239486101264`"}], SequenceForm[1.6424453178590765`, " ", 0.7063239486101264], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "5", "]"}], " ", "=", " ", RowBox[{"-", "100"}]}]], "Input"], Cell[BoxData[ RowBox[{"-", "100"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2"}, {"1", "2", "3"}, {"2", "3", "6"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "110.0090909022619`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "6.705960509706324`*^-9"}], SequenceForm[-110.0090909022619, " ", 6.705960509706324*^-9], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "0.611426464591715`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.27801623388884633`"}], SequenceForm[-0.611426464591715, " ", 0.27801623388884633`], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.6205173668536184`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7219837594051931`"}], SequenceForm[1.6205173668536184`, " ", 0.7219837594051931], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"m", "=", "5"}]], "Input"], Cell[BoxData["5"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "5"}]], "Input"], Cell[BoxData["5"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "5", "]"}], "=", "8"}]], "Input"], Cell[BoxData["8"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3"}, {"1", "2", "3", "5"}, {"2", "3", "5", "8"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "0.6180339887498949`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.276393202250021`"}], SequenceForm[-0.6180339887498949, " ", 0.276393202250021], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.618033988749895`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7236067977499789`"}], SequenceForm[1.618033988749895, " ", 0.7236067977499789], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "5", "]"}], "=", "9"}]], "Input"], Cell[BoxData["9"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3"}, {"1", "2", "3", "5"}, {"2", "3", "5", "9"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment data not recursively generated\"\>"], \ "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "4"}]], "Input"], Cell[BoxData["4"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3"}, {"1", "2", "3", "4"}, {"2", "3", "4", "9"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment matrix not positive semidefinite\"\>"], \ "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "6"}]], "Input"], Cell[BoxData["6"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["m"], "Input"], Cell[BoxData["5"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3"}, {"1", "2", "3", "6"}, {"2", "3", "6", "9"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "1.7320508075688772`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.04465819873852045`"}], SequenceForm[-1.7320508075688772`, " ", 0.04465819873852045], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "0.`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.3333333333333333`"}], SequenceForm[0., " ", 0.3333333333333333], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.7320508075688772`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.6220084679281462`"}], SequenceForm[1.7320508075688772`, " ", 0.6220084679281462], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"bb", "[", "0", "]"}], "=", "1"}], ";", " ", RowBox[{ RowBox[{"bb", "[", "1", "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"bb", "[", "2", "]"}], "=", "2"}], ";", RowBox[{ RowBox[{"bb", "[", "3", "]"}], "=", "3"}], ";", RowBox[{ RowBox[{"bb", "[", "4", "]"}], "=", "6"}], ";", " ", RowBox[{ RowBox[{"bb", "[", "5", "]"}], "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bb", "[", "6", "]"}], "=", "82"}], ";", RowBox[{ RowBox[{"bb", "[", "7", "]"}], "=", " ", RowBox[{"-", "597"}]}], ";", " ", RowBox[{ RowBox[{"bb", "[", "8", "]"}], "=", "5686"}], ";", RowBox[{ RowBox[{"bb", "[", "9", "]"}], "=", RowBox[{"-", "51399"}]}], ";", RowBox[{ RowBox[{"bb", "[", "10", "]"}], "=", " ", "468962"}], ";"}]}], " "}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"m", "=", "10"}]], "Input"], Cell[BoxData["10"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3", "6", "1"}, {"1", "2", "3", "6", "1", "82"}, {"2", "3", "6", "1", "82", RowBox[{"-", "597"}]}, {"3", "6", "1", "82", RowBox[{"-", "597"}], "5686"}, {"6", "1", "82", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}]}, {"1", "82", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}], "468962"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"A measure exists\"\>"], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"nodes\"\>", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "\<\"weights\"\>"}], SequenceForm["nodes", " ", "weights"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "9.110962423069871`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.00011895988516730375`"}], SequenceForm[-9.110962423069871, " ", 0.00011895988516730375`], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{"-", "0.5338408190584355`"}], "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.2953780972966052`"}], SequenceForm[-0.5338408190584355, " ", 0.2953780972966052], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{ "1.6448032421283072`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7045029428182275`"}], SequenceForm[1.6448032421283072`, " ", 0.7045029428182275], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "10", "]"}], "=", " ", "468963"}]], "Input"], Cell[BoxData["468963"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3", "6", "1"}, {"1", "2", "3", "6", "1", "82"}, {"2", "3", "6", "1", "82", RowBox[{"-", "597"}]}, {"3", "6", "1", "82", RowBox[{"-", "597"}], "5686"}, {"6", "1", "82", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}]}, {"1", "82", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}], "468963"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment data not recursively generated\"\>"], \ "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "10", "]"}], "=", "468962"}]], "Input"], Cell[BoxData["468962"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", "6", "]"}], "=", "81"}]], "Input"], Cell[BoxData["81"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"THMP", "[", "m", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["\<\"Moment matrix :\"\>"], "Print"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "1", "2", "3", "6", "1"}, {"1", "2", "3", "6", "1", "81"}, {"2", "3", "6", "1", "81", RowBox[{"-", "597"}]}, {"3", "6", "1", "81", RowBox[{"-", "597"}], "5686"}, {"6", "1", "81", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}]}, {"1", "81", RowBox[{"-", "597"}], "5686", RowBox[{"-", "51399"}], "468962"} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Print"], Cell[BoxData["\<\"no measure: moment matrix not positive semidefinite\"\>"], \ "Print"] }, Open ]] }, Open ]] }, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, DockedCells->FEPrivate`FrontEndResource[ "FEExpressions", "CompatibilityToolbar"], PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 12333, 283, 1452, "Input"], Cell[12904, 306, 1289, 26, 112, "Input"], Cell[CellGroupData[{ Cell[14218, 336, 532, 10, 31, "Input"], Cell[14753, 348, 3342, 60, 243, "Output"] }, Open ]], Cell[18110, 411, 760, 17, 52, "Input"], Cell[CellGroupData[{ Cell[18895, 432, 221, 5, 31, "Input"], Cell[19119, 439, 647, 11, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19803, 455, 2591, 52, 132, "Input"], Cell[CellGroupData[{ Cell[22419, 511, 951, 13, 23, "Print"], Cell[23373, 526, 950, 13, 23, "Print"], Cell[24326, 541, 949, 13, 23, "Print"], Cell[25278, 556, 952, 13, 23, "Print"], Cell[26233, 571, 952, 13, 23, "Print"], Cell[27188, 586, 952, 13, 23, "Print"] }, Open ]] }, Open ]], Cell[28167, 603, 1636, 46, 192, "Input"], Cell[CellGroupData[{ Cell[29828, 653, 2996, 75, 252, "Input"], Cell[CellGroupData[{ Cell[32849, 732, 900, 13, 23, "Print"], Cell[33752, 747, 1725, 34, 51, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[35526, 787, 1713, 46, 192, "Input"], Cell[CellGroupData[{ Cell[37264, 837, 896, 13, 23, "Print"], Cell[38163, 852, 898, 13, 23, "Print"], Cell[39064, 867, 900, 13, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[40013, 886, 4369, 103, 432, "Input"], Cell[44385, 991, 1648, 32, 72, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[46070, 1028, 1246, 35, 112, "Input"], Cell[47319, 1065, 1735, 34, 72, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49091, 1104, 619, 17, 112, "Input"], Cell[49713, 1123, 903, 13, 23, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[50653, 1141, 2176, 63, 232, "Input"], Cell[CellGroupData[{ Cell[52854, 1208, 900, 13, 23, "Print"], Cell[53757, 1223, 1009, 17, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[54815, 1246, 1385, 41, 152, "Input"], Cell[56203, 1289, 1393, 26, 23, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[57633, 1320, 343, 10, 52, "Input"], Cell[57979, 1332, 1486, 28, 23, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[59502, 1365, 2333, 71, 212, "Input"], Cell[61838, 1438, 1596, 31, 72, "Output"], Cell[63437, 1471, 904, 13, 23, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[64378, 1489, 1201, 37, 112, "Input"], Cell[CellGroupData[{ Cell[65604, 1530, 1061, 18, 23, "Print"], Cell[66668, 1550, 1103, 19, 23, "Print"], Cell[67774, 1571, 1106, 19, 23, "Print"], Cell[68883, 1592, 1101, 19, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[70033, 1617, 820, 22, 31, "Input"], Cell[70856, 1641, 883, 12, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[71776, 1658, 259, 4, 31, "Input"], Cell[72038, 1664, 876, 12, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[72951, 1681, 119, 2, 31, "Input"], Cell[73073, 1685, 873, 12, 30, "Output"] }, Open ]], Cell[73961, 1700, 2013, 53, 192, "Input"], Cell[75977, 1755, 1134, 32, 112, "Input"], Cell[CellGroupData[{ Cell[77136, 1791, 261, 6, 31, "Input"], Cell[77400, 1799, 899, 13, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[78336, 1817, 98, 2, 31, "Input"], Cell[78437, 1821, 213, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[78687, 1829, 706, 16, 31, "Input"], Cell[79396, 1847, 933, 14, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[80366, 1866, 54, 1, 31, "Input"], Cell[80423, 1869, 379, 6, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[80839, 1880, 129, 2, 31, "Input"], Cell[80971, 1884, 995, 23, 72, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[82003, 1912, 57, 1, 31, "Input"], Cell[82063, 1915, 171, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[82271, 1923, 65, 1, 31, "Input"], Cell[82339, 1926, 121, 2, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[82497, 1933, 54, 1, 31, "Input"], Cell[82554, 1936, 114, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[82705, 1942, 60, 1, 31, "Input"], Cell[82768, 1945, 1482, 26, 73, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[84287, 1976, 743, 23, 31, "Input"], Cell[85033, 2001, 192, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[85262, 2009, 305, 10, 52, "Input"], Cell[85570, 2021, 89, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[85696, 2027, 128, 4, 31, "Input"], Cell[85827, 2033, 152, 4, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[86016, 2042, 54, 1, 31, "Input"], Cell[86073, 2045, 90, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[86200, 2051, 79, 2, 31, "Input"], Cell[86282, 2055, 88, 1, 30, "Output"] }, Open ]], Cell[86385, 2059, 74, 2, 31, "Input"], Cell[86462, 2063, 181, 5, 52, "Input"], Cell[86646, 2070, 114, 3, 31, "Input"], Cell[CellGroupData[{ Cell[86785, 2077, 54, 1, 31, "Input"], Cell[86842, 2080, 45, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[86924, 2085, 174, 5, 31, "Input"], Cell[87101, 2092, 46, 0, 30, "Output"] }, Open ]], Cell[87162, 2095, 233, 7, 31, "Input"], Cell[CellGroupData[{ Cell[87420, 2106, 54, 1, 31, "Input"], Cell[87477, 2109, 34, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[87548, 2114, 174, 5, 31, "Input"], Cell[87725, 2121, 45, 0, 30, "Output"] }, Open ]], Cell[87785, 2124, 230, 6, 31, "Input"], Cell[CellGroupData[{ Cell[88040, 2134, 54, 1, 31, "Input"], Cell[88097, 2137, 46, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[88180, 2142, 174, 5, 31, "Input"], Cell[88357, 2149, 46, 0, 30, "Output"] }, Open ]], Cell[88418, 2152, 1016, 31, 152, "Input"], Cell[CellGroupData[{ Cell[89459, 2187, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[89541, 2192, 49, 0, 23, "Print"], Cell[89593, 2194, 894, 30, 125, "Print"], Cell[90490, 2226, 50, 0, 23, "Print"], Cell[90543, 2228, 213, 5, 23, "Print"], Cell[90759, 2235, 251, 6, 23, "Print"], Cell[91013, 2243, 251, 6, 23, "Print"], Cell[91267, 2251, 218, 6, 23, "Print"], Cell[91488, 2259, 251, 6, 23, "Print"], Cell[91742, 2267, 251, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[92042, 2279, 54, 1, 31, "Input"], Cell[92099, 2282, 45, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[92181, 2287, 268, 7, 31, "Input"], Cell[92452, 2296, 89, 1, 30, "Output"] }, Open ]], Cell[92556, 2300, 99, 2, 31, "Input"], Cell[CellGroupData[{ Cell[92680, 2306, 225, 6, 72, "Input"], Cell[92908, 2314, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[92973, 2319, 243, 8, 31, "Input"], Cell[93219, 2329, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[93284, 2334, 78, 2, 31, "Input"], Cell[93365, 2338, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[93430, 2343, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[93512, 2348, 49, 0, 23, "Print"], Cell[93564, 2350, 218, 8, 51, "Print"], Cell[93785, 2360, 85, 1, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[93919, 2367, 78, 2, 31, "Input"], Cell[94000, 2371, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[94065, 2376, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[94147, 2381, 49, 0, 23, "Print"], Cell[94199, 2383, 218, 8, 51, "Print"], Cell[94420, 2393, 50, 0, 23, "Print"], Cell[94473, 2395, 213, 5, 23, "Print"], Cell[94689, 2402, 182, 5, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[94920, 2413, 138, 3, 72, "Input"], Cell[95061, 2418, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[95126, 2423, 78, 2, 31, "Input"], Cell[95207, 2427, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[95272, 2432, 78, 2, 31, "Input"], Cell[95353, 2436, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[95418, 2441, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[95500, 2446, 49, 0, 23, "Print"], Cell[95552, 2448, 218, 8, 51, "Print"], Cell[95773, 2458, 50, 0, 23, "Print"], Cell[95826, 2460, 213, 5, 23, "Print"], Cell[96042, 2467, 265, 6, 23, "Print"], Cell[96310, 2475, 248, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[96585, 2485, 229, 7, 31, "Input"], Cell[CellGroupData[{ Cell[96839, 2496, 78, 2, 31, "Input"], Cell[96920, 2500, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[96985, 2505, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[97067, 2510, 49, 0, 23, "Print"], Cell[97119, 2512, 218, 8, 51, "Print"], Cell[97340, 2522, 87, 1, 23, "Print"] }, Open ]] }, Open ]], Cell[97454, 2527, 444, 14, 52, "Input"], Cell[CellGroupData[{ Cell[97923, 2545, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[98005, 2550, 49, 0, 23, "Print"], Cell[98057, 2552, 218, 8, 51, "Print"], Cell[98278, 2562, 50, 0, 23, "Print"], Cell[98331, 2564, 213, 5, 23, "Print"], Cell[98547, 2571, 276, 6, 23, "Print"], Cell[98826, 2579, 265, 6, 23, "Print"], Cell[99094, 2587, 251, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[99394, 2599, 108, 3, 31, "Input"], Cell[99505, 2604, 47, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[99589, 2610, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[99671, 2615, 49, 0, 23, "Print"], Cell[99723, 2617, 218, 8, 51, "Print"], Cell[99944, 2627, 50, 0, 23, "Print"], Cell[99997, 2629, 213, 5, 23, "Print"], Cell[100213, 2636, 271, 6, 23, "Print"], Cell[100487, 2644, 268, 6, 23, "Print"], Cell[100758, 2652, 251, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[101058, 2664, 49, 1, 31, "Input"], Cell[101110, 2667, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[101175, 2672, 78, 2, 31, "Input"], Cell[101256, 2676, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[101321, 2681, 78, 2, 31, "Input"], Cell[101402, 2685, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[101467, 2690, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[101549, 2695, 49, 0, 23, "Print"], Cell[101601, 2697, 233, 8, 51, "Print"], Cell[101837, 2707, 50, 0, 23, "Print"], Cell[101890, 2709, 213, 5, 23, "Print"], Cell[102106, 2716, 265, 6, 23, "Print"], Cell[102374, 2724, 248, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[102671, 2736, 78, 2, 31, "Input"], Cell[102752, 2740, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[102817, 2745, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[102899, 2750, 49, 0, 23, "Print"], Cell[102951, 2752, 233, 8, 51, "Print"], Cell[103187, 2762, 85, 1, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[103321, 2769, 78, 2, 31, "Input"], Cell[103402, 2773, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[103467, 2778, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[103549, 2783, 49, 0, 23, "Print"], Cell[103601, 2785, 233, 8, 51, "Print"], Cell[103837, 2795, 87, 1, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[103973, 2802, 78, 2, 31, "Input"], Cell[104054, 2806, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[104119, 2811, 27, 0, 31, "Input"], Cell[104149, 2813, 28, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[104214, 2818, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[104296, 2823, 49, 0, 23, "Print"], Cell[104348, 2825, 233, 8, 51, "Print"], Cell[104584, 2835, 50, 0, 23, "Print"], Cell[104637, 2837, 213, 5, 23, "Print"], Cell[104853, 2844, 270, 6, 23, "Print"], Cell[105126, 2852, 218, 6, 23, "Print"], Cell[105347, 2860, 251, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[105625, 2870, 930, 30, 72, "Input"], Cell[CellGroupData[{ Cell[106580, 2904, 50, 1, 31, "Input"], Cell[106633, 2907, 29, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[106699, 2912, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[106781, 2917, 49, 0, 23, "Print"], Cell[106833, 2919, 541, 17, 95, "Print"], Cell[107377, 2938, 50, 0, 23, "Print"], Cell[107430, 2940, 213, 5, 23, "Print"], Cell[107646, 2947, 274, 6, 23, "Print"], Cell[107923, 2955, 267, 6, 23, "Print"], Cell[108193, 2963, 251, 6, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[108493, 2975, 89, 2, 31, "Input"], Cell[108585, 2979, 33, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[108655, 2984, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[108737, 2989, 49, 0, 23, "Print"], Cell[108789, 2991, 541, 17, 95, "Print"], Cell[109333, 3010, 85, 1, 23, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[109467, 3017, 84, 2, 31, "Input"], Cell[109554, 3021, 33, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[109624, 3026, 79, 2, 31, "Input"], Cell[109706, 3030, 29, 0, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[109772, 3035, 57, 1, 31, "Input"], Cell[CellGroupData[{ Cell[109854, 3040, 49, 0, 23, "Print"], Cell[109906, 3042, 541, 17, 95, "Print"], Cell[110450, 3061, 87, 1, 23, "Print"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)