(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 28414, 912] NotebookOptionsPosition[ 26132, 827] NotebookOutlinePosition[ 26475, 842] CellTagsIndexPosition[ 26432, 839] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"S", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"s11", ",", "s12"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "s22"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SI", "=", RowBox[{"Inverse", "[", "S", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"LQLT", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", SuperscriptBox["w", "2"]}], ",", RowBox[{ RowBox[{"-", "2"}], " ", "z", " ", "w"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"allTerms", "=", RowBox[{ RowBox[{"SI", " ", ".", " ", "F", ".", "S"}], "+", RowBox[{ RowBox[{"Transpose", "[", "S", "]"}], ".", RowBox[{"Transpose", "[", "F", "]"}], ".", RowBox[{"Transpose", "[", "SI", "]"}]}], "+", RowBox[{"SI", ".", "LQLT", ".", RowBox[{"Transpose", "[", "SI", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", "allTerms", "]"}]}], "Input", CellChangeTimes->{{3.5175734959977694`*^9, 3.5175735289043255`*^9}, { 3.5175736053268332`*^9, 3.5175737661251907`*^9}, {3.51757380029733*^9, 3.5175738100787053`*^9}, 3.5175738733292847`*^9, {3.517573940189227*^9, 3.5175739430017633`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ FractionBox[ RowBox[{"2", " ", "s12", " ", RowBox[{"(", RowBox[{ RowBox[{"5", " ", "s12"}], "+", RowBox[{ SuperscriptBox["s11", "2"], " ", "s22", " ", SuperscriptBox["w", "2"]}]}], ")"}]}], RowBox[{ SuperscriptBox["s11", "2"], " ", SuperscriptBox["s22", "2"]}]], ",", FractionBox[ RowBox[{ SuperscriptBox["s22", "3"], "-", RowBox[{ SuperscriptBox["s11", "2"], " ", "s22", " ", SuperscriptBox["w", "2"]}], "+", RowBox[{ SuperscriptBox["s12", "2"], " ", "s22", " ", SuperscriptBox["w", "2"]}], "+", RowBox[{"2", " ", "s12", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "5"}], "+", RowBox[{ SuperscriptBox["s22", "2"], " ", "w", " ", "z"}]}], ")"}]}]}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "}"}], ",", RowBox[{"{", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["s22", "3"], "-", RowBox[{ SuperscriptBox["s11", "2"], " ", "s22", " ", SuperscriptBox["w", "2"]}], "+", RowBox[{ SuperscriptBox["s12", "2"], " ", "s22", " ", SuperscriptBox["w", "2"]}], "+", RowBox[{"2", " ", "s12", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "5"}], "+", RowBox[{ SuperscriptBox["s22", "2"], " ", "w", " ", "z"}]}], ")"}]}]}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]], ",", RowBox[{"-", FractionBox[ RowBox[{"2", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "5"}], "+", RowBox[{"s12", " ", "s22", " ", SuperscriptBox["w", "2"]}], "+", RowBox[{"2", " ", SuperscriptBox["s22", "2"], " ", "w", " ", "z"}]}], ")"}]}], SuperscriptBox["s22", "2"]]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.517573746531247*^9, 3.5175737665314455`*^9}, { 3.5175738028754883`*^9, 3.5175738103599586`*^9}, 3.51757387418867*^9, 3.517573943376768*^9, {3.517580636358711*^9, 3.517580636468087*^9}, 3.517591207767909*^9, 3.5175912382056737`*^9, 3.517591478379798*^9, 3.5175915196145983`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "make", " ", "sure", " ", "that", " ", "we", " ", "have", " ", "a", " ", "symmetric", " ", "matrix"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], "-", RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "//", "Simplify"}]}]], "Input", CellChangeTimes->{{3.5175738842668667`*^9, 3.517573899501379*^9}, { 3.5175739542518497`*^9, 3.51757396287696*^9}}], Cell[BoxData["0"], "Output", CellChangeTimes->{{3.5175738877356615`*^9, 3.517573899782633*^9}, { 3.517573948626835*^9, 3.5175739632832155`*^9}, 3.517580725312667*^9, 3.5175912417682133`*^9, 3.5175914803954487`*^9, 3.5175915226771193`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"extract", " ", "the", " ", "matrix", " ", "M_UT", " ", RowBox[{"(", RowBox[{ "note", " ", "that", " ", "we", " ", "divide", " ", "by", " ", "2", " ", "for", " ", "the", " ", "diagonals"}], ")"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"MUT", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "/", "2"}], ",", RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], ",", RowBox[{ RowBox[{"allTerms", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}], "/", "2"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "MUT", "]"}]}]}]], "Input", CellChangeTimes->{{3.5175739852833815`*^9, 3.5175739976428576`*^9}, { 3.517574165613124*^9, 3.5175742104416494`*^9}, {3.517591294909365*^9, 3.517591303753177*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"10", " ", SuperscriptBox["s12", "2"]}], RowBox[{ SuperscriptBox["s11", "2"], " ", SuperscriptBox["s22", "2"]}]], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", SuperscriptBox["w", "2"]}], "s22"]}], ")"}]}], RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"10", " ", "s12"}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "-", FractionBox[ RowBox[{"s11", " ", SuperscriptBox["w", "2"]}], "s22"], "+", FractionBox[ RowBox[{ SuperscriptBox["s12", "2"], " ", SuperscriptBox["w", "2"]}], RowBox[{"s11", " ", "s22"}]], "+", RowBox[{"s22", " ", RowBox[{"(", RowBox[{ FractionBox["1", "s11"], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", "w", " ", "z"}], RowBox[{"s11", " ", "s22"}]]}], ")"}]}]}]}, { RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"10", " ", "s12"}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "-", FractionBox[ RowBox[{"s11", " ", SuperscriptBox["w", "2"]}], "s22"], "+", FractionBox[ RowBox[{ SuperscriptBox["s12", "2"], " ", SuperscriptBox["w", "2"]}], RowBox[{"s11", " ", "s22"}]], "+", RowBox[{"s22", " ", RowBox[{"(", RowBox[{ FractionBox["1", "s11"], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", "w", " ", "z"}], RowBox[{"s11", " ", "s22"}]]}], ")"}]}]}], RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{ FractionBox["10", SuperscriptBox["s22", "2"]], "-", FractionBox[ RowBox[{"s12", " ", SuperscriptBox["w", "2"]}], "s22"], "-", RowBox[{"2", " ", "w", " ", "z"}], "+", FractionBox[ RowBox[{ RowBox[{ RowBox[{"-", "s12"}], " ", SuperscriptBox["w", "2"]}], "-", RowBox[{"2", " ", "s22", " ", "w", " ", "z"}]}], "s22"]}], ")"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "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.5175739980959883`*^9, 3.5175741916914673`*^9, 3.517580728640835*^9, 3.517591304550062*^9, 3.5175914820517197`*^9, 3.5175915253489957`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "multiply", " ", "this", " ", "by", " ", "S", " ", "on", " ", "the", " ", "left"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"SMUT", "=", RowBox[{"S", ".", "MUT"}]}]}]], "Input", CellChangeTimes->{{3.5175742826141605`*^9, 3.517574329427087*^9}, { 3.517580442716273*^9, 3.517580451310087*^9}, {3.517580527107671*^9, 3.517580545482855*^9}, 3.5175808073290863`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], " ", "s11", " ", RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"10", " ", SuperscriptBox["s12", "2"]}], RowBox[{ SuperscriptBox["s11", "2"], " ", SuperscriptBox["s22", "2"]}]], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", SuperscriptBox["w", "2"]}], "s22"]}], ")"}]}], "+", RowBox[{"s12", " ", RowBox[{"(", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"10", " ", "s12"}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "-", FractionBox[ RowBox[{"s11", " ", SuperscriptBox["w", "2"]}], "s22"], "+", FractionBox[ RowBox[{ SuperscriptBox["s12", "2"], " ", SuperscriptBox["w", "2"]}], RowBox[{"s11", " ", "s22"}]], "+", RowBox[{"s22", " ", RowBox[{"(", RowBox[{ FractionBox["1", "s11"], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", "w", " ", "z"}], RowBox[{"s11", " ", "s22"}]]}], ")"}]}]}], ")"}]}]}], ",", RowBox[{ RowBox[{"s11", " ", RowBox[{"(", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"10", " ", "s12"}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "-", FractionBox[ RowBox[{"s11", " ", SuperscriptBox["w", "2"]}], "s22"], "+", FractionBox[ RowBox[{ SuperscriptBox["s12", "2"], " ", SuperscriptBox["w", "2"]}], RowBox[{"s11", " ", "s22"}]], "+", RowBox[{"s22", " ", RowBox[{"(", RowBox[{ FractionBox["1", "s11"], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", "w", " ", "z"}], RowBox[{"s11", " ", "s22"}]]}], ")"}]}]}], ")"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "s12", " ", RowBox[{"(", RowBox[{ FractionBox["10", SuperscriptBox["s22", "2"]], "-", FractionBox[ RowBox[{"s12", " ", SuperscriptBox["w", "2"]}], "s22"], "-", RowBox[{"2", " ", "w", " ", "z"}], "+", FractionBox[ RowBox[{ RowBox[{ RowBox[{"-", "s12"}], " ", SuperscriptBox["w", "2"]}], "-", RowBox[{"2", " ", "s22", " ", "w", " ", "z"}]}], "s22"]}], ")"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"s22", " ", RowBox[{"(", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"10", " ", "s12"}], RowBox[{"s11", " ", SuperscriptBox["s22", "2"]}]]}], "-", FractionBox[ RowBox[{"s11", " ", SuperscriptBox["w", "2"]}], "s22"], "+", FractionBox[ RowBox[{ SuperscriptBox["s12", "2"], " ", SuperscriptBox["w", "2"]}], RowBox[{"s11", " ", "s22"}]], "+", RowBox[{"s22", " ", RowBox[{"(", RowBox[{ FractionBox["1", "s11"], "+", FractionBox[ RowBox[{"2", " ", "s12", " ", "w", " ", "z"}], RowBox[{"s11", " ", "s22"}]]}], ")"}]}]}], ")"}]}], ",", RowBox[{ FractionBox["1", "2"], " ", "s22", " ", RowBox[{"(", RowBox[{ FractionBox["10", SuperscriptBox["s22", "2"]], "-", FractionBox[ RowBox[{"s12", " ", SuperscriptBox["w", "2"]}], "s22"], "-", RowBox[{"2", " ", "w", " ", "z"}], "+", FractionBox[ RowBox[{ RowBox[{ RowBox[{"-", "s12"}], " ", SuperscriptBox["w", "2"]}], "-", RowBox[{"2", " ", "s22", " ", "w", " ", "z"}]}], "s22"]}], ")"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.5175742999893255`*^9, 3.5175743297552156`*^9}, { 3.5175804516069603`*^9, 3.5175804707634044`*^9}, 3.5175805458734846`*^9, 3.5175807516254015`*^9, 3.517580811375964*^9, 3.5175913085813637`*^9, 3.5175914867392797`*^9, 3.517591527552149*^9}] }, Open ]], Cell[BoxData[ RowBox[{"Convert", " ", "these", " ", "into", " ", "expressions", " ", "we", " ", "can", " ", "evaluate", " ", "in", " ", "Matlab"}]], "Input", CellChangeTimes->{{3.5175810399406195`*^9, 3.517581047190712*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"SMUT", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "]"}]], "Input"], Cell["\<\ (s11*((10*Power(s12,2))/(Power(s11,2)*Power(s22,2)) + \ (2*s12*Power(w,2))/s22))/2. + s12*((-10*s12)/(s11*Power(s22,2)) - (s11*Power(w,2))/s22 + \ (Power(s12,2)*Power(w,2))/(s11*s22) + s22*(1/s11 + (2*s12*w*z)/(s11*s22)))\ \>", "Output", CellChangeTimes->{3.517580829048012*^9, 3.517591490708081*^9, 3.5175915314271984`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"SMUT", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}]], "Input"], Cell["\<\ s11*((-10*s12)/(s11*Power(s22,2)) - (s11*Power(w,2))/s22 + \ (Power(s12,2)*Power(w,2))/(s11*s22) + s22*(1/s11 + (2*s12*w*z)/(s11*s22))) + (s12* (10/Power(s22,2) - (s12*Power(w,2))/s22 - 2*w*z + (-(s12*Power(w,2)) - \ 2*s22*w*z)/s22))/2.\ \>", "Output", CellChangeTimes->{3.51758083045428*^9, 3.517591498676882*^9, 3.5175915879277167`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"SMUT", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}], "]"}]], "Input"], Cell["\<\ (s22*(10/Power(s22,2) - (s12*Power(w,2))/s22 - 2*w*z + (-(s12*Power(w,2)) - \ 2*s22*w*z)/s22))/2.\ \>", "Output", CellChangeTimes->{3.517580831907423*^9, 3.517591596146572*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"part", " ", RowBox[{"(", "a", ")"}], " ", "the", " ", "additional", " ", "term", " ", "to", " ", "add"}], "..."}], " ", "we", " ", "again", " ", "multiply", " ", "the", " ", "diagonal", " ", "terms", " ", "by", " ", RowBox[{"1", "/", "2"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"HTRIH", " ", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"wprod", "=", RowBox[{"-", RowBox[{"S", ".", RowBox[{"Transpose", "[", "S", "]"}], ".", "HTRIH", ".", "S"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "wprod", "]"}]}]}]], "Input", CellChangeTimes->{{3.517574645367421*^9, 3.517574671680143*^9}, { 3.5175747171180515`*^9, 3.517574757852833*^9}, {3.517581248895702*^9, 3.5175812603020983`*^9}, {3.517591351831764*^9, 3.517591361706839*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", RowBox[{ RowBox[{"-", "s12"}], " ", SuperscriptBox["s22", "2"]}]}, {"0", RowBox[{"-", SuperscriptBox["s22", "3"]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "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.5175747311025476`*^9, 3.517574758727844*^9}, 3.517581260755212*^9, 3.517591326175288*^9, 3.517591363113107*^9, 3.517591772835719*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.517581242067541*^9, 3.5175812683802752`*^9}}], Cell["-(s12*Power(s22,2))", "Output", CellChangeTimes->{3.517581268911532*^9, 3.517591368722554*^9, 3.517591776273263*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{ FractionBox["1", "2"], RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5175812703021746`*^9, 3.517581278364727*^9}, { 3.51759137153509*^9, 3.5175913754725895`*^9}}], Cell["-Power(s22,3)/2.", "Output", CellChangeTimes->{3.517581278864733*^9, 3.5175913758475943`*^9, 3.517591778445115*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"part", " ", RowBox[{"(", "b", ")"}], " ", "the", " ", "additional", " ", "term", " ", "to", " ", "add"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"HTRIH", " ", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"wprod", "=", RowBox[{ RowBox[{"-", RowBox[{"S", ".", RowBox[{"Transpose", "[", "S", "]"}], ".", "HTRIH", ".", "S"}]}], "//", "Simplify"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "wprod", "]"}]}]}]], "Input", CellChangeTimes->{{3.517574645367421*^9, 3.517574671680143*^9}, { 3.5175747171180515`*^9, 3.517574778040476*^9}, {3.517574812525177*^9, 3.517574814431452*^9}, {3.517591831258137*^9, 3.5175918385863047`*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{ RowBox[{"-", "s11"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["s11", "2"], "+", SuperscriptBox["s12", "2"]}], ")"}]}], RowBox[{ RowBox[{"-", "s12"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["s11", "2"], "+", SuperscriptBox["s12", "2"]}], ")"}]}]}, { RowBox[{ RowBox[{"-", "s11"}], " ", "s12", " ", "s22"}], RowBox[{ RowBox[{"-", SuperscriptBox["s12", "2"]}], " ", "s22"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "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.5175747311025476`*^9, 3.5175747786186085`*^9}, 3.5175748148689575`*^9, 3.51759183899256*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{ FractionBox["1", "2"], RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.517591843523868*^9, 3.5175918597427745`*^9}}], Cell["-(s11*(Power(s11,2) + Power(s12,2)))/2.", "Output", CellChangeTimes->{{3.5175918544302063`*^9, 3.517591859992778*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.5175918681803384`*^9, 3.517591871711626*^9}}], Cell["-(s12*(Power(s11,2) + Power(s12,2)))", "Output", CellChangeTimes->{3.5175918722897587`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{ FractionBox["1", "2"], RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5175918773679485`*^9, 3.5175918778210793`*^9}}], Cell["-(Power(s12,2)*s22)/2.", "Output", CellChangeTimes->{3.5175918781335835`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"part", " ", RowBox[{"(", "c", ")"}], " ", "the", " ", "additional", " ", "term", " ", "to", " ", "add"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"HTRIH", " ", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"wprod", "=", RowBox[{ RowBox[{"-", RowBox[{"S", ".", RowBox[{"Transpose", "[", "S", "]"}], ".", "HTRIH", ".", "S"}]}], "//", "Simplify"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "wprod", "]"}]}]}]], "Input", CellChangeTimes->{{3.517574645367421*^9, 3.517574671680143*^9}, { 3.5175747171180515`*^9, 3.517574757852833*^9}, {3.5175747992750654`*^9, 3.517574821681487*^9}, {3.517591979212644*^9, 3.517591988978343*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{ RowBox[{"-", "s11"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["s11", "2"], "+", SuperscriptBox["s12", "2"]}], ")"}]}], RowBox[{ RowBox[{"-", "s12"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["s11", "2"], "+", SuperscriptBox["s12", "2"], "+", SuperscriptBox["s22", "2"]}], ")"}]}]}, { RowBox[{ RowBox[{"-", "s11"}], " ", "s12", " ", "s22"}], RowBox[{ RowBox[{"-", "s22"}], " ", RowBox[{"(", RowBox[{ SuperscriptBox["s12", "2"], "+", SuperscriptBox["s22", "2"]}], ")"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "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.5175747311025476`*^9, 3.517574758727844*^9}, { 3.5175748047907267`*^9, 3.517574822072117*^9}, 3.5175919898064785`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{ FractionBox["1", "2"], RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.517591843523868*^9, 3.5175918597427745`*^9}}], Cell["-(s11*(Power(s11,2) + Power(s12,2)))/2.", "Output", CellChangeTimes->{{3.5175918544302063`*^9, 3.517591859992778*^9}, 3.517592002181637*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.5175918681803384`*^9, 3.517591871711626*^9}}], Cell["-(s12*(Power(s11,2) + Power(s12,2) + Power(s22,2)))", "Output", CellChangeTimes->{3.5175918722897587`*^9, 3.5175920038847322`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CForm", "[", RowBox[{ FractionBox["1", "2"], RowBox[{"wprod", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5175918773679485`*^9, 3.5175918778210793`*^9}}], Cell["-(s22*(Power(s12,2) + Power(s22,2)))/2.", "Output", CellChangeTimes->{3.5175918781335835`*^9, 3.517592005587879*^9}] }, Open ]] }, WindowSize->{962, 734}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 1618, 50, 135, "Input"], Cell[2188, 74, 2333, 67, 96, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4558, 146, 574, 15, 52, "Input"], Cell[5135, 163, 246, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5418, 171, 1291, 36, 72, "Input"], Cell[6712, 209, 3057, 91, 88, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9806, 305, 446, 10, 52, "Input"], Cell[10255, 317, 4329, 128, 146, "Output"] }, Open ]], Cell[14599, 448, 229, 3, 31, "Input"], Cell[CellGroupData[{ Cell[14853, 455, 138, 4, 31, "Input"], Cell[14994, 461, 349, 8, 76, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15380, 474, 138, 4, 31, "Input"], Cell[15521, 480, 365, 8, 76, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15923, 493, 138, 4, 31, "Input"], Cell[16064, 499, 187, 4, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16288, 508, 1119, 29, 92, "Input"], Cell[17410, 539, 885, 25, 62, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18332, 569, 207, 5, 31, "Input"], Cell[18542, 576, 126, 2, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18705, 583, 300, 8, 47, "Input"], Cell[19008, 593, 125, 2, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19170, 600, 980, 26, 92, "Input"], Cell[20153, 628, 1204, 36, 65, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21394, 669, 250, 7, 47, "Input"], Cell[21647, 678, 125, 1, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21809, 684, 207, 5, 31, "Input"], Cell[22019, 691, 98, 1, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22154, 697, 252, 7, 47, "Input"], Cell[22409, 706, 84, 1, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22530, 712, 980, 26, 92, "Input"], Cell[23513, 740, 1363, 40, 68, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24913, 785, 250, 7, 47, "Input"], Cell[25166, 794, 151, 2, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25354, 801, 207, 5, 31, "Input"], Cell[25564, 808, 137, 1, 44, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25738, 814, 252, 7, 47, "Input"], Cell[25993, 823, 123, 1, 44, "Output"] }, Open ]] } ] *) (* End of internal cache information *)