Differential equation for temperature on the Hugoniot I'm studying an old paper on shock compression in solids (McQueen, 1964).
On page 9 they get

a differential equation:
$$\frac{dT}{dV} = \frac{-T\gamma}{V} +\frac{1}{2C_v}[\frac{dP}{dV}  (V_0-V) + (P-P_0)]$$
that is readily integrated numerically. The centered difference equation
$$T_i = \frac{T_{i-1}[1-\frac{\Delta V}{2}\frac{\gamma}{V}]+\frac{1}{2C_v}[\Delta P(V_0-\overline{V}) + (\overline{P}-P_0)\Delta V]}{1+\frac{\Delta V}{2}\frac{\gamma}{V}}$$
gives the temperature at $V_i$ in terms of the previous temperature and
other known quantities.

$\gamma$ and $C_v$ are known constants, while they define
$$\overline{V} = \frac{V_i + V_{i-1}}{2}
,\overline{P} = \frac{P_i + P_{i-1}}{2}$$
$$\Delta V = V_i - V_{i-1},\Delta P = P_i - P_{i-1}$$
I don't understand how to get this centered difference equation.
 A: This is the trapezoidal method applied to a linear equation
$$
T'(V)=-rT(V)+b(V)
$$
giving the method equation, in general implicit,
$$
\frac{T_i-T_{i-1}}{ΔV}=\frac12\left[(-r_iT_i+b_i)+(-r_{i-1}T_{i-1}+b_{i-1})\right].
$$
Now bring all $T_i$ to the left and all $T_{i-1}$ to the right,
$$
(1+\tfrac12r_iΔV)T_i=(1-\tfrac12r_{i-1}ΔV)T_{i-1}+\tfrac{\Delta V}{2}(b_i+b_{i-1})
$$
and you should recognize the structure of the equation in question.

$r_i=r(V_i)$, $r(V)=\frac{γ}{V}$, $b_i=b(V_i)$, $b(V)=\frac1{2C_v}(P'(V)(V_0 - V)+P(V)-P_0)$.

An easier way to also incorporate $P'(V)$ in the scheme is to consider the differential equation at $V_{i-1/2}=\bar V$ and replace all values and derivatives by expressions in values at $V_{-1},V_i$ of error order 2, mean values for values and difference quotients for derivatives. Then
$$
\frac{ΔT}{ΔV}= \frac{-\bar T\gamma}{\bar V} +\frac{1}{2C_v}\left[\frac{ΔP}{ΔV}  (V_0-\bar V) + (\bar P-P_0)\right]
$$
This again is not exactly the trapezoidal method  due to the denominator $\bar V$, but still a second-order correct formula.
