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