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? 



Differentiability of a simple value function driven by a diffusion
Here is a rough probabilistic argument for differentiability of $\nu(x)$. At least formally, we have: 
$$
\nu^{\prime}(x) = \mathbb{E} \int\_0^{\infty} e^{-t} \delta(X\_t(x)) X\_t^{\prime}(x) dt \tag{$\star$} 
$$ since the derivative of a step function, in the distributional sense, is a Dirac delta function $\delta(\cdot)$. Note that the notation $X\_t(x)$ expresses the dependence of the SDE solution on its initial data $x$. In terms of the symmetric local time $L\_t$ accumulated by the process $X(t)$ at the origin, we can write ($\star$) as:
$$
v^{\prime}(x) = \mathbb{E} \int\_0^{\infty} e^{-t} X\_t^{\prime}(x) dL\_t \tag{$\star\star$} 
$$ This local time is continuous with respect to $x$, since roughly speaking, the drift of the SDE for $X(t)$ does not involve the local time of the process. Moreover, at least formally, the process $X\_t^{\prime}$ satisfies the SDE: 
$$
d X\_t^{\prime} = X\_t^{\prime} \left( d L\_t + \delta(X\_t) dB\_t \right) \quad
X\_0^{\prime}(x) = 1 
$$
which depends on the initial data only through $X\_t$. So if $X\_t$ is a.s. pathwise differentiable, then it seems from ($\star\star$) like $\nu^{\prime}(x)$ is continuous. This motivates revisiting that paper you reference by Nakao, and understanding better the regularity of $X\_t$ with respect to its initial data.


