Derivatives and finite difference matrices
A finite difference matrix turns sampled values into changes between adjacent samples. Dividing by the spacing approximates a derivative; repeated differences reveal curvature.
What you will learn
- Compute first differences
- Explain spacing and derivative estimates
- Compute a second difference and explain boundaries
Work through one complete example
- For samples f=[1,4,9] at spacing h=1, define D=[[-1,1,0],[0,-1,1]].
- Df=[3,5] records the two forward differences; dividing by h gives derivative estimates at the intervals.
- A second-difference row [1,−2,1] gives 1−2(4)+9=2, detecting that the samples bend upward.
- The first-difference matrix is rectangular: three samples produce two interval changes. Boundary derivative estimates need a stated convention.
Objective 1: Compute first differences
- Compute Df for the displayed D and f=(1,4,9).
- The row products are (3,5).
Objective 2: Explain spacing and derivative estimates
- What are the difference quotients when h=2?
- Divide changes by h: 3/2 and 5/2. These are derivative estimates.
Objective 3: Compute a second difference and explain boundaries
- Find [1,−2,1]f. How many forward differences exist?
- 1−8+9=2. Three samples yield two forward differences; the endpoint needs a convention.
A common mistake
State the assumptions before using the formula.
Review first
Continue learning
Derivatives and finite difference matrices
Interactive diagnosis and practice load in the learning app. You can read these lesson notes without JavaScript.