← Back to modules

Derivatives

Compute derivatives and interpret rates of change.

The derivative of a function measures its instantaneous rate of change at any point. Geometrically, f(a)f'(a) is the slope of the tangent line to y=f(x)y = f(x) at x=ax = a.

Derivatives power every optimization problem, every physics equation involving rates, and every approximation method in applied math. If you understand derivatives deeply, the rest of calculus becomes much easier.

The formal definition is f(a)=limh0f(a+h)f(a)hf'(a) = \lim_{h\to 0} \frac{f(a+h)-f(a)}{h}. This limit captures the idea of zooming in on a curve until it looks like a straight line, then measuring that line's slope.

The definition and what it means

The derivative f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} is the limit of the difference quotient. The difference quotient f(x+h)f(x)h\frac{f(x+h)-f(x)}{h} is the slope of a secant line through two nearby points on the graph of ff.

As h0h\to 0, the secant line becomes the tangent line, and its slope becomes the derivative. This is the geometric heart of the derivative: zoom in far enough on any smooth curve and it looks like a straight line. The derivative measures the slope of that local line.

If this limit exists at x=ax=a, we say ff is differentiable at aa. Differentiability implies continuity — if ff is differentiable at aa, then ff is also continuous at aa. The converse is false: x|x| is continuous at 00 but not differentiable (it has a sharp corner where two lines meet at different slopes).

Places where differentiability fails: sharp corners (like x|x|), cusps (like x2/3x^{2/3}), vertical tangent lines (like x3\sqrt[3]{x} at 00), and discontinuities. At all of these points, the limit of the difference quotient either doesn't exist or is infinite.

Helpful?

Core differentiation rules

Power rule: ddxxn=nxn1\frac{d}{dx} x^n = nx^{n-1} for any real number nn. This works for negative and fractional exponents too: ddxx2=2x3\frac{d}{dx} x^{-2} = -2x^{-3} and ddxx=12x\frac{d}{dx} \sqrt{x} = \frac{1}{2\sqrt{x}}.

Constant multiple rule: ddx[cf(x)]=cf(x)\frac{d}{dx}[cf(x)] = c f'(x). Constants pass through the derivative.

Sum/difference rule: ddx[f(x)±g(x)]=f(x)±g(x)\frac{d}{dx}[f(x) \pm g(x)] = f'(x) \pm g'(x). Differentiate term by term.

Constant rule: ddx[c]=0\frac{d}{dx}[c] = 0. The derivative of any constant is zero.

Helpful?

Derivatives of common functions

Exponentials: ddxex=ex\frac{d}{dx} e^x = e^x — the defining property of ee. No other function equals its own derivative. More generally, ddxax=axlna\frac{d}{dx} a^x = a^x \ln a (the lna\ln a factor accounts for the base).

Logarithms: ddxlnx=1x\frac{d}{dx} \ln x = \frac{1}{x} for x>0x > 0. This is why lnx\ln x appears everywhere in integration — it's the antiderivative of 1/x1/x. More generally, ddxlogax=1xlna\frac{d}{dx} \log_a x = \frac{1}{x \ln a}.

Trigonometric: ddxsinx=cosx\frac{d}{dx} \sin x = \cos x, ddxcosx=sinx\frac{d}{dx} \cos x = -\sin x (note the negative sign!), ddxtanx=sec2x\frac{d}{dx} \tan x = \sec^2 x.

More trig: ddxsecx=secxtanx\frac{d}{dx} \sec x = \sec x \tan x, ddxcscx=cscxcotx\frac{d}{dx} \csc x = -\csc x \cot x, ddxcotx=csc2x\frac{d}{dx} \cot x = -\csc^2 x. Notice the pattern: the 'co-' functions (cos\cos, csc\csc, cot\cot) always pick up a negative sign.

These formulas are non-negotiable — they must be committed to memory. Every more complex derivative ultimately reduces to combinations of these through the product, quotient, and chain rules.

Helpful?

Product rule

When two functions are multiplied: (fg)=fg+fg(fg)' = f'g + fg'.

