Very general question on how to find the Green's function that satisfies
$$y(x) = \int_a^b G(x,s)f(s)ds$$
For a non-homogeneous PDE problem of the form:
$$L[y(x)] = f(x)$$
In the domain $[a,b]$.
The only definition I have seen so far is:
$$G(x,s) = \frac{y_1(s) y_2(x)}{W(y_1,y_2)(s)}, \frac{y_1(x) y_2(s)}{W(y_1,y_2)(s)}$$ for $s < x$ and $s > x$ respectively, where $W$ is the Wronskian: $$W(y_1,y_2)(s) = y_1(s)'y_2(s) - y_1(s)y_2(s)'$$
And $y_1$ and $y_2$ are the solutions for the Homogeneous equation when setting $f(x) = 0$.
Is this definition general for any first and second order PDEs? If not, what are the constraints? (1D, 2D, ...). Mostly I wonder whenever we do not have two solutions for the homogeneous problem..
For example, the Green function for the Sturm-Liouville Operator L is:
$$G(x,s) = \sum_n \frac{y_n(s) y_n(x)}{\lambda - \lambda_n}$$ Is this definition coherent with the more general above?