Lambert W Function

Math for our world
17 followers
Welcome to another video. We have a simple equation to solve. All we need to do is find
x. But no matter how good your high school algebra is, you can't solve this. Oh, you can
solve it if you can sketch the graph of 2 to the x plus x. Yeah, just pick certain values of x
and plot a graph and then find where the line y equals 5 crosses it. Like you see in this graph,
you can easily pick up the answer approximately. Or you can just use Desmos or your calculator
and you'll be able to get what the point is. Absolutely. However, if you don't use a graph,
because actually graphs solve all equations. If you can graph it, you can find the answer.
But say you're not allowed to graph it, or graphing it is not what you want to do.
You want to solve it like an equation, like you would solve a normal equation.
Then you'll need something special. And that's what I want to introduce in this video.
And in another video, I'm going to go in depth about the function which we call the Lambert
w function. It's like the natural log function. And I'm going to explain how it is very similar
to the natural log function that you're already used to. Before we continue, please make sure
you like this video, you share it, you leave a comment in the comment section, and be subscribed
if you're not. Let's get into it. Let me give you a good idea of what I'm talking about.
If I told you that e to the x is equal to 5, if this is all I have, remember that you can solve
this yourself by taking the natural log of both sides. So you can say that ln of e to the x is ln
of 5. And then you can say that this is x because this undoes e because these are inverse functions.
Natural log of e of anything is just that thing. So equals ln of 5. Now, will I be correct to box
this and say this is my final answer? The answer is yes, because ln of 5 is a number. Do I know
exactly what ln of 5 is? Okay, I know because I've memorized it. I've worked with ln of 5 so
frequently that I know what it is. But you don't really need to write the decimal part. You just
need to show that x is ln of 5. And ln of 5 is a number between 1 and 2. Okay, so I know that this
is 1.609. I know that that's what ln of 5 is. But you're okay with writing the answer as the argument
of a function because this is going to be a number. The function I'm about to introduce to you
is going to behave like this also. It's not going to be ln. It's just going to be a w with a bunch
of stuff inside such that if you plug in those values into the function, you will always get
your answer. But you don't really need to plug in the values when you're solving it algebraically.
I just need you to show me that it's going to be ln of something and that's it. Not ln,
the w of something. So let's go here. So this is the Lambert w function. And all it does is
it undoes the product of a number with its exponential expression. So what does this mean?
This just means that if I told you that there's a number 2 and I multiply it by e to the 2,
if I plug this into w, my answer is going to be 2. That's what it means.
Whatever you plug into it that looks like this, something times e to that same thing,
if that's the argument of the Lambert w function, this is what you have. This function w is called
the product log function. So if you have a computer system or you have a calculator that
has the product log, so this is called the product log function. So this is the product
log function and this is what it looks like. So if you want to use the function, it is most
effective just as the natural log of e to the x is equal to x. If you want to plug in anything here
so that you can get what is here, it has to look like this. So you cannot plug in x times e into
natural log and expect to get x. This is not the correct format. So the correct format that works
in the Lambert w function is something e to something and then you're going to get something
back. So what is the mission? The mission is to be able to write whatever equation you have
in such a way that what you plug in here will look like this. So this is 2 to the x. Well,
this is very different from what we have here. Remember it must be e. So this topic calls for a
lot of algebraic manipulations until you can write it in this form. So let's get rid of whatever we
have and see how far we can go. So this is just what we're about to do. We will attempt to write
this equation in this form. There will be something here and this will be on the side and
then we can just plug this into the function, plug this into the function. On the left we're going to
end up with whatever is here which is going to be in terms of x and whatever is here is just
something we plug into the function. So let's begin. I have to start thinking right from the
beginning. Remember there is no e here so what I need is something that looks like something times
2 to a power of an exponent. So what do I do here? Keep this here and move this over.
Let's do that. Leave the exponential expression alone. So you're going to have 2 to the x
will be equal to 5 minus x. So if I divide both sides by 2 to the x, see what happens.
This is over 2 to the x. This is over 2 to the x. This gives me 1 and what I have here is
5 minus x divided by 2 to the x which is the same thing as 2 to the negative x.
It's beginning to look a lot like the argument you're looking for. Why? Because remember what
you're looking for needs to look like this. Something times an exponential function. Although
we don't have e yet but we can write 2 in terms of e. That's easy for us to do. But we want what
is up here to look exactly like this. So let me move this to this side. So we're going to have
5 minus x times 2 to the negative x is equal to 1. What can I do? What can I do? What can I do?
Look, this is, I can rewrite this as negative x plus 5. Actually, it's better for me to write
this as minus x plus 5. That's what I have here. So what can I do here so that what is here is the
same thing as this? I can add 5 to this. And remember that adding 5 to an exponent is the
same thing as multiplying the entire thing by 2 to the 5, right? So this is minus x plus 5,
2 to the negative x multiplied by 2 to the 5th. Because now when I put these two together,
this is going to become plus 5, which looks like this. But whatever you do to the left,
you also do to the right. So I'm going to multiply 1 by 2 to the 5, 1 times 2 to the 5.
So watch this. I have minus x plus 5, 2 to the negative x plus 5. What is here is now what is
on top. I can put this in parentheses. And on the right hand side, I have 32, 32. Come on, my mind
is okay. At this point, we have a perfect recipe for the Lambert w function. Unfortunately,
the w function only takes e. It does not take 2. So we have to rewrite this 2 in terms of e.
And it's easy because we know that e of the natural log of 2 is equal to 2 because this
always takes this out. So we're going to replace 2 with all of this. So watch what's going to
happen. This is going to be negative x plus 5. Instead of writing 2, I'm going to be writing e
to the ln of 2. But that then is raised to power negative x plus 5, which is equal to
32. I haven't changed anything. I just changed the representation of the natural log, I mean,
of 2 to e to the ln of 2. But we know from our laws of exponents that this exponent multiplies
this so that just by multiplying this by this, that's the only thing we have modified. And now
we have this. But what we have done has changed this. What is here is no longer what is here.
In order to make this the same as this, we have to multiply this by ln of 2. And that means we
have to go here and multiply it also by ln of 2. So what we do here is it's going to be negative
negative x plus 5 ln of 2 e to the negative x plus 5 ln of 2 is equal to 32 ln of 2.
Now we have come to our conclusion. If you plug this into the w function,
you're going to plug this also into the w function. Now I don't have enough space
to write that. I think I should write it. But we know now that the w of negative x plus 5
ln of 2 e to the negative x plus 5 ln of 2 will be equal to the w of the right hand side, 32
ln of 2. But when you plug this into w, it just gives you your hibiscus. I don't know what that
flower is. Okay. Okay. I thought I was sketching flowers, but that's a Greek letter. Therefore,
we have negative x plus 5 ln of 2 will be equal to the w or the product log of 32 ln 2.
So I just keep calling this the product log or the w. Okay. So how do you get x? We know how to
solve for x. Divide both sides by ln 2 and then we're going to put a minus sign and then we're
going to subtract 5. That's it, right? So I'm just going to write the final answer here because
if we divide both sides by ln 2, it's going to get rid of this and then this is minus x. You
move the 5 there and then when you switch it, your answer is going to be x will be equal to 5
minus 32 ln 2 divided by the natural log of 2. Okay. Now, I told you before you can leave your
answer like this or you can plug in this value 32 ln 2 into a product log calculator and you get
an answer like this and then you can divide that by the natural log of 2 and guess what your
ultimate answer is going to be. It's going to be the same answer we got when we plotted the graph
in the beginning. So we'll take 1.716 as the approximate answer to this nice problem and
that's it. x equals 1.716. That's if you want to deal with the decimals. Otherwise, just stick to
this x equals 5 minus the product log of 32 ln natural log of 2. Wow! Over natural log of 2.
This answer has a product log and the natural log. All of them logging together. Never stop
learning. Those who stop learning have stopped living. Bye-bye.
