how to find green's function