Skip to main content

About this free course

Share this free course

Introduction to differentiation
Introduction to differentiation

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

1.4.1 Differentiation from first principles

Suppose that f is any function. Let x denote any value in the domain of f such that f is differentiable at x (that is, such that the graph of f has a gradient at the point left parenthesis x comma f of x right parenthesis , as illustrated in Figure 17. Now consider a second point on the graph, with coordinates left parenthesis x plus h comma f times left parenthesis x plus h right parenthesis right parenthesis , where h is a positive or negative number, but not zero.

Described image
Figure 17 The points left parenthesis x comma f of x right parenthesis and left parenthesis x plus h comma f times left parenthesis x plus h right parenthesis right parenthesis on the graph of y equals f of x , and the line through them

The gradient of the line that passes through the two points is

rise divided by run equals f times left parenthesis x plus h right parenthesis minus f of x divided by left parenthesis x plus h right parenthesis minus x comma

and this expression can be simplified slightly to give

f times left parenthesis x plus h right parenthesis minus f of x divided by h full stop
Equation label: expression (2)

This expression is known as the difference quotient for the function f at the value x . As the second point left parenthesis x plus h comma f times left parenthesis x plus h right parenthesis right parenthesis gets closer and closer to the first point left parenthesis x comma f of x right parenthesis , that is, as the value of h gets closer and closer to zero, the value of the difference quotient gets closer and closer to the gradient of the graph at the point left parenthesis x comma f of x right parenthesis . That is, it gets closer and closer to f super prime of x . (Remember that the value of h can never actually be 0.)

So, to find a formula for f super prime of x , you need to consider what happens to the difference quotient for f at x , as h gets closer and closer to zero, taking either positive or negative values as it does so. In other words, you need to find, in terms of x , the limit of the difference quotient as h tends to zero. You saw this procedure carried out for the function f of x equals x squared in the last section, and in the next example you’ll see it carried out for the function f of x equals x cubed .

Example 1 Differentiating from first principles

Differentiate from first principles the function f of x equals x cubed .

Solution

Write down the difference quotient and use the fact that f of x equals x cubed .

The difference quotient for the function f of x equals x cubed at x is

f times left parenthesis x plus h right parenthesis minus f of x divided by h equals left parenthesis x plus h right parenthesis cubed minus x cubed divided by h full stop

Simplify the difference quotient. Start by multiplying out the term left parenthesis x plus h right parenthesis cubed in the numerator.

Multiplying out left parenthesis x plus h right parenthesis cubed gives

multiline equation row 1 left parenthesis x plus h right parenthesis cubed equals left parenthesis x plus h right parenthesis times left parenthesis x plus h right parenthesis squared row 2 Blank equals left parenthesis x plus h right parenthesis times left parenthesis sum with 3 summands x squared plus two times x times h plus h squared right parenthesis row 3 Blank equals x times left parenthesis sum with 3 summands x squared plus two times x times h plus h squared right parenthesis plus h times left parenthesis sum with 3 summands x squared plus two times x times h plus h squared right parenthesis row 4 Blank equals sum with 6 summands x cubed plus two times x squared times h plus x times h squared plus x squared times h plus two times x times h squared plus h cubed row 5 Blank equals sum with 4 summands x cubed plus three times x squared times h plus three times x times h squared plus h cubed full stop

So

multiline equation row 1 f times left parenthesis x plus h right parenthesis minus f of x divided by h equals sum with 4 summands x cubed plus three times x squared times h plus three times x times h squared plus h cubed minus x cubed divided by h row 2 Blank equals sum with 3 summands three times x squared times h plus three times x times h squared plus h cubed divided by h row 3 Blank equals h times left parenthesis sum with 3 summands three times x squared plus three times x times h plus h squared right parenthesis divided by h row 4 Blank equals sum with 3 summands three times x squared plus three times x times h plus h squared full stop

Work out what happens to the value of the difference quotient as h gets closer and closer to zero.

The second term in the final expression above contains the factor h , and the third term is h squared , so as h gets closer and closer to zero, both of these terms get closer and closer to zero. So the value of the whole expression gets closer and closer to the value of the first term, three times x squared . That is, the formula for the derivative of the function f of x equals x cubed is

f super prime of x equals three times x squared full stop

The formula for the derivative of f of x equals x cubed found in Example 1 tells you that, for example, the gradient of the graph of y equals x cubed at the point with x -coordinate one is

equation sequence part 1 f super prime of one equals part 2 three multiplication one squared equals part 3 three comma

and the gradient of this graph at the point with x -coordinate one divided by two is

equation sequence part 1 f super prime of one divided by two equals part 2 three multiplication left parenthesis one divided by two right parenthesis squared equals part 3 three divided by four full stop

You can see from Figure 18 that the gradients of the tangents to the graph at these two points do seem to be the numbers calculated using the formula.

Described image
Figure 18 Two tangents to the graph of f of x equals x cubed

In the next activity, you’re asked to use differentiation from first principles to find the derivative of the function f of x equals x super four .

Activity 5 Differentiating from first principles

  • a.Multiply out the expression left parenthesis x plus h right parenthesis super four . To do this, start by writing left parenthesis x plus h right parenthesis super four equals left parenthesis x plus h right parenthesis times left parenthesis x plus h right parenthesis cubed . Then replace the expression left parenthesis x plus h right parenthesis cubed by the expansion of left parenthesis x plus h right parenthesis cubed that was found in the solution to Example 1, remembering to enclose it in brackets. Finally, multiply out the brackets and collect like terms.

  • b.Hence differentiate from first principles the function f of x equals x super four .

  • c.What is the gradient of the graph of the function f of x equals x super four at the point with x -coordinate one divided by four ?

Answer

  • a.Multiplying out left parenthesis x plus h right parenthesis super four gives

    multiline equation row 1 Blank left parenthesis x plus h right parenthesis super four row 2 Blank equals left parenthesis x plus h right parenthesis times left parenthesis x plus h right parenthesis cubed row 3 Blank equals left parenthesis x plus h right parenthesis times left parenthesis sum with 4 summands x cubed plus three times x squared times h plus three times x times h squared plus h cubed right parenthesis row 4 Blank equals x times left parenthesis sum with 4 summands x cubed plus three times x squared times h plus three times x times h squared plus h cubed right parenthesis row 5 Blank prefix plus of h times left parenthesis sum with 4 summands x cubed plus three times x squared times h plus three times x times h squared plus h cubed right parenthesis row 6 Blank equals sum with 4 summands x super four plus three times x cubed times h plus three times x squared times h squared plus x times h cubed row 7 Blank sum with 4 summands prefix plus of x cubed times h plus three times x squared times h squared plus three times x times h cubed plus h super four row 8 Blank equals sum with 5 summands x super four plus four times x cubed times h plus six times x squared times h squared plus four times x times h cubed plus h super four full stop
  • b.The difference quotient for the function f of x equals x super four at x is

    f times left parenthesis x plus h right parenthesis minus f of x divided by h equals left parenthesis x plus h right parenthesis super four minus x super four divided by h full stop

    By part (a),

    multiline equation row 1 Blank f times left parenthesis x plus h right parenthesis minus f of x divided by h row 2 Blank equals sum with 5 summands x super four plus four times x cubed times h plus six times x squared times h squared plus four times x times h cubed plus h super four minus x super four divided by h row 3 Blank equals sum with 4 summands four times x cubed times h plus six times x squared times h squared plus four times x times h cubed plus h super four divided by h row 4 Blank equals sum with 4 summands four times x cubed plus six times x squared times h plus four times x times h squared plus h cubed full stop

    Each of the terms in the final expression above, except the first term, contains the factor h . Hence, as  h gets closer and closer to zero, each of the terms except the first term gets closer and closer to zero. So the value of the whole expression gets closer and closer to the value of the first term, four times x cubed . That is, the formula for the derivative is

    f super prime of x equals four times x cubed full stop
  • c.By the formula found in part (b), the gradient of the graph of the function f of x equals x super four at the point with x -coordinate one divided by four is

    equation sequence part 1 four multiplication left parenthesis one divided by four right parenthesis cubed equals part 2 four multiplication one divided by 64 equals part 3 one divided by 16 full stop

(The graph of f of x equals x super four is shown below.)

Described image

In each of the three examples of differentiation from first principles that you’ve seen so far, the function was differentiable at every value of x . If a function isn’t differentiable at some values of x , then you can still differentiate it from first principles, but the process won’t work for the values of  x at which it’s not differentiable. For these values of x the value of the difference quotient won’t get closer and closer to a particular number as h gets closer and closer to zero (where h can be either positive or negative).

For example, if the graph of a function f has a sharp corner at  left parenthesis x comma f of x right parenthesis , then the difference quotient for f at x will get closer and closer to a particular value when h is positive, but will get closer and closer to a different value when h is negative. As another example, if the graph of the function has a vertical tangent at left parenthesis x comma f of x right parenthesis , then the magnitude of the difference quotient for f at x will just keep getting larger and larger, without getting closer and closer to any particular value. In general, saying that a function f is differentiable at a particular value of  x is the same as saying that the difference quotient for f at x tends to a limit as h tends to zero. It must tend to the same limit for positive values of h as for negative values.

The method of differentiation from first principles is summarised in the box below. The notation ‘ lim over h right arrow zero ’ means ‘the limit as h tends to zero of’.

Differentiation from first principles

For any function f , the derivative f super prime of f is given by the equation

f super prime of x equals lim over h right arrow zero of f times left parenthesis x plus h right parenthesis minus f of x divided by h

for each value of x in the domain of f for which this limit exists.

Differentiation from first principles can be used to find formulas for the derivatives of many of the functions that you’ll need to work with. However, it’s a laborious process, so usually we don’t do it! Instead, in this course you’ll get to know the formulas for the derivatives of a range of standard functions, such as f of x equals x squared , f of x equals x cubed , f of x equals sine of x , f of x equals e super x , and so on. You’ll also learn about ways in which you can combine these formulas to obtain formulas for the derivatives of other, related functions. For example, if you know the formulas for the derivatives of f of x equals x squared and f of x equals x cubed , then you can combine them to obtain a formula for the derivative of f of x equals x squared plus x cubed . In these ways you’ll be able to find formulas for the derivatives of most of the functions that you’ll need to work with.

Of course, the idea of differentiation from first principles is still needed, to find the derivatives of the standard functions, to check that the rules for combining them are valid, and to differentiate functions that aren’t standard functions or combinations of standard functions.

Formulas for derivatives are powerful mathematical tools in many different situations, in both pure and applied mathematics. At this level of study, not only will you learn how to find such formulas, but you’ll also be introduced to a few of the ways in which they can be used. You’ll see many more uses of them if you go on to study further modules in mathematics, or some modules in areas such as science and economics.

The invention of calculus

The history of calculus goes back to the second half of the seventeenth century, when Isaac Newton in England and Gottfried Wilhelm Leibniz in what is now Germany both independently developed the basic ideas. Newton’s ideas were rooted in the applications of mathematics, while Leibniz’s were rooted in pure mathematics.

Described image
Isaac Newton (1642–1727)

Newton developed the ideas of calculus starting in about 1665. He called his ideas the ‘method of fluxions’ and wrote a treatise about them in 1671, which was not published in his lifetime, although its contents circulated in manuscript form, and a publication containing the method appeared in 1704. Leibniz then independently developed similar ideas, starting in about 1674. A manuscript that he wrote in 1675 includes the notation used in integral calculus to this day, as well as a standard rule for combining derivatives, the product rule. Leibniz’s notation for differential calculus is also still used today, as you’ll see shortly. Leibniz first published work on calculus in 1684.

Described image
Gottfried Wilhelm Leibniz (1646–1716)

The two men continued to develop their ideas for the next few years. However by the early 1700s Leibniz was being accused by Newton’s associates of having plagiarised Newton’s work. The allegation was that Leibniz had seen some of Newton’s unpublished papers and had merely invented a new notation for Newton’s ideas. The ensuing bitter argument led to a Royal Society investigation, which upheld the charge. However, the investigation was largely carried out by Newton’s friends, and Newton, who was President of the Royal Society, secretly guided its report. Investigations by modern historians have shown that the accusation against Leibniz was unjust. Newton and Leibniz arrived at equivalent results following different paths of discovery.

Isaac Newton

Isaac Newton was born in Lincolnshire, and studied and worked at the University of Cambridge. He was one of the world’s greatest physicists, mathematicians and astronomers, and is remembered in particular for his work on classical mechanics. He did much of his initial work on calculus at his family home in Lincolnshire, while Cambridge University was closed due to an outbreak of plague. In his later life Newton largely abandoned physics and mathematics, and wrote theological tracts before becoming Master of the Mint, a highly-paid government official, in London. He also worked on alchemy throughout his life. He was knighted in 1705, but for political reasons rather than for his scientific work or public service.

Gottfried Wilhelm Leibniz

Gottfried Wilhelm Leibniz was born in Leipzig, and attended university there and in Altdorf. He was a universal thinker who graduated in philosophy and law, and was self-taught in mathematics. He went on to work intensively on mathematics in Paris, before accepting the position of Counsellor and librarian at the court in Hanover, where he remained for the rest of his life. While there, he worked on many different projects, making important contributions to mathematics, philosophy, theology and history. Some of Leibniz’s projects were related to his salaried position, but his employers also allowed him to work on other projects of his choosing. He was interested in formalising calculations, and constructed the first mechanical calculator that could add, subtract, multiply and divide.

Before we begin the process of building up a collection of formulas for the derivatives of standard functions, and techniques for combining them, it’s useful for you to learn an alternative notation for derivatives.