The Derivative

Study Sheet

The Derivative

Definition, differentiability, and the basic rules of differentiation

Rates of Change and the Tangent Line

Concept
Average vs. instantaneous rate of change
xy1232468
Secants from (1,1)(1,1) to x=3, 2, 1.5x=3,\ 2,\ 1.5 have slopes 4, 3, 2.54,\ 3,\ 2.5; they close in on the tangent (solid), slope 22.

The average rate of change of ff on [a,b][a,b] is the slope of the secant line through the endpoints:

f(b)−f(a)b−a.\frac{f(b)-f(a)}{b-a}.

The instantaneous rate of change at x=ax=a is the slope of the tangent line at that point. It is the limit of the average rates as the interval shrinks to a single point, and we call it the derivative f′(a)f'(a).

The derivative is the limit of the difference quotient — the slope of the secant line as the two points merge — and it measures instantaneous rate of change. The rules (power, product, quotient, and the derivatives of the standard functions) are all proved from that one limit, after which you rarely compute the limit directly.

The tangent line at x=ax=a touches the curve at (a,f(a))\big(a,f(a)\big) and has slope f′(a)f'(a). Its equation is

y=f(a)+f′(a) (x−a).y = f(a) + f'(a)\,(x-a).
Example
Worked example: average rate of change

Find the average rate of change of f(x)=x2f(x)=x^2 on [1,3][1,3].

f(3)−f(1)3−1=9−12=82=4.\frac{f(3)-f(1)}{3-1}=\frac{9-1}{2}=\frac{8}{2}=4.

So a secant line over this interval has slope 44.

Side note
Where it goes wrong

Differentiating a product by differentiating each factor: (x2sin⁡x)′≠2xcos⁡x(x^2\sin x)' \ne 2x\cos x. The product rule has two terms: 2xsin⁡x+x2cos⁡x2x\sin x + x^2\cos x.

Reminder — The differentiation rules:  (xn)′=nxn−1,(fg)′=f′g+fg′,(fg)′=f′g−fg′g2,(f(g(x)))′=f′(g(x))g′(x)(x^{n})'=nx^{n-1},\quad (fg)'=f'g+fg',\quad \left(\tfrac{f}{g}\right)'=\frac{f'g-fg'}{g^{2}},\quad \big(f(g(x))\big)'=f'(g(x))g'(x)
Tip

Tip: “Average” ⇒\Rightarrow secant ⇒\Rightarrow two points. “Instantaneous” ⇒\Rightarrow tangent ⇒\Rightarrow one point (a limit).

Try it
Quick check

For f(x)=xf(x)=\sqrt x, find the average rate of change on [1,9][1,9] and the equation of the tangent line at x=4x=4, given f′(4)=14f'(4)=\tfrac14.

Show the answer

Answer: 14\tfrac14; y=2+14(x−4)y=2+\tfrac14(x-4), i.e. y=14x+1y=\tfrac14x+1. Average rate: 3−19−1=28\dfrac{3-1}{9-1}=\dfrac28. Tangent: through (4,2)(4,2) with slope 14\tfrac14. (Here the secant over [1,9][1,9] happens to have the same slope as the tangent at 44, as the Mean Value Theorem says some tangent must.)

The Limit Definition of the Derivative

Concept
Definition

The derivative of ff as a function is

f′(x)=lim⁡h→0f(x+h)−f(x)h,f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h},

provided the limit exists. The derivative at a point x=ax=a is

f′(a)=lim⁡h→0f(a+h)−f(a)h.f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}.

The alternate form of the derivative at aa is

f′(a)=lim⁡x→af(x)−f(a)x−a.f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}.

Notations: f′(x)f'(x), dydx\dfrac{dy}{dx}, ddx[f(x)]\dfrac{d}{dx}\big[f(x)\big], and y′y' all mean the derivative.

