I was given that $y_{j}=y(x_{j})$ where $x_{j}=x_{0}+jh$ for integer j and positive h. I need to show that $$y'_{0}=\frac{y_{1}-y_{-1}}{2h} + O(h^{2}).$$
I thought I could start by finding the Taylor expansion of $y_{j}=y(x_{j})$, however I am not quite sure how to apply the Taylor Series formula to that equation. Can anyone explain?
Let's start by Taylor expanding $y_{1}$ and $y_{-1}$ around $x_0$:
$$\tag{1}y_{1} = y(x_1) = y(x_0+h) = y(x_0) + \overbrace{h}^{=((x_0+h)-x_0)}y'(x_0) + \frac{h^2}{2!}y''(x_0) +O(h^3)$$
$$\tag{2}y_{-1} = y(x_{-1}) = y(x_0-h) = y(x_0) + \overbrace{(-h)}^{=((x_0-h)-x_0)}y'(x_0) + \frac{h^2}{2!}y''(x_0) + O(h^3)$$
Thus, subtracting $(2)$ from $(1)$ and reordering terms, we get
$$y_{1} - y_{-1} = \underbrace{y(x_0)-y(x_0)}_{=0} + \underbrace{hy'(x_0) + hy'(x_0)}_{=2hy'(x_0)} +\underbrace{\frac{h^2}{2!}y''(x_0)-\frac{h^2}{2!}y''(x_0)}_{=0} + O(h^3)$$
Hence
$$y_{1} - y_{-1} = 2hy'(x_0) + O(h^3) \Rightarrow \frac{y_{1} - y_{-1}}{2h} + O(h^2) = y'(x_0).$$