§ 01What Is a Logarithm? A Quick Plain-English Recap
Before we differentiate logarithms, let us make sure the concept itself is completely clear. Many students treat logs as a mystery: they aren't.
A logarithm answers one question: "What power do I raise the base to in order to get this number?"
For example: log₂(8) = 3, because 2³ = 8. The base is 2, the result is 3, and you're asking "what power of 2 gives me 8?" The answer is 3.
In calculus, one particular base comes up constantly: the number e ≈ 2.718... The logarithm with base e is called the natural logarithm, written ln x. So ln(x) asks: "what power do I raise e to in order to get x?" This is the log you will use in 90% of calculus problems.
The key relationship to keep in your head is this: ln and eˣ are inverses of each other. This means ln(eˣ) = x and e^(ln x) = x. This inverse relationship is exactly what we use to derive the derivative.
§ 02Deriving d/dx[ln x] — The Full Proof
The derivative of ln x is 1/x. We are going to show exactly why, using implicit differentiation. No steps are skipped.
The trick is to use the inverse relationship. Instead of differentiating y = ln x directly, we rewrite it as an exponential equation (which we already know how to differentiate) and then use implicit differentiation.
Start with y = ln x. Rewrite using the definition of the natural log as an inverse of eˣ:
eʸ = x These two equations say exactly the same thing. "y = ln x" and "eʸ = x" are just different ways of writing the same relationship.Differentiate both sides with respect to x. The left side needs the chain rule: eʸ is a composite function (e to the power y, where y depends on x):
eʸ · dy/dx = 1 Right side: d/dx[x] = 1. Left side: d/dx[eʸ] = eʸ · dy/dx by the chain rule, because d/du[eᵘ] = eᵘ and u = y(x).Solve for dy/dx by dividing both sides by eʸ:
dy/dx = 1 / eʸNow substitute back. We started with eʸ = x, so replace eʸ with x:
dy/dx = 1 / x This is the final result. Notice how cleanly the e disappears — it cancels because of the inverse relationship between ln and eˣ.A few things to notice. First, the domain: ln x is only defined for x > 0, so the derivative 1/x is only valid for x > 0. Second, the result is surprisingly simple: the complicated-looking function ln x has a beautifully clean derivative.
What about ln|x|?
When you extend to negative x, you can show that d/dx[ln|x|] = 1/x for all x ≠ 0. This version is what appears in integration: ∫ 1/x dx = ln|x| + c. The absolute value sign handles the negative-x case.
§ 03Logs to Any Base — d/dx[logₐ x]
What if the base is not e? We use one tool: the change-of-base formula. It converts any log into a natural log, which we can then differentiate.
The change-of-base formula
For any base a > 0, a ≠ 1, the change-of-base formula states:
Since ln(a) is just a constant (a is a fixed base, not a variable), we can pull it outside the derivative:
Apply change-of-base to rewrite logₐ x in terms of ln:
logₐ(x) = ln(x) / ln(a) ln(a) is a constant — it does not contain x and does not change when we differentiate.Differentiate. Since 1/ln(a) is a constant multiplier, it comes outside:
d/dx [logₐ x] = (1/ln(a)) · d/dx [ln x] = (1/ln(a)) · (1/x)Write the final result:
d/dx [logₐ x] = 1 / (x · ln a)Check: when a = e, ln(e) = 1, so the formula gives 1/(x · 1) = 1/x, which matches our result for ln x. Good.
For log base 10 (common log), the derivative is 1/(x · ln 10) ≈ 1/(x · 2.303). This is one reason why calculus prefers the natural log, its derivative is the cleaner 1/x.
§ 04Chain Rule with Logs — ln(f(x))
In practice, the argument of a log is rarely just x. It is usually a function of x, like ln(3x²) or ln(sin x). This is where the chain rule enters.
The chain rule says: when you have a function inside another function, multiply the outer derivative by the inner derivative. For ln(g(x)):
In plain English: differentiate what is inside the log, then divide by what is inside the log. That is all it is.
g′(x) = 3
d/dx [ln(3x + 1)] = 3 / (3x + 1)
g′(x) = 2x
d/dx [ln(x²)] = 2x / x² = 2/x
The general chain-rule version for any base
The pattern is the same: differentiate the inside, divide by the inside, then divide by ln(a) for the base correction.
§ 05Complete Reference Table
Every log derivative you will encounter in undergraduate calculus, in one place. The chain-rule column shows the composite version, memorise both rows together.
| Function f(x) | Derivative f′(x) | Composite form d/dx[f(g(x))] | Notes |
|---|---|---|---|
| ln x | 1/x | g′(x) / g(x) | x > 0; most common in calculus |
| ln|x| | 1/x | g′(x) / g(x) | Valid for all x ≠ 0; used in integration |
| logₐ x | 1 / (x ln a) | g′(x) / (g(x) · ln a) | a > 0, a ≠ 1; uses change-of-base |
| log₁₀ x | 1 / (x ln 10) | g′(x) / (g(x) · ln 10) | ln 10 ≈ 2.303 |
| log₂ x | 1 / (x ln 2) | g′(x) / (g(x) · ln 2) | ln 2 ≈ 0.693 |
| ln(x²) | 2/x | Same as 2·ln(x) by log laws → 2·(1/x) | |
| ln(xⁿ) | n/x | Same as n·ln(x) by log laws → n·(1/x) | |
§ 06Log Laws That Make Differentiation Easier
Before differentiating, it is often worth simplifying a log expression using the log laws. A log of a product becomes a sum; a log of a power becomes a multiple. Both are easier to differentiate.
ln(A/B) = ln A − ln B (quotient → difference)
ln(Aⁿ) = n · ln A (power → multiple)
Example of simplifying first
Suppose you need to differentiate y = ln(x³ · √(x+1)). This looks messy, but log laws turn it into something much cleaner:
Apply the product law, log of a product becomes a sum:
y = ln(x³) + ln(√(x+1))Apply the power law to each term. Recall √(x+1) = (x+1)^(1/2):
y = 3·ln(x) + (1/2)·ln(x+1)Now differentiate term by term: no chain rule complexity needed on the first term:
dy/dx = 3 · (1/x) + (1/2) · [1/(x+1)] = 3/x + 1/(2(x+1))Compare this to differentiating ln(x³ · √(x+1)) directly using the chain rule: you'd need to differentiate the product x³ · √(x+1) first using the product rule, then divide. The log-law approach is much cleaner.
§ 07Interactive Graph — Function and Derivative Together
The gold curve is the log function itself. The teal curve is its derivative. Hover to read exact values. Try different functions and notice how the derivative curve reflects the changing slope of the original.
§ 08Twelve Worked Exercises
Attempt each problem yourself before revealing the solution. Every step is explained in plain English: no skipped algebra.
Group A — Basic Natural Log Forms (Exercises 1–4)
- This is the foundational result. Apply the definition directly: dy/dx = 1/x
- State the domain: the answer is only valid where ln is defined: dy/dx = 1/x, x > 0
- Method 1, Chain rule: Inside is g(x) = 5x, so g′(x) = 5. Apply d/dx[ln(g)] = g′/g: dy/dx = 5 / (5x) = 1/x
- Method 2: Log law first: ln(5x) = ln 5 + ln x. Since ln 5 is a constant, its derivative is zero: dy/dx = 0 + 1/x = 1/x
- Both methods agree, any constant multiplier inside ln x disappears when differentiated: dy/dx = 1/x This is why d/dx[ln(cx)] = 1/x for any constant c. The c vanishes. Very useful to know.
- The sum rule says: differentiate each term separately.
- Differentiate 3·ln(x). The constant 3 stays out front: d/dx [3·ln x] = 3 · (1/x) = 3/x
- Differentiate x² using the power rule: d/dx [x²] = 2x
- Add the two results: dy/dx = 3/x + 2x
- Apply the log power law: ln(x⁴) = 4·ln(x).
- Differentiate 4·ln(x): dy/dx = 4 · (1/x) = 4/x
- You would get the same answer using the chain rule (g = x⁴, g′ = 4x³, result = 4x³/x⁴ = 4/x), but the log-law route is faster: dy/dx = 4/x
Group B — Chain Rule with ln (Exercises 5–8)
- Identify the inside function: g(x) = 3x + 7.
- Differentiate the inside: g′(x) = 3.
- Apply d/dx[ln(g)] = g′/g. Divide the inside derivative by the inside function: dy/dx = 3 / (3x + 7)
- This is already fully simplified. State the domain: 3x + 7 > 0, i.e. x > −7/3: dy/dx = 3 / (3x + 7)
- Inside function: g(x) = x² + 1. Note that x² + 1 is always positive for all real x, so no domain restriction issues here.
- Differentiate the inside: g′(x) = 2x.
- Chain rule: dy/dx = 2x / (x² + 1)
- This is fully simplified: numerator and denominator share no common factors: dy/dx = 2x / (x² + 1)
- Inside function: g(x) = sin x. Derivative: g′(x) = cos x.
- Chain rule: dy/dx = cos(x) / sin(x)
- Recognise the trig identity: cos x / sin x = cot x: dy/dx = cot x So d/dx[ln(sin x)] = cot x. This result appears often in integration, ∫cot x dx = ln|sin x| + c.
- Apply log product law: ln(x³ · √(x+1)) = ln(x³) + ln(√(x+1)).
- Apply log power law to each term. √(x+1) = (x+1)^(1/2): y = 3·ln(x) + (1/2)·ln(x+1)
- Differentiate term by term: dy/dx = 3·(1/x) + (1/2)·[1/(x+1)]
- Simplify: dy/dx = 3/x + 1/(2(x+1))
Group C — Combined Rules (Exercises 9–12)
- Product rule with u = x² and v = ln(x): u′ = 2x, v′ = 1/x
- Apply dy/dx = u′v + uv′: dy/dx = 2x·ln(x) + x²·(1/x)
- Simplify the second term, x² / x = x: dy/dx = 2x·ln(x) + x
- Factor out x: dy/dx = x(2·ln x + 1)
- Quotient rule with u = ln(x) and v = x: u′ = 1/x, v′ = 1
- Apply dy/dx = (u′v − uv′) / v²: = [(1/x)·x − ln(x)·1] / x²
- The (1/x)·x in the numerator simplifies to 1: = [1 − ln(x)] / x²
- dy/dx = (1 − ln x) / x²
- Outer function: ln(u) where u = ln(x). Derivative of outer: 1/u = 1/ln(x).
- Inner function: ln(x). Derivative of inner: 1/x.
- Chain rule, multiply them: dy/dx = (1/ln x) · (1/x)
- dy/dx = 1 / (x · ln x) Domain requires x > 0 (for ln x to exist) and ln x > 0 (for ln(ln x) to exist), so x > 1.
- Apply the log quotient law: ln((x²+3)/(2x−1)) = ln(x²+3) − ln(2x−1).
- Differentiate ln(x²+3). Inside: g = x²+3, g′ = 2x: d/dx[ln(x²+3)] = 2x / (x²+3)
- Differentiate ln(2x−1). Inside: g = 2x−1, g′ = 2: d/dx[ln(2x−1)] = 2 / (2x−1)
- Subtract (because of the minus sign between the two log terms): dy/dx = 2x/(x²+3) − 2/(2x−1)
§ 09Common Mistakes
These are the errors that come up most often in assessments. Reading them now costs you nothing: repeating them in an exam costs you marks.
Wrong: Some students confuse "differentiate ln x" with "substitute x = 1 into ln x." These are completely different operations.
Correct: d/dx[ln x] = 1/x. The derivative is a function of x, not a number.
Wrong: This omits the inner derivative. The inside is g = 3x+1, so g′ = 3.
Correct: d/dx[ln(3x+1)] = 3/(3x+1). Always ask: what is inside the log, and what is its derivative?
Wrong: The product law says ln(x · y) = ln x + ln y. Addition inside a log is not the same as multiplication: ln(x + y) cannot be split up.
Correct: Only use log laws when the argument is a product, quotient, or power.
Wrong: Treating ln(x²) as though x² is just sitting there passively, giving 1/x².
Correct: Either use the chain rule (2x / x² = 2/x) or use the log power law first (ln(x²) = 2·ln x, derivative = 2/x). Both give 2/x.
ln x is only defined for x > 0. When the argument is a function g(x), the domain of the derivative is wherever g(x) > 0. Examiners sometimes award marks specifically for stating this.
§ 1010-Question Quiz
Test your understanding. Pick an answer for each question, then press Submit to see your score with full explanations.