Preface


This tutorial is an introduction to the programming package matlab (created by MathWorks© ). This tutorial was developed solely for the purpose of education. The tutorial accompanies the textbook Applied Differential Equations. The Primary Course by Vladimir Dobrushkin, CRC Press, 2015; http://www.crcpress.com/product/isbn/9781439851043.

If you have not taken or are not taking a course regarding matlab or programming, such as CSCI 0150 or ENGN 0030, then please start with Tutorial for the first course. For those who have used matlab before, please note that there are certain commands and sequences of input that are specific for solving differential equations, so it is best to read through this tutorial in its entirety. MathWorks updates Matlab every year. Therefore, tutorials from other sources may or may not be compatible with this tutorial.

This tutorial contains software programs that are free: you can redistribute codes and/or modify scripts under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This tutorial is distributed in the hope that its material and codes will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For full version of GNU General Public License, see https://www.gnu.org/licenses/gpl-3.0.en.html.

This tutorial corresponds to the matlab “m” files that are posted on the APMA 0340 website. You, as the user, are free to use the m files to your needs for learning how to use the matlab program, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately. Any comments and/or contributions for this tutorial are welcome; you can send your remarks to <Vladimir_Dobrushkin@brown.edu>

Two n-by-n matrices A and B are called similar if there exists an invertible n-by-n matrix S such that
Theorem: If λ is an eigenvalue of a square matrix A, then its algebraic multiplicity is at least as large as its geometric multiplicity.    ▣
Let x1, x2, … , xr be all of the linearly independent eigenvectors associated to λ, so that λ has geometric multiplicity r. Let xr+1, xr+2, … , xn complete this list to a basis for ℜn, and let S be the n×n matrix whose columns are all these vectors xs, s = 1, 2, … , n. As usual, consider the product of two matrices AS. Because the first r columns of S are eigenvectors, we have
\[ {\bf A\,S} = \begin{bmatrix} \vdots & \vdots&& \vdots & \vdots&& \vdots \\ \lambda{\bf x}_1 & \lambda{\bf x}_2 & \cdots & \lambda{\bf x}_r & ?& \cdots & ? \\ \vdots & \vdots&& \vdots & \vdots&& \vdots \end{bmatrix} . \]
Now multiply out S-1AS. Matrix S is invertible because its columns are a basis for ℜn. We get that the first r columns of S-1AS are diagonal with &lambda's on the diagonal, but that the rest of the columns are indeterminable. Now S-1AS has the same characteristic polynomial as A. Indeed,
\[ \det \left( {\bf S}^{-1} {\bf AS} - \lambda\,{\bf I} \right) = \det \left( {\bf S}^{-1} {\bf AS} - {\bf S}^{-1} \lambda\,{\bf I}{\bf S} \right) = \det \left( {\bf S}^{-1} \left( {\bf A} - \lambda\,{\bf I} \right) {\bf S} \right) = \det \left( {\bf S}^{-1} \right) \det \left( {\bf A} - \lambda\,{\bf I} \right) \det \det \left( {\bf S} \right) = \det \left( {\bf A} - \lambda\,{\bf I} \right) \]
because the determinants of S and S-1 cancel. So the characteristic polynomials of A and S-1AS are the same. But since the first few columns of S-1AS has a factor of at least (x - λ)r, so the algebraic multiplicity is at least as large as the geometric.    ◂

 

  1. Keskin, A.U., Ordinary Differential Equations for Engineers: with MATLAB Solutions, Springer; 1st ed. 2019. ISBN-13: 978-3030069995 ISBN-10: 3030069990