Continuity and Differentiability · Lesson 5 of 8
Logarithmic Differentiation
“Use logarithms to untangle products and changing powers, then connect the method to familiar derivative rules.”
• Explain why taking logarithms simplifies suitable products, quotients, and roots. • Derive the derivative of a positive variable base raised to a variable power. • Differentiate aˣ, x⁽ˢⁱⁿ ˣ⁾, and expressions involving several changing powers. • Combine logarithmic and implicit differentiation while collecting y′ terms. • Choose between product rule, expansion, and logarithmic differentiation. • State positivity and nonzero-factor conditions and handle zeros with a valid alternative.
Why take a logarithm before differentiating?
The logarithm of a product is a sum, the logarithm of a quotient is a difference, and the logarithm of a power brings its exponent down as a factor. Those changes can turn a difficult derivative into several manageable ones. Logarithmic differentiation does not introduce a new kind of derivative: it reorganises a calculation before the chain and product rules are applied.
Start with a positive function y=f(x) on an interval. Taking natural logarithms gives log y=log f(x). Because y depends on x, differentiating the left side gives y′/y. After differentiating the simplified right side, multiply by y and replace y by its original expression. Forgetting this last multiplication gives only the derivative divided by the function, not the derivative itself.
Problem
Differentiate y=√[(x−3)(x²+4)/(3x²+4x+5)] for x>3.
- 1.For x>3, the factors x−3 and x²+4 are positive. The denominator is also positive: 3x²+4x+5=3(x+2/3)²+11/3. Thus y is positive and direct logarithms are valid.
- 2.Take logarithms and use the laws: log y=(1/2)[log(x−3)+log(x²+4)−log(3x²+4x+5)].
- 3.Differentiate: y′/y=(1/2)[1/(x−3)+2x/(x²+4)−(6x+4)/(3x²+4x+5)].
- 4.Multiply by y. The answer is one half of the original square root times the bracket just obtained.
- 5.The function itself is also defined at x=3 with value zero, but this logarithmic calculation is on x>3. Taking log zero at the endpoint would not be valid.
The useful quantity y′/y is sometimes called a relative rate of change: it measures the derivative relative to the size of the function. The name is optional; the calculation is what matters. A long product can produce a short sum for this ratio, after which one multiplication recovers the derivative.
A variable base and a variable exponent
The ordinary power rule treats the exponent as fixed. The exponential rule treats the base as fixed. When both change, neither rule alone is sufficient. Taking logarithms turns the exponent into a factor, allowing both sources of change to appear through the product rule.
Suppose y is u(x) raised to v(x), where u(x)>0. The positive base gives a positive value for real exponents, so log y=v log u is legitimate. Differentiate this product carefully: v′log u comes from changing the exponent, while v·u′/u comes from changing the base.
| Expression | What changes? | Appropriate result |
|---|---|---|
| xⁿ | Base x changes; exponent n is fixed. | nxⁿ⁻¹ on the relevant domain. |
| aˣ | Exponent x changes; a>0 is fixed. | aˣ log a. |
| xˣ | Both base and exponent change; x>0. | xˣ(1+log x). |
| u(x) raised to v(x) | Both may change; u(x)>0. | uᵛ[v′log u+vu′/u]. |
Problem
Differentiate y=aˣ, where a>0 is a constant.
- 1.Taking logarithms gives log y=x log a. The number log a is constant with respect to x.
- 2.Differentiate to obtain y′/y=log a. Multiplying by y gives y′=aˣlog a.
- 3.Alternatively, write aˣ=exp(x log a) and use the exponential chain rule. Its inner derivative is log a, giving the same result.
- 4.If a=1, the derivative is zero because log1=0. If 0<a<1, log a is negative, consistent with a decreasing positive exponential.
Problem
Differentiate y=x⁽ˢⁱⁿ ˣ⁾ for x>0.
- 1.The positive base allows log y=sin x·log x.
- 2.Differentiate with the product rule: y′/y=cos x·log x+sin x·(1/x).
- 3.Multiply by y=x⁽ˢⁱⁿ ˣ⁾ to obtain y′=x⁽ˢⁱⁿ ˣ⁾[cos x log x+sin x/x].
- 4.Keeping only sin x·x⁽ˢⁱⁿ ˣ⁻¹⁾ would miss the changing exponent. That expression differentiates the base while incorrectly freezing sin x.
Problem
Differentiate (x+1/x)ˣ+x⁽¹⁺¹⁄ˣ⁾ for x>0.
- 1.For the first term let u=x+1/x and v=x. Then u′=1−1/x² and v′=1.
- 2.Its derivative is (x+1/x)ˣ[log(x+1/x)+x(1−1/x²)/(x+1/x)].
- 3.For the second term take base x and exponent 1+1/x. The exponent derivative is −1/x².
- 4.Its derivative is x⁽¹⁺¹⁄ˣ⁾[−log x/x²+(1+1/x)/x]. Add these two derivatives to obtain the requested answer.
- 5.The two summands are differentiated separately. Taking the logarithm of their sum would not split it into two logarithms.
The expression x⁽ˢⁱⁿ ˣ⁾ is not a power xⁿ with a constant n. Likewise, the derivative of aˣ is not xaˣ⁻¹. Ask what changes before choosing a rule. Never split log(A+B) into log A+log B to force a sum into the logarithmic method.
Products, sign changes, and a careful use of absolute values
Directly taking log y requires y>0, and splitting log factors requires positive factors. Some products in the chapter change sign, so we need to describe exactly where a logarithmic calculation is valid. A short extension using absolute values can help on intervals where the factors are nonzero.
For a differentiable nonzero u, the function |u| is positive. If u>0, d(log|u|)/dx=u′/u. If u<0 on the interval, log|u|=log(−u), whose derivative is (−u′)/(−u)=u′/u again. Thus logarithms of absolute values can handle a negative nonzero product without taking a real logarithm of a negative number. This does not make an arbitrary negative base to a real variable power valid.
Problem
Differentiate y=cos x cos2x cos3x.
- 1.On an interval where all three factors are nonzero, use log|y|=log|cos x|+log|cos2x|+log|cos3x|.
- 2.Differentiation gives y′/y=−tan x−2tan2x−3tan3x.
- 3.Multiplying gives the compact answer −cos x cos2x cos3x[tan x+2tan2x+3tan3x] on those intervals.
- 4.To include inputs at which a cosine factor is zero, use the expanded product-rule form: y′=−sin x cos2x cos3x−2cos x sin2x cos3x−3cos x cos2x sin3x.
- 5.The expanded form is defined at every real x and is the derivative there. A compact answer with tangent factors must not be evaluated by dividing by a zero cosine.
Problem
For f(x)=(1+x)(1+x²)(1+x⁴)(1+x⁸), find f′(1).
- 1.Near x=1 all four factors are positive. Logarithmic differentiation gives f′/f=1/(1+x)+2x/(1+x²)+4x³/(1+x⁴)+8x⁷/(1+x⁸).
- 2.At x=1 the right side is 1/2+1+2+4=15/2. The function value is f(1)=2·2·2·2=16.
- 3.Hence f′(1)=16·15/2=120.
- 4.There is also a useful pattern: multiplying f(x) by 1−x successively cancels intermediate powers, leaving 1−x¹⁶. This explains why f(x)=1+x+x²+⋯+x¹⁵, whose derivative at 1 is 1+2+⋯+15=120.
Implicit equations with changing powers
When x and y appear in each other’s exponents, logarithmic differentiation and implicit differentiation work together. Use temporary names for the complicated terms if that keeps the calculation readable. Then collect all y′ terms only after each separate derivative is correct.
Problem
Find y′ if yˣ+xʸ+xˣ=aᵇ, where a,b are fixed and the calculation is on a branch with x>0,y>0.
- 1.For u=yˣ, log u=x log y gives u′=yˣ[log y+(x/y)y′].
- 2.For v=xʸ, log v=y log x gives v′=xʸ[(log x)y′+y/x].
- 3.For w=xˣ, log w=x log x gives w′=xˣ(1+log x). The right side aᵇ is constant, so u′+v′+w′=0.
- 4.The y′ terms combine to [xyˣ⁻¹+xʸlog x]y′. The remaining terms are yˣlog y+yxʸ⁻¹+xˣ(1+log x).
- 5.Therefore y′=−[yˣlog y+yxʸ⁻¹+xˣ(1+log x)]/[xyˣ⁻¹+xʸlog x], where the denominator is nonzero.
- 6.The positivity assumptions justify the logarithms; the denominator condition justifies the final division. Both are part of the answer’s scope.
Problem
Find y′ if xʸ=exp(x−y), using x>0.
- 1.Both sides are positive, so taking logarithms gives y log x=x−y.
- 2.Differentiate: y′log x+y/x=1−y′. Move derivative terms together to get (1+log x)y′=1−y/x.
- 3.Thus y′=(1−y/x)/(1+log x), wherever 1+log x≠0.
- 4.The implicit equation also rewrites as y(1+log x)=x, so on its domain y=x/(1+log x). Its explicit quotient derivative agrees with the implicit result. At x=e⁻¹ the original logged equation would require 0=x, so that input is not on this real solution branch.
Different methods should agree
Logarithmic differentiation is a choice, not a compulsory procedure. A short polynomial product can be differentiated by product rule or expansion more easily. Comparing methods checks the algebra and shows that the underlying derivative is independent of the route taken.
Problem
Differentiate P(x)=(x²−5x+8)(x³+7x+9).
- 1.The product rule gives P′=(2x−5)(x³+7x+9)+(x²−5x+8)(3x²+7).
- 2.Expanding the original product gives P=x⁵−5x⁴+15x³−26x²+11x+72. Term-by-term differentiation gives P′=5x⁴−20x³+45x²−52x+11.
- 3.For a logarithmic calculation at nonzero P, use log|P|=log(x²−5x+8)+log|x³+7x+9|. The first factor is always positive because it equals (x−5/2)²+7/4.
- 4.Differentiating gives P′/P=(2x−5)/(x²−5x+8)+(3x²+7)/(x³+7x+9). Multiplying by P produces exactly the first product-rule expression.
- 5.The polynomial answer is valid for all real x. The logarithmic step itself excludes zeros of the factors, so the unrestricted product-rule or expanded form is the safe answer at such zeros.
For three differentiable functions, first apply the product rule to (uv)w: its derivative is (u′v+uv′)w+uvw′. This becomes u′vw+uv′w+uvw′. On an interval where all three functions are nonzero, log|uvw| gives the same formula after multiplying the sum u′/u+v′/v+w′/w by uvw. The first proof establishes the rule even when a factor vanishes; the logarithmic proof shows the structure on nonzero intervals.
Check your understanding
These questions focus on what the logarithm step actually accomplishes and when it is allowed. Work with separate changing terms in a sum, keep the positivity condition for a variable base, and recover y′ by multiplying the relative derivative by y.
Quiz
For fixed a>0, what is d(aˣ)/dx?
For x>0, what is d[x⁽ˢⁱⁿ ˣ⁾]/dx?
For x>0, what is d(xˣ)/dx?
If y>0 and logarithmic differentiation gives y′/y=R(x), what is y′?
For f(x)=(1+x)(1+x²)(1+x⁴)(1+x⁸), what is f′(1)?
Why can the compact tangent form for d[cos x cos2x cos3x]/dx require care at zeros?
Which is the derivative of uvw?
If xʸ=exp(x−y), which equation follows after logarithms and differentiation?
Practice Problems
- Differentiate √[(x−1)(x−2)/((x−3)(x−4)(x−5))] on an interval where the radicand is positive and no factor is zero. State how logarithms of absolute values can keep the factor calculation valid.
- Differentiate (log x)⁽ᶜᵒˢ ˣ⁾ on x>1, and xˣ−2⁽ˢⁱⁿ ˣ⁾ on x>0. Explain the reason for each domain restriction.
- Differentiate (x+3)²(x+4)³(x+5)⁴ by logarithmic differentiation where the factors are nonzero, then write an expanded product-rule form valid at their zeros.
- Differentiate (x+1/x)ˣ+x⁽¹⁺¹⁄ˣ⁾ for x>0. Keep the two logarithmic calculations separate.
- Differentiate (log x)ˣ+x⁽ˡᵒᵍ ˣ⁾ for x>1. Identify the base and exponent in each term.
- Differentiate (sin x)ˣ+sin⁻¹√x on 0<x<1, and x⁽ˢⁱⁿ ˣ⁾+(sin x)⁽ᶜᵒˢ ˣ⁾ on 0<x<π.
- Differentiate x⁽ˣ ᶜᵒˢ ˣ⁾+(x²+1)/(x²−1) for x>0, x≠1. Use a suitable rule for each summand.
- Differentiate (x cos x)ˣ+(x sin x)⁽¹⁄ˣ⁾ on 0<x<π/2, where the bases are positive.
- For xʸ+yˣ=1, derive the formal equation for y′ under positive-base assumptions without asserting that a solution branch exists. Then differentiate yˣ=xʸ on an allowed positive branch. State the coefficients that must be nonzero; a formal derivative is not an existence proof.
- Find y′ for (cos x)ʸ=(cos y)ˣ on a branch where cos x and cos y are positive.
- For f(x)=(1+x)(1+x²)(1+x⁴)(1+x⁸), find f′(x) and f′(1). Check the value at 1 by the polynomial pattern.
- Differentiate (x²−5x+8)(x³+7x+9) by product rule, expansion, and logarithms. Explain the restricted intermediate domain of the logarithmic method.
- Prove the three-factor product rule first by repeated product rule, then by logarithmic differentiation on nonzero intervals. Explain why the first proof covers zeros as well.
Key Takeaways
• Logarithms simplify suitable products, quotients, roots, and variable powers before differentiation. • For positive y, differentiating log y produces y′/y; multiply by y to recover the derivative. • A changing base and a changing exponent both contribute to the derivative of uᵛ. • The derivative of aˣ for fixed a>0 is aˣlog a, including the constant case a=1. • Implicit variable powers require both logarithmic reasoning and careful collection of y′ terms. • Positivity and nonzero-factor conditions belong to the method; product-rule forms handle zeros when a logarithmic intermediate expression cannot.