# What space-time points should a known coefficient function be evaluated at when using the Lax-Friedrichs scheme to solve the transport equation?

For a scalar quantity $$u = u(x, t)$$, I'm considering the transport equation \begin{align} u_t + au_x &= 0, \qquad{x\in[0, L], \ t\in[0, T]} \\ u(0, t) &= u_{\text{in}}, \\ u(x, 0) &= f(x). \end{align} When $$a$$ is a constant, the Lax-Friedrichs scheme is the FTCS approximation given by $$\begin{equation}\label{PDE} u_j^{n + 1} = \frac{u_{j + 1}^n + u_{j - 1}^{n}}{2} - \frac{a(u_{j + 1}^n - u_{j - 1}^{n})}{2}, \end{equation}$$ where $$u_j^n = u(x_j, t^n)$$ for equally spaced space-time mesh points.

In the case $$a = a(x, t)$$, what are the values of $$x_j,\ t^n$$ that $$a$$ should be evaluated at? Given the scheme is forward in time, I can reasonably convince myself that we evaluate $$a$$ in time as $$a(x, t^{n + 1}),$$ but which space point should we use? The implicit-in-space nature of the Lax-Friedrichs scheme prevents me from using the same logic as I have with time.

I would suggest this as the canonical generalisation $$u_t(x_j,t_n) \approx \frac{u_j^{n+1} - (u_{j-1}^n + u_{j+1}^n)/2}{\Delta t}$$
$$(a u_x)(x_j,t_n) \approx a(x_j, t_n) \frac{u_{j+1}^n - u_{j-1}^n}{2\Delta x}$$
$$u_j^{n+1} = \frac{1}{2}(u_{j-1}^n + u_{j+1}^n) - \frac{a_j^n \Delta t}{2\Delta x} (u_{j+1}^n - u_{j-1}^n)$$