Green’s function method is a way to decompose a complex inhomogenous source using Dirac delta functions and then combine individually solutions to obtain the true answer.
Preconditions
Green’s function is a solution to a linear differential equation with a Dirac delta function as the inhomogeneous source and the additional requirement of the boundary condition being homogenous.
To clarify, by homogenous/inhomogeneous, we mean $\textit{something}=0$ . For example, a differential equation is said to be inhomogeneous if $g(x)$ in the following equation does not equals to $0$, homogeneous otherwise:
D^f(x)=g(x)
Similarly, the boundary condition is said to be homogeneous only if it specify the value (or the value of the derivative) of the function on the boundary to be $0$. i.e.
f(x=L)=0 or f′(x=L)=0
On the other hand, by linear, we mean no coupling between operators with different derivative order. i.e. no product of function and its derivatives, such as $f(x) \cdot f’(x)$.
Overall, the differential equation should look like:
or, we can put all operation into an operator and write Eq. 1 as:
D^f(x)=g(x)=δ(x−x′)(2)
where $\hat{D} = a_1(x)+a_2(x)\frac{d}{dx} + \cdots + a_n(x)(\frac{d}{dx})^n$. Since there are no coupling between different order of differentiation, we call this operator a linear operator. The linearity is essential to the superposition theory that we are so used to in quantum mechanics that we’ve just taken it for granted.
Deriving of Green’s function method
Now, how do we apply this particular solution of a particular differential equation to solve all those general questions?
More importantly, what kinds of general differential equations can be solved using this method?
Like I said in the beginning, the essence of this method is that it breaks down the complex inhomogeneous source using Dirac delta functions.
This means that we can have any continuous complex inhomogeneous source in our general differential equations, but we still need the operator to be linear.
i.e.:
D^f(x)=g(x)(3)
where, $g(x)$ is a general continuous function.
$g(x)$ can be expressed (decomposed) using a infinite set of Dirac delta functions with weights as:
g(x)=∫−∞∞δ(x′−x)g(x′)dx′,(4)
where, each Dirac delta function (more appropriately, unit pulse) takes one value from $g(x’)$. Or this can be interpreted as each unit pulse (located at $x$) has a weight of $g(x)$.
By plugging Eq. 4 into Eq. 3, we get:
D^f(x)=g(x)=∫−∞∞δ(x′−x)g(x′)dx′.(5)
Note that Green’s function is the solution to the equation:
D^G(x,x′)=δ(x−x′).(6)
Plug Eq. 6 to Eq. 5 (note that we’ve swapped $x$ and $x’$), we get:
D^f(x)=∫−∞∞D^G(x,x′)g(x′)dx′,(7)
and since $\hat{D}$ is a linear operator, the final solution to Eq. 3 is:
f(x)=∫−∞∞G(x,x′)g(x′)dx′.(8)
Note that to get the particular solution, we also need to add the general solution of homogeneous equation:
D^f(x)=0
to the solution in Eq. 8.
Now, things are much clearer: The green’s function is to be viewed as the building block of the particular solution since it decomposes the inhomogeneous source using Dirac functions.
Practical example
To get a taste of how the whole process works, let’s consider solving the Poisson equation with Green’s function method!
The Poisson equation relates the electrical potential to the charge density through:
∇2ψ(r)=−ϵ0ρ(r)(9)
in a non-periodic system, we have the boundary condition:
ψ(r→∞)=0
substituting $g(x)$ in Eq. 8 with $-\frac{\rho(\vec r)}{\epsilon_0}$, we get:
ψ(r)=∫G(r,r′)ρ(r)dr′,(10)
where $G(\vec r, \vec r’)$ satisfies:
∇2G(r,r′)=−ϵ01δ(r−r′)(11)
To solve this equation and get the Greens function needed to solve Eq. 9, first, we set $\vec r’ = 0$ since the delta function only cares about the difference between $\vec r$ and $\vec r’$. This yields $G(\vec r)$ and $\delta(\vec r)$
Then we Fourier transform the Green’s function and the delta function: