# Second order linear partial differential equation: $\partial_t u(t,x)+\frac12 \partial_{x,x} u(t,x)+u(t,x)v(x)=0$

Is there a way to solve $$\partial_t u(t,x)+\frac12 \partial_{x,x}u(t,x)+u(t,x)v(x)=0?$$

This appeared as a condition for $$X_t=u(t,B_t)e^{\int_0^tv(B_s)ds}$$ to be a martingale.
With $B$ a standard Brownian motion.

-

Of course we use separation of variables:

Let $u(t,x)=T(t)X(x)$ ,

Then $T'(t)X(x)+\dfrac{T(t)X''(x)}{2}+v(x)T(t)X(x)=0$

$-T'(t)X(x)=\dfrac{T(t)}{2}(X''(x)+2v(x)X(x))$

$\dfrac{2T'(t)}{T(t)}=-\dfrac{X''(x)+2v(x)X(x)}{X(x)}=2f(s)$

$\begin{cases}\dfrac{T'(t)}{T(t)}=f(s)\\X''(x)+2(v(x)+f(s))X(x)=0\end{cases}$

$\therefore u(x,t)=\int_sC_1(s)e^{tf(s)}X_1(x,s)~ds+\int_sC_2(s)e^{tf(s)}X_2(x,s)~ds$ or $\sum\limits_sC_1(s)e^{tf(s)}X_1(x,s)+\sum\limits_sC_2(s)e^{tf(s)}X_2(x,s)$ , where $X_1(x,s)$ and $X_2(x,s)$ are two suitable forms of linearly independent solutions of $X''(x)+2(v(x)+f(s))X(x)=0$ respectively.

But to solve $X''(x)+2(v(x)+f(s))X(x)=0$ is just like to solve second-order linear ODE with general variable coefficients and is very complicated. I provide this article to you to have deep investigation on this issue.

-

Here is a solution which depends on $v(x)$

$$u \left( t,x \right) = c_1\,{{\rm e}^{{c_2}t}}\times {\it sol} \left( 2\,{\it y} \left( x \right) {\it c}_{{2}}+2 \,{\it y} \left( x \right) v \left( x \right) +{\frac {d^{2}}{d{x}^{ 2}}}{\it y} \left( x \right) \right) \,.$$

-