(* 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[ 7776, 236] NotebookOptionsPosition[ 7176, 212] NotebookOutlinePosition[ 7523, 227] CellTagsIndexPosition[ 7480, 224] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"P", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"p11", ",", "p12"}], "}"}], ",", RowBox[{"{", RowBox[{"p12", ",", "p22"}], "}"}]}], "}"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"must", " ", "be", " ", "symmetric"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Phi", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"phi11", ",", "phi12"}], "}"}], ",", RowBox[{"{", RowBox[{"phi21", ",", "phi22"}], "}"}]}], "}"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{ "does", " ", "not", " ", "need", " ", "to", " ", "be", " ", "symmetric"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"L", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"lam11", ",", "lam12"}], "}"}], ",", RowBox[{"{", RowBox[{"lam21", ",", "lam22"}], "}"}]}], "}"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ "does", " ", "not", " ", "need", " ", "to", " ", "be", " ", "symmetric"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Q", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"q11", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "q22"}], "}"}]}], "}"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{ "must", " ", "be", " ", "symmetric", " ", "and", " ", "we", " ", "take", " ", "it", " ", "to", " ", "be", " ", "diagonal"}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.512231465918578*^9, 3.512231528184716*^9}, { 3.5122316777953043`*^9, 3.512231706686158*^9}, {3.512231742202027*^9, 3.51223174560832*^9}, {3.512231849406031*^9, 3.5122318722656283`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"OneUpdate", " ", "=", RowBox[{ RowBox[{ RowBox[{"Phi", " ", ".", " ", "P", " ", ".", " ", RowBox[{"Transpose", "[", "Phi", "]"}]}], "+", RowBox[{"L", " ", ".", " ", "Q", " ", ".", " ", RowBox[{"Transpose", "[", "L", "]"}]}]}], "//", "Simplify"}]}]], "Input", CellChangeTimes->{{3.5122315329347086`*^9, 3.5122315997634077`*^9}, { 3.512231752139654*^9, 3.512231754077114*^9}, {3.5122319597975764`*^9, 3.512231968750746*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"p11", " ", SuperscriptBox["phi11", "2"]}], "+", RowBox[{"2", " ", "p12", " ", "phi11", " ", "phi12"}], "+", RowBox[{"p22", " ", SuperscriptBox["phi12", "2"]}], "+", RowBox[{ SuperscriptBox["lam11", "2"], " ", "q11"}], "+", RowBox[{ SuperscriptBox["lam12", "2"], " ", "q22"}]}], ",", RowBox[{ RowBox[{"p11", " ", "phi11", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi12", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi11", " ", "phi22"}], "+", RowBox[{"p22", " ", "phi12", " ", "phi22"}], "+", RowBox[{"lam11", " ", "lam21", " ", "q11"}], "+", RowBox[{"lam12", " ", "lam22", " ", "q22"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"p11", " ", "phi11", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi12", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi11", " ", "phi22"}], "+", RowBox[{"p22", " ", "phi12", " ", "phi22"}], "+", RowBox[{"lam11", " ", "lam21", " ", "q11"}], "+", RowBox[{"lam12", " ", "lam22", " ", "q22"}]}], ",", RowBox[{ RowBox[{"p11", " ", SuperscriptBox["phi21", "2"]}], "+", RowBox[{"2", " ", "p12", " ", "phi21", " ", "phi22"}], "+", RowBox[{"p22", " ", SuperscriptBox["phi22", "2"]}], "+", RowBox[{ SuperscriptBox["lam21", "2"], " ", "q11"}], "+", RowBox[{ SuperscriptBox["lam22", "2"], " ", "q22"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.512231541372317*^9, 3.5122316003415403`*^9}, 3.512231708717395*^9, {3.512231747483344*^9, 3.5122317543114862`*^9}, 3.512231873828101*^9, {3.5122319605944614`*^9, 3.512231969016374*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"extract", " ", "the", " ", "components", " ", RowBox[{"(", RowBox[{"1", ",", "1"}], ")"}]}], ",", " ", RowBox[{"(", RowBox[{"1", ",", "2"}], ")"}], ",", " ", RowBox[{"and", " ", RowBox[{"(", RowBox[{"2", ",", "2"}], ")"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OneUpdate", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"OneUpdate", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"OneUpdate", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OneUpdate", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "\[Equal]", RowBox[{"OneUpdate", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.5122319707820215`*^9, 3.5122320316575193`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"p11", " ", SuperscriptBox["phi11", "2"]}], "+", RowBox[{"2", " ", "p12", " ", "phi11", " ", "phi12"}], "+", RowBox[{"p22", " ", SuperscriptBox["phi12", "2"]}], "+", RowBox[{ SuperscriptBox["lam11", "2"], " ", "q11"}], "+", RowBox[{ SuperscriptBox["lam12", "2"], " ", "q22"}]}]], "Output", CellChangeTimes->{{3.5122319740633135`*^9, 3.5122320022979093`*^9}, 3.5122320326419067`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"p11", " ", "phi11", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi12", " ", "phi21"}], "+", RowBox[{"p12", " ", "phi11", " ", "phi22"}], "+", RowBox[{"p22", " ", "phi12", " ", "phi22"}], "+", RowBox[{"lam11", " ", "lam21", " ", "q11"}], "+", RowBox[{"lam12", " ", "lam22", " ", "q22"}]}]], "Output", CellChangeTimes->{{3.5122319740633135`*^9, 3.5122320022979093`*^9}, 3.5122320326419067`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"p11", " ", SuperscriptBox["phi21", "2"]}], "+", RowBox[{"2", " ", "p12", " ", "phi21", " ", "phi22"}], "+", RowBox[{"p22", " ", SuperscriptBox["phi22", "2"]}], "+", RowBox[{ SuperscriptBox["lam21", "2"], " ", "q11"}], "+", RowBox[{ SuperscriptBox["lam22", "2"], " ", "q22"}]}]], "Output", CellChangeTimes->{{3.5122319740633135`*^9, 3.5122320022979093`*^9}, 3.5122320326419067`*^9}], Cell[BoxData["True"], "Output", CellChangeTimes->{{3.5122319740633135`*^9, 3.5122320022979093`*^9}, 3.5122320326419067`*^9}] }, Open ]] }, WindowSize->{1116, 750}, WindowMargins->{{74, Automatic}, {Automatic, 142}}, 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[545, 20, 1746, 52, 92, "Input"], Cell[CellGroupData[{ Cell[2316, 76, 479, 10, 31, "Input"], Cell[2798, 88, 1808, 44, 99, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4643, 137, 1036, 29, 112, "Input"], Cell[5682, 168, 447, 12, 30, "Output"], Cell[6132, 182, 446, 9, 30, "Output"], Cell[6581, 193, 447, 12, 30, "Output"], Cell[7031, 207, 129, 2, 30, "Output"] }, Open ]] } ] *) (* End of internal cache information *)