1 00:00:00,500 --> 00:00:01,310 GILBERT STRANG: OK. 2 00:00:01,310 --> 00:00:04,480 This video is about the third of the great trio 3 00:00:04,480 --> 00:00:07,030 of partial differential equations. 4 00:00:07,030 --> 00:00:09,130 Laplace's equation was number one. 5 00:00:09,130 --> 00:00:11,990 That's called an elliptic equation. 6 00:00:11,990 --> 00:00:14,310 The heat equation was number two. 7 00:00:14,310 --> 00:00:17,040 That's called a parabolic equation. 8 00:00:17,040 --> 00:00:19,340 Now we reach the wave equation. 9 00:00:19,340 --> 00:00:23,270 That's number three, and it's called a hyperbolic equation. 10 00:00:23,270 --> 00:00:26,760 So somehow the three equations remind us 11 00:00:26,760 --> 00:00:30,000 of ellipses, parabolas, and hyperbolas. 12 00:00:30,000 --> 00:00:32,560 They have different types of solutions. 13 00:00:32,560 --> 00:00:36,960 Laplace's equation, you solve it inside a circle 14 00:00:36,960 --> 00:00:39,860 or inside some closed region. 15 00:00:39,860 --> 00:00:43,440 The heat equation and the wave equation, time 16 00:00:43,440 --> 00:00:47,920 enters, and you're going forward in time. 17 00:00:47,920 --> 00:00:52,170 The heat equation is first order in time, du dt. 18 00:00:52,170 --> 00:00:56,620 And the wave equation, the full-scale wave equation, 19 00:00:56,620 --> 00:00:58,570 is second order in time. 20 00:00:58,570 --> 00:01:02,140 That stands for the second derivative, d second u 21 00:01:02,140 --> 00:01:03,480 dt squared. 22 00:01:03,480 --> 00:01:06,360 And it matches the second derivative 23 00:01:06,360 --> 00:01:11,360 in space with a velocity coefficient c squared. 24 00:01:14,300 --> 00:01:16,710 I'm in one-dimensional space. 25 00:01:16,710 --> 00:01:19,810 If I were in three dimensions, where we really 26 00:01:19,810 --> 00:01:24,050 have sound waves and light waves and all the most important 27 00:01:24,050 --> 00:01:29,150 things in life, then there would be a uxx and a uyy 28 00:01:29,150 --> 00:01:35,010 and a uzz, second derivatives in all the space directions. 29 00:01:35,010 --> 00:01:37,670 But that's good enough to do 1D. 30 00:01:37,670 --> 00:01:40,220 So what are the differences, first of all, 31 00:01:40,220 --> 00:01:43,220 between the heat equation and wave equation? 32 00:01:43,220 --> 00:01:51,020 So I'll say heat versus wave equations. 33 00:01:51,020 --> 00:01:55,000 What are the sort of biggest differences? 34 00:01:55,000 --> 00:02:05,550 The heat, the signal travels infinitely fast. 35 00:02:11,390 --> 00:02:15,170 Under the wave equation, the signal 36 00:02:15,170 --> 00:02:22,210 travels with finite velocity, and that velocity 37 00:02:22,210 --> 00:02:30,910 is that number c with speed c. 38 00:02:30,910 --> 00:02:37,020 So fortunately, for sound waves, the wave comes to us, 39 00:02:37,020 --> 00:02:44,680 or when I'm speaking to you, my voice 40 00:02:44,680 --> 00:02:46,810 is traveling out to the microphone 41 00:02:46,810 --> 00:02:50,580 at the speed of sound, the speed c. 42 00:02:50,580 --> 00:02:57,620 And actually, another good thing is after it gets there, 43 00:02:57,620 --> 00:03:01,080 it goes on, and it goes by the point 44 00:03:01,080 --> 00:03:08,060 and doesn't just stay there messing up the future sounds. 45 00:03:08,060 --> 00:03:09,020 It travels. 46 00:03:09,020 --> 00:03:10,820 It dies out. 47 00:03:10,820 --> 00:03:15,960 Whereas-- well, the heat. 48 00:03:15,960 --> 00:03:19,660 So let me try to give an example. 49 00:03:19,660 --> 00:03:23,210 Suppose the initial condition is a delta function. 50 00:03:23,210 --> 00:03:32,060 So if u equals a delta function, a point source, 51 00:03:32,060 --> 00:03:33,210 which is quite normal. 52 00:03:33,210 --> 00:03:38,090 A point source of heat, something really hot, 53 00:03:38,090 --> 00:03:42,960 or a point source of sound, my voice. 54 00:03:42,960 --> 00:03:47,630 So it's that at t equals 0. 55 00:03:47,630 --> 00:03:54,060 Then for the heat equation, there's 56 00:03:54,060 --> 00:03:58,600 a famous solution to the heat equation. 57 00:03:58,600 --> 00:04:05,200 Remember, the heat equation is du dt equal uxx, 58 00:04:05,200 --> 00:04:07,615 first derivative in time. 59 00:04:07,615 --> 00:04:10,940 And the solution that starts from the delta function? 60 00:04:10,940 --> 00:04:13,350 Oh, do I know what it is? 61 00:04:13,350 --> 00:04:17,110 I think there's a 1 over-- there's a square root of 4 62 00:04:17,110 --> 00:04:19,269 pi t. 63 00:04:19,269 --> 00:04:23,496 There's an e to the minus x squared over 4t. 64 00:04:23,496 --> 00:04:26,230 I think perhaps that's it. 65 00:04:26,230 --> 00:04:28,190 Perhaps that's it. 66 00:04:28,190 --> 00:04:32,250 So what do I see from that? 67 00:04:32,250 --> 00:04:34,670 I see big damping out. 68 00:04:34,670 --> 00:04:37,110 I see immediate travel. 69 00:04:37,110 --> 00:04:42,080 As soon as time is just a little beyond 0, then 70 00:04:42,080 --> 00:04:45,860 for every x we get an answer, but it's an extremely, 71 00:04:45,860 --> 00:04:49,860 extremely small answer. e to the minus x squared 72 00:04:49,860 --> 00:04:54,020 is tailing off to 0 incredibly fast. 73 00:04:54,020 --> 00:04:55,690 So that's a very small answer. 74 00:04:55,690 --> 00:04:59,770 Very little of the heat immediately gets very, 75 00:04:59,770 --> 00:05:02,760 very quickly across the ocean. 76 00:05:02,760 --> 00:05:06,510 But in theory, a little bit does. 77 00:05:06,510 --> 00:05:09,640 Whereas for the wave equation, it 78 00:05:09,640 --> 00:05:11,250 takes time to cross the ocean. 79 00:05:11,250 --> 00:05:12,370 We have a tsunami. 80 00:05:12,370 --> 00:05:13,420 We have a wave. 81 00:05:13,420 --> 00:05:14,660 It gets there. 82 00:05:14,660 --> 00:05:16,200 It reaches the other side. 83 00:05:16,200 --> 00:05:19,830 And actually, at the-- it's very important. 84 00:05:19,830 --> 00:05:24,390 What is the speed of that wave to tell people 85 00:05:24,390 --> 00:05:27,380 about a tsunami that's coming, and you can actually 86 00:05:27,380 --> 00:05:30,400 do it, which you couldn't do for the heat equation. 87 00:05:30,400 --> 00:05:38,030 So for the wave equation, what comes out 88 00:05:38,030 --> 00:05:40,530 of a delta function in 1D? 89 00:05:40,530 --> 00:05:45,260 Well, a wave goes to the right, and a wave goes to the left. 90 00:05:45,260 --> 00:05:46,510 That's what happens. 91 00:05:46,510 --> 00:05:51,210 And those waves are 1/2 of a delta function each way. 92 00:05:51,210 --> 00:05:56,140 So the solution is 1/2 of a delta function 93 00:05:56,140 --> 00:05:56,920 that's traveling. 94 00:05:59,710 --> 00:06:03,930 I see that-- let me write down the other half that's 95 00:06:03,930 --> 00:06:09,915 traveling the other way-- delta at x plus ct. 96 00:06:12,550 --> 00:06:14,140 That's a cool solution. 97 00:06:14,140 --> 00:06:18,340 So that means the sound in 1D, the sound, 98 00:06:18,340 --> 00:06:20,605 half of it takes off in one direction 99 00:06:20,605 --> 00:06:23,070 and half in the other direction. 100 00:06:23,070 --> 00:06:29,620 And what happens in each direction is a spike of sound. 101 00:06:29,620 --> 00:06:33,510 You don't hear anything, then at a particular time, 102 00:06:33,510 --> 00:06:36,530 depending on your position x, there's 103 00:06:36,530 --> 00:06:40,720 a particular time when you get 0 in there, 104 00:06:40,720 --> 00:06:43,200 and you hear the signal. 105 00:06:43,200 --> 00:06:48,410 And then as soon as time goes past that, it's past you. 106 00:06:48,410 --> 00:06:54,100 So you get a big shock, and it comes to you with speed c. 107 00:06:54,100 --> 00:06:58,470 If you look at that expression x minus ct, 108 00:06:58,470 --> 00:07:03,636 it's telling you that the speed of the wave 109 00:07:03,636 --> 00:07:07,862 in dx dt for the wave is c. 110 00:07:07,862 --> 00:07:08,830 OK. 111 00:07:08,830 --> 00:07:15,010 So that's a contrast for a very particular initial condition-- 112 00:07:15,010 --> 00:07:21,550 a big wall of water, a big noise, a big bang. 113 00:07:21,550 --> 00:07:23,530 OK. 114 00:07:23,530 --> 00:07:28,230 I want to solve the wave equation, 115 00:07:28,230 --> 00:07:31,960 study it further for other initial conditions. 116 00:07:31,960 --> 00:07:35,400 And of course, initial condition's plural 117 00:07:35,400 --> 00:07:40,670 because the wave equation is second order in time. 118 00:07:40,670 --> 00:07:52,420 So I'm given u at t equals 0 and all x and du dt. 119 00:07:57,560 --> 00:08:00,350 I'm given an initial distribution 120 00:08:00,350 --> 00:08:05,390 of the wall of water, shall we say, 121 00:08:05,390 --> 00:08:11,030 and its velocity, the normal thing. 122 00:08:11,030 --> 00:08:12,850 When I have a second-order equation, 123 00:08:12,850 --> 00:08:16,720 I'm given an initial condition and an initial velocity. 124 00:08:16,720 --> 00:08:19,810 And of course, because it's a partial differential equation, 125 00:08:19,810 --> 00:08:23,190 I'm given those for every x. 126 00:08:23,190 --> 00:08:26,060 So we have functions instead of just two numbers, 127 00:08:26,060 --> 00:08:29,340 and that's where a Fourier series can come in. 128 00:08:29,340 --> 00:08:32,120 So we can solve that by a Fourier series 129 00:08:32,120 --> 00:08:37,380 if we're on a finite-- like a violin string. 130 00:08:37,380 --> 00:08:39,919 You've plucked a violin string that 131 00:08:39,919 --> 00:08:44,560 starts waves going back and forth in the string. 132 00:08:44,560 --> 00:08:46,340 They solve the wave equation. 133 00:08:46,340 --> 00:08:53,240 You hear music, great music if it's a good sound. 134 00:08:53,240 --> 00:08:58,210 Or we could solve it on an infinite line with no boundary, 135 00:08:58,210 --> 00:09:04,060 as in an essentially infinite ocean or waves in space. 136 00:09:04,060 --> 00:09:09,990 Light waves in space are solving the wave equation 137 00:09:09,990 --> 00:09:12,920 with no boundary, as far as we know. 138 00:09:12,920 --> 00:09:13,550 OK. 139 00:09:13,550 --> 00:09:15,420 So which shall I do? 140 00:09:15,420 --> 00:09:20,770 I'll write the solution down in free space, 141 00:09:20,770 --> 00:09:24,550 and then I'll write one down for a violin string. 142 00:09:24,550 --> 00:09:33,300 So in space-- well, it's a one-dimensional space here. 143 00:09:33,300 --> 00:09:38,360 So this would be minus infinity less than x less than infinity. 144 00:09:38,360 --> 00:09:43,330 Then what does the solution to the wave equation look like? 145 00:09:43,330 --> 00:09:52,470 It looks like some function of plus some function 146 00:09:52,470 --> 00:09:55,350 of x plus ct. 147 00:09:55,350 --> 00:10:00,840 Well, that's exactly the form that we had here 148 00:10:00,840 --> 00:10:03,220 when they were delta functions. 149 00:10:03,220 --> 00:10:07,490 Here, in general, they don't have to be delta functions. 150 00:10:07,490 --> 00:10:12,520 I chose that function f and that function g so that at t 151 00:10:12,520 --> 00:10:14,470 equals 0, I'm good. 152 00:10:14,470 --> 00:10:17,930 So at t equals 0-- so I set t equals 0. 153 00:10:17,930 --> 00:10:29,490 At t equals 0, u of 0 and x would be f of x plus g of x. 154 00:10:29,490 --> 00:10:30,550 Good. 155 00:10:30,550 --> 00:10:35,280 But that's only one condition, and I have f and g to find. 156 00:10:35,280 --> 00:10:42,480 So I would also use du dt at the start. 157 00:10:42,480 --> 00:10:43,880 What's the time derivative? 158 00:10:43,880 --> 00:10:49,710 It's minus c f prime at x. 159 00:10:49,710 --> 00:10:59,810 And the time derivative of this will be a plus c g prime at x. 160 00:10:59,810 --> 00:11:01,140 OK. 161 00:11:01,140 --> 00:11:02,590 No big deal. 162 00:11:02,590 --> 00:11:04,660 I'm given two functions. 163 00:11:04,660 --> 00:11:07,510 I've got two functions to find in the answer, 164 00:11:07,510 --> 00:11:09,220 and I've got two equations. 165 00:11:09,220 --> 00:11:13,130 I could solve those for f and g, and it gives a formula 166 00:11:13,130 --> 00:11:17,020 called d'Alembert's formula, named after the person who 167 00:11:17,020 --> 00:11:20,010 put this together. 168 00:11:20,010 --> 00:11:24,680 I'd rather go on to the violin, to a finite string. 169 00:11:24,680 --> 00:11:25,180 OK. 170 00:11:25,180 --> 00:11:28,520 So now I have a finite string, and I'm 171 00:11:28,520 --> 00:11:33,210 holding u equals 0 at the ends. 172 00:11:33,210 --> 00:11:34,310 OK. 173 00:11:34,310 --> 00:11:38,170 And my solution will still be functions that 174 00:11:38,170 --> 00:11:41,950 depend on x minus ct waves. 175 00:11:41,950 --> 00:11:44,990 My solution will still be waves. 176 00:11:44,990 --> 00:11:46,840 The solution that I'm going to write down 177 00:11:46,840 --> 00:11:49,940 comes from a very, very important method 178 00:11:49,940 --> 00:11:53,150 called separation of variables. 179 00:11:53,150 --> 00:11:56,430 I want to separate x from t. 180 00:11:56,430 --> 00:12:00,580 I need to give you a full video about separation of variables. 181 00:12:00,580 --> 00:12:04,300 That's the best tool we have to get solutions 182 00:12:04,300 --> 00:12:06,560 to lots of equations. 183 00:12:06,560 --> 00:12:09,880 So let me just jump to the form of the solution here. 184 00:12:09,880 --> 00:12:14,240 I'm imagining the violin string is at rest. 185 00:12:14,240 --> 00:12:16,890 So it starts with-- I'm imagining, 186 00:12:16,890 --> 00:12:19,060 let's say in our particular problem, 187 00:12:19,060 --> 00:12:21,950 this is 0, the initial velocity. 188 00:12:21,950 --> 00:12:25,000 This is plucked. 189 00:12:25,000 --> 00:12:29,660 The starting position is-- with your finger 190 00:12:29,660 --> 00:12:32,320 you've moved it off 0. 191 00:12:32,320 --> 00:12:34,300 OK. 192 00:12:34,300 --> 00:12:38,420 What do the solutions look like, u of t and x? 193 00:12:38,420 --> 00:12:39,890 OK. 194 00:12:39,890 --> 00:12:48,790 They will be a sum of neat, special, convenient, separated 195 00:12:48,790 --> 00:12:53,430 solutions, with separated meaning t separated from x. 196 00:12:53,430 --> 00:12:57,912 And I think we would have cosine of nct. 197 00:13:00,990 --> 00:13:02,080 I'm going to have a sum. 198 00:13:02,080 --> 00:13:08,110 Oh, we'll have a coefficient, of course, a sub-- well, or b, 199 00:13:08,110 --> 00:13:09,690 or c, or even d. 200 00:13:09,690 --> 00:13:13,800 How about d for a new letter-- d sub n. 201 00:13:13,800 --> 00:13:17,320 And I think-- well, let me finish here. 202 00:13:17,320 --> 00:13:20,320 I'm separating that from I think it would probably 203 00:13:20,320 --> 00:13:24,410 be the sine of nx. 204 00:13:24,410 --> 00:13:25,030 OK. 205 00:13:25,030 --> 00:13:27,060 If we just look at that for a little bit, 206 00:13:27,060 --> 00:13:29,530 that's the point of this video. 207 00:13:29,530 --> 00:13:32,870 So this is x equals 0. 208 00:13:32,870 --> 00:13:35,880 This is, say, x equal pi. 209 00:13:35,880 --> 00:13:37,120 That's for convenience. 210 00:13:37,120 --> 00:13:42,310 Suppose our violin string has length pi, 211 00:13:42,310 --> 00:13:47,710 then, I think, that's what the solution looks like. 212 00:13:47,710 --> 00:13:51,560 It starts from at t equals 0. 213 00:13:55,850 --> 00:13:58,490 At t equals 0, the cosine is 1. 214 00:13:58,490 --> 00:14:01,040 So at t equals 0, this is an initial condition 215 00:14:01,040 --> 00:14:02,400 that we have to match. 216 00:14:02,400 --> 00:14:09,000 This'll tell us the d's will be the sum of dn sine nx. 217 00:14:12,880 --> 00:14:14,390 That tells us the d's. 218 00:14:25,330 --> 00:14:27,260 And then we have our answer. 219 00:14:27,260 --> 00:14:29,570 So the initial condition-- remember, 220 00:14:29,570 --> 00:14:30,650 it's starting at rest. 221 00:14:30,650 --> 00:14:33,190 So the initial velocity is 0, and that's 222 00:14:33,190 --> 00:14:36,640 why I don't have any sine t's because I'm starting 223 00:14:36,640 --> 00:14:38,580 with initial velocity 0. 224 00:14:38,580 --> 00:14:41,190 I only have cosines in the t direction. 225 00:14:41,190 --> 00:14:43,690 But I only have sines in the x direction 226 00:14:43,690 --> 00:14:47,410 because the violin string is being held down 227 00:14:47,410 --> 00:14:50,450 at the two ends, and it's the sine function 228 00:14:50,450 --> 00:14:52,620 that matches that perfectly. 229 00:14:52,620 --> 00:14:57,700 So this is separation of variables, t separated from x. 230 00:14:57,700 --> 00:15:01,170 And I really have to do a proper explanation 231 00:15:01,170 --> 00:15:07,120 of that highly important method of getting solutions like this. 232 00:15:07,120 --> 00:15:08,920 Thank you.