---
title: "Second derivative central difference scheme"
subject: "Applied Computational Fluid Dynamics"
chapter: 3
key: "semester_7/applied_computational_fluid_dynamics:second-derivative-central-difference"
source: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/second-derivative-central-difference
site: BCT Engineering
---

# Second derivative central difference scheme

Applied Computational Fluid Dynamics · Chapter 3: Discretization Methods

- Asked in: year not given, 5 marks
- Video: [Finite difference approximation for the second order derivative](https://www.youtube.com/watch?v=raQKQhUcefg) — Aerodynamic CFD
- 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/second-derivative-central-difference
- Whole chapter: https://www.bctengineer.com/md/semester_7/applied_computational_fluid_dynamics/chapter-3

## Question

Derive the central difference formula for the second derivative $d^2f/dx^2$ and state its order. For $f(x)=x^4$, estimate $f''(1.2)$ using $h=0.2$ and $h=0.1$, and compare with the exact value.

## Short answer

Central formula: (f_{i+1}−2f_i+f_{i-1})/h², order O(h²). For f=x⁴ at x=1.2, exact f''=17.28. With h=0.2: 17.36; with h=0.1: 17.30. Error reduces fourfold on halving h, confirming second-order accuracy.

## Answer

#### Derivation
Add the Taylor series of $f_{i+1}$ and $f_{i-1}$:
$$
f_{i+1}+f_{i-1}=2f_i+h^2f''_i+\frac{h^4}{12}f''''_i+\cdots
$$
Solve for $f''_i$:
$$
\boxed{f''_i\approx\frac{f_{i+1}-2f_i+f_{i-1}}{h^2}},\qquad \text{error}=-\frac{h^2}{12}f''''_i=O(h^2)
$$
It is second-order accurate, and it uses three points (stencil $i-1,\ i,\ i+1$). It is the basic formula for diffusion terms.

#### Numerical for $f=x^4$ at $x=1.2$
Exact: $f''=12x^2=12\times1.44=17.28$.

**h = 0.2:** $f(1.0)=1.0$, $f(1.2)=2.0736$, $f(1.4)=3.8416$
$$
f''\approx\frac{1.0-2(2.0736)+3.8416}{0.2^2}=\frac{0.6944}{0.04}=17.36
$$
**h = 0.1:** $f(1.1)=1.4641$, $f(1.3)=2.8561$
$$
f''\approx\frac{1.4641-2(2.0736)+2.8561}{0.01}=\frac{0.173}{0.01}=17.30
$$

| $h$ | Estimate | Error |
|---|---|---|
| 0.2 | 17.36 | +0.08 |
| 0.1 | 17.30 | +0.02 |
| exact | 17.28 | 0 |

The error falls by a factor of 4 when $h$ is halved, confirming second-order accuracy. It also matches theory: $\dfrac{h^2}{12}f''''=\dfrac{0.04}{12}\times24=0.08$ for $h=0.2$.

**Answer:** $f''(1.2)\approx17.36$ ($h=0.2$) and $17.30$ ($h=0.1$); exact 17.28.

## Check yourself

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

1. The second-derivative formula comes from:
   A. Subtracting the Taylor series of f_{i+1} and f_{i-1}
   B. Adding the Taylor series of f_{i+1} and f_{i-1}
   C. Using only f_{i+1}
   D. Differentiating the first derivative formula once with h = 1
   Answer: B. Adding cancels the odd terms and gives f_{i+1} + f_{i-1} = 2f_i + h^2 f'' + ... (Key point: Derivation)

2. The central formula for f'' is:
   A. (f_{i+1} - f_{i-1})/2h, second order
   B. (f_{i+1} - f_i)/h^2, first order
   C. (f_{i+1} - 2f_i + f_{i-1})/h^2, second order
   D. (f_{i+1} + f_i + f_{i-1})/h^2, second order
   Answer: C. It uses three points and has error -(h^2/12) f'''' = O(h^2). (Key point: Formula and order)

3. For x^4 at 1.2 with h = 0.1, the estimate is:
   A. 17.36
   B. 17.28
   C. 17.00
   D. 17.30
   Answer: D. (1.4641 - 4.1472 + 2.8561)/0.01 = 17.30, versus exact 17.28. (Key point: Numerical result)

4. Going from h = 0.2 to 0.1 the error changes from 0.08 to 0.02, showing:
   A. First-order accuracy
   B. Second-order accuracy
   C. Instability
   D. No change
   Answer: B. A factor of 4 reduction on halving h confirms O(h^2). (Key point: Error behaviour)

## 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
- [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
- [Boundary derivative with one-sided differences](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aone-sided-boundary-derivative-numerical) — Applied Computational Fluid Dynamics, chapter 3
- [Numerical check of difference schemes](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Afinite-difference-derivative-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

- [Saint-Venant, second-order explicit scheme](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asaint-venant-second-order-explicit) — Computational Techniques in Civil Engineering, chapter 5, asked 2×
- [Second-order scheme, linear kinematic wave](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asecond-order-linear-kinematic-scheme) — Computational Techniques in Civil Engineering, chapter 5
- [Derivative feedback in second order time response](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Aderivative-feedback-second-order) — Control Systems, chapter 7
- [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×
