Main content

# Laplacian computation example

A worked example of computing the laplacian of a two-variable function. Created by Grant Sanderson.

## Want to join the conversation?

- Does the laplacian have anything to do with the laplace transform other than being made convention by the same mathematician?(12 votes)
- They are unrelated. The Laplace transformation involves integration, complex numbers, and exponential functions. It is used widely in electrical engineering.

The Laplacian, on the other hand, is related to multi-variable derivatives and was first used by dear Mr. Laplace in his studies of celestial mechanics. Notice how the Laplacian relates to peaks and valleys? When I think of peaks and valleys on a surface and celestial stuff, I immediately think of the curvature of space-time, theorized by Einstein (relativity). A black hole, in theory, is basically an infinitely deep valley in the fabric of space-time. Interestingly enough, Mr. Laplace was one of the first scientists to postulate the existence of black holes and the notion of gravitational collapse! Just a little trivia that I thought you might find interesting.

In addition, the Laplace equation is directly related to the Laplacian--it's the equation where

∇·∇ F = 0 (where F is a function).(38 votes)

- The further we go, the fewer questions are posted here. Only the strong (or interessted) survive.(10 votes)
- This is not a question, but I wanted everyone to see it: MIT OCW Lecture Notes on Differential Equations are wonderful companions to this playlist/course. Don't use Khan Academy's Differential Equations course because it is not comprehensive, and also the handwriting is
*terrible*. I don't know about anyone else, but I can't take the handwriting. Also, check out 3blue1brown (this guy)'s course on Linear Algebra on youtube. Awesome stuff, that.(7 votes)- Hey, I am an autodidact self-studying undergraduate math and physics hope you can give some more tips. Sounds like you have already done these courses.(2 votes)

- shouldn't it be the absolute value of the divergence times the gradient? It makes more sense that way...(2 votes)
- You aren't really multiplying anything; you're taking the divergence
**of**the gradient. It corresponds to dotting the gradient with nabla.(2 votes)

- is the laplacian same as taking the x and y components and finding their second partial derivatives with the x components with respect to x and y with respect to y.(1 vote)

## Video transcript

- [Voiceover] In the last
video, I started introducing the intuition for the Laplacian operator in the context of the
function with this graph and with the gradient
field pictured below it. And here, I'd like to go
through the computation involved in that. So the function that I
had there was defined, it's a two-variable function. And it's defined as f(x,y) is equal to three plus cos(x/2) multiplied by sin(y/2). And then the Laplacian which we define with this right side up triangle is an operator of f. And it's defined to be the divergence, so kind of this nabla dot times the gradient which
is just nabla of f. So two different things going on. It's kind of like a second derivative. And the first thing we need to do is take the gradient of f. And the way we do that, we kind of imagine expanding this upside down triangle as a vector full of partial
differential operators: partial partial x and partial partial y. And with a gradient,
you just kind of imagine multiplying that by the function. So if you imagine multiplying that by the function, what it looks like is just a vector full
of partial derivatives. So you're taking the partial of f with respect to x and the partial of f with respect to y. Those are the two different components of this vector-valued
function that is the gradient. And in our specific example, when we take the partial derivative of f with respect to x what we get, is we look over here. Three just looks like a constant, so nothing happens. Cos(x) halves. The derivative of that with respect to x, we kind of take out that 1/2. So 1/2, and the derivative of cos is -sin. So that's -sin(x/2). And sin(y/2), well, y just
looks like a constant. So sin(y/2) is just some other constant. So in our derivative, we just
keep that constant in there, that sin(y/2). And then, for the second component, the partial derivative of f with respect to y. Three still looks like a constant cause it is a constant. Now, cos(x/2) looks like a constant because as far as y is concerned, x is a constant. So cos(x) is a constant. But then, the sin(y)
has a derivative of cos. And we also take out that 1/2. So you take out that 1/2 when you take the derivative of the inside and then the derivative of the outside is cosine of whatever was in there. So in this case, y/2. And we're multiplying it
by that original constant, cos(x/2). So, still we have our cos(x/2) since it was a constant times
a certain variable thing, x/2. So that's the gradient. And then, the next step here is to take the divergence of that. So with the divergence,
we're going to imagine taking that del operator
and dot producting with this guy. So if I scroll down to
give some room here, we're going to take that, that vector that's kind
of the same vector, the partial partial x. And I say vector, but vector-ish thing, partial partial y. And now we're going to take the dot product with this entire guy. So I'll go ahead and just copy it over. Just kind of copy it over here. And let's see. So, I need a little bit
more room to evaluate this. So here, when you imagine
taking the dot product, you kind of multiply these
top components together. So we're taking the partial derivative with respect to x of this whole guy. And when you do that, well you get, you still have that 1/2 and then the derivative of -sin(x/2). So that 1/2 gets pulled out when you're kind of taking the derivative of the inside. And the derivative of -sin is -cos. So -cos of that stuff on the inside, that x/2. And of course, we still
multiply it by this. This looks like a constant, the sin(y/2). And we multiply by that, sin(y/2). And then we add that because it's kind of like a dot product. You add that to what it looks like when you multiply these
next two components. So we're going to add. And you have that 1/2. And then cos(y/2), when
we differentiate that you also pull out the 1/2. So again, you have that pulled-out 1/2. And the derivative of cos is -sin. So now we're taking -sin of, and then that stuff on the inside, y/2. And we continue multiplying
by the constant. As far as y is concerned,
cos(x/2) is a constant. So we multiply it by that, cos(x/2). And then that, so that is the divergence of that gradient field. So the divergence of the gradient of our original function
gives us the Laplacian. And in fact, we could
simplify this further because both of these terms kind of look identical. But the main point of this video is kind of how you go through that process where you imagine taking the gradient of your function and then
the divergence of that. And that's what the Laplacian is. See you next video.