How to show Legendre Operator $L_{m}=-\frac{d}{dx}(1-x^{2})\frac{d}{dx}+\frac{m^{2}}{1-x^{2}}$ is Selfadjoint? Let $m$ be a positive integer and define
$$
              Lf = -\frac{d}{dx}(1-x^{2})\frac{df}{dx}+\frac{m^{2}}{1-x^{2}}f
$$
on the domain $\mathcal{D}(L)\subset L^{2}(-1,1)$ consisting of all twice absolutely continuous functions $f \in L^{2}(-1,1)$ for which $Lf \in L^{2}(-1,1)$. How can it be shown that
$$
    f \in \mathcal{D}(L) \implies \sqrt{1-x^{2}}f',\frac{1}{\sqrt{1-x^{2}}}f\in L^{2},
$$
with
$$
          (Lf,g) = (\sqrt{1-x^{2}}f',\sqrt{1-x^{2}}g')+(\frac{mf}{\sqrt{1-x^{2}}},\frac{mg}{\sqrt{1-x^{2}}})=(f,Lg)
$$
for all $f,g\in\mathcal{D}(L)$?
Note: If $\mathcal{C}_{0}^{\infty}(-1,1)$ is the space of compactly supported infinitely differentiable functions on $(-1,1)$, then the restriction $L_{0}$ of $L$ to $\mathcal{D}(L_{0})=\mathcal{C}_{0}^{\infty}(-1,1)$ has adjoint $L_{0}^{\star}=L$. Therefore, if $L$ is symmetric on its domain, then $L=L^{\star}$ because
$$
\begin{align}
 L_{0} \preceq L \preceq L^{\star}
    & \implies L=L^{\star\star} \preceq L^{\star} \preceq L_{0}^{\star}=L \\
    & \implies L=L^{\star}.
\end{align}
$$
 A: Hint. I think the following should work. 
