Logarithmic differentiation and differentiation of one function w.r.t. another
Try to differentiate with the rules you already know and you get stuck: the power rule needs a fixed exponent, the exponential rule needs a fixed base, and has neither. The fix is to take logarithms first — — which turns the unruly power into a product you can differentiate directly. This trick, logarithmic differentiation, is the standard tool whenever both the base and the exponent of a function carry the variable , and it doubles as a shortcut for messy products and quotients of many factors. A second, related idea in this section asks a different question: not "differentiate with respect to " but "differentiate with respect to ," where both and are themselves functions of . The answer turns out to need nothing new — just the ratio of two ordinary derivatives. Both ideas sit at the end of the Continuity, Differentiability, Differentiation unit, resting on the chain and product rules you have already built.
Take logarithms before differentiating whenever the exponent itself varies, and to compare two functions' rates of change use .
The core idea
Why direct rules fail for . The power rule assumes the exponent is a constant; the exponential rule assumes the base is a constant. When a function has a variable base and a variable exponent — such as or — neither rule applies, and something new is needed.
The logarithmic differentiation method. Take of both sides of so the exponent drops down as a multiplier: . Differentiate both sides with respect to — the chain rule on the left (since ), the product rule on the right — then multiply back by to isolate :
where: is the original function, is the (positive) base function, is the exponent function, and are their ordinary derivatives. The left side, , is only the derivative of — you must multiply through by and substitute back in to get the actual answer. Logarithmic differentiation is also a labour-saving device beyond variable-exponent cases. Because is a sum of logs and is a difference of logs, a gnarly expression like turns, after taking logs, into a sum and difference of simple terms — far easier to differentiate term by term than fighting through the product and quotient rules directly on the original expression.
Differentiation of one function w.r.t. another. Sometimes a problem asks for , where both and are given as functions of — not the rate of change of against , but against . Since both are functions of the same underlying variable , the chain rule gives the ratio directly:
where: and are the two given functions, and , are their ordinary derivatives with respect to . In practice: differentiate with respect to , differentiate with respect to , then divide. This is exactly the same idea used for parametric differentiation (), except here the shared variable is itself rather than an external parameter . Notice, too, that "differentiate w.r.t. " is just the special case : since , the formula collapses to . So the ordinary derivative is not a different concept — it is "derivative with respect to " chosen as the default, and this technique simply lets you choose a different reference variable.
Differentiate (for ) with respect to , showing every algebraic step from taking logarithms through to substituting back the original function, so the general formula above is seen worked in full on the syllabus's own headline example.
Step 1. Take of both sides of . Since , the exponent drops down as a coefficient: .
Step 2. Differentiate both sides with respect to . The left side needs the chain rule (because ): . The right side is a product of and , so the product rule gives . Equating the two sides: .
Step 3. Solve for by multiplying both sides by : .
Step 4. Substitute back , since the answer must be expressed purely in terms of , not :
Result: , confirming that the power rule alone (which would wrongly give ) cannot handle a variable exponent.
Worked example
Differentiate with respect to — an instance of "one function w.r.t. another," reusing the syllabus's own headline example.
Step 1. Name the two functions. Let be the function to differentiate, and be the function to differentiate with respect to.
Step 2. Differentiate with respect to , using the chain rule (outer derivative , times inner derivative ):
Step 3. Differentiate with respect to :
Step 4. Form the ratio and simplify by cancelling the common factor (valid for ):
The derivative of with respect to is . This mirrors the familiar rule "the derivative of with respect to is ," with playing the role of the reference variable — the messy factors from the chain rule cancel out precisely because and share the same underlying variable .
Common traps
- Applying the ordinary power rule to -type expressions, writing — wrong whenever the exponent itself depends on .
- Forgetting to multiply back by at the end of logarithmic differentiation, leaving the answer as instead of solving for and substituting back in.
- In "one function w.r.t. another" problems, computing and correctly but failing to cancel the common factor, leaving an unnecessarily messy final ratio.
- Reaching for logarithmic differentiation on expressions like or , where the base or exponent is already constant and a direct rule suffices — it is unnecessary extra work there.
- Losing track of the domain requirement that imposes; the modulus form extends the method safely where the base function can be negative.
Ask the tutor: want to try logarithmic differentiation on the full triple-tower example , layer by layer?
Why can't I just use the power rule directly on something like y equals x to the x?
The power rule is only valid when the exponent is a fixed constant, and the exponential rule only when the base is fixed. In both the base and the exponent are the variable , so neither assumption holds and both rules give wrong answers. Taking logarithms first converts the troublesome exponent into an ordinary multiplicative factor, , which the product rule can handle cleanly — that is exactly why the method exists.
Do I always have to multiply back by y at the end of logarithmic differentiation?
Yes. Differentiating with respect to only ever produces on the left side, never on its own, because of the chain rule. To finish the problem you must multiply both sides by and then substitute the original expression for back in, since an answer left in terms of an undefined is not a complete derivative. Skipping this step is the single most common way marks are lost on this topic.
How is differentiating u with respect to v different from an ordinary derivative?
An ordinary derivative measures how changes as changes. Differentiating with respect to instead measures how changes as the other function changes, using . In fact the ordinary derivative is just the special case , since then and the ratio collapses to . So it is not a new rule to memorise separately — it is the same chain-rule idea, just letting you pick a reference variable other than .