Let $\;y_1\left(x,\,\lambda\right),\: y_2\left(x,\,\lambda\right)\;$ be respective solutions of eigenvalue problem \begin{align}y\,'' &= \lambda \,y, & x&\in\big(\,0,\,\infty\,\big),&\lambda&\in\mathbb{C}\end{align} with boundary conditions \begin{align} &\begin{cases} y_{1}\big(0,\,\lambda\big)=1\\y_{1}'\big(0,\,\lambda\big)=0\end{cases} & \text{ and } & &\begin{cases} y_{2}\big(0,\,\lambda\big)=0\\y_{2}'\big(0,\,\lambda\big)=1\end{cases} \end{align}
I need to find a function $\,m\left(\lambda\right)\,$ such that the function \begin{align} \psi\big(x,\,\lambda\big) = y_{2}\big(x,\,\lambda\big) + m\left(\lambda\right)\, y_{1}\big(x,\,\lambda\big) \end{align} is in $\;L^{2}_{\left(0,\infty\right)}$.
The problem arose in context of solutions of Sturm-Liouville eigenproblems dependent on eigenvalue as parameter. I have no idea how to approach it, and will appreciate any relevant advice.
The solutions are $$ y_1(x,\lambda) = \cosh(\sqrt{\lambda}x), \;\;\; y_2(x,\lambda) = \frac{\sinh(\sqrt{\lambda}x)}{\sqrt{\lambda}}, $$ where $\sqrt{\lambda}$ has its branch cut along the negative real axis. Using this particular branch cut ensures that $\Re\sqrt{\lambda} > 0$ for $\mathbb{C}\setminus(-\infty,0]$. Then $e^{\sqrt{\lambda}x} \notin L^2[0,\infty)$ and $e^{-\sqrt{\lambda}x} \in L^2[0,\infty)$ for $\lambda\in\mathbb{C}\setminus(-\infty,0]$ Therefore, the unique $m(\lambda)$ for which $$ y_2 + my_1 \in L^2[0,\infty), \;\;\; \lambda\in\mathbb{C}\setminus(-\infty,0], $$ must be chosen so that the $e^{\sqrt{\lambda}x}$ term is absent. Hence, $$ \frac{1}{2\sqrt{\lambda}}+\frac{1}{2}m(\lambda) = 0 \\ \implies m = -1/\sqrt{\lambda}. $$ Note: It is more common to consider the operator with negative coefficient of $y''$ on the left. The reason for the branch along the negative real axis is that the spectrum of your operator is the negative real axis. One normally tries to arrange the spectrum to be infinite in the positive direction instead, which is arranged by considering $Lf=-(pf')'+qf$ instead of $Lf=(pf')'-qf$.