Calculus · Grade 12 and undergraduate

Derivatives of Inverse Functions, Logarithms and Inverse Trig

Quick answer

If g is the inverse of f, then g′(x) = 1/f′(g(x)): reflecting a graph in the line y = x swaps rise and run, so slopes at matching points are reciprocals. Applied to e^x, the rule gives the derivative of ln x, 1/x, and of any logarithm. Applied to sine, cosine and tangent on their restricted domains, it gives d/dx arcsin x = 1/√(1 − x²), d/dx arccos x = −1/√(1 − x²) and d/dx arctan x = 1/(1 + x²).

What you'll learn

  • Find the derivative of an inverse function at a point
  • Derive and use the derivatives of ln x and log base b of x
  • Differentiate arcsin, arccos and arctan, with the chain rule

Reciprocal slopes

The graph of an inverse function is the reflection of the original in the line y=xy = x. Take f(x)=x2f(x) = x^2 for x≥0x \ge 0 and its inverse g(x)=xg(x) = \sqrt{x}. The point (2,4)(2, 4) on ff matches the point (4,2)(4, 2) on gg.

Reflected graphs have reciprocal slopes The curve y = x squared for x from 0 to 3 and its inverse y = square root of x, mirror images across the dashed line y = x. The tangent to y = x squared at (2, 4) has slope 4; the tangent to y = square root of x at (4, 2) has slope 1/4. 123456123456xy (2, 4) (4, 2)
  • y = x²
  • y = √x
  • y = x
  • tangent lines
Reflected graphs have reciprocal slopes

At (2,4)(2, 4) the slope of x2x^2 is 44. At (4,2)(4, 2) the slope of x\sqrt{x} is 124=14\tfrac{1}{2\sqrt{4}} = \tfrac{1}{4}. The slopes are reciprocals.

The rule

If gg is the inverse of ff, then f(g(x))=xf(g(x)) = x. Differentiate both sides with the chain rule:

f′(g(x))⋅g′(x)=1⟹g′(x)=1f′(g(x))f'\big(g(x)\big) \cdot g'(x) = 1 \quad\Longrightarrow\quad g'(x) = \frac{1}{f'\big(g(x)\big)}

The slope of the inverse at xx is the reciprocal of the slope of ff at the matching point, g(x)g(x).

Why the slopes are reciprocals

Reflecting in y=xy = x swaps the roles of the two coordinates. A tangent line that rises 44 for every 11 it runs becomes, after the swap, a line that runs 44 for every 11 it rises: slope 14\tfrac{1}{4}.

The chain rule says the same thing about rates. Going through ff and then back through gg returns every input unchanged, so the combined rate is 11, and the two rates must be reciprocals. Undoing a function undoes its rate of change, so the inverse’s slope is one over the original’s. (Where f′f' is 00, the inverse has a vertical tangent and no derivative.)

Logarithms

y=ln⁡xy = \ln x means ey=xe^y = x. Differentiate implicitly:

eydydx=1⟹dydx=1ey=1xe^y \frac{dy}{dx} = 1 \quad\Longrightarrow\quad \frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}

For any base b>0b > 0, b≠1b \ne 1, change of base gives log⁡bx=ln⁡xln⁡b\log_b x = \tfrac{\ln x}{\ln b}, so

ddxln⁡x=1x,ddxlog⁡bx=1xln⁡b\frac{d}{dx}\ln x = \frac{1}{x}, \qquad \frac{d}{dx}\log_b x = \frac{1}{x \ln b}

Inverse trigonometric functions

y=arcsin⁡xy = \arcsin x means sin⁡y=x\sin y = x with −π2≤y≤π2-\tfrac{\pi}{2} \le y \le \tfrac{\pi}{2}. Differentiate implicitly: cos⁡y dydx=1\cos y \, \tfrac{dy}{dx} = 1. On that interval cos⁡y≥0\cos y \ge 0, so cos⁡y=1−sin⁡2y=1−x2\cos y = \sqrt{1 - \sin^2 y} = \sqrt{1 - x^2}. The same method handles the others:

ddxarcsin⁡x=11−x2,ddxarccos⁡x=−11−x2,ddxarctan⁡x=11+x2\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1 - x^2}}, \qquad \frac{d}{dx}\arccos x = -\frac{1}{\sqrt{1 - x^2}}, \qquad \frac{d}{dx}\arctan x = \frac{1}{1 + x^2}

For arctan, tan⁡y=x\tan y = x gives sec⁡2y dydx=1\sec^2 y \, \tfrac{dy}{dx} = 1, and sec⁡2y=1+tan⁡2y=1+x2\sec^2 y = 1 + \tan^2 y = 1 + x^2.

Worked examples

Common mistakes

