- In our previous
lesson, we talked
about how we could find the
derivative at a specific point.
But today we're going to
extend that discussion,
and answer the question
of how can we calculate
the derivative at every point.
So to set this up, we
are going to expand
our definition of the derivative
to, instead of just calculating
the slope of the tangent
line at a specific point,
we're going to start to look at
the derivative as a function.
And specifically
that function is
going to be written as
f with a little mark
that we call prime.
f prime of x.
That means it's the
derivative of f at x.
f prime of x is equal to
the limit as h goes to 0,
and we're going to take
that second definition
of a derivative, and kind
of generalize it to f of x
plus h minus f of x all over h.
And this is going
to be our equation
to calculate the derivative as
a function for all points x.
So if we can just
calculate this thing,
we just have to
plug in the x value
to get the actual derivative at
any point we're interested in.
So let's see if we can
actually use this formula
to find the derivative
of, let's start
with f of x equals x
squared minus 4x plus 1.
So to calculate the
derivative f prime
of x, we're going
to replace each
of the x's with the x plus h.
So x plus h becomes
x plus h squared--
whoops, forgot the limit part,
don't forget the limit part,
that's important.
Limit is h goes to 0 of x
plus h squared minus 4 times
x, which is now
x plus h, plus 1.
And then the derivative
function says subtract
the entire function f of x.
It's very important
when you do this
you put the function in
parentheses, because otherwise,
we're going to run
into a sign error.
We're not just subtracting
the first term.
No, we want to make sure we
subtract the entire thing.
That negative is going to
ultimately, in our next step,
distribute through
that parentheses
onto the entire
polynomial there.
We'll get there in
a minute, but don't
forget to put the
function in parentheses.
And it's all over h.
So cleaning this up then, we're
going to end up with the limit
as h goes to 0 of--
and when we square,
we get x squared
plus 2 x h plus h squared.
Distribute the
negative 4, 3, we get
negative 4x minus 4 h plus a 1.
Then distributing the negative
through, we get negative x
squared, positive 4
x, and a negative 1,
distributing that negative all
the way through, all over h.
But what's nice now is,
this is as ugly as it gets.
Because you'll start
to see lots of things
are going to disappear.
We've got x squared and
a negative x squared.
Those go to zero.
We've got a negative 4
x and a positive 4 x.
Those go to zero.
We've got a positive
1 and a negative 1.
Those go to zero.
And so when we clean up,
we just have left the limit
as h goes to 0 of 2 x h plus h
squared minus 4 h all over h.
We want to remove the
discontinuity at h,
and it's nice because
we can factor out in h.
So we have the limit as h
goes to 0 of h times 2x plus h
minus 4, all over h.
And now we divide out the h's.
We've removed the
discontinuity, so we
can replace h with
what it's approaching,
0 2 x plus 0 minus 4.
Or just 2 x minus
4 is the equation
for the derivative
of the tangent line
of x squared minus 4 x plus 1.
Now if we wanted to know
the derivative at any value,
we just plug in that number.
If we want to know what the
derivative is when x equals 0,
plug 0 in, we get negative 4.
If we want to know what
the derivative is at 10,
we plug 10 in.
We get 20 minus 4, which is 16.
And it's really quick to
calculate the derivative now
that we have a function
to describe it.
Let's try one more example.
Let's take f of x is equal to
the square root of 2 x plus 1,
and see if we can
calculate her derivative.
So to calculate the
derivative, f prime
of x, it's equal to the
limit as h approaches 0,
of f of x plus h.
We're going to replace
the x with x plus h.
That gives us the square
root of 2, times x plus h,
plus 1, minus the
function itself,
which is the square root of
2 x plus 1, all over the h.
Well, we've seen
square roots before.
We know to get rid of them.
We multiply by the conjugate.
So we have the square root of--
and I'm going to go
ahead and distribute just
to save us the work--
2 x plus 2 h plus 1.
We use plus, the opposite sign,
the square root of 2 x plus 1.
And do the same thing
in the denominator, 2
x plus 2 h plus 1, plus the
square root of 2 x plus 1.
When we do that, we have
the limit as h goes to zero.
We square the square roots.
They're gone.
We've got a minus
in between them.
So we have 2 x plus
2 h plus 1 plus--
minus between them.
Don't forget the
minus between them.
Minus, and I'm going to
go ahead and distribute
that negative on to both parts.
Make sure it goes
on to both parts.
Negative 2 x minus
1, all over h times--
and we'll leave this
factor, because we
want to be able to reduce
the square root of 2
x plus 2 h plus 1 plus the
square root of 2 x plus 1.
And then things
become nice for us.
2 x minus 2 x, 0.
1 minus 1 is 0.
And so we just
have the limit as h
goes to 0 of 2 h over h
times the square root of 2
x plus 2 h plus 1, plus the
square root of 2 x plus 1.
And ultimately those
H's divide out,
and we have removed
our discontinuity.
Now we're ready to
plug in what we know.
H is 0.
So we have 2 over
the square root
of 2 x plus 2 times 0 plus
1 plus the square root of 2
x plus 1.
What's nice is that 2 times
0 is actually equal to 0.
So we have matching
radicals in the denominator.
2 x plus 1 times 2 x plus 1.
So we've got two of those.
So we have 2 over 2 square
roots of 2 x plus 1.
And actually we can
reduce out the 2's, which
is going to leave behind a 1.
So for our final function,
1 over the square root of 2
x plus 1.
So now that we know kind of
how to calculate derivatives,
and there will be a lot to
practice on the assignment
and in class, I want
to talk a little bit
about how the
derivative is connected
to the graph of the function.
We're going to see if we can
sketch a graph of a derivative.
Because remember, the
derivative describes
the slope, or the rate of
change, of the tangent line.
In fact, let's write that down.
The derivative is the
slope of the tangent line.
So if the graph is increasing--
if the graph is going uphill--
then it's got a positive
slope because the slope
is going uphill.
In other words, f prime of
x has to be greater than 0.
That means the graph must
be going uphill somehow.
You see, it's going
uphill from left to right.
It's got a positive slope.
If the slope-- or if the graph--
is decreasing, the
graph is going downhill.
The tangent line will
also go downhill,
so the slope of the
tangent line is negative.
In other words, the derivative
f prime of x is negative.
It's less than zero.
The graph is going downhill.
So the graph of the tangent
line is also negative,
showing the downhill slope.
I guess we could also say
the neutral statement,
that if the graph
hits a flat point--
if the graph is flat--
then we can say the slope is 0.
In other words, we would say
f prime of x is equal to 0.
And that could happen
a couple of ways.
It could be going up and level
out, so there's your slope 0.
Right on top.
It could be going
down and leveling out,
so your slope is 0 down
there on the bottom.
It's completely flat.
Or it could make a trough,
where it comes up, levels
out, and keeps going
up or keeps going down,
but you notice right
in the middle there,
the tangent line does level
out as it changes direction.
So what this looks like then,
on a graph, is for an example,
is if I have a function here--
We'll call this f of x--
and let's see.
We're going to put a
point on the graph at--
let's give it some height too.
We'll put a point on this graph
at negative 3, negative 2,
and another point
at negative 1, 2.
Then a point at 2, negative 2.
And then we'll connect it
by coming in from the top,
hitting the first
point and going up.
Hitting the second
point and going down.
And we're going to make a
trough where we level out
and keep going down
at the third point.
Now let me see if I can make
that a little better here.
Down, maximum, level off.
There we go.
Maybe.
We'll call that good enough.
In order to draw a graph of the
derivative of this function,
a graph of f prime of
x, what we'll do is,
we'll kind of make some
observations about this graph.
The first observation that's
going to be helpful to us
is identifying where the
tangent line is completely flat.
Because at all of those points
where the tangent line is flat,
we know the slope
is equal to 0, which
means we've got a 0 on our
graph at each of those points.
So the slope is 0
here at negative 3.
At negative 3, there's a 0.
At negative 1, the slope is 0.
And at positive
2, the slope is 0.
That's where we've got
our x-intercepts of 0.
Because the graph is
describing the slope.
The next thing I notice is the
graph starts going downhill.
The slope is negative.
So we need to start
negative on our graph
until we hit that point.
After that, the graph
starts going uphill.
It's increasing.
The slope is positive
until the next zero.
So we need to make sure
our graph is positive
till we hit the next 0.
Notice the green line is
now all above the x-axis
positive till the next 0.
Then we're decreasing
to the next 0.
So we're going to
be negative, need
to be negative to the next 0.
But afterwards, it's
still decreasing,
which means after the next 0,
we still need to be decreasing.
We still need to be negative.
So the graph starts negative,
turns positive, turns negative,
and then stays negative.
And so we've sketched
approximately--
not exactly but pretty close--
to what the derivative of this
first function looks like.
Because we know that if
the graph is increasing,
the derivative is positive.
If the graph is decreasing,
the derivative is negative.
And if the graph is flat,
the derivative is 0.
I have one more extension I
want to put on to this lesson.
And it's really just
more of the same
of what we saw at the beginning,
along with a little bit
of notation.
And it's this idea
of what we call
higher ordered derivatives.
And the idea here is,
if we take a function,
and we can find its derivative,
which is also a function,
we should be able to
take its derivative
to get another function.
And then take its derivative
to get another function.
And just keep taking
derivatives of derivatives.
Derivatives of derivatives.
And to set this up, I
want to talk a little bit
about notation and one of
the challenges of calculus
that came out of it.
Calculus was developed
simultaneously
by both Newton, who gets all
the credit, and Leibniz--
I'm probably pronouncing
his name wrong.
But both of them used
a different notation
for how to express
the derivative.
And so as a result, we have
two different notations
for how to express
the derivative.
Newton used f of x, and
his compadre used y.
And so, when we're talking
about the first derivative,
the derivative
that we just take,
Newton would just
put a prime on it.
So we'd see f prime of x to
represent the first derivative.
Alternatively,
with just the y, we
could call that d y, d x,
which is the derivative of y
with respect to x.
What the variable is
that we're working with.
The second derivative then, the
derivative of the derivative,
with f of x notation, we
just do a double prime,
to show the derivative
has been taken twice.
However, with the
d y d x notation,
we say we take the derivatives
twice of y with respect
to x twice.
And so we get d 2 y over d x 2.
And then we kind of extend that
to the third, fourth, fifth,
and beyond derivatives,
where you'll
see three primes to represent
the third derivative.
And then it's d 3 y for
the third derivative of y
with respect to x three times.
So that's kind of the
notation you might see.
But really it just means
take the same formula
for the same idea.
In other words, the
derivative of the derivative,
or f prime prime of x,
is equal to the limit
as h goes to 0 of f
prime of x plus h minus
f prime of x, all over h.
In fact, I'm not even going
to mark this as a key formula,
because it's the exact
same derivative formula.
This time we're just
working with the derivative
to calculate the
second derivative.
Let's do an example where
we can see that worked out.
We're going to find the
second derivative of 3
x squared minus 4 x plus 1.
Well, in order to find
the second derivative,
we first have to know what
the first derivative is.
So let's find the
first derivative,
f prime of x is
equal to the limit
as h goes to 0 of f of x plus h.
We're going to replace
the x's with x plus h.
3 times x plus h squared,
minus 4 times x plus h, plus 1
minus the f of x,
which we're going
to put in parentheses so we
don't forget to distribute
the negative through, minus
3x squared minus 4x plus 1,
all over h.
Which is equal to the
limit as h goes to 0 of--
with this first part we
have to square the x plus h,
and then distribute a 3 through.
So I'm just going to square
it off to the side here.
X squared plus 2 x
h plus h squared.
And then I'll distribute
the three into that,
so we have 3x squared plus
6 x h plus 3 h squared.
Distribute the negative to get
negative 4 x minus 4 h plus 1.
Distribute the negative through
to get negative 3x squared
plus 4 x minus 1, all over h.
Hopefully we can
clean this up a bit.
3 x squared minus 3
x squared is zero.
Negative 4 x plus 4 x 0.
1 minus 1 is 0.
And so we have the
limit as h goes to 0,
of 6 x h plus 3 h squared
minus 4 h all over h.
And we remove that
discontinuity by factoring
out the h times 6 x plus 3
h minus 4, all over the h.
The h's divide out, and now
we can just plug in the 0,
so we have 6 x plus 3
times 0 minus 4, which
is equal to just 6 x minus 4.
But that is just the
first derivative.
This problem wanted us to
find the second derivative.
So using our new function,
we take the derivative again.
F prime prime of x is
equal to the limit as h
goes to 0, of f of x plus h.
We're going to replace
the x with x plus h,
so we have 6 times
x plus h minus 4.
Subtract the function, or
subtract the 6 x minus 4,
and put it all over h.
Distributing through, we get
the limit as h goes to 0 of 6 x
plus 6 h minus 4
minus 6 x plus 4,
distributing that negative
through, all over h.
Fortunately we can
subtract some things out.
6 minus 6 x is 0.
Negative 4 plus 4 is 0.
And so we have the
limit as h goes
to 0 of 6 h over h, which is
really nice because the h's
divide out, and we're just left
with a single simple number
6 as our second derivative of
3 x squared minus 4 x plus 1.
If I wanted to find
the third derivative,
we would just run through
the formula again.
But ultimately, with
this lesson today,
the important key
thing is that you
know the function
for the derivative
is the limit as h goes
to 0, of f of x plus h,
minus f of x, all over h.
Try a few and practice this.
We'll take a look
at it more in class.
And we will see you then.
