Solve 2 connected ODEs describing a domain This problem confused me for a long time. I have 2 ODEs which describe part of our domain. They are connected at middle:
$$
\frac{d^2}{dx^2} u = -a, x<x_0 
$$
$$
\frac{d^2}{dx^2} u - \frac{u}{b^2}= 0, x>x_0 
$$
The whole domain is defined as
$$
-W < x  
$$
With the following conditions
$$
\lim_{x->-W} u = 0  
$$
$$
\lim_{x->+\infty} u = c \;\;or\;\; \lim_{x->L} u = c 
$$
u, u' and u'' needs to be continous.

a, b, W and c are constants. If not possible with $\infty$ one can replace $+\infty$ with a constant L.

Update: As a hint, the following functions are solutions of individual equations
$$u_1(x) = \alpha x^2 + \beta x + \gamma  $$
    $$u_2(x) = c_1 exp(-x/b) + c_2 exp(x/b) $$
Where $\alpha$, $\beta$, $\gamma$, $c_1$ and $c_2$ are constants related to the constants in the ODEs.
Problem is that we usually put $c_2 = 0$ since the exp(x/b) diverges.
    If we do so, 2nd derivative of u would not be continous at $x_0$.

My numerical simulated solution looks like 
$$ \frac{1}{1+exp(x/b)}$$
But it does't match exactly.
The form of numerical solution and 2 regions are clear in the following link:
http://www.wolframalpha.com/input/?i=1%2F%281%2Bexp%28x%29%29+from+x%3D-10+to+x%3D10
 A: Ok:


*

*You have: 
$$u(x) \equiv \left\{ \begin{array}{ll}
u_1(x) = \alpha e^{-x/b} + \beta e^{x/b} & \text{if } x > x_0 \\
u_2(x) = -a x^2 + \gamma x + \delta      & \text{if } x < x_0 
\end{array} \right. $$

*Because of boundedness at $x \to \infty$, we must set $\beta = 0$.

*Because of boundedness at $x \to -\infty$, the only solution satisfying this would be that whereas $a = 0$ (which is a given constant) and, of course, $\gamma = 0$, so we have: 
$$ \delta = c.$$
Otherwise, if $a \neq 0$, the solution is unbounded at $x \to \infty$.

*Then we arrive at:
$$u(x) \equiv \left\{ \begin{array}{ll}
u_1(x) = \alpha e^{-x/b}  & \text{if } x > x_0 \\
u_2(x) = c                & \text{if } x < x_0 
\end{array} \right. $$


*

*Now it's time to ensure continuity at $x = x_0$ by setting $u_1(x_0) = u_2(x_0)$, which gives us the value of $\alpha$ as a function of $b$ and $c$.

*Note that we'll have also differentiability for certain values of $c$, which is also given in the problem. Can you take it from here?


Hope this helps.
Cheers!
PD: Forgive me for changing your notation.
