# Green’s Functions Illustrated

There’s no shame in admitting this: Green’s functions can be a tad bit confusing. The purpose of this post is to provide an overview that will hopefully help you on your math journey. A good list of references on this topic are provided at the end.

#### Motivation and Overview

The goal is to solve an inhomogeneous linear differential equation (DE). Because the equation is linear, the problem can be split into two parts: the inhomogeneous DE with homogeneous boundary conditions and the homogeneous DE with inhomogeneous boundary conditions. These are then summed together to form the overall solution.

The Green’s function handles the first of these problems. The second problem is the well-known Dirichlet Problem. If there are no inhomogeneous boundary conditions, the Green’s function provides the entire solution.

Before we get into the solution technique, it’s useful to understand the history of this Green thingy. The idea first arose in an 1828 paper on electrostatics by amateur physicist George Green in which he made the following brilliant proposition: what if the potential produced by a continuous charge density could be somehow represented as an infinite sum of point charges? Let’s start there.

#### The Point Source

As the name suggests, a point source is one that exists only at a single point yet imparts some constant effect across the system. In electrostatics, this would be a point charge, a fictitious object that possesses a measurable charge and no size. The charge density of this point charge behaves like a Dirac Delta (zero everywhere except at the point itself where it becomes infinite). Finally per Gauss’s Law, the resulting flux through any closed surface that surrounds it remains constant regardless of its radius1See the Dirac Delta post for details on how this relates to delta functions . The point load in mechanics and point heat source in heat transfer behave in a similar manner.

Parallel to the point source is the Green’s Function, which predicts the effect that such a point source will have at each point in the system. A Green’s function is also called an influence function for this reason. An additional requirement for Green’s functions is that the effect of the point source taper to zero at the system boundaries to ensure it aligns with the boundary conditions.

To relate this back to the inhomogeneous differential equation, suppose we have a system under the influence of an external disturbance. For example, the deflection of a cable under load or the temperature distribution in a hot frying pan. Under the right circumstances, a Green’s function can be applied to form a baseline for the system, as described above. The value of any point in the disturbed system is found by first weighting the baseline by the value of the real forcing function at the source point, then repeating this for every source point in the domain and finally summing the results. An example of this is provided in the next section.

The neat thing about having obtained the Green’s function: it applies to any forcing function in that system. In a way, it’s a type of solution engine for arbitrary problems in this domain (the system and its boundary conditions).

There are many important caveats. First, this technique requires the principle of superposition, i.e., the total force on a point is the sum of all forces acting on it, which is only possible when the relationship between the system and the forcing function can be expressed with a linear operator. For example, Poisson’s equation. Or the wave equation or the heat equation.

Second caveat. Most systems don’t give up a Green’s function easily. And when they do, it’s often in the land of toy problems, regions whose boundary geometry is highly symmetric, like a sphere. But in two dimensions those toy geometries can be translated to more complex regions in a way that preserves the solution (The crafty dark art of conformal mappings. More on that in another post). For now, let’s jump into a classic example to better understand what all these words mean.

What follows is a canonical one-dimensional Green’s function problem adapted from [SG]§1.1 and [GBG]§I.4. Most the formulas will be provided not derived for the sake of moving things along. Some of the mathematical details will be provided at the end.

#### The taut cable example

A cable of uniform density and length of $l$ is stretched such that it has an axial tension $T$, i.e., it doesn’t sag. We assume for the sake of simplicity that the cable is massless and thus does not experience any gravitational forces (i.e., toy problem).

Next, subject this cable to a continuous transverse load denoted $P(x)$. This is measured in units of force per unit length, thus the terms “load” and “pressure” are used interchangeably. The load causes displacement in the cable, denoted $u(x)$, as shown below. Our system then is the cable and the forcing function is the load.

It can be shown [MF] that the relationship between load and displacement is described by a second order linear differential equation with homogeneous boundary conditions–the cable is fixed on each end. Specifically, it’s a one-dimensional Poisson’s equation.

$$\begin{eqnarray}-T{d^2 u\over dx^2} = P(x) \,\, \,\, u \in (0,1)\end{eqnarray}$$ $$\begin{eqnarray}u(0) = u(l) = 0\end{eqnarray}$$