Think of it as: "derivative of the first times the second, plus the first times the derivative of the second."

Example: ddx[x2sinx]=2xsinx+x2cosx\frac{d}{dx}[x^2 \sin x] = 2x \sin x + x^2 \cos x.

Tip: always check if you can simplify the expression first. Sometimes you don't need the product rule at all.

Helpful?

Quotient rule

For a ratio of functions: (fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}. The order matters — it's fgf'g first, then subtract fgfg'.

Memory aid: "low d-high minus high d-low, over the square of what's below." Here 'high' is the numerator ff, 'low' is the denominator gg, and 'd-' means 'derivative of.'

Alternative: you can often rewrite f/gf/g as fg1f \cdot g^{-1} and use the product rule with the chain rule instead. For simple denominators, sometimes pure algebra avoids the quotient rule entirely.

When to definitely use the quotient rule: when the denominator is a non-trivial function (like cosx\cos x, ex+1e^x + 1, etc.) and rewriting would be messier than just applying the formula.

Helpful?

Chain rule

The chain rule handles compositions: if y=f(g(x))y = f(g(x)), then dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x).

In words: derivative of the outer function (evaluated at the inner function) times the derivative of the inner function.

Example: ddxsin(x3)=cos(x3)3x2\frac{d}{dx} \sin(x^3) = \cos(x^3) \cdot 3x^2. The outer function is sin\sin, the inner function is x3x^3.

Nested chains: for esin(x2)e^{\sin(x^2)}, apply the chain rule twice: esin(x2)cos(x2)2xe^{\sin(x^2)} \cdot \cos(x^2) \cdot 2x.

The chain rule is arguably the most important rule. It appears everywhere: in implicit differentiation, related rates, and integration by substitution.

Helpful?

Inverse trigonometric derivatives

ddxarcsinx=11x2\frac{d}{dx} \arcsin x = \frac{1}{\sqrt{1-x^2}}, valid for x<1|x| < 1. The domain restriction comes from the original function: arcsin\arcsin only takes inputs between 1-1 and 11.

ddxarccosx=11x2\frac{d}{dx} \arccos x = -\frac{1}{\sqrt{1-x^2}}. Notice this is exactly the negative of arcsin\arcsin's derivative. This makes sense because arcsinx+arccosx=π/2\arcsin x + \arccos x = \pi/2 (they always add to a right angle), so their derivatives must be negatives of each other.

ddxarctanx=11+x2\frac{d}{dx} \arctan x = \frac{1}{1+x^2}. This is the most commonly used inverse trig derivative. It appears constantly in integration (the antiderivative of 11+x2\frac{1}{1+x^2} is arctanx+C\arctan x + C).

