Eigenvalues and Eigenvectors, More Direction Fields and Systems of ODEs First let us speak a bit about eigenvalues. Defn. An eigenvalue λ of an nxn matrix A means a scalar (perhaps a complex number) such that Av=λv has a solution v which is not the 0 vector. We call such a v an eigenvector of A corresponding to the eigenvalue λ. Note that Av=λv if and only if 0 = Av-λv = (A- λi)v, where I is the nxn identity matrix. Moreover, (A-λI)v=0 has a non-0 solution v if and only if det(a-λi)=0. This gives: Theorem. The scalar λ is an eigenvalue of the nxn matrix A if and only if det(a-λi)=0. Eigenvalue Example. Find the eigenvalues of the matrix 2 A =. 2 By the preceding theorem, we need to solve det λ det(a-λi)=0. That is 2 0 2 0 2 λ = det = 0. 2 λ
(2+λ) 2 -=0 4+4λ+λ 2 -=0 3+4λ+λ 2 =0 (3+λ)(+λ)=0 λ=-,-3. These are the eigenvalues of A. You can use Gaussian elimination to find the corresponding eigenvectors. (A+3I)v=0 is solved as follows: 2 3 0 A+ 3 I = + =. 2 0 3 To find v, do the Gauss thing: 0 0. 0 0 0 0 Here we replaced row 2 by row 2 row. Now a solution v of (A+3I)v=0 means v = + = v such that v v2 v2 So v =-v 2. Take v 2 =- (the free unknown coefficient) and then v =. An eigenvector of A for the eigenvalue -3 is v =. 0. Any scalar multiple of v is also an eigenvector. 2
Similarly we find a solution w of (A+I)w=0. 2 0 A+ I = + =. 2 0 0 0. 0 0 0 0 Here we replaced row 2 by row 2 + row. Now a solution of (A+I)w=0 means w = + = w such that w w2 w2 Taking the free variable w 2 =, we see w =. An eigenvector of A corresponding to the eigenvalue - is w =. Any scalar multiple of w is also an eigenvector. 0. ODE Example. Consider a system of st order ODEs corresponding to the matrix A above: x =Ax. This means ' x () t 2 x() t 2 x() t + x2() t. ' = = x 2 2() t x2() t x() t 2 x2() t 3
We can get Matlab to plot tangent vectors to solutions. Matlab s program pplane7 (in next week s Matlab assignment) will plot tangent lines to solution curves by noting that the chain rule says: dx2 dx2 dt x() t 2 x2() t = =. dx dx 2 x( t) + x2( t) dt So the slope of the tangent at x =, x 2 =3 is (-2*3)/( -2+3)=-5, for example. Look at the direction field picture below and check it! In Matlab, we set x =x and x 2 =y. Given a system of st order ODEs: x =f(x,t), y =g(x,t), the arrows at point (x,y) have slope dy/dx = g/f. Think about the slope of the line (we found to be -5) at (,3). 4
x ' = - 2 x + y y ' = x - 2 y 5 4 3 2 y 0 - -2-3 -4-5 -5-4 -3-2 - 0 2 3 4 5 x Next we plot a few solutions starting at points with y coordinate 3 and x coordinates -3,0,,3. It looks like all the solutions end up going through the origin. 5
x ' = - 2 x + y y ' = x - 2 y 5 4 3 2 y 0 - -2-3 -4-5 -5-4 -3-2 - 0 2 3 4 5 To understand what is happening, let s make use of our eigenvectors of A: v = w = for the eigenvalue -3 for the eigenvalue -. 6
The corresponding solutions of the differential equation ' x () t 2 x() t 2 x() t + x2() t ' = = x 2 2() t x2() t x() t 2 x2() t are the vectors: x=e -3t v & x=e -t w. Check that it works. To check that x=e -3t v solves our ODE: de ' x 2 () t dx e? ' = = ( ) x 2 2() t d e e dx The left hand side is The right hand side is de dx = e ( d e ) dx 3. 2 e 3 e. = 2 e A similar check will work for x=e -t w. We leave that to you. 7
So our solutions for the ODE are: t e e and. 3 t t e e The st solution lies on the line y=-x (direction determined by the eigenvector v of A). The 2nd is on the line y=x (direction determined by the eigenvector w of A). These are the 2 lines visible in our plot of solutions. The first solution is in the second quadrant. The second solution is in the first quadrant. The general solution of the ODE has the form: t x e e = c c + 2 t y e e t ce + ce 2 =. t ce + ce 2 Here c and c 2 are scalars. It follows that as t goes to infinity the solution point (x,y) approaches (0,0). 8
ODE Example 2. In the next section (7.6) we consider the case of complex eigenvalues for the matrix A in x =Ax. x ' = y y ' = - x 0 8 6 4 2 y 0-2 -4-6 -8-0 -0-8 -6-4 -2 0 2 4 6 8 0 x 9
Here we plot the direction field for x =y, y =-x which is the separable equation dy/dx = (dy/dt)/(dx/dt) = -x/y. The slopes of direction lines are -x/y. (ODE is separable. So ydy=-xdx and x 2 +y 2 =c. Circles!) Now x =y, y =-x is the matrix equation x ' 0 x =. y' 0 y To find the eigenvalues, solve det(a-λi)=0=λ 2 +. The eigenvalues are i and -i, where i= -. Matlab can find eigenvalues of our matrix with the command: eig([0 ;- 0]). It responds: 0 +.0000i 0 -.0000i You might want to use Matlab for eigenvalue problems with matrices larger than 2x2. 0
ODE Example 3. Consider the system of ODEs: x =x+y, y =y The matrix here is 0 which has as a repeated eigenvalue (a double root of det(a-λi)=0. But there is only a dimensional space of eigenvectors v. The matrix is then called deficient. We study this sort of thing in Section 7.8. To get 2 fundamental solutions of the ODE system, we take the first solution e t v and multiply it by t. Sound familiar? We discuss this in more detail next week. x ' = x + y y ' = y
ODE Example 4. Matlab can also draw direction fields and solution curves for non-linear systems of first order equations. Here we do predator prey equations x =x(-y), y =y(x-). Start the big curve solutions with x=6, y=3. The middle curve had x=3 y=2. The smaller curve had x=y=2. x ' = x ( - y) y ' = y (x - ) 0 8 6 4 2 y 0-2 -4-6 -8-0 -0-8 -6-4 -2 0 2 4 6 8 0 x 2