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?