With the chain rule: ddxarctan(g(x))=g(x)1+[g(x)]2\frac{d}{dx} \arctan(g(x)) = \frac{g'(x)}{1+[g(x)]^2}. For example, ddxarctan(3x)=31+9x2\frac{d}{dx} \arctan(3x) = \frac{3}{1+9x^2}.

Where these come from: use implicit differentiation. If y=arcsinxy = \arcsin x, then siny=x\sin y = x. Differentiate: cosyy=1\cos y \cdot y' = 1, so y=1/cosy=1/1sin2y=1/1x2y' = 1/\cos y = 1/\sqrt{1-\sin^2 y} = 1/\sqrt{1-x^2}.

Helpful?

Implicit differentiation

When yy is defined implicitly by an equation like x2+y2=25x^2 + y^2 = 25, differentiate both sides with respect to xx.

Every time you differentiate a yy term, attach a dydx\frac{dy}{dx} factor (this is the chain rule in action: yy is a function of xx).

Example: differentiate x2+y2=25x^2 + y^2 = 25 to get 2x+2ydydx=02x + 2y\frac{dy}{dx} = 0, then solve dydx=xy\frac{dy}{dx} = -\frac{x}{y}.

Implicit differentiation is essential for curves that can't be written as y=f(x)y = f(x), such as circles, ellipses, and other relations.

Helpful?

Logarithmic differentiation

For complicated products, quotients, or expressions where the variable appears in both the base and exponent (like xxx^x), take the natural log of both sides first, then differentiate implicitly.

Why it works: ln\ln converts products into sums (ln(fg)=lnf+lng\ln(fg) = \ln f + \ln g), quotients into differences (ln(f/g)=lnflng\ln(f/g) = \ln f - \ln g), and powers into products (ln(fg)=glnf\ln(f^g) = g \ln f). These are all easier to differentiate.

The procedure: let y=f(x)y = f(x), take ln\ln of both sides, simplify using log properties, differentiate implicitly (1ydydx=\frac{1}{y} \frac{dy}{dx} = \ldots), then solve for dydx\frac{dy}{dx} by multiplying both sides by yy.

This is the only way to differentiate variable-base, variable-exponent expressions like xsinxx^{\sin x} or (lnx)x(\ln x)^x. Neither the power rule nor the exponential rule applies when both the base and exponent depend on xx.

Helpful?

Higher-order derivatives

The second derivative f(x)f''(x) is the derivative of f(x)f'(x). It measures how the rate of change itself is changing — the 'rate of the rate.'

Notation: f(x)f''(x), d2ydx2\frac{d^2y}{dx^2}, or yy''. For higher orders: f(x)f'''(x), f(4)(x)f^{(4)}(x), etc. The notation d2ydx2\frac{d^2y}{dx^2} reminds you that you're applying ddx\frac{d}{dx} twice.

Physical meaning: if s(t)s(t) is position, then s(t)s'(t) is velocity (how fast position changes) and s(t)s''(t) is acceleration (how fast velocity changes). A car accelerating has positive ss''; a car braking has negative ss''.

The second derivative tells you about concavity: f(x)>0f''(x) > 0 means concave up (the curve bends upward, like a bowl), f(x)<0f''(x) < 0 means concave down (bends downward, like a hill). This is central to the second derivative test for classifying extrema.

Higher-order derivatives appear in Taylor series: the nnth coefficient uses f(n)(a)f^{(n)}(a), letting you approximate any smooth function with a polynomial. Some functions (like exe^x and sinx\sin x) have patterns in their higher derivatives that make the Taylor series elegant.

Helpful?

Tangent lines and linearization

The tangent line to ff at x=ax = a is: y=f(a)+f(a)(xa)y = f(a) + f'(a)(x - a). This is the best linear approximation near aa.

Linearization: f(x)f(a)+f(a)(xa)f(x) \approx f(a) + f'(a)(x-a) for xx close to aa. This is incredibly useful for quick estimates.

Example: approximate 4.1\sqrt{4.1}. Use f(x)=xf(x) = \sqrt{x} at a=4a = 4: f(x)=12xf'(x) = \frac{1}{2\sqrt{x}}, f(4)=14f'(4) = \frac{1}{4}.

Linearization gives 4.12+14(0.1)=2.025\sqrt{4.1} \approx 2 + \frac{1}{4}(0.1) = 2.025. The actual value is 2.02485...2.02485..., very close!

Differentials: dy=f(x)dxdy = f'(x)\,dx gives the approximate change in yy for a small change dxdx in xx.

Helpful?

Interpreting the derivative graphically

f(x)>0f'(x) > 0 on an interval means ff is increasing (going uphill) there. f(x)<0f'(x) < 0 means ff is decreasing (going downhill). The magnitude f(x)|f'(x)| tells you how steep the slope is.

Where f(x)=0f'(x) = 0, the tangent line is horizontal. These are critical points — candidates for local maxima, local minima, or inflection points.

The sign of ff' changing from ++ to - at a critical point signals a local maximum (function goes up then down). From - to ++ signals a local minimum (down then up). If ff' doesn't change sign, the critical point is neither (e.g., f(x)=x3f(x)=x^3 at x=0x=0 — the function flattens momentarily but keeps going in the same direction).

Reading ff''s graph to understand ff: where ff' is above the xx-axis, ff is climbing. Where ff' is below, ff is falling. The xx-intercepts of ff' correspond to the peaks and valleys (or flat inflection points) of ff. The higher f|f'| is, the steeper ff is at that point.

You can also go the other way: given the graph of ff, sketch ff' by estimating the slope at various points. Steep uphill = large positive ff'; flat = ff' near zero; steep downhill = large negative ff'.

Helpful?

Hyperbolic functions and their derivatives

The hyperbolic functions are built from exponentials: sinhx=exex2\sinh x = \frac{e^x - e^{-x}}{2} and coshx=ex+ex2\cosh x = \frac{e^x + e^{-x}}{2}.

They satisfy cosh2xsinh2x=1\cosh^2 x - \sinh^2 x = 1 (compare with cos2x+sin2x=1\cos^2 x + \sin^2 x = 1 for trig).

Derivatives mirror trig but without the sign changes: ddxsinhx=coshx\frac{d}{dx} \sinh x = \cosh x and ddxcoshx=sinhx\frac{d}{dx} \cosh x = \sinh x.

Also: ddxtanhx=sech2x\frac{d}{dx} \tanh x = \text{sech}^2 x where tanhx=sinhx/coshx\tanh x = \sinh x / \cosh x.

Inverse hyperbolics have logarithmic forms: sinh1x=ln(x+x2+1)\sinh^{-1} x = \ln(x + \sqrt{x^2+1}), and their derivatives produce the expressions 1x2+1\frac{1}{\sqrt{x^2+1}} and 1x21\frac{1}{\sqrt{x^2-1}} that appear in integration.

Applications: catenary curves (hanging chains/cables obey y=acosh(x/a)y = a\cosh(x/a)), special relativity (rapidity), and certain differential equations.

Helpful?

Worked Practice Problems (5 examples)

Study these solved examples to understand the techniques. Then head to Practice to try problems on your own.

Practice on your own →
1

Problem 1

Find ddx(5x3)\frac{d}{dx}(5x^3)

Step-by-Step Solution

1

Power rule: ddx(xn)=nxn1\frac{d}{dx}(x^n) = nx^{n-1}.

2

53x31=15x25 \cdot 3x^{3-1} = 15x^2.

Final Answer: 15x215x^2

2

Problem 2

Find ddx(x4+2x)\frac{d}{dx}(x^4 + 2x)

Step-by-Step Solution

1

Differentiate term by term.

2

ddx(x4)=4x3\frac{d}{dx}(x^4) = 4x^3 and ddx(2x)=2\frac{d}{dx}(2x) = 2.

Final Answer: 4x3+24x^3 + 2

3

Problem 3

Find ddx(e3x)\frac{d}{dx}(e^{3x})

Step-by-Step Solution

1

Chain rule: ddx(ekx)=kekx\frac{d}{dx}(e^{kx}) = ke^{kx}.

2

Here k=3k=3: 3e3x3e^{3x}.

Final Answer: 3e3x3e^{3x}

4

Problem 4

Find ddx(sin(x))\frac{d}{dx}(\sin(x))

Step-by-Step Solution

1

This is a fundamental derivative.

2

ddx(sinx)=cosx\frac{d}{dx}(\sin x) = \cos x.

Final Answer: cos(x)\cos(x)

5

Problem 5

Find ddx(ln(x))\frac{d}{dx}(\ln(x))

Step-by-Step Solution

1

This is a fundamental derivative.

2

ddx(lnx)=1x\frac{d}{dx}(\ln x) = \frac{1}{x}.

Final Answer: 1x\frac{1}{x}

Frequently asked questions about derivatives

What is a derivative in calculus?
A derivative measures how fast a function is changing at any given point. Geometrically, it equals the slope of the tangent line to the curve at that point.
What is the chain rule?
The chain rule differentiates composite functions. If y = f(g(x)), then dy/dx = f'(g(x)) · g'(x). It's essential for nested functions.
What is the power rule?
The power rule states that the derivative of x^n is n·x^(n-1). It's the most commonly used differentiation rule in calculus.