Several examples of a curious interplay between analytical and numerical methods are presented. First, local Trefftz approximations lead to high-order difference schemes and to singularity-free boundary-difference methods, with applications in electromagnetics, photonics. and other areas. Second, Whitney-like interpolation, well established in finite element analysis, is put to a new use in homogenization of metamaterials. All coarse-grained fields are unambiguously defined and satisfy Maxwellâs equations exactly; effective parameters are then derived without any heuristic assumptions. This approach should be applicable in areas beyond metamaterials and electromagnetic waves.