topic badge
AustraliaVIC
VCE 11 Methods 2023

9.02 Differentiation from first principles

Lesson

We now want to combine what we know about average and instantaneous rates of change with the use of limits, to be able to calculate the instantaneous rate of change at a point, and the derivative - a function describing the gradient of the tangent at any point on the graph. Previously, the gradient of the tangent at a point was estimated by calculating the gradient of the secant through that point and another point close by. The idea behind calculus it taking the limit as the second point becomes closer and closer to the point of interest.

Let's review the concepts so far. The average rate of change between $x=a$x=a and $x=b$x=b is the gradient of the secant through these points as shown below:

$\text{Average rate of change}=\frac{f\left(b\right)-f\left(a\right)}{b-a}$Average rate of change=f(b)f(a)ba

The instantaneous rate of change can be estimated by bringing the second point in closer to $A$A. The diagram below shows the tangent at point $A$A and three secants at progressively closer points $B$B. We can see the secants become a closer estimate for the tangent at $A$A as $B$B draws closer.

So, to estimate the gradient of the tangent at $A$A, where $x=a$x=a, make a second point $B$B close to this - say at $x=a+h$x=a+h where $h$h is small so the estimate is close. The smaller the size of $h$h, the closer that the secant through $A$A and $B$B comes to matching the tangent at $A$A.

In the applet below, this can be visualised by making $h$h close to zero and seeing how close the secant approximates the tangent.

In the applet above, notice that the gradient of the secant through $A$A and $B$B is given by:

$\text{Gradient of secant}$Gradient of secant $=$= $\frac{y_2-y_1}{x_2-x_1}$y2y1x2x1
  $=$= $\frac{f(a+h)-f(a)}{h}$f(a+h)f(a)h

To obtain the gradient of the tangent requires $h$h to approach zero. The secant does not exist at $h=0$h=0, when the two points lie on top of each other, as the gradient is not defined. However, using limits, we can find the value that the gradient of the secant is approaching.

Hence, the gradient of the tangent to $f(x)$f(x) at $x=a$x=a, denoted $f'(a)$f(a) is given by:

$f'(a)=\lim_{h\rightarrow0}\frac{f\left(a+h\right)-f(a)}{h}$f(a)=limh0f(a+h)f(a)h

Using this formula to find or evaluate a derivative is called differentiation by first principles. There are many patterns and rules that allow for derivatives to be calculated, however, using this limit is finding the gradient using the fundamental definition and hence, why it is called "from first principles". The following examples demonstrate how this works in practice.

Worked example

Example 1

Find the gradient of the tangent to $f(x)=x^2+5$f(x)=x2+5 at $x=3$x=3.

Think: We are looking for $f'(a)$f(a) from our formula above with $a=3$a=3. Using first principles, we require $f\left(3\right)$f(3)and $f\left(3+h\right)$f(3+h), it can be a good idea to find these first and simplify if possible before substituting into the formula.

Do: For $f(x)=x^2+5$f(x)=x2+5

$f(3)$f(3) $=$= $3^2+5$32+5             $f(3+h)$f(3+h) $=$= $(3+h)^2+5$(3+h)2+5
  $=$= $14$14     $=$= $9+6h+h^2+5$9+6h+h2+5
          $=$= $14+6h+h^2$14+6h+h2
Hence, $f'(3)$f(3) $=$= $\lim_{h\rightarrow0}\frac{f\left(3+h\right)-f(3)}{h}$limh0f(3+h)f(3)h  
  $=$= $\lim_{h\rightarrow0}\frac{14+6h+h^2-14}{h}$limh014+6h+h214h Substitute the expressions found above
  $=$= $\lim_{h\rightarrow0}\frac{6h+h^2}{h}$limh06h+h2h Simplify the numerator
  $=$= $\lim_{h\rightarrow0}\frac{h\left(6+h\right)}{h}$limh0h(6+h)h Factorise the numerator
  $=$= $\lim_{h\rightarrow0}\left(6+h\right)$limh0(6+h) Divide top and bottom by $h$h, to reveal the behaviour of the expression when $h\ne0$h0
  $=$= $6$6 Take the limit by substituting in $h=0$h=0

Hence, the gradient of the tangent to $f(x)=x^2+5$f(x)=x2+5 at $x=3$x=3 is $6$6.

Notice:

  • The limit expression needs to remain until the final step of taking the limit by substituting in $h=0$h=0.
  • To be able to substitute in $h=0$h=0 in our last step we must remove the $h$h from the denominator - so after simplifying the numerator you should always be able take out a factor $h$h for any function you are expected to use this technique for.

 

Practice question

Question 1