The fraction f(x+h)−f(x)h\dfrac{f(x+h)-f(x)}{h} is the slope of a secant line, which we can always compute. Letting h→0h\to0 slides the second point into the first, and whatever those slopes approach is, by definition, the slope of the tangent. Every derivative rule in this topic is this one limit evaluated once in general.

Example
Worked example: derivative from the definition

Let f(x)=x2f(x)=x^2. Then

f′(x)=lim⁡h→0(x+h)2−x2h=lim⁡h→0x2+2xh+h2−x2h=lim⁡h→02xh+h2h=lim⁡h→0(2x+h)=2x.f'(x)=\lim_{h\to0}\frac{(x+h)^2-x^2}{h} =\lim_{h\to0}\frac{x^2+2xh+h^2-x^2}{h} =\lim_{h\to0}\frac{2xh+h^2}{h}=\lim_{h\to0}(2x+h)=2x.
Tip

Tip: The whole point of algebra in these problems is to cancel the hh in the denominator before letting h→0h\to0; otherwise you get 00\tfrac{0}{0}.

Try it
Quick check

Use the limit definition to find f′(x)f'(x) for f(x)=1x+1f(x)=\dfrac{1}{x+1}.

Show the answer

Answer: f′(x)=−1(x+1)2f'(x)=-\dfrac{1}{(x+1)^2}. 1x+h+1−1x+1h=(x+1)−(x+h+1)h(x+h+1)(x+1)=−1(x+h+1)(x+1)\dfrac{\frac{1}{x+h+1}-\frac{1}{x+1}}{h}=\dfrac{(x+1)-(x+h+1)}{h(x+h+1)(x+1)}=\dfrac{-1}{(x+h+1)(x+1)}, which tends to −1(x+1)2\dfrac{-1}{(x+1)^2} as h→0h\to0.

Differentiability and Continuity

Concept
When does the derivative fail to exist?

If ff is differentiable at aa, then ff is continuous at aa. The converse is false: a continuous function need not be differentiable. A function fails to be differentiable at a point where its graph has a

  • corner (slopes from the two sides disagree), e.g. y=∣x∣y=|x| at x=0x=0;
  • cusp (slopes head toward +∞+\infty and −∞-\infty), e.g. y=x2/3y=x^{2/3} at x=0x=0;
  • vertical tangent (slope is infinite), e.g. y=x1/3y=x^{1/3} at x=0x=0;
  • discontinuity (jump, hole, or asymptote).

A derivative exists when the secant slopes from both sides approach one finite number. At a corner the two sides approach different numbers; at a cusp or vertical tangent they grow without bound; at a break the secant slopes blow up because f(a+h)−f(a)f(a+h)-f(a) does not shrink. That last case is why differentiable implies continuous, and the corner ∣x∣|x| is why the converse fails.

Four ways a derivative can fail to exist at x=0x=0: a corner, a cusp, a vertical tangent, and a break in the graph.

Example
Worked example: a corner

f(x)=∣x∣f(x)=|x| is continuous at x=0x=0, but the slope from the left is −1-1 and the slope from the right is +1+1. Since these one-sided derivatives disagree, f′(0)f'(0) does not exist.

Tip

Tip: “Differentiable ⇒\Rightarrow continuous” is a one-way street. To disprove differentiability, either show a break (not continuous) or show the left- and right-hand slopes differ.

Try it
Quick check

Is f(x)=∣x−2∣f(x)=|x-2| continuous at x=2x=2? Is it differentiable there?

Show the answer

Answer: continuous, but not differentiable. The graph is a V with vertex (2,0)(2,0): no break, but the slope is −1-1 just to the left and +1+1 just to the right, so the one-sided derivatives disagree.

Power, Constant, Constant-Multiple, and Sum/Difference Rules

Example
Worked example: power and sum rules
ddx[3x4−2x2+7]=3(4x3)−2(2x)+0=12x3−4x.\frac{d}{dx}\big[3x^4-2x^2+7\big]=3(4x^3)-2(2x)+0=12x^3-4x.

Rewrite roots and fractions as powers first:

