  In this work we calculate the exact Green's function for arbitrary
rectangular potentials. Specifically we focus on Green's function for
rectangular quantum wells enlarging the knowledge of exact solutions for
Green's functions and also generalizing and resuming results in the literature.
The exact formula has the form of a sum over paths and always can be cast into
a closed analytic expression. From the poles and residues of the Green's
function the bound states eigenenergies and eigenfunctions with the correct
normalization constant are obtained. In order to show the versatility of the
method, an application of the Green's function approach to extract information
of quasi-bound states in rectangular barriers, where the standard analysis of
quantum amplitudes fail, is presented.
