Introduction to Green's Functions

By Joshua Samani on

In this post, we will introduce Green's functions as a tool for solving ordinary differential equations. Green's functions allow us to convert differential equations that we don't know how to solve into integral equations that we do know how to solve. Let's see how this works by diving into an example. We consider a physics problem that one might encounter in a kinematics course.

Alice is driving from work back home on a long, straight road on a very dark night, so she can't see how far she has driven just by looking out the window. Nonetheless, the lights illuminating her clock and speedometer still work, so she can see how fast she is going at any given time. If Alice's work is located at position x_a along the road, and if she leaves work at time t_0, then can Alice use the information from her clock and speedometer to determine her position along the road at a given time t>t_a?

The answer to this question is yes and amounts to Alice needing to solve a certain differential equation. To see this, let x(t) denote Alice's position as a function of time along the road, and let v(t) denote her velocity as a function of time. Alice knows v(t) because she can determine her velocity at any time t by looking at her speedometer and clock, but she doesn't know x(t). However, Alice knows that the derivative of her position with respect to time is equal to her velocity at that time. This fact can be mathematically written as

(1)   \begin{align*} x'(t) = v(t) \end{align*}

and the fact that she left work, which is located at x_0, at time t_0 can be mathematically written as

(2)   \begin{align*} x(t_a) = x_a. \end{align*}

Therefore, to determine x(t), Alice needs to solve the first order differential equation above subject to this initial condition. In math, solving such a differential equation subject to an initial conditions is called an "initial value problem" for this reason. You may already know how to solve this equation without using Green's functions, but we want to use Green's functions here to explain how they arise in a simple example. Here's how we proceed.

First, for each real number t, we find a function G_t that has the following property

(3)   \begin{align*} G_t'(\tau) = \delta(\tau-t) \end{align*}

where \delta is the Dirac delta function. I've used a "G" to label this function because G turns out to be an example of a Green's function. I won't get into how we find such a function just yet because I want to show you how it would be useful first. Next, let t_b>t_a be given, and notice that given any t satisfying t_a<t <t_b we have

(4)   \begin{align*} \int_{t_a}^{t_b} d\tau\, G_t'(\tau) x(\tau) = \int_{t_a}^{t_b} d\tau\,\delta(\tau-t) x(\tau) = x(t). \end{align*}

The integral on the left can be integrated by parts to give

(5)   \begin{align*} \int_{t_a}^{t_b} d\tau\,G_t'(\tau) x(\tau) &= G_t(\tau)x(\tau)\Big|_{\tau=t_a}^{\tau=t_b}-\int_{t_a}^{t_b} d\tau\, G_t(\tau) x'(\tau) \notag\\ &= G_t(\tau)x(\tau)\Big|_{\tau=t_a}^{\tau=t_b}-\int_{t_a}^{t_b} d\tau\, G_t(\tau) v(\tau) \end{align*}

Putting these two facts together, and evaluating the boundary term coming from integration by parts at the endpoints t_a and t_b, we get

(6)   \begin{align*} x(t) = G_t(t_b)x(t_b)-G_t(t_a)x(t_a)-\int_{t_a}^{t_b} d\tau\, G_t(\tau) v(\tau) \end{align*}

Since we were originally given the initial value x(t_a)=x_a of x but don't know its final value x(t_b) for a given t_b>t_a, it would be helpful G also satisfied the following condition:

(7)   \begin{align*} G_t(t_b) = 0, \qquad \text{$t_b>t_a$} \end{align*}

We will see soon that it is always possible to pick G in this way, so we assume that this has been done and that therefore, the equation for x reduces to

(8)   \begin{align*} x(t) = -G_t(t_a)x_a-\int_{t_a}^{t_b} d\tau\, G_t(\tau) v(\tau) \end{align*}

In the beginning, I said that Green's functions can be used to convert differential equations into integral equations that we know how to solve. If we were to have an explicit form for G_t, then we would have achieved this because we have written an integral equation in which x(t) is written as a expression involving integrals of known functions G_t and v. This integral may still be hard to perform in practice, but at least we have solved for x in principle.

We now turn to the question of how we determine an explicit expression for G_t. In particular, we are looking for G_t that satisfies

(9)   \begin{align*} G_t'(\tau) &= \delta(\tau-t), \qquad G_t(t_b)=0 \quad \text{for $t_b>t$}. \end{align*}

Recall that if t\neq \tau, then \delta(\tau-t) = 0, so the differential equation satisfied by G gives

(10)   \begin{align*} G_t(\tau) = 0 \qquad \text{for all $\tau\neq t$}. \end{align*}

This implies that G_t(\tau) is constant in both the region \tau>t and in the region \tau</t><t. These constants must be different because otherwise the derivative of G_t at \tau=t would not be infinite as is necessary for it to behave like a delta function. Thus, there are real numbers c_< and c_> with c_< \neq c_> such that

