What you'll learn
- How the gradient of a curve is connected to the gradient of a tangent.
- What the derivative f′(x)f'(x)f′(x) tells you about the graph of y=f(x)y=f(x)y=f(x).
- How to find the gradient of a curve at a particular or general point.
- How to find the equation of a tangent to a curve.
Gradient of a straight line
The gradient of a straight line measures its steepness and direction. It is calculated using
gradient=change in ychange in x.\text{gradient}=\frac{\text{change in }y}{\text{change in }x}.gradient=change in xchange in y.For two points (x1,y1)(x_1,y_1)(x1,y1) and (x2,y2)(x_2,y_2)(x2,y2), the gradient is
m=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.m=x2−x1y2−y1.A positive gradient means the line rises from left to right. A negative gradient means it falls from left to right. A horizontal line has gradient zero.
Finding the gradient between two points
The points A(1,3)A(1,3)A(1,3) and B(5,11)B(5,11)B(5,11) lie on a straight line.
-
Calculate the changes in the coordinates:
Δy=11−3=8,Δx=5−1=4.\Delta y=11-3=8,\qquad \Delta x=5-1=4.Δy=11−3=8,Δx=5−1=4. -
Divide the change in yyy by the change in xxx:
m=84=2.m=\frac{8}{4}=2.m=48=2. -
Therefore, the gradient of the line through AAA and BBB is 2.
From straight lines to curves
A straight line has the same gradient everywhere. A curve is different: its steepness can change as xxx changes.
For example, the graph of y=x2y=x^2y=x2 becomes steeper as you move further to the right. We therefore need a way to describe its gradient at one particular point.
Secants and average gradient
A secant is a straight line passing through two points on a curve. Its gradient gives the average gradient of the curve between those points.
Suppose the two points are
P(x,f(x))P\left(x,f(x)\right)P(x,f(x))and
Q(x+h,f(x+h)),Q\left(x+h,f(x+h)\right),Q(x+h,f(x+h)),where hhh is the horizontal change from PPP to QQQ. The secant gradient is
f(x+h)−f(x)h.\frac{f(x+h)-f(x)}{h}.hf(x+h)−f(x).This is also called the difference quotient.
Difference quotient
The expression
f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}hf(x+h)−f(x)gives the gradient of the secant joining the points (x,f(x))\left(x,f(x)\right)(x,f(x)) and (x+h,f(x+h))\left(x+h,f(x+h)\right)(x+h,f(x+h)) on the graph of y=f(x)y=f(x)y=f(x).
Calculating an average gradient
For f(x)=x2f(x)=x^2f(x)=x2, find the average gradient between the points where x=2x=2x=2 and x=2+hx=2+hx=2+h.
-
Evaluate the function at each input:
f(2)=4f(2)=4f(2)=4and
f(2+h)=(2+h)2=4+4h+h2.f(2+h)=(2+h)^2=4+4h+h^2.f(2+h)=(2+h)2=4+4h+h2. -
Substitute these values into the difference quotient:
f(2+h)−f(2)h=4+4h+h2−4h.\frac{f(2+h)-f(2)}{h} =\frac{4+4h+h^2-4}{h}.hf(2+h)−f(2)=h4+4h+h2−4. -
Simplify, using the fact that h≠0h\neq 0h=0 while the points are distinct:
4h+h2h=4+h.\frac{4h+h^2}{h}=4+h.h4h+h2=4+h.
The average gradient between the two points is 4+h4+h4+h.
The tangent to a curve
A tangent to a curve is a straight line that has the same instantaneous direction as the curve at a particular point.
As the point QQQ moves closer to PPP, the secant line approaches the tangent at PPP. In coordinates, this means that hhh approaches zero.

