First some general definitions from the GreenSL.mws worksheet:

> Grf:=(x,s)->piecewise(s>=0 and s <=x,v1(x)*v0(s),x<=s and s<=1,v0(x)*v1(s));

[Maple Math]

> with(linalg):

Next we need to find solutions v0 and v1 to the homogenous equation u''(x) + u(x) = 0, such that v0 satisfies the boundary condition on the left v0(0)=0 and v1 satisfies the boundary o condition on the right v1(1) = 0. Also p det W=-1, here p=1. We claim that these are:

> v0:=x->a*sin(x);

[Maple Math]

> v1:=x->b*sin(1-x);

[Maple Math]

Verification of the ODE:

> diff(v1(x), x$2) + v1(x); diff(v0(x), x$2)+v0(x);

[Maple Math]

[Maple Math]

Verification of the boundary conditions:

> v0(0); v1(1);

[Maple Math]

[Maple Math]

The Wronskian:

> W:=wronskian([v0(x),v1(x)],x);

[Maple Math]

> W:=combine(expand(det(W)), trig);

[Maple Math]

The condition for the wronskian is satisfied if we choose:

> a:=1; b:=1/sin(1);

[Maple Math]

[Maple Math]

Now the Green's function for this problem is:

> G:=Grf(x,y);

[Maple Math]

> with(plots):

> plot3d(G(x,y),x=0..1,y=0..1,axes=boxed);

>