(* 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[ 28555, 910] NotebookOptionsPosition[ 25734, 809] NotebookOutlinePosition[ 26549, 839] CellTagsIndexPosition[ 26382, 832] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"<<", "/Users/jfrankli/bin/EinsteinVariation.handout.m"}]], "Input", CellChangeTimes->{{3.401025545256775*^9, 3.401025555608487*^9}}], Cell[CellGroupData[{ Cell["Defining a Metric/Coordinates", "Section", CellChangeTimes->{{3.401025614107069*^9, 3.401025625854991*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"gll", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"r", "^", "2"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{ RowBox[{"r", "^", "2"}], " ", RowBox[{ RowBox[{"Sin", "[", "T", "]"}], "^", "2"}]}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Xu", " ", "=", " ", RowBox[{"{", RowBox[{"r", ",", "T", ",", "P"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "gll", "]"}]}], "Input", CellChangeTimes->{{3.4010255809389677`*^9, 3.401025606330676*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "0", "0"}, {"0", SuperscriptBox["r", "2"], "0"}, {"0", "0", RowBox[{ SuperscriptBox["r", "2"], " ", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}]} }, 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.401025607059128*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Find Christoffel Connection:", "Subsection", CellChangeTimes->{{3.401025629316183*^9, 3.401025633848157*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"CCull", " ", "=", " ", RowBox[{"GetCCull", "[", RowBox[{"gll", ",", "Xu"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4010256412717447`*^9, 3.401025646628264*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", "CCull", "]"}]], "Input", CellChangeTimes->{{3.4010256478160267`*^9, 3.4010256504800262`*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, {"0"}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, { RowBox[{"-", "r"}]}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, {"0"}, { RowBox[{ RowBox[{"-", "r"}], " ", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]}, { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, { FractionBox["1", "r"]}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ { FractionBox["1", "r"]}, {"0"}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, {"0"}, { RowBox[{ RowBox[{"-", RowBox[{"Cos", "[", "T", "]"}]}], " ", RowBox[{"Sin", "[", "T", "]"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]}, { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, {"0"}, { FractionBox["1", "r"]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"0"}, {"0"}, { RowBox[{"Cot", "[", "T", "]"}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ { FractionBox["1", "r"]}, { RowBox[{"Cot", "[", "T", "]"}]}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]} }, 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.401025650890181*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Calculate Riemann Tensor", "Subsection", CellChangeTimes->{{3.401025658745398*^9, 3.401025661702998*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "GetRiemann"}]], "Input", CellChangeTimes->{{3.401025671893749*^9, 3.4010256791693087`*^9}}], Cell[BoxData[ StyleBox["\<\"GetRiemann[gll,X] - returns R^u_{vab} given metric gll = \ g_{uv} and coordinates X.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.401025679820198*^9}, CellTags->"Info3401000479-2059013"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"Rulll", " ", "=", " ", RowBox[{"GetRiemann", "[", RowBox[{"gll", ",", "Xu"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.401025683529265*^9, 3.401025689171542*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", "Rulll", "]"}]], "Input", CellChangeTimes->{{3.40102569033654*^9, 3.40102569274067*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}]}, { RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}]}, { RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"], "-", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}]}, {"0", RowBox[{ RowBox[{"-", "1"}], "-", SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"], "+", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}], "0"} }, 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]", ")"}], RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, 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]", ")"}]} }, 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.4010256931709003`*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["A Curved Space", "Section", CellChangeTimes->{{3.401025745821941*^9, 3.4010257479190607`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"DD", "=", "2"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gll", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"R", "^", "2"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{ RowBox[{"R", "^", "2"}], " ", RowBox[{ RowBox[{"Sin", "[", "T", "]"}], "^", "2"}]}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"guu", " ", "=", " ", RowBox[{"Inverse", "[", "gll", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Xu", " ", "=", " ", RowBox[{"{", RowBox[{"T", ",", "P"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "gll", "]"}]}], "Input", CellChangeTimes->{{3.401025759563344*^9, 3.401025775333015*^9}, { 3.401025825050303*^9, 3.401025857961461*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { SuperscriptBox["R", "2"], "0"}, {"0", RowBox[{ SuperscriptBox["R", "2"], " ", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}]} }, 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.401025775963038*^9, {3.4010258293485403`*^9, 3.4010258583971024`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Rulll", " ", "=", " ", RowBox[{"GetRiemann", "[", RowBox[{"gll", ",", "Xu"}], "]"}]}]], "Input", CellChangeTimes->{{3.401025779056426*^9, 3.401025786672143*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}], ",", "0"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{ SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"], "-", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"]}], "+", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}], ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.4010257828360577`*^9, 3.401025788152521*^9}}] }, Open ]], Cell["Now we can calculate the Ricci tensor:", "Text", CellChangeTimes->{{3.4010257918332977`*^9, 3.40102579725902*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Rll", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Rulll", "[", RowBox[{"[", RowBox[{"ss", ",", "aa", ",", "ss", ",", "bb"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"ss", ",", "1", ",", "DD"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"aa", ",", "1", ",", "DD"}], "}"}], ",", RowBox[{"{", RowBox[{"bb", ",", "1", ",", "DD"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.401025806339332*^9, 3.401025836648142*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"]}], "+", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.401025837803356*^9}] }, Open ]], Cell["And the Ricci scalar", "Text", CellChangeTimes->{{3.401025841100045*^9, 3.401025843487041*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Rs", " ", "=", " ", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Rll", "[", RowBox[{"[", RowBox[{"aa", ",", "bb"}], "]"}], "]"}], " ", RowBox[{"guu", "[", RowBox[{"[", RowBox[{"aa", ",", "bb"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"aa", ",", "1", ",", "DD"}], "}"}], ",", RowBox[{"{", RowBox[{"bb", ",", "1", ",", "DD"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.401025844852562*^9, 3.401025870853324*^9}}], Cell[BoxData[ RowBox[{ FractionBox["1", SuperscriptBox["R", "2"]], "+", FractionBox[ RowBox[{ RowBox[{"-", SuperscriptBox[ RowBox[{"Cot", "[", "T", "]"}], "2"]}], "+", SuperscriptBox[ RowBox[{"Csc", "[", "T", "]"}], "2"]}], SuperscriptBox["R", "2"]]}]], "Output", CellChangeTimes->{3.4010258713840523`*^9}] }, Open ]], Cell[TextData[{ "And, naturally, ", StyleBox["Mathematica", FontSlant->"Italic"], " has given us a thinly veiled R^(-2):" }], "Text", CellChangeTimes->{{3.401025874497162*^9, 3.401025891535225*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", "Rs", "]"}]], "Input", CellChangeTimes->{{3.401025894116654*^9, 3.401025895622566*^9}}], Cell[BoxData[ FractionBox["2", SuperscriptBox["R", "2"]]], "Output", CellChangeTimes->{3.401025896072673*^9}] }, Open ]], Cell["\<\ Using the package, we can also ask for these elements directly:\ \>", "Text", CellChangeTimes->{{3.4010259000874853`*^9, 3.401025913463163*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "GetRicci"}]], "Input", CellChangeTimes->{{3.401025914288178*^9, 3.4010259163260937`*^9}}], Cell[BoxData[ StyleBox["\<\"GetRicci[gll,X] - returns R_{uv} for a given metric gll = \ g_{uv} and coordinates X.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4010259170694838`*^9}, CellTags->"Info3401000716-5988444"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{"GetRicci", "[", RowBox[{"gll", ",", "Xu"}], "]"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.4010259195176764`*^9, 3.40102593128028*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "0"}, {"0", SuperscriptBox[ RowBox[{"Sin", "[", "T", "]"}], "2"]} }, 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.401025925049315*^9, 3.4010259316900253`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "GetRicciS"}]], "Input", CellChangeTimes->{{3.401025933503118*^9, 3.401025937704146*^9}}], Cell[BoxData[ StyleBox["\<\"GetRicciS[gll,X] - returns the Ricci scalar R for a given \ metric gll = g_{uv} and coordinates X.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4010259380894537`*^9}, CellTags->"Info3401000737-1989940"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{"GetRicciS", "[", RowBox[{"gll", ",", "Xu"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.4010259399259653`*^9, 3.401025947368228*^9}}], Cell[BoxData[ FractionBox["2", SuperscriptBox["R", "2"]]], "Output", CellChangeTimes->{3.401025947772024*^9}] }, Open ]] }, Open ]] }, WindowSize->{640, 656}, WindowMargins->{{Automatic, -798}, {Automatic, 21}}, ShowSelection->True, FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (April 20, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "Info3401000479-2059013"->{ Cell[10110, 313, 230, 4, 42, "Print", CellTags->"Info3401000479-2059013"]}, "Info3401000716-5988444"->{ Cell[23740, 742, 233, 4, 42, "Print", CellTags->"Info3401000716-5988444"]}, "Info3401000737-1989940"->{ Cell[25114, 787, 246, 4, 42, "Print", CellTags->"Info3401000737-1989940"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Info3401000479-2059013", 26058, 820}, {"Info3401000716-5988444", 26168, 823}, {"Info3401000737-1989940", 26278, 826} } *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 157, 2, 27, "Input"], Cell[CellGroupData[{ Cell[750, 27, 114, 1, 67, "Section"], Cell[CellGroupData[{ Cell[889, 32, 758, 23, 58, "Input"], Cell[1650, 57, 806, 24, 67, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2493, 86, 116, 1, 34, "Subsection"], Cell[2612, 89, 213, 5, 27, "Input"], Cell[CellGroupData[{ Cell[2850, 98, 137, 2, 27, "Input"], Cell[2990, 102, 6810, 196, 181, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[9849, 304, 112, 1, 34, "Subsection"], Cell[CellGroupData[{ Cell[9986, 309, 121, 2, 27, "Input"], Cell[10110, 313, 230, 4, 42, "Print", CellTags->"Info3401000479-2059013"] }, Open ]], Cell[10355, 320, 213, 5, 27, "Input"], Cell[CellGroupData[{ Cell[10593, 329, 131, 2, 27, "Input"], Cell[10727, 333, 6424, 174, 166, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[17212, 514, 101, 1, 67, "Section"], Cell[CellGroupData[{ Cell[17338, 519, 885, 26, 88, "Input"], Cell[18226, 547, 827, 24, 51, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19090, 576, 193, 4, 27, "Input"], Cell[19286, 582, 1457, 49, 53, "Output"] }, Open ]], Cell[20758, 634, 121, 1, 26, "Text"], Cell[CellGroupData[{ Cell[20904, 639, 561, 15, 43, "Input"], Cell[21468, 656, 450, 15, 33, "Output"] }, Open ]], Cell[21933, 674, 102, 1, 26, "Text"], Cell[CellGroupData[{ Cell[22060, 679, 521, 15, 27, "Input"], Cell[22584, 696, 350, 12, 49, "Output"] }, Open ]], Cell[22949, 711, 204, 6, 26, "Text"], Cell[CellGroupData[{ Cell[23178, 721, 128, 2, 27, "Input"], Cell[23309, 725, 114, 3, 46, "Output"] }, Open ]], Cell[23438, 731, 155, 3, 26, "Text"], Cell[CellGroupData[{ Cell[23618, 738, 119, 2, 27, "Input"], Cell[23740, 742, 233, 4, 42, "Print", CellTags->"Info3401000716-5988444"] }, Open ]], Cell[CellGroupData[{ Cell[24010, 751, 229, 5, 27, "Input"], Cell[24242, 758, 714, 20, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24993, 783, 118, 2, 27, "Input"], Cell[25114, 787, 246, 4, 42, "Print", CellTags->"Info3401000737-1989940"] }, Open ]], Cell[CellGroupData[{ Cell[25397, 796, 192, 4, 27, "Input"], Cell[25592, 802, 114, 3, 46, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)