# What is the idea behind Green's function? What does it do?

I have an exam on ordinary and partial differential equations in a couple of days and there is one concept that I am really struggling with: Green's function. I have basically read every PDF-file on the first ten Pages of google but it just doesn't make any sense to me. Maybe some of you can help me understand the following questions:

What is Green's function exactly? When can I use it to solve differential equations (when shouldn't I use it)? Which differential equations can be solved using this method? Can you maybe show me an example how one would solve an ode or pde using Green's function?

• Wiki says: "The primary use of Green's functions in mathematics is to solve non-homogeneous boundary value problems." Doesn't that somehow satisfies your need? – Mok-Kong Shen Apr 10 '16 at 9:18
• I think that $G (x,x_0)$ is a solution to the pde when the right hand side is a delta function centered at $x_0$ and the boundary conditions are zero. By expressing a general right hand side as a linear combination (integral) of delta functions, you can express a solution to the pde with a general right hand side (and zero BCs) as an integral of $G$. But I hope someone elaborates and provides an enlightening answer. I think that Evans's PDE book doesn't explain the intuition for Green's functions. – littleO Apr 10 '16 at 9:29
• @Mok-KongShen I hope I am not being rude but no, that doesn't really help me at all. It leaves all the other questions I posted above unanswered and it still doesn't provide any explanation of the motivation behind Green's function, how I can apply it, when I should apply it (is it instant go-to method when dealing with non-homogeneous BVP?), does it apply to all kinds of pde's and ode's or only a subset (linear, non-linear etc.). – qmd Apr 10 '16 at 9:30
• only the linear differential equation of the form $\sum_\alpha C_\alpha \partial_\alpha u = f$ where $C_\alpha$ are constants and $\partial_\alpha$ can be $\frac{\partial }{\partial x^k t^m}$ or $\frac{\partial }{\partial x_1}\frac{\partial }{\partial x_2}\frac{\partial }{\partial x_3}$ etc. hence all the finite order partial derivatives, and with only a finite number of terms in $\sum_\alpha C_\alpha \partial_\alpha u$. this is because those equations become algebraic equations when Fourier transformed, hence the solution is given by the CONVOLUTION of $f$ with a certain Green's function. – reuns Apr 10 '16 at 9:47
• In you compare an ODE of the form $\sum_\alpha C_\alpha\partial_\alpha u = f$ with a system of linear equations in matrix form $A x = y$, you will find the operator part of ODE, "$\sum_\alpha C_\alpha$", behaves like the matrix $A$. The difference is that operator adds on some infinite dimensional space. If one want to solve a matrix equation $Ax = y$, one can compute the inverse of $A$ and then obtain $x$ as $A^{-1}y$. In certain sense, the Green's function for an ODE is the inverse for the operator "$\sum_\alpha C_\alpha\partial_\alpha$". – achille hui Apr 10 '16 at 19:45

## 3 Answers

Green's function, also called a response function, is a device that would allow you to deal with linear boundary value problems (in the literature there are also Green's functions for the initial value problem, but let me stick to the most classical picture).

@achillehiu gave a good example. Let me elaborate on it. So, start with a system of linear algebraic equations of the form $$Ax=y.$$ I hope that you have no difficulties in solving this problem. But let me represent the right-hand side as $$y_1e_1+\ldots+y_ne_n,$$ where $y_i$ are the coordinates of vector $y$ and $e_i$ are the standard unit vectors, i.e., the vectors that have ones at the $i$-th position and zeroes everywhere else.

Now, assume that I consider $n$ problems: $$Ax=e_i,\quad i=1,\ldots,n$$ with the solutions $x_i$ (these are vectors, not components). The linearity of the problem immediately implies that the solution to my original problem can be written automatically as $$x=y_1x_1+\ldots+y_nx_n,$$ which has the big name the principle of superposition. That is, having at my disposal $x_1,\ldots,x_n$ I immediately solve any problem with arbitrary $y$.

(I hope you note that I did not discover anything new here since each $x_i$ is just a column of the inverse matrix $A^{-1}$).

The general idea for Green's function is to do something similar for differential equations.

Now, let me consider a boundary value problem with a differential operator: $$Lu=f,\quad u(0)=u(1)=0.$$ I choose $L=-d^2/dx^2$ to keep things as simple as possible. Ideally I would love to do something similar to what I did with the system of linear algebraic equations, now, however, I live in an infinite dimensional space and things are not that easy.

There are various ways to introduce Green's function. Probably the most uninspiring is to show that my boundary value problem is equivalent to the integral equation $$u(x)=\int_{0}^{1}G(x;\xi)f(\xi)d\xi$$ and define this $G$ to be Green's function.

