1. Home
  2. Explore
  3. Mathematics
  4. Diagonalization in Differential Equations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Diagonalization in Differential Equations

Transcript

hi this is the third part lecture c of lecture 26  for differential equations and linear algebra it's   the first time i've done three lectures because  these different topics fit so nicely together   within each lecture and in lecture 26c it's the  culmination our main purpose of applying linear   algebra to differential equations we will see  other applications after this but this is our main   thing that i've been emphasizing i'm going to talk  about diagonalization and change of basis as a change of variable or if you prefer change  of axes or coordinate system to some sort   of skew coordinate system as our main application  again of linear algebra to differential equations   and once again we will make use of mathematica  a bit like we did in lectures a and b all right let's go back to the saddle point  example from lecture 24 b this one right here

let's quickly remind ourselves what  the characteristic polynomial would be lambda squared minus the trace times lambda plus  the determinant the trace of that matrix is three so we get lambda squared minus 3 times lambda  the determinant is 2 minus 12 is negative 10 and that quadrat can be factored as  lambda plus two times lambda minus   five the eigenvalues are negative two and five  positive five double check things yes that looks   good because these are the two eigenvalues and  we can compute the corresponding eigenvectors

here's what you would get you would get with  negative two you get the eigenvector of negative   three four with the other one the five you get the  eigenvector one one this was in lecture 24b as an   example there then we could find the general  solution we could solve initial value problems   or we could talk about this in the context of  diagonalization as we've done when we've been   talking about diagonalization i can take  these eigenvectors and make them columns of a change of basis matrix p notice  the columns here negative 3 4 and 1 1   are those eigenvectors this is the theory about  diagonalization we know that if we do that

then we'll know that p inverse times a times p  will be a diagonal matrix d we know that already   that's the diagonalization theorem what is p  inverse you use the shortcut formula for the   inverse of a two by two matrix the  determinant of p is negative seven   you've got one over negative seven you swap  the numbers in the main diagonal and negate   the numbers on the off diagonal then multiply  the negative 1 7 through it simplifies to this and if d is computed as p inverse  times ap go ahead and check all this   you get this diagonal matrix that is  d how is this relevant for solving   differential equations one way we saw it  was relevant is it with regard to the matrix exponential we saw that our solution  function with initial condition y   zero of t we know by the beautiful  generalization that i talked about a lot   is e to the ta times y zero where a is this  matrix here but a can be replaced by if you

solve this equation for a by left multiplication  of p and right multiplication of p inverse a is going to be p d p inverse  where d is that diagonal matrix   and it turned out using the infinite  series definition of the matrix exponential   this is the same as p times the matrix  exponential e to the td times p inverse   times y zero either the td since  d is diagonal is easy to find just do this product you've got your answer  you've got your unique solution okay to an   arbitrary initial value problem we're going to do  the same kind of thing here we're going to solve   the ivp ultimately generic ivp but we're going to  do it in what's going to feel like a different way

but they are obviously related to each other you  know on calculus one end mostly calculus 2 you use   change of variables a lot substitutions to help  you do integrals for example u equals x squared   or something might help you do an integral and  you've got to find du to be 2x dx in that case we can use change of variables here as well  it effectively amounts to changing bases   changing coordinates if you will coordinate  vectors if you prefer thinking of done that   way but i'm not going to in this lecture i'm going  to think more intuitively in terms of variables   define a new vector variable bold base  capital u by the following formula let the old vector y be p times u

where p is this matrix here you can multiply  that you might be scratching your head wait a   minute didn't i want to define u does  this define you yeah it does define u as p inverse times y it's  always a little confusing at this point and some other points are  confusing so you want to pay attention once you've got p you write the old vector  in terms of the new vector why is the old   vector so to speak use the new vector  using p in this way y equals p times u if you want u in terms of y  it's got to be p inverse times y   that can be confusing so make sure  you are careful in thinking about that

i'm going to write these equations down for future  reference it's going to be helpful so the original   differential equation is the y dt equals  2 3 4 1 times y so there's my matrix   a i'm also going to write down the relationships  between x and u both in this form and in this form   i'll focus on the scalar forms of those i can  write those as systems of equations if i like x by this line is going to  be negative 3 plus 3u plus v and y is going to be by this line here 4u plus v

