The Derivative

Math 31A Discussion Session
Week 3 Notes
January 19 and 21, 2016
This week we’ll continue discussing the derivative. We’ll talk about circumstances under
which a function is differentiable, the power rule, the product rule, and the quotient rule.
We will try to work several examples to illustrate how these rules are used.1
The Derivative
Given a continuous function f , suppose we want to find the equation of the line which lies
tangent to the graph of y = f (x) at the point (a, f (a)). At first glance this seems like a
difficult problem to approach naively (that is, without derivatives). But we can tackle it
with relative ease by considering secant lines.
Definition. Given a continuous function f , the secant line passing through (a, f (a)) and
(b, f (b)) (where a 6= b) to the graph of y = f (x) is defined by
y=
f (b) − f (a)
(x − a) + f (a).
b−a
(1)
Intuitively, we can see that the secant line passing through (a, f (a)) and (b, f (b)) should
begin to look more and more like the tangent line at (a, f (a)) as b gets closer to a. So we
should be able to obtain the equation of the tangent line by taking the limit of equation (1)
as b approaches a.
Example. Find the equation of the tangent line to the graph of y = x2 + 4 at (3, 13).
(Solution) For some b 6= 3, the equation of the secant line passing through (3, 13) and
(b, f (b)) is given by
y=
f (b) − f (3)
(b2 + 4) − 13
(x − 3) + 13 =
(x − 3) + 13.
b−3
b−3
(2)
2
−9
Notice that the only part of this equation which depends on b is the slope, bb−3
. So we
should be able to find the tangent line by finding the limit of this slope as b approaches 3,
and replacing the slope in (2) with this limit. We have
b2 − 9
(b − 3)(b + 3)
= lim
= lim(b + 3) = 6,
b→3 b − 3
b→3
b→3
b−3
lim
so the equation of the tangent line is given by
y = 6(x − 3) + 13 = 6x − 5.
1
The Thursday section has already seen much of the first section. We’ll skim/skip as needed.
1
Frequently, we’re just interested in the slope of the tangent line to a curve. To determine
this, first notice that the slope of the line determined in (1) is given by
f (b) − f (a)
.
b−a
Then the slope of the tangent line should be the slope we obtain by letting b get close to a:
f (b) − f (a)
.
b→a
b−a
Another way to consider this is as follows. Suppose we want to find the slope of the tangent
line to y = f (x) at the point (x, f (x)). If we change our x-value by a small amount — say,
by h — then the coordinates of the point on the graph will be (x + h, f (x + h)). So the slope
of the secant line between this two points is
lim
f (x + h) − f (x)
f (x + h) − f (x)
=
.
(x + h) − x
h
As before, we want to see what happens to this quantity as our second point approaches our
first. That is, we want to see what happens when our displacement h gets closer to 0, so we
consider
f (x + h) − f (x)
.
lim
h→0
h
When this limit exists, we call the resulting value the derivative of f at x, and denote this
variously as
d
(f (x)),
f 0 (x),
f˙(x).
dx
Example. Compute the derivative of f (x) = x3 at an arbitrary point x.
(Solution) According to our above definition, the derivative will be given by
f (x + h) − f (x)
(x + h)3 − x3
f (x) = lim
= lim
h→0
h→0
h
h
3
2
2
x + 3hx + 3h x + h3 − x3
3hx2 + 3h2 x + h3
= lim
= lim
h→0
h→0
h
h
2
2
2
= lim (3x + 3hx + h ) = 3x ,
0
h→0
whenever this limit exists. But this limit exists for all x-values, so f is everywhere differentiable, and f 0 (x) = 3x2 for all x values.
One thing we notice immediately is that constant functions have derivative 0. To see
this, notice that if g(x) = c, then
g(x + h) − g(x)
c−c
0
= lim
= lim = 0.
h→0
h→0
h
h
h
This fits with our understanding of the derivative as an instantaneous slope, since the graph
of a constant function is a horizontal line. Because it is defined as a limit, the derivative also
has the following pleasant arithmetic properties:
lim
h→0
2
Proposition 1. Suppose f 0 (x) and g 0 (x) exist and c, d are real numbers. Then
1.
d
(cf (x)
dx
+ dg(x)) = cf 0 (x) + dg 0 (x);
2.
d
(cf (x)
dx
− dg(x)) = cf 0 (x) − dg 0 (x).
The derivatives of products and quotients aren’t quite as straightforward, but we’ll discuss
them soon. Next, we introduce what we’ll call the power rule for computing derivatives.
Proposition 2. If f (x) = xn for a positive integer n, then f 0 (x) = nxn−1 .
Proof. Using our definition, we have
f (x + h) − f (x)
(x + h)n − xn
= lim
h→0
h→0
h
h P
Pn
n
n!
k n−k
n
−x
k=1
k=0 k!(n−k)! h x
= lim
= lim
h→0
h→0
h
n
X
n!
= lim
hk−1 xn−k = nxn−1 .
h→0
k!(n
−
k)!
k=1
f 0 (x) = lim
n!
hk xn−k
k!(n−k)!
h
Example. Find the derivative of p(x) = an xn + an−1 xn−1 + · · · + a1 x + a0 as a function of
x.
(Solution) We can use the fact that the derivative splits over sums and the power rule to
find that
d
d
d
d
(an xn ) + (an−1 xn−1 ) + · · · + (a1 x) + (a0 )
dx
dx
dx
dx
= nan xn−1 + (n − 1)an−1 xn−2 + · · · + a1 .
p0 (x) =
The Derivative as a Function
It’s important to know that not all derivatives exist. For instance, suppose a function f is
not continuous at x = a and consider
f (a + h) − f (a)
.
h→0
h
lim
(3)
Since f is discontinuous at a, either limh→0 f (a + h) doesn’t exist, in which case (3) doesn’t
make sense, or limh→0 f (a + h) 6= f (a), in which case the numerator of (3) does not vanish
but the denominator does vanish, so the limit in (3) doesn’t exist. In either case, we can’t
make sense of f 0 (a). The easiest way to say this is that a function must be continuous
in order to be differentiable.
3
It turns out, though, that continuity isn’t enough. A function can be continuous at a
point and still fail to be differentiable at that point. For example, consider f (x) = |x|, and
suppose we’re trying to find f 0 (0). Then we’re interested in the limit
|h|
f (0 + h) − f (0)
= lim
.
h→0 h
h→0
h
lim
But if we try to evaluate this limit we find that
lim−
h→0
|h|
−h
= lim−
= −1
h→0
h
h
and
lim+
h→0
|h|
h
= lim+ = 1,
h→0 h
h
so the limit — and thus f 0 (0) — doesn’t exist. This shouldn’t be too surprising, though.
Sketch the graph of f (x) = |x| and try to draw a tangent line to this graph at (0, 0).
You’ll find that it’s hard to choose a good slope, because the graph turns so sharply here.
Continuity requires that our graphs be connected, but differentiability goes one step further
by requiring that our graphs not turn too suddenly.2
Product and Quotient Rules
So far we can compute derivatives of sums, differences, and scalar multiples. Our next two
rules (whose proofs we won’t see in section) allow us to compute derivatives of products and
quotients of differentiable functions (and hence their names).
Proposition 3. Suppose f (x) and g(x) are differentiable functions. Then
d
(f (x)g(x)) = f 0 (x)g(x) + f (x)g 0 (x).
dx
(4)
Proof. For any x ∈ R we have
d
f (x + h)g(x + h) − f (x)g(x)
(f (x)g(x)) = lim
h→0
dx
h
f (x + h)g(x + h) − f (x)g(x + h) + f (x)g(x + h) − f (x)g(x)
= lim
h→0
h
(f (x + h) − f (x))g(x + h)
f (x)(g(x + h) − g(x))
= lim
+ lim
h→0
h→0
h
h
f (x + h) − f (x)
= lim
lim g(x + h)
h→0
h→0
h
g(x + h) − g(x)
+ lim f (x)
lim
h→0
h→0
h
0
0
= f (x)g(x) + f (x)g (x),
and this is the desired result.
2
It’s tempting to say that differentiability means smoothness, but we typically reserve the word smooth
for functions which are infinitely differentiable.
4
Proposition 4. Suppose f (x) and g(x) are differentiable functions and g(x) 6= 0. Then
d f (x)
f 0 (x)g(x) − f (x)g 0 (x)
=
.
(5)
dx g(x)
(g(x))2
Proof. For any x ∈ R we have
f (x+h)
(x)
− fg(x)
d f (x)
g(x+h)
(
) = lim
h→0
dx g(x)
h
1
f (x + h)g(x) − f (x)g(x + h)
= lim
lim
h→0 g(x + h)g(x)
h→0
h
2 1
f (x + h)g(x) − f (x)g(x)
f (x)g(x + h) − f (x)g(x)
=
lim
− lim
h→0
h→0
g(x)
h
h
2 1
f (x + h) − f (x)
g(x + h) − f (x)
=
lim
g(x) − f (x) lim
h→0
h→0
g(x)
h
h
0
0
f (x)g(x) − f (x)g (x)
=
,
(g(x))2
and this is the desired result.
We call (4) the product rule and call (5) the quotient rule. Here we’ll practice using
them.
Example.
1. Use the product rule to compute
d
((x2 − 1)(3x + 3)).
dx
d 2
d
(x − 1) = 2x and
(3x + 3) = 3, we have
dx
dx
(x2 − 1)(3x + 3) = (2x)(3x + 3) + (x2 − 1)(3) = 9x2 + 6x − 3.
(Solution) Since
d
dx
2. Use the product rule to compute
d
((3x + 4)2 ).
dx
d
(3x + 4) = 3, we have
dx
d
d
(3x + 4)2 =
((3x + 4)(3x + 4)) = (3)(3x + 4) + (3x + 4)(3)
dx
dx
= 6(3x + 4) = 18x + 24.
(Solution) Since
d
3. Use the quotient rule to compute
dx
1
.
x
5
d
d
(1) = 0 and
(x) = 1, so
dx
dx
d 1
(0)(x) − (1)(1)
−1
=
= 2.
2
dx x
x
x
(Solution) We have
Equivalently,
d 1
( )
dx x
=
d
(x−1 )
dx
= −x−2 =
d
4. Use the quotient rule to compute
dx
−1
.
x2
3
.
x6
d
d 6
(3) = 0 and
(x ) = 6x5 , so
dx
dx
d
(0)(x6 ) − (3)(6x5 )
3
−18x5
−18
=
=
= 7 .
6
6
2
12
dx x
(x )
x
x
(Solution) We have
Equivalently,
d 3
( )
dx x6
=
d
(3x−6 )
dx
= −18x−7 =
d
5. Use the quotient rule to compute
dx
−18
.
x7
2x2 − 7x + 3
.
4x − 7
d
d
(2x2 − 7x + 3) = 4x − 7 and
(4x − 7) = 4, so
dx
dx
(4x − 7)(4x − 7) − (2x2 − 7x + 3)(4)
d 2x2 − 7x + 3
=
dx
4x − 7
(4x − 7)2
8x2 − 28x + 37
=
.
16x2 − 56x + 49
(Solution) We have
Other Examples
1. Show that f 0 (0) does not exist, given that f (x) = x1/3 .
(Solution) If f 0 (0) exists, it is equal to limh→0
f (0+h)−f (0)
,
h
so we compute this limit:
f (0 + h) − f (0)
(0 + h)1/3 − 01/3
= lim
h→0
h→0
h
h
1/3
h
1
= lim
= lim 2/3 .
h→0 h
h→0 h
lim
But the denominator of this last ratio tends to 0 while the numerator is constant. So
the fraction will become arbitrarily large as h → 0, and we conclude that this limit
does not exist. If we look at the graph of f (x), it’s not surprising that this limit grows
without bound; the secant lines passing through (0, 0) and some nearby point (h, f (h))
become arbitrarily steep as h approaches 0.
6
2. Let g(x) = x4 and compute g 0 (x) from the limit definition.
(Solution) We have
(x + h)4 − x4
g(x + h) − g(x)
= lim
h→0
h→0
h
h
x4 + 4x3 h + 6x2 h2 + 4xh3 + h4 − x4
= lim
h→0
h
3
2 2
4x h + 6x h + 4xh3 + h4
= lim
h→0
h
3
2
= lim (4x + 6x h + 4xh2 + h3 ) = 4x3 ,
lim
h→0
so g 0 (x) = 4x3 , for all x ∈ R.
These last two examples were written by Steven Heilman.
3. Find the equations of any tangent lines to the curve y =
the line x − 2y = 2.
x−1
which are parallel to
x+1
(Solution) The given line has slope 1/2, so we’re looking for tangent lines which also
have slope 1/2. Since the slope of a tangent line is given by the derivative, we’re really
dy
looking for x-values for which dx
(x) = 21 . To this end, notice that
(1)(x + 1) − (x − 1)(1)
2
dy
(x) =
=
,
2
dx
(x + 1)
(x + 1)2
for all x 6= −1. So the tangent line to our curve has slope 1/2 when
1
2
=
2
(x + 1)
2
⇒
4 = (x + 1)2
⇒
x = −3 or 1.
For x = −3, the tangent line and the curve meet at (−3, 2), and for x = 1, the tangent
line and the curve meet at (1, 0). So our tangent lines are given by
1
y = (x + 3) + 2
2
and
1
y = (x − 1).
2
4. Determine whether or not f is differentiable at x = 0, where
2
x sin(1/x), x 6= 0
f (x) =
.
0,
x=0
(Solution) If f 0 (0) exists, it is equal to
f (0 + h) − f (0)
f (h)
h2 sin(1/h)
= lim
= lim
= lim h sin(1/h).
h→0
h→0 h
h→0
h→0
h
h
But we’ve previously used the squeeze theorem to show that this last limit exists and
is equal to 0. So f 0 (0) = 0.
lim
7