olimiemma/MIT-OCW-Transcripts
0309
1PROFESSOR: OK, this lecture,2this day, is differential3 4equations day.5 6I just feel even though these7are not on the BC exams, that8 9we've got everything10we need to actually11 12see calculus in use.13 14We've got the derivatives of15the key functions and ready16 17for a differential equation.18 19And there it is.20 21When I look at that equation--22 23so it's a differential equation24because it has the25 26derivatives of y as well as27y itself in the equation.28 29And when I look at it, I see30it's a second order equation31 32because there's a second33derivative.34 35It's a linear equation because36second derivative, first37 38derivative, and y itself are39separate, no multiplying of y40 41times y prime.42 43In fact, the only44multiplications are by these45 46numbers m, r and k, and those47are constant numbers coming48 49from the application.50 51So I have a constant52coefficient, linear, second53 54order, differential equation,55and I'd like to solve it.56 57And we can do it because it uses58the very functions that59 60we know how to find61derivatives of.62 63Let me take two or three special64cases where those65 66functions appear purely.67 68So one special case is if69I knock out the second70 71derivative term, and let72me just choose--73 74rewrite it in the way it looks75easiest and best. It's just76 77the derivative of y as78some multiple of y.79 80It's now first order, and we81know the function that solves82 83that equation.84 85When the derivative equals the86function itself, that's the87 88exponential.89 90If I want to have an extra91factor a here, then I92 93need e to the at.94 95And usually, in fact, we expect96that with a first order97 98equation, in the solution99there'll be some constant that100 101we can set later to match102the starting condition.103 104And that constant105shows up here.106 107It's just if e to the at solves108that equation, as it109 110does, because when I take the111derivative, down comes on a,112 113so does c times e to the at.114 115That's because the equation116is linear.117 118So that's a nice one.119 120Pure exponential.121 122OK, ready for this one.123 124So this one, I don't have125this middle term.126 127I just have the second128derivative and the function.129 130And let me again change to131letters I like, putting the ky132 133on the other side with134a minus sign.135 136So this omega squared137will be k/m when I138 139reorganize that equation.140 141My point is we can solve this142equation, the second143 144derivative equaling minus145the function.146 147We've met that.148 149That's this equation150that the sine and151 152the cosine both solve.153 154There we get two solutions for155this second order equation.156 157And just as with the a in this158problem, so with this number159 160here, I'll just jiggle the sine161and the cosine a little162 163bit so that we get omega to come164down twice when I take165 166two derivatives.167 168So the solution here will be--169 170one solution will be the cosine171of omega t because two172 173derivatives of the cosine174is minus the cosine--175 176that's what this asks for--177 178with the factor omega179coming out twice.180 181And another solution will182be sine of omega t183 184for the same reason.185 186And again, now with a second187order equation, I'm expecting188 189a couple of constants to be190able to choose later.191 192And here they are: c cosine193omega t and d sine omega t.194 195That's the general solution196to that equation.197 198So we know that.199 200And these are the two201important ones.202 203There's another less important204one and an205 206extremely simple one.207 208Suppose all that went away, and209I just had as a third very210 211special case d second y212dt squared equals 0.213 214We sure know the solution215to that.216 217What functions have second218derivative equals 0?219 220Well, a constant function221does, certainly.222 223A constant, even its first224derivative is 0225 226much less its second.227 228And then t does.229 230Its first derivative is2311 and then the second232 233derivative is 0.234 235So there show up the236powers of t.237 238Well, the first two powers, t to239the 0 and t to the 1, show240 241up in that very special case.242 243Sine and cosine show up here.244 245e to the at shows up here.246 247And now let me tell you the248good part of this lecture.249 250The solution to this equation251and in fact to equations of252 253third, fourth, all orders, are254products of these ones that we255 256know: exponentials times sines257and cosines times powers of t.258 259That's all we need to solve260constant coefficient261 262differential equations.263 264So I plan now to go ahead265and solve the--266 267and move toward this equation.268 269I should have said that's a270fundamental equation of271 272engineering.273 274m stands for some mass.275 276Oh yeah, let me draw a picture,277and you'll see why I278 279chose to choose t rather than280x, because things are281 282happening in time.283 284And what is happening?285 286Let me show you.287 288What's happening in time is289typically this would be a290 291problem with us some kind of a292spring hanging down, and on293 294that spring is a mass m.295 296OK, so what happens if I--297 298I've pulled that mass down, so299I've stretched the spring, and300 301then I let go.302 303Then what does the spring do?304 305Well, the spring will pull the306mass back upwards, and it will307 308pull it back up to the point309where it squeezes, compresses310 311the spring.312 313The spring will be--314 315like instead of being316stretched out,317 318it'll be the opposite.319 320It'll be compressed in.321 322And then when compressed in,323it'll push the mass.324 325Being compressed, the326spring will push.327 328It'll push the mass down again329and up again, and I get330 331oscillation.332 333Oscillation is what334I'm seeing here.335 336And what are examples of337oscillation in real life?338 339The spring or a clock,340especially a grandfather clock341 342that's swinging back and forth,343back and forth, so I'll344 345just put a clock.346 347Music, a violin string348is oscillating.349 350That's where the beautiful351sound comes from.352 353Our heart is in and out,354in and out, a regular355 356oscillation.357 358I could add molecules.359 360They oscillate extremely361quickly.362 363So this equation that I'm364aiming for comes up in365 366biology, in chemistry--367 368for molecules, it's a very369important equation--370 371in physics and mechanics and372engineering for springs.373 374It comes up in economics.375 376It's everywhere.377 378And by choosing constant379coefficients, I have the basic380 381model and the simplest model.382 383OK, so I'll talk in this384language of springs, but it's385 386all these oscillations that lead387to equations like that.388 389Actually, this model often390would have r equals 0.391 392So let me take that case393r equals 0 again.394 395So where does the equation396come from?397 398Can I do two cents worth of399physics and then go back to400 401the math, solving402the equation.403 404The physics is just remembering405Newton's406 407Law: f equals ma.408 409So there is the m, the mass.410 411The a is the acceleration.412 413That's the second derivative,414right?415 416You don't mind if I write that417as second derivative.418 419Acceleration, the mass420is constant.421 422We're not going at the speed of423light here so we can assume424 425that mass is not being426converted to energy.427 428It's mass.429 430And then what's the force?431 432Well, for this spring433force, for this434 435spring, what did we say?436 437So y is going this way.438 439It's the disposition, the440displacement of the spring.441 442When it's down like that, when443y is positive, the spring is444 445pulling back.446 447The force from the spring448is pulling back.449 450And the force from the spring451is proportional to y.452 453And the proportionality constant454is my number k.455 456That fact that I457just said is--458 459and I guess it's pulling460opposite to a positive y.461 462When y is positive, and this463spring is way down, the force464 465is pulling it up,466pulling in the467 468negative direction, upwards.469 470So I need that minus sign.471 472So that k is the stiffness473of the spring.474 475This is Hooke's Law, that the476force coming from a spring is477 478proportional to the stretch.479 480And the constant in there is481Hooke's constant, the spring482 483constant k.484 485So now that if I put the minus486ky over there as plus ky, you487 488see my equation again.489 490But this is the one that we were491able to solve right here.492 493Do you see that this is the494case where r is 0 in this495 496first model?497 498r is 0 because r involves499resistance: r for resistance,500 501air resistance, damping.502 503And right now, I don't504have that.505 506I just have a little spring507that'll oscillate forever.508 509It'll oscillate forever510following sine and cosine.511 512That's exactly what the513spring will do.514 515It will just go on forever,516and the c and the d, their517 518constants, will depend519on how it started.520 521Did it start from rest?522 523If it started from rest, there524would be no sine term.525 526It's easy to find527c and d later.528 529The real problem is to solve the530equation, and we've done531 532it for this equation.533 534OK, and let's just535remember this.536 537Let me repeat that when I put538that onto the other side and539 540divide by k, then I see the--541oh, divided by m, sorry--542 543then I see the omega squared.544 545So omega squared is k/m.546 547Right.548 549Oh, it is k/m, right.550 551OK, that's the simple case,552pure sines and cosines.553 554Now I'm letting in555some resistance.556 557So now I'm coming back558to my equation.559 560Let me write it again.561 562m y double prime--563 564second derivative--565 566plus 2r y prime--567 568first derivative--569 570plus ky--571 5720-th derivative equals 0.573 574I want to solve that equation575now for any576 577numbers m and r and k.578 579OK, well, the nice thing is that580the exponential function581 582takes us right to the answer,583the best plan here.584 585So this is the most important586equation you would see in a587 588differential equations course.589 590And then the course kind of goes591past, and then you easily592 593forget this is the most594important and the simplest.595 596Why is it simple?597 598Because if the key idea--599 600this is the key idea: try601y equals e to the--602 603an exponential e to the604something times t.605 606Let me call that something607lambda.608 609You might have preferred c.610 611I'm happy with c or any612other number there.613 614Yeah, OK, I'll call that lambda,615just because it gives616 617it a little Greek importance.618 619All right, so I try this.620 621I substitute that into the622equation, and I'm going to623 624choose lambda to make625things work.626 627OK, but here's the key.628 629The key idea is so easy.630 631Now, put it into the equation.632 633So what happens when I put--634 635when this is y, take636two derivatives.637 638Well, let me start with639taking no derivatives.640 641So I have down here the k642e to the lambda t, and643 644over here is a 0.645 646And now let me back up to647the first derivative.648 649So that's 2r times650the derivative651 652of this guy y prime.653 654I'm just substituting this655into the equation.656 657So what's the derivative?658 659We know that the derivative of660this brings down the lambda.661 662We already did it.663 664lambda e to the lambda665t, right?666 667That's the derivative.668 669And what about this one?670 671This one is going to be672an m y double prime.673 674What happens with675two derivatives?676 677Bring down lambda twice, two678times, so I have lambda679 680squared e to the lambda t.681 682And then in a minute, you know683what I'm going to do.684 685I'm going to cancel that common686factor e to the lambda687 688t, which is never 0 so I can689safely divide it out, and then690 691write the equation we get.692 693OK, let me write that out694more with more space.695 696m lambda squared plus6972r lambda--698 699taking that--700 701plus k is 0.702 703This is the equation.704 705It's just an ordinary706quadratic equation.707 708It's a high school709algebra equation.710 711Lambda appears squared because712we had two derivatives.713 714We had a second derivative, and715so I need the quadratic716 717formula to know--718 719I expect two answers,720two lambdas.721 722And that's normal for a second723order equation, and I'll get724 725two solutions: e to the lambda7261t and e to the lambda 2t.727 728Two different exponentials will729both solve the problem.730 731All right, what's the lambda?732 733Well, can I just recall734the quadratic formula?735 736Well, it's a little messy, but737it's not too bad here, just to738 739show that I remember it.740 741And the 2 there is kind of742handy with the quadratic743 744formula because then I just get745minus an r plus or minus746 747the square root of r squared.748 749And it's not minus 4km, but750because of the 2 there, it's751 752just minus km.753 754And then I divide by m.755 756OK, well, big deal.757 758I get two roots.759 760Let me use numbers.761 762So what you see there763is like solving the764 765differential equation.766 767Not too bad.768 769Now let me put in numbers to770show what's typical, and, of771 772course, as those numbers773change, we'll774 775see different lambdas.776 777And actually, as the numbers778change, that will take us779 780between the exponential stuff781and the oscillating stuff.782 783All right, let me take one784where I think it start--785 786I think this will be-- so787this is example one.788 789I'll choose m equal 1 y790double prime plus--791 792let me take r to be 3, so793then I have 6y prime.794 795And let me choose k796to be 8y equals 0.797 798All right, now we've799got numbers.800 801So the numbers are m equals8021, r equals 3, k equals 8.803 804And I claim we can write the805solution to that equation, or806 807the two solutions, because there808will be two lambdas.809 810OK, so when I try e to the811lambda t, plug it in, I'll get812 813lambda twice, and then I'll get8146 lambda once, and then815 816I'll get 8 without a lambda817coming down, all multiplied by818 819e to the lambda t, which I'm820canceling, equals 0.821 822So I solve that equation either823directly by recognizing824 825that it factors into lambda826plus 2 times lambda plus 4827 828equals 0 or by plugging829in r and k and m in830 831the quadratic formula.832 833Either way, I'm learning that834lambda is minus 2 or minus 4.835 836Those are the two solutions.837 838The two decay rates, you could839call them, because they're up840 841in the exponent.842 843So what's the solution?844 845y of t, the solution to that846equation, the general solution847 848with a constant c and a constant849d is an e to the850 851minus 2t and an e852to the minus 4t.853 854The two lambdas are in the855exponent, and we've solved it.856 857So that's the point.858 859We have the ability to solve860differential equations based861 862on the three most important863derivatives we know:864 865exponential, sines-cosines,866powers of t.867 868OK, ready for example two?869 870Example two, I'm just going to871change that 8 to a 10, so872 873you're going to see874a 10 show up here.875 876All right, but that will877make a difference.878 879It won't just be some880new numbers.881 882There'll be a definite883difference here.884 885OK, let me go over across886here to the one with 10.887 888OK, so now my equation is 1y889double prime, 6y prime still,890 891and now 10y is equals to 0,892remembering prime means893 894derivative.895 896OK, so again, I try y is897e to the lambda t.898 899I plug it in.900 901When I have two derivatives,902bring down lambda squared.903 904One derivative brings905down lambda.906 907No derivatives leaves908the 10, equals 0.909 910That's my equation for lambda.911 912Ha!913 914I don't know how to915factor that one.916 917And in fact, I better use the918quadratic formula just to show919 920what happens here.921 922So the quadratic formula will923be the two roots lambda.924 925Can I remember that926dumb formula?927 928Minus r plus or minus the square929root of r squared minus930 931km, all divided by m.932 933I got the 2's and the9344's out of it by935 936taking r to be 3 here.937 938OK, so it's minus 3 plus or939minus the square root of r940 941squared is 9 minus 1 times 10.942 943k and m is 10 divided by 1.944 945Ha!946 947You see something different's948going on here.949 950I have the square root951of a negative number.952 953Over there, if I wrote out that954square root, you would955 956have seen the square957root of plus 1.958 959That gave me minus 3 plus9601 or minus 3 minus 1.961 962That was the minus9632 and minus 4.964 965Now I'm different.966 967Now seeing the square root of968minus 1, so this is minus 3969 970plus or minus i.971 972So I see the solution y of t.973 974You see, this is i here, the975square root of minus 1.976 977We can deal with that.978 979It's a complex number,980an imaginary number.981 982And the combination minus 3 plus983i is a complex number,984 985and we have to accept that986that's our lambda.987 988So I have any multiple of c,989and the lambda here is990 991minus 3 plus i t.992 993And the second solution is994e minus 3 minus i t.995 996I found the general solution.997 998We could say done, except you999might feel, well, how did1000 1001imaginary--1002 1003what are we going to do with1004these imaginary numbers here?1005 1006How did they get in this1007perfectly real1008 1009differential equation?1010 1011Well, they slipped in because1012the solutions1013 1014were not real numbers.1015 1016The solutions were minus10173 plus or minus i.1018 1019But we can get real again.1020 1021So this is one way to write the1022answer, but I just want to1023 1024show you using the earlier1025lecture, using the beautiful1026 1027fact that Euler discovered.1028 1029So now let me complete this1030example by remembering Euler's1031 1032great formula for e to the it.1033 1034Because you see we have an e1035to the minus 3t, perfectly1036 1037real, decaying.1038 1039The spring is slowing down1040because of air resistance.1041 1042But we also have1043an e to the it.1044 1045That's what Euler's formulas1046about and Euler's formula says1047 1048that e to the it is the1049cosine of t plus i1050 1051times the sine of t.1052 1053So it's through Euler's1054formula that these1055 1056oscillations are coming in.1057 1058The direct method led1059to an e to the it.1060 1061But the next day, Euler1062realized that e1063 1064to the minus it--1065 1066or probably being Euler, it1067didn't take till next day--1068 1069will be minus i sine t.1070 1071So both e to the it and e to1072the minus it, they both can1073 1074get replaced by sines1075and cosines.1076 1077So in place of e to the1078it, I'll put that.1079 1080In place of e to the minus1081it, I put that one.1082 1083The final result is--1084 1085can I just jump to that?1086 1087The final result is that with1088some different constants, we1089 1090have the cosine--1091 1092oh!1093 1094let me not forget e1095to the minus 3t.1096 1097That's part of this answer.1098 1099I'm damping this out by e to the1100minus 3t, this resistance1101 1102r, times cosine of t and the e1103to the minus 3t sine of t.1104 1105OK, that's good.1106 1107General solution, back1108to a real numbers.1109 1110It describes a damped1111oscillation.1112 1113It's damped out.1114 1115It's slowing down.1116 1117Rather, it's decaying.1118 1119The amplitude is-- the1120spring is like--1121 1122it's like having a shock1123absorber or something.1124 1125It's settling down to the center1126point pretty fast. But1127 1128as it settles, it's goes back1129across that center point,1130 1131oscillates across.1132 1133OK, now you might finally ask,1134the last step of this lecture,1135 1136where do powers of t come in?1137 1138Where does t come in?1139 1140So far we've seen exponentials1141come in.1142 1143We've seen sines and1144cosines come in.1145 1146Can I do a last example just1147here in the corner, which will1148 1149be y double prime, 6 y prime,1150and now this time instead of 81151 1152or 10, I'm going to1153take 9y equals 0.1154 1155OK, can we use this as example11563, which we can solve?1157 1158You know that I'm going to1159try y equals to lambda t.1160 1161Let me substitute that.1162 1163I'll get lambda squared coming1164from two derivatives, lambda1165 1166coming from one derivative, 91167coming from no derivatives.1168 1169I've got my quadratic equation1170that's supposed1171 1172to give me two lambdas.1173 1174Little problem here.1175 1176When I factor this, it factors1177into lambda plus 31178 1179squared equals 0.1180 1181So the answer, the lambda,1182is minus 3 twice.1183 1184Twice!1185 1186The two lambdas happen to hit1187the same value: minus 3.1188 1189OK, we don't have any1190complex stuff here.1191 1192It's two real values that1193happen to coincide.1194 1195And when that happens, well,1196minus 3 tells us that a1197 1198solution e to the1199minus 3t works.1200 