the other equation defines the inverse  transformation u and v in terms of x and   y u is going to be negative 1 7 x plus 1 7 y  and v is going to be 4 7's x plus 3 7 y these   transformations linear transformations really  are inverse functions of each other if you think   of them as linear transformations because these  matrices are inverse matrices we already know that   okay but now i'm writing it in scalar form  because that's going to be helpful for us we might wonder does does you  satisfy a differential equation it is a function of t if i'm  assuming y is a function of t i'm assuming the y is a function of t  that's going to mean use a function of   t i can think of it this way p and p inverse  are constant matrices but y is a function of t

therefore u is a function of t does  it satisfy a differential equation well let's see if we can work it out let's think about what the scalar  quantities little u and little v satisfy and we're going to see they satisfy  a completely decoupled system here are the details for  finding du dt this is tricky   okay you got to be really careful when you do this what am i using here i'm starting by  using this equation u equals negative 1 7   x plus 1 7 y i'm differentiating  both sides with respect to t u d t

is what you get when you differentiate  the left side with respect to t   you don't know what u is but just you  can still do the abstract calculation   differentiate the right side with respect to  t little x and little y dependent t as well   and the derivative is the linear operator which  is the linear transformation on function spaces   but anyway you'll get negative one seventh d x dt  plus one seventh d y t which is what you see there now use the differential equations  in scalar form this up here would say dx dt look at the top of the matrix is 2x plus  3y and dyt look at the bottom row as 4x plus y use those equations next replace the x dt with 2x plus 3y those match

replace the y dt with 4x plus y those match all right simplify expand multiply the negative 1  7 through here and positive 1 7 through here group   together the like terms for the x term you get  negative 2 7 x plus 4 7's x is positive 2 7 x for   the y term you get negative three sevenths y plus  positive one seventh y is negative two sevenths y now use the fact that x is negative three u  plus v and y is four u plus b substitute those   in place of x and y to get this simplify  again distribute again what's the u term multiply those you get negative six sevenths you  multiply these you get negative eight sevens you negative six sevens plus negative eight sevenths  is negative fourteen sevenths negative two u and the these term terms cancel

two v minus two uh two sevenths v minus 2  sevens feet the zero the v term goes away a nice simple equation for du dt you  can do a similar kind of thing for dv dt check all the same things again in the end  you get the u terms canceling you get 5v   that's a completely decoupled system in terms of u and v the new coordinates we like completely decoupled systems we know  how to find the answer right away you would be u0 e to the negative two t looking at the top line  and v would be v zero e to the positive five t

is a completely decoupled system in  matrix form the matrix is diagonal here are the details to confirm  that at the matrix vector level the derivative of the vector  u with respect to t because u equals the constant matrix p inverse  times y is that constant matrix p   inverse times the derivative of the  vector y with respect to t but hey the y t equals a times y

then i can use the associative property and  write this way and wait a minute if if u is p   inverse times y yeah i knew y was also p times  u y equals p u p u y gets replaced by p u and   lo and behold use the associative property again  and i can write it as p inverse times ap times u but p inverse times a p is the diagonal  matrix d which is this wow isn't that fun this   is the analogous calculation in one line of vector  equations as these two lines of scalar equations they're both fun in their own ways i guess

we get a diagonal matrix a completely decoupled  system in terms of the new variable u the original   problem seemed hard to solve but in terms of  this new variable it's easy to solve that's the   point that's the application of linear algebra to  differential equations with integrals in calculus   doing the substitution gives you an easier looking  integral if you do it right at least same kind of theme use the substitution the new variable to  get a simpler system that's our main application not that we don't have other applications we do  we've seen them already but that was the thing   that i emphasized at the very beginning of the  course as our main application of linear algebra   to differential equations and we won't just talk  about it here in lecture 26c i mean if it's our   main application we should talk about some more  at least in lecture 27 with other examples perhaps

i do want to come back to the matrix exponential  as well and come back to difference equations   as well and relate those and think in terms  of determinants of matrix exponentials and   how those linear transformations change areas  that's soon to come and i think it's pretty cool related to the flow and the new  coordinate system here is new change our coordinate system  to new skewed coordinates you might wonder what do those skew coordinates  look like what are the axes for this new uv system which under which the linear  system is easy to solve okay now we're going to visualize it so  i'm going to show you the xy phase plane and you can see what i have in this plane  and see it makes sense without thinking   about changing coordinates right you don't have  to think about changing coordinates here it is

