Hey everyone, it's been a while since I've made a video if you're curious. I've left my excuses in the description.
I've wanted to make a video on this integral for a long time,
but it doesn't lend itself well to animation so I figured I might as well try a new style that's more similar to Flammable Maths,
Dr. Peyam, and BlackPenRedPen, but of course with my own twist.
In future, I hope to find a balance between
blackboard style videos and animations.
So, the problem at hand is the integral of the natural log of x,
over the natural log of x, over the natural log of x over, ... I think you get the picture.
This is called an infinitely nested function or infinitely
nested recursion.
Often the easiest way to go about this is to play around with our function and see if we can find a closed form expression
of it. We're gonna start by setting y equal to the natural log of
x over the natural log of x over
repeating.
Notice that the expression in blue is actually exactly equal to the red stuff since it's infinitely nested.
And we've actually set this equal to y which means that y is equal to the stuff in blue.
So, y equals the natural log of
x over y.
We can exponentiate both sides to get e to the y equals x over y.
Notice that the natural log cancels out with the e. If
we then multiply by y we get y times e to the y equals x there's no real way to isolate y, so
we'll have to use this tool called the Lambert W function. If you don't know what that is,
don't worry because I'm about to explain it in more depth. So
how do we define the Lambert W function? Well we start with a function f of x
equals x times e to the x.
We then define the inverse of this function as
The Lambert W function. There's no real way to take the inverse of this neatly,
so instead we define this arbitrary function W to be the inverse.
It's got a couple of useful identities that we'll talk about in future videos, but there's only one key identity that we'll need here
We'll start off with taking f of W of x
And since W is now the argument of our function it should be easy to see that instead of x times e to the x,
We'll have W of x times e to the W of x.
However, from up here, we can also see that W is just equal to f inverse
so
we can replace this W with f inverse of x.
By the definition of inverse functions, we can see that this f inverse and this f cancel out and we're just left with x.
Now since these two lines are equal,
we can see that W of x times e to the W of x equals x.
This seems like a fairly arbitrary statement, but I just wanted to make sure that we knew it going forward.
So in order to integrate W of x,
we're going to use a substitution to make our life a little bit easier.
We're going to substitute u equals W of x. By the definition of W
We can see that u times e to the u would be equal to x.
If we differentiate both sides with respect to u we can use the product rule;
derivative of the first - which is just 1 - times the second,
plus the second times derivative of the first, and
we can just write this as dx du. Now in one swoop, we're going to factor out this e to the u and
That's going to give us u plus 1 times e to the u and we can also think about multiplying this
du through. Of course, that's not technically what's happening, but for all intents and purposes...
So now we're just going to plug this back into our integral.
Recall that W is just equal to u and
Our dx is now equal to u plus 1 e to the u times du. Now, we could break this into two separate integrals,
but it's going to be easier just to distribute this u and we're going to end up with the integral of u squared
plus u
times e to the u du. What we've set ourselves up here is a nice little integration by parts problem.
Instead of doing everything by hand, we're going to use tabular or the D-I method.
So we start with taking the derivative of our u squared plus u term and
we're going to be integrating
our e to the u.
Also, don't forget the
alternating pluses and minuses along the slide. So the derivative of u squared plus u is just going to be 2 u plus 1.
This derivative is 2 and then 0. And of course, e to the u is just gonna get us e to the u every time.
Because of the way tabular integration works, we're going to
multiply these alternating signs by their corresponding functions and then multiplying them across the diagonal.
If we do this, we're going to start with plus u squared plus u times e to the u.
Then we're going to have minus 2u plus 1 e to the u, and
then we're going to have plus two e to the u.
Then we can factor out the e to the u. Notice that this is going to be a minus because we're distributing the minus sign.
We can then group all of the like terms in here.
So u squared is by itself, and then plus u
-2u is just gonna be u and then -1 + 2 is just +1.
We can distribute our e to the u back in here.
So this first term is going to be u squared times e to the u, but I'm actually going to write it out fully as
u times u times e to the u - you'll see why in just a second - then we have -u e to the u and
plus e to the u.
Now we're not done quite yet because we still need to put this back in terms of W
and x. Remember that u is just W of x.
So from the identity
we proved earlier, this u e to the u can just be written as x and u of course is just W of x.
Again, we're going to be subtracting u e to the u, which is just x, and
we're going to be adding e to the u. We can't really write this in any nice way,
so we're just gonna leave this as e to the W of x. And there we have it.
Our final answer is equal to x times W of x
minus x plus e to the W of x and that's how we integrate the Lambert W function.
If you like the video give it a like, if you spotted any mistakes or have any questions feel free to leave a comment?.
Thanks for watching.