1. ## Green function

solve the next differential equation:

$\displaystyle y´´- a*y= \delta (x-d)$

with the boundary conditions:

$\displaystyle \left.\frac{\partial y}{\partial x} \right|_ {x=0} = 0$

$\displaystyle y(x)\rightarrow 0 \hbox{ as } x\rightarrow \infty.$

I get the homogeneous solution: $\displaystyle y_H = C_1 exp (\sqrt{a}x) + C_2 exp (-\sqrt{a}x)$

Now, I have to obtain two solutions $\displaystyle u_1(x)$ and $\displaystyle u_2(x)$ which satisfy one of the two boundary conditions.
I have done the next:

1. $\displaystyle y=0 \rightarrow y_H = C_1 + C_2 \rightarrow C_1 = C_2 \rightarrow$
$\displaystyle C_1 [exp (\sqrt{a}x) + exp (-\sqrt{a}x)] = cosh (\sqrt{a}x) = u_1(x)$

2. $\displaystyle y= \infty \rightarrow y_H = C_2 exp (-\sqrt{a}x)= 0 \rightarrow u_2(x)=exp (-\sqrt{a}x)$

But I am not sure if this is correct.

2. $\displaystyle y'' - ay = \delta \left( {x - d} \right)$

what the delta function does is to change the initial conditions for x = d.

for x < d we have a homogeneous ODE with I.C.: $\displaystyle y'(x = 0) = 0$

which gives us the solution you already found: $\displaystyle C\cosh \left( {\sqrt a x} \right)$

now I'm going to use something called impulse balancing (I'm not sure what's it's formal name), the main idea of this method is that in order for the equality to hold with the delta function on the right side the highest order derivative has to "absorb" the delta function, the following step is to integrate the ODE in the place where there is an impulse:

$\displaystyle \int\limits_{x = d^ - }^{x = d^ + } {y'' - aydx = } \int\limits_{x = d^ - }^{x = d^ + } {\delta (x - d)dx}$

now because the second derivative is the delta function y itself is the ramp function and therefore it is continues and the integral on ay vanishes:

$\displaystyle y'(d^ + ) - y'(d^ - ) = 1 \to y'(d^ + ) = y'(d^ - ) + 1$

thus for x > d we have again the same homogeneous equation but with different I.C.:

$\displaystyle \begin{gathered} y'(d^ - ) = \frac{d} {{dx}}\left. {C\cosh \left( {\sqrt a x} \right)} \right|_{x = d} = C\sqrt a \sinh \left( {\sqrt a d} \right) \hfill \\ \hfill \\ thus \hfill \\ \hfill \\ y'(d^ + ) = 1 + C\sqrt a \sinh \left( {\sqrt a d} \right) \hfill \\ \end{gathered}$

and $\displaystyle y(x \to \infty ) = 0$

the constant of the positive exponential must be 0 if we want the solution to decay to 0 at infinity thus we are left with:

$\displaystyle y(x) = Ke^{ - \sqrt a x}$

now applying the seconf I.C. of the derivative (considering x=d as the starting point x=0):

$\displaystyle \begin{gathered} \frac{d} {{dx}}\left. {Ke^{ - \sqrt a x} } \right|_{x = 0} = 1 + C\sqrt a \sinh \left( {\sqrt a d} \right) \hfill \\ \hfill \\ \leftrightarrow - \sqrt a K = 1 + C\sqrt a \sinh \left( {\sqrt a d} \right) \hfill \\ \hfill \\ \leftrightarrow K = - \frac{1} {{\sqrt a }}\left[ {1 + C\sqrt a \sinh \left( {\sqrt a d} \right)} \right] \hfill \\ \end{gathered}$

so the final solution is:

$\displaystyle y(x) = \left\{ \begin{gathered} C\cosh \left( {\sqrt a x} \right)\quad x < d \hfill \\ - \frac{1} {{\sqrt a }}\left[ {1 + C\sqrt a \sinh \left( {\sqrt a d} \right)} \right]e^{ - \sqrt a x} \quad x > d \hfill \\ \end{gathered} \right.\quad$

3. ## Green function

Thank you very much for your explanation, it was very useful. I have not any problem to obtain it. Thanks