Let numbers $\{\rho_n\}_{n\ge 0}, \quad \rho_n \neq \rho_k,\quad (n\neq k)\quad$ of the form $\quad \rho_n = n + \frac{a}{n}+\frac{\kappa_n}{n}, \quad \{\kappa_n\} \in \ell^2 \quad $ be given. Then $$ e_n= \left \{ \begin{aligned} -\beta_n \cos\rho_n t \quad 0\le t \le x,\\ \cos\rho_n(\pi-t) \quad x<t\le \pi. \end{aligned} \right . $$ is complete in $L_2(0,\pi)$. Here, $\beta_n$ satisfy that $\psi(\rho_n,x)=\beta_n\varphi(\rho_n,x)$ and $\psi, \varphi$ are linearly independent continuous functions on $L_2(0,\pi)$.
My proof is similar to that of Yurko in his book INVERSE STURM-LIOUVILLE PROBLEMS AND THEIR APPLICATIONS p.97
Consider $f(x) \in L_2(0\pi)$ be such that $$\int_{0}^{\pi}f(t)e_n(t)dt=0 \quad n\ge 0.$$ Consider the functions $$\Delta(\lambda):= \pi(\lambda_0-\lambda)\prod^{\infty}_{n=1}\frac{\lambda_n-\lambda}{n^2}, \quad \lambda_n=\rho_n^2$$ and, $$F(\lambda)=\frac{1}{\Delta(\lambda)}\int_0^{\pi}f(t)e(t)dt, \quad \lambda=\rho^2, \quad \lambda\neq \lambda_n.$$
The idea is to see that $F$ is entire in $\lambda$, and I know that $$|\Delta(\lambda)|\ge C|\rho|e^{|\tau|\pi}, \quad \tau =Im \rho.$$
But I don't know how to bounded $e_n$, because I can't guarantee that it is entire. The following occurs to me. Consider $$ g(t)= \left \{ \begin{aligned} -\psi(\rho,t) \cos\rho t \quad 0\le t \le x,\\ \varphi(\rho,t)\cos\rho(\pi-t) \quad x<t\le \pi. \end{aligned} \right .$$
so $g_n=\varphi(\rho_n,t)e_n$ $$\rightarrow \int_{0}^{\pi}f(t)e_n(t)dt=0 \Rightarrow \int_{0}^{\pi}f(t)g_n(t)dt=0$$ I don't know how to continue with the demonstration. Maybe it will help to know that $$|\psi(\rho,x)|\le e^{|\tau|(\pi-x)}, \quad|\varphi(\rho,x)|\le e^{|\tau|x}$$ and, in $x=\pi, \quad 1=\beta_n\varphi(\rho_n,\pi).$
Actually, I would like to receive your help. Perhaps you could guide me with some hints or corrections. I believe the information provided is sufficient, but if you need any additional details about the functions, I would be happy to provide them.