Starting from a Lagrangian and using functional-integration techniques, series expansions of Green’s function of a real scalar field and electromagnetic field, in the presence of a medium, are obtained. The parameter of expansion in these series is the susceptibility function of the medium. Relativistic and nonrelativistic Langevintype equations are derived. Series expansions for Lifshitz energy in finite temperature and for an arbitrary matter distribution are derived. Covariant formulations for both scalar and electromagnetic fields are introduced. Two illustrative examples are given.