๐Ÿ“ Gradients from Chords

OCR FSMQ Additional Maths ยท Numerical Methods (NM4โ€“NM5)

Level 3 · Ages 15–16

← Back to topic overview
1 Approximating a Tangent with a Chord
NM4: use a chord to estimate the gradient of a tangent to a curve at a point. The gradient of a tangent touches the curve at one point only, so you cannot compute it from two coordinates. The gradient of a chord can be computed โ€” and a short chord is close to the tangent.
The chord gradient
$\text{gradient} \approx \dfrac{\mathrm{f}(x+h) - \mathrm{f}(x)}{h}$
where $h$ is a small step along the $x$-axis
(x, f(x)) (x+h, f(x+h)) h rise tangent chord The chord is steeper than the tangent here — but shrinking h closes the gap
NM5 โ€” how to improve the estimate
Make $h$ smaller. As $h \to 0$ the chord gradient approaches the tangent gradient exactly.
This is where calculus comes from. The derivative is defined as the limit of the chord gradient as $h$ tends to zero. Working through a few chords by hand shows you what differentiation is actually doing.
2 Shrinking the Interval
Worked Example 1 โ€” A sequence of improving estimates

Estimate the gradient of $y = x^2$ at $x = 3$ using $h = 1$, $0.1$, $0.01$ and $0.001$.

โ‘ $h = 1$: $\dfrac{4^2 - 3^2}{1} = \dfrac{16-9}{1} = 7$
โ‘ก$h = 0.1$: $\dfrac{3.1^2 - 9}{0.1} = \dfrac{0.61}{0.1} = 6.1$
โ‘ข$h = 0.01$: $\dfrac{3.01^2 - 9}{0.01} = \dfrac{0.0601}{0.01} = 6.01$
โ‘ฃ$h = 0.001$: $\dfrac{3.001^2 - 9}{0.001} = \dfrac{0.006001}{0.001} = 6.001$
โ‘คThe estimates are clearly heading for $6$.
โ‘ฅBy calculus: $\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2x = 6$ at $x = 3$ โœ“
Look at the pattern of errors: $1$, $0.1$, $0.01$, $0.001$. Each time $h$ is divided by $10$, the error is too. That is typical of this method.
Worked Example 2 โ€” Why the estimate is always too big here

For $y = x^2$ at $x = 3$, show algebraically that the chord gradient is always $6 + h$.

โ‘ $\dfrac{(3+h)^2 - 3^2}{h} = \dfrac{9 + 6h + h^2 - 9}{h}$
โ‘ก$= \dfrac{6h + h^2}{h} = \dfrac{h(6+h)}{h}$
โ‘ข$= 6 + h$
โ‘ฃSo with a positive $h$ the estimate is always $h$ too large โ€” and as $h \to 0$ it tends to exactly $6$.
This calculation is the definition of the derivative, done by hand. It explains both why the method works and how big the error is.
Worked Example 3 โ€” Straddling the point

Estimate the gradient of $y = x^3$ at $x = 2$ using (a) the chord from $2$ to $2.1$, (b) the chord from $1.9$ to $2.1$. Compare with the exact value.

โ‘ (a) $\dfrac{2.1^3 - 2^3}{0.1} = \dfrac{9.261 - 8}{0.1} = 12.61$
โ‘ก(b) $\dfrac{2.1^3 - 1.9^3}{0.2} = \dfrac{9.261 - 6.859}{0.2} = \dfrac{2.402}{0.2} = 12.01$
โ‘ขExact: $\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3x^2 = 12$.
โ‘ฃThe straddling chord (b) is far more accurate โ€” error $0.01$ against $0.61$ โ€” despite using a wider interval.
A chord centred on the point is much better, because the errors on the two sides partly cancel. This is a genuinely useful refinement, and exactly the kind of "how to improve an estimate" that NM5 is asking about.
3 Estimating a Gradient from Data or a Graph
In a real problem there is often no formula at all โ€” just a table of measurements or a graph. Then a chord is the only way to estimate a rate of change, and numerical methods are not an approximation to something better; they are the whole method.
Worked Example 4 โ€” A rate from a table

