AP Calculus AB and BC

Derivative of ln x: Answer, Proof, and Mistakes

The derivative of ln x is 1/x, valid for x > 0. In prime notation, if f(x) = ln x then f'(x) = 1/x. For a composite ln(u), the chain rule gives u'/u, not 1/u. This follows because ln x is the inverse of e^x: writing e^y = x and differentiating gives dy/dx = 1/x.

ddx[ln⁡x]=1x\frac{d}{dx}\left[\ln x\right] = \frac{1}{x}

How to prove the derivative of ln x

Start from y=ln⁡xy = \ln x. Because ln⁡x\ln x is the inverse of the natural exponential, this is the same statement as ey=xe^y = x, which already forces x>0x > 0 (the exponential eye^y is always positive).

ey=xe^y = x

Differentiate both sides with respect to xx. The right side is just 1; the left side needs the chain rule, since yy depends on xx.

ey⋅dydx=1e^y \cdot \frac{dy}{dx} = 1

Solve for dydx\frac{dy}{dx} and substitute ey=xe^y = x back in.

dydx=1ey=1x\frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}

Watch the domain

ln⁡x\ln x exists only for x>0x > 0, so the derivative 1x\frac{1}{x} is stated on that domain. The related function ln⁡∣x∣\ln|x| has derivative 1x\frac{1}{x} for every x≠0x \neq 0, and that is the version that appears when you antidifferentiate 1x\frac{1}{x}.

Where ln x's derivative shows up on the AP exam

The rule ddx[ln⁡x]=1x\frac{d}{dx}[\ln x] = \frac{1}{x} is introduced in Unit 2, Topic 2.7 (Derivatives of cos⁡x\cos x, sin⁡x\sin x, exe^x, and ln⁡x\ln x). It is one of the basic derivatives the College Board expects you to recall without deriving, and Unit 2 carries a weighting of 10 to 15 percent on AB and 5 to 10 percent on BC.

It most often appears inside a composite ln⁡(u)\ln(u), where the chain rule (Unit 3, Topic 3.1) applies and you differentiate the inside and divide by it. It also turns up bare, or folded into a product or quotient such as xln⁡xx \ln x.

