I came across the following assertion (without proof, so I assume this is well known in probability theory): If $B$ is a $d$-dimensional standard Brownian motion and $f \colon \mathbb{R}^d \to \mathbb{R}^n$ is measurable such that $f(B)$ is a martingale, then $g(t,x) = \operatorname{E} \left( f(B_T) \mid B_t = x \right)$ satisfies $$ \int_0^T \int_{\mathbb{R}^d} g(t,x) \left( \frac{d}{dt}\varphi(t,x) - \Delta_x \varphi(t,x) \right) dx dt = 0 $$ for all test functions $\varphi$, where $\Delta_x$ denotes the Laplacian with respect to $x$ and $T>0$ is some fixed real. Could anybody please provide a proof or a reference?
Thank you very much!
Using the Markov property or independence of increments, the conditional distribution of $B_T$ given $B_t=x$ is $N(x, (T-t)I)$. So you can write $g(t,x)$ as an integral of $f$ with respect to the standard normal density, use the fact that the normal density satisfies the heat equation, and then integrate by parts.