I'm in the process of understanding Sturm-Liouville theory and I was reading this example Sturm-Liouville example from wikipedia.
I don't understand why they solve $Lu=x$, like where does this come from?
Given the preceding, let us now solve the inhomogeneous problem $Lu=x, \ x\in(0,\pi)$
When the original problem is finding an eigenfunction $u$ to the problem $Lu:=u''=\lambda u$
I see that functions of the type $\sin(kx)$ are solutions with $\lambda=-k^2$ but I don't see how this step fits into the reasoning, it seems to come from nowhere (though it does work in the end, I realize that)
Because the homogeneous solution can be used to make inhomogeneous solution. In the article, (Wikipedia you linked) they delve into homogeneous problem $Lu=(\frac{d^2}{dx^2}-\lambda)u=0$ first, (I guess you misread this part, since they changed the semantic for the operator) then used this result to solve $Lu=(\frac{d^2}{dx^2}-\lambda)u=x$.
Does this make sense?