Feynman-Kac formula (source code)

= Feynman-Kac formula
{c}
{wiki}

The Feynman-Kac formula connects a <partial differential equation> to an <expected value> over paths of a <diffusion process>. Let $X$ be a nonexplosive <Itô diffusion> with <infinitesimal generator> $L$, let $V,g$ be bounded with $V\geq0$, and let $u$ be a bounded <classical solution> of
$$
\partial_tu=Lu-Vu,\qquad u(0,x)=g(x).
$$
Then
$$
u(t,x)=\mathbb E_x\left[e^{-\int_0^tV(X_s)ds}g(X_t)\right].
$$
The <Itô formula> and <Itô product rule> make $e^{-\int_0^sV(X_r)dr}u(t-s,X_s)$ a <local martingale>; boundedness makes it a true <martingale> on the finite horizon. Its equal endpoint expectations prove the identity and uniqueness within the bounded solution class.

The coefficient $V$ acts as a position-dependent killing rate. For constant $V=\lambda$ and $g=1$, the formula gives $u(t,x)=e^{-\lambda t}$. For $V=0$ and <Brownian motion>, it gives the <heat equation> solution by averaging $g$ against the <Brownian transition density>. Sources, terminal data and boundary stopping lead to the <parabolic Feynman-Kac formula with a source> and <elliptic Feynman-Kac formula>.