Small doubt Green's functions I have this problem:
$$Ly=-y''-y$$
with initial conditions:  $y(0)=y(1)=0$
I started to solve the problem as follows:
The Green's function operator is defined as the linear solution
$$-g''(x)-g(x)=\delta(x-s)$$
If $x\neq s$ the delta function vanishes, and the general solution is:
$$g(x,s)=C_1\cos(x)+ C_2 \sin(x)$$ 
For $x<s$ the boundary condition $x=0$ implies that:
$$G(0,s)=C_1\cdot 1+C_2\cdot 0 \implies C_1=0$$
The condition given by $G(1,s)$ is ignored because we are considering $x < s < 1$. 
For $x>s$ the boundary condition in $x=1$ implies:
$$G(1,s)=C_3\cos1+C_4\sin1=0$$
In summary, the result so far is
$$G(x,s)=\begin{cases} C_2 \sin(x) & x<s\\ C_3\cos(x)+C_4\sin(x)& s<x\end{cases}$$
My problem is from here to get the solution I have in my book is:
$$G(x, s)=\frac{1}{\sin1}\begin{cases}\sin(x)\sin(1-s)& 0\leq x\leq s \\
\sin(1-x)\sin(s) & s\leq x\leq 1\end{cases}$$
thanks for All and Any HELP 
 A: Observe first that in the region $x > s$ a different way of writing the general solution $g'' + g = 0$ is asking
$$ g(x,s) = C_3 \cos (1-x) + C_4 \sin(1-x) $$
Evaluating at $x = 1$ the boundary conditions give that $C_3 = 0$. 
What you need next is to make use of the boundary condition at $s$. In particular, to get the $\delta$ function at $s$, you need that $g'(x,s)$ is discontinuous at $x = s$, with a jump of size $-1$. On the other hand, we also need that $g$ is continuous, so that no other factors of $\delta$ creeps in. 
Computing we have
$$ \lim_{x \nearrow s} g'(x,s) = C_2 \cos(s) \qquad \lim_{x \searrow s} g'(x,s) = -C_4 \cos(1-s) $$
and
$$ \lim_{x\nearrow s} g(x,s) = C_2 \sin(s) \qquad \lim_{x\searrow s} g(x,s) = C_4 \sin(1-s) $$
so we need that
$$ \begin{align}
C_2 \sin(s) - C_4 \sin(1-s) &= 0\tag{continuity} \\
C_2 \cos(s) + C_4 \cos(1-s) &= 1 \tag{jump condition}\end{align} $$
Solving the algebraic equation and using that 
$$ \sin (a+b) = \sin a \cos b + \sin b \cos a $$
you find that
$$ C_2 = \frac{\sin(1-s)}{\sin 1} \qquad C_4 = \frac{\sin(s)}{\sin 1} $$
