Green's functions are a device used to solve difficult ordinary and partial differential equations which may be unsolvable by other methods. The idea is to consider a differential equation such as
Above, the notation is defined so that is a differential operator; a linear combination of derivative operators times functions. As above, the differential equation can be represented by such an operator acting on a function. The Green's function in this case is the analogue of the inverse of :
The idea is that the Green's function inverts the operator, so the inhomogeneous version of the above, , can be solved by the analogue of . The above correspondence in this case gives . See below for the formal mathematics underlying this idea and why is a function of two variables.
The inverse of a derivative added to functions and so on is not a very well-defined object; rigorous mathematics is required to derive and justify a more precise construction. As a result, constructing and solving for Green's functions is a delicate and difficult procedure in general.
Green's functions are widely used in electrodynamics and quantum field theory, where the relevant differential operators are often difficult or impossible to solve exactly but can be solved perturbatively using Green's functions. In field theory contexts the Green's function is often called the propagator or two-point correlation function since it is related to the probability of measuring a field at one point given that it is sourced at a different point.
Formally, a Green's function is the inverse of an arbitrary linear differential operator . It is a function of two variables which satisfies the equation
with the Dirac delta function. This says that the Green's function is the solution to the differential equation with a forcing term given by a point source. Informally, the solution to the same differential equation with an arbitrary forcing term can be built up point by point by integrating the Green's function against the forcing term. This is equivalent to taking an uncountable superposition of solutions to the equation with point source and adding them up to the arbitrary forcing term, which is why the linearity of the differential operator is important. Formally, this means the solution to an arbitrary linear differential equation with forcing term is given by
In general, Green's functions are not in fact functions but rather distributions, which means they can be integrated against functions. Although the resulting integrals may be difficult or impossible to compute, they provide an immediate solution to arbitrary linear differential equations when possibly no solution may be found by other methods, which can at the very least be computed numerically.
Below, several methods for constructing Green's functions are outlined. Which method is optimal is highly context-dependent.
As given above, the solution to an arbitrary linear differential equation can be written in terms of the Green's function via
Since the Green's function solves
and the delta function vanishes outside the point , one method of constructing Green's functions is to instead solve the homogeneous linear differential equation and impose the correct boundary conditions at to account for a delta function.
This process can be written more formally as follows:
Below, the discussion is restricted to the special case of monic (leading coefficient unity) second-order linear differential operators for simplicity. First, write down the general form of the solutions on either side of :
where are constants and are the two homogeneous solutions to the differential equation.
Next, impose the two boundary conditions. This fixes two of the constants in terms of the other two.
Third, impose continuity of at . This fixes one of the two remaining constants.
Lastly, require that increase by one at the delta function. This comes from integration of the original differential equation around a small window on either side of :
The reason why alone is considered out of all the possible terms in is because solutions must be continuous at ; any other terms in the differential operator do not change on either side of when integrated.
This condition on the change in the derivative fixes the last constant and therefore solves for the Green's function.
Consider electromagnetic waves polarized in the -direction propagating in one dimension in a lasing cavity of length . The waves propagate in an active laser medium with current density . Maxwell's equation for the -component of the electric field of these waves then reads
where the constant is given by with the speed of light, the angular frequency of the light, and a constant called the gain coefficient.
If the cavity is walled by conducting mirrors, the boundary conditions are Dirichlet:
Find the general solution for the electric field between the mirrors.
The homogeneous equation is
which has solutions given by exponentially growing and decaying exponentials:
The boundary conditions impose the constraints on the coefficients:
Solving for and and plugging into the expression for yields
Enforcing continuity at gives
and requiring the derivative to jump by unity yields
Plugging all constants into gives the Green's function:
The general solution for the electric field given an arbitrary current profile is therefore
Consider electromagnetic waves polarized in the direction propagating in one dimension in an active laser medium with current density . Maxwell's equation for the -component of the electric field of these waves then reads
for some constant. Suppose there is a source at and that there is a conducting mirror far away so that effectively and are the boundary conditions. Find the Green's function for that will allow for determination of the electric field anywhere in space.
If one knows the spectrum of a differential operator, the Green's function may be easily computed via the formula
where the are the eigenvalues corresponding to the normalized eigenfunctions and the star denotes complex conjugate. This formula holds if the differential operator is a second-order differential operator of a special class called Sturm-Liouville operators in which all coefficient functions are continuous and the coefficient of the first-order term is differentiable (in general this condition can be extended to operators that are higher than second order, but these are not often physically motivated).
The motivation for this definition comes from thinking about solutions to the differential equation as being expanded in a basis of the eigenfunctions of the differential operator. It is straightforward to check that the above definition satisfies the criteria for a Green's function: consider the differential equation , then
Above, is replaced by since the are the eigenfunctions of . But now
In the second equality we have emphasized that the integral is just the usual inner product of functions, so that the right-hand side above is really just expanded in a basis of eigenfunctions, so as expected. Therefore, this expression for the Green's function solves the given differential equation.
with boundary conditions and the energy of the particle in some system of appropriate units so that all relevant coefficients are unity. The allowed values of the energy are for ; the corresponding orthonormal eigenvectors are
with the Hermite polynomials given by
Find the exact solution to the quantum harmonic oscillator with the forcing term and boundary conditions , that is, solve
for subject to these boundary conditions.
Write down the forcing term as a sum of eigenfunctions of . This requires the lowest three eigenfunctions:
Therefore the forcing term can be written as
Now consider the decomposition of the Green's function for the quantum harmonic oscillator as a sum over eigenvectors:
Further terms are omitted because they will not be relevant: the eigenfunctions of the differential operator are orthonormal! Writing down the general solution in terms of the Green's function, one finds
The orthogonality of the eigenfunctions ensures that all other integrals in the expansion vanish. The normalization of the eigenfunctions gives the final result:
The solution satisfies the given boundary conditions, as it must do because all of the eigenfunctions satisfy the boundary conditions as well.
Which of the following is the Green's function for the time-dependent free-particle Schrödinger equation in one dimension?
The time-dependent free-particle Schrödinger equation in one dimension is
Note: Recall that a solution to the time-dependent Schrödinger equation can be written out in a basis of solutions to the time-independent Schrödinger equation
where is the energy of the time-independent eigenfunction .
denotes the exponential function, .
denotes the absolute value function.
Cauchy's Residue Theorem
The integral of an analytic function along a closed contour in the complex plane is given by
where the sum is taken over all poles contained inside the contour . The residue of a simple pole , written , is the value of the function evaluated with the simple pole removed.
Typically, the method works by first Fourier transforming the Green's function and applying the differential operator to the Fourier transform. The Fourier transform of the Green's function will usually contain simple poles. The inverse Fourier transform can then be computed via contour integration to obtain the Green's function in position space.
Find the Green's function for the one-dimensional, time-independent Schrödinger equation
with . Use it to construct the general solution to the Schrödinger equation for an arbitrary potential.
The Green's function satisfies
where coordinates have been shifted so that in the standard definition above. Take equal to the inverse Fourier transform of its Fourier transform :
Recall also the integral identity for the Dirac delta function:
Plugging into the equation for the Green's function, one finds
so the Fourier transform of the Green's function can be read off:
Now the Green's function is defined by the inverse Fourier transform:
This integral can be performed by contour integration in the complex plane. The integrand has two simple poles at . The closed contour chosen is a semicircle in the upper or lower half-plane, the radius of which is taken to infinity. The choice of upper or lower half-plane depends on the sign of : it is desirable for the integral to vanish on the semicircular arc, so the choice of half-plane is taken so that the factor in the equation for the Green's function decays exponentially, vanishing as the radius is taken to infinity. As a result, the total contour integral is equal to the original real integral defining the Green's function. The choice of how to circumvent the poles is important and is discussed later. In this case, only one pole is enclosed by either contour and the choice of which pole depends on which half-plane the semicircle is closed in.
For , the enclosed pole is at and Cauchy's residue theorem yields
Performing the similar integration for yields
Combining the two expressions, the final result for the Green's function of the one-dimensional Schrödinger equation is therefore
The general solution to the Schrödinger equation for an arbitrary potential is therefore
with a solution to the homogeneous equation.
When the contour integration was performed above, the choice of how to circumvent the poles was important. In quantum mechanics and quantum field theory, the Feynman prescription for avoiding the poles is used. This prescription represents the possibility of a particle measured at one point to be measured at a different point later or vice versa: since one pole is included in either choice of integration contour, either direction can occur. The resulting Green's function is often referred to as the Feynman propagator or Feynman Green's function.
However, this is not always the appropriate pole convention for a given physical setting. In electrodynamics, for instance, one is often concerned with finding the future propagation of an electromagnetic field given an initial configuration of sources. Fields radiate only from sources of charge; there is no backwards direction for propagation to run. As a result, a different pole convention is used, which circumvents both poles if and includes both poles if , called the retarded pole convention. This results in a different Green's function called the retarded propagator or retarded Green's function, which is often the correct Green's function for questions in electromagnetism. Choosing the opposite pole convention which circumvents both poles if and vice versa correspondingly gives the advanced propagator or advanced Green's function, which for example is useful in electromagnetism and field theory when one knows the state of a system near infinity and wants to derive the state at finite locations or times.
A more efficient, often effective shortcut for computing Green's functions is to take the relevant differential operator, replace each derivative with a factor of , and then take the reciprocal. This immediately yields the Fourier transform of the Green's function to within a multiplicative factor. In quantum field theory, where the Fourier transform of the Green's function is often more immediately useful, this trick saves a lot of work.
A massive scalar field of mass in quantum field theory satisfies the Klein-Gordon equation
where indicates the d'Alembert wave operator:
Find the Green's function of the Klein-Gordon operator in momentum space by Fourier transform. Note that is a vector with four components: the energy of a particle, and its three components of spatial momentum.
Notation: denotes the absolute value function.
In quantum field theory, the Green's function corresponding to a particular field is represented by internal lines in Feynman diagrams. For instance, the photon in quantum field theory is represented by the field which describes the electric and magnetic potentials of electromagnetism. The equations of motion of this field are Maxwell's equations, which can be represented in four-vector notation by
The corresponding Green's function in momentum space is simply
This corresponds to the factor which is included in the computation of Feynman diagrams for each photon line:
 Lecture Notes by M.T. Homer Reid, MIT 18.305 Advanced Analytic Methods for Scientists and Engineers, Fall 2015, http://homerreid.dyndns.org/teaching/18.305/.
 D.V. Schroeder and M.E. Peskin. An Introduction to Quantum Field Theory. Westview Press, 1995.
 Griffiths, David J. Introduction to Quantum Mechanics. Second Edition. Pearson: Upper Saddle River, NJ, 2006.
 Image from https://en.wikipedia.org/wiki/Feynman_diagram#/media/File:Feynman-diagram-ee-scattering.png under Creative Commons licensing for reuse and modification.