1 00:00:00,000 --> 00:00:00,499 2 00:00:00,499 --> 00:00:02,944 The following content is provided under a Creative 3 00:00:02,944 --> 00:00:03,610 Commons license. 4 00:00:03,610 --> 00:00:05,460 Your support will help MIT OpenCourseWare 5 00:00:05,460 --> 00:00:09,360 continue to offer high quality educational resources for free. 6 00:00:09,360 --> 00:00:11,920 To make a donation, or to view additional materials 7 00:00:11,920 --> 00:00:15,600 from hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:15,600 --> 00:00:20,870 at ocw.mit.edu. 9 00:00:20,870 --> 00:00:22,870 PROFESSOR STRANG: OK, so. 10 00:00:22,870 --> 00:00:24,710 This is a big day. 11 00:00:24,710 --> 00:00:27,480 Part One of the course is completed, 12 00:00:27,480 --> 00:00:30,040 and I have your quizzes for you, and that 13 00:00:30,040 --> 00:00:33,390 was a very successful result, I'm very pleased. 14 00:00:33,390 --> 00:00:35,860 I hope you are, too. 15 00:00:35,860 --> 00:00:39,990 Quiz average of 85, that's on the first part of the course. 16 00:00:39,990 --> 00:00:45,380 And then the second part -- so this is Chapter 3 now -- 17 00:00:45,380 --> 00:00:49,370 Starts in one dimension with an equation of a type that 18 00:00:49,370 --> 00:00:52,120 we've already seen a little bit. 19 00:00:52,120 --> 00:00:54,240 So there's some more things to say 20 00:00:54,240 --> 00:00:58,060 about the equation and the framework, 21 00:00:58,060 --> 00:01:05,350 but then we get to make a start on the finite element approach 22 00:01:05,350 --> 00:01:06,720 to solving it. 23 00:01:06,720 --> 00:01:12,290 We could of course-- In 1-D finite differences are probably 24 00:01:12,290 --> 00:01:14,450 the way to go, actually. 25 00:01:14,450 --> 00:01:21,850 In one dimension the special success of finite elements 26 00:01:21,850 --> 00:01:27,130 doesn't really show up that much because finite elements have 27 00:01:27,130 --> 00:01:30,400 been, I mean one great reason for their success 28 00:01:30,400 --> 00:01:33,420 is that they handle different geometries. 29 00:01:33,420 --> 00:01:35,420 They're flexible; you could have regions 30 00:01:35,420 --> 00:01:39,980 in the plane, three-dimensional bodies of different shapes. 31 00:01:39,980 --> 00:01:41,740 Finite differences doesn't really 32 00:01:41,740 --> 00:01:46,070 know what to do on a curved boundary in in 2- 33 00:01:46,070 --> 00:01:50,540 or 3-D. Finite elements copes much better. 34 00:01:50,540 --> 00:01:55,120 So, we'll make a start today, more Friday 35 00:01:55,120 --> 00:01:57,620 on one-dimensional finite elements 36 00:01:57,620 --> 00:02:02,300 and then, a couple of weeks later 37 00:02:02,300 --> 00:02:05,450 will be the real thing, 2-D and 3-D. 38 00:02:05,450 --> 00:02:09,160 OK, so, ready to go on Chapter 3? 39 00:02:09,160 --> 00:02:11,560 So, that's our equation and everybody sees 40 00:02:11,560 --> 00:02:15,000 right away what's the framework, that that's 41 00:02:15,000 --> 00:02:20,390 A transpose; in some way this is A transpose C A, 42 00:02:20,390 --> 00:02:23,510 but what's new of course is that we're dealing with functions, 43 00:02:23,510 --> 00:02:25,230 not vectors. 44 00:02:25,230 --> 00:02:30,170 So we're dealing with, you could say, operators, not matrices. 45 00:02:30,170 --> 00:02:35,950 And nevertheless, the big picture is still as it was. 46 00:02:35,950 --> 00:02:40,720 So let me take u(x) to be the displacements again. 47 00:02:40,720 --> 00:02:44,440 So I'm thinking more of mechanics than electronics 48 00:02:44,440 --> 00:02:45,370 here. 49 00:02:45,370 --> 00:02:48,640 Displacements, and then we have du-- 50 00:02:48,640 --> 00:02:52,910 the e(x) will be du/dx, that'll be 51 00:02:52,910 --> 00:03:00,700 the stretching, the elongation and, of course at that step 52 00:03:00,700 --> 00:03:04,940 you already see the big new item, the fact 53 00:03:04,940 --> 00:03:10,330 that the A, the one that gets us from u to du/dx, 54 00:03:10,330 --> 00:03:14,260 instead of being a difference matrix which it has been, 55 00:03:14,260 --> 00:03:18,880 our matrix A is now a derivative. 56 00:03:18,880 --> 00:03:21,730 A is d/dx. 57 00:03:21,730 --> 00:03:27,560 So maybe I'll just take out that arrow. 58 00:03:27,560 --> 00:03:29,950 So A is d/dx. 59 00:03:29,950 --> 00:03:37,330 OK, but if we dealt OK with difference matrices, 60 00:03:37,330 --> 00:03:39,570 we're going to deal OK with derivatives. 61 00:03:39,570 --> 00:03:46,720 Then, of course, this is the C part, that produces w(x). 62 00:03:46,720 --> 00:03:53,590 And it's a multiplication by this possibly varying, 63 00:03:53,590 --> 00:03:58,370 possibly jumping stiffness constant c(x). 64 00:03:58,370 --> 00:04:05,790 So w(x) is c(x) e(x), that's our old w=Ce, this is Hooke's Law. 65 00:04:05,790 --> 00:04:08,880 I'll put Hooke's Law, but that's, 66 00:04:08,880 --> 00:04:13,590 or whose-ever law it is. 67 00:04:13,590 --> 00:04:15,840 It's like a diagonal matrix; I hope 68 00:04:15,840 --> 00:04:18,900 you see that it's like a diagonal matrix. 69 00:04:18,900 --> 00:04:23,590 This function u is kind of like of a vector 70 00:04:23,590 --> 00:04:28,040 but a continuum vector instead of just a fixed, 71 00:04:28,040 --> 00:04:30,040 finite number of values. 72 00:04:30,040 --> 00:04:34,590 Then at each value we used to multiply by c_i, 73 00:04:34,590 --> 00:04:40,740 now our values are continuous with x, so we multiply by c(x). 74 00:04:40,740 --> 00:04:44,730 And then you're going to expect that, going up here, 75 00:04:44,730 --> 00:04:51,650 there's going to be an A transpose w f, and of course 76 00:04:51,650 --> 00:04:54,740 that A transpose we have to identify 77 00:04:54,740 --> 00:04:58,690 and that's the first point of the lecture, really. 78 00:04:58,690 --> 00:05:01,750 To identify what is A transpose. 79 00:05:01,750 --> 00:05:05,590 What do I mean by A transpose? 80 00:05:05,590 --> 00:05:09,080 And I've got to say right away that I'm 81 00:05:09,080 --> 00:05:15,760 a little, the notation, writing a transpose of a derivative is 82 00:05:15,760 --> 00:05:18,950 like, that's not legal. 83 00:05:18,950 --> 00:05:21,570 Because we think of the transpose of a matrix, 84 00:05:21,570 --> 00:05:25,470 you sort of flip it over the main diagonal, 85 00:05:25,470 --> 00:05:30,120 but obviously it's got to be something more to it than that. 86 00:05:30,120 --> 00:05:33,630 And so that's a central math part 87 00:05:33,630 --> 00:05:39,170 of this lecture is what's really going on when you transpose? 88 00:05:39,170 --> 00:05:41,150 Because then we can copy what's going on 89 00:05:41,150 --> 00:05:43,030 and it's quite important to get it. 90 00:05:43,030 --> 00:05:46,970 Because the transpose, well, other notations 91 00:05:46,970 --> 00:05:50,290 and other words for it would be-- A notation 92 00:05:50,290 --> 00:05:51,970 might be a star. 93 00:05:51,970 --> 00:05:55,370 Star would be way more common than transpose, 94 00:05:55,370 --> 00:05:57,200 I'll just stay with transpose because I 95 00:05:57,200 --> 00:06:04,410 want to keep pressing the parallel with A transpose C A. 96 00:06:04,410 --> 00:06:08,180 And the name for it would be the adjoint. 97 00:06:08,180 --> 00:06:13,870 And adjoint methods, and adjoint operator, those appear a lot. 98 00:06:13,870 --> 00:06:16,510 And you'll see them appear in finite elements. 99 00:06:16,510 --> 00:06:24,340 So this is a good thing to catch on to. 100 00:06:24,340 --> 00:06:25,060 Why? 101 00:06:25,060 --> 00:06:30,030 Why should the transpose or the adjoint of the derivative 102 00:06:30,030 --> 00:06:32,000 be minus the derivative? 103 00:06:32,000 --> 00:06:36,610 And by the way, just while we're fixing this, 104 00:06:36,610 --> 00:06:43,870 this is a key fact then, which is certainly-- 105 00:06:43,870 --> 00:06:47,640 We have a very strong hint from centered difference, right? 106 00:06:47,640 --> 00:06:50,810 If I think of derivatives, if I associate them 107 00:06:50,810 --> 00:06:54,100 with differences, the centered difference matrix, 108 00:06:54,100 --> 00:07:01,800 so the A matrix may be centered, would be-- Just to remind us, 109 00:07:01,800 --> 00:07:05,600 a centered difference has ones and minus one, one, 110 00:07:05,600 --> 00:07:08,280 zeroes on the diagonal, right? 111 00:07:08,280 --> 00:07:10,430 Minus one, one. 112 00:07:10,430 --> 00:07:16,210 Takes that difference at every row. 113 00:07:16,210 --> 00:07:18,280 Except possibly boundary rows. 114 00:07:18,280 --> 00:07:21,220 And of course as soon as you look at that matrix you see, 115 00:07:21,220 --> 00:07:23,590 yeah, it's anti-symmetric. 116 00:07:23,590 --> 00:07:26,100 That's an anti-symmetric matrix. 117 00:07:26,100 --> 00:07:32,160 So A transpose is minus A for centered differences 118 00:07:32,160 --> 00:07:35,580 and therefore we're not so surprised 119 00:07:35,580 --> 00:07:38,330 to see a minus sign up here when we 120 00:07:38,330 --> 00:07:40,910 go to the continuous case, the derivative. 121 00:07:40,910 --> 00:07:45,320 But, we still have to say what it means. 122 00:07:45,320 --> 00:07:47,660 So that's what I'll do next, OK? 123 00:07:47,660 --> 00:07:49,790 So this is a good thing to know. 124 00:07:49,790 --> 00:07:51,930 And I was just going to comment, what 125 00:07:51,930 --> 00:07:55,530 would be the transpose of the second derivative? 126 00:07:55,530 --> 00:07:57,490 I won't even write this down. 127 00:07:57,490 --> 00:08:04,380 If the derivative transpose sort of flips its sign to minus, 128 00:08:04,380 --> 00:08:06,540 what would you guess for this transpose 129 00:08:06,540 --> 00:08:10,550 of second derivative, our more familiar d second 130 00:08:10,550 --> 00:08:12,190 by dx squared? 131 00:08:12,190 --> 00:08:14,820 Well we'll have two minus signs. 132 00:08:14,820 --> 00:08:16,550 So it'll come out plus. 133 00:08:16,550 --> 00:08:21,040 So second derivatives, even order derivatives 134 00:08:21,040 --> 00:08:24,030 are sort of like symmetric guys. 135 00:08:24,030 --> 00:08:28,410 Odd order derivatives, first and third and fifth derivatives, 136 00:08:28,410 --> 00:08:30,850 well, God forbid we ever meet a fifth derivative, 137 00:08:30,850 --> 00:08:36,910 but first derivative anyway, is anti-symmetric. 138 00:08:36,910 --> 00:08:38,840 Except for boundary conditions. 139 00:08:38,840 --> 00:08:42,560 So I really have to emphasize that the boundary 140 00:08:42,560 --> 00:08:44,030 conditions come in. 141 00:08:44,030 --> 00:08:45,580 And you'll see them come in. 142 00:08:45,580 --> 00:08:47,200 They have to come in. 143 00:08:47,200 --> 00:08:52,150 OK, so what meaning can I assign to the transpose, 144 00:08:52,150 --> 00:08:58,790 or what was the real thing happening when we flipped 145 00:08:58,790 --> 00:09:00,930 the matrix across its diagonal? 146 00:09:00,930 --> 00:09:14,050 I claim that we really define the transpose by this rule, 147 00:09:14,050 --> 00:09:17,810 by-- We know what inner products are. 148 00:09:17,810 --> 00:09:20,320 I'll do vectors first, we know about inner products, 149 00:09:20,320 --> 00:09:23,650 dot products, we know what the dot product of two vectors is. 150 00:09:23,650 --> 00:09:27,390 So, this is the transpose of A. How 151 00:09:27,390 --> 00:09:29,650 am I going to define the transpose of A? 152 00:09:29,650 --> 00:09:36,170 Well, I look at the dot product of Au with w. 153 00:09:36,170 --> 00:09:40,250 I'll use a dot here for once, I may erase it and replace it. 154 00:09:40,250 --> 00:09:46,860 If at the dot product of Au with w, then that equals, 155 00:09:46,860 --> 00:09:49,700 for all u and w, all vectors u and w, 156 00:09:49,700 --> 00:09:56,720 that equals the dot product of u with something. 157 00:09:56,720 --> 00:10:01,790 Because u is coming-- If I write out what the dot product is, 158 00:10:01,790 --> 00:10:05,810 I see u_1 multiplies something, u_2 multiplies something. 159 00:10:05,810 --> 00:10:13,420 And what goes in that little space? 160 00:10:13,420 --> 00:10:15,210 This is just an identity. 161 00:10:15,210 --> 00:10:18,760 I mean, it's like, you'll say no big deal. 162 00:10:18,760 --> 00:10:22,330 But I'm saying there is at least a small deal here. 163 00:10:22,330 --> 00:10:22,930 OK. 164 00:10:22,930 --> 00:10:28,710 So if I write it this way, you'll 165 00:10:28,710 --> 00:10:32,850 tell me right away this should be the same as u transpose 166 00:10:32,850 --> 00:10:33,900 times something. 167 00:10:33,900 --> 00:10:38,400 And again, so I'm asking for the same something on both lines. 168 00:10:38,400 --> 00:10:41,930 What is that something? 169 00:10:41,930 --> 00:10:44,100 A transpose w. 170 00:10:44,100 --> 00:10:48,130 Whatever A transpose is, it's the matrix 171 00:10:48,130 --> 00:10:50,220 that makes this right. 172 00:10:50,220 --> 00:10:51,960 That's really my message. 173 00:10:51,960 --> 00:10:54,550 That A transpose is-- The reason we 174 00:10:54,550 --> 00:10:56,810 flipped the matrix across the diagonal 175 00:10:56,810 --> 00:11:01,110 is that it makes that equation correct. 176 00:11:01,110 --> 00:11:03,510 And I'm writing the same thing here. 177 00:11:03,510 --> 00:11:04,940 OK. 178 00:11:04,940 --> 00:11:09,590 So again, if we knew what dot products were, 179 00:11:09,590 --> 00:11:11,930 what inner product of vectors were, 180 00:11:11,930 --> 00:11:15,940 then A transpose is the matrix that 181 00:11:15,940 --> 00:11:18,780 makes this identity correct. 182 00:11:18,780 --> 00:11:22,310 And of course if you write it all out 183 00:11:22,310 --> 00:11:24,580 in terms of i, j, every component, 184 00:11:24,580 --> 00:11:26,640 you find it is correct. 185 00:11:26,640 --> 00:11:31,190 So that defines the transpose of a matrix. 186 00:11:31,190 --> 00:11:34,590 And of course it coincides with flipping across the diagonal. 187 00:11:34,590 --> 00:11:39,610 Now, how about the transpose of a derivative. 188 00:11:39,610 --> 00:11:43,520 OK, so I'm going to follow the same rule. 189 00:11:43,520 --> 00:11:46,080 Here A is now going to be the derivative, 190 00:11:46,080 --> 00:11:48,230 and A transpose is going to be whatever 191 00:11:48,230 --> 00:11:50,470 it takes to make this true. 192 00:11:50,470 --> 00:11:51,930 But what do I mean? 193 00:11:51,930 --> 00:11:54,620 Now I have functions, so I have to think again, 194 00:11:54,620 --> 00:11:57,870 what do I mean by the inner product, the dot product? 195 00:11:57,870 --> 00:12:02,950 So for this to make sense I need to say, 196 00:12:02,950 --> 00:12:05,410 and it's a very important thing anyway, 197 00:12:05,410 --> 00:12:07,830 and it's the right natural choice, 198 00:12:07,830 --> 00:12:14,520 I need to say the dot product, or the inner product 199 00:12:14,520 --> 00:12:19,170 is a better word, of functions. 200 00:12:19,170 --> 00:12:21,270 Of two functions. 201 00:12:21,270 --> 00:12:24,760 Say e(x) and w(x). 202 00:12:24,760 --> 00:12:30,260 If I have two functions, what do I mean by their inner product? 203 00:12:30,260 --> 00:12:32,570 Well, really I just think back what 204 00:12:32,570 --> 00:12:36,100 did we mean in the finite dimensional case, 205 00:12:36,100 --> 00:12:40,520 I multiplied each e by a w, each component of e by w, 206 00:12:40,520 --> 00:12:43,780 and I added, so what am I going to do here? 207 00:12:43,780 --> 00:12:49,410 Maybe my notation should be parentheses 208 00:12:49,410 --> 00:12:54,410 with a comma would be better than a dot, for functions. 209 00:12:54,410 --> 00:12:55,800 So I have a function. 210 00:12:55,800 --> 00:12:59,400 I'm in function space now. 211 00:12:59,400 --> 00:13:04,100 We moved out of R^n today, into function space. 212 00:13:04,100 --> 00:13:06,390 Our vectors have become functions. 213 00:13:06,390 --> 00:13:09,420 And now what's the dot product of two vectors? 214 00:13:09,420 --> 00:13:13,710 Well, what am I going to do? 215 00:13:13,710 --> 00:13:15,660 I'm going to do what I have to do. 216 00:13:15,660 --> 00:13:20,970 I'm going to multiply each e by its corresponding w, 217 00:13:20,970 --> 00:13:26,240 and now they depend on this continuous variable x, 218 00:13:26,240 --> 00:13:28,840 so that's e(x) times w(x). 219 00:13:28,840 --> 00:13:32,010 And what do I do now? 220 00:13:32,010 --> 00:13:33,580 Integrate. 221 00:13:33,580 --> 00:13:38,420 Here I added e_i times w_i, of course. 222 00:13:38,420 --> 00:13:41,200 Over here I have functions. 223 00:13:41,200 --> 00:13:43,610 I integrate dx. 224 00:13:43,610 --> 00:13:47,500 Over whatever the region of the problem is. 225 00:13:47,500 --> 00:13:52,050 And then our example's in 1-D, it'll zero to one. 226 00:13:52,050 --> 00:13:54,370 If these are functions of two variables 227 00:13:54,370 --> 00:13:58,990 I'd be integrating over some 2-D region, but we're in 1-D today. 228 00:13:58,990 --> 00:14:15,110 OK, so you see that I'm prepared to say-- This now makes sense. 229 00:14:15,110 --> 00:14:20,320 I now want to say, I'm going to let A be the derivative, 230 00:14:20,320 --> 00:14:24,190 and I'm going to figure out what A transpose has to be. 231 00:14:24,190 --> 00:14:29,930 So if A is the derivative, so now is this key step. 232 00:14:29,930 --> 00:14:31,780 Why is the transpose that? 233 00:14:31,780 --> 00:14:40,950 OK, so I look at the derivative, du/dx, with w, 234 00:14:40,950 --> 00:14:52,670 so that's this integral, from zero to one of du/dx*w(x)dx, 235 00:14:52,670 --> 00:14:54,860 so that's my left side. 236 00:14:54,860 --> 00:14:58,070 Now I want to get u by itself. 237 00:14:58,070 --> 00:15:01,020 I want to get the dot product, so I 238 00:15:01,020 --> 00:15:07,410 want to get another integral here that has u(x) by itself. 239 00:15:07,410 --> 00:15:09,130 Times something, and that something 240 00:15:09,130 --> 00:15:10,900 is what I'm looking for. 241 00:15:10,900 --> 00:15:15,230 That something will be A transpose w. 242 00:15:15,230 --> 00:15:17,600 Right? 243 00:15:17,600 --> 00:15:19,340 Do you see what I'm doing? 244 00:15:19,340 --> 00:15:24,240 This is is the dot product, this is Auw, 245 00:15:24,240 --> 00:15:28,680 so I've written out what Au inner product with w is. 246 00:15:28,680 --> 00:15:32,680 And now I want to get u out by itself and what it multiplies 247 00:15:32,680 --> 00:15:36,020 here will be the A transpose w, and my rule 248 00:15:36,020 --> 00:15:42,510 will be extended to the function case and I'll be ready to go. 249 00:15:42,510 --> 00:15:48,670 Now do you recognize, this is a basic calculus step, 250 00:15:48,670 --> 00:15:51,420 what rule of calculus am I going to use? 251 00:15:51,420 --> 00:15:53,660 We're back to 18.01. 252 00:15:53,660 --> 00:15:56,240 I have the integral of a derivative times w, 253 00:15:56,240 --> 00:15:57,580 and what do I want to do? 254 00:15:57,580 --> 00:16:01,150 I want to get the derivative off of u. 255 00:16:01,150 --> 00:16:02,890 What happens? 256 00:16:02,890 --> 00:16:04,710 What's it called? 257 00:16:04,710 --> 00:16:06,140 Integration by parts. 258 00:16:06,140 --> 00:16:08,060 Very important thing. 259 00:16:08,060 --> 00:16:10,060 Very important. 260 00:16:10,060 --> 00:16:13,420 You miss its importance in calculus. 261 00:16:13,420 --> 00:16:16,480 It gets sometimes introduced as a rule, or a trick 262 00:16:16,480 --> 00:16:21,490 to find some goofy integral, but it's really the real thing. 263 00:16:21,490 --> 00:16:23,630 So what is integration by parts? 264 00:16:23,630 --> 00:16:24,770 What's the rule? 265 00:16:24,770 --> 00:16:28,280 You take the derivative off of u, 266 00:16:28,280 --> 00:16:31,600 you put it onto the other one just what we hope for, 267 00:16:31,600 --> 00:16:34,920 and then you also have to remember 268 00:16:34,920 --> 00:16:40,290 that there is a minus sign. 269 00:16:40,290 --> 00:16:42,510 Integration by parts has a minus sign. 270 00:16:42,510 --> 00:16:44,750 And usually you'd see it out there 271 00:16:44,750 --> 00:16:49,090 but here I've left more room for it there. 272 00:16:49,090 --> 00:16:54,290 So I have identified now A transpose w. 273 00:16:54,290 --> 00:16:59,990 A transpose w has-- If this is Au, inner product with w, 274 00:16:59,990 --> 00:17:02,950 then this is u inner product with A transpose w, 275 00:17:02,950 --> 00:17:04,490 it had to be what was. 276 00:17:04,490 --> 00:17:08,910 And so that one integration by parts brought out a minus sign. 277 00:17:08,910 --> 00:17:10,890 If I was looking at second derivatives 278 00:17:10,890 --> 00:17:13,560 there would probably be somewhere two integration 279 00:17:13,560 --> 00:17:17,430 by parts; I'd have minus twice, I'd be back to plus. 280 00:17:17,430 --> 00:17:20,510 And you're going to ask about boundary conditions. 281 00:17:20,510 --> 00:17:22,910 And you're right to ask about boundary conditions. 282 00:17:22,910 --> 00:17:26,680 I even circled that, because that is so important. 283 00:17:26,680 --> 00:17:33,200 So what we've done so far is to get the interior 284 00:17:33,200 --> 00:17:35,670 of the interval right. 285 00:17:35,670 --> 00:17:39,140 Between zero and one, if A is the derivative, 286 00:17:39,140 --> 00:17:42,020 then A transpose is minus the derivative. 287 00:17:42,020 --> 00:17:43,750 That's all we've done. 288 00:17:43,750 --> 00:17:46,290 We have not got the boundary conditions yet. 289 00:17:46,290 --> 00:17:50,490 And we can't go on without that. 290 00:17:50,490 --> 00:17:53,470 OK, so I'm ready now to say something 291 00:17:53,470 --> 00:17:57,110 about boundary conditions. 292 00:17:57,110 --> 00:18:00,660 And it will bring up this square versus rectangular also. 293 00:18:00,660 --> 00:18:04,660 294 00:18:04,660 --> 00:18:07,940 We're getting the rules straight before we 295 00:18:07,940 --> 00:18:09,820 tackle finite elements. 296 00:18:09,820 --> 00:18:15,090 OK, let me take an example of a matrix and its transpose. 297 00:18:15,090 --> 00:18:18,800 Just so you see how boundary conditions-- Suppose 298 00:18:18,800 --> 00:18:23,130 I have a free-fixed problem. 299 00:18:23,130 --> 00:18:26,840 Suppose I have a free-fixed line of springs. 300 00:18:26,840 --> 00:18:30,470 What's the matrix A for that? 301 00:18:30,470 --> 00:18:32,830 Well-- Question? 302 00:18:32,830 --> 00:18:33,330 Yes. 303 00:18:33,330 --> 00:18:36,480 AUDIENCE: [INAUDIBLE] 304 00:18:36,480 --> 00:18:37,740 PROFESSOR STRANG: Yeah. 305 00:18:37,740 --> 00:18:44,770 That's-- Yes, when I learned it, it was also that stupid trick. 306 00:18:44,770 --> 00:18:50,036 So you would like me to put plus, can I put plus, whatever. 307 00:18:50,036 --> 00:18:51,410 What do you want me to call that? 308 00:18:51,410 --> 00:18:52,640 An integrated term? 309 00:18:52,640 --> 00:18:54,490 It would be, yeah. 310 00:18:54,490 --> 00:18:55,910 I even remember what it is. 311 00:18:55,910 --> 00:19:03,170 As you do better than me. u times w at the, is that good? 312 00:19:03,170 --> 00:19:06,860 Yeah, I think. 313 00:19:06,860 --> 00:19:11,530 So it's really this part that I'm now coming to. 314 00:19:11,530 --> 00:19:14,090 It's the boundary part that I'm now coming to. 315 00:19:14,090 --> 00:19:18,630 And let me say, so I'm glad you asked that question 316 00:19:18,630 --> 00:19:21,500 because I made it seem unimportant, 317 00:19:21,500 --> 00:19:23,360 where that's not true at all. 318 00:19:23,360 --> 00:19:27,400 The boundary condition is part of the definition of A, 319 00:19:27,400 --> 00:19:30,000 and part of the definition of A transpose. 320 00:19:30,000 --> 00:19:33,830 Just the way, I'm about to say free-fixed, 321 00:19:33,830 --> 00:19:38,350 I had to tell you that for you to know what A was. 322 00:19:38,350 --> 00:19:40,570 Until I tell you the boundary condition, 323 00:19:40,570 --> 00:19:42,410 you don't know what the boundary rows are. 324 00:19:42,410 --> 00:19:45,900 You only know the inside of the matrix. 325 00:19:45,900 --> 00:19:47,880 Or one possible inside. 326 00:19:47,880 --> 00:19:49,790 So I'm thinking my inside is going 327 00:19:49,790 --> 00:19:53,120 to be minus one, one; minus one, one; 328 00:19:53,120 --> 00:19:59,770 so on, as giving me finite differences. 329 00:19:59,770 --> 00:20:01,750 Minus one, one. 330 00:20:01,750 --> 00:20:03,850 But. 331 00:20:03,850 --> 00:20:04,570 Oh no, let's see. 332 00:20:04,570 --> 00:20:07,467 So I'm doing free-fixed. 333 00:20:07,467 --> 00:20:08,050 Is that right? 334 00:20:08,050 --> 00:20:10,390 Am I doing free-fixed? 335 00:20:10,390 --> 00:20:16,360 OK, so am I taking free at the left end? 336 00:20:16,360 --> 00:20:17,170 Yes. 337 00:20:17,170 --> 00:20:19,600 Alright, so if I'm free at the left 338 00:20:19,600 --> 00:20:23,840 and fixed at the right end, what's my A? 339 00:20:23,840 --> 00:20:27,320 We're getting better at this, right? 340 00:20:27,320 --> 00:20:28,700 Minus one, one. 341 00:20:28,700 --> 00:20:29,660 Minus one, one. 342 00:20:29,660 --> 00:20:30,610 Minus one, one. 343 00:20:30,610 --> 00:20:37,080 Minus one, and the one here gets chopped off. 344 00:20:37,080 --> 00:20:40,250 You could say if you want the fifth row of A_0, 345 00:20:40,250 --> 00:20:44,750 remembering A_0 as the hint on the quiz, where 346 00:20:44,750 --> 00:20:48,570 it had five rows for the full thing, free-free. 347 00:20:48,570 --> 00:20:55,920 And then when an end got fixed, the fifth column got removed, 348 00:20:55,920 --> 00:20:59,470 and that's my free-fixed matrix. 349 00:20:59,470 --> 00:21:02,180 At the left hand end, at the zero end, 350 00:21:02,180 --> 00:21:04,282 it's got the difference in there. 351 00:21:04,282 --> 00:21:05,740 Difference, difference, difference. 352 00:21:05,740 --> 00:21:08,870 But here at the right-hand end, it's 353 00:21:08,870 --> 00:21:12,030 the fixing, the setting u, whatever it would be, 354 00:21:12,030 --> 00:21:17,110 u_5 to zero, or maybe it's u_4. if this is u nought, one, two, 355 00:21:17,110 --> 00:21:17,980 three. 356 00:21:17,980 --> 00:21:20,820 Setting u_4 to zero knocked that out. 357 00:21:20,820 --> 00:21:22,520 OK. 358 00:21:22,520 --> 00:21:26,130 All I want to do is transpose that. 359 00:21:26,130 --> 00:21:30,350 And you'll see something that we maybe didn't notice before. 360 00:21:30,350 --> 00:21:32,440 So I transpose it, that's minus one, 361 00:21:32,440 --> 00:21:36,270 one becomes a column, minus one, one becomes a column. 362 00:21:36,270 --> 00:21:38,480 Minus one, one becomes a column. 363 00:21:38,480 --> 00:21:41,390 Minus one, all there is. 364 00:21:41,390 --> 00:21:50,570 That row becomes, so this was, so-- Have I got it right? 365 00:21:50,570 --> 00:21:52,140 Yes. 366 00:21:52,140 --> 00:21:55,730 What's happened? 367 00:21:55,730 --> 00:21:58,370 A transpose, what are the boundary conditions 368 00:21:58,370 --> 00:22:00,930 going with A transpose? 369 00:22:00,930 --> 00:22:03,120 The boundary conditions that went with A 370 00:22:03,120 --> 00:22:06,120 were, let me say first, what were 371 00:22:06,120 --> 00:22:08,590 the boundary conditions with A? 372 00:22:08,590 --> 00:22:12,140 Those are going to be boundary conditions on u. 373 00:22:12,140 --> 00:22:19,600 So A has boundary conditions on u. 374 00:22:19,600 --> 00:22:26,340 And A transpose has boundary conditions on w. 375 00:22:26,340 --> 00:22:31,130 Because A transpose acts on w, and A acts on u. 376 00:22:31,130 --> 00:22:33,820 So there was no choice. 377 00:22:33,820 --> 00:22:36,230 So now what was the boundary condition here? 378 00:22:36,230 --> 00:22:40,300 The boundary condition was u_4=0, right? 379 00:22:40,300 --> 00:22:44,730 That was what I meant by that guy getting fixed. 380 00:22:44,730 --> 00:22:49,450 Now-- And no boundary condition at u_0, it was free. 381 00:22:49,450 --> 00:22:51,020 Now, what are the boundary conditions 382 00:22:51,020 --> 00:22:52,800 that go with A transpose? 383 00:22:52,800 --> 00:22:55,410 And remember, A transpose is multiplying w. 384 00:22:55,410 --> 00:22:59,550 I'm going to put w here, so what are the boundary conditions 385 00:22:59,550 --> 00:23:02,990 that go with A transpose? 386 00:23:02,990 --> 00:23:05,830 This thing, nothing got knocked off. 387 00:23:05,830 --> 00:23:09,220 The boundary condition came up here for A transpose, 388 00:23:09,220 --> 00:23:13,940 the boundary condition was w_0=0. 389 00:23:13,940 --> 00:23:21,290 That got knocked out, w_0 to be zero. 390 00:23:21,290 --> 00:23:22,230 No surprise. 391 00:23:22,230 --> 00:23:25,800 Free-fixed, this is the free end at the left, 392 00:23:25,800 --> 00:23:29,000 this is the fixed end at the right. 393 00:23:29,000 --> 00:23:32,720 Did you ever notice that the matrix does it for you? 394 00:23:32,720 --> 00:23:37,110 I mean, when you transpose that matrix it just automatically 395 00:23:37,110 --> 00:23:43,780 built in the correct boundary conditions on w by, 396 00:23:43,780 --> 00:23:48,130 you started with the conditions on u, you transpose the matrix 397 00:23:48,130 --> 00:23:51,700 and you've discovered what the boundary conditions on w are. 398 00:23:51,700 --> 00:23:58,910 And I'm going to do the same for the continuous problem. 399 00:23:58,910 --> 00:24:01,360 I'm going to do the same for the continuous problem, so 400 00:24:01,360 --> 00:24:04,980 the continuous free-fixed. 401 00:24:04,980 --> 00:24:08,250 402 00:24:08,250 --> 00:24:14,410 OK, what's the boundary condition on u? 403 00:24:14,410 --> 00:24:17,930 If it's free-fixed, I just want you to repeat this, 404 00:24:17,930 --> 00:24:21,160 on the interval zero to one for functions 405 00:24:21,160 --> 00:24:24,380 u(x), w(x) instead of for vectors. 406 00:24:24,380 --> 00:24:26,240 What's the boundary condition on u, 407 00:24:26,240 --> 00:24:30,010 if I have a free-fixed problem? u(1)=0. 408 00:24:30,010 --> 00:24:35,120 409 00:24:35,120 --> 00:24:38,860 u of one equals zero. 410 00:24:38,860 --> 00:24:40,280 So this is the boundary conditions 411 00:24:40,280 --> 00:24:42,960 that goes with A in the free-fixed case. 412 00:24:42,960 --> 00:24:54,710 And this is part of A. That is part 413 00:24:54,710 --> 00:25:00,440 of A. I don't know what A is until I know its boundary 414 00:25:00,440 --> 00:25:01,260 condition. 415 00:25:01,260 --> 00:25:04,269 Just the way I don't know what this matrix is. 416 00:25:04,269 --> 00:25:05,810 It could have been A_0, it could have 417 00:25:05,810 --> 00:25:08,720 lost one column, it could have lost two columns, whatever. 418 00:25:08,720 --> 00:25:12,830 I don't know until I've told you the boundary condition on u. 419 00:25:12,830 --> 00:25:16,800 And then transposing is going to tell me, automatically, 420 00:25:16,800 --> 00:25:19,950 without any further input, the boundary condition that 421 00:25:19,950 --> 00:25:21,890 goes on the adjoint. 422 00:25:21,890 --> 00:25:25,110 So what's the boundary condition on w that 423 00:25:25,110 --> 00:25:28,160 goes as part of A transpose? 424 00:25:28,160 --> 00:25:30,940 Well, you're going to tell me. 425 00:25:30,940 --> 00:25:36,590 Tell me. w(0) should be zero. 426 00:25:36,590 --> 00:25:39,650 It came out automatically, naturally. 427 00:25:39,650 --> 00:25:43,940 This is a big distinction between boundary conditions. 428 00:25:43,940 --> 00:25:48,080 I would call that an essential boundary condition. 429 00:25:48,080 --> 00:25:51,350 I had to start with it, I had to decide on that. 430 00:25:51,350 --> 00:25:54,290 And then this, I call a natural boundary condition. 431 00:25:54,290 --> 00:25:58,110 Or there are even two guys' names, 432 00:25:58,110 --> 00:26:01,580 which are associated with these two types. 433 00:26:01,580 --> 00:26:05,260 So maybe a first chance to just mention these names. 434 00:26:05,260 --> 00:26:10,050 Because you'll often see, reading some paper, 435 00:26:10,050 --> 00:26:15,840 maybe a little on the mathematical side, 436 00:26:15,840 --> 00:26:18,060 you'll see that word used. 437 00:26:18,060 --> 00:26:20,870 The guy's name with this sort of boundary condition 438 00:26:20,870 --> 00:26:22,730 is a French name. 439 00:26:22,730 --> 00:26:25,720 Not so easy to say, Dirichlet. 440 00:26:25,720 --> 00:26:28,340 I'll say it more often in the future. 441 00:26:28,340 --> 00:26:33,020 Anyway, I would call that a Dirichlet condition and you 442 00:26:33,020 --> 00:26:35,160 would say it's a fixed boundary condition. 443 00:26:35,160 --> 00:26:37,310 And if you were doing heat flow you 444 00:26:37,310 --> 00:26:39,270 would say it's a fixed temperature. 445 00:26:39,270 --> 00:26:40,290 Whatever. 446 00:26:40,290 --> 00:26:45,990 Fixed, is really the word to remember there. 447 00:26:45,990 --> 00:26:51,460 OK, and then I guess I better give Germany a shot here, too. 448 00:26:51,460 --> 00:26:55,580 So the natural boundary condition 449 00:26:55,580 --> 00:27:04,520 is associated with the name of Neumann. 450 00:27:04,520 --> 00:27:09,960 So if I said a Dirichlet problem, a total Dirichlet 451 00:27:09,960 --> 00:27:13,290 problem, I would be speaking about fixed-fixed. 452 00:27:13,290 --> 00:27:15,410 And if I spoke about a Neumann problem 453 00:27:15,410 --> 00:27:17,710 I would be talking about free-free. 454 00:27:17,710 --> 00:27:22,650 And this problem is Dirichlet at one end, Neumann at the other. 455 00:27:22,650 --> 00:27:26,340 Anyway, so essential and natural. 456 00:27:26,340 --> 00:27:28,980 And now of course I'm hoping that that's 457 00:27:28,980 --> 00:27:38,300 going to make this boundary term go away. 458 00:27:38,300 --> 00:27:41,010 OK, now I'm paying attention to this thing 459 00:27:41,010 --> 00:27:43,070 that you made me write. uw. 460 00:27:43,070 --> 00:27:46,120 OK, what happens there? 461 00:27:46,120 --> 00:27:48,280 uw? 462 00:27:48,280 --> 00:27:52,240 Oh, right this isn't bad because it 463 00:27:52,240 --> 00:27:54,800 shows that there's a-- Boundary condition, 464 00:27:54,800 --> 00:27:59,400 I've got some little deals going with them 465 00:27:59,400 --> 00:28:06,550 But do you see that that becomes zero? 466 00:28:06,550 --> 00:28:10,170 Why is it zero at the top end, at one? 467 00:28:10,170 --> 00:28:14,720 When I take u times w at one, why do I get zero? 468 00:28:14,720 --> 00:28:17,920 Because u(1) is zero. 469 00:28:17,920 --> 00:28:18,820 Good. 470 00:28:18,820 --> 00:28:20,540 And at the bottom end. 471 00:28:20,540 --> 00:28:25,730 When I take uw at the other boundary, why do I get zero? 472 00:28:25,730 --> 00:28:27,500 Because of w. 473 00:28:27,500 --> 00:28:30,780 You see that w was needed. 474 00:28:30,780 --> 00:28:35,350 That w(0) was needed because there was no controlling u(0). 475 00:28:35,350 --> 00:28:38,260 I had no control of u at the left-hand end, 476 00:28:38,260 --> 00:28:39,990 because it was free. 477 00:28:39,990 --> 00:28:43,290 So the control has to come from w. 478 00:28:43,290 --> 00:28:46,360 And so w naturally had to be zero, 479 00:28:46,360 --> 00:28:51,650 because I wasn't controlling u at that left-hand, free end. 480 00:28:51,650 --> 00:28:58,140 So one way or the other, the integration by parts 481 00:28:58,140 --> 00:28:59,970 is the key. 482 00:28:59,970 --> 00:29:07,320 So that's said what I critically wanted 483 00:29:07,320 --> 00:29:13,240 to say about transposing, taking the adjoint, 484 00:29:13,240 --> 00:29:16,800 except I was just going to add a comment about this square A 485 00:29:16,800 --> 00:29:20,270 versus rectangular. 486 00:29:20,270 --> 00:29:24,040 And this was a case of square, right? 487 00:29:24,040 --> 00:29:26,455 This was a case, this free-fixed case, 488 00:29:26,455 --> 00:29:29,480 this example I happened to pick was square. 489 00:29:29,480 --> 00:29:32,680 A_0, the free-free guy that was a hint on the quiz, 490 00:29:32,680 --> 00:29:34,090 was rectangular. 491 00:29:34,090 --> 00:29:37,550 The fixed-fixed, which was also on the quiz, 492 00:29:37,550 --> 00:29:40,120 was also rectangular. 493 00:29:40,120 --> 00:29:44,120 It was what, four by three or something. 494 00:29:44,120 --> 00:29:47,990 This A is four by four. 495 00:29:47,990 --> 00:29:57,410 And what is especially nice when it's square? 496 00:29:57,410 --> 00:30:00,540 If our problem happens to give a square matrix, 497 00:30:00,540 --> 00:30:04,770 in the truss case if the number of displacement unknowns 498 00:30:04,770 --> 00:30:09,410 happens to equal the number of bars, so m equals n, 499 00:30:09,410 --> 00:30:14,870 I have a square matrix A. And this guy's invertible, so it's 500 00:30:14,870 --> 00:30:16,070 all good. 501 00:30:16,070 --> 00:30:18,780 Oh, that's maybe the whole point. 502 00:30:18,780 --> 00:30:20,890 That if it's rectangular I wouldn't 503 00:30:20,890 --> 00:30:22,620 talk about its inverse. 504 00:30:22,620 --> 00:30:27,900 But this is a square matrix, so A itself has an inverse. 505 00:30:27,900 --> 00:30:30,790 Instead of having, as I usually have, 506 00:30:30,790 --> 00:30:34,170 to deal with A transpose C A all at once, 507 00:30:34,170 --> 00:30:40,390 let me put this comment because it's just a small one up here. 508 00:30:40,390 --> 00:30:41,760 Right under these words. 509 00:30:41,760 --> 00:30:43,910 Square versus rectangular. 510 00:30:43,910 --> 00:30:49,410 Square A, and let's say invertible, 511 00:30:49,410 --> 00:30:51,370 otherwise we're in the unstable case, 512 00:30:51,370 --> 00:30:55,690 so you know what I mean, in the network 513 00:30:55,690 --> 00:31:02,670 problems the number of nodes matches the number of edges? 514 00:31:02,670 --> 00:31:10,410 In the spring problem we have free-fixed situations. 515 00:31:10,410 --> 00:31:12,660 Anyway, A comes out square. 516 00:31:12,660 --> 00:31:15,940 Whatever the application. 517 00:31:15,940 --> 00:31:19,400 If it comes out square, what is especially good? 518 00:31:19,400 --> 00:31:21,170 It comes out square, what's especially 519 00:31:21,170 --> 00:31:23,790 good is that it has an inverse. 520 00:31:23,790 --> 00:31:30,270 So that in this square case, this K inverse is A transpose C 521 00:31:30,270 --> 00:31:35,260 A inverse, can be split. 522 00:31:35,260 --> 00:31:40,300 This allows us to separate, to do what 523 00:31:40,300 --> 00:31:45,740 you better not do otherwise. 524 00:31:45,740 --> 00:31:48,550 In other words, we-- Our three steps, 525 00:31:48,550 --> 00:31:52,550 which usually mash together and we can't separate them 526 00:31:52,550 --> 00:31:55,270 and we have to deal with the whole matrix at once. 527 00:31:55,270 --> 00:31:58,940 In this square case, they do separate. 528 00:31:58,940 --> 00:32:02,000 And so that's worth noticing. 529 00:32:02,000 --> 00:32:09,280 It means that we can solve backwards, 530 00:32:09,280 --> 00:32:13,490 we can solve these three one at a time. 531 00:32:13,490 --> 00:32:15,940 The inverses can be done separately. 532 00:32:15,940 --> 00:32:19,170 When A and A transpose are square, 533 00:32:19,170 --> 00:32:23,050 then from this equation I can find w. 534 00:32:23,050 --> 00:32:25,630 From knowing w I can find e, just 535 00:32:25,630 --> 00:32:29,010 by inverting C. By knowing e I can find u, 536 00:32:29,010 --> 00:32:32,030 just by inverting A. You see the three steps? 537 00:32:32,030 --> 00:32:35,330 You could invert that, and then you can invert the middle step, 538 00:32:35,330 --> 00:32:37,920 and you can invert A. And you've got u. 539 00:32:37,920 --> 00:32:41,540 So the square case is worth noticing. 540 00:32:41,540 --> 00:32:46,450 It's special enough that in this case 541 00:32:46,450 --> 00:32:48,600 we would have an easy problem. 542 00:32:48,600 --> 00:32:54,790 And this case is called, for trusses and mechanics, 543 00:32:54,790 --> 00:32:55,840 there's a name for this. 544 00:32:55,840 --> 00:32:57,870 And unfortunately it's a little long. 545 00:32:57,870 --> 00:33:01,600 Statically, that's not the key word, 546 00:33:01,600 --> 00:33:07,280 determinate is the key word. 547 00:33:07,280 --> 00:33:13,380 Statically determinate, that goes with square. 548 00:33:13,380 --> 00:33:16,490 And you can guess what the rectangular matrix A, 549 00:33:16,490 --> 00:33:19,740 what word would I use, what's the opposite of determinate? 550 00:33:19,740 --> 00:33:23,420 It's got to be indeterminate. 551 00:33:23,420 --> 00:33:26,590 Rectangular A will be indeterminate. 552 00:33:26,590 --> 00:33:30,000 And all that is referring to is the fact 553 00:33:30,000 --> 00:33:40,980 that in the determinate case the forces determine the stresses. 554 00:33:40,980 --> 00:33:44,830 You don't have to take that, get all three 555 00:33:44,830 --> 00:33:48,280 together, mix them, invert, go backwards. 556 00:33:48,280 --> 00:33:48,780 All that. 557 00:33:48,780 --> 00:33:53,450 You just can do them one at the time in this determinate case. 558 00:33:53,450 --> 00:33:58,090 And now I guess I'd better say, so here's the matrix case. 559 00:33:58,090 --> 00:34:02,710 But now in this chapter I always have to do the continuous part. 560 00:34:02,710 --> 00:34:08,990 So let me just stay with free-fixed, 561 00:34:08,990 --> 00:34:11,690 what is this balance equation? 562 00:34:11,690 --> 00:34:17,590 So this is my force balance. 563 00:34:17,590 --> 00:34:23,680 I didn't give it its moment but its moment has come now. 564 00:34:23,680 --> 00:34:27,800 So the force balance equation is -dw/dx, 565 00:34:27,800 --> 00:34:30,050 because A transpose is minus a derivative, equal f(x). 566 00:34:30,050 --> 00:34:37,540 And my free boundary condition, my free end, 567 00:34:37,540 --> 00:34:43,170 gave me w of what was it? 568 00:34:43,170 --> 00:34:46,150 The Neumann guy gave me w(0)=0. 569 00:34:46,150 --> 00:34:49,270 570 00:34:49,270 --> 00:34:52,430 And what's the point? 571 00:34:52,430 --> 00:34:54,030 Do you see what I'm saying? 572 00:34:54,030 --> 00:34:57,940 I'm saying that this free-fixed is a beautiful example 573 00:34:57,940 --> 00:34:59,840 of determinate. 574 00:34:59,840 --> 00:35:03,110 Square matrix A in the matrix case 575 00:35:03,110 --> 00:35:07,285 and the parallel in the continuous case 576 00:35:07,285 --> 00:35:09,480 is-- I can solve that for w(x). 577 00:35:09,480 --> 00:35:12,040 578 00:35:12,040 --> 00:35:14,690 I can solve directly for w(x). 579 00:35:14,690 --> 00:35:18,650 580 00:35:18,650 --> 00:35:24,920 Without involving, you see I didn't have to know c(x). 581 00:35:24,920 --> 00:35:26,740 I hadn't even got that far. 582 00:35:26,740 --> 00:35:28,890 I'm just going backwards now. 583 00:35:28,890 --> 00:35:35,200 I can solve this, just the way I can invert that matrix. 584 00:35:35,200 --> 00:35:39,040 Inverting the matrix here is the same as solving the equation. 585 00:35:39,040 --> 00:35:41,420 You see I have a first order, first derivative? 586 00:35:41,420 --> 00:35:44,750 I mean, it's a trivial equation, right? 587 00:35:44,750 --> 00:35:48,350 It's the equation you solved in the final problem of the quiz, 588 00:35:48,350 --> 00:35:50,370 where an f was a delta function. 589 00:35:50,370 --> 00:35:55,670 It was simple because it was a square, determinate problem 590 00:35:55,670 --> 00:35:58,890 with one condition on w. 591 00:35:58,890 --> 00:36:08,330 When both conditions are on u, then it's not square any more. 592 00:36:08,330 --> 00:36:10,760 OK for that point? 593 00:36:10,760 --> 00:36:13,170 Determinate versus indeterminate. 594 00:36:13,170 --> 00:36:14,020 OK. 595 00:36:14,020 --> 00:36:19,170 So that's sort of, and I could do examples. 596 00:36:19,170 --> 00:36:20,750 Maybe I've asked you on the homework 597 00:36:20,750 --> 00:36:23,080 to take a particular f(x). 598 00:36:23,080 --> 00:36:25,120 I hope it was a free-fixed problem, 599 00:36:25,120 --> 00:36:28,960 if I was feeling good that day, because free-fixed you'll 600 00:36:28,960 --> 00:36:31,430 be able to get w(x) right away. 601 00:36:31,430 --> 00:36:34,070 If it was fixed-fixed then I apologize, 602 00:36:34,070 --> 00:36:39,130 it's going to take you a little bit longer to get to w. 603 00:36:39,130 --> 00:36:41,490 To get to u. 604 00:36:41,490 --> 00:36:41,990 OK. 605 00:36:41,990 --> 00:36:47,920 But this, of course, I just integrate. 606 00:36:47,920 --> 00:36:55,110 Inverting a difference matrix is just integrating a function. 607 00:36:55,110 --> 00:36:56,040 Good. 608 00:36:56,040 --> 00:37:03,150 OK, so this lecture so far was the transition 609 00:37:03,150 --> 00:37:09,380 from vectors and matrices to functions 610 00:37:09,380 --> 00:37:11,130 and continuous problems. 611 00:37:11,130 --> 00:37:13,760 And then, of course we're going to get deep 612 00:37:13,760 --> 00:37:18,260 into that because we got partial differential equations ahead. 613 00:37:18,260 --> 00:37:21,810 But today let's stay in one dimension 614 00:37:21,810 --> 00:37:23,220 and introduce finite elements. 615 00:37:23,220 --> 00:37:26,710 OK. 616 00:37:26,710 --> 00:37:34,000 Ready for finite elements, so that's now a major step. 617 00:37:34,000 --> 00:37:38,040 Finite differences, maybe I'll mention this, probably 618 00:37:38,040 --> 00:37:41,550 in this afternoon's review session, where I'll just 619 00:37:41,550 --> 00:37:43,070 be open to homework problems. 620 00:37:43,070 --> 00:37:46,430 I'll say something more about truss examples, 621 00:37:46,430 --> 00:37:50,070 and I might say something about finite differences for this. 622 00:37:50,070 --> 00:37:55,620 But really, it's finite elements that get introduced right now. 623 00:37:55,620 --> 00:37:57,790 So let me do that. 624 00:37:57,790 --> 00:38:02,690 Finite elements and introducing them. 625 00:38:02,690 --> 00:38:06,290 OK. 626 00:38:06,290 --> 00:38:09,690 So the prep, the getting ready for finite elements 627 00:38:09,690 --> 00:38:12,120 is to get hold of something called 628 00:38:12,120 --> 00:38:23,040 the weak form of the equation. 629 00:38:23,040 --> 00:38:28,150 So that's going to be a statement of the-- Finite 630 00:38:28,150 --> 00:38:30,740 elements aren't appearing yet. 631 00:38:30,740 --> 00:38:32,700 Matrices are not appearing yet. 632 00:38:32,700 --> 00:38:38,090 I'm talking about the differential equation. 633 00:38:38,090 --> 00:38:41,340 But what do I mean by this weak form? 634 00:38:41,340 --> 00:38:44,680 OK, let me just go for it directly. 635 00:38:44,680 --> 00:38:46,310 You see the equation up there? 636 00:38:46,310 --> 00:38:47,420 Let me copy it. 637 00:38:47,420 --> 00:38:52,360 So here's the strong form. 638 00:38:52,360 --> 00:38:55,770 The strong form is, you would say, the ordinary equation. 639 00:38:55,770 --> 00:39:00,280 Strong form is what our equation is, minus 640 00:39:00,280 --> 00:39:11,730 d/dx of c(x) du/dx equal f(x). 641 00:39:11,730 --> 00:39:14,180 OK, that's the strong form. 642 00:39:14,180 --> 00:39:15,650 That's the equation. 643 00:39:15,650 --> 00:39:19,110 Now, how do I get to the weak form? 644 00:39:19,110 --> 00:39:23,310 Let me just go to it directly and then over the next days 645 00:39:23,310 --> 00:39:27,330 we'll see why it's so natural and important. 646 00:39:27,330 --> 00:39:31,390 If I go for it directly, what I do is this. 647 00:39:31,390 --> 00:39:35,350 I multiply both sides of the equation by something 648 00:39:35,350 --> 00:39:37,340 I'll call a test function. 649 00:39:37,340 --> 00:39:39,370 And I'll try to systematically use 650 00:39:39,370 --> 00:39:43,090 the letter v for the test function. u will 651 00:39:43,090 --> 00:39:48,880 be the solution. v isn't the solution, 652 00:39:48,880 --> 00:39:54,440 v is like any function that I test this equation in this way. 653 00:39:54,440 --> 00:39:58,320 I'm just multiplying both sides by the same thing, some v(x). 654 00:39:58,320 --> 00:40:00,570 Any v(x). 655 00:40:00,570 --> 00:40:03,360 We'll see if there are any limitations, OK? 656 00:40:03,360 --> 00:40:14,450 And I integrate. 657 00:40:14,450 --> 00:40:15,980 OK. 658 00:40:15,980 --> 00:40:18,910 So you're going to say nope, no problem. 659 00:40:18,910 --> 00:40:22,240 I integrate from zero to one. 660 00:40:22,240 --> 00:40:30,730 Alright, this would be true for f. 661 00:40:30,730 --> 00:40:34,050 So now I'll erase the word strong form, 662 00:40:34,050 --> 00:40:37,500 because the strong form isn't on the board anymore. 663 00:40:37,500 --> 00:40:40,110 It's the weak form now that we're looking at. 664 00:40:40,110 --> 00:40:44,250 And this is for any, and I'll put "any" in quotes 665 00:40:44,250 --> 00:40:51,690 just because eventually I'll say a little more about this. 666 00:40:51,690 --> 00:40:56,470 I'll write the equation this way. 667 00:40:56,470 --> 00:41:04,830 And you might think, OK, if this has to hold for every v(x), 668 00:41:04,830 --> 00:41:09,370 I could let v(x) be concentrated in a little area. 669 00:41:09,370 --> 00:41:11,090 And this would have to hold, then 670 00:41:11,090 --> 00:41:13,650 I could try another v(x), concentrated 671 00:41:13,650 --> 00:41:16,130 around other points. 672 00:41:16,130 --> 00:41:23,360 You can maybe feel that if this holds for every v(x), 673 00:41:23,360 --> 00:41:25,950 then I can get back to the strong form. 674 00:41:25,950 --> 00:41:28,640 If this holds for every v(x), then somehow 675 00:41:28,640 --> 00:41:31,310 that had better be the same as that. 676 00:41:31,310 --> 00:41:37,160 Because if this was f(x)+1 and this is f(x), 677 00:41:37,160 --> 00:41:41,650 then I wouldn't have the equality any more. 678 00:41:41,650 --> 00:41:43,200 Should I just say that again? 679 00:41:43,200 --> 00:41:46,410 It's just like, at this point it's just a feeling, 680 00:41:46,410 --> 00:41:51,370 that if this is true for every v(x), 681 00:41:51,370 --> 00:41:55,360 then that part had better equal that part. 682 00:41:55,360 --> 00:41:57,500 That'll be my way back to the strong form. 683 00:41:57,500 --> 00:41:59,610 It's a little bit like climbing a hill. 684 00:41:59,610 --> 00:42:03,690 Going downhill was easy, I just multiplied by v and integrated. 685 00:42:03,690 --> 00:42:05,500 Nobody objected to that. 686 00:42:05,500 --> 00:42:08,270 I'm saying I'll be able to get back 687 00:42:08,270 --> 00:42:11,740 to the strong form with a little patience. 688 00:42:11,740 --> 00:42:14,160 But I like the weak form. 689 00:42:14,160 --> 00:42:15,700 That's the whole point. 690 00:42:15,700 --> 00:42:19,120 You've got to begin to like the weak form. 691 00:42:19,120 --> 00:42:22,120 If you begin to take it in and think OK. 692 00:42:22,120 --> 00:42:25,270 Now, why do I like it? 693 00:42:25,270 --> 00:42:28,020 What am I going to do to that left side? 694 00:42:28,020 --> 00:42:30,100 The right side's cool, right? 695 00:42:30,100 --> 00:42:31,530 It looks good. 696 00:42:31,530 --> 00:42:35,520 Left side does not look good to me. 697 00:42:35,520 --> 00:42:38,370 When you see something like that, what do you think? 698 00:42:38,370 --> 00:42:42,310 Today's lecture has already said what to think. 699 00:42:42,310 --> 00:42:46,160 What should I do to make that look better? 700 00:42:46,160 --> 00:42:48,410 I should, yep. 701 00:42:48,410 --> 00:42:50,540 Integrate by parts. 702 00:42:50,540 --> 00:42:52,360 If I integrate by parts, you see what 703 00:42:52,360 --> 00:42:56,870 I don't like about it as it is, is two derivatives are hitting 704 00:42:56,870 --> 00:43:01,180 u, and v is by itself. 705 00:43:01,180 --> 00:43:05,370 And I want it to be symmetric. 706 00:43:05,370 --> 00:43:07,340 I'm going to integrate this by parts, 707 00:43:07,340 --> 00:43:10,090 this is minus the derivative of something. 708 00:43:10,090 --> 00:43:15,900 Times v. And when I integrate by parts, I'm going to have, 709 00:43:15,900 --> 00:43:17,450 it'll be an integral. 710 00:43:17,450 --> 00:43:19,980 And can you integrate by parts now? 711 00:43:19,980 --> 00:43:24,840 I mean, you probably haven't thought about integration 712 00:43:24,840 --> 00:43:26,120 by parts for a while. 713 00:43:26,120 --> 00:43:29,490 Just think of it as taking the derivative off of this, 714 00:43:29,490 --> 00:43:32,620 so it leaves that by itself. 715 00:43:32,620 --> 00:43:41,000 And putting it onto v, so it's dv/dx, and remembering 716 00:43:41,000 --> 00:43:43,250 the minus sign, but we have a minus sign 717 00:43:43,250 --> 00:43:45,480 so now it's coming up plus. 718 00:43:45,480 --> 00:43:46,580 That's the weak form. 719 00:43:46,580 --> 00:43:50,870 Can I put a circle around the weak form? 720 00:43:50,870 --> 00:43:53,670 Well, that wasn't exactly a circle. 721 00:43:53,670 --> 00:43:54,360 OK. 722 00:43:54,360 --> 00:43:57,880 But that's the weak form. 723 00:43:57,880 --> 00:44:01,310 For every v, this is-- I could give you 724 00:44:01,310 --> 00:44:10,040 a physical interpretation but I won't do it just this minute. 725 00:44:10,040 --> 00:44:16,210 This is going to hold for any v. That's the weak form. 726 00:44:16,210 --> 00:44:17,600 OK. 727 00:44:17,600 --> 00:44:18,650 Good. 728 00:44:18,650 --> 00:44:25,000 Now, why did I want to do that? 729 00:44:25,000 --> 00:44:29,580 The person who reminds me about boundary conditions 730 00:44:29,580 --> 00:44:31,380 should remind me again. 731 00:44:31,380 --> 00:44:33,610 That when I did this integration by parts, 732 00:44:33,610 --> 00:44:38,480 there should have been also-- What's the integrated part now, 733 00:44:38,480 --> 00:44:43,550 that has to be evaluated at zero and one? 734 00:44:43,550 --> 00:44:47,160 This c, so it's that times that, right? 735 00:44:47,160 --> 00:44:53,110 It's that c(x) du/dx times v(x). 736 00:44:53,110 --> 00:44:56,920 737 00:44:56,920 --> 00:44:57,849 Maybe minus. 738 00:44:57,849 --> 00:44:58,640 Yeah, you're right. 739 00:44:58,640 --> 00:44:59,960 Minus. 740 00:44:59,960 --> 00:45:01,070 Good. 741 00:45:01,070 --> 00:45:03,870 What do I want this to come out? 742 00:45:03,870 --> 00:45:05,550 Zero, of course. 743 00:45:05,550 --> 00:45:08,010 I don't want to think about this anymore. 744 00:45:08,010 --> 00:45:11,750 Alright, so now I'm doing this free-fixed problem still. 745 00:45:11,750 --> 00:45:16,710 So what's the deal about the free-fixed f problem? 746 00:45:16,710 --> 00:45:22,830 Well, let's see. 747 00:45:22,830 --> 00:45:26,680 OK, I got the two ends and I want them to be zero. 748 00:45:26,680 --> 00:45:36,840 OK, now at the free end, I'm not controlling 749 00:45:36,840 --> 00:45:40,130 v. I wasn't controlling u and I'm not 750 00:45:40,130 --> 00:45:43,130 going to be controlling its friend v. 751 00:45:43,130 --> 00:45:45,880 So this had to be zero. 752 00:45:45,880 --> 00:45:52,210 So this part will be zero at the free end. 753 00:45:52,210 --> 00:45:56,220 That boundary condition has just appeared again naturally. 754 00:45:56,220 --> 00:45:59,250 I had to have it because I had no control over v. 755 00:45:59,250 --> 00:46:01,830 And what about at the fixed end. 756 00:46:01,830 --> 00:46:06,930 At the fixed end, which-- Is that? 757 00:46:06,930 --> 00:46:07,650 At the free end. 758 00:46:07,650 --> 00:46:11,320 Now, what's up at the fixed end? 759 00:46:11,320 --> 00:46:13,960 What was the fixed end? 760 00:46:13,960 --> 00:46:17,230 That's where u was zero. 761 00:46:17,230 --> 00:46:20,110 I'm going to make v also zero. 762 00:46:20,110 --> 00:46:22,910 So there's, when I said any v(x), 763 00:46:22,910 --> 00:46:32,230 I better put in with v=0 at the Dirichlet point, 764 00:46:32,230 --> 00:46:37,070 at fixed point, at fixed end. 765 00:46:37,070 --> 00:46:40,050 I need that. 766 00:46:40,050 --> 00:46:44,450 I need to know that v is zero at that end. 767 00:46:44,450 --> 00:46:46,730 I had u=0. 768 00:46:46,730 --> 00:46:50,350 Here's why I'm fine. 769 00:46:50,350 --> 00:46:55,000 So I'm saying that any time I have a Dirichlet condition, 770 00:46:55,000 --> 00:46:59,030 a fixed condition that tells me u, I think of v 771 00:46:59,030 --> 00:47:02,500 and you'll begin to think of v as a little movement away 772 00:47:02,500 --> 00:47:13,170 from u. u is the solution. 773 00:47:13,170 --> 00:47:16,350 Now, remind me, this was free-fixed. 774 00:47:16,350 --> 00:47:21,030 So the u might have been something like this. 775 00:47:21,030 --> 00:47:22,600 I just draw that. 776 00:47:22,600 --> 00:47:24,140 That's my u. 777 00:47:24,140 --> 00:47:27,370 This guy was fixed, right? 778 00:47:27,370 --> 00:47:29,220 By u. 779 00:47:29,220 --> 00:47:34,050 Now, I'm thinking of v's as, the letter 780 00:47:34,050 --> 00:47:36,070 v is very fortunate because it stands 781 00:47:36,070 --> 00:47:38,310 for virtual displacement. 782 00:47:38,310 --> 00:47:41,480 A virtual displacement is a little displacement away 783 00:47:41,480 --> 00:47:46,940 from u, but it has to satisfy the zero-- the fixed condition 784 00:47:46,940 --> 00:47:48,210 that u satisfied. 785 00:47:48,210 --> 00:47:50,660 In other words, the little virtual v 786 00:47:50,660 --> 00:47:53,340 can't move away from zero. 787 00:47:53,340 --> 00:48:02,680 So I get this term is zero at the fixed end. 788 00:48:02,680 --> 00:48:07,060 OK. 789 00:48:07,060 --> 00:48:10,640 That's the little five minute time-out 790 00:48:10,640 --> 00:48:13,040 to check the boundary condition part. 791 00:48:13,040 --> 00:48:16,090 The net result is that that term's gone 792 00:48:16,090 --> 00:48:21,560 and I've got the weak form as I wanted. 793 00:48:21,560 --> 00:48:26,950 OK, three minutes to start to tell you how to 794 00:48:26,950 --> 00:48:30,400 use the weak form. 795 00:48:30,400 --> 00:48:39,620 So this is called Galerkin's method. 796 00:48:39,620 --> 00:48:50,250 And it starts with the weak form. 797 00:48:50,250 --> 00:48:51,700 So he's Russian. 798 00:48:51,700 --> 00:48:54,170 Russia gets into the picture now. 799 00:48:54,170 --> 00:48:56,770 We had France and Germany with the boundary conditions, 800 00:48:56,770 --> 00:49:00,480 now we've got Russia with this fundamental principle 801 00:49:00,480 --> 00:49:04,320 of how to turn a continuous problem 802 00:49:04,320 --> 00:49:06,730 into a discrete problem. 803 00:49:06,730 --> 00:49:09,930 That's what Galerkin's idea does. 804 00:49:09,930 --> 00:49:13,900 Instead of a function unknown I want to have n unknowns. 805 00:49:13,900 --> 00:49:18,210 I want to get a discrete equation which will eventually 806 00:49:18,210 --> 00:49:26,440 be KU=F. So I'm going to get to an equation KU=F, 807 00:49:26,440 --> 00:49:29,320 but not by finite difference, right? 808 00:49:29,320 --> 00:49:31,330 I could, but I'm not. 809 00:49:31,330 --> 00:49:36,130 I'm doing it this weak, Galerkin, finite element way. 810 00:49:36,130 --> 00:49:42,780 OK, so if I tell you the Galerkin idea then next time we 811 00:49:42,780 --> 00:49:46,370 bring in, we have libraries of finite elements. 812 00:49:46,370 --> 00:49:48,850 But you have to get the principle straight. 813 00:49:48,850 --> 00:49:51,240 So it's Galerkin's idea. 814 00:49:51,240 --> 00:50:01,220 Galerkin's idea was was choose trial functions. 815 00:50:01,220 --> 00:50:10,370 Let me call them call them u_1? 816 00:50:10,370 --> 00:50:16,360 No, I won't call them-- Have to get the names right. 817 00:50:16,360 --> 00:50:21,550 Phi. 818 00:50:21,550 --> 00:50:23,280 OK, the Greeks get a shot. 819 00:50:23,280 --> 00:50:24,000 OK. 820 00:50:24,000 --> 00:50:31,050 Trial functions, phi_1(x) up to phi_n(x). 821 00:50:31,050 --> 00:50:35,840 OK, so that's a choice you make. 822 00:50:35,840 --> 00:50:37,790 And we have a free choice. 823 00:50:37,790 --> 00:50:40,710 And it's a fundamental choice for all of applied math here. 824 00:50:40,710 --> 00:50:43,430 You choose some functions, and if you choose them well 825 00:50:43,430 --> 00:50:45,560 you get a great method, if you choose them badly 826 00:50:45,560 --> 00:50:47,010 you got a lousy method. 827 00:50:47,010 --> 00:50:49,200 OK, so you choose trial functions, 828 00:50:49,200 --> 00:50:51,120 and now what's the idea going to be? 829 00:50:51,120 --> 00:50:58,270 Your approximate U, approximate solution 830 00:50:58,270 --> 00:51:03,410 will be some combination of this. 831 00:51:03,410 --> 00:51:09,160 So combinations of those, let me call the coefficients U's, 832 00:51:09,160 --> 00:51:10,770 because those are the unknowns. 833 00:51:10,770 --> 00:51:12,590 Plus U_n*phi_n. 834 00:51:12,590 --> 00:51:15,360 835 00:51:15,360 --> 00:51:16,910 So those are the unknowns. 836 00:51:16,910 --> 00:51:23,820 The n unknowns. 837 00:51:23,820 --> 00:51:28,100 I'll even remove that for the moment. 838 00:51:28,100 --> 00:51:31,740 You see, these are functions of x. 839 00:51:31,740 --> 00:51:34,030 And these are numbers. 840 00:51:34,030 --> 00:51:38,330 So our unknown, our n unknown numbers 841 00:51:38,330 --> 00:51:41,720 are the coefficients to be decided of the functions 842 00:51:41,720 --> 00:51:43,230 we chose. 843 00:51:43,230 --> 00:51:47,260 OK, now I need n equations. 844 00:51:47,260 --> 00:51:50,500 I've got n unknowns now, they're the unknown coefficients 845 00:51:50,500 --> 00:51:52,180 of these functions. 846 00:51:52,180 --> 00:51:58,480 I need an equation so I get n equations by choose test 847 00:51:58,480 --> 00:52:08,780 functions, V_1, V_2, up to V_n. 848 00:52:08,780 --> 00:52:11,280 Each V will give me an equation. 849 00:52:11,280 --> 00:52:14,640 So I'll have n equations at the end, I have n unknowns, 850 00:52:14,640 --> 00:52:16,390 I'll have a square matrix. 851 00:52:16,390 --> 00:52:20,390 And that'll be a linear system. 852 00:52:20,390 --> 00:52:22,630 I'll get to KU=F. 853 00:52:22,630 --> 00:52:24,740 But do you see how I'm getting there? 854 00:52:24,740 --> 00:52:28,710 I'm getting there by using the weak form, 855 00:52:28,710 --> 00:52:32,180 by using Galerkin's idea of picking some trial 856 00:52:32,180 --> 00:52:35,020 functions, and some test functions, 857 00:52:35,020 --> 00:52:37,500 and putting them into the weak form. 858 00:52:37,500 --> 00:52:41,700 So Galerkin's idea is, take these functions 859 00:52:41,700 --> 00:52:43,160 and these functions. 860 00:52:43,160 --> 00:52:47,030 And apply the weak form just to those guys. 861 00:52:47,030 --> 00:52:50,420 Not to, the real weak form, the continuous weak form, 862 00:52:50,420 --> 00:52:54,910 was for a whole lot of V. We'll get n equations 863 00:52:54,910 --> 00:53:01,570 by picking n V's, and we'll get n unknowns by picking n phis. 864 00:53:01,570 --> 00:53:04,420 So this method, this idea, was a hundred years older 865 00:53:04,420 --> 00:53:06,340 than finite elements. 866 00:53:06,340 --> 00:53:11,210 The finite element idea was a particular choice 867 00:53:11,210 --> 00:53:16,250 of these guys, a particular choice of the phis 868 00:53:16,250 --> 00:53:21,900 and the V's as simple polynomials. 869 00:53:21,900 --> 00:53:24,520 And you might think well, why didn't Galerkin 870 00:53:24,520 --> 00:53:26,760 try those first, maybe he did. 871 00:53:26,760 --> 00:53:34,650 But the key is that now, with the computing power 872 00:53:34,650 --> 00:53:37,550 we now have compared to Galerkin, 873 00:53:37,550 --> 00:53:40,050 we can choose thousands of functions. 874 00:53:40,050 --> 00:53:41,770 If we keep them simple. 875 00:53:41,770 --> 00:53:46,330 So that's really what the finite element brought, 876 00:53:46,330 --> 00:53:49,440 finite element brought is, keep the functions 877 00:53:49,440 --> 00:53:53,440 as simple polynomials and take many of them. 878 00:53:53,440 --> 00:53:56,610 Where Galerkin, who didn't have MATLAB, 879 00:53:56,610 --> 00:54:00,580 he probably didn't even have a desk computer, 880 00:54:00,580 --> 00:54:04,130 he used pencil and paper, he took one function. 881 00:54:04,130 --> 00:54:05,620 Or maybe two. 882 00:54:05,620 --> 00:54:08,820 I mean, that took him a day. 883 00:54:08,820 --> 00:54:12,740 But we take thousands of functions, simple functions, 884 00:54:12,740 --> 00:54:17,840 and we'll see on Friday the steps that get us to KU=F. 885 00:54:17,840 --> 00:54:21,280 So this is the prep for finite elements.