### Video Transcript

Given π¦ is equal to π₯ raised to
the power π₯ raised to the power π₯, find dπ¦ by dπ₯.

Weβre given a function π¦ and asked
to find its derivative with respect to π₯. Now whatβs slightly strange about
our function π¦ is that we have a variable π₯ which is raised to the power π₯ which
is itself a variable which again is raised to the power π₯. Itβs difficult to imagine which of
any of our usual methods of differentiation we can apply to this function. Itβs neither a power function, π₯
to the power π where π is a constant, nor an exponential function of the form π
to the power π₯ where π is a constant. So how are we going to
differentiate our function π¦?

Weβre going to use a method called
logarithmic differentiation. This is a four-step process where
the first step is to take the natural logarithms on both sides so that we have the
natural logarithm of π¦ is the natural logarithm of π of π₯, recalling that the
natural logarithm is the logarithm to base π where π is Eulerβs number, which is
approximately 2.71828 and so on. And when we take the natural
logarithms, we need to specify that π¦ is greater than zero since the natural
logarithm of zero is undefined and a log doesnβt exist for negative values.

So with our function π¦, we have π¦
is π₯ raised to the power π₯ raised to the power π₯. And taking natural logarithms, we
have the natural logarithm of π¦ on the left-hand side and the natural logarithm of
π₯ raised to the power π₯ raised to the power π₯ on the right-hand side. But how does this help since it
looks a little bit more complicated than when we started? Well, this brings us to our second
step in logarithmic differentiation. That is, we use the laws of
logarithms to expand or simplify. In our case, in the argument for a
logarithm, we have an exponent. And we can expand this by using the
power rule for logarithms. This tells us that the log to the
base π of π raised to the power π is π times log to the base π of π; that is,
we bring our exponent π down in front of the log and multiply.

Applying this to our right-hand
side, we then have π₯ raised to the power π₯ times the natural logarithm of π₯. Okay, so now we have a product on
our right-hand side, but notice that one of the factors is still π₯ raised to the
power π₯ and we need to get this into the form of something we can
differentiate. So letβs try applying our steps one
and two of logarithmic differentiation again to see if we can simplify any
further. So taking natural logarithms again
on both sides, we have the natural logarithm of the natural logarithm of π¦ is equal
to the natural logarithm of π₯ raised to the power π₯ times the natural logarithm of
π₯.

And now on our right-hand side, we
have the natural logarithm of a product. And so we can apply the product
rule for logarithms; that is, log to the base π of π times π is log to the base
π of π plus log to the base π of π. And letting π equal π₯ to the
power π₯ and π be the natural logarithm of π₯, we have the natural logarithm of π₯
raised to the power π₯ plus the natural logarithm of the natural logarithm of
π₯. Now notice again in our first term
on the right-hand side, the argument of the natural logarithm has an exponent, and
so we can again use the power rule for logarithms. This means we can bring our
exponent π₯ in front of the natural logarithm and multiply by it.

So now, on our right-hand side, we
have a bunch of functions that we know how to differentiate. And this brings us to our third
step of logarithmic differentiation, that is, differentiate both sides with respect
to π₯. So now just making some space, we
have d by dπ₯ of the natural logarithm of the natural logarithm of π¦ is d by dπ₯ of
our right-hand side. Thatβs π₯ natural logarithm of π₯
plus natural logarithm of natural logarithm of π₯. We can split up our right-hand side
since we know that the derivative of a sum is the sum of the derivatives. And letβs begin by differentiating
our second term since we can then apply the same method to our left-hand side.

To differentiate this, we can apply
the known result that d by dπ₯ of the natural logarithm of π’ where π’ is a
differentiable function of π₯ is one over π’ times dπ’ by dπ₯. And thatβs for π’ greater than
zero. For our second term, we have π’ is
equal to the natural logarithm of π₯, and we know that dπ’ by dπ₯ is then one over
π₯. And so by the known result, we have
d by dπ₯ of the natural logarithm of π’ is one over the natural logarithm of π₯
times one over π₯. And thatβs equal to one over π₯
times the natural logarithm of π₯. Now we can apply exactly the same
process to our left-hand side, this time with π’ is equal to the natural logarithm
of π¦.

Remember, our result says we have
one over π’ times dπ’ by dπ₯, which is one over the natural logarithm of π¦ times
its derivative with respect to π₯. But recall that π¦ is actually a
function of π₯. So again, by our known result, we
have one over π¦ times dπ¦ by dπ₯, so the derivative on our left-hand side is one
over the natural logarithm of π¦ times one over π¦ dπ¦ by dπ₯. And making some space, that gives
us one over π¦ times the natural logarithm of π¦ times dπ¦ by dπ₯ on our left-hand
side. Now weβre left with our first term
on the right-hand side. We have the derivative with respect
to π₯ of a product. Thatβs π₯ times natural logarithm
of π₯.

And so we can use the product rule
for differentiation. That is, if π’ and π£ are
differentiable functions of π₯, then d by dπ₯ of their product π’π£ is π’ times dπ£
by dπ₯ plus π£ times dπ’ by dπ₯. So, in our case, if π’ is equal to
π₯ and π£ is the natural logarithm of π₯, we have dπ’ by dπ₯ is equal to one and dπ£
by dπ₯ is one over π₯. And using the product rule, we have
π’, which is π₯, times one over π₯, which is dπ£ by dπ₯, plus the natural logarithm
of π₯, which is π£, times one, which is dπ’ by dπ₯. And since our π₯βs cancel, that
gives us one plus the natural logarithm of π₯.

And making some room again, weβve
completed our differentiation. And this brings us to our final
step four in logarithmic differentiation, that is, to solve for dπ¦ by dπ₯. Rearranging our right-hand side and
multiply both sides by π¦ times the natural logarithm of π¦, on our left-hand side
these cancel and weβre left with dπ¦ by dπ₯ on the left-hand side. And we have that the derivative of
π¦ with respect to π₯ where π¦ is π₯ raised to the power π₯ raised to the power π₯
is equal to π¦ times the natural logarithm of π¦ all multiplied by the natural
logarithm of π₯ plus one over π₯ times the natural logarithm of π₯ plus one.