Finding a derivative from the definition
The difference quotient gives the slope of every secant at once. If the width shrinks to nothing with x left as a letter, can one limit give the slope at every point at once?
Where you are 3 in Definition of the derivative
When you reach for it
The derivative at a point is one limit for one number: pick a, take the limit of the secant slopes, get the slope of the curve at a. Ask about a second point and the whole limit is done again.
Doing the limit once with x left as a letter gives every slope at once. The result is a new function, the derivative f'(x), whose value at each input is the slope of the graph of f there. Reach for the definition when you have a rule and no differentiation rules yet, when you want to see where a rule comes from, or when a function is new enough that no rule covers it.
The raw material is the difference quotient \displaystyle \frac{f(x + h) - f(x)}{h}, the slope of the secant from x to x + h, which you already know how to simplify. The one new step is the limit.
The procedure
The derivative of f is
at every x where this limit exists. In Leibniz notation the same function is written \dfrac{d}{dx}\big[f(x)\big], or \dfrac{dy}{dx} when y = f(x). Inside the limit x is held fixed and only h moves, so x is treated like a constant throughout. Evaluating the limit by hand takes three moves.
Simplify the quotient for h \ne 0. Substituting h = 0 straight away gives \displaystyle \frac{f(x) - f(x)}{0} = \frac{0}{0}, every time, because the two points have merged. As in limits by algebra, \displaystyle \frac{0}{0} says a factor of h is hiding in the numerator. The shape of f says how to expose it:
- a polynomial: expand f(x + h); the terms without h cancel against f(x) and every surviving term carries h;
- a square root: rationalize, multiplying top and bottom by the conjugate so that (A - B)(A + B) = A^2 - B^2 clears the roots from the numerator;
- a fraction: combine f(x + h) - f(x) over a common denominator; the numerator collapses to a multiple of h.
Then cancel the h, which is allowed because h \ne 0.
Let h go to 0. A limit as h \to 0 looks only at h \ne 0, and for every such h the simplified form equals the original quotient, so the two have the same limit. The simplified form no longer divides by h; it is continuous at h = 0 (a polynomial, or a quotient of continuous pieces whose bottom is not zero there), so its limit is its value at h = 0. Substitution is allowed now and was not before.
Check against a point. Pick an input a and compare f'(a) with the quotient for a small h, computed straight from f. The two should agree to about as many places as h is small. The check catches a dropped sign, and it is the bridge back to the slope of the graph at one point.
The limit may fail to exist at some inputs, so the domain of f' can be smaller than the domain of f. Say which x the answer holds for.
Worked examples
Expanding a quadratic
Find f'(x) from the definition for f(x) = 2x^2 + 5x, and check it at x = 1.
SolutionExpand f(x + h), squaring (x + h)^2 = x^2 + 2xh + h^2 and distributing:
Subtracting f(x) = 2x^2 + 5x removes the terms without h, leaving f(x + h) - f(x) = 4xh + 2h^2 + 5h. Factor out h and cancel it, since h \ne 0:
This is a polynomial in h, so its limit as h \to 0 is its value at h = 0:
Check. At x = 1 the formula gives f'(1) = 9. From f itself with h = 0.01: f(1) = 7 and f(1.01) = 7.0902, so the secant slope is \displaystyle \frac{0.0902}{0.01} = 9.02, and with h = -0.01 it is \displaystyle \frac{6.9102 - 7}{-0.01} = 8.98. The slopes straddle 9 and close in on it.
A cube, by the binomial expansion
Find \dfrac{d}{dx}\big[x^3\big] from the definition.
SolutionLet f(x) = x^3. Expanding by the binomial coefficients 1, 3, 3, 1 (the row of Pascal’s triangle for the third power),
Subtract x^3 and divide by h:
The last two terms carry h and vanish in the limit, so
Check. At x = -1 the slope is 3(-1)^2 = 3. With h = 0.1: f(-0.9) = -0.729 and f(-1) = -1, so the secant slope is \displaystyle \frac{0.271}{0.1} = 2.71, which matches 3 - 0.3 + 0.01 from the simplified quotient.
The answer says the slope of y = x^3 is never negative, and is 0 only at x = 0, where the curve flattens for a moment while still rising. Next to \dfrac{d}{dx}\big[x^2\big] = 2x, the limit of 2x + h, a pattern is appearing. The power rule takes it up.
A square root, by rationalizing
Find f'(x) for \displaystyle f(x) = \sqrt{2x + 1}, state where it holds, and check it at x = 4.
SolutionThe quotient is \displaystyle \dfrac{\sqrt{2x + 2h + 1} - \sqrt{2x + 1}}{h}. Expanding is no help here, so multiply top and bottom by the conjugate \displaystyle \sqrt{2x + 2h + 1} + \sqrt{2x + 1}. For 2x + 1 > 0 the conjugate is positive, so this multiplies by 1 and changes nothing. The numerator becomes
and cancelling h leaves
The square root is continuous and the bottom tends to \displaystyle 2\sqrt{2x + 1}, which is not 0, so
At \displaystyle x = -\frac{1}{2} the function is defined, \displaystyle f\left(-\frac{1}{2}\right) = 0, but the derivative is not: there the quotient is \displaystyle \frac{\sqrt{2h}}{h}, which grows without bound as h \to 0^+, and h < 0 leaves the domain. The graph meets the x-axis vertically.
Check. \displaystyle f'(4) = \frac{1}{3}. With h = 0.01: f(4) = 3 and \displaystyle f(4.01) = \sqrt{9.02} \approx 3.0033315, so the secant slope is about 0.3331.
A fraction, by a common denominator
Find f'(x) for f(x) = \dfrac{3}{x + 2}, and check it at x = 1.
SolutionHere \displaystyle f(x + h) = \frac{3}{x + h + 2}. Over the common denominator (x + h + 2)(x + 2), as in subtracting rational expressions, the numerator of f(x + h) - f(x) is
Dividing by h cancels it:
As h \to 0 the bottom tends to (x + 2)^2, not 0 when x \ne -2, so
Every slope is negative: the graph falls on each side of its asymptote, as a reciprocal shifted left 2 and stretched by 3 should.
Check. \displaystyle f'(1) = -\frac{3}{9} = -\frac{1}{3}. With h = 0.1: f(1) = 1 and \displaystyle f(1.1) = \frac{3}{3.1}, so the secant slope is \displaystyle -\frac{3}{9.3} \approx -0.3226.
Two routes in one problem
Find g'(x) for g(x) = \dfrac{1}{x^2}, and check it at x = -1.
SolutionCombine first. Over the common denominator x^2(x + h)^2,
Now expand the numerator: x^2 - (x^2 + 2xh + h^2) = -2xh - h^2 = h(-2x - h). Dividing by h,
For x \ne 0 the bottom tends to x^4 \ne 0, so
Check. \displaystyle g'(-1) = -\frac{2}{-1} = 2, positive, as it should be: left of the y-axis the graph climbs toward its asymptote. With h = 0.01 the simplified quotient gives \displaystyle \frac{1.99}{0.9801} \approx 2.0304, and from g directly, \displaystyle \frac{1/0.9801 - 1}{0.01} \approx 2.0304 as well.
Tjasa at the velodrome
Tjasa rides a flying lap on a velodrome track. In the first 10 seconds after she crosses the start line she covers d(t) = 12t + 0.3t^2 meters in t seconds. Find her speed d'(t) from the definition, her speed at t = 5, and the moment her speed reaches 16.2 meters per second.
SolutionThe input is t, so t + h replaces it:
Divide by h and let h \to 0:
meters per second. The quotient was an average speed over [t, t + h]; its limit is her speed at the instant t. At t = 5, d'(5) = 15 meters per second. Her speed is 16.2 when 12 + 0.6t = 16.2, that is t = 7 seconds.
Check. d(5) = 67.5 and d(5.1) = 69.003, an average of \displaystyle \frac{1.503}{0.1} = 15.03 meters per second over that tenth of a second, just above 15, as it should be for a rider who is speeding up.
Boundaries
- The limit has to exist. f'(a) is defined only where \lim_{h \to 0} of the quotient is a finite number. It fails at a corner such as |x| at 0, where the two one-sided limits differ, and at a vertical tangent such as \displaystyle \sqrt{2x + 1} at \displaystyle -\frac{1}{2}, where the quotient grows without bound: f is defined there and f' is not.
- x must be in the domain of f, with room on both sides. The quotient needs f(x) and f(x + h) for all small h of both signs. So \displaystyle \frac{3}{x + 2} has no derivative at -2, and the domain of f' is often smaller than the domain of f.
- Substitute only after the h in the denominator is gone. Cancelling h uses h \ne 0, which the limit allows. Putting in h = 0 is allowed only once what is left is continuous at h = 0, with a bottom that is not 0 there.
Where this goes next
Every derivative here took a page of algebra, and the answers already hint at shortcuts: 2x, 3x^2, and in the exercises 4x^3. The power rule and basic differentiation rules turn the hint into a theorem, proved from this same limit. The product rule is found the same way, by evaluating the limit for a product. The derivative as a function reads f' off a graph when no formula is given, and the equation of a tangent line puts f'(a) to work.
Exercises
Expanding
Find f'(x) from the definition, showing the simplified difference quotient.
- f(x) = 3x^2 - 7x
- g(x) = 5 - x^2
- p(x) = 4x - 9
- q(x) = x^3 + 2x
- r(x) = x^4
- k(x) = 2x^3 - x^2
Rationalizing
Find the derivative from the definition, and say for which x it holds.
- \displaystyle f(x) = \sqrt{x}
- \displaystyle g(x) = \sqrt{5 - x}
- \displaystyle s(x) = \sqrt{3x - 2}
Combining fractions
Find the derivative from the definition, and say for which x it holds.
- f(x) = \dfrac{1}{x - 4}
- g(x) = \dfrac{6}{1 - 3x}
- w(x) = \dfrac{x}{x - 1}
- \displaystyle u(x) = \dfrac{1}{\sqrt{x}} (combine, then rationalize)
Checking at a point
- Use exercise 1 to find f'(2) for f(x) = 3x^2 - 7x. Then find the secant slopes with h = 0.01 and h = -0.01 directly from f.
- Use exercise 7 to find the slope of \displaystyle y = \sqrt{x} at x = 9, and compare it with the secant slope for h = 0.01.
- Use exercise 4 to find every x at which y = x^3 + 2x has slope 14.
Ziga on the track
Ziga coasts after a sprint, covering d(t) = 15t - 0.2t^2 meters in the first t seconds, for 0 \le t \le 10.
- Find d'(t) from the definition, and his speed at t = 5, with units.
- Find his average speeds on [4, 5] and on [5, 6], and compare them with d'(5).
- At what time has his speed dropped to 12 meters per second?
Reasoning
- Show from the definition that f(x) = ax^2 + bx + c has f'(x) = 2ax + b. Check it against Example 1 and exercise 1.
- Nika puts h = 0 into \displaystyle \frac{(x + h)^3 - x^3}{h}, gets \displaystyle \frac{0}{0}, and concludes that x^3 has no derivative. Explain what went wrong.
- Show from the definition that f(x) = |x^2 - 4| has no derivative at x = 2, by finding both one-sided limits of the quotient.
- Explain why \displaystyle g(x) = \sqrt{5 - x} from exercise 8 has no derivative at x = 5 although g(5) is defined.
- In exercise 9, Marek asks why multiplying top and bottom by the conjugate is allowed. Explain, and say which x and h the step needs.
Answers
- 6x - 7. The quotient simplifies to 6x + 3h - 7; let h \to 0.
- -2x. g(x + h) - g(x) is -2xh - h^2, so the quotient is -2x - h.
- 4. The difference is 4h, so the quotient is 4 for every h \ne 0, and so is its limit.
- 3x^2 + 2. The quotient is 3x^2 + 3xh + h^2 + 2, the cube as in Example 2 plus 2.
- 4x^3. (x + h)^4 - x^4 is 4x^3h + 6x^2h^2 + 4xh^3 + h^4; divide by h and every term but 4x^3 still carries h.
- 6x^2 - 2x. The quotient is 6x^2 + 6xh + 2h^2 - 2x - h.
- \displaystyle \dfrac{1}{2\sqrt{x}} for x > 0. The conjugate turns the numerator into h, giving \displaystyle \frac{1}{\sqrt{x + h} + \sqrt{x}}, which tends to \displaystyle \frac{1}{2\sqrt{x}}.
- \displaystyle -\dfrac{1}{2\sqrt{5 - x}} for x < 5. The numerator becomes (5 - x - h) - (5 - x) = -h, giving \displaystyle \frac{-1}{\sqrt{5 - x - h} + \sqrt{5 - x}}.
- \displaystyle \dfrac{3}{2\sqrt{3x - 2}} for \displaystyle x > \frac{2}{3}. The numerator becomes 3h, giving \displaystyle \frac{3}{\sqrt{3x + 3h - 2} + \sqrt{3x - 2}}.
- -\dfrac{1}{(x - 4)^2} for x \ne 4. The combined numerator is (x - 4) - (x + h - 4) = -h, giving \displaystyle \frac{-1}{(x + h - 4)(x - 4)}.
- \dfrac{18}{(1 - 3x)^2} for \displaystyle x \ne \frac{1}{3}. The combined numerator is 6(1 - 3x) - 6(1 - 3x - 3h) = 18h.
- -\dfrac{1}{(x - 1)^2} for x \ne 1. The combined numerator is (x + h)(x - 1) - x(x + h - 1) = -h.
- \displaystyle -\dfrac{1}{2x\sqrt{x}} for x > 0. Combining gives \displaystyle \frac{\sqrt{x} - \sqrt{x + h}}{h\sqrt{x}\sqrt{x + h}}; the conjugate turns the top into -h, leaving \displaystyle \frac{-1}{\sqrt{x}\sqrt{x + h}\left(\sqrt{x} + \sqrt{x + h}\right)}, which tends to \displaystyle \frac{-1}{x \cdot 2\sqrt{x}}.
- f'(2) = 5; secant slopes 5.03 and 4.97. f(2) = -2, f(2.01) = -1.9497 and f(1.99) = -2.0497. The quotient 5 + 3h gives the same.
- \displaystyle \frac{1}{6}. The secant slope is \displaystyle \frac{\sqrt{9.01} - 3}{0.01} \approx 0.1666, just below \displaystyle \frac{1}{6} \approx 0.1667.
- x = 2 and x = -2. 3x^2 + 2 = 14 gives x^2 = 4.
- d'(t) = 15 - 0.4t; 13 meters per second. The quotient is 15 - 0.4t - 0.2h.
- 13.2 and 12.8 meters per second. d(4) = 56.8, d(5) = 70 and d(6) = 82.8. He is slowing, so the earlier second is faster; d'(5) = 13 lies between, exactly their mean, since a quadratic’s secant over [5 - h, 5 + h] has the same slope as its tangent at 5.
- t = 7.5 seconds. 15 - 0.4t = 12.
- f(x + h) - f(x) is 2axh + ah^2 + bh, so the quotient is 2ax + ah + b, which tends to 2ax + b. Example 1 has a = 2, b = 5: 4x + 5. Exercise 1 has a = 3, b = -7: 6x - 7.
- \displaystyle \frac{0}{0} always appears at h = 0 and only says the quotient must be simplified first. The limit ignores h = 0; for h \ne 0 the quotient equals 3x^2 + 3xh + h^2, whose limit is 3x^2.
- Since f(2) = 0, the quotient is \displaystyle \frac{|(2 + h)^2 - 4|}{h} = \frac{|h|\,|4 + h|}{h}. For small h, 4 + h > 0, so the quotient is 4 + h when h > 0 and -(4 + h) when h < 0. The right limit is 4, the left limit is -4, and the limit does not exist: the graph has a corner where it touches the x-axis.
- Since g(5) = 0, the quotient is \displaystyle \frac{\sqrt{-h}}{h}, defined only for h < 0. Writing h = -k with k > 0, it equals \displaystyle -\frac{1}{\sqrt{k}}, which decreases without bound as h \to 0^-, and h > 0 is outside the domain. No finite limit exists; the tangent at (5, 0) is vertical.
- It multiplies by \displaystyle \frac{C}{C} with \displaystyle C = \sqrt{3x + 3h - 2} + \sqrt{3x - 2}, which is 1 only if C \ne 0. For \displaystyle x > \frac{2}{3} the second root is positive, so C > 0 whenever 3x + 3h - 2 \ge 0, and that holds for every h close enough to 0. The step needs \displaystyle x > \frac{2}{3} and h that small.