Proposition (Green's function from linearly independent solutions)
Let $L = \alpha \dd[2]{x} + \beta \dd{x} + \gamma$ be a second-order linear differential operator with $\alpha(x)\neq 0$ on $(a,b)$. Suppose $y_1$ and $y_2$ be linearly independent solutions to $Ly=0$ such that $y_1(a) = 0$ and $y_2(b)=0$.
Then the Dirichlet Green's function for $L$ on $(a,b)$ is $$ \begin{align*} G(x;\xi) = \frac{1}{\alpha(\xi) W(y_1,y_2)(\xi)} \begin{cases} y_1(x)y_2(\xi), &a<x<\xi, \\ y_1(\xi) y_2(x), &\xi<x<b \end{cases} \end{align*} $$ where $W(y_1,y_2)=y_1y_2' - y_1'y_2$ is the Wronskain.
-
Therefore we can solve an inhomogenous problem $$ \begin{align*} y(x) = \int_{a}^{x} \frac{y_1(\xi) y_2(x) f(\xi)}{\alpha(\xi) W(y_1,y_2)(\xi)} \d \xi + \int_{x}^{b} \frac{y_1(x)y_2(\xi)f(\xi)}{\alpha(\xi) W(y_1,y_2)(\xi)} \d \xi. \end{align*} $$
-
For $L$ being Sturm-Liouville:
-
We can absorb $w$ into $f$ so WLOG assume $w=1$.
-
We use the identity $(pW(y_1,y_2))' = y_2 L y_1 - y_1 L y_2$ and $Ly_1 = 0 = Ly_2$ to see $$ \begin{align*} y(x) = -\frac{1}{p(c) W(y_1,y_2)(c)} \left(y_2(x) \int_{a}^{x} y_1(\xi)f(\xi) \d \xi + y_1(x) \int_{x}^{b} y_2(\xi) f(\xi) \d \xi\right) \end{align*} $$ for any $c\in (a,b)$.
-