The displacement of a vehicle is recorded as follows. Estimate its velocity at $t = 3$ s.

$t$ (s)$0$$1$$2$$3$$4$$5$
$s$ (m)$0$$2$$8$$18$$32$$50$
โ‘ Use the straddling chord from $t=2$ to $t=4$, which is centred on $t=3$:
โ‘ก$v \approx \dfrac{32 - 8}{4 - 2} = \dfrac{24}{2} = 12$ m sโปยน
โ‘ขCompare the one-sided chords: from $2$ to $3$ gives $\dfrac{18-8}{1} = 10$; from $3$ to $4$ gives $\dfrac{32-18}{1} = 14$.
โ‘ฃThe straddling estimate $12$ is the average of these, and is the better answer.
โ‘คAs it happens the data fit $s = 2t^2$, whose derivative is $4t = 12$ at $t=3$ โ€” so $12$ is exactly right here.
To estimate at an endpoint you have no choice. At $t=0$ or $t=5$ there is no straddling chord available, so a one-sided chord must be used and will be less accurate.
Worked Example 5 โ€” Reading a gradient off a graph

Describe how to estimate the gradient of a curve at a point on a printed graph.

  • Place a ruler so it just touches the curve at the point, matching its direction โ€” this is the tangent by eye.
  • Draw a long tangent line, extending well past the point.
  • Pick two points far apart on the tangent line, and read their coordinates.
  • Compute $\dfrac{\text{change in } y}{\text{change in } x}$ using those two points.
Use a long tangent. Reading two points close together magnifies any error in your coordinates; points far apart give a much more reliable gradient. Also check the axis scales โ€” they are often different.
4 Quick Reference

Chord gradient

$\dfrac{\mathrm{f}(x+h)-\mathrm{f}(x)}{h}$.

To improve

Reduce $h$.

The limit

As $h \to 0$ you get the derivative exactly.

Error size

Roughly proportional to $h$.

Straddling chord

Centre it on the point โ€” much more accurate.

Why it is better

The errors either side partly cancel.

At an endpoint

Only a one-sided chord is available.

From a table

Use the readings either side.

From a graph

Draw a long tangent; use two distant points.

Check

Compare with the derivative when a formula exists.

5 Practice Questions
Question 1

Estimate the gradient of $y = x^2$ at $x = 4$ using the chord to $x = 4.1$.

โ–ถ Show solution

$\dfrac{4.1^2 - 4^2}{0.1} = \dfrac{16.81 - 16}{0.1} = \dfrac{0.81}{0.1} = 8.1$

(The exact value is $8$.)

Question 2

Repeat Question 1 with $h = 0.01$.

โ–ถ Show solution

$\dfrac{4.01^2 - 16}{0.01} = \dfrac{0.0801}{0.01} = 8.01$

Closer to the exact value of $8$, as expected from the smaller $h$.

Question 3

Estimate the gradient of $y = x^3$ at $x = 1$ using the chord to $x = 1.1$.

โ–ถ Show solution

$\dfrac{1.1^3 - 1}{0.1} = \dfrac{1.331 - 1}{0.1} = 3.31$

(The exact value is $3x^2 = 3$.)

Question 4

Repeat Question 3 using the straddling chord from $x = 0.9$ to $x = 1.1$.

โ–ถ Show solution

$\dfrac{1.331 - 0.729}{0.2} = \dfrac{0.602}{0.2} = 3.01$

Error of $0.01$, against $0.31$ for the one-sided chord โ€” a substantial improvement.

Question 5

State two ways to improve a chord estimate of a gradient.

โ–ถ Show solution

1. Use a smaller interval $h$.

2. Use a chord that straddles the point (equally spaced either side) rather than a one-sided one.

Question 6

Show algebraically that the chord gradient of $y = x^2$ at $x = 5$ is $10 + h$.

โ–ถ Show solution

$\dfrac{(5+h)^2 - 25}{h} = \dfrac{25 + 10h + h^2 - 25}{h}$

