The problem addressed concerns surface Green function matching for continuous media, i.e., in terms of differential calculus. This involves simultaneous differential equations. When the coefficients are position-dependent, as in a pseudopotential model, a transfer matrix algorithm proves very useful to evaluate numerically the intervening Green functions and derivatives thereof. The flexibility of the method is demonstrated by applying it to the study of surface and image states in f.c.c. metals with varying degrees of complexity in the model employed to describe the crystallinity of the surface. © 1990 IOP Publishing Ltd.