Calculus3Introduction to Derivatives2 of 3
Introduction to Derivatives · 2

Definition of the Derivative

1

The slope of the tangent line

To write the equation of a line, we need a point and a slope. For the tangent line to y=x2\fc{y = x^2} at x=3x = 3, the point is easy. When xx is 33, yy is 32=9\fc{3^2 = 9}, so the point is (3,9)(3, \fc{9}). For the slope, we take a second point on the curve, h\hh{h} away in xx, and find the slope of the secant line through both points.

xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
9\htmlClass{lc-violet}{9}
33
3+h3+\htmlClass{lc-blue}{h}
h\htmlClass{lc-blue}{h}
f(3+h)−f(3)\htmlClass{lc-pink}{f(3+h)-f(3)}
f(3+h)−f(3)h=(3+h)2−9h\displaystyle \begin{aligned}&\frac{\rise{f(3+h) - f(3)}}{\hh{h}}\\[4pt] &\quad= \frac{\rise{(3+h)^2 - 9}}{\hh{h}}\end{aligned}

As h\hh{h} approaches 00, the second point slides along the curve toward (3,9)(3, \fc{9}), and the secant slope approaches the tangent slope. We call that limit the derivative of ff at aa, written f′(a)\dv{f'(a)} and read "f prime of a". It's also the instantaneous rate of change of ff at aa.

The derivative at aa
f′(a)\displaystyle \dv{f'(a)} =lim⁡h→0f(a+h)−f(a)h\displaystyle = \lim_{\hh{h}\to 0} \frac{\rise{f(a+h) - f(a)}}{\hh{h}}
Find the tangent line to y=x2y = x^2 at x=3x = 3
xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
33
Text solution
Expand the topPlugging in h=0\hh{h} = 0 gives 00\frac00, so we expand first. Remember that (3+h)2(3 + \hh{h})^2 is 9+6h+h29 + 6\hh{h} + \hh{h^2}, not 9+h29 + \hh{h^2}.
(3+h)2−9h\displaystyle \frac{\rise{(3+h)^2 - 9}}{\hh{h}} =6h+h2h\displaystyle = \frac{6\hh{h} + \hh{h^2}}{\hh{h}} =6+h\displaystyle = 6 + \hh{h}
Let h\hh{h} go to 00The secant slope 6+h6 + \hh{h} approaches 6\dv{6}, the same 6 m/s\dv{6}\text{ m/s} we found for the cart with s(t)=t2\fc{s(t) = t^2} at t=3t = 3.
f′(3)\displaystyle \dv{f'(3)} =lim⁡h→0 (6+h)\displaystyle = \lim_{\hh{h}\to 0}\,(6 + \hh{h}) =6\displaystyle = \dv{6}
Point-slope formThe point is (3,9)(3, \fc{9}) and the slope is f′(3)=6\dv{f'(3) = 6}.
y\displaystyle y =9+6 (x−3)\displaystyle = \fc{9} + \dv{6}\,(x - 3)

The height f(a)\fc{f(a)} comes straight from the function, and the slope f′(a)\dv{f'(a)} comes from the limit. So for any curve y=f(x)\fc{y = f(x)}, the tangent line at (a,f(a))(a, \fc{f(a)}) is

Tangent line at aa
y\displaystyle y =f(a)+f′(a) (x−a)\displaystyle = \fc{f(a)} + \dv{f'(a)}\,(x - a)
2

The derivative as a function

The slope of y=x2\fc{y = x^2} at x=3x = 3 is 6\dv{6}. For the slope at x=1x = 1, or at x=−2x = -2, we'd have to do the whole calculation again. So instead of picking a number right away, let's leave it as xx.

Find the derivative of y=x2y = x^2 at any xx
xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
11
−2-2
Text solution
The same algebra with xxReplace 33 with xx. When we expand the top, the x2x^2 terms cancel.
(x+h)2−x2h\displaystyle \frac{\rise{(x+h)^2 - x^2}}{\hh{h}} =2xh+h2h\displaystyle = \frac{2x\hh{h} + \hh{h^2}}{\hh{h}} =2x+h\displaystyle = 2x + \hh{h}
Let h\hh{h} go to 00xx stays fixed while h\hh{h} goes to 00, so we get one formula for the slope at every xx.
lim⁡h→0 (2x+h)\displaystyle \lim_{\hh{h}\to 0}\,(2x + \hh{h}) =2x\displaystyle = \dv{2x}
Check a few slopesAt x=3x = 3 it gives the 6\dv{6} we found. At the origin the tangent line is horizontal, and at x=−1x = -1 the curve is going down.
f′(3)=6\displaystyle \dv{f'(3) = 6}
f′(0)=0\displaystyle \dv{f'(0) = 0}
f′(−1)=−2\displaystyle \dv{f'(-1) = -2}

This slope formula is a new function of xx, called the derivative, and we write it as f′(x)\dv{f'(x)}. In general, f′(x)\dv{f'(x)} gives the slope of the tangent line to y=f(x)\fc{y = f(x)} at xx.

f′(x)\displaystyle \dv{f'(x)} =lim⁡h→0f(x+h)−f(x)h\displaystyle = \lim_{\hh{h}\to 0} \frac{\rise{f(x+h) - f(x)}}{\hh{h}}

We also write the derivative as y′\dv{y'}, as dydx\dv{\frac{dy}{dx}}, read "dee y dee x", or as ddx(x2)\dv{\frac{d}{dx}}(\fc{x^2}), which means the derivative of x2\fc{x^2} with respect to xx. dydx\dv{\frac{dy}{dx}} looks like a fraction because it comes from a small change in yy over a small change in xx, like rise over run.

y=x2:f′(x)\displaystyle \fc{y = x^2}:\quad \dv{f'(x)} =y′\displaystyle = \dv{y'} =dydx\displaystyle = \dv{\frac{dy}{dx}} =ddx(x2)\displaystyle = \dv{\frac{d}{dx}}\big(\fc{x^2}\big) =2x\displaystyle = \dv{2x}
y=x2:f′(x)=y′=dydx=ddx(x2)=2x\displaystyle \begin{aligned}\fc{y = x^2}:\quad \dv{f'(x)} &= \dv{y'} = \dv{\frac{dy}{dx}}\\ &= \dv{\frac{d}{dx}}\big(\fc{x^2}\big) = \dv{2x}\end{aligned}

The same definition works for a function with more than one term, like f(x)=x2−4x\fc{f(x) = x^2 - 4x}. What needs care is writing f(x+h)\fc{f}(\inp{x+h}) and subtracting all of f(x)\fc{f(x)}.

Find the derivative of f(x)=x2−4xf(x) = x^2 - 4x from the definition
f(x)=x2−4x\displaystyle \fc{f(x) = x^2 - 4x}
f′(x)\displaystyle \dv{f'(x)} =  ?\displaystyle = \;?
Text solution
Replace every xx with x+h\inp{x+h}Writing x2−4x+hx^2 - 4x + \hh{h} would only add h\hh{h} to the output, without changing the input.
f(x+h)=(x+h)2−4(x+h)\displaystyle \fc{f(\inp{x+h}) = (\inp{x+h})^2 - 4(\inp{x+h})}
Subtract all of f(x)\fc{f(x)}With parentheses around x2−4x\fc{x^2 - 4x}, the x2x^2 and −4x-4x cancel. Every term without an h\hh{h} has to cancel, because at h=0\hh{h} = 0 the top is f(x)−f(x)=0\rise{f(x) - f(x) = 0}.
f(x+h)−f(x)\displaystyle \rise{f(x+h) - f(x)} =2xh+h2−4h\displaystyle = 2x\hh{h} + \hh{h^2} - 4\hh{h}
Divide by h\hh{h} and let h\hh{h} go to 00At x=2x = 2, the slope is 0\dv{0}, right at the vertex (2,−4)(2, \fc{-4}).
lim⁡h→0 (2x+h−4)\displaystyle \lim_{\hh{h}\to 0}\,(2x + \hh{h} - 4) =2x−4\displaystyle = \dv{2x - 4}
f′(2)=0\displaystyle \dv{f'(2) = 0}
3

Sketching the derivative from a graph

For y=x2\fc{y = x^2}, we found f′(x)=2x\dv{f'(x) = 2x}, so the graph of f′\dv{f'} is the line y=2x\dv{y = 2x}. But what if we only have the graph of f\fc{f}, and no formula at all? The height of the graph of f′\dv{f'} at any xx is the slope of the tangent line to f\fc{f} at that xx, so we read the slopes off the graph.

xx
xx
−1-1
00
11
−1-1
00
11
y=f(x)\htmlClass{lc-violet}{y=f(x)}
y=f′(x)\htmlClass{lc-green}{y=f'(x)}
Sketch the graph of f′f' from the graph of ff
xx
xx
−1-1
11
y=f(x)\htmlClass{lc-violet}{y=f(x)}
y=f′(x)\htmlClass{lc-green}{y=f'(x)}
Text solution
Horizontal tangents give the zerosAt the local maximum x=−1x = -1 and the local minimum x=1x = 1, the tangent line is horizontal.
f′(−1)=0\displaystyle \dv{f'(-1) = 0}
f′(1)=0\displaystyle \dv{f'(1) = 0}
Increasing or decreasing gives the signTo the left of x=−1x = -1 and to the right of x=1x = 1, f\fc{f} is increasing. Between them, f\fc{f} is decreasing.
x<−1 or x>1: f′(x)>0\displaystyle x < -1 \text{ or } x > 1:\ \dv{f'(x)} > 0
−1<x<1: f′(x)<0\displaystyle -1 < x < 1:\ \dv{f'(x)} < 0
The steepest point gives the lowest pointf\fc{f} is decreasing fastest at x=0x = 0, so f′\dv{f'} is lowest there. Notice that f(0)=0\fc{f(0) = 0}, but f′(0)\dv{f'(0)} is negative. The zeros of f′\dv{f'} are where the slope of f\fc{f} is 0\dv{0}, not where f\fc{f} crosses the x-axis.

How can we use the tangent slopes to draw the graph of the derivative?

Drawing the graph of the derivative from slopes
4

Derivatives of 1x\frac1x and x\sqrt{x}

For every function, setting h=0\hh{h} = 0 in the definition of the derivative gives f(x)−f(x)0\frac{\rise{f(x) - f(x)}}{0}, which is 00\frac00, because the two points on the curve become the same point. So we rewrite the fraction until the h\hh{h} in the denominator cancels. For a polynomial, expanding does it. For 1x\fc{\frac1x} and x\fc{\sqrt{x}}, there's nothing to expand, so we need different algebra.

A common denominator for 1x\frac1x

For f(x)=1x\fc{f(x) = \frac1x}, replacing xx with x+h\inp{x + h} gives f(x+h)=1x+h\fc{f(\inp{x+h}) = \frac{1}{\inp{x+h}}}, not 1x+h\frac1x + \hh{h}. So the top of the fraction is a difference of two fractions.

Find the derivative of f(x)=1xf(x) = \frac1x from the definition of the derivative
f(x)=1x\displaystyle \fc{f(x) = \frac1x}
f′(x)\displaystyle \dv{f'(x)} =  ?\displaystyle = \;?
Text solution
Combine over x(x+h)x(x+\hh{h})Subtracting the numerators gives x−(x+h)=−hx - (x+\hh{h}) = -\hh{h}. Leave x(x+h)x(x+\hh{h}) factored so the h\hh{h} can cancel.
1x+h−1xh\displaystyle \frac{\rise{\frac{1}{x+h} - \frac1x}}{\hh{h}} =−hx(x+h)⋅1h\displaystyle = \frac{-\hh{h}}{x(x+\hh{h})}\cdot\frac{1}{\hh{h}} =−1x(x+h)\displaystyle = \frac{-1}{x(x+\hh{h})}
Let h\hh{h} go to 00At x=2x = 2, this gives −14\dv{-\frac14}, the slope we found earlier for 1x\fc{\frac1x} at 22.
lim⁡h→0−1x(x+h)\displaystyle \lim_{\hh{h}\to 0} \frac{-1}{x(x+\hh{h})} =−1x2\displaystyle = \dv{-\frac{1}{x^2}}
f′(2)\displaystyle \dv{f'(2)} =−122\displaystyle = -\frac{1}{2^2} =−14\displaystyle = \dv{-\frac14}

Multiplying by the conjugate for x\sqrt{x}

For x\fc{\sqrt{x}}, the top is x+h−x\rise{\sqrt{x+h} - \sqrt{x}}. There are no fractions to combine, and expanding does nothing. Remember from limits that (a−b)(a+b)=a2−b2(a - b)(a + b) = a^2 - b^2. Multiplying a difference of square roots by its conjugate squares each root, and that gets rid of the square roots.

(x+h−x)(x+h+x)\displaystyle \big(\sqrt{x+\hh{h}} - \sqrt{x}\big)\big(\sqrt{x+\hh{h}} + \sqrt{x}\big) =(x+h)−x\displaystyle = (x+\hh{h}) - x
(x+h−x)(x+h+x)=(x+h)−x\displaystyle \begin{aligned}&\big(\sqrt{x+\hh{h}} - \sqrt{x}\big)\big(\sqrt{x+\hh{h}} + \sqrt{x}\big)\\ &\quad= (x+\hh{h}) - x\end{aligned}
Find the derivative of f(x)=xf(x) = \sqrt{x} from the definition of the derivative
f(x)=x\displaystyle \fc{f(x) = \sqrt{x}}
f′(x)\displaystyle \dv{f'(x)} =  ?\displaystyle = \;?
Text solution
Multiply by the conjugateMultiply the top and bottom by x+h+x\sqrt{x+\hh{h}} + \sqrt{x}. The top becomes (x+h)−x=h(x+\hh{h}) - x = \hh{h}. Leave the bottom factored so the h\hh{h} cancels.
x+h−xh\displaystyle \frac{\rise{\sqrt{x+h} - \sqrt{x}}}{\hh{h}} =hh(x+h+x)\displaystyle = \frac{\hh{h}}{\hh{h}\big(\sqrt{x+\hh{h}} + \sqrt{x}\big)}
=1x+h+x\displaystyle = \frac{1}{\sqrt{x+\hh{h}} + \sqrt{x}}
Let h\hh{h} go to 00At x=4x = 4, this gives 14\dv{\frac14}, the same slope we found earlier for x\fc{\sqrt{x}}.
lim⁡h→01x+h+x\displaystyle \lim_{\hh{h}\to 0} \frac{1}{\sqrt{x+\hh{h}} + \sqrt{x}} =12x\displaystyle = \dv{\frac{1}{2\sqrt{x}}}
f′(4)\displaystyle \dv{f'(4)} =124\displaystyle = \frac{1}{2\sqrt4} =14\displaystyle = \dv{\frac14}
5

Another way to write the derivative

When we found the slope of y=x2\fc{y = x^2} at (3,9)(3, \fc{9}), we called the second x-coordinate 3+h3 + \hh{h}. Let's just call it xx instead. Then the rise is f(x)−f(3)\rise{f(x) - f(3)} and the run is x−3\hh{x - 3}, which is our old h\hh{h}. So letting h\hh{h} go to 00 is the exact same thing as letting xx approach 33, and that gives us another form for the derivative at a number aa.

xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
9\htmlClass{lc-violet}{9}
33
h=x−3\htmlClass{lc-blue}{h=x-3}
f(x)−f(3)\htmlClass{lc-pink}{f(x)-f(3)}
(3+h, f(3+h))(3+\htmlClass{lc-blue}{h},\ \htmlClass{lc-violet}{f(3+\htmlClass{lc-blue}{h})})
(x, f(x))(x,\ \htmlClass{lc-violet}{f(x)})
The h form
f′(a)\displaystyle \dv{f'(a)} =lim⁡h→0f(a+h)−f(a)h\displaystyle = \lim_{\hh{h}\to 0} \frac{\rise{f(a+h) - f(a)}}{\hh{h}}
The x form
f′(a)\displaystyle \dv{f'(a)} =lim⁡x→af(x)−f(a)x−a\displaystyle = \lim_{x\to a} \frac{\rise{f(x) - f(a)}}{\hh{x - a}}

Both forms are the same limit. So why would we want the xx form? Let's test it on y=x2\fc{y = x^2} at 33, then use both forms to find f′(2)\dv{f'(2)} for f(x)=x3\fc{f(x) = x^3}.

Compare the two forms of the derivative for y=x2y = x^2 at 33 and y=x3y = x^3 at 22
xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
9\htmlClass{lc-violet}{9}
(3,9)(3, \htmlClass{lc-violet}{9})
33
h\htmlClass{lc-blue}{h}
f(3+h)−f(3)\htmlClass{lc-pink}{f(3+h)-f(3)}
(3+h, f(3+h))(3+\htmlClass{lc-blue}{h},\ \htmlClass{lc-violet}{f(3+\htmlClass{lc-blue}{h})})
Text solution
The xx form for x2\fc{x^2} at 33Plugging in 33 gives 00\frac00, so we factor x2−9\rise{x^2 - 9} and cancel x−3\hh{x - 3}. We get the same slope, 6\dv{6}.
x2−9x−3\displaystyle \frac{\rise{x^2 - 9}}{\hh{x - 3}} =(x−3)(x+3)x−3\displaystyle = \frac{(\hh{x-3})(x+3)}{\hh{x-3}} =x+3  →  6\displaystyle = x + 3 \;\to\; \dv{6}
The xx form for x3\fc{x^3} at 22Here f(2)=8\fc{f(2) = 8}, and the difference of cubes factors the top.
x3−8x−2\displaystyle \frac{\rise{x^3 - 8}}{\hh{x - 2}} =(x−2)(x2+2x+4)x−2\displaystyle = \frac{(\hh{x-2})(x^2 + 2x + 4)}{\hh{x-2}} =x2+2x+4\displaystyle = x^2 + 2x + 4
lim⁡x→2 (x2+2x+4)\displaystyle \lim_{x\to 2}\,(x^2 + 2x + 4) =4+4+4\displaystyle = 4 + 4 + 4 =12\displaystyle = \dv{12}
The h\hh{h} form for x3\fc{x^3} at 22Here we have to expand (2+h)3(2 + \hh{h})^3 before anything cancels.
(2+h)3−8h\displaystyle \frac{\rise{(2+h)^3 - 8}}{\hh{h}} =12h+6h2+h3h\displaystyle = \frac{12\hh{h} + 6\hh{h^2} + \hh{h^3}}{\hh{h}} =12+6h+h2  →  12\displaystyle = 12 + 6\hh{h} + \hh{h^2} \;\to\; \dv{12}

Summary

The derivative at a point
xx
yy
y=x2\htmlClass{lc-violet}{y=x^2}
9\htmlClass{lc-violet}{9}
33
h=x−3\htmlClass{lc-blue}{h=x-3}
f(3+h)−f(3)\htmlClass{lc-pink}{f(3+h)-f(3)}
(3+h, f(3+h))(3+\htmlClass{lc-blue}{h},\ \htmlClass{lc-violet}{f(3+\htmlClass{lc-blue}{h})})
(x, f(x))(x,\ \htmlClass{lc-violet}{f(x)})
The h form
f′(a)\displaystyle \dv{f'(a)} =lim⁡h→0f(a+h)−f(a)h\displaystyle = \lim_{\hh{h}\to 0} \frac{\rise{f(a+h) - f(a)}}{\hh{h}}
The x form
f′(a)\displaystyle \dv{f'(a)} =lim⁡x→af(x)−f(a)x−a\displaystyle = \lim_{x\to a} \frac{\rise{f(x) - f(a)}}{\hh{x - a}}

The derivative f′(a)\dv{f'(a)} is the slope of the tangent line to y=f(x)\fc{y = f(x)} at x=ax = a. We find it by taking the limit of secant slopes as the second point approaches (a,f(a))(a, \fc{f(a)}). In the h\hh{h} form, the second point has x=a+hx = a + \hh{h}, and the run is h\hh{h}. Writing the second point as (x,f(x))(x, \fc{f(x)}) makes the run x−a\hh{x - a}, which is the same as h\hh{h}, so letting xx approach aa is the exact same limit.

Setting up f(x+h)−f(x)f(x + h) - f(x)
f(x)=x2−4x:f(x+h)=(x+h)2−4(x+h)\displaystyle \fc{f(x) = x^2 - 4x}:\quad \fc{f(\inp{x+h}) = (\inp{x+h})^2 - 4(\inp{x+h})}
f(x+h)−f(x)\displaystyle \rise{f(x+h) - f(x)} =(x2+2xh+h2−4x−4h)−(x2−4x)\displaystyle = \big(x^2 + 2x\hh{h} + \hh{h^2} - 4x - 4\hh{h}\big) - \big(\fc{x^2 - 4x}\big) =2xh+h2−4h\displaystyle = 2x\hh{h} + \hh{h^2} - 4\hh{h}
f(x+h)−f(x)=(x2+2xh+h2−4x−4h)−(x2−4x)=2xh+h2−4h\displaystyle \begin{aligned}&\rise{f(x+h) - f(x)}\\ &= \big(x^2 + 2x\hh{h} + \hh{h^2} - 4x - 4\hh{h}\big)\\ &\quad - \big(\fc{x^2 - 4x}\big)\\ &= 2x\hh{h} + \hh{h^2} - 4\hh{h}\end{aligned}

To find f(x+h)\fc{f}(\inp{x + h}), replace every xx in the formula with x+h\inp{x + h}. When subtracting f(x)\fc{f(x)}, put parentheses around the entire formula for f(x)\fc{f(x)} so the minus sign applies to every term. Setting h=0\hh{h} = 0 gives f(x)−f(x)=0\rise{f(x) - f(x) = 0}, so every term without an h\hh{h} cancels.

Canceling hh from the denominator
Polynomial
(x+h)2−x2h\displaystyle \frac{\rise{(x+h)^2 - x^2}}{\hh{h}} =2xh+h2h\displaystyle = \frac{2x\hh{h} + \hh{h^2}}{\hh{h}}
Fraction
1x+h−1x\displaystyle \rise{\frac{1}{x+h} - \frac1x} =x−(x+h)x(x+h)\displaystyle = \frac{x - (x+\hh{h})}{x(x+\hh{h})} =−hx(x+h)\displaystyle = \frac{-\hh{h}}{x(x+\hh{h})}
Square roots
x+h−xh⋅x+h+xx+h+x\displaystyle \frac{\rise{\sqrt{x+h} - \sqrt{x}}}{\hh{h}}\cdot\frac{\sqrt{x+\hh{h}} + \sqrt{x}}{\sqrt{x+\hh{h}} + \sqrt{x}} =(x+h)−xh(x+h+x)\displaystyle = \frac{(x+\hh{h}) - x}{\hh{h}\big(\sqrt{x+\hh{h}} + \sqrt{x}\big)}
Square roots
x+h−xh⋅x+h+xx+h+x=(x+h)−xh(x+h+x)\displaystyle \begin{aligned}&\frac{\rise{\sqrt{x+h} - \sqrt{x}}}{\hh{h}}\cdot\frac{\sqrt{x+\hh{h}} + \sqrt{x}}{\sqrt{x+\hh{h}} + \sqrt{x}}\\ &\quad= \frac{(x+\hh{h}) - x}{\hh{h}\big(\sqrt{x+\hh{h}} + \sqrt{x}\big)}\end{aligned}

Setting h=0\hh{h} = 0 gives 00\frac00. For a polynomial, expand the numerator and factor out h\hh{h}. For a fraction, combine terms over a common denominator. For a difference of square roots, multiply the numerator and denominator by the conjugate, and leave the denominator factored so the h\hh{h} can cancel. Once h\hh{h} cancels, let h→0\hh{h} \to 0.

The derivative as a function
f′(x)\displaystyle \dv{f'(x)} =y′\displaystyle = \dv{y'} =dydx\displaystyle = \dv{\frac{dy}{dx}}
ddx(x2)\displaystyle \dv{\frac{d}{dx}}\big(\fc{x^2}\big) =2x\displaystyle = \dv{2x}
f′(3)=6\displaystyle \dv{f'(3) = 6}

The derivative f′(x)\dv{f'(x)} gives the slope of the tangent line to y=f(x)\fc{y = f(x)} at any input xx. We write y′\dv{y'}, dydx\dv{\frac{dy}{dx}}, or ddxf(x)\dv{\frac{d}{dx}} \fc{f(x)} for the same derivative function. ddx(x2)=2x\dv{\frac{d}{dx}}(\fc{x^2}) = \dv{2x} says the derivative function is 2x\dv{2x}, so at x=3x = 3 the tangent slope is 2(3)=6\dv{2(3) = 6}.

The equation of the tangent line
y\displaystyle y =f(a)+f′(a) (x−a)\displaystyle = \fc{f(a)} + \dv{f'(a)}\,(x - a)

To write the equation of the tangent line at x=ax = a, use the function to get the point (a,f(a))(a, \fc{f(a)}) and the derivative to get the slope f′(a)\dv{f'(a)}.

Sketching f′f' from the graph of ff
xx
xx
−1-1
00
11
−1-1
00
11
y=f(x)\htmlClass{lc-violet}{y=f(x)}
y=f′(x)\htmlClass{lc-green}{y=f'(x)}
f(0)=0\htmlClass{lc-violet}{f(0)=0}
f′(0)\htmlClass{lc-green}{f'(0)}

The height of f′\dv{f'} at any xx is the slope of the tangent line to f\fc{f} at that xx. Horizontal tangents on f\fc{f} have slope 0\dv{0}, so they give the zeros of f′\dv{f'}. Where the tangent slope is negative, f′\dv{f'} is below the x-axis, and where the tangent slope is positive, f′\dv{f'} is above the x-axis. A zero of f\fc{f}, like f(0)=0\fc{f(0) = 0}, does not mean f′(0)=0\dv{f'(0) = 0}. At x=0x = 0, the tangent line slopes down most steeply, so f′(0)\dv{f'(0)} is the lowest value of f′\dv{f'}.

6

Practice

Enter exact values and simplified expressions.

1
Let f(x)=3x2−5xf(x) = 3x^2 - 5x. Use the definition of the derivative to find f′(x)f'(x).

Once you expand f(x+h)−f(x)f(x + h) - f(x), does every term without an hh cancel?

Replace every xx with x+h\inp{x+h} and expand.
f(x+h)=3(x+h)2−5(x+h)=3x2+6xh+3h2−5x−5h\displaystyle \begin{aligned}\fc{f(\inp{x+h})} &= \fc{3(\inp{x+h})^2 - 5(\inp{x+h})}\\ &= 3x^2 + 6x\hh{h} + 3\hh{h^2} - 5x - 5\hh{h}\end{aligned}
Subtract f(x)\fc{f(x)}, keeping it in brackets so the minus sign applies to both terms.
f(x+h)−f(x)=(3x2+6xh+3h2−5x−5h)−(3x2−5x)=6xh+3h2−5h\displaystyle \begin{aligned}\rise{f(x+h) - f(x)} &= \big(3x^2 + 6x\hh{h} + 3\hh{h^2} - 5x - 5\hh{h}\big) - \big(\fc{3x^2 - 5x}\big)\\ &= 6x\hh{h} + 3\hh{h^2} - 5\hh{h}\end{aligned}
Divide each remaining term by h\hh{h} and take the limit as h\hh{h} goes to 00.
6xh+3h2−5hh=6x+3h−5f′(x)=lim⁡h→0 (6x+3h−5)=6x−5\displaystyle \begin{aligned}\frac{6x\hh{h} + 3\hh{h^2} - 5\hh{h}}{\hh{h}} &= 6x + 3\hh{h} - 5\\ \dv{f'(x)} &= \lim_{\hh{h}\to 0}\,(6x + 3\hh{h} - 5) = \dv{6x - 5}\end{aligned}
2
Let f(x)=x3f(x) = x^3. (a) Use the definition of the derivative to find f′(1)f'(1). (b) Write the equation of the tangent line to y=x3y = x^3 at x=1x = 1.

To expand (1+h)3(1 + h)^3, multiply 1+h1 + h by (1+h)2(1 + h)^2.

Find the slopeExpand (1+h)3(1 + \hh{h})^3, subtract f(1)=1\fc{f(1) = 1}, divide by h\hh{h}, and let h\hh{h} go to 00.
(1+h)3\displaystyle (1+\hh{h})^3 =1+3h+3h2+h3\displaystyle = 1 + 3\hh{h} + 3\hh{h^2} + \hh{h^3}
(1+h)3−1h=3h+3h2+h3h=3+3h+h2f′(1)=lim⁡h→0 (3+3h+h2)=3\displaystyle \begin{aligned}\frac{\rise{(1+h)^3 - 1}}{\hh{h}} &= \frac{3\hh{h} + 3\hh{h^2} + \hh{h^3}}{\hh{h}} = 3 + 3\hh{h} + \hh{h^2}\\ \dv{f'(1)} &= \lim_{\hh{h}\to 0}\,(3 + 3\hh{h} + \hh{h^2}) = \dv{3}\end{aligned}
Write the tangent lineThe tangent line passes through (1,f(1))=(1,1)(1, \fc{f(1)}) = (1, \fc{1}) with slope f′(1)=3\dv{f'(1) = 3}.
f(1)=1:y\displaystyle \fc{f(1) = 1}:\quad y =1+3(x−1)\displaystyle = \fc{1} + \dv{3}(x - 1) =3x−2\displaystyle = 3x - 2
3
Let f(x)=2x+1f(x) = \dfrac{2}{x+1}. Use the definition of the derivative to find f′(x)f'(x).

Over the common denominator (x+h+1)(x+1)(x + h + 1)(x + 1), what does the numerator 2(x+1)−2(x+h+1)2(x + 1) - 2(x + h + 1) simplify to?

If you got 2(x+1)2\dfrac{2}{(x+1)^2} Check the order of subtraction on top. In the definition, we subtract f(x)f(x) from f(x+h)f(x + h), not the other way around.

Write f(x+h)\fc{f}(\inp{x + h}) by replacing xx with x+h\inp{x + h}.
f(x+h)=2x+h+1\displaystyle \fc{f(\inp{x+h}) = \frac{2}{\inp{x+h}+1}}
Subtract the fractions using the common denominator (x+h+1)(x+1)(x + \hh{h} + 1)(x + 1).
2x+h+1−2x+1=2(x+1)−2(x+h+1)(x+h+1)(x+1)=−2h(x+h+1)(x+1)\displaystyle \begin{aligned}\rise{\frac{2}{x+h+1} - \frac{2}{x+1}} &= \frac{2(x+1) - 2(x+\hh{h}+1)}{(x+\hh{h}+1)(x+1)}\\ &= \frac{-2\hh{h}}{(x+\hh{h}+1)(x+1)}\end{aligned}
Divide by h\hh{h} to cancel the h\hh{h} in the numerator, then let h\hh{h} go to 00.
−2h(x+h+1)(x+1)⋅1h=−2(x+h+1)(x+1)f′(x)=lim⁡h→0−2(x+h+1)(x+1)=−2(x+1)2\displaystyle \begin{aligned}\frac{-2\hh{h}}{(x+\hh{h}+1)(x+1)}\cdot\frac{1}{\hh{h}} &= \frac{-2}{(x+\hh{h}+1)(x+1)}\\ \dv{f'(x)} &= \lim_{\hh{h}\to 0} \frac{-2}{(x+\hh{h}+1)(x+1)} = \dv{-\frac{2}{(x+1)^2}}\end{aligned}
4
Let f(x)=2x−1f(x) = \sqrt{2x - 1}. Use the definition of the derivative to find f′(x)f'(x).

With f(x+h)=2(x+h)−1f(x + h) = \sqrt{2(x + h) - 1}, multiply the top and bottom by the conjugate. What is the numerator?

If you got 122x−1\dfrac{1}{2\sqrt{2x-1}} Check f(x+h)f(x + h). Replacing xx with x+hx + h gives 2(x+h)−1=2x+2h−1\sqrt{2(x + h) - 1} = \sqrt{2x + 2h - 1}, not 2x+h−1\sqrt{2x + h - 1}.

Replace xx with x+h\inp{x + h} inside the square root and distribute the 22.
f(x+h)=2(x+h)−1\displaystyle \fc{f(\inp{x+h}) = \sqrt{2(\inp{x+h}) - 1}} =2x+2h−1\displaystyle = \sqrt{2x + 2\hh{h} - 1}
Multiply top and bottom by the conjugate to get rid of the square roots in the numerator.
2x+2h−1−2x−1h⋅2x+2h−1+2x−12x+2h−1+2x−1=(2x+2h−1)−(2x−1)h(2x+2h−1+2x−1)=22x+2h−1+2x−1\displaystyle \begin{aligned}&\frac{\rise{\sqrt{2x+2h-1} - \sqrt{2x-1}}}{\hh{h}}\cdot\frac{\sqrt{2x+2\hh{h}-1} + \sqrt{2x-1}}{\sqrt{2x+2\hh{h}-1} + \sqrt{2x-1}}\\ &\quad= \frac{(2x+2\hh{h}-1) - (2x-1)}{\hh{h}\big(\sqrt{2x+2\hh{h}-1} + \sqrt{2x-1}\big)} = \frac{2}{\sqrt{2x+2\hh{h}-1} + \sqrt{2x-1}}\end{aligned}
The h\hh{h} cancels out, so take the limit as h\hh{h} goes to 00.
f′(x)\displaystyle \dv{f'(x)} =lim⁡h→022x+2h−1+2x−1\displaystyle = \lim_{\hh{h}\to 0} \frac{2}{\sqrt{2x+2\hh{h}-1} + \sqrt{2x-1}} =222x−1\displaystyle = \frac{2}{2\sqrt{2x-1}} =12x−1\displaystyle = \dv{\frac{1}{\sqrt{2x-1}}}
5
The graph of ff is shown. Which graph is the graph of f′f'?
xx
yy
11
22
33
44
y=f(x)\htmlClass{lc-violet}{y=f(x)}

Where does ff have horizontal tangents? Between those points, is the slope of ff positive or negative?

If you got (B) Check the zeros of f′f'. f′f' is 00 where the tangent line to ff is horizontal, not where f(x)=0f(x) = 0.

If you got (C) Check the sign of the slope between x=0x = 0 and x=2x = 2. The graph of ff is increasing there, so f′f' must be positive.

The tangent line to f\fc{f} is horizontal at the local minimum (0,0)(0, \fc{0}) and the local maximum (2,4)(2, \fc{4}), so f′\dv{f'} has zeros at x=0x = 0 and x=2x = 2.
tangent slope 0 at x\displaystyle \text{tangent slope } \dv{0} \text{ at } x =0, x\displaystyle = 0,\ x =2  →  f′(0)=0, f′(2)=0\displaystyle = 2 \;\to\; \dv{f'(0) = 0},\ \dv{f'(2) = 0}
Between 00 and 22, f\fc{f} is increasing, so f′\dv{f'} is positive. Outside that interval, f\fc{f} is decreasing, so f′\dv{f'} is negative.
0<x<2: f′(x)>0,x<0 or x>2: f′(x)<0  →  (A)\displaystyle 0 < x < 2:\ \dv{f'(x)} > 0, \qquad x < 0 \text{ or } x > 2:\ \dv{f'(x)} < 0 \;\to\; \text{(A)}
6
Let f(x)=1xf(x) = \dfrac{1}{\sqrt{x}}. Use the definition of the derivative to find f′(x)f'(x). Challenge

Write 1x+h−1x\frac{1}{\sqrt{x + h}} - \frac{1}{\sqrt{x}} over the common denominator xx+h\sqrt{x}\sqrt{x + h}. What is the numerator?

If you got 12xx\dfrac{1}{2x\sqrt{x}} Check the order in the numerator. Subtracting 1x\frac{1}{\sqrt{x}} from 1x+h\frac{1}{\sqrt{x + h}} leaves x−x+h\sqrt{x} - \sqrt{x + h} on top, which gives −h-h after multiplying by the conjugate.

Combine the fractionsSubtract the two fractions using the common denominator xx+h\sqrt{x}\sqrt{x + \hh{h}}.
1x+h−1x\displaystyle \rise{\frac{1}{\sqrt{x+h}} - \frac{1}{\sqrt{x}}} =x−x+hxx+h\displaystyle = \frac{\sqrt{x} - \sqrt{x+\hh{h}}}{\sqrt{x}\sqrt{x+\hh{h}}}
Multiply by the conjugateMultiply the top and bottom by x+x+h\sqrt{x} + \sqrt{x + \hh{h}} so the numerator becomes a difference of squares.
x−x+hhxx+h⋅x+x+hx+x+h=x−(x+h)hxx+h(x+x+h)=−1xx+h(x+x+h)\displaystyle \begin{aligned}&\frac{\sqrt{x} - \sqrt{x+\hh{h}}}{\hh{h}\sqrt{x}\sqrt{x+\hh{h}}}\cdot\frac{\sqrt{x} + \sqrt{x+\hh{h}}}{\sqrt{x} + \sqrt{x+\hh{h}}}\\ &\quad= \frac{x - (x+\hh{h})}{\hh{h}\sqrt{x}\sqrt{x+\hh{h}}\big(\sqrt{x} + \sqrt{x+\hh{h}}\big)} = \frac{-1}{\sqrt{x}\sqrt{x+\hh{h}}\big(\sqrt{x} + \sqrt{x+\hh{h}}\big)}\end{aligned}
Take the limitThe h\hh{h} cancels, so take the limit as h\hh{h} goes to 00.
f′(x)=lim⁡h→0−1xx+h(x+x+h)=−1x⋅x⋅2x=−12xx\displaystyle \begin{aligned}\dv{f'(x)} &= \lim_{\hh{h}\to 0} \frac{-1}{\sqrt{x}\sqrt{x+\hh{h}}\big(\sqrt{x} + \sqrt{x+\hh{h}}\big)}\\ &= \frac{-1}{\sqrt{x}\cdot\sqrt{x}\cdot 2\sqrt{x}} = \dv{-\frac{1}{2x\sqrt{x}}}\end{aligned}