I know the solution to $y''=1$ with $y(0)=y(1)=0$ should be $y=(x-.5)^2/2$. I need to use Green's function to obtain the same result.
I begin with the definition of Green's function as the solution to the associated equation
$$G'' = \delta(x_0)$$
which I separate into cases $x<x_0$ and $x>x_0$ which have corresponding functions
$$G_1 = c_1+c_2x$$
$$G_2 = c_3+c_4x$$
Applying the boundary condition $G(0)=0=c_1$ we get $G_1 = c_2x$. Applying the other, $G_2(1)=0=c_3+c_4\implies c_4=-c_3$. Enforcing the continuity condition
$$c_2x_0=c_3+c_4x_0=c_3(1-x_0)$$
and enforcing that $G'$ has a jump of 1 at $x_0$
$$-c_3-c_2=1 \implies c_3=-1-c_2$$
Then putting these last two together
$$c_2x_0 = (-1-c_2)(1-x_0)$$
which eventually implies
$$c_2=x_0-1, \qquad c_3=-x_0$$
Now to use what I've found to get the solution to the differential equation is the step where I'm really uncertain, but I think what I'm supposed to do is evaluate the following.
$$\int_0^x(x_0-1)x\ dx_0 + \int_x^1(-x_0)(1-x)\ dx_0$$
which is
$$x(x^2/2-x) + (1-x)\left(-\frac{1-x^2}{2}\right)$$
which I simplify to
$$\frac{-x^2+x-1}{2}$$
which, although close, is not the right answer. Noteworthy is that its derivative is $-1$ and it does not quite satisfy the boundary conditions.
$G_1(x,s)=c_1x+c_2$ when $x\leq s$ with $G_1(0, s)=0$ and $G_2(x,s)=d_1x+d_2$ when $x>s$ with $G_2(1, s)=0$ and form $G(x, s)=G_1(x,s)$ if $x\leq s$ and $G(x, s)=G_2(x,s)$ if $x>s$. Using boundary conditions for $G_1$ and $G_2$ we have $G_1(x, s)=c_1x$ and $G_2(x,s)=d_1(x-1)$. We determine $c_1$ and $d_1$ by using continuity of $G$ and jump of the derivatives at $s$. You eventually find that $G_1(x, s)=x(s-1)$ if $0\leq x\leq s$; $G_2(x,s)=s(x-1)$ if $s<x\leq 1$ and so $y(x)=\int_0^1G(x,s)ds= \int_0^xG_2(x,s)ds+\int_x^1G_1(x,s)ds= \int_0^xs(x-1)ds+\int_x^1x(s-1)ds=\frac{x^2(x-1)}{2}-\frac{x(x-1)^2}{2}=\frac{x(x-1)}{2}$.
This is the same solution as I said in the beginning of the comments. What a boring simle problem. After many efforts and comments:)