# How to apply the Feynman-Kac formula?

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:

$$F_t + \frac{1}{2}\sigma^2x^2F_{xx}=1$$

$$F(x,T) = \ln(x)^4,~x>0$$

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?

• Well, what have you tried so far? Maybe state the Faynman-Kac formula and see how it relates to your example first.
– SRKX
Dec 3, 2015 at 7:01

Based on the form of your equation, we can consider the SDE \begin{align*} dX_t = \sigma X_t dW_t, \end{align*} where $W$ is a standard Brownian motion under the measure $Q$. Since, for $0 \leq t \leq T$, \begin{align*} X_T = X_t \exp\left(-\frac{1}{2}\sigma^2 (T-t) + \sigma \int_t^T dW_s \right), \end{align*} based on Feynman–Kac formula, the solution is given by \begin{align*} F(t, x) &= E^Q\left(\int_t^T ds + (\ln X_T)^4 \mid X_t = x\right)\\ &=(T-t) + E^Q\left[\left(\ln x -\frac{1}{2}\sigma^2 (T-t) + \sigma \int_t^T dW_s\right)^4\right]. \end{align*} The remaining is now simple and is omitted.
There is a little flaw in this equation: \begin{align*} F(t, x) &= E^Q\left(\int_t^T ds + (\ln X_T)^4 \mid X_t = x\right)\\ &=(T-t) + E^Q\left[\left(\ln x -\frac{1}{2}\sigma^2 (T-t) + \sigma \int_t^T dW_s\right)^4\right]. \end{align*}
The correct one should be: \begin{align*} F(t, x) &= E^Q\left( - \int_t^T ds + (\ln X_T)^4 \mid X_t = x\right)\\ &=-(T-t) + E^Q\left[\left(\ln x -\frac{1}{2}\sigma^2 (T-t) + \sigma \int_t^T dW_s\right)^4\right]. \end{align*}