Computing a Green's function - where did I go wrong?

156 Views Asked by At

This is from a homework problem that was recently returned to me in a numerical analysis course. The grader even noted that he didn't know where I went wrong but the solution was marked as incorrect. Here's the problem and the solution I gave for it (with minor adjustments). I have no idea what is wrong with this derivation. It's most likely something silly like a sign change. Someone please enlighten me.

Problem

Consider the following boundary value problem:

$$ -u''(x) = f(x),\; x \in (a, b),\;u(a) = u(b) = 0 $$

where $a < b$ are given real numbers. Find the Green's function for this problem; i.e. find a function $G = G(x, y)$ such that the solution of the boundary value problem can be written in the familiar way

$$ u(x) = \int_a^b G(x, y)f(y)dy $$

Solution

We wish to find a function $G = G(x, y)$ such that $\frac{\partial^2 G}{\partial x^2} = G_{xx}(x, y) = -\delta(x - y)$, where $\delta$ is the Dirac delta functional distribution. Let the function $H$ be defined as follows:

$$ H(x) := \int_{-\infty}^x \delta(x) $$

Observe that $H(x - y) = -G_x(x, y)$. The following limit applies:

$$ \lim_{x \to y^-} G_x(x, y) \;-\; \lim_{x \to y^+} G_x(x, y) = 1 $$

We want $G$ to be continuous at $y$ so have $\lim_{x\to y^+} G(x, y) = \lim_{x\to y^-} G(x, y)$

Use the boundary conditions to construct $G(a, y) = G(b, y) = 0$. We then get the following:

$$ G(x, y) = \begin{cases} k_1(x - a) & \mathrm{if} & x \geq y \\ k_2(x - b) & \mathrm{if} & x < y \end{cases} $$

The constants must satisfy the following conditions.

$$ k_2 - k_1 = 1 \qquad\qquad k_1(y - a) = k_2(y - b) \qquad\qquad k_2(b - a) = y - a $$

$$ k_2 = \frac{y - a}{b - a} \qquad\qquad k_1 = \frac{y - b}{b - a} $$

This gives us the following Green's function:

$$ G(x, y) = \begin{cases} \frac{(y - b)(x - a)}{b - a} & \mathrm{if} & a \leq y \leq x \\ \frac{(y - a)(x - b)}{b - a} & \mathrm{if} & x \leq y \leq b \end{cases} $$