The code:
At first, we sample $f(x)$ in the $N$ ($N$ is odd) equidistant points around $x^*$: \[ f_k = f(x_k),\: x_k = x^*+kh,\: k=-\frac{N-1}{2},\dots,\frac{N-1}{2} \] where $h$ is some step. Then we interpolate points $\{(x_k,f_k)\}$ by polynomial \begin{equation} \label{eq:poly} P_{N-1}(x)=\sum_{j=0}^{N-1}{a_jx^j} \end{equation} Its coefficients $\{a_j\}$ are found as a solution of system of linear equations: \begin{equation} \label{eq:sys} \left\{ P_{N-1}(x_k) = f_k\right\},\quad k=-\frac{N-1}{2},\dots,\frac{N-1}{2} \end{equation} Here are references to existing equations: (??), (??). Here is reference to non-existing equation (??).
The output:
Note that the output is an image, because of a basic incompatibility between the the WP QuickLaTeX and Enlighter plugins. (Basically, the WP QuickLaTeX plugin will attempt to render LaTeX code anywhere on the page, regardless of where the [latexpagecode]
shortcode occurs, even if it’s located in a highlighted syntax block. It would be nice if it only attempted to render code that follows the shortcode, but that is not a feature at the present time.