# At which stage to interpolate?

Assume I have a multidimensional grid $$G$$. I consider two functions $$f(x)$$ and $$g(x)$$. I have solved the values for the functions over all grid points $$x \in G$$. Let me now be interested in some third function $$F(f(x),g(x))$$. I am looking to evaluate $$F$$ at a point $$y$$ that is not a grid point using interpolation.

There are two approaches. First I could find $$f(y)$$ and $$g(y)$$ using interpolation and then plug them into $$F$$. Alternatively I could solve for $$F$$ over the grid and then interpolate on those values directly.

Which method should yield more accurate results? Is there some discussion on this issue in the literature? Does the answer depend on the interpolation method, e.g. multilinear vs. multidimensional spline interpolation?

This will implicitly depend on your function, $$F$$, as well as the method you used to derive your $$f$$ and $$g$$. If your $$F$$ were, say, the constant function $$F(y,z)=1$$, then you'd be guaranteed to have no error whatever you do. On the other hand, if you have a discontinuous $$F$$, say
$$F(x,y)=\begin{cases} 1&y\leq0,\\ 0& y>0, \end{cases}$$ then interpolation second is almost definitely going to have an error even on linear, while calculate then interpolate might be exact (or not, depending on the behaviour of its second variable). On the other hand, for other choices of functions, interpolation second might yield an impossible value, say for an $$F$$ known to be bounded above zero. Note that both of these effects can appear even in the 1D case.
More generally, errors may cancel, or they may accumulate. If all your functions are sufficiently well behaved, you can calculate bounds on your truncation error via (e.g Taylor series analysis of your interpolation method, along with any original errors in your $$f$$ & $$g$$). But remember, these are bounds, and either might be closer to the exact solution depending on your specific use case.