TITLE: The Green’s function of the boundary value problem
QUESTION [5 upvotes]: What is the Green’s function of the boundary value problem 
$$
\frac{\mathrm d^2 y}{\mathrm d x^2}-\frac{1}{x}\frac{\mathrm dy}{\mathrm dx}=1,\quad y(0)=y(1)=0,
$$
this boundary problem is not self adjoint, so please help me how to solve it.

REPLY [5 votes]: First note that the solution to the homogeneous problem is
$y(x) = a + b x^2.$
We wish to solve 
$$\begin{equation*}
\frac{d^2}{dx^2}G(x,t) - \frac{1}{x} \frac{d}{dx} G(x,t) = \delta(x-t),\tag{1}
\end{equation*}$$
where $G$ satisfies the boundary conditions
$G(0,t) = G(1,t) = 0$. 
Therefore, 
$$G(x,t) = 
\begin{cases} 
a(t)x^2, & x<t \\ 
b(t)(1-x^2), & x>t. 
\end{cases}$$
Integrating (1) from $t-\epsilon$ to $t+\epsilon$ we find the jump condition
$$\left.\frac{d}{dx}G(x,t)\right|_{x=t+\epsilon} 
- \left.\frac{d}{dx}G(x,t)\right|_{x=t-\epsilon} = 1.$$
Integrating once more we find the continuity condition
$$\left.G(x,t)\right|_{x=t+\epsilon}
- \left.G(x,t)\right|_{x=t-\epsilon} = 0.$$
These two conditions determine $a(t)$ and $b(t)$. 
After a little work one finds
$$G(x,t) =
\begin{cases}
\displaystyle\frac{(t^2-1)x^2}{2t}, & x<t \\
\displaystyle\frac{(x^2-1)t}{2}, & x>t.
\end{cases}$$
Finally, we can use $G$ to solve the inhomogeneous problem, 
$$y(x) = \int_0^1 dt\, G(x,t) = \frac{1}{2}x^2\log x.$$
This is the solution found by @Marvis. 
Although it is often used, I don't remember ever seeing the above method given a proper name.
I call it the jump method.
There are at least two other common approaches to getting Green's functions. 
One involves an eigenfunction expansion and the other the fundamental solution.