(11)   \begin{align*} G_t(\tau) = \left\{ \begin{array}{cc} c_< & \tau<t \\ c_> & \tau>t \end{array}\right. \end{align*}

In other words, we see that for a given t, plotting G_t(\tau) as a function of \tau gives a step function that jumps from the value c_< for \tau<t to the value c_> for \tau>t. A nice, compact way of writing this is

(12)   \begin{align*} G_t(\tau) = (c_>-c_< )\theta(\tau-t) + c_<. \end{align*}

where \theta(t) is the Heaviside step function defined as

(13)   \begin{align*} \theta(t) = \left\{ \begin{array}{cc} 1 & t>0 \\ 0 & t\leq 0 \end{array}\right. \end{align*}

The condition G_t(t_b) = 0 for t_b>t applied to our latest expression for G_t gives

(14)   \begin{align*} 0 = G_t(t_b) = (c_>-c_< )\theta(t_b-t) + c_< = c_> \end{align*}

so c_> = 0. Using this and the fact that the derivative of the Heaviside step function is the Dirac delta;

(15)   \begin{align*} \theta'(t) = \delta(t) \end{align*}

we get

(16)   \begin{align*} G_t'(\tau) = -c_< \delta(\tau-t) \end{align*}

which means that c_<=-1 by our original equation G_t'(\tau) = \delta(\tau - t). Putting this together gives

(17)   \begin{align*} G_t(\tau) = \theta(\tau-t)-1. \end{align*}

If we plug this into the integral equation we got for x(t), then we find

(18)   \begin{align*} x(t) = -[\theta(t_a-t)-1]x_a-\int_{t_a}^{t_b} d\tau\, [\theta(\tau-t)-1] v(\tau) \end{align*}

which for any t_a<t<t_b gives

(19)   \begin{align*} x(t) = x_a+\int_{t_a}^{t} d\tau\, v(\tau) \end{align*}

This is precisely the solution you would have obtained if you were to have integrated both sides of our original differential equation from t_a to t. Although that method of direct integration would be much simpler for this differential equation, there are instances of other differential equations where such direct integration is not possible, and Green's functions become very useful.

At this point, I'd like to try and help the reader develop some physical intuition for the Green's function we just derived. Let us think of G_t(\tau)=\theta(\tau - t)-1 as the position of an object as a function of \tau. Then for all times \tau<t, the object is just sitting still at x=-1, then at time t, the position of the object jumps discontinuously from -1 to 0, and for all times \tau>t, the object is standing still again. This would happen if somehow that object could instantaneously accelerate from zero velocity to infinite velocity precisely when \tau has value t, and then instantaneously decelerate back to zero velocity. You might think of this as a spaceship that fires it's rear thrusters on full blast very abruptly and for a very short period of time, moves a certain amount essentially instantaneously, and then very abruptly fires its front thrusters to stop essentially instantaneously.

Last updated: February 9, 2013

9 comments

  1. Hi Joshua,

    I like this article :-)

    Could you explain on your blog, what mathematical prerequisits are needed to understand string theory and then give, in some kind of an ongoing series of blog articles, nice introductions to these mathematical topics including links to further (introductary and advanced) references for the very curious and interested readers? Of course such introductory articles to important mathematical concepts are most fun to read, when they already include hints at what cool physics things can be done with the stuff ... :-)

    On physics SE all questions asking about the mathematical prerequisits to study string theory get closed before they have obtained a nice answer :-/

    • @Dilaton Yeah I can definitely give my opinion on what road one can take to learn the math for strings and theoretical physics in general. Perhaps I'll make a separate page for book recommendations and online resources etc. I definitely plan to write ongoing series' of articles essentially as you describe. I started with Green's functions because they are ubiquitous in physics (especially in quantum field theory where they become a truly fundamental object), and I plan to run with Green's functions for a while. You ongoing comments and suggestions about the exposition will always be appreciated! Cheers!

      • Thanks Joshua,

        I look forward to see your site evolving!
        The Green's functions actually come in for me quite handy too :-D.

        Your posts on physics SE and what you plan to do here is very helpful.

        Cheers

      • Sorry Joshua for picking at you again,

        but your view about learning math for strings, and some good book recommendations for theoretical physics will be actually very needed. David Zaslavsky actually said in chat that such information (about books or mathematical prerequisits) will for SE policy reasons no longe be allowed to be asked. He says such information, even though it would be valuable to many physicists, does not have to be on the site. Some information could go into the tag wikis, but honestly who is writing such extended tag wikis...?

        So I look forward very much to what you will do in the course of time :-)

        Cheers

        • Dilaton. I'm working on this as we speak. I've changed the page where I'll post my notes into a page with physics/maths resources in general. On this page, I'll attempt to include recommendations like those you requested. Please leave comments on that page if you have suggestions for the sorts of materials I should start posting there.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>