added a couple things to this  picture that i don't usually have these orange lines labeled  u and v suggestedly that ignore the origin lines for the moment it is the  phase plane x and y axes are in black big black   dot at the origin there's a unique equilibrium  point at the origin because the determinant of   the coefficient matrix is non-zero so the only  solution of a times y equals zero is just the   zero vector just the trivial solution that's  why there's just one unique equilibrium point the brown line is the x and electrons solutions  cross vertically the pink line has the wide   alkaline solutions cross horizontally what  are these orange lines why are they labeled   u and v hey there's those are straight line  solutions don't they look like they are looks like it

yeah they are straight line solutions  they're parallel to the eigenvectors parallel to 1 1 in this direction parallel to  what was it i think negative 3 4 in this direction the eigenvectors for this matrix those are  straight line solutions and what this means   is the straight-line solutions form the new axes  for my new coordinate system that's the connection the straight-line solutions labeled u and v do form my new coordinate system remember in  the new coordinate system the matrix capital v negative 2 0 0 positive 5 the eigenvector for the eigenvalue negative 2 was the  negative 4 3 or negative 3 4 excuse me

point negative 3 4 is right around here an arrow with components negative 3 4 would  look like that be parallel to that these the   vector field points in the opposite direction  though because the eigenvalue is negative origin is a sink in that direction and that will be the u axis which does  correspond to the negative eigenvalue the other one the v axis parallel to the  vector 1 1 the other eigenvector source   in that direction corresponds to the positive  eigenvalue 5. that it would be the d-axis here in the next picture i'm  about to show you i added in slanted grid lines to make slanted  graph paper skewed graphic there we go

this would be the corresponding skewed  graph paper in the in the light orange   color that i hope is not too hard  to see you can see these lines here i hope it's not too hard to see you can download  the powerpoint if you want to see them better that would be my slanted graph paper my skew  graph paper for the new coordinate system uv in fact excuse me this point right there is  the point negative 3 4 because it's going   through this first line parallel to the  v axis the uv coordinates of this point are one zero one in the u u  direction zero in the v direction and this point right here close to this line

that's the point 1 1 actually  in the x y coordinates   in uv coordinates it would be 0  1 u coordinate 0 b coordinate 1. that's a closer distance to the origin that's why  these lines are closer together than these lines   are because that eigenvector that i chose 1 1 is  closer to the origin shorter than negative 3 4. i will show you an animation of mathematica  related to this but let's do some symbolic   calculations first the change of variables  can help us find solution formulas as well   we don't have to use the matrix exponential we can  use the change of variables in effect it is using   the matrix exponential without saying it is and  we'll see that we get the same answer at the end

so the du dt equation is this it's completely  decoupled diagonal matrix easy to solve i'm calling the solution u equals not phi but psi that's psi  spelled p s i it's not the same as   fee but it is a greek letter still this may be  a little dangerous to use such a symbol with   engineering majors because that reminds them of  quantum mechanics if they know quantum mechanics   and wave functions this is not a wave  function no quantum mechanics here   why am i using a psi instead of a fee because  it's it's a different um formula i'm also going to use a fee when i use the y-coordinate  system that's my solution function for this   differential equation d is diagonal it's easy to  find there is this is the matrix exponential here

e to the td is equal to that  what i'd like to do now is i'd   like to use this formula to find the  solution for y as a function of time just use your transformation equations  your substitutions essentially   we know from before y is p times  u but u depends on time it's psi of t where u sub zero is the initial  condition in terms of u coordinates but that's equal to this there's p there's e to the  td there's vector u sub zero this the product p times e to the td and this is the final answer when you multiply

take time to check those things that is why how y depends on t in u and v  coordinates but i really should figure out   how y depends on t in x and y coordinates so  i'm not quite there yet but we can continue how in vector form we could write the initial condition u0 the initial  condition in terms of u and v coordinates   i know that's p inverse times y y zero it's p  u is p inverse times y in general y is p times   u therefore u is p inverse times y that works  with initial conditions as well here's p inverse

