Implicit Differentiation. Lecture 16. implicitly:

Implicit Differentiation.
Lecture 16.
We are used to working only with functions that are defined explicitly. That is, ones like
√
5
3
f (x) = 5x + 7x − x2 + 1 or s(t) = et −3,
in which the function is described explicitly by means of a formula for the output. The formula may be pretty messy, but it does
give the value explicitly. In an earlier example we began with an explicitly defined function y = xx, but converted to a function defined
implicitly:
ln y = x ln x.
To determine the value of the function for some input value x we
would have to solve the resulting equation. More extreme examples
are given in equations such as
x2 + xy 3 − xy = 7 or y x − x2 + y = 6.
Even if we could solve these for y, they might not actually describe
y as a function of x, For example, we can easily solve
x2 + y 2 = 25
for y, but the solution
p
y = ± 25 − x2
does not describe a function; for example, when x = 0, this equation
gives two values for y, namely y = ±5. Still if we restrict our
attention to just the positive values or just the negative ones, we do
have a function.
Functions of this sort, defined by equations, are said to define functions implicitly. And we can often analyze them successfully just
as ones defined explicitly. Here we shall consider their derivatives.
Example 1. Let’s begin by assuming that y is some differentiable
d
y; so far we don’t know
function of x. Thus, y has a derivative,
dx
what this derivative is or how to compute it — just that it exists.
But suppose that we have the additional information that x and y
satisfy some equation, say
y = xy 2 + x3.
That equation puts another constraint on y. So differentiating both
sides of that equation we get
d
d
y =
(xy 2 + x3)
dx
dx
d
d
=
(xy 2) + x3
dx
dx
d 2
d
d
= x y + y 2 x + x3
(Product Rule)
dx
dx
dx
d
d
= x y 2 + y 2 + x3
dx
dx
But y is a function of x, so using the chain rule we can differentiate
y and hence, y 2. That is, for the two missing pieces
d 3
d 2
d
dy
dy
x = 3x2 and
y = (y 2) = 2y .
dx
dx
dy
dx
dx
So putting it all together, we have
dy
dy
= 2xy + y 2 + 3x2.
dx
dx
d
Still to get y solely in terms of x and y, we must “solve” this latter
dx
equation. But that clearly gives us
dy
(1 − 2xy) = y 2 + 3x2,
dx
2
so
dy y 2 + 3x2
=
.
dx
1 − 2xy
Example 2. Next consider the equation
x2 − xy + y 3 = 7.
With this we have defined y implicitly as a function of x — and, of
course, we have also defined x implicitly as a function of y. So let
us view y as a function of x, y = y(x). Then just as in the previous
example we may view the equation as equating two functions of x,
and so we can differentiate them and the resulting derivatives will be
equal. That is,
x2 − xy + y 3 = 7 ⇒
d 2
d
(x − xy + y 3) = (7)
dx
dx
d 2
d
d
d
x − (y x + x y) + y 3 = 0
dx
dx
dx
dx
d 3 dy
dy
y
=0
⇒ 2x − (y + x ) +
dx
dy
dx
⇒
⇒ 2x − y − x
dy
dy
+ 3y 2
=0
dx
dx
dy
we get
dx
dy
2x − y
=
.
dx x − 3y 2
Solving this last equation for
For example at the point (1, 2) on the graph of the defining equation
we have
dy 2−2
=
= 0.
dx (1,2) 1 − 12
3
Example 3. Let’s do this one together. The graph of the equation
x2 + y 2 = 25.
is
the circle with center at the origin and radius 5. Let’s 1find the
Untitled-1
equation of the line tangent to this circle at the point (3, 4).
(3, 4)
u
Example 4. Suppose that a point is moving around the circle
x2 + y 2 = 25
d
and we know that when t = 2, the point is at (3, 4) and x = 2.
dt
d
When t = 2, what is y and what is the rate of change of the point
dt
with respect to t?
4
This implicit differentiation provides us with a short-cut that can
be quite time saving on occasion — and it can bail us out if we forget
the Product Rule or the Quotient Rule. It’s called Logarithmic
Differentiation. First, a couple of very simple examples:
Example 1. Suppose that u and v are differentiable functions of
d
x, and that y = uv. Then the derivative
y follows from a direct
dx
application of the Product Rule. But here’s an alternative: Take the
log of both sides:
ln y = ln(uv) = ln u + ln v.
Now differentiate both sides of this with respect to x to get
d
d
d
d
(ln y) =
(ln u + ln v) = (ln u) + (ln v)
dx
dx
dx
dx
1 dy
1 du 1 dv
=
+
y dx
u dx v dx
and multiplying by y:
du
dv
dy y du y dv
=
+
=v +u ,
dx u dx v dx
dx
dx
which, of course, is what we would have gotten using the Product
Rule!
5
u
Example 2. This time suppose that y = . As an alternative
v
to the Quotient Rule for calculating its derivative, again take the log
of both sides:
u
ln y = ln
= ln u − ln v.
v
Now differentiate both sides of this with respect to x to get
d
d
d
d
(ln y) =
(ln u − ln v) = (ln u) − (ln v)
dx
dx
dx
dx
1 du 1 dv
1 dy
=
−
y dx
u dx v dx
and multiplying by y:
dy y du y dv
1 du u dv uv 0 − vu0
=
−
=
− 2
=
.
dx
u dx
v dx
v dx
v dx
v2
dy
Example 3. If y = uv , then to find
once again take the logs
dx
of both sides and differentiate implicitly:
ln(y) = ln(uv ) = v ln u,
so
d
d
d
d
ln y =
(v ln u) = v (ln u) + (ln u) v
dx
dx dx
dx
1 dy
v du
dv
=
+ (ln u)
y dx
u dx
dx
dy
v v du
dv
du
dv
=
u
+ (ln u)uv
= vuv−1 + (ln u)uv .
dx
u
dx
dx
dx
dx
6
Example 4. Let’s do a couple together. Say, differentiate
y = x4(x − 1)3(x2 + 1)5.
Example 5. Now let’s find
dy
when
dx
(x + 5)2ex
.
y=
(x + 2)3
7
Finding Extreme Values.
An important practical problem for which differentiation can often provide quick and easy answers is that of finding the extreme
values, that is maximum and minimum values of a function. To set the stage consider the following graph of a function
y=
f (x) defined on the interval a ≤ x ≤ b
Untitled-1
Fr
y = f (x)
B
r
D
r
r
E
A
r
a
b
r
C
The points A, B, C, D, E, and F are the extrema (singular extreme points) of the function. In particular,
• f has a relative minimum at A, C and E (i.e., f at that
point is less than or equal to all values of f (x) in some interval
about that point);
• f has a relative maximum at B, D, and F (i.e., f at
that point is greater than or equal to all values of f (x) in some
interval about that point);
• f has an absolute minimum at C (i.e., at that point f
is less than or equal to all values of f on the interval);
• f has an absolute maximum at F (i.e., at that point f
is greater than or equal to all values of f on the interval).
8
The extrema in this example typify virtually all of the extrema
that we shall encounter in this course. For continuous functions
extrema occur at only a limited class of points and the five extrema above illustrate each class. For a function y = f (x) a
point in its graph is
•A
critical point if either
It is a stationary point, that is, its derivative f 0(x)
is zero there;
It is a singular
exist there;
point, that is, its derivative does not
• It is an end point, that is, some interval on one side of
the point is not in the domain of f .
For example, for the above function, the points B, C and E are
stationary and D is singular, so these are the critical points of the
function. The points A and F are the end-points.
And here is the key fact about extreme points:
The extreme points of a continuous function
occur only at critical points and end-points.
This pretty clearly makes the task of finding all extreme points a
much easier task.
9
Example 1. Let’s find all extreme points of f (x) = 12x − x3 on
the interval −3 ≤ x ≤ 5. We begin our search by finding all critical
points and that begins with the derivative:
d
(12x − x3) = 12 − 3x2.
dx
Since this is defined for all values of x on the interval, there are no
singular points. But
f 0(x) =
f 0(x) = 12 − 3x2 = 0 ⇐⇒ x2 = 4 ⇐⇒ x = ±2.
So there are only two critical points: (−2, −16) and (2, 16).
Next, there are only two end-points at x = −3 and x = 5. That
is the end-points are (−3, −9) and (5, −65).
Since these four points are the only possible extreme points, we
need only compare them to see that
f (−3) ≥ f (−2),
f (−2) ≤ f (2),
and f (2) ≥ f (5),
so
• (−2, −16) and (5, −65) are relative minima;
• (−3, −9) and (2, 16) are relative maxima.
Finally just comparing the relative extrema, we see that (5, −65) is
the absolute minimum and (2, 16) is the absolute maximum.
10
Example 2. Here is a curious one. Let’s find the extrema of
f (x) = x4 − 4x.
This has no end-points so we need worry only about critical points.
But the derivative is
f 0(x) = 4x3 − 4 = 4(x3 − 1).
So there are no singular points and the only stationary point occurs
when
f 0(x) = 0 ⇐⇒ x3 − 1 = 0 ⇐⇒ x3 = 1 ⇐⇒ x = 1.
But notice that f (x) < f (1) for x < 1 and f (x) > 1 for x > 1.
So (1, −3) is neither a relative maximum nor a relative
minimum!! The lesson to be learned here is that
Critical points need not be relative
minima or relative maxima.
Example 3. Let’s try this one together: Find the extreme values
of the function
f (x) = x2e−x.
11