Now here’s where it gets interesting. Instead of a continuous load $P(x)$, imagine a point load applied at a single point $\xi$, denoted $\delta(\xi)$. This is the first step in finding our baseline. Recall that load is force per length and that the length of a point is zero. And also recall that a point load is one that’s infinite at this point and zero everywhere else. The resulting force created by this load (remember, load = force/length) is found by integrating across the interval, $F= \int_0^1 P(s)ds$, which by definition is one (“unit load”). Also mentioned earlier, these properties correspond to the delta distribution, which is loosely defined as

$$\begin{eqnarray} \delta(\xi) = \begin{cases} \phantom{-} 0 & \text{if } \xi \ne 0 \\\phantom{-} +\infty & \text{if } \xi=0 \end{cases} \end{eqnarray}$$

$$\begin{eqnarray} \int^{\infty}_{-\infty} \delta(\xi) d\xi = 1 \end{eqnarray}$$

The delta represents the load of a point source: It produces a force of one unit across the entire cable. The corresponding displacement at a point $x$ from this source point at $\xi$ is measured by a Green’s function, denoted $G(x, \xi)$.

This Green’s function displacement adheres to the same differential equation as the continuous load, except here the point load is characterized by a delta distribution. And like the continuous load, the deflection is zero at the endpoints.

$$\begin{eqnarray}-T{d^2 \over dx^2} G(x, \xi)= \delta(x – \xi) \,\, \,\,\,\, x \in (0,1)\end{eqnarray}$$ $$\begin{eqnarray}G(0, \xi) = G(l, \xi) =0\end{eqnarray}$$

Any linear function, $Ax + B$, will satisfy this differential equation except at $\xi$ and so the solution probably needs to be defined in two segments, before and after $\xi$. We also observe that the derivative won’t exist at $\xi$–the delta distribution represents a singularity at that point. But we want our solution to be continuous too (which here just means connected), despite the differential discontinuity at one point. Finally, since the endpoints are zero, the resulting displacement should increase from zero when $x < \xi$ and decrease toward it when $x > \xi$. In other words, it’s some sort of V-shaped function. A graph of such a function is shown below.

Observe that it looks like a thin wire being stretched by a screwdriver, as expected. More precisely, the Green’s function for this problem is described by the following piecewise function or [SJ]:

$$\begin{eqnarray}G(x, \xi) = {x (l – \xi ) \over Tl} x \le \xi\end{eqnarray}$$ $$\begin{eqnarray} \space\space\space\space\space\space\space\space\space\space= {\xi (l – x) \over Tl} & \xi \le x \end{eqnarray}$$

If you rearrange things a bit, an interesting property is revealed [SJ]:

$$\begin{eqnarray}G(x, \xi) = \frac{1}{T}(1 – \frac{\xi}{l})x \space\space\space\space\space\space x \le \xi\end{eqnarray}$$ $$\begin{eqnarray} \space\space\space\space\space\space\space\space\space\space = \frac{1}{T}(1 – \frac{x}{l})\xi \space\space\space\space\space\space \xi \le x \end{eqnarray}$$

Turns out the Green’s function for this problem is symmetric (a.k.a., self-adjoint): $G(x, \xi) = G(\xi, x)$. This will be a useful feature once we start solving equations with a Green’s function.

Important sidebar on units
The units matter here. Per the expression above, the numerator is the product of two distance values and the denominator is the product of force and distance. In total that’s distance per unit force. This means that the displacement at $x_0$ from an arbitrary force, $F_{\xi}$, at the same location, is just $F_{\xi} * G(x_0, \xi)$. Why? Because the Green’s function is normalized for force. To repeat,

The displacement at $x_0$ induced by a force at $\xi$ is the Green’s function $G(x_0, \xi)$ multiplied by that force.

Now let’s see if we can think about the whole picture in terms of this weird Green’s function.

Because the solution is a linear differential equation (Poisson’s equation), we can take advantage of the principle of superposition, which says that these effects add linearly: the effect on a point is the sum of all of the forces acting on it.

Start by dividing the cable into $n$-equal increments of length $l$, the center of which is $\xi_i$. The intervals themselves will be denoted $\Delta \xi_i$. Now within each interval, define a Green’s function whose singularity is located at $\xi_i$. This is shown below.

Next, we approximate the force applied across this interval as the product of the pressure and the interval length: force = pressure * length.

$$\begin{eqnarray} F_{\xi_i} = P(\xi_i) {l \over n} = P(\xi_i) \Delta \xi_i \end{eqnarray}$$

With this, we can now estimate the displacement at point $x_0$ caused by a segment as $G(x_0, \xi_i) P(\xi_i) \Delta \xi_i$.

