So let?s look at gradients of straight lines and curves.
Firstly, we'll start with a little recap.
We should all know at this point that to measure the gradient of a straight line,
you need to take the changing y over the changing x.
You?re measuring stiffness or the gradient of any type of surface that is tilted.
So you?re looking at how the y axis changes divided by how the x axis changes.
We sometimes call this gradient m and we use the notation delta y over delta x
or changing y over changing x very simply.
Now let?s move on to imagining that we are doing this to a curve.
So let?s take that idea now and develop our curve, here?s my x-axis and my y-axis.
So imagine that we have a curve, and now we start to look at this curve
and we start to look at how we?ll find the gradient of this curve.
Now imagine the ancients did something like this, they took a point here,
x which give you an answer of f of x, so let?s call that the function of x.
And if you change this x value by a small amount, let?s call that delta x.
We get to a new point which we will now call x plus delta x.
As a result, this will give you a new value on your y-axis, and let?s call this f of x plus delta x.
So it?s almost like we?re looking at this lying in between, so it?s a straight line
and we're looking at the gradient of this straight line here.
How do we do this? So we use the same concept as we did previously using a straight line.
We said that the gradient which we?ll call m is the same as delta y over delta x.
And we now know that this is the change in y, so change in y and this here is the change in x.
and you can actually see the change in y and the change in x here, on your picture.
So here we have the change in y, and here we have the change in x.
So let?s work out with the change in y would be here, the change in y
would in this case be f of x plus delta x and you subtract from it, f of x,
to get this value here that we?ve just worked out.
And in similarly for the x-axis, we?ll have x plus delta x and we take away x from it.
Let?s put that into our formula now, so, we?re going to say that delta y over delta x
is following from what we said earlier, is the change in y over change in x.
So our change in y over change in x is this. So we have f of x plus delta x
minus f of x and we divide that by our change in x, which is this part here.
So that?s x plus delta x minus x.
You can see now that we can simplify the bottom denominator a little bit.
So we?ve got plus x here and minus x, so that cancel?s out.
We can make this a little bit fancier by using a different notation for delta y over delta x.
We can write this as dy/dx, which is basically the notation that we use for differentiation
and if we rewrite this, we get f of x plus delta x minus f of x, all over delta x.
Now this here is the definition of a derivative, but we also call it differentiation from first principle.
So its differentiation done by the first principles.
You will see that it's used in different types of questions,
especially questions that are a lot more difficult to differentiate.
So you can always just come straight to the basic definition of differentiation.
However, there?s one little problem here,
like I said before that we were looking at the gradient of this line
and differentiation is basically finding the gradient of a single point.
So what we need to do is we need to reduce the length of this line.
So what we?re trying to do is make delta x smaller and smaller and smaller
and essentially that means that we want delta x to tend to zero.
We want to make this change so small, that this comes here
and you were essentially then finding the gradient of one singular point there.
So, if we now apply that concept here, if we say dy/dx as the limit of delta x tends to zero
is the same, so we're now saying the f of x plus delta x minus f of x over delta x.
And this is your formal definition of differentiation from first principles
or like I said before, it's known as the definition of a derivative.
You will see that we will use this definition lots of times through this course,
especially when we're faced with functions that aren?t as simple to differentiate.
We will always go back to the basics or to the definition of a derivative.