1 00:00:00,000 --> 00:00:00,030 2 00:00:00,030 --> 00:00:02,330 The following content is provided under a Creative 3 00:00:02,330 --> 00:00:03,610 Commons license. 4 00:00:03,610 --> 00:00:05,770 Your support will help MIT OpenCourseWare 5 00:00:05,770 --> 00:00:10,050 continue to offer high quality educational resources for free. 6 00:00:10,050 --> 00:00:12,530 To make a donation or to view additional materials 7 00:00:12,530 --> 00:00:16,150 from hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:16,150 --> 00:00:21,200 at ocw.mit.edu. 9 00:00:21,200 --> 00:00:22,590 PROFESSOR STRANG: OK. 10 00:00:22,590 --> 00:00:23,090 All right. 11 00:00:23,090 --> 00:00:24,630 Good morning. 12 00:00:24,630 --> 00:00:32,120 So we're doing finite elements. 13 00:00:32,120 --> 00:00:34,380 The element that we considered so far 14 00:00:34,380 --> 00:00:38,500 was the basic linear element. 15 00:00:38,500 --> 00:00:42,590 Continuous, but of course, the slopes have jumps. 16 00:00:42,590 --> 00:00:47,790 The slope was minus one over delta x for that one. 17 00:00:47,790 --> 00:00:50,070 This one was a plus and then a minus. 18 00:00:50,070 --> 00:00:53,700 So a jump in slope but no jump in the function. 19 00:00:53,700 --> 00:00:56,920 So actually, my abbreviation for that 20 00:00:56,920 --> 00:01:03,030 would be C zero, saying that it's continuous 21 00:01:03,030 --> 00:01:05,890 but no derivative is continuous. 22 00:01:05,890 --> 00:01:08,280 And now we'll get to some elements 23 00:01:08,280 --> 00:01:11,350 where the slope is continuous. 24 00:01:11,350 --> 00:01:16,970 It's sort of fun to create these finite elements of higher 25 00:01:16,970 --> 00:01:18,520 degree. 26 00:01:18,520 --> 00:01:20,990 It's pretty straightforward in 1-D. 27 00:01:20,990 --> 00:01:24,580 And that's where we are now. 28 00:01:24,580 --> 00:01:27,170 So we'll get second degree elements and third degree 29 00:01:27,170 --> 00:01:28,020 elements. 30 00:01:28,020 --> 00:01:31,530 And that gives us, as we'll see, higher accuracy. 31 00:01:31,530 --> 00:01:35,530 So I want to connect the degree of the polynomials 32 00:01:35,530 --> 00:01:41,820 to the accuracy of the approximation. 33 00:01:41,820 --> 00:01:44,020 Part of that connection is to recognize 34 00:01:44,020 --> 00:01:46,950 that these problems have a strong form, as we know, 35 00:01:46,950 --> 00:01:49,770 the equation; a weak form, that's 36 00:01:49,770 --> 00:01:55,380 the one that has test functions; and also a minimum form 37 00:01:55,380 --> 00:01:58,260 that we'll see. 38 00:01:58,260 --> 00:02:03,830 So how would I get some quadratics, so second degree 39 00:02:03,830 --> 00:02:09,650 elements, parabolas, into the picture? 40 00:02:09,650 --> 00:02:11,910 You remember Galerkin's idea? 41 00:02:11,910 --> 00:02:14,270 Choose trial functions. 42 00:02:14,270 --> 00:02:17,190 And we're taking those to be the same as the test function. 43 00:02:17,190 --> 00:02:20,160 So these are the trial functions we've chosen. 44 00:02:20,160 --> 00:02:22,700 One, two, three, four of them. 45 00:02:22,700 --> 00:02:25,590 And they're linear. 46 00:02:25,590 --> 00:02:28,690 And that limits the accuracy that you can get, 47 00:02:28,690 --> 00:02:34,190 because your approximations then are combinations of those. 48 00:02:34,190 --> 00:02:37,250 So they're like broken-line functions, 49 00:02:37,250 --> 00:02:39,040 linear approximations. 50 00:02:39,040 --> 00:02:44,650 And the accuracy is not great. 51 00:02:44,650 --> 00:02:47,220 It's sort of the lowest level possible. 52 00:02:47,220 --> 00:02:53,590 So how would you get parabolas? 53 00:02:53,590 --> 00:02:56,910 So this was first guy. 54 00:02:56,910 --> 00:03:08,500 The second guy is going to be continuous and quadratic. 55 00:03:08,500 --> 00:03:10,880 So it's going to have new trial functions. 56 00:03:10,880 --> 00:03:14,300 In addition to these, I'm going to put in some more. 57 00:03:14,300 --> 00:03:16,450 Galerkin's happy with that. 58 00:03:16,450 --> 00:03:18,940 I still proceed as usual. 59 00:03:18,940 --> 00:03:22,170 My approximation is some combination of those. 60 00:03:22,170 --> 00:03:24,050 It's only going to be continuous. 61 00:03:24,050 --> 00:03:27,350 So it'll just be a C zero guy again. 62 00:03:27,350 --> 00:03:31,090 That means jump in slope. 63 00:03:31,090 --> 00:03:33,220 The first derivative isn't there. 64 00:03:33,220 --> 00:03:35,880 Eventually, I want to get to a C one 65 00:03:35,880 --> 00:03:38,080 where the slopes are continuous. 66 00:03:38,080 --> 00:03:41,970 OK, but how would I get some quadratics? 67 00:03:41,970 --> 00:03:47,970 All I want now is my functions, my space, my combinations, 68 00:03:47,970 --> 00:03:51,650 should be the piecewise parabolas 69 00:03:51,650 --> 00:03:55,590 instead of piecewise linear. 70 00:03:55,590 --> 00:04:00,450 And the pieces are broken at the nodes. 71 00:04:00,450 --> 00:04:04,370 OK, so here is a way to do it. 72 00:04:04,370 --> 00:04:08,090 Inside each interval, I'm going to add, 73 00:04:08,090 --> 00:04:10,250 I'll just call them bubble functions. 74 00:04:10,250 --> 00:04:13,200 So these will be new additional guys. 75 00:04:13,200 --> 00:04:16,930 So this will be my first phi. 76 00:04:16,930 --> 00:04:18,720 You remember that half hat? 77 00:04:18,720 --> 00:04:23,830 Because the problem I was doing was a free fixed problem. 78 00:04:23,830 --> 00:04:28,070 That's why I had a half hat at this end, 79 00:04:28,070 --> 00:04:32,330 because there was no boundary condition that my functions had 80 00:04:32,330 --> 00:04:33,900 to satisfy. 81 00:04:33,900 --> 00:04:35,560 At this end, there was. 82 00:04:35,560 --> 00:04:36,370 It was fixed. 83 00:04:36,370 --> 00:04:40,100 So that's why the hat ended, and there was no half hat, 84 00:04:40,100 --> 00:04:42,350 there's no extra function there. 85 00:04:42,350 --> 00:04:44,770 So I have right now one, two, three, four. 86 00:04:44,770 --> 00:04:48,330 I'm going to add four more bubble functions. 87 00:04:48,330 --> 00:04:51,060 Each one will be inside an interval. 88 00:04:51,060 --> 00:04:53,210 So it'll be a little parabola. 89 00:04:53,210 --> 00:04:58,250 This is function number whatever. 90 00:04:58,250 --> 00:05:02,830 If I number this number one, let's say, phi_1, now -- 91 00:05:02,830 --> 00:05:04,640 that's probably a change in numbering -- 92 00:05:04,640 --> 00:05:07,770 phi_2 is going to be my bubble. 93 00:05:07,770 --> 00:05:10,150 And you see what my bubble function is? 94 00:05:10,150 --> 00:05:14,400 It's a function that goes there and straight. 95 00:05:14,400 --> 00:05:21,200 So it is continuous, no jumps, and it is second degree. 96 00:05:21,200 --> 00:05:24,200 It's a parabola, and I'll make its height one. 97 00:05:24,200 --> 00:05:27,320 And then there'll be another function. 98 00:05:27,320 --> 00:05:30,090 If I had another color I could draw it. 99 00:05:30,090 --> 00:05:33,610 Well, I'll just do it with broken lines, maybe. 100 00:05:33,610 --> 00:05:38,720 So there'll be another bubble function in here, 101 00:05:38,720 --> 00:05:41,970 a third bubble function in the third interval, 102 00:05:41,970 --> 00:05:44,180 and a fourth in the fourth interval. 103 00:05:44,180 --> 00:05:50,280 You see that I've now got my old phi_1, phi_3, phi_5, 104 00:05:50,280 --> 00:05:54,110 and phi_7 were the hat functions. 105 00:05:54,110 --> 00:05:59,910 But now I've got a phi_2, phi_4, phi_6, and phi_8 that 106 00:05:59,910 --> 00:06:04,980 are these new trial functions. 107 00:06:04,980 --> 00:06:07,940 So part of the message is, we can 108 00:06:07,940 --> 00:06:11,410 throw in additional functions. 109 00:06:11,410 --> 00:06:14,280 They don't have to be polynomials, 110 00:06:14,280 --> 00:06:17,000 but those are the simplest choices. 111 00:06:17,000 --> 00:06:18,410 Why are they simple? 112 00:06:18,410 --> 00:06:23,310 Because, you remember, that in the end when I made the choice, 113 00:06:23,310 --> 00:06:26,320 I have to do various integrations. 114 00:06:26,320 --> 00:06:31,940 So you remember that I have to integrate to find entries K_ij. 115 00:06:31,940 --> 00:06:34,150 Do you remember what that integral looked like? 116 00:06:34,150 --> 00:06:37,790 You certainly remember F_i. 117 00:06:37,790 --> 00:06:43,790 That was the integral from zero to one of whatever function 118 00:06:43,790 --> 00:06:50,850 phi_i we had, times the f(x)dx, times the load. 119 00:06:50,850 --> 00:06:54,710 And we computed these. 120 00:06:54,710 --> 00:06:58,800 You remember we computed these for the piecewise linear guys. 121 00:06:58,800 --> 00:07:03,380 But I don't think I wrote down the expression that we 122 00:07:03,380 --> 00:07:06,080 were really doing, so let me just do that. 123 00:07:06,080 --> 00:07:22,170 It's c(x), there's a du-- No. d phi_j/dx and a dV_i/dx. 124 00:07:22,170 --> 00:07:25,890 125 00:07:25,890 --> 00:07:29,020 Those were the integrals that we had to do. 126 00:07:29,020 --> 00:07:35,320 And we were taking phis to be the same as V's. 127 00:07:35,320 --> 00:07:38,210 Maybe I'll just do that here, because I don't plan to make 128 00:07:38,210 --> 00:07:40,990 any other choices at all. d phi_i/dx. 129 00:07:40,990 --> 00:07:44,190 130 00:07:44,190 --> 00:07:46,770 It's a symmetric matrix now. 131 00:07:46,770 --> 00:07:52,840 K_ji, because when I'm choosing phis the same 132 00:07:52,840 --> 00:07:55,340 as the V's, this is what it looks like, 133 00:07:55,340 --> 00:08:00,120 and if I switch j and i, I don't see any difference. 134 00:08:00,120 --> 00:08:03,920 So these are the things that have to be integrated. 135 00:08:03,920 --> 00:08:06,160 And those are the ones we did integrate 136 00:08:06,160 --> 00:08:08,440 when phi was piecewise linear. 137 00:08:08,440 --> 00:08:11,090 When phi was piecewise linear, the slope 138 00:08:11,090 --> 00:08:14,670 was piecewise constant, and we had really easy integrals. 139 00:08:14,670 --> 00:08:18,810 Very easy integrals. 140 00:08:18,810 --> 00:08:22,080 We had to pay attention to where we 141 00:08:22,080 --> 00:08:27,500 were was the slope on a minus interval or on a plus interval, 142 00:08:27,500 --> 00:08:29,460 but they were easy to compute. 143 00:08:29,460 --> 00:08:34,190 And they led us back to the kind of matrix 144 00:08:34,190 --> 00:08:36,090 that we've seen before. 145 00:08:36,090 --> 00:08:38,600 The twos and minus ones. 146 00:08:38,600 --> 00:08:41,840 And our right hand sides looked familiar. 147 00:08:41,840 --> 00:08:45,980 Now, we've got new functions. 148 00:08:45,980 --> 00:08:48,360 We still have the same formulas. 149 00:08:48,360 --> 00:08:50,600 No change in formulas. 150 00:08:50,600 --> 00:08:54,140 The system is really quite successful, 151 00:08:54,140 --> 00:08:57,530 because these are the things that we have to compute. 152 00:08:57,530 --> 00:09:02,710 So now I'll have to integrate these parabolas, 153 00:09:02,710 --> 00:09:06,010 these little parabolas, half of the phis 154 00:09:06,010 --> 00:09:09,100 will be little parabolas, and their derivatives 155 00:09:09,100 --> 00:09:10,610 will be linear. 156 00:09:10,610 --> 00:09:14,300 So you see, I'll have more calculations to do. 157 00:09:14,300 --> 00:09:19,080 Which I don't plan to do, but more integrations to-- 158 00:09:19,080 --> 00:09:23,650 For example, the diagonal entry, say 159 00:09:23,650 --> 00:09:31,520 2, 2, which will come from that bubble with itself. 160 00:09:31,520 --> 00:09:36,420 K_22, then, will be the integral of c(x), 161 00:09:36,420 --> 00:09:38,690 times the derivative of that bubble, which 162 00:09:38,690 --> 00:09:44,050 will be a straight line times itself, so it would be squared. 163 00:09:44,050 --> 00:09:48,570 And c is positive, so this K_22 is 164 00:09:48,570 --> 00:09:51,360 going to be some nice positive number. 165 00:09:51,360 --> 00:09:55,420 But we'll have to figure out what it is. 166 00:09:55,420 --> 00:10:01,900 Maybe I'll just say one fact that we'll come back to. 167 00:10:01,900 --> 00:10:08,610 That this K is symmetric positive definite. 168 00:10:08,610 --> 00:10:11,390 You thought it would be. 169 00:10:11,390 --> 00:10:15,000 By using the letter K, we kind of expected it to be. 170 00:10:15,000 --> 00:10:16,120 And it will be. 171 00:10:16,120 --> 00:10:21,620 It'll be symmetric because the phis and the V's are the same. 172 00:10:21,620 --> 00:10:23,970 And it turns out it's positive definite. 173 00:10:23,970 --> 00:10:25,860 So it's just great. 174 00:10:25,860 --> 00:10:27,850 Just great. 175 00:10:27,850 --> 00:10:35,400 We have a little more effort, either to use a formula 176 00:10:35,400 --> 00:10:41,840 for integrating polynomials, or using numerical integration. 177 00:10:41,840 --> 00:10:44,650 One way or another, and I won't concentrate right now 178 00:10:44,650 --> 00:10:47,450 on that point, we get these numbers. 179 00:10:47,450 --> 00:10:49,220 Okay. 180 00:10:49,220 --> 00:10:54,200 Here's something to concentrate on. 181 00:10:54,200 --> 00:10:58,200 What kind of a matrix K do we have? 182 00:10:58,200 --> 00:11:02,450 Where will it be non-zero? 183 00:11:02,450 --> 00:11:05,780 So it'll be eight by eight, right? 184 00:11:05,780 --> 00:11:09,190 I'll follow through on that choice. 185 00:11:09,190 --> 00:11:12,610 Just to say, where will I see non-zeros here? 186 00:11:12,610 --> 00:11:14,960 Because if you get that point, you 187 00:11:14,960 --> 00:11:20,300 see the way things come together. 188 00:11:20,300 --> 00:11:22,410 I'll just put a little x for non-zero. 189 00:11:22,410 --> 00:11:26,370 So K_11. 190 00:11:26,370 --> 00:11:29,110 So what's that first row of K? 191 00:11:29,110 --> 00:11:34,140 It's coming from the first function, integrated 192 00:11:34,140 --> 00:11:36,230 against itself. 193 00:11:36,230 --> 00:11:41,050 K_11, if for 1, 1, we'll get something there. 194 00:11:41,050 --> 00:11:46,300 Will we have something in the 1, 2 position? 195 00:11:46,300 --> 00:11:50,820 That's my question, do we have something in the 1, 2 position? 196 00:11:50,820 --> 00:11:52,370 What's 1, 2? 197 00:11:52,370 --> 00:11:57,110 That's this function against the bubble function, yes? 198 00:11:57,110 --> 00:11:58,100 Right? 199 00:11:58,100 --> 00:12:00,690 They're non-zero at the same place. 200 00:12:00,690 --> 00:12:03,040 We can expect something there. 201 00:12:03,040 --> 00:12:05,390 What about K_13? 202 00:12:05,390 --> 00:12:08,410 That's what we've done before, that's this one 203 00:12:08,410 --> 00:12:09,680 against this one. 204 00:12:09,680 --> 00:12:12,130 Yes? 205 00:12:12,130 --> 00:12:14,640 We expect a non-zero there. 206 00:12:14,640 --> 00:12:16,070 But then what? 207 00:12:16,070 --> 00:12:19,600 After that, what will the rest of that row be? 208 00:12:19,600 --> 00:12:20,450 Zero. 209 00:12:20,450 --> 00:12:23,660 Because that first half hat doesn't 210 00:12:23,660 --> 00:12:26,490 touch any of the others. 211 00:12:26,490 --> 00:12:27,710 So let's go on. 212 00:12:27,710 --> 00:12:31,080 Of course it'll be symmetric. 213 00:12:31,080 --> 00:12:33,330 I know this much. 214 00:12:33,330 --> 00:12:43,200 So this is the half hat row, and this is the first bubble row. 215 00:12:43,200 --> 00:12:45,720 Because the half hat was phi_1 and now 216 00:12:45,720 --> 00:12:47,710 the first bubble is phi_2. 217 00:12:47,710 --> 00:12:53,020 What non-zeros do we get in the stiffness matrix? 218 00:12:53,020 --> 00:13:00,130 Again, we could unconstruct it entry by entry. 219 00:13:00,130 --> 00:13:04,030 Another way to construct it will be element by element, 220 00:13:04,030 --> 00:13:05,500 stamp them in. 221 00:13:05,500 --> 00:13:09,710 You're beginning to see the idea of that. 222 00:13:09,710 --> 00:13:12,680 So what do I get for that bubble? 223 00:13:12,680 --> 00:13:17,870 I just look to see which elements touch that bubble. 224 00:13:17,870 --> 00:13:21,870 And which ones do? 225 00:13:21,870 --> 00:13:26,340 One, two and three, and not four. 226 00:13:26,340 --> 00:13:28,020 Right? 227 00:13:28,020 --> 00:13:31,020 In that row, we only get -- so from that bubble, 228 00:13:31,020 --> 00:13:33,000 I think we only get that much. 229 00:13:33,000 --> 00:13:35,530 Now, we're not quite seeing the picture yet. 230 00:13:35,530 --> 00:13:38,450 Let me go to the next hat. 231 00:13:38,450 --> 00:13:45,020 The hat, phi_2, and then I'll do the bubble. 232 00:13:45,020 --> 00:13:48,150 Oh, no, sorry, the hat's numbered phi_3, 233 00:13:48,150 --> 00:13:53,480 and then the next bubble is numbered phi_4. 234 00:13:53,480 --> 00:13:55,680 Where do I get zeros? 235 00:13:55,680 --> 00:13:58,400 You can tell me, where do I get zeros? 236 00:13:58,400 --> 00:14:05,210 From inner products, from these guys, when i is three. 237 00:14:05,210 --> 00:14:10,180 So which phis does phi number three overlap? 238 00:14:10,180 --> 00:14:12,210 That's all I'm asking. 239 00:14:12,210 --> 00:14:14,550 Does it overlap number one? 240 00:14:14,550 --> 00:14:15,460 Yes. 241 00:14:15,460 --> 00:14:18,530 Does it overlap phi number two? 242 00:14:18,530 --> 00:14:20,940 You want to highlight, so we're now 243 00:14:20,940 --> 00:14:24,100 looking at phi_3, at this hat. 244 00:14:24,100 --> 00:14:29,790 God, where's it gone? 245 00:14:29,790 --> 00:14:32,460 That's the one we're doing now? 246 00:14:32,460 --> 00:14:34,640 So what does it overlap? 247 00:14:34,640 --> 00:14:39,120 It overlaps the half hat, does it overlap the first bubble? 248 00:14:39,120 --> 00:14:39,970 Yes. 249 00:14:39,970 --> 00:14:41,370 Does it overlap itself? 250 00:14:41,370 --> 00:14:42,200 Yes. 251 00:14:42,200 --> 00:14:45,620 Does it overlap the second bubble? 252 00:14:45,620 --> 00:14:46,200 Yes. 253 00:14:46,200 --> 00:14:49,130 Does it overlap the next hat? 254 00:14:49,130 --> 00:14:50,490 Yes. 255 00:14:50,490 --> 00:14:53,040 And then all zeros. 256 00:14:53,040 --> 00:14:55,110 Okay, and now do one more row. 257 00:14:55,110 --> 00:14:56,570 Bubble four. 258 00:14:56,570 --> 00:15:01,090 So now I'm looking at this guy, this next bubble. phi_4. 259 00:15:01,090 --> 00:15:03,880 What does that overlap? 260 00:15:03,880 --> 00:15:08,090 Does it overlap the first half hat? 261 00:15:08,090 --> 00:15:08,850 Nope. 262 00:15:08,850 --> 00:15:13,130 Of course, symmetry told us that. 263 00:15:13,130 --> 00:15:16,250 Does the second bubble overlap the first bubble? 264 00:15:16,250 --> 00:15:17,550 No. 265 00:15:17,550 --> 00:15:19,480 Big point: zero there. 266 00:15:19,480 --> 00:15:25,440 Does the second bubble overlap the hat? 267 00:15:25,440 --> 00:15:26,860 Yes. 268 00:15:26,860 --> 00:15:28,920 Does the second bubble overlap itself? 269 00:15:28,920 --> 00:15:31,140 Certainly, on the diagonal we have something. 270 00:15:31,140 --> 00:15:34,840 Does the second bubble overlap the next hat, phi_5? 271 00:15:34,840 --> 00:15:35,900 Yes. 272 00:15:35,900 --> 00:15:39,140 And that's it. 273 00:15:39,140 --> 00:15:39,860 I think. 274 00:15:39,860 --> 00:15:44,680 The second level does not overlap the following bubble. 275 00:15:44,680 --> 00:15:51,170 I don't know if you see what pattern we're getting here. 276 00:15:51,170 --> 00:15:54,590 Those were special rows, because that was only a half hat. 277 00:15:54,590 --> 00:15:56,960 These are typical rows. 278 00:15:56,960 --> 00:16:03,080 A typical hat function, that row is showing us five non-zeros, 279 00:16:03,080 --> 00:16:06,210 because it overlaps itself, the neighboring hats, 280 00:16:06,210 --> 00:16:08,080 and the neighboring bubbles. 281 00:16:08,080 --> 00:16:12,210 But the bubble row only has three, 282 00:16:12,210 --> 00:16:15,750 because a bubble overlaps itself, the neighboring 283 00:16:15,750 --> 00:16:20,840 hat on each side, but not the neighboring bubbles. 284 00:16:20,840 --> 00:16:23,100 So we have only three non-zeros. 285 00:16:23,100 --> 00:16:28,730 Do you see that the next row will have five? 286 00:16:28,730 --> 00:16:30,170 Will I get it right? 287 00:16:30,170 --> 00:16:31,120 I hope so. 288 00:16:31,120 --> 00:16:38,340 The next row we'll have, I think they'd be here. 289 00:16:38,340 --> 00:16:43,790 And then the next row will have only three guys, maybe here, 290 00:16:43,790 --> 00:16:48,150 here, here. 291 00:16:48,150 --> 00:16:51,580 Well, it's certainly a band matrix. 292 00:16:51,580 --> 00:16:54,530 So you could say, okay, it's a band matrix. 293 00:16:54,530 --> 00:16:59,510 I wouldn't call it tri-diagonal anymore. 294 00:16:59,510 --> 00:17:03,130 If I showed you that matrix and said, what kind of a matrix, 295 00:17:03,130 --> 00:17:05,860 you'd say a band matrix. 296 00:17:05,860 --> 00:17:09,500 If you wanted to tell me that it had five bands, 297 00:17:09,500 --> 00:17:12,740 you could maybe say penta-diagonal, or something. 298 00:17:12,740 --> 00:17:15,460 But it's easy to work with, of course. 299 00:17:15,460 --> 00:17:17,810 That's the point of finite elements, 300 00:17:17,810 --> 00:17:20,900 is that all the functions are local, 301 00:17:20,900 --> 00:17:28,520 so that we get all zeros when trial functions don't overlap. 302 00:17:28,520 --> 00:17:33,130 My additional point was just a small one 303 00:17:33,130 --> 00:17:38,570 that's not a big deal, but it's a little bit worth noticing. 304 00:17:38,570 --> 00:17:48,330 These rows with only three entries, three non-zeros. 305 00:17:48,330 --> 00:17:53,800 I guess what I want to say is I have to solve eight 306 00:17:53,800 --> 00:17:56,250 equations and eight unknowns. 307 00:17:56,250 --> 00:17:59,880 And the normal way to do it would be just elimination. 308 00:17:59,880 --> 00:18:01,670 LU, that would work fine. 309 00:18:01,670 --> 00:18:08,690 Start from the top, eliminate, and you've got it. 310 00:18:08,690 --> 00:18:12,240 And of course in one dimension, nobody would do anything else. 311 00:18:12,240 --> 00:18:15,130 That would be simple. 312 00:18:15,130 --> 00:18:18,170 I just want to say, these bubbles, 313 00:18:18,170 --> 00:18:22,990 by giving me extra zeros, I could eliminate the bubbles 314 00:18:22,990 --> 00:18:24,470 first. 315 00:18:24,470 --> 00:18:28,170 Can I just make this point but not labor it? 316 00:18:28,170 --> 00:18:32,020 I could eliminate the bubbles first. 317 00:18:32,020 --> 00:18:39,520 I could use this equation to express the bubble coefficient 318 00:18:39,520 --> 00:18:41,190 in terms of its neighbors. 319 00:18:41,190 --> 00:18:43,770 I could use this one to express the bubble coefficient 320 00:18:43,770 --> 00:18:45,220 in terms of it neighbors. 321 00:18:45,220 --> 00:18:49,500 And I could plug back into the other equations. 322 00:18:49,500 --> 00:18:54,310 I could simplify this. 323 00:18:54,310 --> 00:18:57,250 I could get the bubbles done first if I wanted. 324 00:18:57,250 --> 00:19:03,320 I can see that to go into the gory details 325 00:19:03,320 --> 00:19:05,290 is probably not wise. 326 00:19:05,290 --> 00:19:08,340 But bubbles are easy to do. 327 00:19:08,340 --> 00:19:17,390 However there are better elements. 328 00:19:17,390 --> 00:19:20,500 So that's my discussion of quadratic elements, 329 00:19:20,500 --> 00:19:22,400 almost complete. 330 00:19:22,400 --> 00:19:26,750 It's not a big favorite, because cubics are better. 331 00:19:26,750 --> 00:19:28,810 So why are cubics better? 332 00:19:28,810 --> 00:19:31,050 Why are cubics better? 333 00:19:31,050 --> 00:19:34,470 So you're going to say, okay, upgrade to cubics. 334 00:19:34,470 --> 00:19:38,970 How shall I do that? 335 00:19:38,970 --> 00:19:43,590 And I want to say a word about the error here. 336 00:19:43,590 --> 00:19:45,700 Of course, the reason quadratics are 337 00:19:45,700 --> 00:19:49,800 better than cubics-- Sorry, the reason why quadratics 338 00:19:49,800 --> 00:19:52,050 are better than linear, and cubics 339 00:19:52,050 --> 00:20:00,850 will be better than quadratics is I'm getting more accuracy. 340 00:20:00,850 --> 00:20:06,360 Suppose my true solution may be some curve like that. 341 00:20:06,360 --> 00:20:07,190 Okay. 342 00:20:07,190 --> 00:20:11,510 My piecewise linear elements, suppose 343 00:20:11,510 --> 00:20:14,350 the piecewise linear elements happen to be, 344 00:20:14,350 --> 00:20:19,690 as they would in a special model problem, right on the money, 345 00:20:19,690 --> 00:20:21,930 at the nodes. 346 00:20:21,930 --> 00:20:23,410 Usually they won't be. 347 00:20:23,410 --> 00:20:27,410 But what would be the error in that one? 348 00:20:27,410 --> 00:20:30,370 Well, no error at all at the nodes as I've drawn it. 349 00:20:30,370 --> 00:20:32,840 But that's not what I'm interested in. 350 00:20:32,840 --> 00:20:35,810 I'm interested in, how big is that? 351 00:20:35,810 --> 00:20:42,740 How far off is the displacement? 352 00:20:42,740 --> 00:20:47,260 What's the maximum error in the displacement? 353 00:20:47,260 --> 00:20:48,460 Do you have any idea? 354 00:20:48,460 --> 00:20:51,440 If this is size h. 355 00:20:51,440 --> 00:21:01,950 Delta x, shall I call it delta x, or h? 356 00:21:01,950 --> 00:21:08,430 How far does a curving function escape from the-- I need 357 00:21:08,430 --> 00:21:10,420 to blow that up, don't I? 358 00:21:10,420 --> 00:21:15,320 So I have a curving function and a linear function, 359 00:21:15,320 --> 00:21:17,270 and I want to know how far apart they 360 00:21:17,270 --> 00:21:21,800 are over a distance of length delta x. 361 00:21:21,800 --> 00:21:24,920 What's this scale? 362 00:21:24,920 --> 00:21:28,180 That's the question. 363 00:21:28,180 --> 00:21:31,990 It's just good, it'll have a simple answer 364 00:21:31,990 --> 00:21:35,010 and it's great to know it. 365 00:21:35,010 --> 00:21:38,530 Anybody want to make a guess? 366 00:21:38,530 --> 00:21:41,360 Is that scale of size delta x? 367 00:21:41,360 --> 00:21:44,980 Is it of size delta x squared, size delta x cubed? 368 00:21:44,980 --> 00:21:48,300 It's that exponent of delta x that is telling me 369 00:21:48,300 --> 00:21:50,730 how big is the error? 370 00:21:50,730 --> 00:21:55,860 And it's easy to find once you get the hang of it. 371 00:21:55,860 --> 00:21:57,630 Anybody want to make a guess? 372 00:21:57,630 --> 00:21:59,350 Delta x? 373 00:21:59,350 --> 00:21:59,990 Squared. 374 00:21:59,990 --> 00:22:02,020 Squared would be the right guess. 375 00:22:02,020 --> 00:22:07,580 Squared would be the right guess. 376 00:22:07,580 --> 00:22:13,550 I could just turn that picture, if we wanted, to-- Again, this 377 00:22:13,550 --> 00:22:17,190 is delta x. 378 00:22:17,190 --> 00:22:22,100 Now it would look like that, pretty much. 379 00:22:22,100 --> 00:22:23,910 Doesn't have to be symmetric, of course, 380 00:22:23,910 --> 00:22:26,920 because this could be a complicated function. 381 00:22:26,920 --> 00:22:31,750 But when I focus on a little delta x interval, 382 00:22:31,750 --> 00:22:38,460 every function looks like a little polynomial. 383 00:22:38,460 --> 00:22:41,280 The error there, let's see. 384 00:22:41,280 --> 00:22:55,000 What would that function be? 385 00:22:55,000 --> 00:22:56,910 I could go forever on this. 386 00:22:56,910 --> 00:22:59,520 But look, if the slope is something, 387 00:22:59,520 --> 00:23:05,990 whatever, let me change numbers here. 388 00:23:05,990 --> 00:23:11,500 Let me call it from zero to y, what 389 00:23:11,500 --> 00:23:18,020 would be a little parabola that has a slope of one, 390 00:23:18,020 --> 00:23:20,440 let's say, at both ends. 391 00:23:20,440 --> 00:23:22,360 What would that parabola be? 392 00:23:22,360 --> 00:23:24,190 We probably have seen that before. 393 00:23:24,190 --> 00:23:33,990 If I wanted a slope of one at both ends, 394 00:23:33,990 --> 00:23:35,580 the polynomial would be something 395 00:23:35,580 --> 00:23:39,540 like-- What would it be? 396 00:23:39,540 --> 00:23:41,590 Sorry, tell me that little polynomial. 397 00:23:41,590 --> 00:23:44,940 It's a polynomial in x, it's just a quadratic. 398 00:23:44,940 --> 00:23:52,190 Its slope is one, so it maybe starts with an x. 399 00:23:52,190 --> 00:23:55,400 I've got to bring it down here. 400 00:23:55,400 --> 00:24:02,080 Is it x times one minus x over-- I 401 00:24:02,080 --> 00:24:07,774 didn't like y ever in the first place. 402 00:24:07,774 --> 00:24:08,940 What do I want to put there? 403 00:24:08,940 --> 00:24:11,520 I don't want to put a one. 404 00:24:11,520 --> 00:24:18,240 That would make it look big. y is there. 405 00:24:18,240 --> 00:24:24,930 Okay, I think that quadratic is zero at zero, 406 00:24:24,930 --> 00:24:26,520 because of that term. 407 00:24:26,520 --> 00:24:30,160 It's zero at x=y, because of that term. 408 00:24:30,160 --> 00:24:31,710 It's second degree. 409 00:24:31,710 --> 00:24:35,270 And I think its height is a maximum right there. 410 00:24:35,270 --> 00:24:37,680 And what is that height? 411 00:24:37,680 --> 00:24:41,120 At y/2, this is y/2, this is y/2. 412 00:24:41,120 --> 00:24:44,470 That height is y squared over four. 413 00:24:44,470 --> 00:24:46,810 That's what I was shooting for. 414 00:24:46,810 --> 00:24:48,210 The square. 415 00:24:48,210 --> 00:24:52,690 That, in a little interval of length y, for length delta x, 416 00:24:52,690 --> 00:24:56,770 if I draw a little parabola and I'm matching at the ends, 417 00:24:56,770 --> 00:25:02,040 then the height it reaches is like y squared. 418 00:25:02,040 --> 00:25:04,180 That's the scale. 419 00:25:04,180 --> 00:25:09,760 So my conclusion is that if I use these basic hat function 420 00:25:09,760 --> 00:25:17,330 elements, the error I get is-- So can I list the errors? 421 00:25:17,330 --> 00:25:22,190 The error is delta x squared. 422 00:25:22,190 --> 00:25:24,700 That's the displacement error. 423 00:25:24,700 --> 00:25:28,610 The error in u. 424 00:25:28,610 --> 00:25:31,330 I'm not proving anything. 425 00:25:31,330 --> 00:25:35,390 The careful discussion of the accuracy 426 00:25:35,390 --> 00:25:38,590 is a later section in the book. 427 00:25:38,590 --> 00:25:40,900 But I'm trying to make the main point, 428 00:25:40,900 --> 00:25:45,370 is that if we're fitting functions by straight lines, 429 00:25:45,370 --> 00:25:48,540 then we have an error of delta x squared. 430 00:25:48,540 --> 00:25:51,350 And what's the slope error? 431 00:25:51,350 --> 00:25:56,390 What do you think is the slope error? 432 00:25:56,390 --> 00:25:58,980 Because for us that slope is important. 433 00:25:58,980 --> 00:26:02,170 That's the error in the stretching and the strain. 434 00:26:02,170 --> 00:26:05,130 So the error in the function is delta x squared. 435 00:26:05,130 --> 00:26:10,600 The error in the slope will be one order less, just delta x. 436 00:26:10,600 --> 00:26:13,200 Okay, I'll come back to all this. 437 00:26:13,200 --> 00:26:16,920 Now, make a guess. 438 00:26:16,920 --> 00:26:23,810 Suppose I include these bubble functions. 439 00:26:23,810 --> 00:26:30,780 With delta x as my length scale horizontally, 440 00:26:30,780 --> 00:26:33,220 what will be the scale of the error? 441 00:26:33,220 --> 00:26:38,930 What do you guess is the expected error in displacement 442 00:26:38,930 --> 00:26:44,610 for a general problem, for a general c(x) and f(x). 443 00:26:44,610 --> 00:26:47,560 444 00:26:47,560 --> 00:26:51,160 Which I won't get exactly right, but how close will I come? 445 00:26:51,160 --> 00:26:56,040 I'll come within delta x to what power? 446 00:26:56,040 --> 00:26:58,410 Make a guess, please. 447 00:26:58,410 --> 00:27:01,020 Four is an optimist. 448 00:27:01,020 --> 00:27:02,861 I won't get up to four. 449 00:27:02,861 --> 00:27:03,360 Cubed. 450 00:27:03,360 --> 00:27:04,490 I'd only get cubed. 451 00:27:04,490 --> 00:27:10,330 I'll get one by increasing the degree of the polynomial 452 00:27:10,330 --> 00:27:15,160 by one, I'll get one degree better. 453 00:27:15,160 --> 00:27:20,380 So you could look at it this way. 454 00:27:20,380 --> 00:27:23,820 Suppose I have any function. 455 00:27:23,820 --> 00:27:26,500 This is a another way to think about the accuracy. 456 00:27:26,500 --> 00:27:28,210 Suppose I have any function F(x). 457 00:27:28,210 --> 00:27:32,340 458 00:27:32,340 --> 00:27:37,920 The whole point of calculus is that I could start, 459 00:27:37,920 --> 00:27:46,600 if I start where it is at zero, then I add in F'(0), the slope, 460 00:27:46,600 --> 00:27:47,990 times x. 461 00:27:47,990 --> 00:27:54,480 Then I add in 1/2 F''(0) times x squared, and so on. 462 00:27:54,480 --> 00:27:56,120 Right? 463 00:27:56,120 --> 00:28:00,000 It's called the Taylor series. 464 00:28:00,000 --> 00:28:03,990 And we're not paying any attention to convergence, 465 00:28:03,990 --> 00:28:06,080 or high order. 466 00:28:06,080 --> 00:28:10,380 It's the early terms that I'm interested in. 467 00:28:10,380 --> 00:28:14,440 And the point is that if my functions include 468 00:28:14,440 --> 00:28:19,380 linear functions, which the hats did, 469 00:28:19,380 --> 00:28:22,010 they will be able to get these terms right, 470 00:28:22,010 --> 00:28:25,950 and this will be the error that I missed. 471 00:28:25,950 --> 00:28:28,840 I'm just looking to see what's the first term in the Taylor 472 00:28:28,840 --> 00:28:31,240 series that I will not get. 473 00:28:31,240 --> 00:28:32,890 And if I only have hat functions, 474 00:28:32,890 --> 00:28:34,520 I can't get an x squared. 475 00:28:34,520 --> 00:28:36,050 I can't get a parabola. 476 00:28:36,050 --> 00:28:41,390 But when I go here and include the x squareds, 477 00:28:41,390 --> 00:28:43,060 I can get that term right. 478 00:28:43,060 --> 00:28:48,040 So then it'll be the 1/6 f triple prime x cubed 479 00:28:48,040 --> 00:28:49,220 that I miss. 480 00:28:49,220 --> 00:28:55,240 So the error will be the next missing term. 481 00:28:55,240 --> 00:28:59,550 Okay, so that's thoughts about the error. 482 00:28:59,550 --> 00:29:04,010 And of course that's why those elements are better than these. 483 00:29:04,010 --> 00:29:07,050 They take more work, but they are worth it. 484 00:29:07,050 --> 00:29:10,870 But now I want to tell you about the next elements. 485 00:29:10,870 --> 00:29:13,680 Cubics. 486 00:29:13,680 --> 00:29:18,600 Where you're going to expect to get delta x to the fourth. 487 00:29:18,600 --> 00:29:22,250 So now we're getting serious accuracy. 488 00:29:22,250 --> 00:29:24,740 Now we're getting good accuracy. 489 00:29:24,740 --> 00:29:28,230 Of course our problem is not the most difficult problem. 490 00:29:28,230 --> 00:29:30,740 It's in 1-D. But this is good. 491 00:29:30,740 --> 00:29:34,540 Okay. 492 00:29:34,540 --> 00:29:38,620 This was now the fun in the golden age of finite elements. 493 00:29:38,620 --> 00:29:41,900 To construct cubics. 494 00:29:41,900 --> 00:29:45,860 What shall I use as basis functions for cubics? 495 00:29:45,860 --> 00:29:49,240 So I want to have a cubic in each piece. 496 00:29:49,240 --> 00:29:54,870 First of all suppose I just want no more than that. 497 00:29:54,870 --> 00:30:02,150 Suppose I'm happy with just continuous functions 498 00:30:02,150 --> 00:30:06,270 and I let the slope jump. 499 00:30:06,270 --> 00:30:09,830 What new trial function shall I put in? 500 00:30:09,830 --> 00:30:12,160 So I'm going to put in new trial functions. 501 00:30:12,160 --> 00:30:14,570 What will they look like? 502 00:30:14,570 --> 00:30:15,910 Little cubics? 503 00:30:15,910 --> 00:30:18,490 Little third degree pieces. 504 00:30:18,490 --> 00:30:23,430 Instead of parabolas, they'll be little pieces of third degree. 505 00:30:23,430 --> 00:30:27,850 And I could put in four more bubbles. 506 00:30:27,850 --> 00:30:29,020 Four cubic bubbles. 507 00:30:29,020 --> 00:30:37,450 So I would be up to twelve degrees, twelve 508 00:30:37,450 --> 00:30:40,180 by twelve matrices, twelve functions. 509 00:30:40,180 --> 00:30:43,850 And for that size delta x, that would give me delta 510 00:30:43,850 --> 00:30:44,830 x to the fourth. 511 00:30:44,830 --> 00:30:47,780 So that would be okay. 512 00:30:47,780 --> 00:30:49,360 There's a better idea. 513 00:30:49,360 --> 00:30:52,530 You can see that I left space. 514 00:30:52,530 --> 00:30:59,470 I'm going to make the slope also continuous. 515 00:30:59,470 --> 00:31:03,850 I'm not going to allow jumps in slope. 516 00:31:03,850 --> 00:31:06,400 Think, how will I do that? 517 00:31:06,400 --> 00:31:10,280 So I'm going to call those C-- what will I call that when 518 00:31:10,280 --> 00:31:11,600 the slope is continuous? 519 00:31:11,600 --> 00:31:14,490 The first derivative, I'll call that C one, 520 00:31:14,490 --> 00:31:17,280 continuous first derivative. 521 00:31:17,280 --> 00:31:19,070 Okay. 522 00:31:19,070 --> 00:31:22,040 Now I'm actually in section 3.2, where 523 00:31:22,040 --> 00:31:26,050 these better elements, these really nifty elements 524 00:31:26,050 --> 00:31:28,870 are constructed. 525 00:31:28,870 --> 00:31:31,740 C^1, continuous slope, cubics. 526 00:31:31,740 --> 00:31:32,330 Okay. 527 00:31:32,330 --> 00:31:33,540 Ready for those? 528 00:31:33,540 --> 00:31:37,940 What shall be my trial function for continuous slope cubics? 529 00:31:37,940 --> 00:31:39,750 So I have to start again. 530 00:31:39,750 --> 00:31:44,090 I have to start again because the hat functions are out now. 531 00:31:44,090 --> 00:31:47,460 Those hat functions have a jump in slope. 532 00:31:47,460 --> 00:31:53,520 The bubble functions have a jump in slope. 533 00:31:53,520 --> 00:31:59,640 I'm rethinking here to create a better element. 534 00:31:59,640 --> 00:32:00,140 Okay. 535 00:32:00,140 --> 00:32:05,610 So let's just think, if we've got a chance at it, 536 00:32:05,610 --> 00:32:07,200 how could these elements work? 537 00:32:07,200 --> 00:32:09,590 Okay, so here is the idea, then. 538 00:32:09,590 --> 00:32:15,490 Here is my interval. 539 00:32:15,490 --> 00:32:18,370 Zero to one, and here's a typical interval. 540 00:32:18,370 --> 00:32:22,190 And now at a typical node, like node one, 541 00:32:22,190 --> 00:32:27,040 I plan to have as unknowns the height of the function, as 542 00:32:27,040 --> 00:32:29,730 before, and also the slope. 543 00:32:29,730 --> 00:32:33,270 So I want the function, my trial function 544 00:32:33,270 --> 00:32:38,850 is going to have some height and some slope. 545 00:32:38,850 --> 00:32:41,540 And at node two, it's going to have 546 00:32:41,540 --> 00:32:44,380 some height and some slope. 547 00:32:44,380 --> 00:32:47,310 And here's the question. 548 00:32:47,310 --> 00:32:49,080 Here's the good point. 549 00:32:49,080 --> 00:32:55,390 That those four numbers, the two heights and the two slopes, 550 00:32:55,390 --> 00:33:00,200 that gives me four things, four quantities. 551 00:33:00,200 --> 00:33:03,720 How many quantities do I need to determine a cubic? 552 00:33:03,720 --> 00:33:07,390 So by a cubic, of course, I mean by a cubic something 553 00:33:07,390 --> 00:33:14,400 like a_0 plus a_1 x plus a_2 x squared and a_3 x cubed. 554 00:33:14,400 --> 00:33:18,050 It's called a cubic because it's x cubed. 555 00:33:18,050 --> 00:33:20,281 So how many numbers here? 556 00:33:20,281 --> 00:33:20,780 Four. 557 00:33:20,780 --> 00:33:22,200 Perfect match. 558 00:33:22,200 --> 00:33:25,160 There's exactly one cubic that has 559 00:33:25,160 --> 00:33:29,440 a specified height and a specified slope at these two 560 00:33:29,440 --> 00:33:31,490 ends. 561 00:33:31,490 --> 00:33:33,910 There's one cubic that'll do that. 562 00:33:33,910 --> 00:33:37,220 And then whatever the height here is 563 00:33:37,220 --> 00:33:39,700 and whatever the slope there is, there'll 564 00:33:39,700 --> 00:33:42,180 be one cubic with that height and that slope 565 00:33:42,180 --> 00:33:44,650 that comes into this one. 566 00:33:44,650 --> 00:33:48,360 And you see that they will have continuous slope. 567 00:33:48,360 --> 00:33:51,820 Because of course the slope is continuous in between; 568 00:33:51,820 --> 00:33:53,470 it's a polynomial. 569 00:33:53,470 --> 00:33:56,990 The question is always at the nodes. 570 00:33:56,990 --> 00:33:59,660 But I use the same number coming from the left 571 00:33:59,660 --> 00:34:00,930 and from the right. 572 00:34:00,930 --> 00:34:05,250 The slope has become an extra unknown. 573 00:34:05,250 --> 00:34:08,420 The slope has become an extra unknown. 574 00:34:08,420 --> 00:34:11,110 So I have height, slope at every point. 575 00:34:11,110 --> 00:34:17,400 So that's one way to describe these trial functions now. 576 00:34:17,400 --> 00:34:27,840 The trial functions have height and also slope at each node. 577 00:34:27,840 --> 00:34:29,890 So what does that mean? 578 00:34:29,890 --> 00:34:32,820 That means that I'm going to have two unknowns. 579 00:34:32,820 --> 00:34:35,630 Two functions, two trial functions, 580 00:34:35,630 --> 00:34:40,210 each with its own coefficient at each node. 581 00:34:40,210 --> 00:34:45,170 So if I take a typical node there, I want two functions. 582 00:34:45,170 --> 00:34:49,230 Okay, this is interesting. 583 00:34:49,230 --> 00:34:52,650 But you see what I'm creating. 584 00:34:52,650 --> 00:34:55,780 I think I'm going to get two functions there, 585 00:34:55,780 --> 00:34:58,610 two functions there, two functions there, 586 00:34:58,610 --> 00:35:00,150 two functions there, right? 587 00:35:00,150 --> 00:35:02,110 Because nobody's constraining that. 588 00:35:02,110 --> 00:35:03,320 So I'm up to eight. 589 00:35:03,320 --> 00:35:05,160 And how many functions do you think 590 00:35:05,160 --> 00:35:09,400 I'm going to have associated with that node? 591 00:35:09,400 --> 00:35:10,140 Only one. 592 00:35:10,140 --> 00:35:12,100 Why? 593 00:35:12,100 --> 00:35:14,950 Because the height is fixed. 594 00:35:14,950 --> 00:35:20,270 So I think I've got nine trial functions here. 595 00:35:20,270 --> 00:35:23,330 And if we can see what those are, 596 00:35:23,330 --> 00:35:25,030 then the system will take over. 597 00:35:25,030 --> 00:35:29,700 They're my phi_1 to phi_9, whatever, 598 00:35:29,700 --> 00:35:32,740 they plug in here, they plug in the right-hand side, 599 00:35:32,740 --> 00:35:37,680 I'll have a nine by nine stiffness matrix. 600 00:35:37,680 --> 00:35:40,920 It'll be local again. 601 00:35:40,920 --> 00:35:45,100 Well, let's see if we can figure out these functions. 602 00:35:45,100 --> 00:35:47,030 Okay, so you have the idea? 603 00:35:47,030 --> 00:35:50,190 I'm expecting two trial functions. 604 00:35:50,190 --> 00:35:53,240 One is sort of a round hat. 605 00:35:53,240 --> 00:35:54,490 All right, let me draw that. 606 00:35:54,490 --> 00:36:02,720 The round hat function will be the function-- 607 00:36:02,720 --> 00:36:10,740 These will be the round hats, and they'll be associated with, 608 00:36:10,740 --> 00:36:14,190 they give me heights. 609 00:36:14,190 --> 00:36:19,040 And then I'll also have an additional one, 610 00:36:19,040 --> 00:36:21,000 except at the last node. 611 00:36:21,000 --> 00:36:23,620 And these will be-- I don't know what to call them yet. 612 00:36:23,620 --> 00:36:25,340 You'll have to give me a name. 613 00:36:25,340 --> 00:36:27,950 These will give me the slopes. 614 00:36:27,950 --> 00:36:28,630 Okay. 615 00:36:28,630 --> 00:36:30,520 So what does a round hat look like? 616 00:36:30,520 --> 00:36:35,110 Now these have to be, follow my rules, 617 00:36:35,110 --> 00:36:37,290 they have to be continuous, their slope 618 00:36:37,290 --> 00:36:38,850 has to be continuous. 619 00:36:38,850 --> 00:36:42,430 And I want to take the one that has height one and zero 620 00:36:42,430 --> 00:36:43,750 slope there. 621 00:36:43,750 --> 00:36:47,190 And it should have height zero and zero slope, here. 622 00:36:47,190 --> 00:36:52,460 Height zero, zero slope. 623 00:36:52,460 --> 00:36:54,330 You see what it's going to be? 624 00:36:54,330 --> 00:36:57,760 This phi, whatever number it is, it'll 625 00:36:57,760 --> 00:37:03,070 be the phi whose coefficient tells me 626 00:37:03,070 --> 00:37:05,130 the height at node one. 627 00:37:05,130 --> 00:37:08,670 So here's node one. 628 00:37:08,670 --> 00:37:10,700 What will it look like? 629 00:37:10,700 --> 00:37:12,270 What will this function do? 630 00:37:12,270 --> 00:37:16,270 Well, there is exactly one cubic that 631 00:37:16,270 --> 00:37:19,260 starts from zero with slope zero and ends there, 632 00:37:19,260 --> 00:37:21,470 ends at one with slope zero. 633 00:37:21,470 --> 00:37:21,970 Right? 634 00:37:21,970 --> 00:37:26,590 That's what we said; four numbers determine that cubic 635 00:37:26,590 --> 00:37:28,300 in that interval. 636 00:37:28,300 --> 00:37:34,160 Then there's another cubic that, with those two numbers again, 637 00:37:34,160 --> 00:37:37,532 that keeps the continuous slope, and these two numbers 638 00:37:37,532 --> 00:37:38,240 in this interval. 639 00:37:38,240 --> 00:37:41,880 And of course it'll just be symmetric. 640 00:37:41,880 --> 00:37:44,020 You see the round hat? 641 00:37:44,020 --> 00:37:47,710 So that's the basis function, the trial 642 00:37:47,710 --> 00:37:52,980 function that has continuous slopes and heights, of course, 643 00:37:52,980 --> 00:37:55,370 and it has height one at that point. 644 00:37:55,370 --> 00:38:01,100 And now let me draw the one that has height zero, slope zero; 645 00:38:01,100 --> 00:38:04,090 height zero, slope zero. 646 00:38:04,090 --> 00:38:10,610 And what do I want it to do there? 647 00:38:10,610 --> 00:38:16,370 What should this function be like? 648 00:38:16,370 --> 00:38:19,510 It should be the one that tells-- Its coefficient will 649 00:38:19,510 --> 00:38:21,230 tell me the slope. 650 00:38:21,230 --> 00:38:28,390 So I want it to have a slope of one and a height of zero. 651 00:38:28,390 --> 00:38:31,180 Do you see these functions, shall 652 00:38:31,180 --> 00:38:35,560 I call these, the height functions, phi h 1? 653 00:38:35,560 --> 00:38:38,660 That's the phi, that's the trial function that tells me 654 00:38:38,660 --> 00:38:41,780 the height at node one. 655 00:38:41,780 --> 00:38:43,740 When I take combinations, it gets 656 00:38:43,740 --> 00:38:51,270 multiplied by U h 1, which is exactly the height at node one. 657 00:38:51,270 --> 00:38:53,090 Now what about this guy? 658 00:38:53,090 --> 00:38:58,640 This guy is going to start with zero slope at zero. 659 00:38:58,640 --> 00:39:00,810 It's going to be a cubic, and there's exactly 660 00:39:00,810 --> 00:39:02,180 one cubic that'll do it. 661 00:39:02,180 --> 00:39:04,800 It'll look a little like this. 662 00:39:04,800 --> 00:39:06,860 Then there'll be exactly one cubic 663 00:39:06,860 --> 00:39:10,360 that does that and gets back to zero. 664 00:39:10,360 --> 00:39:12,260 You see that that's possible? 665 00:39:12,260 --> 00:39:15,480 In each interval, I've got four numbers: 666 00:39:15,480 --> 00:39:17,210 two heights, two slopes. 667 00:39:17,210 --> 00:39:23,540 So this would be a picture of the phi slope at node one 668 00:39:23,540 --> 00:39:25,290 function. 669 00:39:25,290 --> 00:39:30,280 So that's a standard function, it's a cubic, piecewise cubic. 670 00:39:30,280 --> 00:39:34,200 Local again, because in all these intervals it's zero. 671 00:39:34,200 --> 00:39:38,110 And it will be, when I go to take combinations 672 00:39:38,110 --> 00:39:40,390 of all these guys, it'll be multiplied 673 00:39:40,390 --> 00:39:43,910 by its coefficient, U slope one. 674 00:39:43,910 --> 00:39:48,420 And then I'll have nine altogether. 675 00:39:48,420 --> 00:39:50,950 But those two are the typical ones. 676 00:39:50,950 --> 00:39:57,650 Do you do see how that's going? 677 00:39:57,650 --> 00:40:03,460 It's more subtle than hat functions. 678 00:40:03,460 --> 00:40:09,950 Suppose whoever's writing the finite element code 679 00:40:09,950 --> 00:40:16,510 gets a formula for those phis and plugs them 680 00:40:16,510 --> 00:40:23,600 into the integrals, comes out with a stiffness matrix. 681 00:40:23,600 --> 00:40:27,750 Actually, we could even look at that stiffness matrix. 682 00:40:27,750 --> 00:40:31,810 This is a good way to understand the picture. 683 00:40:31,810 --> 00:40:33,900 Now it'll be nine by nine. 684 00:40:33,900 --> 00:40:36,130 Right? 685 00:40:36,130 --> 00:40:41,080 So here we'll have a typical, this'll be our phi height 1 686 00:40:41,080 --> 00:40:45,630 row, and this'll be our phi slope 1 row, 687 00:40:45,630 --> 00:40:49,970 and this'll be our phi height 2 row, and so on. 688 00:40:49,970 --> 00:40:53,590 Of course, I didn't leave room for all-- 689 00:40:53,590 --> 00:40:59,710 What will a typical row of this stiffness matrix have in it? 690 00:40:59,710 --> 00:41:03,750 I'm just asking about the overlaps. phi_1 height 691 00:41:03,750 --> 00:41:06,970 certainly overlaps itself. 692 00:41:06,970 --> 00:41:11,730 Does phi_1 height overlap phi_1 slope? 693 00:41:11,730 --> 00:41:13,690 Yes or no? 694 00:41:13,690 --> 00:41:14,450 Sure. 695 00:41:14,450 --> 00:41:16,350 Sure. 696 00:41:16,350 --> 00:41:21,580 Does phi_1 height overlap phi_2 height? 697 00:41:21,580 --> 00:41:23,030 Yes. 698 00:41:23,030 --> 00:41:23,650 Yes. 699 00:41:23,650 --> 00:41:28,910 Because the phi_2 height will go up like that. 700 00:41:28,910 --> 00:41:29,540 You see? 701 00:41:29,540 --> 00:41:30,840 And the phi_2 slope. 702 00:41:30,840 --> 00:41:38,920 So actually we'll have, I think we'll have 703 00:41:38,920 --> 00:41:43,600 six non-zeros on a typical row. 704 00:41:43,600 --> 00:41:45,560 Is that right? 705 00:41:45,560 --> 00:41:46,880 Six non-zeros? 706 00:41:46,880 --> 00:41:53,650 Because a typical h-- this is maybe not so typical, 707 00:41:53,650 --> 00:41:56,040 because to the left of it there's only one, 708 00:41:56,040 --> 00:41:59,140 there's no-- No, there are two. 709 00:41:59,140 --> 00:42:00,050 Right? 710 00:42:00,050 --> 00:42:03,520 There's a phi_0, phi h 0 and a phi s 0. 711 00:42:03,520 --> 00:42:07,210 Sure, there are two here, the two guys 712 00:42:07,210 --> 00:42:11,350 here, there's one height guy, and there's 713 00:42:11,350 --> 00:42:17,350 one-- what's cooking in that? 714 00:42:17,350 --> 00:42:21,970 Oh, it's got a slope of one and it gets back to zero. 715 00:42:21,970 --> 00:42:25,040 What I'm drawing now in little dashed lines 716 00:42:25,040 --> 00:42:29,370 was the phi slope 0. 717 00:42:29,370 --> 00:42:32,830 The one that gives me a slope at node 718 00:42:32,830 --> 00:42:35,000 zero, and this is the one that gives me a height. 719 00:42:35,000 --> 00:42:36,050 Yes. 720 00:42:36,050 --> 00:42:40,910 Do you see it? 721 00:42:40,910 --> 00:42:46,040 So above this was a phi slope 0, and stuck in there 722 00:42:46,040 --> 00:42:54,680 was a phi height 0. 723 00:42:54,680 --> 00:42:57,190 Six-diagonal matrix. 724 00:42:57,190 --> 00:43:02,310 I think it helps to draw that little thing with x's 725 00:43:02,310 --> 00:43:05,630 and zeros, because then you sort of see how things are fitting 726 00:43:05,630 --> 00:43:06,700 together. 727 00:43:06,700 --> 00:43:09,020 Okay. 728 00:43:09,020 --> 00:43:18,360 So these functions now, I've gone into section 3.2 for that. 729 00:43:18,360 --> 00:43:22,420 I want to go to a slightly different topic, 730 00:43:22,420 --> 00:43:28,130 and then I'll come back in section 3.2 to these cubics. 731 00:43:28,130 --> 00:43:32,350 So these are C^1 cubics, continuous slope cubics. 732 00:43:32,350 --> 00:43:35,460 Very interesting construction. 733 00:43:35,460 --> 00:43:39,110 Are you seeing how it could go in more dimensions? 734 00:43:39,110 --> 00:43:45,040 I mean, that's what we'll see for Laplace's equation, 735 00:43:45,040 --> 00:43:49,310 how can you construct quadratics, cubics in a plane. 736 00:43:49,310 --> 00:43:52,210 It gets interesting. 737 00:43:52,210 --> 00:43:56,340 But you'll get the knack of these guys. 738 00:43:56,340 --> 00:44:02,920 These are pretty direct, and very useful. 739 00:44:02,920 --> 00:44:04,280 So what's the effect? 740 00:44:04,280 --> 00:44:09,990 The effect is that we get a matrix. 741 00:44:09,990 --> 00:44:13,710 It looks quite like a difference matrix. 742 00:44:13,710 --> 00:44:16,740 Well, actually, the height rows and-- the numbers 743 00:44:16,740 --> 00:44:20,180 in the height rows and the slope rows look different. 744 00:44:20,180 --> 00:44:23,880 We're getting something new here. 745 00:44:23,880 --> 00:44:29,800 We're getting a matrix, a KU=F, that's going to give us fourth 746 00:44:29,800 --> 00:44:31,860 order accuracy. 747 00:44:31,860 --> 00:44:37,500 So the accuracy has moved up. 748 00:44:37,500 --> 00:44:39,720 So we've got up to fourth order accuracy, 749 00:44:39,720 --> 00:44:44,830 which we could get by finite differences 750 00:44:44,830 --> 00:44:47,190 by a lot of patience. 751 00:44:47,190 --> 00:44:50,360 We get them from finite elements in a straight way. 752 00:44:50,360 --> 00:44:53,010 Okay, any question or discussion? 753 00:44:53,010 --> 00:45:00,040 I'm talking real fast to get this new idea of constructing 754 00:45:00,040 --> 00:45:03,000 finite elements here. 755 00:45:03,000 --> 00:45:13,190 I do want to say something about that line. 756 00:45:13,190 --> 00:45:17,070 Because that's a part of this business 757 00:45:17,070 --> 00:45:21,040 of estimating the accuracy. 758 00:45:21,040 --> 00:45:28,670 It's a key idea in the background of the Galerkin 759 00:45:28,670 --> 00:45:29,380 method. 760 00:45:29,380 --> 00:45:34,490 And the minimum form would be associated with names 761 00:45:34,490 --> 00:45:37,060 like Rayleigh and Ritz. 762 00:45:37,060 --> 00:45:37,930 All right. 763 00:45:37,930 --> 00:45:42,610 I'll just go directly to that, if I may. 764 00:45:42,610 --> 00:45:49,940 So what I want to do is tell you, for our model problem, 765 00:45:49,940 --> 00:45:58,970 I want to tell you the strong form-- Let me do it this way. 766 00:45:58,970 --> 00:46:03,720 I'll put the strong form, the weak form, 767 00:46:03,720 --> 00:46:09,610 and then I want to add in the minimum form. 768 00:46:09,610 --> 00:46:11,340 Okay. 769 00:46:11,340 --> 00:46:15,720 So the strong form of our equation was minus 770 00:46:15,720 --> 00:46:20,190 the derivative of c*du/dx equal f. 771 00:46:20,190 --> 00:46:24,670 772 00:46:24,670 --> 00:46:28,180 Okay. 773 00:46:28,180 --> 00:46:33,460 What was the weak form? 774 00:46:33,460 --> 00:46:36,070 This is an f(x). 775 00:46:36,070 --> 00:46:39,880 The weak form, how do you get to the weak form? 776 00:46:39,880 --> 00:46:44,110 You multiply both sides by a test function, you integrate, 777 00:46:44,110 --> 00:46:47,980 you integrate by parts, and you get this beautifully symmetric 778 00:46:47,980 --> 00:46:57,250 form that we have up there, du/dx*dv/dx*dx, 779 00:46:57,250 --> 00:47:00,490 equals the integral of f(x)*v(x)*dx. 780 00:47:00,490 --> 00:47:03,740 781 00:47:03,740 --> 00:47:08,060 I write that again, just so you see the nice symmetry 782 00:47:08,060 --> 00:47:10,280 of that weak form. 783 00:47:10,280 --> 00:47:21,470 And it's for all test functions v. Okay. 784 00:47:21,470 --> 00:47:24,500 I'm shooting for a third description. 785 00:47:24,500 --> 00:47:27,760 A third description of the same problem. 786 00:47:27,760 --> 00:47:31,600 And it's really neat to see that you have that. 787 00:47:31,600 --> 00:47:35,870 Let me just see it first in the discrete case. 788 00:47:35,870 --> 00:47:40,680 The discrete case, the strong form would be A transpose C 789 00:47:40,680 --> 00:47:42,940 Au=f. 790 00:47:42,940 --> 00:47:46,430 That's the strong form. 791 00:47:46,430 --> 00:47:48,030 Right? 792 00:47:48,030 --> 00:47:50,430 I always like to see the discrete one first, 793 00:47:50,430 --> 00:47:52,100 and then the continuous. 794 00:47:52,100 --> 00:47:55,840 Okay, what would be the weak form in the discrete case? 795 00:47:55,840 --> 00:47:59,560 I would multiply by a vector v, and I 796 00:47:59,560 --> 00:48:04,180 would take inner products, A transpose C Au inner product 797 00:48:04,180 --> 00:48:11,745 with v, equals f inner product with v. You can use dot, 798 00:48:11,745 --> 00:48:18,350 or-- So that would be the weak form. 799 00:48:18,350 --> 00:48:21,070 I've just taken the dot product of both sides 800 00:48:21,070 --> 00:48:27,931 with v. Now you'll see the weak form better if, what should I 801 00:48:27,931 --> 00:48:28,430 do? 802 00:48:28,430 --> 00:48:32,640 What would make that look nice? 803 00:48:32,640 --> 00:48:38,450 So that's the dot product of A transpose C Au with v. 804 00:48:38,450 --> 00:48:41,890 And what do I do to make that look nice? 805 00:48:41,890 --> 00:48:44,420 Do you get the idea yet? 806 00:48:44,420 --> 00:48:47,640 It doesn't look pretty to me. 807 00:48:47,640 --> 00:48:49,820 It's all lopsided. 808 00:48:49,820 --> 00:48:50,450 Right? 809 00:48:50,450 --> 00:48:53,200 So what can I do with A transpose? 810 00:48:53,200 --> 00:48:55,700 What's the rule about A transpose? 811 00:48:55,700 --> 00:48:57,890 That if I have A transpose times something, 812 00:48:57,890 --> 00:49:02,610 dotted with something, what can I do? 813 00:49:02,610 --> 00:49:08,640 I can move the A transpose over to the other guy. 814 00:49:08,640 --> 00:49:11,230 And what will it be when I do that? 815 00:49:11,230 --> 00:49:19,280 So I take it away from here, and what do I put there? 816 00:49:19,280 --> 00:49:24,970 A. That's the whole point of transposes. 817 00:49:24,970 --> 00:49:28,480 Transposes, you put them on the other side of the dot product, 818 00:49:28,480 --> 00:49:32,020 you take the transpose, so it would be literally, maybe 819 00:49:32,020 --> 00:49:34,750 A transpose transpose, which is A. 820 00:49:34,750 --> 00:49:37,620 What I just did there is integration by parts. 821 00:49:37,620 --> 00:49:39,800 Well, summation by parts, because I'm 822 00:49:39,800 --> 00:49:41,170 in the discrete case. 823 00:49:41,170 --> 00:49:44,240 The whole idea of integration by parts 824 00:49:44,240 --> 00:49:49,110 amounted to taking A transpose off of u, off of this, 825 00:49:49,110 --> 00:49:51,820 and putting A over there. 826 00:49:51,820 --> 00:49:53,810 Isn't that neat? 827 00:49:53,810 --> 00:49:58,420 And you see that this CAu, Av is just what I have here. 828 00:49:58,420 --> 00:50:03,450 C, A is derivative, so this is CAu, Av. 829 00:50:03,450 --> 00:50:07,540 Inner product. 830 00:50:07,540 --> 00:50:10,730 That's cool. 831 00:50:10,730 --> 00:50:13,710 That's just like how it should be. 832 00:50:13,710 --> 00:50:17,270 I just followed that rule, that A transpose times 833 00:50:17,270 --> 00:50:22,540 something, shall I call it w, inner product with u, 834 00:50:22,540 --> 00:50:26,630 is the same as (w, Au). 835 00:50:26,630 --> 00:50:28,650 That if I bring A transpose over, 836 00:50:28,650 --> 00:50:31,300 it becomes an A. If I bring an A over, 837 00:50:31,300 --> 00:50:33,140 it would become an A transpose. 838 00:50:33,140 --> 00:50:34,880 All right, what about the minimum form? 839 00:50:34,880 --> 00:50:37,320 Have I got one minute to do the minimum form? 840 00:50:37,320 --> 00:50:40,130 Yes. 841 00:50:40,130 --> 00:50:44,220 So what's the minimization that's hiding behind this? 842 00:50:44,220 --> 00:50:49,570 The minimization in the discrete case, do you remember? 843 00:50:49,570 --> 00:50:53,050 We're looking at Ku=f. 844 00:50:53,050 --> 00:50:57,860 And some quadratic quantity from least squares has its minimum 845 00:50:57,860 --> 00:51:00,230 when Ku=f. 846 00:51:00,230 --> 00:51:07,170 And it's 1/2 u transpose Ku minus u transpose f. 847 00:51:07,170 --> 00:51:11,620 Where K is A transpose C A. This is the minimum statement 848 00:51:11,620 --> 00:51:13,620 of the problem. 849 00:51:13,620 --> 00:51:17,810 That if I look for the u that minimizes that quadratic, 850 00:51:17,810 --> 00:51:21,190 it leads me to the equation Ku=f. 851 00:51:21,190 --> 00:51:22,860 So that's the minimum statement. 852 00:51:22,860 --> 00:51:27,330 And if we want it to really look perfectly like the others, 853 00:51:27,330 --> 00:51:39,510 I would put in A transpose C A. Okay. 854 00:51:39,510 --> 00:51:42,720 Can I write down next time, because our time is really up. 855 00:51:42,720 --> 00:51:46,120 It's not fair to-- Al I'm going to do is write down 856 00:51:46,120 --> 00:51:47,680 the same thing here. 857 00:51:47,680 --> 00:51:51,280 I'm minimizing 1/2-- Oh, I'm going to do it anyway. 858 00:51:51,280 --> 00:51:58,790 c(x) du/dx squared, minus the integral of f(x)u(x). 859 00:51:58,790 --> 00:52:02,470 860 00:52:02,470 --> 00:52:05,130 So that's the minimum problem. 861 00:52:05,130 --> 00:52:12,400 Minimize over all u, this quadratic. 862 00:52:12,400 --> 00:52:16,080 This is the right way to see these problems. 863 00:52:16,080 --> 00:52:18,450 You see a differential equation, which 864 00:52:18,450 --> 00:52:20,820 we use for finite differences; you 865 00:52:20,820 --> 00:52:24,090 see a weak form, which we use for finite elements; 866 00:52:24,090 --> 00:52:26,340 and now you see a minimum form. 867 00:52:26,340 --> 00:52:28,540 Okay, that gives you something to think about. 868 00:52:28,540 --> 00:52:31,180 And there'll be a homework on finite elements 869 00:52:31,180 --> 00:52:33,370 that'll give you a chance to use them. 870 00:52:33,370 --> 00:52:35,300 Okay, thank you.