This is the procedure to derive formulations for Compact finite difference schemes.

First, assume the stencil and the general structure of the scheme. For the classical Padé scheme you have:

$$\alpha f'_{n+1} + f'_{n} + \alpha f'_{n-1} = a \dfrac{f_{n+1} - f_{n-1}}{2 \Delta x} \qquad(1)$$

You write the Taylor series for the derivatives and the functions, e.g.,

$$f'_{n+1}=f'_{n} + \Delta x f''_n + \dfrac{(\Delta x)^2}{2!} f^{(3)}_n + \cdots$$

You then replace the derivatives and the functions in Eq. (1) with their Taylor series. The system of equations to solve consists of the following equations:

* Set $f'_{n}$'s coefficients on both sides to be equal. Here we have,
$$2\alpha + 1 = a$$

* $f_n$ coefficient could only appear on the right hand side and its coefficient must be set equal to zero. In this case, this does not give us any equations.
* Start with coefficients of the lowest powers of $\Delta x$ and set them to be equal, until you get enough equations, e.g.,
$$a = 2 \dfrac{3!}{2!} \alpha$$