-
In this video, we're going to be
looking at how to differentiate
-
very simple functions from first
principles. So to begin with,
-
what we want to have a look at
is a straight line.
-
A straight line has a constant
gradient, or if we prefer its
-
rate of change of y with respect
to x is a constant.
-
If we take the straight line y
equals 3x + 2,
-
we can look at its gradient.
-
We take two points and look at
the change in y divided by the
-
change in x.
-
When x changes from -1 to 0,
y changes from -1 to 2,
-
and so the gradient is 3.
-
No matter which two points on
the line that we use, the value
-
of the gradient is always the
-
same. It is always 3.
-
Now we can see that in another
way, by looking at a table of values.
-
So let's take x ranging
in values from -3 up to 3.
-
And let's have a look at 3x.
-
Which is simply the values of x
we've got multiplied by 3.
-
And then add 2 to those values
to give us the function
-
y equals 3x + 2.
-
Now as we look at this table
of values, what we see is that
-
for every unit increase in x we
always get 3 units increase in y.
-
So as we go from -3 to -2,
y goes from -7 to -4.
-
As we go from 0 to 1, y goes
from 2 to 5.
-
For every unit increase in x we
get the same increase in y of 3 units.
-
And so the gradient of this
straight line is 3 or
-
the rate of change of y with
respect to x is also 3.
-
Now, nice as it is that a straight
line has a constant gradient
-
and that y is changing at a
constant rate with respect to x,
-
this is not always the case.
So for instance when
-
you are in a car and you press
the accelerator, you watch the
-
needle on the speedometer. The
needle doesn't go up gradually,
-
it doesn't go up constantly. The
rate of increase of the speed varies.
-
Similarly the acceleration due to gravity,
now near the surface of the Earth,
-
we assume that it's constant.
But Newton actually showed that
-
it was proportional to 1 over
r squared, where r was the
-
distance that we were away from
the surface of the earth. So we
-
can see that as we move further
away from the surface of the
-
Earth, the acceleration due to
gravity gets less, but it
-
doesn't change constantly. It
doesn't change uniformly.
-
So to see what's happening we
need to look at some very simple curves.
-
For a curve, we can see that if
we join any pair of points, we
-
get a straight line.
-
But when we join different pairs
of points, we tend to get very
-
different straight lines with
very different gradients.
-
We can see this again by looking
at very simple curve y equals x squared
-
and looking at a table
of values for it from -3 again
-
up to +3. So now let's calculate
the value of
-
the function y equals x squared
at each of these values.
-
Now let's have a look how the
value of the function is
-
changing as the value of
x changes. So if we have a
-
unit increase in x from -3 to
-2, we find that this time
-
the value of y is gone down
from 9 to 4, so it's gone down
-
by 5 units. Not a problem if
that decrease is going to be
-
sustained. But when we look at
the next unit.
-
From -2 to -1, we find that it's
gone down from 4 to 1,
-
y has decreased by 3.
-
And in the next unit it is
decreased by 1, but then it
-
starts to increase again so we
can see that for a very, very
-
simple function like y equals X
squared, y is not changing
-
constantly with respect to x.
Now this is not a problem so
-
long as we can find a way of
-
calculating it. To start that
process, let's just have a look
-
at a sketch of y equals x squared.
-
And let me pick this
point on the curve.
-
Now as we look at that look at
this very tiny little bit,
-
that's almost straight, and if I
was to home in and magnify, it
-
would be almost more straight
and it would appear to be
-
straighter and straighter so as
we homed in closer and closer to
-
the point what we would see
would be much more like a
-
straight line. What straight
line might we be able to take
-
to represent that sort of
local straightness? And the
-
answer would have to be a
-
tangent. Through the point.
-
And that gives us what we need,
because this tangent is a
-
straight line and we know that a
straight line has got a constant
-
gradient, and so this is the
definition that we make.
-
That the gradient
-
of a curve
-
y equals a function of x
-
at a given point
-
is equal
-
to the gradient
-
of the tangent
-
to the curve
-
at that point.
-
So notice we haven't defined the
-
gradient of the curve globally,
so to speak,
-
we've said that at any particular
-
point, the gradient of that
curve is going to be the same
-
as the gradient of the
tangent. So now what we want
-
to see is how can we use this
definition to help us actually
-
calculate that gradient at any
particular point?
-
Let's take a fixed point P on
our curve and a sequence of
-
Points Q1, Q2 and so on. Getting
closer and closer to P.
-
We see that the lines from
P to each of the Qs gets
-
nearer and nearer to being
a tangent as the Qs come
-
nearer and nearer to P.
-
So if we calculate the gradient
of one of these lines and let
-
the point Q Approach P along the
curve than the gradient of the
-
line should approach the
gradient of the Tangent.
-
And hence the gradient of
the curve.
-
So let's now try and set up
a calculation for the curve
-
y equals x squared at the point x
equals 3, so that this
-
calculation represents what
we've just seen.
-
So first of all, I'll
sketch the curve.
-
So there is y equals x squared.
-
Here will take our point.
-
Where x is equal to three. I'm
going to take a point Q,
-
which is near to P on the
curve and I'm going to join up
-
those two points with a straight line.
-
So there's my point, P as
my point Q and I'm going to take
-
a triangle formed by dropping a
perpendicular down to reach the
-
horizontal through P. So that will
give me a little right angle
-
triangle with the right angle at
the point are.
-
Now I'm going to take
small values of PR.
-
So that I get the coordinate
-
of Q. So let's line that up.
PR will be first of all 0.1,
-
then 0.01, 0.001
-
and finally 0.0001.
-
So what will be the x coordinate
of Q, x coordinate of Q?
-
Well, it will just be 3 + whatever PR is
-
so that will be 3.1, 3.01, 3.001
and 3.0001.
-
Now I've got the x coordinate of Q,
let's calculate the y coordinate of Q.
-
So that means we've got to
square each of these,
-
so our first result will be 9.61
when we square that.
-
Next is 9.0601.
-
Next 9.006001
-
and the next 9.00060001.
-
So what's the change in y
for each of these?
-
In other words, what's QR?
-
We know that the base for where
P is is if x is equal 3 at P,
-
y must be equal to 9.
So QR, the increase in y
-
we can get by taking 9 away
from each of these.
-
That's 0.61, 0.601, 0.006001,
0.00060001.
-
So now we need to
calculate the gradient of
-
each of these little segments
PQ. So what is that gradient?
-
will it be the increase in y, which is
QR, over PR, which is the increase in x.
-
So we've got 0.61 divided
by 0.1. So to do the first one
-
I'll write it down 0.61 divided
by 0.1, that is 6.1.
-
If we do the same calculation
here, the answer is 6.01.
-
Do the same calculation here
and it's 6.001.
-
And do the same calculation here
and it's 6.0001.
-
So let's just have a look what's
happening here. This gradient
-
seems to be getting nearer and
nearer to 6. And 6, perhaps by coincidence
-
is 2 times by 3, where 3 is the x value
at this point, P.
-
So we need to do this
calculation again, but we need
-
to do it in general.
-
So let's set that situation.
-
We take our axes.
-
And we plot our curve
y equals x squared.
-
Take my point P on the curve
and P is (x,y).
-
And I take a point Q a little
further along the curve.
-
How far along the curve is it?
-
Well, I'm going to increase x by
a very small amount.
-
So we got the same triangle.
-
As we had in the calculation.
-
So there's R.
-
And I am increasing x, to get to R,
by a very small amount and
-
that small amount is going to be
written as delta x.
-
Now I cannot emphasize enough
that delta x is not delta times by x.
-
It is a single symbol on its own,
and it represents a small change in x.
-
What's that resulted in? Its pushed the
point further along the curve to Q,
-
and so we've got a change in y
of delta y
-
So that the coordinates of Q are now
x + delta x and y + delta y.
-
Now. We've got the
diagram labeled up.
-
And so what we need to be able
to do is do some calculation.
-
What do we know? We know that
this is the graph of the curve
-
y equals x squared.
So here at the point Q we know that
-
y + delta y is equal to
x + delta x all squared.
-
This we can multiply out. It will
give us x squared plus 2x delta x,
-
and I'm going to put that
in a bracket to emphasize the
-
fact that delta x is a
single symbol,
-
plus delta x all squared.
-
But what else do we know? Will we
know at this point P that y is
-
equal to x squared.
-
So y + delta y is equal to this but
the y part is equal to x squared.
-
So that tells us therefore that the
change in y, delta y, is this bit here:
-
2x delta x plus delta x all squared.
-
So let's now calculate the gradient of
this line PQ.
-
The gradient of PQ,
-
well, it's QR over PR
-
or the change in y,
-
delta y, over the change in x.
-
And we've got expressions
for both of these:
-
delta x is delta x and delta y is this.
-
So we've got delta y over delta x
is equal to...
-
Let's remember that this was 2x
delta x plus delta x all squared
-
and that was all over delta x.
-
Now, delta x is a common factor here.
-
Let's take it out as a common factor:
2x + delta x
-
times by delta x; all over delta x.
Now delta x is a small positive
-
amount of x, so we can
cancel it out there and there.
-
So we have delta y over delta x
is equal to 2x + delta x.
-
Now remember what we're doing.
-
We've calculated the gradient of
this line PQ and we're going to let
-
Q come nearer and nearer to P
along the curve.
-
So we're letting delta x
tend to 0,
-
until this secant or cord, PQ,
becomes the tangent.
-
And so we can say that the gradient
-
of
-
the tangent
-
at P is equal to...
-
Now we have to use some
mathematical language.
-
What happens to this expression as
delta x approaches 0?
-
Well, it would seem that if
delta x got smaller and smaller
-
and smaller and smaller
and smaller, it got to zero.
-
This would become 2x. We are
approaching a limit of 2x and so
-
we use some mathematical
language to help us say that. So
-
we say that this is the limit,
-
as delta x tends to 0,
-
of delta y over delta x
-
is equal to
-
the limit as delta x tends to 0
-
of 2x + delta x
-
And if delta x is going off to 0,
this is just 2x and notice that
-
agrees with what we had before.
When we said that the gradient
-
was 2 times by 3 equal 6 at
the point where x is equal to 3.
-
Now we could do this
calculation in just the same
-
way for all kinds of
different curves, but it
-
would become a bit of a bind
if we had to keep writing
-
this down all the time. So we
have a special symbol for
-
this phrase, the limit.
-
as delta x tends to 0 of
delta y over delta x.
-
And we write that as dy by
dx and we say d y by d x
-
and that's a symbol all on its
own as a unit which stands for
-
the limit as delta x tends to 0
of delta y over delta x,
-
and in the case we've just
-
looked at, y equals X squared,
dy by dx we've just seen is equal to 2x.
-
Now. Another video in the
sequence will show how this is
-
done for y equals sine x and the
processes that we go through.
-
We often use function notation
y equals f of x.
-
So in function notation,
-
our point P, which
was the point x, y,
-
becomes the point
x, f of x.
-
Our point Q, which remember
was x + delta x, y + delta y
-
Well, this remains as x + delta x
for the x coordinate,
-
but the y + delta y. Well that's the
function of x + delta x.
-
And so if we want to have a look
at what we've done before, if
-
you remember, then we take
-
the change in y, that's delta y.
So the change in y is:
-
what we had here, at Q,
minus, what we had at P.
-
So that's f of x + delta x minus f of x,
and so our gradient delta y over delta x
-
is f of x + delta x minus f of x
all over delta x.
-
So dy by dx
-
is the limit as delta x tends to 0
-
of the change in y divided
by the change in x that gave rise to it.
-
Which is the limit
-
as delta x tends to 0
-
of f of x + delta x
minus f of x all over delta x
-
So, if we are using the language
of functions. That's the
-
language that we use and
sometimes for functions when
-
we're differentiating them
instead of using the symbol
-
dy by dx, sometimes use
the symbol a dash to indicate
-
that we've differentiated
with respect to x.
-
Let's just take one
example using this
-
notation, f of x is equal to the
function 1 over x.
-
Have a sketch of this curve for
positive values of x.
-
There it is coming down like
that. So if I take
-
a point P and I increase
the value of x by a small
-
amount to give me a second
point Q on the curve. Then
-
I can see that in fact,
-
there's my delta x.
-
And there's delta y, so for all
delta x still means a small
-
positive increasing x, delta y
just means the change in y and
-
we can see that this is actually
a decrease. Let me complete.
-
This triangle by drawing in
that secant, PQ and let's
-
have these coordinates,
this is x, y.
-
And this is. x + delta x
-
and then f of x + delta x.
-
So let's have a look what we've
got: delta y is the change in y
-
and so it's f of x + delta x
minus f of x.
-
And so delta y over delta x is
-
f of x + delta x minus f of x,
all divided by delta x.
-
And this is the gradient of
this line PQ.
-
OK, what is f of x + delta x
well, f of x is 1 over x so
-
this is 1 over
x + delta x.
-
minus f of x, which is just
1 over x,
-
all divided by
-
delta x.
-
Here we have two fractions and we are
subtracting them, so we need a
-
common denominator and that
common denominator will be
-
x times, x + delta x.
-
So I've multiplied this by, this
x + delta x, I have
-
multiplied it by x, so I must
multiply the 1 by x.
-
Minus, and I've multiplied the x
by x + delta x, so I must
-
multiply the 1 by x + delta x
and then this is all
-
divided by delta x.
-
So let's look at the top, x - delta x,
minus delta x.
-
So I've got x - x that goes out.
-
And I got on that line there - delta x.
-
All over, well, I'm dividing by
that, and by that, so effectively
-
I'm dividing by both of them.
-
So there we've got them both
written down.
-
Now delta x is a small positive quantity,
-
so I can divide top and bottom there
by delta x, canceling delta x out.
-
So delta y over delta x is equal to
-1 over, x + delta x, times by x.
-
Let me just multiply that
denominator out so I
-
have x squared plus
delta x times by x.
-
dy by dx is equal to the limit
as delta x tends to 0 of
-
delta y over delta x.
-
Which will be the limit
as delta x tends to 0
-
of -1 over x squared plus
delta x times by x.
-
Equals... Let's have a look at
what's happening in this denominator.
-
As delta x becomes very, very small
x times by delta x is also very very small
-
and very much smaller than x squared.
-
So as delta x goes off to 0, this term
here goes away to 0 and
-
just leaves us with the x squared.
-
So our limit is -1 over x squared.
-
And that's our calculation done
in function notation to find the
-
derivative, as we call dy by dx,
or the gradient of the curve at a point.
-
Now, the calculations that we've
done or all quite complicated.
-
You need to do one or two
to practice the method and
-
to see what's going on with
it - to see how it's actually working.
-
But, to do most of your differentiation,
there are a set of rules that you
-
can follow that will help you do the
differentiation much more quickly.