Firstly, I must admit I cannot see why on earth someone would want to solve anything (...other than a two-point BVP...) by using the Green's function method.

Ok, so we are looking for a symmetric function to satisfy

where I took the liberty of setting [0,2] as the domain, but this is inessential as we can modify the Green's function and get the domain as large as we like.

For , we have , so solves the IVP. and we have the liberty to define G any way we like.

For , the IVP has the solution . So we demand

(1)

Since G has to be symmetric, write

and observe that (1) is satisfied for . Define G this way on . So we get the solution of the IVP as

.