Derivative from first principles
A derivative measures the rate of change of a function. The formal definition is a limit:
f ′ ( a ) = lim h → 0 f ( a + h ) − f ( a ) h . \boxed{f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}.} f ′ ( a ) = h → 0 lim h f ( a + h ) − f ( a ) .
This is called the derivative from first principles (or "ab initio").
Geometric meaning
The quantity f ( a + h ) − f ( a ) h \dfrac{f(a + h) - f(a)}{h} h f ( a + h ) − f ( a ) is the slope of the secant line through ( a , f ( a ) ) (a, f(a)) ( a , f ( a )) and ( a + h , f ( a + h ) ) (a + h, f(a + h)) ( a + h , f ( a + h )) . As h → 0 h \to 0 h → 0 , the secant rotates and (in the limit) becomes the tangent line at ( a , f ( a ) ) (a, f(a)) ( a , f ( a )) .
So f ′ ( a ) f'(a) f ′ ( a ) = slope of the tangent line to y = f ( x ) y = f(x) y = f ( x ) at x = a x = a x = a .
Physical meaning
If s ( t ) s(t) s ( t ) is the position of a particle at time t t t , then s ( t + h ) − s ( t ) h \dfrac{s(t + h) - s(t)}{h} h s ( t + h ) − s ( t ) is the average velocity over the time interval [ t , t + h ] [t, t + h] [ t , t + h ] . As h → 0 h \to 0 h → 0 , this becomes the instantaneous velocity at time t t t :
v ( t ) = s ′ ( t ) . v(t) = s'(t). v ( t ) = s ′ ( t ) .
Notation
f ′ ( a ) f'(a) f ′ ( a ) , Lagrange notation.
d f d x ∣ x = a \dfrac{df}{dx}\bigg|_{x = a} d x df x = a or d y d x ∣ x = a \dfrac{dy}{dx}\bigg|_{x = a} d x d y x = a , Leibniz notation.
f ˙ ( a ) \dot{f}(a) f ˙ ( a ) , Newton's dot notation, common in physics.
When f ′ f' f ′ is well-defined for every a a a in some interval, we have a new function f ′ f' f ′ , called the derivative of f f f .
Computing from first principles
To find f ′ ( x ) f'(x) f ′ ( x ) for a given f f f :
Write f ( x + h ) − f ( x ) h \dfrac{f(x + h) - f(x)}{h} h f ( x + h ) − f ( x ) .
Simplify (algebra, factor, etc.).
Take the limit h → 0 h \to 0 h → 0 .
Worked examples
Example 1. Find f ′ ( x ) f'(x) f ′ ( x ) for f ( x ) = x 2 f(x) = x^2 f ( x ) = x 2 .
f ( x + h ) − f ( x ) h = ( x + h ) 2 − x 2 h = 2 x h + h 2 h = 2 x + h → 2 x \dfrac{f(x + h) - f(x)}{h} = \dfrac{(x + h)^2 - x^2}{h} = \dfrac{2 x h + h^2}{h} = 2 x + h \to 2 x h f ( x + h ) − f ( x ) = h ( x + h ) 2 − x 2 = h 2 x h + h 2 = 2 x + h → 2 x as h → 0 h \to 0 h → 0 .
So ( x 2 ) ′ = 2 x (x^2)' = 2 x ( x 2 ) ′ = 2 x .
Example 2. Find f ′ ( x ) f'(x) f ′ ( x ) for f ( x ) = x 3 f(x) = x^3 f ( x ) = x 3 .
( x + h ) 3 − x 3 h = 3 x 2 h + 3 x h 2 + h 3 h = 3 x 2 + 3 x h + h 2 → 3 x 2 \dfrac{(x + h)^3 - x^3}{h} = \dfrac{3 x^2 h + 3 x h^2 + h^3}{h} = 3 x^2 + 3 x h + h^2 \to 3 x^2 h ( x + h ) 3 − x 3 = h 3 x 2 h + 3 x h 2 + h 3 = 3 x 2 + 3 x h + h 2 → 3 x 2 .
So ( x 3 ) ′ = 3 x 2 (x^3)' = 3 x^2 ( x 3 ) ′ = 3 x 2 . Pattern: ( x n ) ′ = n x n − 1 (x^n)' = n x^{n-1} ( x n ) ′ = n x n − 1 .
Example 3. Find f ′ ( x ) f'(x) f ′ ( x ) for f ( x ) = x f(x) = \sqrt{x} f ( x ) = x .
x + h − x h = ( x + h − x ) ( x + h + x ) h ( x + h + x ) = h h ( x + h + x ) = 1 x + h + x → 1 2 x \dfrac{\sqrt{x + h} - \sqrt{x}}{h} = \dfrac{(\sqrt{x + h} - \sqrt{x})(\sqrt{x + h} + \sqrt{x})}{h(\sqrt{x + h} + \sqrt{x})} = \dfrac{h}{h(\sqrt{x + h} + \sqrt{x})} = \dfrac{1}{\sqrt{x + h} + \sqrt{x}} \to \dfrac{1}{2 \sqrt{x}} h x + h − x = h ( x + h + x ) ( x + h − x ) ( x + h + x ) = h ( x + h + x ) h = x + h + x 1 → 2 x 1 .
So ( x ) ′ = 1 2 x (\sqrt{x})' = \dfrac{1}{2 \sqrt{x}} ( x ) ′ = 2 x 1 .
Example 4. Find f ′ ( x ) f'(x) f ′ ( x ) for f ( x ) = sin x f(x) = \sin x f ( x ) = sin x .
sin ( x + h ) − sin x h = sin x cos h + cos x sin h − sin x h = sin x ⋅ cos h − 1 h + cos x ⋅ sin h h \dfrac{\sin(x + h) - \sin x}{h} = \dfrac{\sin x \cos h + \cos x \sin h - \sin x}{h} = \sin x \cdot \dfrac{\cos h - 1}{h} + \cos x \cdot \dfrac{\sin h}{h} h sin ( x + h ) − sin x = h sin x cos h + cos x sin h − sin x = sin x ⋅ h cos h − 1 + cos x ⋅ h sin h .
As h → 0 h \to 0 h → 0 : cos h − 1 h → 0 \dfrac{\cos h - 1}{h} \to 0 h cos h − 1 → 0 and sin h h → 1 \dfrac{\sin h}{h} \to 1 h sin h → 1 . So the limit is sin x ⋅ 0 + cos x ⋅ 1 = cos x \sin x \cdot 0 + \cos x \cdot 1 = \cos x sin x ⋅ 0 + cos x ⋅ 1 = cos x .
Thus ( sin x ) ′ = cos x (\sin x)' = \cos x ( sin x ) ′ = cos x .
Example 5. Find f ′ ( x ) f'(x) f ′ ( x ) for f ( x ) = 1 / x f(x) = 1/x f ( x ) = 1/ x .
1 / ( x + h ) − 1 / x h = x − ( x + h ) h x ( x + h ) = − h h x ( x + h ) = − 1 x ( x + h ) → − 1 x 2 \dfrac{1/(x + h) - 1/x}{h} = \dfrac{x - (x + h)}{h x (x + h)} = \dfrac{-h}{h x (x + h)} = \dfrac{-1}{x(x + h)} \to \dfrac{-1}{x^2} h 1/ ( x + h ) − 1/ x = h x ( x + h ) x − ( x + h ) = h x ( x + h ) − h = x ( x + h ) − 1 → x 2 − 1 .
So ( 1 / x ) ′ = − 1 / x 2 (1/x)' = -1/x^2 ( 1/ x ) ′ = − 1/ x 2 .
Try it yourself
Find f ′ ( x ) f'(x) f ′ ( x ) from first principles:
f ( x ) = 3 x + 5 f(x) = 3 x + 5 f ( x ) = 3 x + 5 .
f ( x ) = x 2 + 1 f(x) = x^2 + 1 f ( x ) = x 2 + 1 .
f ( x ) = x 2 − 3 x f(x) = x^2 - 3 x f ( x ) = x 2 − 3 x .
f ( x ) = 5 f(x) = 5 f ( x ) = 5 (constant).
f ( x ) = 1 / x 2 f(x) = 1/x^2 f ( x ) = 1/ x 2 .
f ( x ) = cos x f(x) = \cos x f ( x ) = cos x . (Hint: similar to sin x \sin x sin x .)
f ( x ) = x 4 f(x) = x^4 f ( x ) = x 4 .
f ( x ) = ( x + 1 ) 2 f(x) = (x + 1)^2 f ( x ) = ( x + 1 ) 2 .
f ( x ) = x + 1 f(x) = \sqrt{x + 1} f ( x ) = x + 1 .
f ( x ) = x + 1 / x f(x) = x + 1/x f ( x ) = x + 1/ x . (For x ≠ 0 x \ne 0 x = 0 .)
f ( x ) = tan x f(x) = \tan x f ( x ) = tan x at x = 0 x = 0 x = 0 .
f ( x ) = 1 / x f(x) = 1/\sqrt{x} f ( x ) = 1/ x at x = 4 x = 4 x = 4 .
Pitfalls / Tricks
The "h → 0 h \to 0 h → 0 " is essential , the difference quotient is undefined at h = 0 h = 0 h = 0 .
Always simplify before taking the limit (so the h h h in the denominator can be cancelled).
For trig derivatives, use sin ( A + B ) = sin A cos B + cos A sin B \sin(A + B) = \sin A \cos B + \cos A \sin B sin ( A + B ) = sin A cos B + cos A sin B to expand.
Insight. The derivative is the linear approximation: near x = a x = a x = a , f ( x ) ≈ f ( a ) + f ′ ( a ) ( x − a ) f(x) \approx f(a) + f'(a)(x - a) f ( x ) ≈ f ( a ) + f ′ ( a ) ( x − a ) . This is the tangent line equation.