Given differential equation, $$\tag{I}y''= \sin(\pi x)$$ with boundary conditions \begin{align} \tag{1} y(0)+y(1)&=0\\ \tag{2}y'(0)+y'(1)&=0 \end{align}
Solving the differential equation directly integration and putting the boundary conditions we get the solution $$y=\frac{-\sin(\pi x)}{\pi ^2}$$ Associated homogeneous differential equation $$\tag{II}y''=0$$ has only trivial solution satisfying condition (1) and (2), so the problem has a unique Green's function. We find $$\phi_1(x)=2x-1$$ is solution of (II) satisfying condition (1) and $$\phi_2(x)=1$$ is solution of(II) satisfying condition (2). And the Green's function is, $$G(x,t)=\begin{cases} \frac {2x-1}{2} , &\text{ for }x\leq t \\ \frac {2t-1}{2} , & x\geq t\end{cases}$$ Using this function we get \begin{align} \phi (x) &= \int_0^1G(x,t)(-\sin(\pi t))dt \\ &= \frac {-\sin(\pi x)}{\pi^2} +\frac{1}{\pi}- \frac{x}{\pi} \end{align} as solution of the BVP, which is obviously wrong as it doesn't satisfies boundary condition (1).
Is the question unsuitable for obtaining Green's function, as two boundary conditions are not given as one at $0$ and other at $1$?
Or my method is wrong and there is another method for obtaining Green's function with boundary conditions in such form? I searched some books on Differential equations but couldn't find any such examples.