Finally, by superposition we can estimate the total displacement at $x_0$ caused by the load function $P$ by summing  across the complete set of $n$ intervals.

$$\begin{eqnarray} u(x_0) \approx \sum_n G(x_0, \xi_i) P(\xi_i) \Delta \xi_i \end{eqnarray}$$

Taking the limit as those intervals shrink to zero we get an integral expression for displacement:

$$\begin{eqnarray}u(x_0) = \int_{\Omega}G(x_0, \xi) P(\xi) d\xi\end{eqnarray}$$

The displacement is thus the linear superposition of individual Green’s functions weighted by the load function. Make sense? This was an a-ha moment for me so let it sink in a second.

#### Ok, but more mathy?

The above arguments were a bit hand-wavy, as mathematicians say. But they were important because they provided a heuristic on what we’re trying to accomplish. We can now formally solve the original differential equation.

Start by integrating both sides of this equation to get the following double integral:

$$\begin{eqnarray}-Tu(x) = \int_0^x \int_0^\xi P(s)dsd\xi + C_2x + C_1\end{eqnarray}$$

Then switch the order of integration. To do so, observe the change in the integrand values that results. I have to comment that this switch is not obvious, so it may help to graph the region and compare the two integrands. A great discussion of this can be found in [SL]§9.1. The main motivation is that the load function is now constant with respect to the inner integrand.

$$\begin{eqnarray}= \int_0^x \int_{\xi}^x P(\xi)d\xi ds + C_2x + C_1\end{eqnarray}$$ $$\begin{eqnarray} = \int_0^x (x-\xi) P(\xi)d\xi + C_2x + C_1\end{eqnarray}$$

The boundary conditions determine the values of the constants. $C_1=0$ since $u(0)=0$. Similarly,

$$\begin{eqnarray}C_2 = {-1 \over Tl}\int_0^l(l-\xi)P(\xi)d\xi \end{eqnarray}$$

Now plug this in and split the region between $(0, \xi)$ and $(\xi, l)$. Grouping terms yields:

$$\begin{eqnarray}u(x) = {1 \over Tl} \int_0^x \xi(l – x) P(\xi)d\xi + {1 \over Tl}\int_x^l x(l – \xi) P(\xi)d\xi \end{eqnarray}$$

Hey check it out: the two integrands are just our Green’s function! More generally we have:

$$\begin{eqnarray} u(x) = \int_0^l G(\xi, x) P(\xi) d\xi \end{eqnarray}$$

Which by the symmetry property is also

$$\begin{eqnarray} u(x) = \int_0^l G(x, \xi) P(\xi) d\xi \end{eqnarray}$$

And so we’ve arrived at the same result as with our hand-wavy approach earlier. We could have also obtained a more general expression that includes non-zero boundary conditions if we just left the values as $u(l)$ and $u(0)$. Here’s how the equation turns out with inhomogeneous boundary conditions.

$$\begin{eqnarray} u(x) = u(0)(l – x) + u(l)x + \int_0^l G(x, \xi) P(\xi) d\xi \end{eqnarray}$$

These boundary terms also have a relationship with $G(x,\xi)$ (it’s derivative) but we’ll save that for later.

#### So, are we done?

Nope! In the next post, we’ll generalize this to $n$-dimensions. The math is harder but fortunately the conceptual ideas remain the same.

One more comment before we go. This stretched cable problem is an example of a steady-state problem: there’s no notion of time. If we add the dimension of time, our problem becomes much more interesting (and realistic)2Differential equations that have the dimension of time are called evolution equations.. For example, if our cable is a piano string and the point pressure is a hammer strike then the point pressure is now an impulse, a short-lived punch that causes a wave to propagate along the entire length. Those waves have a frequency and thus the displacement will vary by time. And what about a two-dimensional problem? For example, a drumhead struck by a drum stick. We could study the surface deformations the result, again as a function of time. Either way, Green’s functions remain vital to the solution of these problems.

#### References

[MF] Fowler, M. Physics 152 class notes, University of Virginia. 2002.

[GBG] Greenberg, M. 1971, 2015. Applications of Green’s Functions in Science and Engineering. Dover. 2015.

[SG] Stakgold, I., 1967, Boundary Value Problems of Mathematical Physics, Macmillan.

[SJ] Johnson, S., Math 18.303 class notes. MIT. 2011.

[SL] Shearer, M. Levy, R. Partial Differential Equations: An Introduction to Theory and Applications. Princeton University Press. 2015