Let $$t_0[f,g]=(\sqrt{1-x^{2}}f',\sqrt{1-x^{2}}g')+(\frac{mf}{\sqrt{1-x^{2}}},\frac{mg}{\sqrt{1-x^{2}}})$$ be defined on the $\mathcal{C}_{0}^{\infty}(-1,1)$. Consider the closure $t[f,g]$ of the form $t_0[f,g].$ By the theory of quadratic forms there exists a positive self-adjoint operator $\widetilde L$ associated with $t[f,g]$. Show that $L=\widetilde L$. Both of your questions are easily solved for $f,g\in\mathcal D[L]$ (the domain of the form $t$). Since $\mathcal D(L)\subseteq\mathcal D[L]$ it solves your problem.
A: Nobody has posted a complete solution yet. If someone does, I'll choose an answer other than my own. This approach is brute force Calculus, but the technique is fairly general for Sturm-Liouville equations. The same method can be used to analyze the ordinary Legendre case where $m=0$, even though the results are very different: Selfadjoint Restrictions of Legendre Operator $-\frac{d}{dx}(1-x^{2})\frac{d}{dx}$
This Associated Legendre case is where $m =1,2,3,\cdots$, though the arguments below work for real $m > 0$, too. It is noteworthy that the conditions $f, L_{m}f\in L^{2}(-1,1)$ impose asymptotics on the behavior of $f$ near $\pm 1$, and these asymptotics are what make the integration-by-parts evaluation terms vanish and give the stated integral identities.
Eigenfunctions: Direct Sturm-Liouville techniques of this type must necessarily focus on $L^{2}$ eigenfunctions. In this case, $\phi_{m}(x)=(1-x^{2})^{m/2}$ is in $\mathcal{D}(L)$ and $L\phi_{m}=m(m+1)\phi_{m}$. The other classical eigenfunction, which may be obtained by variation of parameters, is not in $L^{2}$ near either endpoint of $[-1,1]$. What comes out of the analysis below is that $f\in\mathcal{D}(L_{m})$ is asymptotic to $f(0)\phi_{m}$, and $f'$ is asymptotic to $f(0)\phi_{m}'$ near the endpoints of $[-1,1]$; and that's enough to force the vanishing of the integration-by-parts evaluation terms for $m > 0$.
The Lagrange Identity for $L$ is
$$
\begin{align}
    (Lf)g - f(Lg) & = -((1-x^{2})f')'g+f((1-x^{2})g')' \\
                  & = \{ (1-x^{2})(fg'-f'g)\}'.
\end{align}
$$
Let $f \in \mathcal{D}(L)$ and let $g = \phi_{m}$. Applying the Lagrange identity gives
$$
        \{Lf-m(m+1)f\}\phi_{m} = \frac{d}{dx}\left(-mx(1-x^{2})^{m/2}f-(1-x^{2})^{m/2+1}f'\right).
$$
Obtaining Asymptotics using Above Identity: The left side is the product of two $L^{2}$ functions and, hence, is absolutely integrable on $(-1,1)$. So the right side is integrable on $(-1,1)$ as well, which gives the existence of the following limits:
$$
                \Phi_{\pm}(f) = \lim_{x\rightarrow\pm 1}\left(-mx(1-x^{2})^{m/2}f-(1-x^{2})^{m/2+1}f'\right).
$$
Consider the case of $\Phi_{+}(f)$ and the behavior of $f$ and $f'$ near $x\approx +1$ (the case of $x\approx -1$ is essentially the same.) Integrating over $[x,1]$ gives
$$
    mx(1-x^{2})^{m/2}f+(1-x^{2})^{m/2+1}f'+\Phi_{+}(f) \\
      =\int_{x}^{1}\{Lf-m(m+1)f\}\phi_{m}du.    \;\;\;\;(\dagger)
$$
The right side is $C(x)(1-x)^{m/2+1/2}$ where $\lim_{x\rightarrow \pm 1}C(x)=0$, which is easily obtained from the Cauchy-Schwarz inequality applied to $\phi_{m}$ and to the remaining quantity in braces. Hence, multiplying by $(1-x^{2})^{-m-1}$ gives
$$
        \{(1-x^{2})^{-m/2}f\}'=\frac{\Phi_{+}(f)}{(1-x^{2})^{m+1}}
        -\frac{C(x)}{(1-x)^{m/2+1/2}}.
$$
Integrating in $x$ over $[0,y]$ and multiplying by $(1-x^{2})^{m/2}$ gives
$$
   f(y)=\left[f(0)+\int_{0}^{y}\frac{\Phi_{+}(f)}{(1-x^{2})^{m+1}}dx-\int_{0}^{y}\frac{C(x)}{(1-x)^{m/2+1/2}}dx\right](1-y^{2})^{m/2}
$$
Because $f \in L^{2}$ is assumed, it must be the case that $\Phi_{+}(f)=0$, which leads to the asymptotic
$$
         f(y) = f(0)(1-y^{2})^{m/2}+D(y)\sqrt{1-y},
$$
where $D(y)$ is bounded for $y \approx 1$. Returning to equation $(\dagger)$,
$$
\begin{align}
     f'(y) & = -my\frac{f(y)}{1-y^{2}}+\frac{1}{(1-y^{2})^{m/2+1}}\int_{y}^{1}\{ Lf-m(m+1)f\} \phi_{m}du \\
         & = -my\frac{f(y)}{1-y^{2}}+\frac{C(y)}{\sqrt{1-y}} \\
         & = -f(0)my(1-y^{2})^{m/2-1}+\frac{E(y)}{\sqrt{1-y}}
\end{align}
$$
Therefore, the following vanishes at $y=1$:
$$
           (1-y^{2})f(y)f'(y) = -myf(0)^{2}(1-y^{2})^{m}+O((1-y)^{m/2+1/2}).
$$
Similarly, if $f$ and $g$ are in the domain of $L_{m}$, then the following vanish at $y=\pm 1$:
$$
             (1-y^{2})f(y)g'(y),\;\; (1-y^{2})f'(y)g(y)
$$
By Lagrange's identity,
$$
             (L_{m}f,g) = (1-x^{2})(fg'-f'g)|_{-1}^{1} + (f,L_{m}g) = (f,L_{m}g).
$$
And,
$$
\begin{align}
     (L_{m}f)f & = \left(-\frac{d}{dx}(1-x^{2})\frac{df}{dx}\right)f + \frac{m^{2}}{1-x^{2}} \\
               & = -\frac{d}{dx}\left((1-x^{2})f'f\right)+(1-x^{2})f'^{2}+\frac{m^{2}}{1-x^{2}}f^{2}.
\end{align}
$$
Because the left side is absolutely integrable, and $(1-x^{2})f'f$ vanishes at $\pm 1$, it follows that $(1-x^{2})f'^{2}$ and $f^{2}/(1-x^{2})$ are absolutely integrable with
$$
                   (L_{m}f,f) = \|\sqrt{1-x^{2}}f'\|^{2}+\|f/\sqrt{1-x^{2}}\|^{2}.
$$
