Logarithmic Derivative: Formula & Examples

#Calculus
TL;DR
The logarithmic derivative of a function ff is f′(x)f(x)\frac{f'(x)}{f(x)}, which equals ddx[ln⁡f(x)]\frac{d}{dx}\big[\ln f(x)\big] and measures the relative (percentage) rate of change of ff. Logarithmic differentiation is the technique that puts this to work: take the natural log of both sides, use log laws to turn products, quotients, and powers into sums, differentiate implicitly, then solve for f′(x)f'(x). It is the cleanest way to differentiate messy products and any function with a variable in both the base and the exponent, such as xxx^{x}.
BT
Bhanzu TeamLast updated on September 22, 202610 min read

What Is The Logarithmic Derivative?

The logarithmic derivative of a differentiable function ff, defined wherever f(x)≠0f(x) \neq 0, is the derivative of its natural logarithm:

ddx[ln⁡f(x)]=f′(x)f(x)\frac{d}{dx}\big[\ln f(x)\big] = \frac{f'(x)}{f(x)}

This follows directly from the chain rule applied to ln⁡f(x)\ln f(x): the outside derivative of ln⁡u\ln u is 1u\frac{1}{u}, and the inside derivative is f′(x)f'(x), so the two multiply to give f′(x)f(x)\frac{f'(x)}{f(x)}. When ff can be negative, the same formula holds using ln⁡∣f(x)∣\ln|f(x)|, since ddxln⁡∣f(x)∣=f′(x)f(x)\frac{d}{dx}\ln|f(x)| = \frac{f'(x)}{f(x)} as well.

The quantity f′(x)f(x)\frac{f'(x)}{f(x)} is the relative rate of change: not how fast ff is changing in absolute terms, but how fast it is changing as a fraction of its current size. A derivative f′(x)f'(x) of 200200 means little until you know whether f(x)f(x) is 1010 or 10,00010{,}000. Dividing by f(x)f(x) turns the raw rate into a percentage-per-unit rate, which is why the logarithmic derivative is the natural language of growth and decay.

What Is Logarithmic Differentiation?

Logarithmic differentiation is the method that uses the logarithmic derivative to find f′(x)f'(x) for functions that are painful to differentiate directly. The idea is short: instead of differentiating yy, differentiate ln⁡y\ln y, because the logarithm flattens products into sums using the laws of logarithms.

The method has five steps, and the same five work every time:

  1. Take the natural log of both sides. Start from y=f(x)y = f(x) and write ln⁡y=ln⁡f(x)\ln y = \ln f(x).

  2. Expand with log laws. Turn every product into a sum, every quotient into a difference, and every power into a coefficient.

  3. Differentiate both sides implicitly. The left side becomes 1y⋅y′\frac{1}{y}\cdot y', because yy is a function of xx.

  4. Solve for y′y'. Multiply both sides by yy.

  5. Resubstitute. Replace yy with the original f(x)f(x) so the answer is in terms of xx only.

Step 2 is where the whole payoff lives. The three log laws below are the engine of the technique, and they are worth knowing cold.

Table: How the three logarithm laws turn a tangled function into an easy sum before you differentiate.

Logarithm law

What it does

Example

ln⁡(ab)=ln⁡a+ln⁡b\ln(ab) = \ln a + \ln b

product becomes a sum

ln⁡(x2x−1)=2ln⁡x+12ln⁡(x−1)\ln\big(x^{2}\sqrt{x-1}\big) = 2\ln x + \tfrac{1}{2}\ln(x-1)

ln⁡ab=ln⁡a−ln⁡b\ln\frac{a}{b} = \ln a - \ln b

quotient becomes a difference

ln⁡x32x+3=3ln⁡x−ln⁡(2x+3)\ln\frac{x^{3}}{2x+3} = 3\ln x - \ln(2x+3)

ln⁡(an)=nln⁡a\ln(a^{n}) = n\ln a

power becomes a coefficient

ln⁡((x2+1)3)=3ln⁡(x2+1)\ln\big((x^2+1)^{3}\big) = 3\ln(x^2+1)

The move that makes logarithmic differentiation feel like magic is implicit differentiation in step 3. Because yy depends on xx, the derivative of ln⁡y\ln y is not 1y\frac{1}{y}, it is 1y⋅y′\frac{1}{y}\cdot y'. Forgetting that extra y′y' factor is the single most common slip, and the mistakes section returns to it.

How Do You Differentiate xxx^{x} Using Logarithmic Differentiation?

The function y=xxy = x^{x} (for x>0x > 0) is the headline case, because it has the variable in both the base and the exponent. The power rule needs a constant exponent; the exponential rule needs a constant base. Neither applies, so logs are the way in.

Example 1: Differentiate y=xxy = x^{x}.

Take the natural log of both sides:

ln⁡y=ln⁡(xx)=xln⁡x\ln y = \ln\big(x^{x}\big) = x\ln x

Differentiate both sides with respect to xx. The left side uses the chain rule; the right side uses the product rule:

1y⋅y′=(1)ln⁡x+x⋅1x=ln⁡x+1\frac{1}{y}\cdot y' = (1)\ln x + x\cdot\frac{1}{x} = \ln x + 1

Solve for y′y' by multiplying through by yy, then resubstitute y=xxy = x^{x}:

y′=y(ln⁡x+1)=xx(ln⁡x+1)y' = y(\ln x + 1) = x^{x}(\ln x + 1)

Final answer: y′=xx(ln⁡x+1)y' = x^{x}(\ln x + 1).

An independent check confirms it. Rewrite xx=exln⁡xx^{x} = e^{x\ln x}, then differentiate with the chain rule: ddxexln⁡x=exln⁡x⋅(ln⁡x+1)=xx(ln⁡x+1)\frac{d}{dx}e^{x\ln x} = e^{x\ln x}\cdot(\ln x + 1) = x^{x}(\ln x + 1). The two methods agree.

How Do You Differentiate A Big Product Or Quotient?

The second job logarithmic differentiation does well is a stack of products, quotients, and powers, where the product rule and quotient rule would nest into a long, error-prone mess.

Example 2: Differentiate y=(x2+1)3x−1(2x+3)4y = \dfrac{(x^{2}+1)^{3}\sqrt{x-1}}{(2x+3)^{4}}.

Take logs and expand every factor into a separate term:

ln⁡y=3ln⁡(x2+1)+12ln⁡(x−1)−4ln⁡(2x+3)\ln y = 3\ln(x^{2}+1) + \tfrac{1}{2}\ln(x-1) - 4\ln(2x+3)

Differentiate term by term. Each piece is a simple logarithmic derivative:

1y⋅y′=3⋅2xx2+1+12⋅1x−1−4⋅22x+3\frac{1}{y}\cdot y' = 3\cdot\frac{2x}{x^{2}+1} + \frac{1}{2}\cdot\frac{1}{x-1} - 4\cdot\frac{2}{2x+3}

1y⋅y′=6xx2+1+12(x−1)−82x+3\frac{1}{y}\cdot y' = \frac{6x}{x^{2}+1} + \frac{1}{2(x-1)} - \frac{8}{2x+3}

Multiply by yy and resubstitute the original expression:

y′=(x2+1)3x−1(2x+3)4(6xx2+1+12(x−1)−82x+3)y' = \frac{(x^{2}+1)^{3}\sqrt{x-1}}{(2x+3)^{4}}\left(\frac{6x}{x^{2}+1} + \frac{1}{2(x-1)} - \frac{8}{2x+3}\right)

Final answer: the boxed product above. Notice there is no nested product-and-quotient rule anywhere; every hard term collapsed into a single fraction the moment the log split it off.

How Do You Differentiate (sin⁡x)x(\sin x)^{x}?

Any function of the form (function) raised to (function) yields to the same treatment. Here the base is sin⁡x\sin x and the exponent is xx, so the method is identical to xxx^{x}.

Example 3: Differentiate y=(sin⁡x)xy = (\sin x)^{x}, on an interval where sin⁡x>0\sin x > 0.

ln⁡y=xln⁡(sin⁡x)\ln y = x\ln(\sin x)

Differentiate the right side with the product rule, and use ddxln⁡(sin⁡x)=cos⁡xsin⁡x=cot⁡x\frac{d}{dx}\ln(\sin x) = \frac{\cos x}{\sin x} = \cot x:

1y⋅y′=(1)ln⁡(sin⁡x)+x⋅cot⁡x\frac{1}{y}\cdot y' = (1)\ln(\sin x) + x\cdot\cot x

y′=(sin⁡x)x(ln⁡(sin⁡x)+xcot⁡x)y' = (\sin x)^{x}\big(\ln(\sin x) + x\cot x\big)

Final answer: y′=(sin⁡x)x(ln⁡(sin⁡x)+xcot⁡x)y' = (\sin x)^{x}\big(\ln(\sin x) + x\cot x\big).

The cot⁡x\cot x term is exactly the logarithmic derivative of sin⁡x\sin x, since (sin⁡x)′sin⁡x=cos⁡xsin⁡x\frac{(\sin x)'}{\sin x} = \frac{\cos x}{\sin x}. Every log-based derivative you meet is built from these small f′f\frac{f'}{f} blocks, which is why knowing the differentiation of trigonometric functions pays off here.

Why Does Logarithmic Differentiation Work?

The method is trustworthy because it does not invent new rules. It only reroutes the product, quotient, and power rules through a logarithm. The clearest way to see this is to watch it rebuild a rule you already trust.

Take two positive functions ff and gg, and let y=f(x)g(x)y = f(x)g(x). Then:

  • Taking logs gives ln⁡y=ln⁡f+ln⁡g\ln y = \ln f + \ln g, a sum instead of a product.

  • Differentiating gives y′y=f′f+g′g\frac{y'}{y} = \frac{f'}{f} + \frac{g'}{g}, a sum of two logarithmic derivatives.

  • Multiplying by y=fgy = fg gives y′=fg(f′f+g′g)=f′g+fg′y' = fg\left(\frac{f'}{f} + \frac{g'}{g}\right) = f'g + fg'.

That last line is the ordinary product rule, recovered exactly. The same routine rebuilds the power rule: for y=xny = x^{n}, ln⁡y=nln⁡x\ln y = n\ln x, so y′y=nx\frac{y'}{y} = \frac{n}{x}, giving y′=xn⋅nx=nxn−1y' = x^{n}\cdot\frac{n}{x} = nx^{n-1}.

Geometrically, the logarithmic derivative is the slope of the graph of ln⁡f\ln f against xx. On ordinary axes a doubling from 1010 to 2020 and a doubling from 10001000 to 20002000 look wildly different; on a log scale they have the same proportional rise, so they share the same slope. That is the visual meaning of f′f\frac{f'}{f}: constant relative growth is a straight line on log paper, and its steepness is the logarithmic derivative.

How Does The Logarithmic Derivative Connect To Integration?

Reading the definition backwards turns it into one of the most useful integral patterns in calculus. If differentiating ln⁡∣f(x)∣\ln|f(x)| gives f′(x)f(x)\frac{f'(x)}{f(x)}, then integrating f′(x)f(x)\frac{f'(x)}{f(x)} must return ln⁡∣f(x)∣\ln|f(x)|:

∫f′(x)f(x),dx=ln⁡∣f(x)∣+C\int \frac{f'(x)}{f(x)},dx = \ln|f(x)| + C

Whenever the top of a fraction is the derivative of the bottom, the integral is a natural log. For instance, ∫2xx2+1,dx=ln⁡(x2+1)+C\int \frac{2x}{x^{2}+1},dx = \ln(x^{2}+1) + C, because 2x2x is the derivative of x2+1x^{2}+1. The logarithmic derivative and this integral are the same statement read in two directions, which is why spotting an f′f\frac{f'}{f} shape is a shortcut both when differentiating and when integrating.

Who Invented The Logarithmic Derivative?

Logarithms arrived first as a labour-saving device, decades before calculus existed to give them a derivative. Their inventor spent twenty years building the tables by hand so that other people would not have to.

Two later figures turned the logarithm into a derivative:

  • Gottfried Wilhelm Leibniz (1646–1716, Germany) built the differential calculus and the dd-notation that lets us write ddxln⁡f\frac{d}{dx}\ln f at all, and studied the natural logarithm as the area under 1x\frac{1}{x}.

  • Johann Bernoulli (1667–1748, Switzerland), one of Leibniz's closest correspondents, worked out how to differentiate expressions with a variable exponent, such as xxx^{x}, which is precisely the case logarithmic differentiation was made for.

Where Is The Logarithmic Derivative Used In The Real World?

The relative rate of change is the quantity that many fields actually care about, so the logarithmic derivative appears far beyond a calculus exam.

  • Economics and finance: continuously compounded growth, inflation, and returns are all relative rates, so f′f\frac{f'}{f} is the instantaneous growth rate of a price, an investment, or a GDP figure.

  • Biology and medicine: populations of bacteria, tumours, and species grow in proportion to their current size, which is a differential equation written directly in terms of the logarithmic derivative.

  • Physics and engineering: radioactive decay and RC-circuit discharge obey a constant negative logarithmic derivative, giving the exponential decay curve and its half-life.

  • Chemistry: reaction rate laws and pH, which is itself a base-10 logarithm of concentration, lean on the same relative-rate idea.

  • Data science: log-likelihood optimisation differentiates ln⁡L\ln L rather than LL, using the logarithmic derivative to find the parameters that best fit data.

Across every one of these, the shared question is the same, how fast is this changing compared to how big it already is, and that ratio is the logarithmic derivative.

What Are The Most Common Mistakes With The Logarithmic Derivative?

These three errors account for most lost marks on logarithmic differentiation problems, and they match the documented student mistakes on the derivative of xxx^{x} and the recurring "why multiply by yy" questions readers ask.

Treating yy as a constant when differentiating ln⁡y\ln y.

Where it slips in:

A student writes ddxln⁡y=1y\frac{d}{dx}\ln y = \frac{1}{y} and stops, forgetting that yy is a function of xx.

Don't do this:

Do not drop the chain-rule factor. 1y\frac{1}{y} alone is the derivative only if yy is a plain variable, not a function.

The correct way:

Differentiate implicitly: ddxln⁡y=1y⋅y′\frac{d}{dx}\ln y = \frac{1}{y}\cdot y'. That extra y′y' is the whole reason the method can solve for the derivative.

Splitting the logarithm of a sum.

Where it slips in:

Facing ln⁡(x2+1)\ln(x^{2}+1), a student writes it as ln⁡(x2)+ln⁡(1)\ln(x^{2}) + \ln(1) or 2ln⁡x+ln⁡12\ln x + \ln 1, inventing a law that does not exist.

Don't do this:

Do not break ln⁡(a+b)\ln(a+b) into ln⁡a+ln⁡b\ln a + \ln b. The product law applies to ln⁡(ab)\ln(ab), never to a sum inside the logarithm.

The correct way:

Leave ln⁡(x2+1)\ln(x^{2}+1) intact and differentiate it as a single logarithmic derivative: ddxln⁡(x2+1)=2xx2+1\frac{d}{dx}\ln(x^{2}+1) = \frac{2x}{x^{2}+1}.

Forgetting to multiply back by the original function.

Where it slips in:

A student reaches y′y=ln⁡x+1\frac{y'}{y} = \ln x + 1 and reports ln⁡x+1\ln x + 1 as the answer, leaving y′y' unsolved.

Don't do this:

Do not stop at y′y\frac{y'}{y}. That expression is the logarithmic derivative, not the derivative itself.

The correct way:

Multiply both sides by yy and resubstitute the original function: y′=y(ln⁡x+1)=xx(ln⁡x+1)y' = y(\ln x + 1) = x^{x}(\ln x + 1).

Practice Problems On The Logarithmic Derivative

Use logarithmic differentiation on each. Answers follow every line, and each has been checked.

  1. Differentiate y=x2xy = x^{2x}.
    (Answer: y′=2x2x(ln⁡x+1)y' = 2x^{2x}(\ln x + 1), from ln⁡y=2xln⁡x\ln y = 2x\ln x.)

  2. Differentiate y=xln⁡xy = x^{\ln x}.
    (Answer: y′=xln⁡x⋅2ln⁡xxy' = x^{\ln x}\cdot\dfrac{2\ln x}{x}, from ln⁡y=(ln⁡x)2\ln y = (\ln x)^{2}.)

  3. Differentiate y=x1/xy = x^{1/x}.
    (Answer: y′=x1/x⋅1−ln⁡xx2y' = x^{1/x}\cdot\dfrac{1-\ln x}{x^{2}}.)

  4. Differentiate y=(cos⁡x)xy = (\cos x)^{x} where cos⁡x>0\cos x > 0.
    (Answer: y′=(cos⁡x)x(ln⁡(cos⁡x)−xtan⁡x)y' = (\cos x)^{x}\big(\ln(\cos x) - x\tan x\big).)

  5. Differentiate y=(x+1)2(x−2)3x+3y = \dfrac{(x+1)^{2}(x-2)^{3}}{x+3}.
    (Answer: y′=y(2x+1+3x−2−1x+3)y' = y\left(\dfrac{2}{x+1} + \dfrac{3}{x-2} - \dfrac{1}{x+3}\right).)

  6. Re-derive the derivative of y=x5y = x^{5} with logs.
    (Answer: ln⁡y=5ln⁡x\ln y = 5\ln x, so y′y=5x\dfrac{y'}{y} = \dfrac{5}{x} and y′=5x4y' = 5x^{4}.)

Where Should You Go Next After The Logarithmic Derivative?

The logarithmic derivative sits at the crossroads of logarithms and calculus, and several doors open from here.

  1. Logarithm rules. The product, quotient, and power laws that power step 2 of the method, with more worked expansions.

  2. Differentiation of trigonometric functions. The small f′f\frac{f'}{f} blocks (like cot⁡x\cot x from sin⁡x\sin x) that show up inside every trig-based logarithmic derivative.

  3. Integration. The reverse direction, where the f′f\frac{f'}{f} pattern becomes ln⁡∣f∣+C\ln|f| + C.

If your child is meeting these ideas in India's NCERT Class 12 continuity-and-differentiability chapter or in UK A-Level Mathematics, a live Bhanzu trainer teaches logarithmic differentiation starting from the "why" behind f′f\frac{f'}{f} in the Bhanzu math tutoring program.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the logarithmic derivative of a function?
It is f′(x)f(x)\frac{f'(x)}{f(x)}, equal to ddxln⁡f(x)\frac{d}{dx}\ln f(x). It measures the relative rate of change, how fast ff grows as a fraction of its own size, rather than the raw rate f′(x)f'(x).
What is the difference between the logarithmic derivative and logarithmic differentiation?
The logarithmic derivative is the quantity f′f\frac{f'}{f}. Logarithmic differentiation is the technique that uses it, taking ln⁡\ln of both sides of y=f(x)y = f(x) to find f′(x)f'(x) more easily. One is the object, the other is the method built on it.
When should you use logarithmic differentiation?
Use it in two situations: when a function has a variable in both the base and the exponent, such as xxx^{x} or (sin⁡x)x(\sin x)^{x}, and when a function is a long product, quotient, or power that the product and quotient rules would make messy.
How do you differentiate xxx^{x}?
Write ln⁡y=xln⁡x\ln y = x\ln x, differentiate to get y′y=ln⁡x+1\frac{y'}{y} = \ln x + 1, then multiply by yy to get y′=xx(ln⁡x+1)y' = x^{x}(\ln x + 1). Neither the power rule nor the exponential rule works alone because xx appears in the base and the exponent.
Why do you multiply by yy at the end?
Because differentiating the left side gives y′y\frac{y'}{y}, not y′y'. Multiplying both sides by yy isolates y′y', and resubstituting the original f(x)f(x) writes the answer in terms of xx.
How is the logarithmic derivative related to integration?
They are inverse statements. Since ddxln⁡∣f∣=f′f\frac{d}{dx}\ln|f| = \frac{f'}{f}, it follows that ∫f′(x)f(x),dx=ln⁡∣f(x)∣+C\int \frac{f'(x)}{f(x)},dx = \ln|f(x)| + C. Any fraction whose numerator is the derivative of its denominator integrates to a natural log.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →