# Differentiation From First Principles – A Level Maths Revision

Differentiation is a method of finding and studying the rate of change of a function. It is one of two branches of calculus – the other being integration. This page describes the process of differentiation from first principles – this is something you should understand, but it is not how you’d normally differentiate. For that, see our page on Differentiation of Standard Functions.

To download this content in printable or presentable formats, click here. If you’d like to practise some of the prior knowledge required for differentiation (mostly a clear understanding of GCSE algebra and coordinate geometry), click here. If you’d like to see more of our selection of differentiation resources, they are all available here.

Consider the gradient of a straight line. The gradient is the rate of change of a linear function, and it is constant no matter where on the line you measure it. This is not the case for nonlinear functions. Differentiation allows you to find the rate of change at any chosen point of any function (where that rate of change is defined). This is called the derivative of the function.

As an example, consider the graph of y = x2. This function is a curve, so it does not have a constant rate of change, but you can imagine the rate of change at a point to be the gradient of the tangent to the curve at that point.

Look at the graph below. The solid line shows y = x2. The lower dashed line shows the tangent to the graph at the point (1, 1). Unfortunately, drawing a tangent by eye is not an accurate way
of estimating the gradient.

The two dotted lines, A and B, are estimates of the gradient of the function y = x2 at the point (1, 1). They are each made by drawing a line between (1, 1) and another point on the curve. You can see that both estimates are inaccurate; this is because the second points chosen are so far from (1, 1). Even so, as there are two known coordinates on each line, you can work out the exact value of the gradient (m) of each line.

$m = \frac{y_2\,-\,y_1}{x_2\,-\,x_1}$

For line A:

$m_A = \frac{25\,-\,1}{5\,-\,1}=\frac{24}{4}=6$

For line B:

$m_B = \frac{9\,-\,1}{3\,-\,1}=\frac{8}{2}=4$

The gradients of both of these lines give an estimate of the gradient at point (1, 1), but you can see from the graph that the gradient of line B is closer to the gradient of the tangent. This is because the estimate of the gradient becomes more accurate as the distance between the two points gets smaller. You can use this to find a numerical value for the gradient at (1, 1):

Numerically, you can see that the gradient at point (1, 1) is approaching 2. This approach can be extended to find the derivative of y =x2 – the rate of change at any point on the function.

Consider the graph of y = x2 below.

The aim is to find the rate of change at the point (x, y). This will be the derivative of the function: the rate of change of y with respect to x, written as $\frac{dy}{dx}$ (said d-y-by-d-x).

As before, you need two points on the graph. The first is (x, y) or, as y = x2, (x, x2). For the second, choose another point a distance of h units in the x-direction, (x + h, (x + h)2). The gradient of the line between these two points is $\frac{dy}{dx}$.

Next, calculate the gradient:
$m = \frac{y_2\,-\,y_1}{x_2\,-\,x_1}$

Substitute the coordinates:
$m = \frac{(x\,+\,h)^2\,-\,x^2}{(x\,+\,h)\,-\,x}$

Expand (x + h)2:
$m = \frac{x^2\,+\,2xh\,+\,h^2\,-\,x^2}{(x\,+\,h)\,-\,x}$

Then simplify:
$m = \frac{2xh\,+\,h^2}{h}$

Divide by h:
$m = 2x+h$

As you saw before, an estimate to the gradient at a point gets closer to the true gradient as the coordinates get closer together. In other words, the estimate approaches the actual value of the gradient as h approaches 0. In the formula above, as h approaches 0 the gradient will approach 2x. This can be written mathematically as:

$\lim\limits_{h \to 0}(2x+h)=2x$

Or, in words: the limit of 2x + h, as h tends towards 0, is 2x. This gives the derivative of this function:

$\text{For } y = x^2, \frac{dy}{dx}=2x$

This means that, at any point on the function y = x2, the gradient of a tangent at that point is 2x. This fits the first example:

When x = 1, $\frac{dy}{dx}$ = 2.

You can use the same process to find the derivative of a function without reference to a graph. Using the following formula:

$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{f(x\,+\,h)\,-\,f(x)}{h}$

This is derived from the formula:

$m = \frac{y_2\,-\,y_1}{x_2\,-\,x_1}$

Where y2 = f(x + h), y1 = f(x) and where, if x2 = x1 + h, then x2x1h.

### Example Question

Differentiate y = x3 from first principles.

Let f(x) = x3

$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{f(x\,+\,h)\,-\,f(x)}{h}$

$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{(x\,+\,h)^3\,-\,x^3}{h}$

$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{x^3\,+\,3x^2h\,+\,3xh^2\,+\,h^3\,-\,x^3}{h}$

$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{3x^2h\,+\,3xh^2\,+\,h^3}{h}$

$\frac{dy}{dx} = \lim\limits_{h \to 0} 3x^2\,+\,3xh\,+\,h^2$

$\frac{dy}{dx} = 3x^2$

### Differentiation from First PrinciplesPractice Questions

From first principles, find the derivatives of:

1. y = 3x2

2. y = 2x3

3. y = -5x3

1.
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{f(x\,+\,h)\,-\,f(x)}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{3(x\,+\,h)^2\,-\,3x^2}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{3x^2\,+\,6hx\,+\,3h^2\,-\,3x^2}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{6hx\,+\,3h^2}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0} 6x\,+\,3h$
$\frac{dy}{dx} = 6x$

2.
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{f(x\,+\,h)\,-\,f(x)}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{2(x\,+\,h)^3\,-\,3x^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{2x^3\,+\,6x^2h\,+\,6xh^2\,+\,2h^3\,-\,2x^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{6x^2h\,+\,6xh^2\,+\,2h^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0} 6x^2\,+\,6xh\,+\,2h^2$
$\frac{dy}{dx} = 6x^2$

3.
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{f(x\,+\,h)\,-\,f(x)}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{-5(x\,+\,h)^3\,-\,-5x^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{-5x^3\,-\,15x^2h\,-\,15xh^2\,-\,5h^3\,+\,5x^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0}\frac{-15x^2h\,-\,15xh^2\,-\,5h^3}{h}$
$\frac{dy}{dx} = \lim\limits_{h \to 0} -15x^2\,-\,15xh\,-\,5h^2$
$\frac{dy}{dx} = -15x^2$

We’re guessing that differentiation from first principles isn’t your only A Level Maths penchant and you can read even more of our blogs here! You can also subscribe to Beyond for access to thousands of secondary teaching resources. You can sign up for a free account here and take a look around at our free resources before you subscribe too.