Bessel function divergence I have two functions $y_+,y_-$. The former is defined on $[L,\infty)$, the latter is defined on $[0,L]$, where $L>0$. I want them to both satisfy the following differential equation on their separate domains:
$$y''+\frac{1}{x}y'-y=0$$
I then want them to satisfy the system of boundary conditions:
$$\lim_{x \to \infty} y_+(x)=0 \\
y_+(L)=y_-(L) \\
y_+'(L)=y_+(L)-y_0 \\
y_-'(L)=y_0-y_-(L).$$
where $y_0$ is a parameter of indefinite sign. When I do this, $y_+$ is a multiple of the modified Bessel function of the second kind with imaginary argument $K_0$, while $y_-$ is a linear combination of $K_0$ and the modified Bessel function of the first kind with imaginary argument $I_0$. The first of these is fine; this happens in a nicer boundary condition that I've already handled as well. 
My problem is the second one: the $K_0$ term in $y_-$ will have a logarithmic divergence at zero, which should not occur in my problem for physical reasons. The $I_0$ term, being bounded at zero, does not help us to remove it. Any idea how to fix this? If need be I can show my working, but it is mostly just awkward symbolic linear algebra for the system of boundary conditions, initially assuming $y_-$ and $y_+$ are combinations of $I_0$ and $K_0$.
 A: If you want a linear combination of $I_0(x)$ and $K_0(x)$ to not have a singularity at $x=0$, the coefficient of $K_0(x)$ must be $0$.  So 
$y_-(x) = c I_0(x)$, and the boundary condition at $x=L$ must have 
$y_-(L)/I_0(L) = {y'}_-(L)/I_0'(L)$.
EDIT:
Since $y_-(L) = y_+(L)$, your conditions on the derivatives become
$${y_-}'(L) = -{y_+}'(L) = y_-(L) - y_0$$
In particular, if $c \ne 0$ you need 
$$ \dfrac{K_0'(L)}{K_0(L)} = - \dfrac{I_0'(L)}{I_0(L)} $$
i.e.
$$ \dfrac{K_1(L)}{K_0(L)} = \dfrac{I_1(L)}{I_0(L)} $$
Unfortunately, this seems to be impossible:  $K_1(L) I_0(L) - K_0(L) I_1(L) > 0 $ for real $L$.  The conclusion is that the only solution is 
the trivial  one: $y_-(x) = 0$, $y_+(x) = 0$, $y_0 = 0$.
A: You have enforced your solution to have the following properties:
$$\eqalign{
  & \mathop {\lim }\limits_{x \to {0^ + }} {y_\_}\left( x \right) \ne  \pm \infty   \cr 
  & \mathop {\lim }\limits_{x \to  + \infty } {y_ + }\left( x \right) = 0 \cr} \tag{1}$$
So, the most general form that they can take due to these conditions are
$$\eqalign{
  & {y_\_}\left( x \right) = A{I_0}(x)  \cr 
  & {y_ + }(x) = B{K_0}(x) \cr}\tag{2}$$
The remaining boundary conditions that are to be satisfied are
$$\eqalign{
  & {y_ + }(x) = {y_\_}\left( x \right)  \cr 
  & {{y'}_ + }(L) = {y_ + }(x) - {y_0}  \cr 
  & {{y'}_ - }(L) = {y_0} - {y_ + }(x) \cr}\tag{3}$$
And consequently you have
$$\eqalign{
  & B{K_0}(L) = A{I_0}(L)  \cr 
  &  - B{K_1}(L) = B{K_0}(L) - {y_0}  \cr 
  & A{I_1}(L) = {y_0} - A{I_0}(L) \cr}\tag{4}$$
As you can see $(4)$ is an over determined linear algebraic system of equations which has no solutions. So if you want to obtain a solution you should use a least square method which minimizes the error or you can simply ignore one of the equations in $(4)$. What I suggest is to solve for
$$\eqalign{
  & B{K_0}(L) = A{I_0}(L)  \cr 
  & A{I_1}(L) - B{K_1}(L) =  - A{I_0}(L) + B{K_0}(L) \cr}\tag{5}$$
where I just summed the second and third equations in $(4)$.
