### Video Transcript

Use logarithmic differentiation to find the derivative of the function π¦ equals two cos π₯ to the power of π₯.

We want to find the derivative of π¦ equals two cos π₯ to the power of π₯. In other words, we want to find ππ¦ by ππ₯. And weβre given a hint as to how to do this. Weβre told to use logarithmic differentiation. So what does logarithmic differentiation mean?

Well, the logarithmic part of a logarithmic differentiation is to take the natural logarithm on both sides of this equation. The differentiation part of logarithmic differentiation is to then differentiate both sides. But before we do that, letβs use some laws of logarithms to make the right-hand side easier to differentiate.

The first thing we can do is write the logarithm of a product as the sum of two logarithms. But this isnβt particularly helpful for the purposes of the logarithmic differentiation. The really helpful law of logarithms here is that the logarithm of π to the power of π is π times the logarithm of π. So with π equal to cos π₯ and π equal to π₯, we find out the natural logarithm of π¦ ln π¦ is ln two plus π₯ ln cos π₯.

Okay, now that weβve simplified as much as possible using the laws of logarithms, itβs time to move on to the differentiation part of logarithmic differentiation. And so we differentiate both sides with respect to π₯. Letβs clear some room to do this differentiating. How do we differentiate ln π¦ with respect to π₯? Well, we can apply the chain rule. With π equal to ln π¦, then the quantity weβre looking for is ππ by ππ₯.

And the chain rule tells us that this is ππ by ππ¦ times ππ¦ by ππ₯. So here, we just apply the chain rule with π equal to ln π¦. And what is π ln π¦ by ππ¦ β the derivative of ln π¦ with respect to π¦? Itβs just one over π¦. The derivative of the natural logarithm function is the reciprocal function.

Okay, now, we move on to the right-hand side, the derivative of a sum is the sum of the derivatives. And as the natural logarithm of two ln two is just a constant, its derivative with respect to π₯ is zero. We only have to worry about the other term. This is the derivative of the product of π₯ and ln cos π₯ with respect to π₯. So we should apply the product rule.

We apply the product rule. Take a moment here if youβd like to pause the video and check that weβve applied it correctly. And we can see that the second term that we get is relatively straightforward. π by ππ₯ of π₯ is just one. And so this term is just ln cos π₯. The other derivative is a bit more difficult. To compute it, weβre going to need the chain rule again.

If we let π equal ln cos π₯, then weβre looking for ππ by ππ₯. And letβs call our auxiliary variable in the chain rule π§. Set π§ equal to cos π₯ and then π is just ln π§. Here, Iβve just used the definition of π to write π by ππ₯ over ln cos π₯ as ππ by ππ₯. Now, we can apply the chain rule. ππ by ππ₯ is ππ by ππ§ times ππ§ by ππ₯. What is ππ by ππ§? As π is equal to ln π§, ππ by ππ§ is one over π§. And what was π§? Well, it was our auxiliary variable, which redefines to be cos π₯.

So letβs replace π§ by cos π₯ to get everything written in terms of π₯. Now, how about ππ§ by ππ₯? Well, π§ is still cos π₯ and the derivative of cos π₯ with respect to π₯ is minus sin π₯. So there we are, weβve applied the chain rule. We found that the derivative of ln cos π₯ is one over cos π₯ times minus sin π₯, which we can of course write as a single fraction. This is minus sin π₯ over cos π₯, which we can further simplify to minus 10π₯.

This is perhaps somewhat surprising and it turns out that this is a relatively useful fact later on. Anyway, remember weβre looking for ππ¦ by ππ₯. And we very nearly have it. On the left-hand side, we have one over π¦ ππ¦ by ππ₯. And so we can multiply both sides by π¦ to find ππ¦ by ππ₯ in terms of π₯ and π¦. Whenever possible, we like to give ππ¦ by ππ₯ in terms of π₯ alone. And it is possible here because we can substitute two times cos π₯ to the π₯ for π¦.

Making this substitution, rearranging somewhat, and writing ππ¦ by ππ₯ as π¦ prime, we get our final answer π¦ prime is two cos π₯ to the π₯ times ln cos π₯ minus π₯ 10π₯.