Arguably the most natural way to motivate Green's function is to start with an infinite series of auxiliary problems $$-G''=\delta(x-\xi),\quad x,\xi\in(0,1),$$ $\delta$ is the delta function, and I say that there are infinitely many problems since I have the parameter $\xi$. For each fixed value $\xi$ $G(x,\xi)$ is an analogue of $x_i$ above. The complicated part of this approach is to define what delta-function is (just remark that it is not a function). But let me be a physicist and say that delta function is my model for a unit impulse, such that I can represent my $f$ as a linear combination of the impulses at every point $\xi$ in my interval with the corresponding coefficients, formally (this is the analogue of $y=y_1e_1+\ldots+y_ne_n$): $$f(x)=\int_0^1f(\xi)\delta(\xi-x)d\xi.$$ Now, let me define the Green function as the solution to $$-G''=\delta(x-\xi),\quad G(0,\xi)=G(1,\xi)=0,$$ if I can find this $G$ then my physical intuition and similarity with algebraic problem tells me that my solution to the boundary value problem will be expressed as the required integral. It can be proved that indeed if I can find this $G$ then $$u(x)=\int_0^1G(x,\xi)f(\xi)d\xi$$ as required by the principle of superposition.

Try to look at these two problems and realize the inherent similarity. The only remaining question, of course, is how to find this $G$.

Here is an example of how to find Green's function for the problem I described. Unfortunately, this method will not work for more general differential operator. I will use the fact that $$\int \delta(x-\xi)d x=\chi(x-\xi),\quad \int \chi(x-\xi)dx=\rho(x-\xi),$$ where $\chi$ is the Heaviside function and $\rho$ is the ramp function.

Integrating twice my equation I find $$G(x,\xi)=-rho(x-\xi)+Ax+B.$$ Using the first boundary condition I get $B=0$. From the second one $$A=1-\xi.$$ Therefore $$G(x;\xi)=-\rho(x-\xi)+(1-\xi)x=\begin{cases}(1-\xi)x,&x\leq\xi,\\ (1-x)\xi,&x\geq \xi. \end{cases}$$ You can check that using the function I found the solution to the problem in the comments can be written as $$u(x)=-10\int_0^1G(x;\xi)\xi d\xi.$$

• Thank you for your elaborate answer. I just got home and will try to go through it in the next couple of hours. I will any remaining questions here. Thanks so much again. – qmd Apr 12 '16 at 12:42
• I think I sort of understand it. Could you maybe show me how to solve the following problem using Green's method. Our lecturer just briefly mentions it on one of his slides: $$\frac{1}{2}u''(x)=h(x), \space \space \space h(x)=5x, \space \space \space 0 \le x \le 1, \space \space \space u(0)=u(1)=0$$ – qmd Apr 12 '16 at 21:45
• @qmd What method were you taught to find Green's function? – Artem Apr 13 '16 at 2:46
• As far as I can tell, my teacher used the Ansatz: $$G(x,y) = \begin{cases} c_{11}(y)+c_{12}(y)x, & x<y \\ c_{21}(y)+c_{22}(y)x, &x>y \end{cases}$$ and then he eliminated two of the four free parameters: $$G(0,y)=c_{11}(y)=0 \\ G(1,y)=c_{21}(y)+c_{21}(y)=0 \implies c_{21}(y)=-c_{22}(y)$$ Does this make sense? – qmd Apr 13 '16 at 7:52
• @qmd YEs, it does make sense. See the edit. Try your method to obtsain the same answer. My method is directly related with my explanation, but yours is much more general. – Artem Apr 13 '16 at 12:39

I don't have enough reputation to comment, but in response to OP's request for an ODE example, check out this recent Mathematica blog post which uses Green's function to solve a RLC circuit problem and a wave equation.

$$\newcommand{\abs}{|#1|}$$Green function is the key function in spectral analysis, and it is usually referred to as the integral kernel of the resolvent. For example, given some closed operator $$T$$ in $$L^2(\mathbb{R}^3)$$, for $$z\in \rho(T)$$ (resolvent set) and for $$f\in L^2(\mathbb{R}^3)$$

$$(T-z)^{-1}f(x)=\int_{\mathbb{R}^3}G(x,y;z)f(y)dy$$

where $$G(.,.;z)$$ is the Green function. E.g., when $$T=-\Delta\vert H^2(\mathbb{R}^3)$$ is the "free" Laplace operator, we have $$G(x,y;z)=\exp(-\abs{x-y}\sqrt{-z})/(4\pi\abs{x-y})$$ for almost every $$(x,y)\in\mathbb{R}^6$$ and all $$z\in \rho(T)=\mathbb{C}\backslash[0,\infty)$$.