What Is It?
What Is Calculus?
Calculus is the maths of change. Most of the maths you have met so far describes things that stay still: the area of a shape, the solution of an equation, the gradient of a straight line. Calculus describes things that are changing, and how fast they are changing at any single moment.
Calculus has two halves. Differentiation finds the rate at which something changes, such as the speed of a car at one exact instant, or how steep a curve is at one exact point. Integration works the other way round: it adds up lots of tiny changes to find a total, such as the distance travelled or the area under a curve. This chapter focuses on differentiation, the usual starting point.
Imagine riding a bike up a hill that gets steeper and steeper. On a straight ramp the steepness is the same everywhere, and you already know how to measure it with a gradient. On a curved hill the steepness keeps changing. Differentiation gives you a formula that tells you the steepness at every point on the hill.
That formula is called the derivative. If a curve has the equation y = x², its derivative is 2x, which means that at x = 3 the curve is climbing with a gradient of 6, and at x = 10 it is climbing with a gradient of 20.
Calculus was developed in the late 1600s by Isaac Newton in England and Gottfried Leibniz in Germany, working separately. The dy/dx notation you will use in this chapter comes from Leibniz.
Why Does It Matter?
Why Does It Matter?
Anything that changes can be studied with calculus, which is why it sits underneath so much of science, engineering and technology.
Speed and Motion
A car's speedometer shows how fast the distance is changing at this very moment, which is a derivative. If you know a formula for distance travelled over time, differentiating it gives the speed, and differentiating again gives the acceleration. Engineers use this to design brakes, lifts and roller coasters.
Space and Flight
Working out the path of a rocket or a satellite means handling speeds and forces that change every second. Calculus is the tool that lets engineers predict where a spacecraft will be hours or years ahead.
Money and Business
A business wants to know the price or the number of items that gives the greatest profit. On a graph, the greatest profit is at the top of a curve, where the gradient is zero. Differentiation finds that point exactly instead of by guessing.
Design and Packaging
Manufacturers want boxes and cans that hold as much as possible while using as little material as possible. These are called optimisation problems (optimization in US spelling), and they are solved by finding where a derivative equals zero.
Phones, Games and Computers
Animations in games and apps use curves whose gradients are controlled with calculus, so motion speeds up and slows down smoothly. Many artificial intelligence systems learn by repeatedly calculating a gradient and moving 'downhill' to reduce their errors.
Medicine and Science
Doctors and scientists study how quickly a medicine leaves the body, how fast a population of bacteria grows, and how quickly a cup of tea cools. Each of these is a rate of change, and each is described using calculus.
Detailed Explanation
Calculus Explained Step by Step
1. A Quick Recap: the Gradient of a Straight Line
The gradient (called the slope in the US) measures steepness. Imagine walking along a line from left to right: the gradient tells you how far you go up for each step of 1 across.
Gradient = change in y ÷ change in x, often remembered as 'rise over run'.
For the line through (1, 2) and (4, 11), the gradient is (11 − 2) ÷ (4 − 1) = 9 ÷ 3 = 3. A positive gradient goes uphill, a negative gradient goes downhill and a gradient of 0 is flat. For a straight line y = mx + c, the gradient is m, and it is the same everywhere on the line.
2. The Gradient of a Curve
A curve like y = x² has no single gradient: it is gentle near the bottom and very steep further out. So we talk about the gradient at a point.
Imagine placing a ruler so it just touches the curve at one point, without cutting across it. That line is the tangent at that point. The gradient of a curve at a point is the gradient of the tangent there.
You could draw tangents by hand and measure them, but that is slow and inaccurate. Calculus finds the exact gradient using algebra.
3. Zooming In: From Chords to Tangents
A chord is a straight line joining two points on a curve. We can easily find a chord's gradient. The clever idea is to slide the second point closer and closer to the first, so the chord gets closer and closer to the tangent.
Take y = x² at the point (3, 9). Join it to another point a small distance h further along, at x = 3 + h:
| h | Second point | Gradient of chord |
|---|---|---|
| 1 | (4, 16) | (16 − 9) ÷ 1 = 7 |
| 0.1 | (3.1, 9.61) | 0.61 ÷ 0.1 = 6.1 |
| 0.01 | (3.01, 9.0601) | 0.0601 ÷ 0.01 = 6.01 |
| 0.001 | (3.001, 9.006001) | 0.006001 ÷ 0.001 = 6.001 |
As h shrinks towards 0, the chord's gradient gets closer and closer to 6. We say the limit is 6, and this is the gradient of the tangent at x = 3. Zoom in far enough on any smooth curve and it looks like a straight line; calculus measures the gradient of that tiny straight piece.
4. Differentiation From First Principles
We can do the zooming with letters instead of numbers. For y = x², take a point at x and another at x + h. The gradient of the chord is:
((x + h)² − x²) ÷ h = (x² + 2xh + h² − x²) ÷ h = (2xh + h²) ÷ h = 2x + h
Now let h get closer and closer to 0. The h disappears, leaving 2x. So the gradient of y = x² at any point is 2x. At x = 3 it is 6, exactly as the table showed. Working from this definition is called differentiation from first principles. The general rule it comes from is:
Gradient = the limit, as h gets closer to 0, of (f(x + h) − f(x)) ÷ h
5. The Derivative and Its Notation
The formula for the gradient at any point is called the derivative, and finding it is called differentiating. There are two common ways to write it:
- If y = x², we write dy/dx = 2x. Read it as 'd y by d x'. It means 'the rate of change of y with respect to x'. It is a single symbol, not a fraction you can cancel.
- If f(x) = x², we write f′(x) = 2x, read as 'f dash of x' (or 'f prime of x').
The derivative is itself a formula. Substitute an x-value into it to get the gradient at that point. Do not substitute into the original equation: that gives the y-coordinate, not the gradient.
6. The Power Rule
Doing first principles every time would be slow. Luckily, a pattern appears. Differentiating x² gives 2x, x³ gives 3x², x⁴ gives 4x³. In each case the power comes down in front and the new power is one less. This is the power rule:
If y = xⁿ, then dy/dx = nxn−1
In words: multiply by the power, then reduce the power by 1.
| y | dy/dx | How |
|---|---|---|
| x⁵ | 5x⁴ | bring down 5, reduce power to 4 |
| x³ | 3x² | bring down 3, reduce power to 2 |
| x² | 2x | bring down 2, reduce power to 1 |
| x | 1 | x = x¹, so 1 × x⁰ = 1 |
| 7 (a constant) | 0 | a flat line has gradient 0 |
The last two rows make sense as pictures. The line y = x rises 1 for every 1 across, so its gradient is 1 everywhere. The line y = 7 is horizontal, so its gradient is 0 everywhere. Adding a constant to a curve slides it up or down without changing its steepness, which is why constants differentiate to 0.
7. Multiples, Sums and Rewriting as Powers
Two more rules let you differentiate any polynomial:
- A number in front stays in front. If y = 3x⁴, then dy/dx = 3 × 4x³ = 12x³. Stretching a curve to be three times as tall makes it three times as steep.
- Differentiate term by term. If y = x³ + 5x² − 2x + 9, differentiate each part separately: dy/dx = 3x² + 10x − 2.
The power rule works for any power, including negative and fractional ones, but you must write the term as a power of x first:
| Original | As a power | Derivative |
|---|---|---|
| 1/x | x⁻¹ | −x⁻² = −1/x² |
| 1/x² | x⁻² | −2x⁻³ = −2/x³ |
| √x | x½ | ½x−½ = 1/(2√x) |
Be careful with negative powers: reducing −2 by 1 gives −3, not −1. Also, the power rule does not apply to products or quotients directly. To differentiate x(x + 3) or (x³ + 2x)/x, expand or simplify into separate powers of x first.
8. Finding Gradients and Tangent Lines
Once you have dy/dx you can answer questions about any point on a curve.
To find the gradient at a point: differentiate, then substitute the x-value into dy/dx.
To find the equation of the tangent at a point:
- Find the y-coordinate by substituting x into the original equation.
- Find the gradient m by substituting x into dy/dx.
- Use y − y₁ = m(x − x₁), or y = mx + c and solve for c.
You can also work backwards: to find where a curve has a gradient of, say, 4, set dy/dx = 4 and solve for x.
9. Stationary Points: Maximums and Minimums
Imagine walking over a hill. At the very top, for one moment, you are walking on the flat: you are neither going up nor down. The same is true at the bottom of a valley. These flat points are called stationary points (or turning points), and at them dy/dx = 0.
To find stationary points: differentiate, set dy/dx = 0, solve for x, then substitute each x into the original equation to find y.
To decide whether each point is a maximum (top of a hill) or a minimum (bottom of a valley), differentiate a second time to get the second derivative, written d²y/dx². It tells you whether the gradient itself is increasing or decreasing:
| Value of d²y/dx² at the point | Type of point | Picture |
|---|---|---|
| positive | minimum | valley, gradient goes from negative to positive |
| negative | maximum | hilltop, gradient goes from positive to negative |
| zero | not decided by this test | check the gradient just either side |
Alternatively, work out dy/dx at x-values just to the left and right of the point. If the gradient changes from negative to positive it is a minimum; from positive to negative it is a maximum.
This is how calculus solves real optimisation problems: write a formula for the thing you want to make as large or as small as possible, differentiate, and set the derivative to zero.
10. Rates of Change in Real Life, and a Glimpse of Integration
The derivative measures how fast one quantity changes compared with another. The letters do not have to be x and y:
- If s is distance in metres and t is time in seconds, ds/dt is the velocity in metres per second.
- Differentiating velocity again gives the acceleration, in metres per second per second (m/s²).
- If V is the volume of water in a tank in litres and t is time in minutes, dV/dt is the rate of filling in litres per minute.
The units of a derivative are always 'units of the top per unit of the bottom', which is a great check on your answers.
Finally, integration is the reverse of differentiation. If differentiating x² gives 2x, then integrating 2x takes you back to x² (plus a constant, since constants vanish when you differentiate). Integration also finds the area under a curve, which is how you turn a speed graph back into the total distance travelled. That is the next chapter in the story of calculus, and everything in it builds on the derivative you have learned here.
Worked Examples
Differentiate y = x⁵.
The power is 5. Bring it down in front: 5x.
Reduce the power by 1: 5 − 1 = 4.
So dy/dx = 5x⁴.
dy/dx = 5x⁴
Check with a pattern: the derivative always has a power one less than the original, so a power-5 curve has a power-4 gradient formula.
Differentiate y = 3x⁴ − 2x² + 7x − 9.
3x⁴ becomes 3 × 4x³ = 12x³.
−2x² becomes −2 × 2x = −4x.
7x becomes 7, because the gradient of 7x is 7.
−9 is a constant, so it becomes 0.
dy/dx = 12x³ − 4x + 7
Each term is differentiated on its own and the signs stay with their terms.
Find the gradient of the curve y = x² − 4x + 1 at the point where x = 5.
Differentiate: dy/dx = 2x − 4.
Substitute x = 5 into the derivative: 2 × 5 − 4 = 10 − 4 = 6.
The gradient at x = 5 is 6.
The point itself is (5, 25 − 20 + 1) = (5, 6). The y-coordinate happens to also be 6 here, which is a coincidence. The gradient always comes from dy/dx, the y-coordinate from the original equation.
Differentiate y = √x + 4/x².
Rewrite as powers of x: √x = x½ and 4/x² = 4x⁻².
Differentiate x½: ½x−½, because ½ − 1 = −½.
Differentiate 4x⁻²: 4 × (−2)x⁻³ = −8x⁻³, because −2 − 1 = −3.
Rewrite without negative powers: ½x−½ = 1/(2√x) and −8x⁻³ = −8/x³.
dy/dx = 1/(2√x) − 8/x³
The key step is rewriting first. The power rule cannot be applied to √x or 4/x² until they are written as powers.
Use first principles to show that the derivative of f(x) = 3x² is 6x.
The gradient of the chord from x to x + h is (f(x + h) − f(x)) ÷ h.
f(x + h) = 3(x + h)² = 3(x² + 2xh + h²) = 3x² + 6xh + 3h².
So f(x + h) − f(x) = 3x² + 6xh + 3h² − 3x² = 6xh + 3h².
Divide by h: (6xh + 3h²) ÷ h = 6x + 3h.
As h gets closer to 0, 3h gets closer to 0, leaving 6x.
f′(x) = 6x
This agrees with the power rule: 3 × 2x = 6x. First principles explains why the power rule works.
Find the equation of the tangent to y = x³ − 2x at the point where x = 2.
Find the point: y = 2³ − 2 × 2 = 8 − 4 = 4, so the point is (2, 4).
Differentiate: dy/dx = 3x² − 2.
Gradient at x = 2: 3 × 4 − 2 = 10.
Use y − y₁ = m(x − x₁): y − 4 = 10(x − 2), so y − 4 = 10x − 20.
Rearrange: y = 10x − 16.
y = 10x − 16
Check that the point lies on the tangent: 10 × 2 − 16 = 4. It does.
Find the stationary points of y = x³ − 3x² − 9x + 5 and decide whether each is a maximum or a minimum.
Differentiate: dy/dx = 3x² − 6x − 9.
Set dy/dx = 0: 3x² − 6x − 9 = 0. Divide by 3: x² − 2x − 3 = 0, so (x − 3)(x + 1) = 0, giving x = 3 or x = −1.
Find the y-values: at x = 3, y = 27 − 27 − 27 + 5 = −22. At x = −1, y = −1 − 3 + 9 + 5 = 10.
Second derivative: d²y/dx² = 6x − 6.
At x = 3: 6 × 3 − 6 = 12, positive, so a minimum. At x = −1: 6 × (−1) − 6 = −12, negative, so a maximum.
Maximum at (−1, 10); minimum at (3, −22)
A positive x³ curve rises, dips and rises again, so having a maximum on the left and a minimum on the right is exactly the expected shape.
A farmer has 40 m of fencing to make a rectangular pen against a long wall, so only three sides need fencing. What dimensions give the largest area, and what is that area?
Let the two sides at right angles to the wall be x metres each. The side parallel to the wall is 40 − 2x metres.
Area A = x(40 − 2x) = 40x − 2x².
Differentiate: dA/dx = 40 − 4x. Set it to 0: 40 − 4x = 0, so x = 10.
Check it is a maximum: d²A/dx² = −4, which is negative.
Dimensions: 10 m by 40 − 20 = 20 m. Area = 10 × 20 = 200 m².
10 m by 20 m (the 20 m side along the wall), giving a maximum area of 200 m²
Try nearby values to see it works: x = 9 gives 9 × 22 = 198 m² and x = 11 gives 11 × 18 = 198 m², both smaller than 200 m².
Common Mistakes
Forgetting to reduce the power
The power rule has two steps: bring the power down and reduce it by one. Say both steps out loud as you write. A quick check: the derivative of a power-4 curve must have power 3.
Keeping the constant
A constant is a flat line with gradient 0. Adding 5 just slides the curve up, which does not change how steep it is, so the 5 disappears when you differentiate.
Differentiating a product piece by piece
There is no rule that lets you differentiate each factor of a product and multiply the results. Expand brackets and simplify fractions until you have a sum of separate powers of x, then use the power rule on each term.
Not rewriting fractions and roots as powers
The power rule only works on terms written as xⁿ. Before differentiating, rewrite 1/xⁿ as x⁻ⁿ and √x as x to the power ½. Then apply the rule and, if you like, turn the answer back into a fraction.
Going the wrong way with negative powers
Reducing the power by 1 means moving one step further down the number line: from −2 to −3, not up to −1. Picture a number line and count one step to the left.
Substituting into the wrong equation
Putting x = 3 into the original equation gives the height of the curve (the y-coordinate), not its steepness. For a gradient, always differentiate first, then substitute into dy/dx.
Summary
- Calculus is the maths of change: differentiation finds rates of change and integration adds up changes to find totals.
- The gradient of a curve at a point is the gradient of the tangent, the straight line that just touches the curve there.
- Chords between two ever-closer points get closer and closer to the tangent; the limiting gradient is the derivative.
- The derivative is written dy/dx or f′(x) and is a formula for the gradient at any point.
- The power rule: if y = xⁿ, then dy/dx = nxⁿ⁻¹, so multiply by the power and reduce the power by 1.
- Constants differentiate to 0, numbers in front stay in front, and you differentiate a sum term by term.
- Rewrite roots and fractions as powers, such as √x = x to the power ½ and 1/x² = x⁻², before differentiating, and expand brackets first.
- To find a gradient at a point, substitute the x-value into dy/dx, not into the original equation.
- Stationary points are where dy/dx = 0; a positive second derivative means a minimum and a negative one means a maximum.
- Derivatives model real rates such as velocity (ds/dt) and are used to find the best possible value in optimisation problems.