1 00:00:01,290 --> 00:00:02,270 GILBERT STRANG: OK. 2 00:00:02,270 --> 00:00:04,440 Well, the idea of this first video 3 00:00:04,440 --> 00:00:08,400 is to tell you what's coming, to give a kind of outline 4 00:00:08,400 --> 00:00:14,350 of what is reasonable to learn about ordinary differential 5 00:00:14,350 --> 00:00:15,960 equations. 6 00:00:15,960 --> 00:00:23,890 And a big part of the series will 7 00:00:23,890 --> 00:00:28,610 be videos on first order equations and videos 8 00:00:28,610 --> 00:00:30,220 on second order equations. 9 00:00:30,220 --> 00:00:34,540 Those are the ones you see most in applications. 10 00:00:34,540 --> 00:00:39,950 And those are the ones you can understand and solve, 11 00:00:39,950 --> 00:00:41,440 when you're fortunate. 12 00:00:41,440 --> 00:00:45,520 So first order equations means first derivatives 13 00:00:45,520 --> 00:00:47,620 come into the equation. 14 00:00:47,620 --> 00:00:53,300 So that's a nice equation that we will solve, 15 00:00:53,300 --> 00:00:55,660 we'll spend a lot of time on. 16 00:00:55,660 --> 00:01:02,420 The derivative is-- that's the rate of change of y-- 17 00:01:02,420 --> 00:01:07,980 the changes in the unknown y-- as time goes forward 18 00:01:07,980 --> 00:01:14,120 are partly from depending on the solution itself. 19 00:01:14,120 --> 00:01:16,490 That's the idea of a differential equation, 20 00:01:16,490 --> 00:01:22,460 that it connects the changes with the function y as it is. 21 00:01:22,460 --> 00:01:30,220 And then you have inputs called q of t, 22 00:01:30,220 --> 00:01:31,880 which produce their own change. 23 00:01:31,880 --> 00:01:33,330 They go into the system. 24 00:01:33,330 --> 00:01:35,170 They become part of y. 25 00:01:35,170 --> 00:01:41,040 And they grow, decay, oscillate, whatever y of t does. 26 00:01:41,040 --> 00:01:45,270 So that is a linear equation with a right-hand side, 27 00:01:45,270 --> 00:01:48,980 with an input, a forcing term. 28 00:01:48,980 --> 00:01:53,570 And here is a nonlinear equation. 29 00:01:53,570 --> 00:01:55,740 The derivative of y. 30 00:01:55,740 --> 00:01:57,700 The slope depends on y. 31 00:01:57,700 --> 00:01:59,870 So it's a differential equation. 32 00:01:59,870 --> 00:02:06,490 But f of y could be y squared over y cubed or the sine of y 33 00:02:06,490 --> 00:02:08,530 or the exponential of y. 34 00:02:08,530 --> 00:02:10,660 So it could be not linear. 35 00:02:10,660 --> 00:02:15,450 Linear means that we see y by itself. 36 00:02:15,450 --> 00:02:16,740 Here we won't. 37 00:02:16,740 --> 00:02:18,590 Well, we'll come pretty close to getting 38 00:02:18,590 --> 00:02:21,620 a solution, because it's a first order equation. 39 00:02:21,620 --> 00:02:26,800 And the most general first order equation, the function 40 00:02:26,800 --> 00:02:29,720 would depend on t and y. 41 00:02:29,720 --> 00:02:32,370 The input would change with time. 42 00:02:32,370 --> 00:02:38,000 Here, the input depends only on the current value of y. 43 00:02:38,000 --> 00:02:42,840 I might think of y as money in a bank, 44 00:02:42,840 --> 00:02:46,300 growing, decaying, oscillating. 45 00:02:46,300 --> 00:02:53,920 Or I might think of y as the distance on a spring. 46 00:02:53,920 --> 00:02:55,950 Lots of applications coming. 47 00:02:55,950 --> 00:02:56,850 OK. 48 00:02:56,850 --> 00:02:58,700 So those are first order equations. 49 00:02:58,700 --> 00:03:02,220 And second order have second derivatives. 50 00:03:02,220 --> 00:03:04,050 The second derivative is the acceleration. 51 00:03:06,710 --> 00:03:10,740 It tells you about the bending of the curve. 52 00:03:10,740 --> 00:03:16,536 If I have a graph, the first derivative we know 53 00:03:16,536 --> 00:03:18,780 gives the slope of the graph. 54 00:03:18,780 --> 00:03:19,720 Is it going up? 55 00:03:19,720 --> 00:03:20,750 Is it going down? 56 00:03:20,750 --> 00:03:22,680 Is it a maximum? 57 00:03:22,680 --> 00:03:26,070 The second derivative tells you the bending of the graph. 58 00:03:26,070 --> 00:03:29,020 How it goes away from a straight line. 59 00:03:29,020 --> 00:03:31,020 So and that's acceleration. 60 00:03:31,020 --> 00:03:34,340 So Newton's law-- the physics we all live with-- 61 00:03:34,340 --> 00:03:37,980 would be acceleration is some force. 62 00:03:37,980 --> 00:03:42,620 And there is a force that depends, again, linearly-- 63 00:03:42,620 --> 00:03:45,200 that's a keyword-- on y. 64 00:03:45,200 --> 00:03:47,270 Just y to the first power. 65 00:03:47,270 --> 00:03:50,115 And here is a little bit more general equation. 66 00:03:52,670 --> 00:03:54,930 In Newton's law, the acceleration 67 00:03:54,930 --> 00:03:56,910 is multiplied by the mass. 68 00:03:56,910 --> 00:04:03,450 So this includes a physical constant here, the mass. 69 00:04:03,450 --> 00:04:07,040 Then there could be some damping. 70 00:04:07,040 --> 00:04:11,200 If I have motion, there may be friction slowing it down. 71 00:04:11,200 --> 00:04:15,070 That depends on the first derivative, the velocity. 72 00:04:15,070 --> 00:04:18,740 And then there could be the same kind of forced term 73 00:04:18,740 --> 00:04:21,420 that depends on y itself. 74 00:04:21,420 --> 00:04:27,720 And there could be some outside force, some person or machine 75 00:04:27,720 --> 00:04:31,156 that's creating movement. 76 00:04:31,156 --> 00:04:34,270 An external forcing term. 77 00:04:34,270 --> 00:04:36,170 So that's a big equation. 78 00:04:36,170 --> 00:04:40,210 And let me just say, at this point, 79 00:04:40,210 --> 00:04:42,470 we let things be nonlinear. 80 00:04:42,470 --> 00:04:44,780 And we had a pretty good chance. 81 00:04:44,780 --> 00:04:47,140 If we get these to be non-linear, 82 00:04:47,140 --> 00:04:50,740 the chance at second order has dropped. 83 00:04:50,740 --> 00:04:54,590 And the further we go, the more we 84 00:04:54,590 --> 00:05:03,000 need linearity and maybe even constant coefficients. 85 00:05:03,000 --> 00:05:04,890 m, b, and k. 86 00:05:04,890 --> 00:05:08,570 So that's really the problem that we 87 00:05:08,570 --> 00:05:14,910 can solve as we get good at it is a linear equation-- 88 00:05:14,910 --> 00:05:19,240 second order, let's say-- with constant coefficients. 89 00:05:19,240 --> 00:05:22,740 But that's pretty much pushing what 90 00:05:22,740 --> 00:05:26,480 we can hope to do explicitly and really 91 00:05:26,480 --> 00:05:29,720 understand the solution, because so 92 00:05:29,720 --> 00:05:33,420 linear with constant coefficients. 93 00:05:33,420 --> 00:05:35,440 Say it again. 94 00:05:35,440 --> 00:05:39,600 That's the good equations. 95 00:05:39,600 --> 00:05:46,680 And I think of solutions in two ways. 96 00:05:46,680 --> 00:05:52,030 If I have a really nice function like a exponential. 97 00:05:52,030 --> 00:05:54,460 Exponentials are the great functions 98 00:05:54,460 --> 00:05:57,950 of differential equations, the great functions in this series. 99 00:05:57,950 --> 00:06:00,420 You'll see them over and over. 100 00:06:00,420 --> 00:06:01,650 Exponentials. 101 00:06:01,650 --> 00:06:05,310 Say f of t equals-- e to the t. 102 00:06:05,310 --> 00:06:08,230 Or e to the omega t. 103 00:06:08,230 --> 00:06:10,420 Or e to the i omega t. 104 00:06:10,420 --> 00:06:13,090 That i is the square root of minus 1. 105 00:06:13,090 --> 00:06:18,750 In those cases, we will get a similarly nice function 106 00:06:18,750 --> 00:06:19,990 for the solution. 107 00:06:19,990 --> 00:06:22,100 Those are the best. 108 00:06:22,100 --> 00:06:25,120 We get a function that we know like exponentials. 109 00:06:25,120 --> 00:06:27,830 And we get solutions that we know. 110 00:06:27,830 --> 00:06:34,860 Second best are we get some function we don't especially 111 00:06:34,860 --> 00:06:36,180 know. 112 00:06:36,180 --> 00:06:39,260 In that case, the solution probably 113 00:06:39,260 --> 00:06:45,130 involves an integral of f, or two integrals of f. 114 00:06:45,130 --> 00:06:47,760 We have a formula for it. 115 00:06:47,760 --> 00:06:49,820 That formula includes an integration 116 00:06:49,820 --> 00:06:55,540 that we would have to do, either look it up 117 00:06:55,540 --> 00:06:58,010 or do it numerically. 118 00:06:58,010 --> 00:07:01,930 And then when we get to completely non-linear 119 00:07:01,930 --> 00:07:07,280 functions, or we have varying coefficients, 120 00:07:07,280 --> 00:07:10,010 then we're going to go numerically. 121 00:07:10,010 --> 00:07:15,340 So really, the wide, wide part of the subject 122 00:07:15,340 --> 00:07:17,610 ends up as numerical solutions. 123 00:07:17,610 --> 00:07:20,570 But you've got a whole bunch of videos 124 00:07:20,570 --> 00:07:26,890 coming that have nice functions and nice solutions. 125 00:07:26,890 --> 00:07:27,450 OK. 126 00:07:27,450 --> 00:07:29,560 So that's first order and second order. 127 00:07:29,560 --> 00:07:36,980 Now there's more, because a system doesn't usually 128 00:07:36,980 --> 00:07:42,100 consist of just a single resistor or a single spring. 129 00:07:42,100 --> 00:07:50,370 In reality, we have many equations. 130 00:07:50,370 --> 00:07:53,560 And we need to deal with those. 131 00:07:53,560 --> 00:07:55,350 So y is now a vector. 132 00:07:55,350 --> 00:07:58,300 y1, y2, to yn. 133 00:07:58,300 --> 00:07:59,950 n different unknowns. 134 00:07:59,950 --> 00:08:01,820 n different equations. 135 00:08:01,820 --> 00:08:03,070 That's n equation. 136 00:08:03,070 --> 00:08:08,060 So here that is an n by n matrix. 137 00:08:11,480 --> 00:08:13,320 So it's first order. 138 00:08:13,320 --> 00:08:14,690 Constant coefficient. 139 00:08:14,690 --> 00:08:16,870 So we'll be able to get somewhere. 140 00:08:16,870 --> 00:08:20,840 But it's a system of n coupled equations. 141 00:08:20,840 --> 00:08:24,240 And so is this one with a second derivative. 142 00:08:24,240 --> 00:08:27,280 Second derivative of the solution. 143 00:08:27,280 --> 00:08:29,680 But again, y1 to yn. 144 00:08:29,680 --> 00:08:33,020 And we have a matrix, usually a symmetric matrix 145 00:08:33,020 --> 00:08:36,490 there, we hope, multiplying y. 146 00:08:36,490 --> 00:08:39,809 So again, linear. 147 00:08:39,809 --> 00:08:42,080 Constant coefficients. 148 00:08:42,080 --> 00:08:44,300 But several equations at once. 149 00:08:44,300 --> 00:08:49,030 And that will bring in the idea of eigenvalues 150 00:08:49,030 --> 00:08:50,760 and eigenvectors. 151 00:08:50,760 --> 00:08:54,480 Eigenvalues and eigenvectors is a key bit of linear algebra 152 00:08:54,480 --> 00:08:56,790 that makes these problems simple, 153 00:08:56,790 --> 00:09:02,240 because it turns this coupled problem 154 00:09:02,240 --> 00:09:05,620 into n uncoupled problems. 155 00:09:05,620 --> 00:09:09,390 n first order equations that we can solve separately. 156 00:09:09,390 --> 00:09:13,390 Or n second order equations that we can solve separately. 157 00:09:13,390 --> 00:09:19,110 That's the goal with matrices is to uncouple them. 158 00:09:19,110 --> 00:09:20,020 OK. 159 00:09:20,020 --> 00:09:24,900 And then really the big reality of this subject 160 00:09:24,900 --> 00:09:33,600 is that solutions are found numerically 161 00:09:33,600 --> 00:09:35,750 and very efficiently. 162 00:09:35,750 --> 00:09:39,700 And there's a lot to learn about that, a lot to learn. 163 00:09:39,700 --> 00:09:49,420 And MATLAB is a first-class package 164 00:09:49,420 --> 00:09:53,840 that gives you numerical solutions with many options. 165 00:09:53,840 --> 00:09:56,940 One of the options may be the favorite. 166 00:09:56,940 --> 00:10:01,650 ODE for ordinary differential equations 4 5. 167 00:10:01,650 --> 00:10:03,810 And that is numbers 4, 5. 168 00:10:03,810 --> 00:10:15,030 Well, Cleve Moler, who wrote the package MATLAB, 169 00:10:15,030 --> 00:10:22,200 is going to create a series of parallel videos 170 00:10:22,200 --> 00:10:28,540 explaining the steps toward numerical solution. 171 00:10:28,540 --> 00:10:31,670 Those steps begin with a very simple method. 172 00:10:31,670 --> 00:10:36,630 Maybe I'll put the creator's name down. 173 00:10:36,630 --> 00:10:38,400 Euler. 174 00:10:38,400 --> 00:10:42,650 So you can know that because Euler was centuries ago, 175 00:10:42,650 --> 00:10:44,330 he didn't have a computer. 176 00:10:44,330 --> 00:10:48,420 But he had a simple way of approximating. 177 00:10:48,420 --> 00:10:52,870 So Euler might be ODE 1. 178 00:10:52,870 --> 00:10:54,820 And now we've left Euler behind. 179 00:10:54,820 --> 00:10:59,750 Euler is fine, but not sufficiently accurate. 180 00:10:59,750 --> 00:11:07,790 ODE 45, that 4 and 5 indicate a much higher accuracy, much more 181 00:11:07,790 --> 00:11:10,710 flexibility in that package. 182 00:11:10,710 --> 00:11:14,880 So starting with Euler, Cleve Moler 183 00:11:14,880 --> 00:11:20,230 will explain several steps that reach 184 00:11:20,230 --> 00:11:23,090 a really workhorse package. 185 00:11:23,090 --> 00:11:30,020 So that's a parallel series where you'll see the codes. 186 00:11:30,020 --> 00:11:33,090 This will be a chalk and blackboard 187 00:11:33,090 --> 00:11:41,520 series, where I'll find solutions in exponential form. 188 00:11:41,520 --> 00:11:52,200 And if I can, I would like to conclude the series by reaching 189 00:11:52,200 --> 00:11:53,910 partial differential equations. 190 00:11:53,910 --> 00:11:56,590 So I'll just write some partial differential equations here, 191 00:11:56,590 --> 00:11:58,080 so you know what they mean. 192 00:11:58,080 --> 00:12:01,340 And that's a goal which I hope to reach. 193 00:12:01,340 --> 00:12:04,270 So one partial differential equation 194 00:12:04,270 --> 00:12:12,690 would be du dt-- you see partial derivatives-- is 195 00:12:12,690 --> 00:12:14,040 second derivative. 196 00:12:14,040 --> 00:12:15,950 So I have two variables now. 197 00:12:15,950 --> 00:12:18,520 Time, which I always have. 198 00:12:18,520 --> 00:12:21,880 And here is x in the space direction. 199 00:12:21,880 --> 00:12:25,260 That's called the heat equation. 200 00:12:25,260 --> 00:12:30,080 That's a very important constant coefficient, 201 00:12:30,080 --> 00:12:33,010 partial differential equation. 202 00:12:33,010 --> 00:12:38,150 So PDE, as distinct from ODE. 203 00:12:38,150 --> 00:12:40,520 And so I write down one more. 204 00:12:40,520 --> 00:12:46,950 The second derivative of u is the same right-hand side 205 00:12:46,950 --> 00:12:51,420 second derivative in the x direction. 206 00:12:51,420 --> 00:12:55,540 That would be called the wave equation. 207 00:12:55,540 --> 00:12:59,130 So this is like the first order equation in time. 208 00:12:59,130 --> 00:13:00,820 It's like a big system. 209 00:13:00,820 --> 00:13:05,100 In fact, it's like an infinite size system of equations. 210 00:13:05,100 --> 00:13:06,600 First order in time. 211 00:13:06,600 --> 00:13:08,240 Or second order in time. 212 00:13:08,240 --> 00:13:09,160 Heat equation. 213 00:13:09,160 --> 00:13:10,420 Wave equation. 214 00:13:10,420 --> 00:13:26,250 And I would like to also include a the Laplace equation. 215 00:13:26,250 --> 00:13:28,070 Well, if we get there. 216 00:13:28,070 --> 00:13:32,680 So those are goals for the end of the series that 217 00:13:32,680 --> 00:13:37,820 go beyond some courses in ODEs. 218 00:13:37,820 --> 00:13:43,270 But the main goal here is to give you 219 00:13:43,270 --> 00:13:51,760 the standard clear picture of the basic differential 220 00:13:51,760 --> 00:13:55,550 equations that we can solve and understand. 221 00:13:55,550 --> 00:13:57,040 Well, I hope it goes well. 222 00:13:57,040 --> 00:13:58,590 Thanks.