Consider the function $f\left(x\right)=x^3$f(x)=x3

  1. By filling in the table of values, complete the limiting chord process for $f\left(x\right)=x^3$f(x)=x3 at the point $x=3$x=3.

    $a$a $b$b $h=b-a$h=ba

    $\frac{f\left(b\right)-f\left(a\right)}{b-a}$f(b)f(a)ba

    $3$3 $3.5$3.5 $0.5$0.5 $\editable{}$
    $3$3 $3.1$3.1 $\editable{}$ $\editable{}$
    $3$3 $3.05$3.05 $\editable{}$ $\editable{}$
    $3$3 $3.01$3.01 $\editable{}$ $\editable{}$
    $3$3 $3.001$3.001 $\editable{}$ $\editable{}$
    $3$3 $3.0001$3.0001 $\editable{}$ $\editable{}$

    Provide answers up to four decimal places when required.

  2. The limiting chord process has been used to calculate the instantaneous rate of change for each value of $x$x given in the table. Complete the missing values.

    $x$x $1$1 $2$2 $3$3 $4$4 $5$5

    Instantaneous rate of change of $f\left(x\right)$f(x) at $x$x.

    $3$3 $12$12 $\editable{}$ $48$48 $\editable{}$
  3. We can therefore deduce that the instantaneous rate of change of $f\left(x\right)$f(x) at any point $x$x is:

 

Finding the derivative by first principles

In the previous example, the gradient of the tangent at a particular point was found. If this were done for many points on the same function, we may notice that they follow a pattern

For example, the table below shows the gradient of the tangent at several points for the function $f(x)=x^2+5$f(x)=x2+5:

$x$x $1$1 $2$2 $3$3 $4$4 $5$5
$f'(x)$f(x) $2$2 $4$4 $6$6 $8$8 $10$10

From this table, a conjecture (a guess based on some evidence) could be made that $f'(x)=2x$f(x)=2x, that is, the gradient of the tangent at any point is double the value of the $x$x-coordinate. However, how can this be checked? Is there a way of proving that the derivative is indeed $f'(x)=2x$f(x)=2x?

We can again use first principles but rather than a set point $x=a$x=a, use a general point $x$x.

Differentiation by first principles

For a function $f(x)$f(x), the derivative (or gradient function) is given by:

$f'(x)=\lim_{h\rightarrow0}\frac{f\left(x+h\right)-f(x)}{h}$f(x)=limh0f(x+h)f(x)h 

Did you know?

Recall from the investigation on notation, that an alternate and commonly used notation for the derivative is Leibniz's notation of $\frac{dy}{dx}$dydx. The Greek letter delta is used to symbolise "change in". So, we can also describe average rates of change and the instantaneous rate of change using this alternate notation. For a function $y=f(x)$y=f(x), we have:

Average rate of change - gradient of secant

$\text{Gradient between two points}$Gradient between two points $=$= $\frac{\Delta y}{\Delta x}$ΔyΔx
  $=$= $\frac{f\left(x+\Delta x\right)-f(x)}{\Delta x}$f(x+Δx)f(x)Δx

Instantaneous rate of change - gradient of tangent

$\frac{dy}{dx}$dydx $=$= $\lim_{\Delta x\rightarrow0}\frac{\Delta y}{\Delta x}$limΔx0ΔyΔx
  $=$= $\lim_{\Delta x\rightarrow0}\frac{f\left(x+\Delta x\right)-f(x)}{\Delta x}$limΔx0f(x+Δx)f(x)Δx


This can be written with upper case delta $\Delta$Δ or lower case $\delta$δ (meaning "small change in"). We can see this notation replaces $h$h with the term $\Delta x$Δx denoting the change in $x$x.

 

Worked examples

Example 2

Using first principles, show that the derivative of $f(x)=x^2+5$f(x)=x2+5 is $f'(x)=2x$f(x)=2x. And hence, find the gradient of the tangent at $x=10$x=10.

Think: Using first principles, we require $f\left(x\right)$f(x) and $f\left(x+h\right)$f(x+h), let's state these first and simplify if possible before substituting into the formula.

Do: We have $f(x)=x^2+5$f(x)=x2+5 and

$f(x+h)$f(x+h) $=$= $(x+h)^2+5$(x+h)2+5
  $=$= $x^2+2xh+h^2+5$x2+2xh+h2+5
  $=$= $14+6h+h^2$14+6h+h2
