Differentiability of a simple value function driven by a diffusion Consider a diffusion given by, 
$d X_t = \mu(X_t) dt + \sigma(X_t) dB_t$ 
$X_0 = x$.
Suppose the functions $\mu$ and $\sigma$ are as follows -
$f(x) = \mu(x) = \sigma(x) = \begin{cases} 2 & \text{ if } x \ge 0 \\
1 & \text{ if } x < 0 \end{cases}
$ 
The purpose of $f(x)$ will be clear in a moment. 
By Nakao(1972) we know that there exists a strong solution. Now, suppose I am interested in computing the following - 
$v(x) = \mathbb{E}^x \int_0^\infty e^{-t} f(X_t) d t $ 
I know how to do it mechanically. We have the following two DEs:
\begin{align} v(x) - 2 v'(x) -2v"(x) -2 = 0 & \text{ if } x >0 \\
v(x) - v'(x) - \frac{1}{2} v"(x) -1 =0 & \text{ if } x < 0 
\end{align}
Now, I will solve these 2 simple DEs. Each solution will have 2 constants to be determined. I will use the fact that $v(\infty) = 2$ and $v(-\infty) = 1$ to kill one constant on either side. Then, I will use continuity and differentiability (smooth-pasting) at $0$ to obtain the other 2 constants. 
In doing so, however, I have assumed that $v$ is differentiable at $0$. I can prove that $v$ is continuous at $0$. But I do not know how to make the argument for differentiability. This sort of a question comes up often for applied people working with stochastic control and the "standard" method is to assume that it is smooth and then use a "verification theorem". Assuming I want to avoid that, what could be a direct way to prove differentiability? 
 A: I think I have figured out a way to prove that $v(x)$ is differentiable. The idea is to use the sort of techniques used in viscosity solution for optimal control. I will give a sketch of the argument below. My proof hardly makes use of the structure given above. In fact, I think, for a piecewise Lipschitz, bounded $\mu,\sigma$ and $f$, the same reasoning should hold. I only need $\sigma$ to be bounded from below by a strictly positive number. 
By Krylov (Ch 1, Theorem 5), $v$ is $C^2$ everywhere except $0$. Also, $v'_-(0)$ and $v'_+(0)$ exist. Suppose, $0 < v'_-(0) < v'_+(0)$. Pick a number $\rho$ between $(v'_-(0),v'_+(0))$ and define, 
\begin{align*}
\psi_\epsilon(x) = v(0) + \rho(y-x) + \frac{1}{2\epsilon} (y-x)^2
\end{align*}
Observe that $x=0$ is a minimum point of $v(x)-\psi(x)$ and $\psi$ is $C^2$. 
Now, using pretty much the same proof as in Pham (2009) for viscosity supersolution with the only modification required at the end, we can prove that the following is true - 
\begin{align*}
r v(0) - \left[\underline{\mu} \psi'(0) + \frac{\underline{\sigma}^2}{2} \psi''_\epsilon(0)+\underline{f}\right] \ge 0
\end{align*}
Where $\underline{\mu}$, $\underline{\sigma}$ ,$\underline{f}$ are the global lower bounds. 
Now, taking $\epsilon$ to $0$ gives us the desired contradiction as $\psi_\epsilon '' = \frac{1}{\epsilon}$. 
A similar argument can be made with the techniques for subsolution, once again, found in Pham(2009). 
