---
title: "Numerical check of difference schemes"
subject: "Applied Computational Fluid Dynamics"
chapter: 3
key: "semester_7/applied_computational_fluid_dynamics:finite-difference-derivative-numerical"
source: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/finite-difference-derivative-numerical
site: BCT Engineering
---

# Numerical check of difference schemes

Applied Computational Fluid Dynamics · Chapter 3: Discretization Methods

- Asked in: year not given, 6 marks
- Video: [Numerical Differentiation | Forward, Backward and Central Difference | Numerical Computation](https://www.youtube.com/watch?v=5zwxZ439nTA) — The Infinite Math
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/finite-difference-derivative-numerical
- Whole chapter: https://www.bctengineer.com/md/semester_7/applied_computational_fluid_dynamics/chapter-3

## Question

For the function $f(x)=\sin x$ (x in radians), evaluate $f'(x)$ at $x=1.0$ using forward, backward and central differences with $h=0.1$ and then $h=0.05$. Compare with the exact value, find the percentage errors and verify the order of accuracy of each scheme.

## 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).

## Answer

Exact: $f'(1)=\cos 1=0.54030$.

Values needed: $\sin0.9=0.783327$, $\sin0.95=0.813416$, $\sin1.0=0.841471$, $\sin1.05=0.867423$, $\sin1.1=0.891207$.

#### h = 0.1
- Forward: $\dfrac{\sin1.1-\sin1.0}{0.1}=\dfrac{0.891207-0.841471}{0.1}=0.49736$
- Backward: $\dfrac{0.841471-0.783327}{0.1}=0.58144$
- Central: $\dfrac{0.891207-0.783327}{0.2}=0.53940$

#### h = 0.05
- Forward: $\dfrac{0.867423-0.841471}{0.05}=0.51904$
- Backward: $\dfrac{0.841471-0.813416}{0.05}=0.56111$
- Central: $\dfrac{0.867423-0.813416}{0.1}=0.54008$

#### Errors

| Scheme | $h$ | 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 $h$ is halved:
- Forward: $0.04294/0.02126=2.02\approx2^1$, so first order.
- Backward: $0.04114/0.02081=1.98\approx2^1$, so first order.
- Central: $0.00090/0.000225=4.0=2^2$, so second order.

Here error means (numerical $-$ exact). The signs agree with theory: the forward formula equals $f'+\tfrac h2f''$, and since $f''=-\sin x<0$ 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 $O(h)$ and central is $O(h^2)$.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. For sin x at x = 1 with h = 0.1, which scheme gives the closest value to cos 1 = 0.5403?
   A. Forward, 0.4974
   B. Backward, 0.5814
   C. Central, 0.5394
   D. All equal
   Answer: C. Central difference gives 0.5394 (0.17% error) compared with about 8% for forward and backward. (Key point: Best scheme)

2. How is the order of accuracy verified?
   A. By comparing signs of errors
   B. By the ratio of errors when h is halved
   C. By checking the exact value only
   D. By using larger h
   Answer: B. A ratio of about 2 means first order, and about 4 means second order. (Key point: Order verification)

3. For the central scheme the error ratio on halving h was about:
   A. 2
   B. 1
   C. 4
   D. 8
   Answer: C. 0.00090/0.000225 = 4, confirming second order. (Key point: Central error ratio)

4. The forward error is negative because:
   A. The forward formula equals f' + (h/2)f'' and f'' = -sin x < 0
   B. The step is too large
   C. Round-off dominates
   D. cos 1 is negative
   Answer: A. Forward estimate = f' + (h/2) f'', and f'' is negative for sin x at x = 1, so error is negative. (Key point: Error sign)

## Related in Applied Computational Fluid Dynamics

- [Derive forward, backward, central differences](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Ataylor-series-finite-differences) — Applied Computational Fluid Dynamics, chapter 3
- [Second derivative central difference scheme](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Asecond-derivative-central-difference) — Applied Computational Fluid Dynamics, chapter 3
- [Upwind versus central scheme for convection](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aupwind-central-convection-numerical) — Applied Computational Fluid Dynamics, chapter 3
- [Order of accuracy, consistency and stability](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aaccuracy-order-consistency-convergence) — Applied Computational Fluid Dynamics, chapter 3

## Related in other subjects

- [Governing equations; forward, backward, central differencing](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Agoverning-eq-forward-backward-central) — Computational Techniques in Civil Engineering, chapter 5
- [First and second order finite difference schemes](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Afd-first-second-order-schemes) — Computational Techniques in Civil Engineering, chapter 5, asked 2×
- [Infinite line: surge impedance and forward/backward waves](https://www.bctengineer.com/question.md?key=semester_8%2Fhigh_voltage_engineering%3Ainfinite-line-surge-impedance-waves) — High Voltage Engineering, chapter 3
- [Forward/backward recovery; checkpointing](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aforward-backward-coordinated-ckpt) — Distributed System, chapter 9