ddx[x]=ddx[x1/2]=12x−1/2=12x.\frac{d}{dx}\Big[\sqrt{x}\Big]=\frac{d}{dx}\big[x^{1/2}\big]=\tfrac12 x^{-1/2}=\frac{1}{2\sqrt{x}}.

The power rule is the limit definition done once for xnx^n: expanding (x+h)n=xn+nxn−1h+(terms with h2)(x+h)^n=x^n+nx^{n-1}h+(\text{terms with }h^2), the difference quotient is nxn−1+(terms with h)nx^{n-1}+(\text{terms with }h), which tends to nxn−1nx^{n-1}. The sum and constant-multiple rules hold because limits respect sums and constant multiples.

Tip

Tip: Before differentiating, rewrite 1xk\dfrac{1}{x^k} as x−kx^{-k} and xkm\sqrt[m]{x^k} as xk/mx^{k/m} so the power rule applies directly.

Try it
Quick check

Differentiate y=4x5−3x2+x3y=4x^5-\dfrac{3}{x^2}+\sqrt[3]{x}.

Show the answer

Answer: y′=20x4+6x3+13x−2/3y'=20x^4+\dfrac{6}{x^3}+\dfrac{1}{3}x^{-2/3}. Rewrite as powers first: −3x−2-3x^{-2} differentiates to 6x−36x^{-3}, and x1/3x^{1/3} to 13x−2/3\tfrac13x^{-2/3}.

Derivatives of Exponential, Logarithmic, and Trig Functions

Example
Worked example: combine with the basic rules
ddx[3sin⁡x−2cos⁡x+ex]=3cos⁡x−2(−sin⁡x)+ex=3cos⁡x+2sin⁡x+ex.\frac{d}{dx}\big[3\sin x-2\cos x+e^x\big]=3\cos x-2(-\sin x)+e^x=3\cos x+2\sin x+e^x.
Tip

Tip: The two “co-” functions (cos⁡\cos, cot⁡\cot, csc⁡\csc) each pick up a minus sign when differentiated. Watch signs carefully.

Try it
Quick check

Differentiate y=5ex−3ln⁡x+2tan⁡xy=5e^x-3\ln x+2\tan x.

Show the answer

Answer: y′=5ex−3x+2sec⁡2xy'=5e^x-\dfrac3x+2\sec^2x. Each piece is a basic formula times a constant.

Product Rule, Quotient Rule, and Higher-Order Derivatives

Concept
Products and quotients
(fg)′=f′g+fg′⏟Product Rule(fg)′=f′g−fg′g2⏟Quotient Rule\underbrace{(fg)'=f'g+fg'}_{\text{Product Rule}} \qquad\qquad \underbrace{\left(\frac{f}{g}\right)'=\frac{f'g-fg'}{g^2}}_{\text{Quotient Rule}}

