A general computational form for a class of nonlinear systems incorporating both spectral and finite difference approximations