I've been learning about Feynman-Kac recently and I understand the underlying ideas. I am stuck however in actually computing explicit solutions for specific problems. For example, suppose I have the following terminal value problem:


\begin{align}
& F\_t+\frac{1}{2}σ^2x^2F\_{xx}=1\\
& F(x,T)=(\ln(x))^4,\ x>0
\end{align}


How would I compute $F(x,t)$ in closed form, given the closed form of the right hand side $(\ln(x))^4$ using Feynman-Kac?


Thanks in advance,


Sriram



using Feynman-Kac formula
The idea is to choose a stochastic process of the form 
$$dX\_t=\mu(t,X\_t)dt+\sigma(t,X\_t)dW\_t $$
and consider the process $Y\_t=F(t,X\_t)$.
Applying Ito to $Y\_t$ gives 
$$ dY\_t=\left(F\_t+\mu(t,X\_t)F\_x(t,X\_t)+\frac12\sigma(t,X\_t)^2F\_{xx}(t,X\_t)\right)dt+\sigma(t,X\_t)F\_x(t,X\_t)dWt $$ 


And then to choose the coefficients $\mu$ and $\sigma$ in such a way to have $Y\_t$ martingale.
In our case if we choose $\mu(t,x)=0$ and $\sigma(t,x)=\sigma x$ we will have 
$$dY\_t=\sigma(t,X\_t)F\_x(t,X\_t)dWt$$
under some additional hypothesis of polynomial growth of $F$ we can conclude that $Y\_t$ is a martingale and then that $Y\_t = E\_t[Y\_T]$
which we can rewrite $$F(t,x)=E[F(T,X\_T)|X\_t=x)$$
now solving the SDE $dX\_t=\sigma X\_t dW\_t$ gives 
$$X\_T=X\_t \exp(\sigma(W\_T-W\_t)-\frac12 \sigma^2(T-t))$$


and hence in law we have $$X\_T|X\_t \sim x \exp(\sigma\sqrt{T-T}Z-\frac12 \sigma^2(T-t))$$
where $Z$ is a standard Gaussian, hence 
$$F(t,x)= E\left[ \left(\ln(x)+\sigma\sqrt{T-T}Z-\frac12 \sigma^2(T-t)\right)^4\right] $$


this amounts of calculating the four first moments of a standard Gaussian.


Hope this helps


