FInd the formal solution of $ -[(1-x^2)y']' = \mu y + f(x)$ on $[0,1]$ where $\mu\neq l(l+1)$, $f$ is continuous, $y(0) = 0$, $y, y'$ are bounded as $x$ goes to $1$
I did the first two parts of the problem. One is to derive the Legendre's polynomial by solving $$ -[(1-x^2)y']' = l(l+1)y.$$ We just use the series expansion at the ordinary point $x_0 = 0$, so assume $y = \sum a_n x^n$, plug into the ode then match the powers.
In part two I showed that two different Legendre polynomial are actually orthogonal.
But I am stuck on the third part.
$$(1-x^2)y''-2xy'+\mu y=f(x) \tag 1$$ HINT :
The solution of the homogeneous part of the ODE $(1-x^2)y''-2xy'+\mu y=0$ is : $$y_h(x)=c_1P_{\frac12(\sqrt{4\mu+1}-1)}(x)+c_2Q_{\frac12(\sqrt{4\mu+1}-1)}(x)\tag 2$$ $P$ and $Q$ are the Legendre functions of first and second kind respectively.
The solution of Eq.$(1)$ is equal to $y_h(x)$ plus a particular function of Eq.$(1)$. $$y(x)=y_h(x)+y_p(x) \tag 3$$
Doesn't matter the particular one among the set of particular solutions.
We look for a particular function of the form $$y_p(x)=\phi(x)P_{\frac12(\sqrt{4\mu+1}-1)}(x) \tag 4$$ $$y'_p(x)=\phi'(x)P_{\frac12(\sqrt{4\mu+1}-1)}(x)+\phi(x)P'_{\frac12(\sqrt{4\mu+1}-1)}(x)$$ $$y''_p(x)=\phi''(x)P_{\frac12(\sqrt{4\mu+1}-1)}(x)+2\phi'(x)P'_{\frac12(\sqrt{4\mu+1}-1)}(x)+\phi(x)P''_{\frac12(\sqrt{4\mu+1}-1)}(x)$$ Since $y_p(x)$ is solution of Eq.$(1)$, we put $y_p$ , $y'_p$ and $y''_p$ into Eq.$(1)$.
After simplification, this leads to : $$\phi''(x)=\frac{1}{(x^2-1)P_{\frac12(\sqrt{4\mu+1}-1)}(x)}f(x)$$ $$\phi(x)=\int\int \frac{f(x)}{(x^2-1)P_{\frac12(\sqrt{4\mu+1}-1)}(x)}dx\,dx \tag 5$$ Formally, we should add arbitrary $C_1x+C_2$, but we take $C_1=C_2=0$ since any particular solution is sufficient.
Putting $\phi(x)$ from Eq.$(5)$ into Eq.$(4)$ gives $y_p(x)$ and finally Eq.$(3)$ gives the formal general solution of the ODE $(1)$.