there's the initial condition as a vector with  x and y coordinates do the multiplication you   get this we're almost done finally to get  the solution psi of t or assuming x to the   p of t phi sub y 0 of t the solution with  initial condition y 0 as a function of time i skipped a step here essentially that is also equal to e to the ta times y 0 but e  to the ta is p times e to the td times p inverse that's p that's e to the td that's p  inverse multiply this is p times e to the td which we had up there

there's p inverse there's vector  y zero multiply these you get this   i didn't bother multiplying this matrix times this  vector this thing right here that is e to the t a   times the y zero which i guess i had at the end  and so i didn't really have to write there but and that's the way to get the solution  it's also a way to compute the matrix   exponentially if you want that's the last slide let's  go to mathematica to finish

so here's our matrix a here's the eigen system  eigenvalues are five and negative two one one goes   with the eigenvalue five positive one negative  three four goes with the eigenvalue negative two   the negative one here are my right hand side  functions to help me draw nullclines and this   stuff draws the milk lines as well as the shading  reminding you that uh pink means north east motion blue means northwest motion green means southwest  motion and yellow means southeast motion there we see the milk lines  plus the straight line solutions here i added the grid lines if  you're interested in the code there was some extra stuff involving uh flattening  table and infinite line this stuff in here makes

the grid along with graphics here's  our final thing to note you can even   think about the axes themselves getting  transformed under the linear transformation y equals p times u y equals p the x axis gets transformed to the u axis  the v axis gets trans the the y axis gets   transformed to the v axis notice the red line  goes from being the x axis to being the u axis and the blue line goes from being the y  axis to the v axis what's going on here   how do you describe this geometrically is  this some sort of weird combined rotation

it's more complicated than the  examples we've looked at so far   and in fact there's a change  in orientation you might see   you might say in that these red and blue lines  cross as we transform from one to the other and   the reason for that is because the determinant  of the p matrix is negative what was the p matrix the p matrix is this thing here it's determined  as negative 3 minus 4 is negative 7 negative   determinant and it's because that determinant is  negative that you get this change in orientation   you get the as the x gets transformed to u and y  y gets transformed to v those lines cross swapped   in terms of imagining the image of a butterfly  like we did way back when lecture five or so under this linear transformation  defined by the matrix p

the butterfly gets bigger and also kind  of flips around at the same time and gets   stretched more in this direction  than it does in that direction   so it's kind of a complicated geometric effect  it's like a like a flipping and a stretching   in in both this direction in this  direction but more in this direction corresponding to that eigenvalue five was it or no i'm forgetting about  the area okay it's a little tricky to think about   i'm not quite sure yet at the moment how to think  about that um let me say finally something that is   another thing that's confusing for people thinking  about that linear transformation in this p matrix this is really tricky but important pay  attention we know that a matrix like this

is going to map hat e1 the vector 1 0 the unit  vector in the positive x direction to the vector   whose x y coordinates would be negative 3 4. that  i talked about in the picture it's the column the   first column of p and the second column tells  you what j hat gets mapped to 1 1 like that but here's the confusing part that equation is  y equals p times u so shouldn't this equation   transform u coordinates to y coordinates and  didn't i just say transform x and y to u and v

that's really tricky here this is this is all  correct you got to think about it in the right way let's think about this picture when you think  about transforming the x-axis the positive x-axis   to the positive u-axis and one zero getting  transformed to negative three four what you're   really saying when one zero gets transferred  to negative three four is that this point right about where was it right about here all right it's not letting me draw it okay i'm not  trying to fix it this point whose x y coordinates   are negative 3 4 has uv coordinates 1 0  i already mentioned that 5 minutes ago

uv coordinates 1 0. if you replace that u  with one zero you get y is negative three four you get its x and y coordinates yes p ultimately transforms the x-axis to  the u-axis and the y-axis to the v-axis but   in terms of understanding what it means in  terms of these different coordinate systems   if you're looking at for example that point  right there its uv coordinates are one zero you replace this with the one zero its x y  coordinates are negative three four s as we   know when we think about x and y coordinates  this point has coordinates negative three 4.

similar thing happens with the other one this  point close to the origin x y coordinates 1 1 has   uv coordinates 0 1. when you plug in 0 1 here you  get one one okay so it's very tricky you really   have to be careful when you think about it but  i think it's all kind of fun thanks for watching

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent