So there you have it, you have just derived the definition for first principles
or the basic definition for a derivative.
You should really try it out and practice this
because later on you'll see that we'll use first principles
in proving lots of different functions and lots of different gradients.
And if ever you're stuck and things really aren't working out
go back to first principles and see if you can work it out using the derivative method.
So just a recap, you can see that differentiation first principles states
and this is what we derived, the dy/dx is f of x plus delta x
minus the original function f of x and then you divide it by delta x.
But also remember that the limit part is really important.
You're saying here that the derivative is only valid for when delta x tends to zero
because you want it to come to one singular point on the curve
rather than breaking the curve into little lines.
So, remember that as part of the definition,
that dy/dx as the limit delta x tends to zero
is f of x plus delta x minus f of x divided by delta x.
And once again, watch out because we're going to be using that over and over through this course.
So, let's do an example now, we'll put some numbers into the same concept
and see if we can differentiate this function y equals to 3x squared plus 5x minus 1.
But we're going to differentiate it from first principles.
So, let me just remind you of the definition,
we have said that dy/dx as the limit of delta x tends to zero is f of x plus delta x
minus f of x divided by delta x.
Now, with numbers this becomes a little bit easier,
and it helps to understand what this part is and what this part is.
Essentially this is just the original function, so this here is your y function,
whereas this function here means that you are adding a little bit extra delta x
to every part of your x. You'll see what I mean in the second
when we start working on this numerical example.
So let's take this thought and apply this to our function,
dy/dx as the limit of delta x tends to zero,
we won't use this yet but we'll keep it there just as our definition.
Now, look at your function closely, it says 3x squared,
instead of x squared we're now going to use this idea here,
because we want to change the x with the tiny bit called delta x.
So we're going to change this x to x plus delta x squared
because it's a 3x squared, plus 5 as it is and instead of x,
once again we're going to use x plus delta x
and the one obviously doesn't have any x so that can stay as it is.
So we've done the first part, we've done this part here
which states f of x plus delta x which is what we've just written now.
We now need to take away our original f of x,
so we will subtract by definition because it says minus
and we'll subtract the original function f of x
so you don't have to make any changes here,
our original function is 3x squared plus 5 x minus 1
and don't forget that it's all being divided by delta x.
So here's where the fun starts,
so let's just start expanding this using some algebra,
remember that this is two brackets so, its x plus delta x, x plus delta x.
So, if I write it out here just don't make it clear we've got x plus delta x, x plus delta x,
you can times this through, so we've got plus 5x, plus 5 delta x, minus 1.
Now when you open this bracket, make sure that you multiply through with the minus,
so we've got minus 3x squared minus 5x plus 1 all over delta x.
Still a little bit more to go but you'll see that it will become easier eventually,
and we'll get to a nice easy gradient. Let's expand this out here with practice,
you'll see that you don't have to this in so many steps,
but if we expand this out you'll multiplying it through,
so, you have x squared, plus 2 lots of x delta x, plus delta x squared, plus 5x, plus 5 delta x,
minus 1, minus 3x squared, minus 5x plus 1 and it's still all being divided by delta x.
Almost there, lets times it through with the 3,
so we've got 3x squared, plus 6x, delta x plus 3 delta x squared,
plus 5x, plus 5 delta x,
minus 1, minus 3x squared, minus 5x plus 1, all over delta x.
Here you'll start to notice that some things cancel out,
which makes our lives a little bit easier, let me just do this one bit at a time.
Observe 3x squared here, and minus 3x squared there,
you also have a plus 5x and a minus 5x
and then you should somewhere have a minus 1 and a plus 1.
With practice you'll see that this last function,
if you're doing it correctly will usually cancel out,
leaving you with just the function with the deltas left.
Now, since I'm running out of space, I'm going to use a different color to cancel out the delta x's.
So, if you observe closely and look at what's left here,
you will see that you have 6x delta x, 3 delta x all squared
and 5 delta x here, and it's all being divided by the term delta x.
So, you can actually cancel delta x with this,
let's cancel it with one of them and with that delta x there.
We are now left with our final term, so we've got 6x, plus 3 delta x, plus 5,
and remember that we cancel the delta x at the end.
The very last bit that we do now is we apply this little bit that we mentioned at the start,
that the limit delta x tends to zero.
So, you say here, that dy/dx as the limit of delta x tends to zero
and all that really means, is that any term that has delta x in it, you make it zero.
In our case, that's this term here, so, 3 times zero will give you zero,
giving as a final answer of 6x plus 5.
So your gradient dy/dx of the function 3x squared plus 5x, minus 1,
we have derived by first principles to be 6x plus 5.
So that's pretty exhausting right, but one last time
let's just go over differentiation from first principles.
I say this over and over again
because it's important we know this definition as we go through this course.
But, good things are about to happen,
we will go to a faster way of differentiating shortly,
but, just remember that the differentiation from first principles states
that f of x, plus delta x minus the original function f of x
divided by delta x as the limit of delta x tends to zero will give you the differential.