Practice problems

  1. Let f(x)=2x+sin⁡xf(x) = 2x + \sin x and g=f−1g = f^{-1}. Find g′(0)g'(0).

    Answer

    13\tfrac{1}{3}

    Full solution

    f(0)=0f(0) = 0, so g(0)=0g(0) = 0. f′(x)=2+cos⁡xf'(x) = 2 + \cos x gives f′(0)=3f'(0) = 3, so g′(0)=13g'(0) = \tfrac{1}{3}.

  2. Differentiate y=ln⁡(5x)y = \ln(5x).

    Answer

    y′=1xy' = \tfrac{1}{x}

    Full solution

    15x⋅5=1x\tfrac{1}{5x} \cdot 5 = \tfrac{1}{x}. It matches ln⁡(5x)=ln⁡5+ln⁡x\ln(5x) = \ln 5 + \ln x, whose first term is a constant.

  3. Differentiate y=log⁡10xy = \log_{10} x.

    Answer

    y′=1xln⁡10y' = \tfrac{1}{x \ln 10}

    Full solution

    log⁡10x=ln⁡xln⁡10\log_{10} x = \tfrac{\ln x}{\ln 10}, and ln⁡10\ln 10 is a constant.

  4. Differentiate y=arctan⁡(x2)y = \arctan(x^2).

    Answer

    y′=2x1+x4y' = \tfrac{2x}{1 + x^4}

    Full solution

    11+(x2)2⋅2x\tfrac{1}{1 + (x^2)^2} \cdot 2x.

  5. Differentiate y=arcsin⁡ ⁣(x2)y = \arcsin\!\left(\tfrac{x}{2}\right).

    Answer

    y′=14−x2y' = \tfrac{1}{\sqrt{4 - x^2}}

    Full solution

    11−x2/4⋅12=12(4−x2)/4=14−x2\tfrac{1}{\sqrt{1 - x^2/4}} \cdot \tfrac{1}{2} = \tfrac{1}{2\sqrt{(4 - x^2)/4}} = \tfrac{1}{\sqrt{4 - x^2}}.

  6. Differentiate y=xarctan⁡xy = x \arctan x.

    Answer

    y′=arctan⁡x+x1+x2y' = \arctan x + \tfrac{x}{1 + x^2}

    Full solution

    Product rule: 1⋅arctan⁡x+x⋅11+x21 \cdot \arctan x + x \cdot \tfrac{1}{1 + x^2}.

  7. Find the tangent line to y=ln⁡xy = \ln x at x=ex = e.

    Answer

    y=xey = \tfrac{x}{e}

    Full solution

    The point is (e,1)(e, 1) and the slope is 1e\tfrac{1}{e}. So y−1=1e(x−e)y - 1 = \tfrac{1}{e}(x - e), which simplifies to y=xey = \tfrac{x}{e}.

  8. Let f(x)=e2xf(x) = e^{2x} and g=f−1g = f^{-1}. Find g′(e2)g'(e^2) with the inverse rule, then check it with a formula for gg.

    Answer

    12e2\tfrac{1}{2e^2}

    Full solution

    f(1)=e2f(1) = e^2, so g(e2)=1g(e^2) = 1. f′(x)=2e2xf'(x) = 2e^{2x}, so f′(1)=2e2f'(1) = 2e^2 and g′(e2)=12e2g'(e^2) = \tfrac{1}{2e^2}.

    Check: g(x)=12ln⁡xg(x) = \tfrac{1}{2}\ln x, so g′(x)=12xg'(x) = \tfrac{1}{2x} and g′(e2)=12e2g'(e^2) = \tfrac{1}{2e^2}.

  9. Differentiate y=arccos⁡(ex)y = \arccos(e^x).

    Answer

    y′=−ex1−e2xy' = -\tfrac{e^x}{\sqrt{1 - e^{2x}}}

    Full solution

    −11−(ex)2⋅ex-\tfrac{1}{\sqrt{1 - (e^x)^2}} \cdot e^x. It is defined for x<0x < 0, where ex<1e^x < 1.

  10. A student finds g′(2)g'(2) for g=f−1g = f^{-1}, f(x)=x3+xf(x) = x^3 + x, as 1f′(2)=113\tfrac{1}{f'(2)} = \tfrac{1}{13}. What went wrong?

    Hint

    Which input does ff send to 22?

    Answer

    f′f' must be evaluated at g(2)=1g(2) = 1, not at 22. The answer is 14\tfrac{1}{4}.

    Full solution

    g′(2)=1f′(g(2))g'(2) = \tfrac{1}{f'(g(2))}. Since f(1)=2f(1) = 2, g(2)=1g(2) = 1, and f′(1)=3+1=4f'(1) = 3 + 1 = 4.

    So g′(2)=14g'(2) = \tfrac{1}{4}.

Frequently asked questions

What is the derivative of an inverse function?

If g = f⁻¹, then g′(x) = 1/f′(g(x)). The slope of the inverse at a point is the reciprocal of the original slope at the matching point.

What is the derivative of ln x?

1/x, for x > 0. It follows from writing y = ln x as e^y = x and differentiating implicitly.

What is the derivative of arcsin x?

1/√(1 − x²), for −1 < x < 1.

What is the derivative of arctan x?

1/(1 + x²), for every real x.

What is the derivative of log base b of x?

1/(x ln b). Change of base writes log_b x as ln x / ln b.

What to learn next