This problem is puzzling me, even though it should be really simple.
Let $L=-\partial_x^2 + \frac 1 2 x^{-2}$ be an operator defined on $D(L)=C^\infty_c(0,+\infty)\subset L^2(0,+\infty)$. Its adjoint operator on $L^2$, will then be $L^*=-\partial_x^2 + \frac 1 2 x^{-2}$ with domain $D(L^*)=\{u\in L^2\colon\: (-\partial_x^2 + \frac 1 2 x^{-2})u\in L^2 \text{ in the sense of distributions} \}$.
Now, I want to find the kernel of $L^*$, that I know to have dimension $1$. Hence, I solve $(-\partial_x^2 + \frac 1 2 x^{-2})u=0$, and find that it has two solutions: $x^{\frac{1\pm\sqrt 3} 2}$. The problem is that, while both of these functions are in $L^2$ near $0$, none of them is in $L^2$ at $+\infty$.
Which is the right way to reason here? I cannot just consider the functions near $0$, otherwise I would end up with two of them, nor I see any justification in taking their sum as the generator of the kernel.
Thank you for any answers!
Indeed it was quite simple. It is enough to consider \begin{equation} \phi(x)=\begin{cases} x^{\frac {1+\sqrt 3 }{2}}-x^{\frac{1-\sqrt 3} 2}&\quad \text{if } 0<x\le 1,\\ 0&\quad \text{otherwise}. \end{cases} \end{equation}
Clearly $\phi(x)$ is in $L^2$ and such that $L^* \phi=0$. Hence $\ker(L^*)=\text{span}\{\phi\}$.