Let $f(x)=e^{x}$
The definition of derivative of $f$ at the point $x_0$ is
$$ f^{\prime}(x_0)=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0} $$We can obtain from it the three approximations of the derivative or finite difference formulas
If $x = x_0+h$ with $h \gt 0$ then $h = x-x_0$ and
For $x_0=0$ and $h=1$ $$f^{\prime}(0)\approx\frac{f(0+1)-f(0)}{1}=\frac{2.72-1}{1}=1.72$$
And for $x_0=0$ with $h=0.1$ $$f^{\prime}(0)\approx\frac{f(0+0.1)-f(0)}{h}=\frac{1.105-1}{0.1}=1.05$$
For these formulas, geometrically
Therefore, the more similar these two lines, the more similar the exact value and the approximation. In the graph, for example, they are clearly different because $h$ is very large. If the calculations would not have an error (with finite arithmetic they do), the smaller the $h$, the smaller the error of the approximation.
If $x = x_0-h$ wit $h \gt 0$ then $-h = x-x_0$ and
For $x_0=0$ and $h = 1$ $$f^{\prime}(0)\approx\frac{f(0)-f(0-1)}{1}=\frac{1-0.37}{1}=0.63$$
For $x_0=0$ and $h = 0.1$ $$f^{\prime}(0)\approx\frac{f(0)-f(0-0.1)}{0.1}=\frac{1-0.905}{0.1}=0.95$$
If we average the forward and backward formulas
For $x_0=0$ and $h = 1$ $$f^{\prime}(0)\approx \frac{f(0+1)-f(0-1)}{2(1)}=\frac{2.72-0.37}{2(1)}=1.18$$
For $x_0=0$ and $h = 0.1$ $$f^{\prime}(0)\approx \frac{f(0+0.1)-f(0-0.1)}{2(0.1)}=\frac{1.1052- 0.9048}{2(0.1)}=1.002$$
In this case, the slopes of the tangent line and the secant line, despite being $h$ quite large, are similar. So it is expected that the exact and approximate values will be more similar than in the previous cases. This is because this is a formula of order two, while the previous two formulas are of order one.
If $y$ is the actual value and $y^*$ the approximation:
We see that for the same $h$ the centered formula gives a smaller error. And also that the smaller the $h$, the smaller the error (up to a certain point, because if $h$ is too small, rounding errors dominate and the error increases again).
We say that the order of a numerical differentiation formula is $n$ if the absolute error for this formula is
$$E_h = K\,h^n$$Since $h$ is a small value, the larger $n$ the smaller the error in the formula (if $h=0.1$ then $h^2 = 0.01$ and $h^3 = 0.001$)
The forward formula is
$$ f'(a)\approx \frac{f(a+h)-f(a)}{h} $$Taylor's series formula is
$$f(x)=f(x_0)+f'(x_0)\frac{x-x_0}{1!}+f''(c)\frac{(x-x_0)^2}{2!} \quad c \in(x,x_0)\;\mathrm{or}\; c\in (x_0,x)$$If $x_0=a$ and $x=a+h$ then $h = x-x_0$ and
$$f(a+h)=f(a)+f'(a)\frac{h}{1!}+f''(c)\frac{h^2}{2!} \quad c \in(a+h,a) \;\mathrm{or}\; c\in (a,a+h)$$If we take into account the progressive formula, subtracting $f(a)$ from both sides
$$f(a+h)-f(a)=f'(a)\frac{h}{1!}+f''(c)\frac{h^2}{2!}$$and dividing by $h$
$$\frac{f(a+h)-f(a)}{h}=f'(a)+f''(c)\frac{h}{2}$$also
$$-f''(c)\frac{h}{2}=f'(a)-\frac{f(a+h)-f(a)}{h}$$And since the error is the exact value minus the approximate
$$E_h =f'(a)-\frac{f(a+h)-f(a)}{h}$$and the error is
$$E_h =-f''(c)\frac{h}{2}= K\,h$$and since the exponent of the $h$ gives us the order of the formula, this is a formula of order 1.
Taylor's series formula is
$$f(x)=f(x_0)+f'(x_0)\frac{x-x_0}{1!}+f''(c)\frac{(x-x_0)^2}{2!} \quad c \in(x,x_0)\;\mathrm{or}\; c\in (x_0,x)$$If $x_0=a$ and $x=a-h$ then $-h = x-x_0$ and
$$f(a-h)=f(a)+f'(a)\frac{-h}{1!}+f''(c)\frac{(-h)^2}{2!} \quad c \in(a+h,a) \;\mathrm{or}\; c\in (a,a+h)$$If we take into account the forward formula, subtracting $f(a)$ from both sides
$$f(a-h)-f(a)=-f'(a)\frac{h}{1!}+f''(c)\frac{h^2}{2!}$$and dividing by $-h$
$$\frac{f(a-h)-f(a)}{-h}=f'(a)-f''(c)\frac{h}{2}$$that is
$$\frac{f(a)-f(a-h)}{h}=f'(a)-f''(c)\frac{h}{2}$$also
$$f''(c)\frac{h}{2}=f'(a)-\frac{f(a)-f(a-h)}{h}$$and since the error is the exact value minus the approximate
$$E_h =f'(a)-\frac{f(a)-f(a-h)}{h}$$the error is
$$E_h =f''(c)\frac{h}{2}= K\,h$$and since the exponent of the $h$ gives us the order of the formula, this is a formula of order 1.
Taylor's series formula is
$$f(x)=f(x_0)+f'(x_0)\frac{x-x_0}{1!}+f''(x_0)\frac{(x-x_0)^2}{2!} +f'''(c)\frac{(x-x_0)^3}{3!}$$with
$$ c \in(x,x_0)\;\mathrm{or}\; c\in (x_0,x) $$If $x_0=a$ and $x=a+h$ then $h = x-x_0$ and
$$f(a+h)=f(a)+f'(a)\frac{h}{1!}+f''(a)\frac{h^2}{2!} +f'''(c_1)\frac{h^3}{3!}$$If $x_0=a$ and $x=a-h$ then $-h = x-x_0$ and
$$f(a-h)=f(a)+f'(a)\frac{-h}{1!}+f''(a)\frac{(-h)^2}{2!} +f'''(c_2)\frac{(-h)^3}{3!} $$Y $-f(a-h)$ is
$$-f(a-h)=-f(a)+f'(a)\frac{h}{1!}-f''(a)\frac{h^2}{2!} +f'''(c_2)\frac{h^3}{3!} $$If we take into account the centered formula, adding $f(a+h)+(-f(a-h))$ to both sides and taking into account that if $f'''$ is continuous, because of the intermediate value theorem, we can find a value $c_3$ in $(c_1,c_2)$ such that $$f'''(c_3)=\frac{f'''(c_1)+f'''(c_2)}{2}$$ then
$$f(a+h)-f(a-h)=2f'(a)h+2f'''(c_3)\frac{h^3}{6}$$and dividing by $2h$
$$\frac{f(a+h)-f(a-h)}{2h}=f'(a)+f'''(c_3)\frac{h^2}{6}$$also
$$-f'''(c_3)\frac{h^2}{6}=f'(a)-\frac{f(a+h)-f(a-h)}{2h}$$and since the error is the exact value minus the approximate
$$E_h =f'(a)-\frac{f(a+h)-f(a-h)}{2h}$$the error is
$$E_h =-f'''(c)\frac{h^2}{6}= K\,h^2$$and since the exponent of the $h$ gives us the order of the formula, this is a formula of order 2.