I'm not sure if this question is for physics forum, but my book's title is "Green's Functions in Quantum Physics", so I ask here.
The book says that the Green's function defined as
$$ (z-L( \mathbf{r}))G(\mathbf{r},\mathbf{r'};z)=\delta(\mathbf{r-r'}) $$ solves the inhomogeneous differential equation $$ (z-L( \mathbf{r}))u(\mathbf{r})=f(\mathbf{r}) $$ with the "same boundary condition" and it gives the solution $$ u(\mathbf{r})=\int d\mathbf{r'}G(\mathbf{r},\mathbf{r'};z)f(\mathbf{r'}). $$
I think that the third equation is just from by multiplying $f{(\mathbf{r})}$ to first equation and integrating it.
But then, why do we need the statement "with same boundary condition"? I don't see where to use that condition. My book does not prove this and wikipedia link Green function also states this, but no proof. Is there any simple explanation or proof for this?