Instructor: Prof. Gilbert Strang
The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To make a donation, or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.
PROFESSOR STRANG: OK, it's Laplace again today. Laplace's equation. And trying to describe-- That's a big area that's a lot of people have worked on for centuries. And for the early centuries, there were always analysis methods. And that's what we got started on last time. And we'll do a bit more. There's no way we could do everything that people have worked on years and years, trying to find ideas about solving. But we can get the idea. And this part, then, is in the section called Laplace's equation. And the exam Wednesday would include some of these constructions. So this is what we did last time, we identified a whole family of solutions to Laplace's equation as polynomials in x and y. Of increasing degree n, and then when we wrote them in polar form they were fantastic. r^n*cos(n*theta) and r^n*sin(n*theta). So my idea is just, we've got them, now let's use them. So how to use these solutions? Because we can take combinations of them, we can create series of sines and cosines. So I'll do that first. Series. And then Green's function, that's the name you remember, we've seen it before. That's the solution when the right side is a delta function. When we have Poisson's equation with a delta there. So that an important one. And then well, a big part of two-dimensional and three-dimensional problems is that the region itself, not just the equation but the region itself, can be all over the place. We'll solve when the region is nice, like a circle or a square, and then there is a way to, in principle, to get other regions. To change from a crazy region to a circle or a square, and then solve it there. So that's called conformal mapping. And I can't let the whole course go without saying a word or two about that. But somehow among numerical methods, it's conformal mapping-- There are packages that do conformal mapping. But they're not the central way to solve these equations numerically. Finite differences, finite elements are. And that's what's coming next week. So this is the future; this is the present, right there.
So, can I just start with an example or two? Like, how would you solve Laplace's equation in a circle? So, in a circle. This is the idea here. I have Laplace's equation. OK, so I've got a whole lot of solutions. And I've even got chalk to write them down. OK, so here's my circle, might as well make it the unit circle. Radius one. And inside here is Laplace. u_xx+u_yy=0. No sources inside. So we have to have sources from somewhere, and they will come from the boundary. So on the boundary, we keep-- Let me think of u as temperature. So I set the temperature on the boundary. u equals some u_0, some known function. This is given. This is the boundary condition. This is the given boundary condition. And it's a function of-- I'm going to use polar coordinates. Polar coordinates are natural for a circle. So this is at r=1, so maybe I should say on the boundary, which is r=1, and going around the angle theta, is given. This is u_0(theta). That's my given boundary condition. This problem is named after Dirichlet, because it's like giving fixed conditions and not Neumann conditions. OK, so I'm just looking for a combination. For a function that solves Laplace's equation inside the circle, and takes on some values around the boundary. And of course the boundary values might be plus one on the top and minus one on the bottom. Or the boundary condition might vary around, it might, variable then come around. But notice that this is a periodic function. This is 2pi-periodic, because the problem's the same. If I increase theta by 2pi I've come back to the same point. So it's got to have that value. OK, so well let me give you a couple of examples first.
Suppose u_0, suppose this function-- Example 1, easy. Suppose u_0 is sin(3theta). So that means I've got a region here, I'm prescribing its temperature on the boundary. And I want to say what does it look like inside? And I'm prescribing right now the sin(3theta), so there theta is zero, so it's zero, the boundary condition's zero there, climbs to one, back to zero, down to minus one. back to zero. Three times, and again comes back to zero again there. So, I'm looking for a solution to Laplace's equation -- and I've got a pretty good list -- that will match u_0 when r is one. So that's the boundary, r is one. So you can tell me what it is. So you can solve this problem, right away. The answer is u of r and theta is, what function will--? Remember I've got my eye on that list. You too, right? I'm just trying to get one that when r is one it will match sin(3theta). What's the good guy? It'll be on that list. Which of those, by itself, here I don't need a series because I've got such a neat u_0 function. I'll get it right with one answer, and what is that answer? I look there. I say what do I do, so that at r=1, I'll match sin(3theta). I'll use r cubed sin(3theta). So the good winner will be r cubed sin(3theta). That solves Laplace's equation. We checked it out, it's the imaginary part of x+iy cubed. We could write it in x and y coordinates if we wanted but we don't want to. And it matches when r is one, it gives us sin(3theta). That's it. And of course I could take any one.
Now suppose I'm trying to match something that's not as simple as sin(3theta). In that case, I may have to use all of them. I mean, it's very, very fluky that one term is going to do it. Usually, so my main examples would be I'll have to match all of them. So what do I do? At r=1, so my general solution is a combination of these guys I worked so hard to get. The solution is of this form. It's some a_0, the constant. And then a_1*r*cos(theta), and b_1*r*sin(theta). And a_2 r squared cos(2theta). And so on. I'm just taking any combination of, I'm using the a's as the coefficients for the cosine guys. And the b's, b_1, b_2, b_3 would be the coefficients for the sine one. OK, that's my general solution. That solves Laplace's equation. Every term did, so every combination will. Now, set r=1. To match that r=1-- and match the boundary. And match u_0(theta), the required temperature around the-- on the boundary. The boundary being where r is one. So this is set r=1. So then u_0(theta), this given thing, has to match this, when r is one. So it's a_0 plus a_1, now what do I write here? r is one, so it's just cos(theta). Now, b_1, r is one, so I just have sin(theta). And I have an a_2*cos(2theta), and a b_2*sin(2theta), and so on. Here, just let me put it together now. I'm given any temperature distribution around the boundary. It's in equilibrium, the temperature, where if the temperature's high near that point and low over here the temperature inside will gradually go from that high point, dot dot dot dot, to the lower one. By matching on the boundary. And this is the match on the boundary.
Now, this is really a lead in to the last part of this course. So whose name is associated with a series like that? Fourier. You recognize that as what's called a Fourier series. So the idea is, I'm given these boundary values. I find their expansion in sines and cosines, and that's what we'll do in November. And then I've got it. Then I know the a's and the b's. And then basically I just put in the r's. r and r squareds and r cubeds and so on. So then I've got the answer inside. In principle it's so easy. So, why is it easy, though? First, it's easy because it's a circle we're working in. If I was in an ellipse or a strange shape, forget it. I mean, so this is quite special. And secondly, it's easy because these functions are so nice. Fourier works with the best functions ever. These sines and cosines. So I'll find a way to find those coefficients, the a's and the b's. Even though there are lots of them, I'll be able to pick them off one at the time, the a's and b's. Once I know the a's and b's, I know the answer. So do you see this is in principle a great way to solve it? In fact, it's the way we used over here, when my u_0 was sin(3theta), then the only term in its Fourier series was 1*sin(3theta). And then the solution was 1 r cubed sin(3theta). So you can learn things from this. For example, oh, what can you learn? One thing I noticed, an important feature of Laplace's equation is that this solution inside the circle gets very smooth. The boundary conditions could be like a delta function. I could say that on the boundary, the temperature is zero everywhere except at that point it spikes. So I could take u_0--
So example 2, and I won't do it in full, would be u_0 on the boundary equal a delta function. A spike at that one point. So all the heat is coming from the source at that one point. Like I've got a fire going there. Keeping the rest of the boundary frozen, the heat's kind of going to come inside. So then how would I proceed? Well, if I have this boundary value as a delta function, I look for its Fourier series, and it's a very important, beautiful, Fourier series for a delta function. Would you want to know it? I mean, we'll know it well in November. Would you want to know it in October? This is Halloween, I guess, so delta-- I'll tell you what it is. Since you insist. delta(theta) I think will-- I think there's a 1/(2pi) or something. Ah, shoot. We'll get it exactly right. It's something like 1 and 2 cos(theta) and 2cos(2theta), I'm not sure about the 2pi. 2cos(2theta), and 2cos(3theta), and so on. We'll know it well when we get there. What I notice about this delta function-- Of course you're going to expect the delta function being somehow a little bit strange. At theta=0, what does that series add up to? Just so you begin to get a hang of Fourier series. At theta=0, what does that series look like? Well, all these cosine thetas are? One. So this series at theta=0 is 1+2+2+2+2... It's infinite. And that's what we want. The delta function is infinite at theta=0. And it's periodic, of course, so that if I go around to theta=2pi I'll come back to zero again. At theta=pi, you could sort of see, well, yeah, theta=pi is a sort of interesting point. At theta is pi, what's the cosine? Is negative one, right? But then the cos(2pi) will be plus one. So at theta=pi, I think I'm getting a one minus a two plus a two, minus a two, plus a two. You see, it's doing its best to cancel itself out and give me the zero that I want, the theta=pi over on the left side of the circle.
Anyway, so that's an extreme example. But now, what's the temperature inside? Can you just follow the same rule? What will be the temperature inside? If that's the delta function, if that's the right series, whatever, it might be a 4pi, I'm not sure, for that. Now, you can tell me what's the solution, what's the temperature distribution inside a circle when one point on the boundary has a heat source, a delta function. What do I do? How do I match this with this guy? I just put in the r's, right? If this is what it's supposed to match when r is one, then when r is-- So maybe I'll put it under here. So the u(r,theta), from the delta guy, is just put in the r's. 1+2r*cos(theta), and 2 r squared cos(2theta), and so on. OK, and eventually 2 r to the 100th cos(100theta), and more. OK, I write this out, you could say why did he write this down? I wanted to make this point that the important feature of the solution to Laplace's equation is how smooth it gets when you go inside the region. And why is that? Because at r=1/2, this term is practically gone, right? If I go halfway into the circle, this term is practically gone. 1/2 to the hundredth power. And if I go to the center of the circle, it's completely gone. In fact, what's the value at the center of the circle? What's the temperature at the center? 1/2pi. This is the only term that's remaining. And it's the average, around the circle. That makes physical sense, I guess. Since the whole thing's completely isotropic, we've got a perfect circle, the value at the center of the circle is always the average going around. The constant term in the Fourier series, this guy. We'll get to know that one very well. That's the average. You're just seeing a little bit of Fourier series early, here. But my point is that you could have high oscillation around the boundary, that damps out because of these powers of r. And inside the circle it's only the low order terms that begin to take over.
This is the kind of trick you have, or not trick but the kind of method that you can use for solving Laplace's equation by an infinite series. Of course, a person who wants a number can complain that, wait a minute, how do I use that infinite series? Well, of course, if you wanted to know the temperature at a particular point you'd have to plug in that value of r, that value of theta, add up the terms until you hope that they become so small that you can ignore them. So infinite series is one form of a solution. And somehow these are examples-- I should use the words separation of variables. Separation of variables is the golden idea in this analysis stuff. Separation of variables means I got the r part separated from the theta part. And that worked great, worked well for a circle. Let's see, maybe for a square I could try to separate x from y. Maybe there's a homework problem, a solution that separates x from y, I think is something like-- So this would be another family. Good for squares, something like sin(kx) sinh times, so this separation is something in x times something in y. Again I'm just mentioning things. I think that that solves Laplace's equation because if I take two x derivatives, that'll bring down k squared, but it'll flip the sign, right? These two derivatives of the sine will be a minus. And if I take-- I need a ky there. And if I took two derivatives of this hyperbolic sine, you remember that's the e^(ky) and the e^(-ky). The two derivatives of that will bring out a k squared with a plus sign. So two x derivatives bring out the minus k squared, two y derivatives bring out a plus k squared and together that solves Laplace's equation. We'll check that in our homework problem. So there would be an example, good for a square. So, there's hope to do an exact solution in a special region. Now, what's this Green's function idea? OK, that's now this is another thing.
So last time we appreciated that this combination x+iy was magic. The idea was that we could take any function of x+iy, and it solves Laplace's equation. Can we just see, sort of very crudely why that is? We saw the pattern, we saw x+iy to the nth. Sort of, we went as far as n=3, checked it all out. But now, really if I want to be able to-- why does that solve Laplace's equation for any n? Should I just plug that into Laplace's equation? What happens if I take the two x derivatives of this thing? So this going to be a typical function of x+iy, typically nice one. If I take two x derivatives, I want to plug it in and see that it really does solve Laplace's equation. So two x derivatives of that will give me what? The first x derivative will bring down an n times this thing to the n-1. And then the next x derivative will bring down an n-1 times this thing to the n-2. So that'll be the u_xx. And what about u_yy? This is my u. I'm sort of just checking that yes, this-- See again, see if it still works Friday what worked Wednesday. That this x+iy is magic and functions of it like powers, exponentials, logarithms, whatever, all solve Laplace's equation. OK, so we did u_xx, and we got-- easy. Now, what happens with u_yy? Do you see the point?
PROFESSOR STRANG: Sorry opposite sign. And why does the sign come out opposite? Because of that guy. Yeah, it's the chain rule, right? The derivative of this with respect to y will give me an n times this thing to one lower power. Times the derivative of what's inside. And the derivative of what's inside is an i. And then the second derivative will bring down an n-1, this guy will be down to n-2, another i will come out and-- Just what you want, right? Because the i squared is minus one, those cancel. When those are equal opposite signs. And we get u_xx+u_yy equaling 0. So that works. And, actually, the same idea would work for any function of x+iy. The two x derivatives just give f''. Two y derivatives will give f'' but the chain rule will bring out i both times and we've got it. OK, I think we just need another couple of examples. And this of course could be in polar coordinates, f of re^(i*theta). That's just, everybody recognizes re^(i*theta) is the same as x+iy? Better just be sure we've got that. x is some point here in the complex plane. iy takes us up to here. So there's x+iy. That's x+iy there, but it's also-- So let me put those in better. So there's x and there's y. Everybody knows this picture, right? This x and this y, now if I want to go to polar coordinates, that angle is theta, this x is r*cos(theta), this y is r*sin(theta), and this guy is re^(i*theta). re^(i*theta). r*cos(theta) plus i*r*sin(theta) is the same as re^i*theta. That's utterly fundamental. Everybody's responsible for that picture of putting the complex numbers into their beautiful polar form. That's what made our r to the nth cos(n*theta) all so simple. Now, what was I aiming to do? Give a particular f.
Now I want to give a particular function f, or maybe a couple of choices. A couple of functions f, and see that their real parts and their imaginary parts solve Laplace's equation. Let me take first a one that works completely. Take the real part and the imaginary part-- Let me take e^(x+iy). It's a function of x+iy, extremely nice function of x+iy, and we can figure out its real and imaginary parts, and we get two solutions to Laplace's equation. The good way is to write this thing as e^x times e^(iy). And again we'll write it as e^x times cos(y)+i*sin(y). So now I can see that the real part-- I can see what the real part is, and I can see what the imaginary part is. The real part will be, that's real. And that's real. so this will so give me e^x*cos(y). And the imaginary part will be e^x*sin(y). You see it. And those will solve Laplace's equation. Can I give a name to this whole field of analysis? This e^z is an analytic -- I should just use that word -- an analytic function. And these guys, the real and imaginary parts, are two harmonic functions. Maybe it's not so important to know the word harmonic function. But analytic function, yeah, I would say that's an important word. Actually, what does it mean? It's a function of z. So we're in the complex plane here now. It's a function of z, e^z, and it can be written as a power series, of course, one plus z plus 1 over 2 factorial z squared and all those guys. So it has a power series. That makes it a combination of our special ones. The great thing about that series is it converges. So an analytic function, an analytic function is the sum of a power series that converges. And this one does. So there's an example. Yeah, so the whole theory of analytic functions is actually, that's Chapter 5 of the textbook. And we won't get beyond this point, I think, in one semester with analytic functions.
So what am I saying, though? I'm saying that the theory of analytic functions is closely tied to Laplace's equation. Because the real and the imaginary parts give me this pair u and s that satisfy, they each satisfy Laplace's equation. And they're connected by the Cauchy-Riemann equations. Boy, it's a lot of mathematics coming real fast here. Now I'd like to take one more example. Instead of the exponential, can we take the logarithm. I want to take the log of x+iy, and I want you to split it into its real and imaginary parts, and get the u and the s that go with that. So this was like the nicest possible. We got a series of, e^z is good for every z, the series converges, fantastic. It's an analytic function everywhere. Best possible. Now we go to one that's not best possible but nevertheless highly valuable. OK, so e^z, I've done. Let me erase e^z, take log z. OK, so now I'm not doing e^z any more. And I want to find the logarithm, OK. So, what's the deal with the logarithm? Real and imaginary parts. Now I'm going to take the log of x+iy. That is a function of x+iy, except at one point it has a problem, right? There's a point where this is not going to be analytic, and there's going to be a special point in the flow which is singular somehow. But away from that point, we have a nice-looking function, the logarithm of x+iy, and now I'd like to get its real and imaginary parts. I'd like to know the u and the s. But nobody in their right mind wants to take the logarithm of a sum, right? That's a very foolish thing to try to do, the log of a sum. What's the good way to get somewhere with this? Real and imaginary part. I can take the log of a product. So the polar is way better again. I want to write this as a log of r e to the-- I want to write it that way. And now what's the log of a product? The sum of the two pieces. So I have log r, and the log of e^(i*theta), which is? Which is i*theta. Boy, look, this is fantastic. Fantastic except at zero. I mean, it's fantastic but it's got a big problem at zero. But it's an extremely important example.
So what's the real part? It's sitting there. This is my u. This is my u(r,theta), my u(x,y), whatever you want, is the log of r. The log of the square root of x squared plus y squared. I claim that again by this magic combination, this log, this-- r is the square root of x squared plus y squared. I claim if you substitute that into Laplace's equation you get zero. It works. And what's the imaginary part, the s? The twin is the imaginary part, which is theta. Oh, what is theta in x, if I wanted it in x and y? What would theta be? It's the arctan, it's the angle whose tangent is something. y/x, so if I really want it in rectangular xy stuff, it's the angle whose tangent is y/x. And again, if you remember in calculus how to take derivatives of this thing and you plug it into Laplace's equation you get zero. It works. So that's a great solution except where? At zero. Except at zero. And this doesn't tell us what's happening at zero. It's an excellent solution. What's the picture? So by Wednesday's exam I'm not expecting you to be an expert on the theory of analytic functions. I don't expect you to know any conformal mappings. By Wednesday, God, that's-- But, I do expect you to have these pictures in mind.
So when I draw those axes, what picture is it that I'm planning on? I'm planning on the equipotentials u equal constant, and the, who are the other guys? The streamlines. The places where the stream functions-- So here is the potential function. So what are the equipotential curves? For that guy? Circles. This is a constant when r is a constant, so the equipotential functions would be circles. I don't want to draw that circle with radius zero, though. I'm nervous about that one. But all the others are great. And what are the streamlines, now? The streamlines are, well, what will the streamlines be? If I've drawn one family, you can tell me the other family. The streamlines will be? Radial lines. Because they're going to be perpendicular to this. And so what do I get, this is the stream function, theta. So what's a streamline? The stream function should be a constant. Theta's a constant. That means I'm going out on rays. Those are all streamlines. Again, everything fantastic. If you look in a little region here you see just a beautiful picture of equipotentials and streamlines crossing them at right angles. Everything great. Just that point is obviously a problem.
Now, and I'm suspecting that there's a source here. I think this flow, which is given by these guys, comes from some kind of a delta function right there. And the flow goes outwards. So I know u, I know v is the gradient of u, right? I could take the x and y derivatives, I'd know the velocity. I know the stream function, the divergence would be zero. Everything great, except at the origin. I think we've got some action at the origin. Because, here's the way to test it. I want to see what's happening at the origin. And I'm going to use the divergence theorem. Yeah. Yeah. I'm going to use the divergence theorem. So the divergence theorem says-- What is the divergence theorem? So this is the key thing that connects double integrals. Let me take a circle of radius R. So that's the circle of radius R. R could be big, or little. So I integrate over the circle of radius R. So what's the deal? v is the same as w. What does the divergence theorem tell me? It tells me that if I integrate, what do I integrate, the divergence of w? dx/dy, or r*dr*d theta. Then I get the flux. So this is a key identity. Fundamentally, more than just the key identity, it's central here. The total flow out of the region must make it through the boundary. So I integrate this boundary, and this boundary is a circle of radius R, and what do I integrate along that circle? What's the other side of the divergence theorem? w dot n. w dot n, around the boundary. And remember, I have this nice-- my curve here is this nice circle. So I'm going to integrate around that circle. First of all, what is n? By definition, n is the normal that points outward, straight out. So it's actually going out that way. At every point it's pointing straight out. And ds-- Yeah, I think we can figure out exactly what that right-hand side is. How do I get that right-hand side? I'm looking for w, and then I have to integrate. OK, here is my u. My u is log r. So what's the gradient of log r? It points outwards. And how large is the derivative? So the derivative of this log r is 1/r. I think that this comes down to, this is the integral. Around the circle. I think that this thing is 1/R. I went pretty quickly there, so I'll ask you to look in the book because this is such an important example it's done there in more detail. So I'm claiming that the derivative is 1/R, and that it points directly out. So the gradient points out. The normal points out, so that I just get exactly 1/R. Now, what is ds? For integrating around the circle what's a little tiny piece of arc on a circle? Of radius R? R d theta. Good man. R d theta. Now that's an integral I can do, right? And what do I get? 2 pi. R cancels R, I'm integrating d theta around from zero to 2pi. The answer is 2pi. So what do I learn from that? I learn that somehow this source in the inside has strength 2pi. What's sitting in there is 2pi times a delta function. This is the solution to Laplace's equation except at that source term, so I really should say Poisson's equation. This has turned out to be the solution to Poisson with a delta, or with 2pi times a delta. We have just solved this important equation. Poisson's equation with a point source. And, of course, that's important because when you can solve with a point source, you can put together all sorts of sources.
And this is called the Green's function. The Green's function is the solution when the source is a delta. So if I divide by 2pi, now I've got it. I divide this by 2pi and there is the Green's function. I have to put that in bold letters. Green's function. It's the solution to the equation when the source is a delta and the answer is u is the log of r over 2pi. So that's the Green's function in 2-D. Physicists, you know, they live and die with these Green's function. Live, let's say, with Green's function. And they would want to know the Green's function in 3-D. So the Green's function in three dimensions also turns out beautifully. This is in, they would say, in free space. This is the Green's function when there's no other charges. Nothing is happening, except for the charge right at the center. And if I'm in two dimensions the Green's function is this log r. So it grows more slowly. It behaves like log r. And in 3-D I think the answer is 1/(4pi*r). It's just amazing that those Green's functions, when the right side is a delta, have such nice formulas. OK, let me take one moment here. I'll tell you what conformal mapping is about. But what's your take-home from this lecture? Your take-home is two methods that we can really use to get a formula for the answer. One method was for Laplace's equation in a circle. Get the boundary conditions in a series of sines and cosines, and then just put in the r's that we need. That's a simple, simple method. Provided we can get started with the Fourier series. The second method is, look at functions of x+iy, and try to pick one that matches your problem. And if your problem has a point source, at the origin, we found the one. So the literature for hundreds of years is aimed at solving other problems. If the point source is somewhere else, what happens? That's not hard. If it's not a point source but some other kind of source, or if the region is not a circle.
Can I say in one final sentence just what to do, this conformal mapping idea, when the region is not a circle. Well, I can say it in one word, make it a circle. I mean, that's what Riemann said, you could do it. You could think of a function, so Riemann said that there's always some function of x+iy, let me call this Riemann's function capital F of x, y. So this is now the idea of conformal mapping. Change variables. Conformal mapping is a change of variables. He picked some function and let its real part be X and let its imaginary part be Y. Capital Y. OK, this is totally ridiculous to put conformal mapping in 30 seconds. But, never mind, let's just do it. The book describes conformal mappings and classical applied math courses do much more with conformal mapping. But the truth is, computationally they're not anything like as much used as these. So what's the idea? The idea is to find a neat function of x+iy, so that your crazy boundary becomes a circle. In the capital X, capital Y variables. So you're mapping the region, ellipse, whatever it looks like, by changing from little x, little y, where it was an ellipse, to capital X, capital Y, where it's a circle. And the point is Laplace's equation stays Laplace's equation. That change of variables does not mess up Laplace's equation. So that then you've got it in a circle. You solve it in a circle, for these guys. And then you go back. In a word, you're able to solve Laplace's equation in this crazy region because you never leave the magic x+iy. You find a combination with that magic x+iy that makes your region into a circle. In the circle we now know how to use capital X plus i capital Y. You're staying with that magic combination and getting the region to be what you like.
So people know a lot of these conformal mappings. A famous one is the Joukowski one, that takes something that looks very like an airfoil, and you can get a circle out of it. So I'll put down Joukowski's name. So that's one that I trust Course 16 still finds valuable. It's a transformation that takes certain shapes and they include shapes that look like airfoils, and produce circles. OK, so sorry about such a quick presentation of such a basic subject. Conformal mapping, not on any exam, that'd be impossible. It's really this stuff that you're number one responsible for.