ddx[ln⁡(u)]=u′u\frac{d}{dx}\left[\ln(u)\right] = \frac{u'}{u}

The proof above is implicit differentiation (Topic 3.2): you write ey=xe^y = x, differentiate both sides, and solve for dydx\frac{dy}{dx}. It works because ln⁡x\ln x is the inverse of exe^x, the relationship that Topic 3.3 (Differentiating Inverse Functions) is built on. That topic's own rule, g′(x)=1f′(g(x))g'(x) = \frac{1}{f'(g(x))}, reaches the same answer directly: with f(x)=exf(x) = e^x and g(x)=ln⁡xg(x) = \ln x, g′(x)=1eln⁡x=1xg'(x) = \frac{1}{e^{\ln x}} = \frac{1}{x}. So this one derivative ties four CED topics together.

CED topicHow the derivative of ln x appears
2.7 Derivatives of cos⁡x\cos x, sin⁡x\sin x, exe^x, and ln⁡x\ln xThe rule itself, memorized in Unit 2
3.1 The Chain RuleComposites such as ln⁡(x2+1)\ln(x^2+1)
3.2 Implicit DifferentiationDifferentiating ey=xe^y = x to prove the rule
3.3 Differentiating Inverse FunctionsThe inverse-function theorem gives the same 1x\frac{1}{x}

Common mistakes with the derivative of ln x

  • Dropping the chain rule. ddx[ln⁡(x2+1)]=2xx2+1\frac{d}{dx}\left[\ln(x^2+1)\right] = \frac{2x}{x^2+1}, not 1x2+1\frac{1}{x^2+1}. The inside's derivative belongs on top.
  • Using it where ln⁡x\ln x is undefined. There is no value of ln⁡x\ln x for x≤0x \le 0, so "1x\frac{1}{x} for all xx" is wrong; write x>0x > 0, or x≠0x \neq 0 if you mean ln⁡∣x∣\ln|x|.
  • Confusing ln⁡x\ln x with exe^x. The exponential keeps itself, ddx[ex]=ex\frac{d}{dx}[e^x] = e^x, while ddx[ln⁡x]=1x\frac{d}{dx}[\ln x] = \frac{1}{x} turns into a power. They are inverses, not the same rule.
  • Treating every logarithm like the natural log. For a general base, ddx[log⁡bx]=1xln⁡b\frac{d}{dx}\left[\log_b x\right] = \frac{1}{x \ln b}. Only base ee gives ln⁡b=1\ln b = 1, which is why ln⁡x\ln x produces the clean 1x\frac{1}{x}.
  • Half-applying the chain rule on (ln⁡x)2(\ln x)^2. The power rule and chain rule combine to 2ln⁡x⋅1x=2ln⁡xx2\ln x \cdot \frac{1}{x} = \frac{2\ln x}{x}; keep both the leftover ln⁡x\ln x and the 1x\frac{1}{x}.

Worked chain-rule examples

Example 1. Differentiate ln⁡(x2+1)\ln(x^2+1). Let u=x2+1u = x^2+1, so u′=2xu' = 2x; apply u′u\frac{u'}{u}.

ddx[ln⁡(x2+1)]=2xx2+1\frac{d}{dx}\left[\ln(x^2+1)\right] = \frac{2x}{x^2+1}

Example 2. Differentiate ln⁡(sin⁡x)\ln(\sin x). Now u=sin⁡xu = \sin x and u′=cos⁡xu' = \cos x, so the quotient simplifies to cot⁡x\cot x.

ddx[ln⁡(sin⁡x)]=cos⁡xsin⁡x=cot⁡x\frac{d}{dx}\left[\ln(\sin x)\right] = \frac{\cos x}{\sin x} = \cot x

Example 3. Differentiate ln⁡(5x)\ln(5x). Here u=5xu = 5x and u′=5u' = 5, and the constant cancels.

ddx[ln⁡(5x)]=55x=1x\frac{d}{dx}\left[\ln(5x)\right] = \frac{5}{5x} = \frac{1}{x}

Why the constant vanished

ln⁡(5x)=ln⁡5+ln⁡x\ln(5x) = \ln 5 + \ln x, and ln⁡5\ln 5 is a constant, so ln⁡(5x)\ln(5x) and ln⁡x\ln x share the same derivative 1x\frac{1}{x}. Any positive constant multiplier inside the log drops out.

Check yourself, not just the answer

Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.

Frequently asked questions

Is the derivative of ln x always 1/x?

On the domain of ln⁡x\ln x, yes: for x>0x > 0, ddx[ln⁡x]=1x\frac{d}{dx}[\ln x] = \frac{1}{x}. If you instead use ln⁡∣x∣\ln|x|, its derivative is 1x\frac{1}{x} for every x≠0x \neq 0. The rule only changes when the base is not ee or the inside is not just xx.

What is the derivative of ln(u)?

Use the chain rule: ddx[ln⁡(u)]=u′u\frac{d}{dx}[\ln(u)] = \frac{u'}{u}, the derivative of the inside divided by the inside. For instance, ddx[ln⁡(3x2+1)]=6x3x2+1\frac{d}{dx}[\ln(3x^2+1)] = \frac{6x}{3x^2+1}.

Why is the derivative of ln x equal to 1/x?

Because ln⁡x\ln x is the inverse of exe^x. Rewrite y=ln⁡xy = \ln x as ey=xe^y = x, differentiate both sides to get ey⋅dydx=1e^y \cdot \frac{dy}{dx} = 1, then solve: dydx=1ey=1x\frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}.

What is the derivative of log base b of x?

ddx[log⁡bx]=1xln⁡b\frac{d}{dx}[\log_b x] = \frac{1}{x \ln b}. For base 10 that is 1xln⁡10\frac{1}{x \ln 10}. Only the natural log, where b=eb = e, gives the clean 1x\frac{1}{x}, since ln⁡e=1\ln e = 1.