Higher-order derivatives come from differentiating again: f′′=(f′)′f''=(f')', f′′′=(f′′)′f'''=(f'')', and so on. Notation: f′′(x)f''(x), d2ydx2\dfrac{d^2y}{dx^2}.

If uu and vv are the sides of a rectangle, a small change adds a strip u Δvu\,\Delta v, a strip v Δuv\,\Delta u, and a tiny corner Δu Δv\Delta u\,\Delta v. Dividing by Δx\Delta x and letting it shrink, the corner vanishes, leaving (uv)′=u′v+uv′(uv)'=u'v+uv'. The quotient rule is the product rule applied to u⋅1vu\cdot\frac1v.

Example
Worked example: product and quotient rules

Product:

ddx[x2sin⁡x]=(2x)sin⁡x+x2cos⁡x=2xsin⁡x+x2cos⁡x.\frac{d}{dx}\big[x^2\sin x\big]=(2x)\sin x+x^2\cos x=2x\sin x+x^2\cos x.

Quotient:

ddx ⁣[sin⁡xx]=(cos⁡x)(x)−(sin⁡x)(1)x2=xcos⁡x−sin⁡xx2.\frac{d}{dx}\!\left[\frac{\sin x}{x}\right]=\frac{(\cos x)(x)-(\sin x)(1)}{x^2}=\frac{x\cos x-\sin x}{x^2}.

Interpreting f′f' and f′′f''

The sign of f′f' tells you whether ff is increasing (f′>0f'>0) or decreasing (f′<0f'<0); where f′=0f'=0 and changes sign, ff has a local max or min. The sign of f′′f'' tells you concavity (f′′>0f''>0 concave up, f′′<0f''<0 concave down). In the figure, f(x)=x2−1f(x)=x^2-1 (solid) has its minimum exactly where its derivative f′(x)=2xf'(x)=2x (dashed) crosses zero.

Tip

Tip: For a quotient, some students remember “low dd-high minus high dd-low, over low squared.” Never divide the two derivatives−-always use the full formula.

Try it
Quick check

Differentiate (a) x3exx^3e^x and (b) x2+1x−1\dfrac{x^2+1}{x-1}.

Show the answer

(a) 3x2ex+x3ex=ex(x3+3x2)3x^2e^x+x^3e^x=e^x(x^3+3x^2). (b) 2x(x−1)−(x2+1)(x−1)2=x2−2x−1(x−1)2\dfrac{2x(x-1)-(x^2+1)}{(x-1)^2}=\dfrac{x^2-2x-1}{(x-1)^2}.

Going Deeper: Advanced Derivative Ideas

Concept
1. Derivative of x\sqrt{x} from the definition

Multiply by the conjugate to clear the root:

f′(x)=lim⁡h→0x+h−xh⋅x+h+xx+h+x=lim⁡h→0(x+h)−xh(x+h+x)=lim⁡h→01x+h+x=12x.f'(x)=\lim_{h\to0}\frac{\sqrt{x+h}-\sqrt{x}}{h}\cdot\frac{\sqrt{x+h}+\sqrt{x}}{\sqrt{x+h}+\sqrt{x}} =\lim_{h\to0}\frac{(x+h)-x}{h\big(\sqrt{x+h}+\sqrt{x}\big)} =\lim_{h\to0}\frac{1}{\sqrt{x+h}+\sqrt{x}}=\frac{1}{2\sqrt{x}}.

This agrees with the power rule on x1/2x^{1/2}.

Concept
2. Derivative of 1x\dfrac{1}{x} from the definition

Combine the fractions in the numerator first:

f′(x)=lim⁡h→01x+h−1xh=lim⁡h→0x−(x+h)x(x+h)h=lim⁡h→0−hh x(x+h)=lim⁡h→0−1x(x+h)=−1x2.f'(x)=\lim_{h\to0}\frac{\frac{1}{x+h}-\frac{1}{x}}{h} =\lim_{h\to0}\frac{\frac{x-(x+h)}{x(x+h)}}{h} =\lim_{h\to0}\frac{-h}{h\,x(x+h)} =\lim_{h\to0}\frac{-1}{x(x+h)}=-\frac{1}{x^2}.

Again this matches the power rule on x−1x^{-1}.

Example
3. A harder definition problem: f(x)=1xf(x)=\dfrac{1}{\sqrt{x}}
f′(x)=lim⁡h→01x+h−1xh=lim⁡h→0x−x+hhxx+h⋅x+x+hx+x+h=lim⁡h→0−1xx+h(x+x+h)=−12x3/2.f'(x)=\lim_{h\to0}\frac{\frac{1}{\sqrt{x+h}}-\frac{1}{\sqrt{x}}}{h} =\lim_{h\to0}\frac{\sqrt{x}-\sqrt{x+h}}{h\sqrt{x}\sqrt{x+h}}\cdot\frac{\sqrt{x}+\sqrt{x+h}}{\sqrt{x}+\sqrt{x+h}} =\lim_{h\to0}\frac{-1}{\sqrt{x}\sqrt{x+h}\big(\sqrt{x}+\sqrt{x+h}\big)}=-\frac{1}{2x^{3/2}}.

Consistent with the power rule on x−1/2x^{-1/2}: −12x−3/2-\tfrac12 x^{-3/2}.

Concept
4. One-sided derivatives and a piecewise function

The one-sided derivatives at aa are

f−′(a)=lim⁡h→0−f(a+h)−f(a)h,f+′(a)=lim⁡h→0+f(a+h)−f(a)h.f'_-(a)=\lim_{h\to0^-}\frac{f(a+h)-f(a)}{h},\qquad f'_+(a)=\lim_{h\to0^+}\frac{f(a+h)-f(a)}{h}.

ff is differentiable at aa exactly when both exist and are equal. This is how you solve for parameters.

Example
4b. Solving for parameters

Find a,ba,b so that

f(x)={x2,x≤1,ax+b,x>1,is differentiable at x=1.f(x)=\begin{cases} x^2, & x\le 1,\\[2pt] ax+b, & x>1,\end{cases} \qquad\text{is differentiable at } x=1.

Continuity at x=1x=1: the pieces must match, 12=a(1)+b1^2=a(1)+b, so a+b=1a+b=1. Matching slopes at x=1x=1: derivative of x2x^2 is 2x2x, giving 22 at x=1x=1; derivative of ax+bax+b is aa. So a=2a=2, and then b=1−a=−1b=1-a=-1. Thus a=2, b=−1a=2,\ b=-1.

Concept
5. Proving the Product Rule

Add and subtract f(x+h)g(x)f(x+h)g(x) in the numerator:

(fg)′(x)=lim⁡h→0f(x+h)g(x+h)−f(x)g(x)h=lim⁡h→0f(x+h)[g(x+h)−g(x)]+g(x)[f(x+h)−f(x)]h=lim⁡h→0f(x+h)⋅g(x+h)−g(x)h+g(x)⋅lim⁡h→0f(x+h)−f(x)h=f(x)g′(x)+g(x)f′(x).\begin{aligned} (fg)'(x)&=\lim_{h\to0}\frac{f(x+h)g(x+h)-f(x)g(x)}{h}\\ &=\lim_{h\to0}\frac{f(x+h)\big[g(x+h)-g(x)\big]+g(x)\big[f(x+h)-f(x)\big]}{h}\\ &=\lim_{h\to0}f(x+h)\cdot\frac{g(x+h)-g(x)}{h}+g(x)\cdot\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\\ &=f(x)g'(x)+g(x)f'(x). \end{aligned}

(We used that ff is continuous, so f(x+h)→f(x)f(x+h)\to f(x).)

Concept
6. Proving the Quotient Rule

Let Q=fgQ=\dfrac{f}{g}, so f=Qgf=Qg. Differentiate both sides with the product rule: f′=Q′g+Qg′f'=Q'g+Qg'. Solve for Q′Q' and substitute Q=fgQ=\dfrac{f}{g}:

Q′=f′−Qg′g=f′−fgg′g=f′g−fg′g2.Q'=\frac{f'-Qg'}{g}=\frac{f'-\frac{f}{g}g'}{g}=\frac{f'g-fg'}{g^2}.
Concept
7. The symmetric difference quotient

Calculators often estimate f′(x)f'(x) with the symmetric difference quotient

f′(x)≈f(x+h)−f(x−h)2h.f'(x)\approx\frac{f(x+h)-f(x-h)}{2h}.

It uses points on both sides and is usually more accurate. For f(x)=x2f(x)=x^2 it is even exact for every hh:

(x+h)2−(x−h)22h=4xh2h=2x.\frac{(x+h)^2-(x-h)^2}{2h}=\frac{4xh}{2h}=2x.

Warning: this quotient can return a finite value even where f′f' does not exist. For f(x)=∣x∣f(x)=|x| at x=0x=0 it gives ∣h∣−∣−h∣2h=0\frac{|h|-|-h|}{2h}=0, yet f′(0)f'(0) truly does not exist−-so a numerical value alone never proves differentiability.

Try it
Quick check

True or false: if ff is differentiable at x=ax=a, then ff is continuous at x=ax=a.

Work it on paper before revealing the answer.

Show the answer

Answer: True

Why It Works

Product rule from the definition: f(x+h)g(x+h)−f(x)g(x)h\tfrac{f(x+h)g(x+h) - f(x)g(x)}{h}; add and subtract f(x+h)g(x)f(x+h)g(x) in the numerator to get f(x+h)g(x+h)−g(x)h+g(x)f(x+h)−f(x)hf(x+h)\tfrac{g(x+h) - g(x)}{h} + g(x)\tfrac{f(x+h) - f(x)}{h}, which tends to f(x)g′(x)+g(x)f′(x)f(x)g'(x) + g(x)f'(x) since ff is continuous. The power rule for whole exponents follows from the binomial expansion of (x+h)n(x + h)^n: every term after xn+nxn−1hx^n + nx^{n-1}h has an h2h^2 and vanishes after dividing by hh and letting h→0h \to 0.

Tip
Reading a proof

Do not read a proof the way you read a rule. Cover the last line, ask what the previous line forces, and only then uncover it. If a step feels like magic, that is the step to work by hand with a concrete number.

Formulas, Proofs & Tips

Tip
The difference quotient and the derivative
f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}

What it means. The slope of the tangent line — the instantaneous rate of change.

Example. For f(x)=x2f(x)=x^2: f′(x)=lim⁡h→0(x+h)2−x2h=2xf'(x)=\lim_{h\to0}\tfrac{(x+h)^2-x^2}{h}=2x.

Why it works. f(x+h)−f(x)h\tfrac{f(x+h)-f(x)}{h} is the slope of the secant through two nearby points. Letting h→0h\to 0 slides the second point into the first, so the secant becomes the tangent.

Tip. The hh must cancel before you substitute h=0h=0; otherwise you get the meaningless 00\tfrac00.

Tip
The differentiation rules
(xn)′=nxn−1,(fg)′=f′g+fg′,(fg)′=f′g−fg′g2,(f(g(x)))′=f′(g(x))g′(x)(x^{n})'=nx^{n-1},\quad (fg)'=f'g+fg',\quad \left(\tfrac{f}{g}\right)'=\frac{f'g-fg'}{g^{2}},\quad \big(f(g(x))\big)'=f'(g(x))g'(x)

What it means. Power, product, quotient and chain rules — enough to differentiate almost anything.

Example. (x3)′=3x2(x^3)'=3x^2, and (x2sin⁡x)′=2xsin⁡x+x2cos⁡x(x^2\sin x)'=2x\sin x+x^2\cos x.

Why it works. The product rule comes from the difference quotient of fgfg: add and subtract f(x+h)g(x)f(x+h)g(x) in the numerator to split it into a piece that becomes f′gf'g and a piece that becomes fg′fg'. The chain rule multiplies rates: if uu changes g′g' times as fast as xx, and ff changes f′f' times as fast as uu, the combined rate is the product.

Tip. Product rule is not f′g′f'g'. For the chain rule, always finish with the derivative of the inside.

Tip
The Mean Value Theorem
f′(c)=f(b)−f(a)b−afor some c∈(a,b)f'(c)=\frac{f(b)-f(a)}{b-a} \quad\text{for some } c \in (a,b)

What it means. Somewhere in the interval the instantaneous rate equals the average rate.

Example. For f(x)=x2f(x)=x^2 on [0,2][0,2]: f′(c)=4−02−0=2f'(c)=\tfrac{4-0}{2-0}=2, which occurs at c=1c=1.

Why it works. Tilt the graph so the endpoints are level (subtract the secant line). The resulting function has equal endpoint values, so it has an interior max or min, where the derivative is 00 — untilting gives f′(c)f'(c) equal to the secant slope.

Tip. Needs ff continuous on [a,b][a,b] and differentiable on (a,b)(a,b). Rolle's Theorem is the special case f(a)=f(b)f(a)=f(b).