Finite Differences – ENGR 216, Mid-Term Review – Study Notes

Source: ENGR 216 Practice Challenges, Texas A&M

Tags: finite differences, forward difference, backward difference, centered difference, numerical differentiation, first derivative, step size, ENGR 216, experimental physics


TL;DR

Finite difference methods approximate derivatives numerically when you either have a function you want to evaluate at discrete points or a table of measured data. The three first-order methods (forward, backward, centred) differ in which neighbouring points they use. Centred difference is the most accurate of the three, but all are fair game on the mid-term.


Key Terms

Finite difference

A numerical approximation of a derivative using function values at discrete, evenly spaced points.

Forward difference

Uses the current point and the next point ahead. Approximates the derivative at xᵢ using f(xᵢ + h).

Backward difference

Uses the current point and the previous point behind. Approximates the derivative at xᵢ using f(xᵢ − h).

Centred (central) difference

Uses the point ahead and the point behind, skipping the current point in the numerator. More accurate than forward or backward alone.

Step size (h)

The spacing between adjacent x-values. Smaller h generally improves accuracy but can introduce round-off issues in practice.

True derivative

The exact analytical derivative, found by differentiating the function symbolically. Used as the benchmark to measure the accuracy of finite difference approximations.


Core Content

The Three First-Order Formulas

Forward difference:

f'(x) ≈ [ f(x + h) − f(x) ] / h

Backward difference:

f'(x) ≈ [ f(x) − f(x − h) ] / h

Centred difference:

f'(x) ≈ [ f(x + h) − f(x − h) ] / (2h)

When to Use Each

  • Forward difference: when you only have data at the current point and the next point (e.g., the first point in a table).

  • Backward difference: when you only have data at the current point and the previous point (e.g., the last point in a table, or when the problem specifically asks for backward).

  • Centred difference: when you have data on both sides of the point. Preferred for accuracy because its truncation error is O(h²) versus O(h) for the other two.

Working with a Known Function

If the function f(x) is given algebraically:

  • Evaluate f(x), f(x + h), and f(x − h) by plugging in.

  • Apply the relevant formula.

  • Differentiate f(x) analytically to find the true derivative for comparison.

Working with Tabular Data

If you have a table of (x, y) values:

  • Identify the point of interest and the step size h (the spacing between x-values).

  • Read off the needed y-values directly from the table.

  • Apply the relevant formula.


Formulas

Forward difference: f'(x) ≈ [ f(x + h) − f(x) ] / h

Backward difference: f'(x) ≈ [ f(x) − f(x − h) ] / h

Centred difference: f'(x) ≈ [ f(x + h) − f(x − h) ] / (2h)


Worked Example 1 (Practice Challenge 4)

f(x) = 25x³ − 6x² + 7x − 88, evaluate f'(2), h = 0.2.

Step 1: Compute needed function values

  • f(2.0) = 25(8) − 6(4) + 7(2) − 88 = 200 − 24 + 14 − 88 = 102

  • f(2.2) = 25(10.648) − 6(4.84) + 7(2.2) − 88 = 266.2 − 29.04 + 15.4 − 88 = 164.56

  • f(1.8) = 25(5.832) − 6(3.24) + 7(1.8) − 88 = 145.8 − 19.44 + 12.6 − 88 = 50.96

Step 2: Apply each formula

Forward: f'(2) ≈ (164.56 − 102) / 0.2 = 62.56 / 0.2 = 312.80 → rounded to 0 decimal places = 313

Backward: f'(2) ≈ (102 − 50.96) / 0.2 = 51.04 / 0.2 = 255.20 → 255

Centred: f'(2) ≈ (164.56 − 50.96) / (2 × 0.2) = 113.6 / 0.4 = 284.00 → 284

Step 3: True derivative

f'(x) = 75x² − 12x + 7

f'(2) = 75(4) − 12(2) + 7 = 300 − 24 + 7 = 283

Note how the centred difference (284) is closest to the true value (283).


Worked Example 2 (Practice Challenge 5)

Temperature data at point 4, using first-order backward finite difference.

Point

1

2

3

4

5

Time

10.0

10.2

10.4

10.6

10.8

Temp

86.0

77.0

70.0

65.0

62.0

Point 4: t = 10.6, T = 65.0. Previous point (point 3): t = 10.4, T = 70.0. Step size h = 0.2.

Backward difference:

dT/dt ≈ [ T(10.6) − T(10.4) ] / h = (65.0 − 70.0) / 0.2 = −5.0 / 0.2 = −25.0

The temperature is dropping at 25.0 °C/s at point 4.


Why It Matters / Exam Flags

⚠️ Centred difference divides by 2h, not h. This is a very common slip.

⚠️ When the problem specifies which method to use, use that method. Do not default to centred difference just because it is more accurate.

⚠️ For tabular data, double-check which row corresponds to which point. Off-by-one errors are easy under time pressure.

⚠️ Pay close attention to the rounding instruction. Challenge 4 asks for zero decimal places, challenge 5 for one decimal place.

⚠️ The true derivative is found analytically (power rule, chain rule, etc.), not by any finite difference formula.


Practice Q&A

Q: What is the truncation error order for forward, backward, and centred differences?

A: Forward and backward are O(h), first-order accurate. Centred difference is O(h²), second-order accurate. Centred converges faster as h shrinks.

Q: Given f(x) = x² and h = 0.1, estimate f'(3) using the forward difference.

A: f(3) = 9, f(3.1) = 9.61. Forward: (9.61 − 9) / 0.1 = 6.10. True value: f'(3) = 6.

Q: You have a table with five data points and need the derivative at the last point. Which method should you use?

A: Backward difference, because there is no data point ahead of the last point to use for forward or centred.

Q: In the centred difference formula, what goes in the denominator?

A: 2h, not h. The formula spans two intervals (from x − h to x + h), so the total distance is 2h.


Related Terms / Search Tags

finite differences, forward difference, backward difference, centred difference, central difference, numerical differentiation, numerical derivative, first derivative approximation, step size, h, truncation error, order of accuracy, tabular data differentiation, ENGR 216, experimental physics lab, Texas A&M