I am trying to derive the formula of the 4th order Pad scheme that passes through the points $x_i$, $x_{i-1}$ and $x_{i+1}$$$\Big(\frac{\partial\phi}{\partial x} \Big)_i = -\frac{1}{4}\Big(\frac{\partial\phi}{\partial x} \Big)_{i+1}-\frac{1}{4}\Big(\frac{\partial\phi}{\partial x} \Big)_{i-1} + \frac{3}{4}\frac{\phi_{i+1}-\phi_{i-1}}{\Delta x}$$To achieve this I am thinking of solving it using linear algebra, Gauss elimination, to find the coefficients $a_i$$$A=\pmatrix{1 & x_{i-1} & x_{i-1}^2 & x_{i-1}^3 &x_{i-1}^4 \\1 & x_{i} & x_{i}^2 & x_{i}^3 &x_{i}^4 \\1 & x_{i+1} & x_{i+1}^2 & x_{i+1}^3 &x_{i+1}^4 \\}~~~~~~x=\pmatrix{a_0\\a_1\\a_2\\a_3\\a_4}~~~~~~y=\pmatrix{\phi_{i-1} \\ \phi_{i} \\ \phi_{i+1}}$$once I have the coefficients I can use them to find the derivatives in $x_i$, $x_{i-1}$ and $x_{i+1}$ and try to get the formula.I think this is a lengthy procedure, is this a good approach to derive the formula?Is there a better way (faster) to do it?
4th order Pad scheme formula derivation
linear algebra;pde;finite difference;fluid dynamics;ode