$= \dfrac{10h + h^2}{h} = 10 + h$

As $h \to 0$ this tends to $10$, which matches $2x$ at $x = 5$.

Question 7

Using the table below, estimate the rate of change at $t = 2$.

$t$$0$$1$$2$$3$$4$
$y$$5$$8$$17$$32$$53$
โ–ถ Show solution

Use the straddling chord from $t=1$ to $t=3$:

$\dfrac{32 - 8}{3 - 1} = \dfrac{24}{2} = 12$

Question 8

Using the same table, estimate the rate of change at $t = 0$, and say why this estimate is less reliable.

โ–ถ Show solution

Only a one-sided chord is available, from $t=0$ to $t=1$:

$\dfrac{8-5}{1} = 3$

It is less reliable because there is no data to the left of $t=0$, so no straddling chord can be formed and the errors cannot cancel. The estimate is biased towards the behaviour just after $t=0$.

Question 9

Explain why a very small $h$, such as $10^{-12}$, can actually give a worse answer on a calculator.

โ–ถ Show solution

The chord gradient divides a tiny difference by a tiny number. With $h$ extremely small, $\mathrm{f}(x+h)$ and $\mathrm{f}(x)$ agree to almost all the digits the calculator holds.

Subtracting them leaves only the last few digits, most of which are rounding error, and dividing by $10^{-12}$ then magnifies that error enormously.

So there is a sweet spot: small enough that the chord is close to the tangent, but large enough that the subtraction retains meaningful digits.

Question 10

Consider $\mathrm{f}(x) = x^2 + 3x$ at the point where $x = 2$.

(a) Estimate the gradient using $h = 0.5$, $h = 0.1$ and $h = 0.01$.   (b) Show algebraically that the chord gradient is $7 + h$.   (c) State the exact gradient and verify it by differentiation.   (d) Use the straddling chord with $h = 0.5$ either side, and comment.

โ–ถ Show solution

(a) $\mathrm{f}(2) = 4 + 6 = 10$.

$h = 0.5$: $\mathrm{f}(2.5) = 6.25 + 7.5 = 13.75$, so $\dfrac{13.75-10}{0.5} = 7.5$

$h = 0.1$: $\mathrm{f}(2.1) = 4.41 + 6.3 = 10.71$, so $\dfrac{0.71}{0.1} = 7.1$

$h = 0.01$: $\mathrm{f}(2.01) = 4.0401 + 6.03 = 10.0701$, so $\dfrac{0.0701}{0.01} = 7.01$

(b) $\dfrac{\mathrm{f}(2+h) - \mathrm{f}(2)}{h} = \dfrac{\left[(2+h)^2 + 3(2+h)\right] - 10}{h}$

$= \dfrac{4 + 4h + h^2 + 6 + 3h - 10}{h} = \dfrac{7h + h^2}{h} = 7 + h$ โœ“

This confirms every estimate in (a): $7.5$, $7.1$ and $7.01$ are exactly $7 + h$.

(c) As $h \to 0$, the chord gradient tends to $\mathbf{7}$.

By differentiation: $\mathrm{f}'(x) = 2x + 3$, and $\mathrm{f}'(2) = 4 + 3 = 7$ โœ“

(d) Straddling chord from $x = 1.5$ to $x = 2.5$:

$\mathrm{f}(1.5) = 2.25 + 4.5 = 6.75$ and $\mathrm{f}(2.5) = 13.75$

$\dfrac{13.75 - 6.75}{1} = 7$ โ€” exactly right.

Comment: the straddling chord is perfect here, and not by luck. For any quadratic, a chord centred on the point gives the tangent gradient exactly: the $h^2$ errors on the two sides are equal and opposite, so they cancel completely.

For a cubic or higher the cancellation is only partial, as Worked Example 3 showed โ€” but it is still a large improvement over a one-sided chord of the same width.

Gradients from Chords (NM4โ€“NM5) ยท OCR FSMQ Additional Maths · Created with MathJax