(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 9494, 295]*) (*NotebookOutlinePosition[ 10376, 325]*) (* CellTagsIndexPosition[ 10291, 319]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Diagonizability of Matrices and Jordan Canonical Form", "Title"], Cell[CellGroupData[{ Cell["Diagonalizable Matrices - Development of Similar Matrices", "Section"], Cell["\<\ First define your transformation matrix and find its eigenvalues and \ eigenvectors.\ \>", "Text"], Cell[BoxData[{ \(Clear[a, b, p, eig, evectors]\), "\n", \(\(a = {{0, 1, \(-1\)}, {4, \(-2\), 0}, {1, 0, \(-2\)}};\) // N\), "\n", \(MatrixForm[a]\), "\n", \(eig = Eigensystem[a]\ \)}], "Input"], Cell["\<\ Be sure you know how to read the Eigensystem output!!! Now define the matrix of eigenvectors (p) and verify the form for the similar \ matrix.\ \>", "Text"], Cell[BoxData[{ \(Print["\", MatrixForm[evectors = eig[\([2]\)]]]\), "\n", \(Print["\", MatrixForm[p = Transpose[evectors]]]\), "\n", \(Print["\

", MatrixForm[pinv = Inverse[p]]\ ]\), "\n", \(Print[\*"\"\\"", MatrixForm[b = pinv . a . p]]\)}], "Input"], Cell["\<\ Look at the entries in this last matrix compared to the eigenvalues of the \ matrix.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Non-Diagonizable Matrices", "Section"], Cell[CellGroupData[{ Cell["Example", "Subsection"], Cell["Now consider a matrix with defective eigenvalues.", "Text"], Cell[BoxData[{ \(Clear[a, p]\), "\[IndentingNewLine]", \(\(a = {{3, 6, \(-7\), 7}, {\(-1\), \(-3\), 1, 0}, {26, 27, \(-31\), 29}, {26, 26, \(-27\), 24}};\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[a]]\), "\[IndentingNewLine]", \(Print["\", eig = Eigensystem[a]]\), "\[IndentingNewLine]", \(\(p = Transpose[ Table[eig[\([2, i]\)], {i, 1, Length[eig[\([2]\)]]}]];\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[ p], "\"]\), "\[IndentingNewLine]", \(Inverse[p]\)}], "Input"], Cell[TextData[{ "Notice that the matrix p has two zero columns and hence does not possess \ an inverse. In these cases, the next best thing we can do is to reduce it to \ a nearly diagonal matrix using the command ", StyleBox["JordanDecomposition", FontWeight->"Bold"], ". " }], "Text"], Cell[BoxData[{ \(\({p1, b} = JordanDecomposition[a];\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[p1]]\), "\[IndentingNewLine]", \(Print["\", MatrixForm[b]]\), "\[IndentingNewLine]", \(Print[\*"\"\\"", Inverse[p1] . a . p1 \[Equal] b]\)}], "Input"], Cell["\<\ Notice that two of the columns in the matrix p1 are the two nonzero \ eigenvectors. \ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Exercise ", "Subsection"], Cell["\<\ To see what the other vectors represent in the example above,consider the \ following problem\ \>", "Text"], Cell[BoxData[{ \(\(m = {{3, \(-1\)}, {1, 1}};\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[{\(x'\)[t], \(y'\)[t]}], "\< = \>", MatrixForm[m], "\<.\>" MatrixForm[{x[t], y[t]}]]\), "\[IndentingNewLine]", \(Print["\", Eigensystem[m]]\)}], "Input"], Cell["\<\ Since we have a defective eigenvalue, we need to find a second solution of \ the following form.\ \>", "Text"], Cell[BoxData[ \(sol = Solve[\((m - 2 IdentityMatrix[2])\) . {w1, w2} \[Equal] {1, 1}, {w1, w2}]\)], "Input"], Cell["If we let w2=0, we get the vector", "Text"], Cell[BoxData[ \(MatrixForm[\({w1, w2} /. sol\) /. w2 \[Rule] 0]\)], "Input"], Cell["\<\ Let's see if this is in any way related to the other column of the p1 matrix \ when we find a Jordan Cannonical form\ \>", "Text"], Cell[BoxData[{ \(\({p1, b} = JordanDecomposition[m];\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[p1]]\), "\[IndentingNewLine]", \(Print["\", MatrixForm[b]]\)}], "Input"], Cell["\<\ Notice that the other column vector of p1 is the same as our {w1,w2}. The solution can be written as follows.\ \>", "Text"], Cell[BoxData[{ \(\(sone = {1, 1} \[ExponentialE]\^\(2 t\);\)\), "\[IndentingNewLine]", \(\(stwo = {1, 1}\ t\ \[ExponentialE]\^\(2 t\) + {1, 0} \[ExponentialE]\^\(2 t\);\)\), "\[IndentingNewLine]", \(generalsolution = k1\ sone + k2\ stwo // Simplify\)}], "Input"], Cell[TextData[{ "Does this agree with the solution found with ", StyleBox["DSolve", FontWeight->"Bold"], "? \n", StyleBox["NOTE: ", FontWeight->"Bold"], "Recall that we were having problem with the DSolve command when I", " entered the differential equation in matrix form. I found out that we \ need to use the command ", StyleBox["Thread ", FontWeight->"Bold"], "in Version 4.1 so that ", StyleBox["Mathematica", FontSlant->"Italic"], " will correctly decouple the system of equations." }], "Text"], Cell[BoxData[ \(DSolve[ Thread[{\(x'\)[t], \(y'\)[t]} \[Equal] m . {x[t], y[t]}], {x[t], y[t]}, t]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["System of 4 Equations", "Subsection"], Cell["\<\ Suppose that you have a system of 4 linear differential equations, with one \ repeated eigenvalue\ \>", "Text"], Cell[BoxData[{ \(\(m = {{2, 4, \(-6\), 0}, {4, 6, \(-3\), \(-4\)}, {0, 0, 4, 0}, {0, 4, \(-6\), 2}};\)\), "\[IndentingNewLine]", \(Print["\", MatrixForm[{\(x1'\)[t], \(x2'\)[t], \(x3'\)[t], \(x4'\)[ t]}], "\< = \>", MatrixForm[m], "\<.\>" MatrixForm[{x1[t], x2[t], x3[t], x4[t]}]]\), "\[IndentingNewLine]", \(Print["\", eig = Eigensystem[m]]\)}], "Input"], Cell["From this, I can write three solutions.", "Text"], Cell[BoxData[{ \(sone = eig[\([2, 1]\)] \[ExponentialE]\^\(eig[\([1, 1]\)]\ t\)\), "\ \[IndentingNewLine]", \(stwo = eig[\([2, 3]\)] \[ExponentialE]\^\(eig[\([1, 3]\)]\ t\)\), "\ \[IndentingNewLine]", \(sthree = eig[\([2, 4]\)] \[ExponentialE]\^\(eig[\([1, 4]\)]\ t\)\)}], "Input"], Cell["\<\ Now let's use the JordanDecomposition command to find the vector \ {w1,w2,w3,w4}.\ \>", "Text"], Cell[BoxData[{ \(\({p1, b} = JordanDecomposition[m];\)\), "\[IndentingNewLine]", \(MatrixForm /@ {p1, b}\)}], "Input", CellTags->"JordanDecomposition"], Cell["\<\ Contrast this to what we would get if we had used the homework method in the \ previous exercise.\ \>", "Text"], Cell[BoxData[ \(sol = Solve[\((m - 2 IdentityMatrix[4])\) . {w1, w2, w3, w4} \[Equal] {1, 0, 0, 1}, {w1, w2, w3, w4}]\)], "Input"], Cell["If we let w4=0, notice the vector we get.", "Text"], Cell[BoxData[ \(\({w1, w2, w3, w4} /. sol\) /. w4 \[Rule] 0\)], "Input"], Cell["\<\ this agrees with the extra vector (noneigenvector) in p1 above. Now I can write my fourth solution part and my general solution as follows.\ \>", "ExampleText", CellTags->"JordanDecomposition"], Cell[BoxData[{ \(sfour = \ {\(-1\)/4, 1/4, 0, 0}\ \[ExponentialE]\^\(2 t\) + {1, 0, 0, 1}\ t\ \[ExponentialE]\^\(2 t\)\), "\[IndentingNewLine]", \(generalsolution = k1\ sone + k2\ stwo + k3\ sthree + k4\ sfour // Simplify\)}], "Input"], Cell["How does this compare with the solution using DSolve?", "Text"] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{496, 537}, WindowMargins->{{0, Automatic}, {Automatic, 0}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{ "JordanDecomposition"->{ Cell[8322, 258, 162, 3, 50, "Input", CellTags->"JordanDecomposition"], Cell[8908, 278, 205, 4, 42, "ExampleText", CellTags->"JordanDecomposition"]} } *) (*CellTagsIndex CellTagsIndex->{ {"JordanDecomposition", 10097, 310} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 70, 0, 225, "Title"], Cell[CellGroupData[{ Cell[1822, 56, 76, 0, 86, "Section"], Cell[1901, 58, 108, 3, 33, "Text"], Cell[2012, 63, 219, 5, 90, "Input"], Cell[2234, 70, 166, 4, 52, "Text"], Cell[2403, 76, 442, 7, 172, "Input"], Cell[2848, 85, 108, 3, 33, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[2993, 93, 44, 0, 39, "Section"], Cell[CellGroupData[{ Cell[3062, 97, 29, 0, 47, "Subsection"], Cell[3094, 99, 65, 0, 33, "Text"], Cell[3162, 101, 722, 14, 250, "Input"], Cell[3887, 117, 296, 7, 71, "Text"], Cell[4186, 126, 366, 6, 91, "Input"], Cell[4555, 134, 108, 3, 33, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[4700, 142, 31, 0, 31, "Subsection"], Cell[4734, 144, 117, 3, 52, "Text"], Cell[4854, 149, 381, 7, 150, "Input"], Cell[5238, 158, 120, 3, 52, "Text"], Cell[5361, 163, 131, 3, 50, "Input"], Cell[5495, 168, 49, 0, 33, "Text"], Cell[5547, 170, 80, 1, 30, "Input"], Cell[5630, 173, 140, 3, 52, "Text"], Cell[5773, 178, 237, 4, 70, "Input"], Cell[6013, 184, 134, 3, 52, "Text"], Cell[6150, 189, 294, 4, 70, "Input"], Cell[6447, 195, 537, 16, 109, "Text"], Cell[6987, 213, 128, 3, 50, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[7152, 221, 43, 0, 31, "Subsection"], Cell[7198, 223, 121, 3, 52, "Text"], Cell[7322, 228, 486, 9, 170, "Input"], Cell[7811, 239, 55, 0, 33, "Text"], Cell[7869, 241, 342, 10, 70, "Input"], Cell[8214, 253, 105, 3, 33, "Text"], Cell[8322, 258, 162, 3, 50, "Input", CellTags->"JordanDecomposition"], Cell[8487, 263, 121, 3, 52, "Text"], Cell[8611, 268, 155, 3, 50, "Input"], Cell[8769, 273, 57, 0, 33, "Text"], Cell[8829, 275, 76, 1, 30, "Input"], Cell[8908, 278, 205, 4, 42, "ExampleText", CellTags->"JordanDecomposition"], Cell[9116, 284, 266, 4, 70, "Input"], Cell[9385, 290, 69, 0, 33, "Text"] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)