Hence, $f'(x)$f(x) $=$= $\lim_{h\rightarrow0}\frac{f\left(x+h\right)-f(x)}{h}$limh0f(x+h)f(x)h  
  $=$= $\lim_{h\rightarrow0}\frac{x^2+2xh+h^2+5-\left(x^2+5\right)}{h}$limh0x2+2xh+h2+5(x2+5)h Substitute the expressions found above
  $=$= $\lim_{h\rightarrow0}\frac{2xh+h^2}{h}$limh02xh+h2h Simplify the numerator, careful to subtract all terms in the bracket
  $=$= $\lim_{h\rightarrow0}\frac{h\left(2x+h\right)}{h}$limh0h(2x+h)h Factorise the numerator
  $=$= $\lim_{h\rightarrow0}\left(2x+h\right)$limh0(2x+h) Divide top and bottom by $h$h
  $=$= $2x$2x Take the limit by substituting in $h=0$h=0

Hence, the derivative of $f(x)=x^2+5$f(x)=x2+5 is $f'(x)=2x$f(x)=2x.

We can now find the gradient of the tangent at any value of $x$x by substituting into this rule. So the gradient of the tangent at $x=10$x=10 is:

$f'(10)$f(10) $=$= $2\times10$2×10
  $=$= $20$20
Example 3

Differentiate $f(x)=3x^2+4x-5$f(x)=3x2+4x5.

Think: Using first principles, we require $f\left(x\right)$f(x)and $f\left(x+h\right)$f(x+h), let's find these first and simplify if possible before substituting into the formula.

Do: We have $f(x)=3x^2+4x-5$f(x)=3x2+4x5 and

$f(x+h)$f(x+h) $=$= $3(x+h)^2+4(x+h)-5$3(x+h)2+4(x+h)5
  $=$= $3(x^2+2xh+h^2)+4x+4h-5$3(x2+2xh+h2)+4x+4h5
  $=$= $3x^2+6xh+3h^2+4x+4h-5$3x2+6xh+3h2+4x+4h5
Hence, $f'(x)$f(x) $=$= $\lim_{h\rightarrow0}\frac{f\left(x+h\right)-f(x)}{h}$limh0f(x+h)f(x)h  
  $=$= $\lim_{h\rightarrow0}\frac{\left[3x^2+6xh+3h^2+4x+4h-5\right]-\left[3x^2+4x-5\right]}{h}$limh0[3x2+6xh+3h2+4x+4h5][3x2+4x5]h Substitute the expressions found above
  $=$= $\lim_{h\rightarrow0}\frac{6xh+3h^2+4h}{h}$limh06xh+3h2+4hh Simplify the numerator
  $=$= $\lim_{h\rightarrow0}\frac{h\left(6x+3h+4\right)}{h}$limh0h(6x+3h+4)h Factorise the numerator
  $=$= $\lim_{h\rightarrow0}\left(6x+3h+4\right)$limh0(6x+3h+4) Divide top and bottom by $h$h
  $=$= $6x+4$6x+4 Take the limit by substituting in $h=0$h=0

Hence, the gradient function of $f(x)=3x^2+4x-5$f(x)=3x2+4x5 is $f'(x)=6x+4$f(x)=6x+4.

Practice questions

Question 2

Consider the function $f\left(x\right)=-5x+4$f(x)=5x+4.

  1. Find $f\left(x+h\right)$f(x+h).

  2. Find $f\left(x+h\right)-f\left(x\right)$f(x+h)f(x).

  3. Find $\frac{f\left(x+h\right)-f\left(x\right)}{h}$f(x+h)f(x)h.

Question 3

We want to find the derivative of $f\left(x\right)=-6x^2$f(x)=6x2 from first principles.

  1. Find $f\left(x+h\right)$f(x+h) in expanded form.

  2. Find $f\left(x+h\right)-f\left(x\right)$f(x+h)f(x).

  3. Find $\frac{f\left(x+h\right)-f\left(x\right)}{h}$f(x+h)f(x)h.

  4. Hence find $f'\left(x\right)$f(x) by evaluating $\lim_{h\to0}\left(\frac{f\left(x+h\right)-f\left(x\right)}{h}\right)$limh0(f(x+h)f(x)h).

Question 4

Consider the function $f\left(x\right)=\left(x+6\right)\left(x+2\right)$f(x)=(x+6)(x+2).

  1. Determine the gradient function of $f\left(x\right)=\left(x+6\right)\left(x+2\right)$f(x)=(x+6)(x+2) from first principles.

    Show all steps of working.

  2. Determine the gradient at the point where $x=3$x=3.

Outcomes

U2.AoS3.1

informal treatment of the gradient of the tangent to a curve at a point as a limit, and the limit definition of the derivative of a function

U2.AoS3.7

the limit definition of the derivative of a function, the central difference approximation, and the derivative as the rate of change or gradient function of a given function

U2.AoS3.2

the central difference approximation and its graphical interpretation

What is Mathspace

About Mathspace