The general solution has LegendreP and LegendreQ polynomials. I would investigate some special cases, like k = 0, or lambda = 0, and see what you get then. Also note that the LegendreP functions already are polynomials. The LegendreQ functions have other functions like logarithms inside them.