# Approximation to a second order partial derivative

Let's say we want to approximate a second order differential:

$$\partial_{aa} V(a)$$

Now, say we have a grid of values for $A$, where the step size is $\Delta$, $i$ is the index on this A grid, and we define the short hand notation

$$V_i \equiv V(A_i)$$

Achdou et al (page 13, equation 35) then compute the approximation to the second order differential on the grid at a point $i$ as

$$\partial_{AA} v_i = \frac{v_{i+1} - 2v_i + v_{i-1}}{\Delta^2}$$

They don't explain why, and I can't follow here. Could someone provide me with the rough ansatz for why this is the case?

In your notation, the first derivative would be given by $$\partial_A v_i = \frac{v_{i+1} - v_i}{\Delta}.$$ In order to compute the second derivative, we need to apply this formula with $\partial_A v_i$ itself in place of $v$. This gives $$\partial_{AA} v_i = \frac{ \frac{v_{i+2} - v_{i+1}}{\Delta} - \frac{v_{i+1} - v_i}{\Delta}}{\Delta}.$$ A bit of algebra reveals that this is the same as $$\partial_{AA} v_i = \frac{v_{i+2} - 2v_{i+1} + v_i}{\Delta^2}.$$ Now if your grid is fine enough, you can lower the index $i$ on the right-hand side without changing the result significantly. This gives the equation that you came across. It is generally preferred due to the "symmetry" that it displays between $i-1$ and $i+1$.