The gradient of the tangent is found from the limiting value of the difference quotient:
limh→0f(x+h)−f(x)h.\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}.h→0limhf(x+h)−f(x).The word limit describes the value that an expression approaches as a variable approaches a particular value. Here, hhh approaches zero, although the quotient itself is formed using h≠0h\neq 0h=0.
Gradient at a point
The gradient of a curve at a point is defined to be the gradient of the tangent to the curve at that point.
Substituting zero too early
Do not substitute h=0h=0h=0 directly into the difference quotient: this would produce division by zero. Simplify first, then consider the value approached as h→0h\to 0h→0.
The derivative
The derivative of a function fff is a new function that gives the gradient of the original graph at each value of xxx.
It can be written as
f′(x)f'(x)f′(x)or, when y=f(x)y=f(x)y=f(x), as
dydx.\frac{dy}{dx}.dxdy.Formally,
f′(x)=limh→0f(x+h)−f(x)h.f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}.f′(x)=h→0limhf(x+h)−f(x).Derivative as the tangent gradient
For the graph y=f(x)y=f(x)y=f(x), the derivative f′(x)f'(x)f′(x) is the gradient of the tangent at the general point (x,f(x))\left(x,f(x)\right)(x,f(x)).
The phrase general point means that xxx has not yet been given a particular numerical value. Therefore, f′(x)f'(x)f′(x) usually contains xxx and describes the gradient anywhere on the curve.
Finding the derivative of a quadratic
Use the difference quotient to find the derivative of f(x)=x2f(x)=x^2f(x)=x2.
-
Form f(x+h)f(x+h)f(x+h) and expand:
f(x+h)=(x+h)2=x2+2xh+h2.f(x+h)=(x+h)^2=x^2+2xh+h^2.f(x+h)=(x+h)2=x2+2xh+h2. -
Substitute into the difference quotient and simplify:
f(x+h)−f(x)h=x2+2xh+h2−x2h=2xh+h2h=2x+h.\begin{aligned} \frac{f(x+h)-f(x)}{h} &=\frac{x^2+2xh+h^2-x^2}{h}\\ &=\frac{2xh+h^2}{h}\\ &=2x+h. \end{aligned}hf(x+h)−f(x)=hx2+2xh+h2−x2=h2xh+h2=2x+h. -
Let h→0h\to 0h→0:
f′(x)=limh→0(2x+h)=2x.f'(x)=\lim_{h\to 0}(2x+h)=2x.f′(x)=h→0lim(2x+h)=2x.
Therefore, the gradient of the tangent to y=x2y=x^2y=x2 at the general point (x,x2)\left(x,x^2\right)(x,x2) is 2x2x2x.
Gradient at a particular point
Once you know the derivative, substitute the point's xxx-coordinate into it.
If the curve is y=f(x)y=f(x)y=f(x), then the gradient at the point where x=ax=ax=a is
f′(a).f'(a).f′(a).Finding the gradient at a given point
Find the gradient of y=x2y=x^2y=x2 at the point where x=3x=3x=3.
-
Differentiate the function:
dydx=2x.\frac{dy}{dx}=2x.dxdy=2x. -
Substitute x=3x=3x=3 into the derivative:
dydx∣x=3=2(3)=6.\left.\frac{dy}{dx}\right|_{x=3}=2(3)=6.dxdyx=3=2(3)=6.
Therefore, the gradient of the tangent at x=3x=3x=3 is 6.
Function first, number second
Differentiate using the general variable xxx before substituting the particular xxx-coordinate. Substituting first would turn the function value into a constant and lose the changing-gradient information.
Equation of the tangent
Knowing the derivative gives you the tangent's gradient. To find the full equation of the tangent, you also need the coordinates of the point it passes through.
The equation of a straight line with gradient mmm through (x1,y1)(x_1,y_1)(x1,y1) is
y−y1=m(x−x1).y-y_1=m(x-x_1).y−y1=m(x−x1).For the curve y=f(x)y=f(x)y=f(x) at x=ax=ax=a:
- the point on the curve is (a,f(a))\left(a,f(a)\right)(a,f(a));
- the tangent gradient is f′(a)f'(a)f′(a).
Therefore, the tangent equation is
y−f(a)=f′(a)(x−a).y-f(a)=f'(a)(x-a).y−f(a)=f′(a)(x−a).Finding the equation of a tangent
Find the equation of the tangent to y=x2+1y=x^2+1y=x2+1 at the point where x=2x=2x=2.
-
Find the point on the curve:
y=22+1=5,y=2^2+1=5,y=22+1=5,so the tangent passes through (2,5)(2,5)(2,5).
-
Differentiate and evaluate the gradient at x=2x=2x=2:
dydx=2x\frac{dy}{dx}=2xdxdy=2xand therefore
m=2(2)=4.m=2(2)=4.m=2(2)=4. -
Substitute the point and gradient into the straight-line equation:
y−5=4(x−2).y-5=4(x-2).y−5=4(x−2). -
Simplify if required:
y=4x−3.y=4x-3.y=4x−3.
Therefore, the tangent has equation y=4x−3y=4x-3y=4x−3.
Using the derivative as the line equation
The derivative gives the gradient of the tangent, not usually its complete equation. You must also use the point on the curve to determine the tangent line.
Interpreting the derivative from a graph
The sign and size of the derivative describe the behaviour of the curve.
- If f′(x)>0f'(x)>0f′(x)>0, the curve is increasing.
- If f′(x)<0f'(x)<0f′(x)<0, the curve is decreasing.
- If f′(x)=0f'(x)=0f′(x)=0, the tangent is horizontal.
- A large value of ∣f′(x)∣\lvert f'(x)\rvert∣f′(x)∣ means the curve is steep.
- A value of f′(x)f'(x)f′(x) close to zero means the curve is relatively shallow.
A point where f′(x)=0f'(x)=0f′(x)=0 is called a stationary point. You will study different types of stationary point in more detail later.
A derivative may not exist
A curve does not have a derivative at every possible point. For example, there may be no unique tangent gradient at a sharp corner, a cusp or a discontinuity.
In the exam
- Identify whether the question asks for the derivative as a function, the gradient at a particular point, or the full equation of a tangent.
- Differentiate first, then substitute the given xxx-coordinate to obtain the tangent gradient.
- For a tangent equation, find the point on the curve as well as the gradient, then use y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1=m(x−x1).
- Check the sign and size of your gradient against the graph: an increasing curve should have a positive tangent gradient and a decreasing curve a negative one.
Check yourself
- What is the difference between the gradient of a secant and the gradient of a tangent?
- If f′(4)=−3f'(4)=-3f′(4)=−3, what does this tell you about the graph of y=f(x)y=f(x)y=f(x) at x=4x=4x=4?
- How would you find the equation of the tangent to y=f(x)y=f(x)y=f(x) at x=ax=ax=a?