# What method of Finite difference is this?

I am reviewing Numerical Recipes method on solving ODEs via relaxation (Chapter 18.3 in the 3rd edition) and they chose a finite difference method I am unfamiliar with (Equation 18.3.2):

$$$$\frac{\textrm{d}y}{\textrm{d}x} = g(x,y),\\ \longrightarrow \frac{y_k - y_{k-1}}{x_k-x_{k-1}} = g\left(\frac{1}{2}(x_k+x_{k-1}), \frac{1}{2}(y_k+y_{k-1})\right).$$$$

Unfortunately, they just refer to it as a "not unique" method of turning the ODE into a finite difference equation. What is new to me is the averaging of the variables for the nonhomgeneous part of the equation, $$g(x,y)$$. It almost reminds me of Crank-Nicholson, but instead of averaging the entire $$g(x,y)$$ temporally, it is averaging the variables themselves spatially, i.e., not just a difference of spatial verse temporal. E.g., say if $$x$$ was the familiar time coordinate, $$x\rightarrow t$$, then Crank-Nicholson would look like

$$$$\frac{\textrm{d}y}{\textrm{d}t} = g(t,y),\\ \longrightarrow \frac{y^n - y^{n-1}}{t^n-t^{n-1}} = \frac{1}{2} \left\{g\left(t^n, y^n\right) + g\left(t^{n-1}, y^{n-1}\right)\right\} \neq g\left(t^{n+1/2}, y^{n+1/2}\right).$$$$

Perhaps there is not a general name for this method, but a even general discussion for how to treat the nonhomgeneous part of the equation in terms of finite differences would be helpful. The method intuitively seems "better," as you are saying the mean slope between $$x_k$$ and $$x_{k-1}$$, i.e., the left-hand side of equation 1, is equal to the slope at the midpoint (the right-hand side), rather than the slope at $$x_k$$ (the traditional backwards difference method). This is somewhat in line with the philosophy of Crank-Nicholson, which says the mean of the time derivatives at $$t^n$$ and $$t^{n-1}$$. But again, this is subtly different that the actual derivative at the half-way time step (the $$\neq$$ part of equation 2).