- Practice · 6 marks
Numerical check of difference schemes
Short answer
Exact cos(1)=0.5403. With h=0.1: forward 0.4974, backward 0.5814, central 0.5394. With h=0.05: forward 0.5190, backward 0.5611, central 0.5401. Central error reduces by ~4 (second order), forward/backward by ~2 (first order).
For the function (x in radians), evaluate at using forward, backward and central differences with and then . Compare with the exact value, find the percentage errors and verify the order of accuracy of each scheme.
Exact: .
Values needed: , , , , .
h = 0.1
- Forward:
- Backward:
- Central:
h = 0.05
- Forward:
- Backward:
- Central:
Errors
| Scheme | Value | Error | % error | |
|---|---|---|---|---|
| Forward | 0.1 | 0.49736 | -0.04294 | 7.95 |
| Forward | 0.05 | 0.51904 | -0.02126 | 3.93 |
| Backward | 0.1 | 0.58144 | +0.04114 | 7.61 |
| Backward | 0.05 | 0.56111 | +0.02081 | 3.85 |
| Central | 0.1 | 0.53940 | -0.00090 | 0.17 |
| Central | 0.05 | 0.54008 | -0.00023 | 0.04 |
Order of accuracy
Ratio of errors when is halved:
- Forward: , so first order.
- Backward: , so first order.
- Central: , so second order.
Here error means (numerical exact). The signs agree with theory: the forward formula equals , and since its error is negative; the backward error has the opposite sign; the central error is far smaller.
Answer: Central difference is best (0.5394 and 0.5401 against exact 0.5403); forward and backward are and central is .
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Derive forward, backward, central differences · Applied Computational Fluid Dynamics, chapter 3
- Second derivative central difference scheme · Applied Computational Fluid Dynamics, chapter 3
- Upwind versus central scheme for convection · Applied Computational Fluid Dynamics, chapter 3
- Order of accuracy, consistency and stability · Applied Computational Fluid Dynamics, chapter 3
- Governing equations; forward, backward, central differencing · Computational Techniques in Civil Engineering, chapter 5
- First and second order finite difference schemes · Computational Techniques in Civil Engineering, chapter 5 · asked 2×
- Infinite line: surge impedance and forward/backward waves · High Voltage Engineering, chapter 3
- Forward/backward recovery; checkpointing · Distributed System, chapter 9
All Applied Computational Fluid Dynamics chapter 3 questions →