This might be a simple question, but I'm having trouble with it.


Consider the Cauchy problem with final condition.
\begin{equation}
\begin{cases}
\frac{\partial u}{\partial t}(t,x) + \mathcal{L}u(t,x) + k(t,x)u(t,x) = g(t,x) &\textit{in}\quad\left[0,T\right]\times\mathbb{R}\\
u(T,x)=\phi(x)&\textit{in}\quad\mathbb{R}
\end{cases}
\label{CauchyProb}
\end{equation}
where
\begin{equation}
\mathcal{L} = \frac{1}{2}\sigma^2(t,x)\frac{\partial^2}{\partial x^2} + \mu(t,x)\frac{\partial }{\partial x}.
\end{equation}
I am well aware that a solution to this problem can be given in terms of the following Feynman–Kac formula:
\begin{equation}
u(t,x)=\mathbb{E}\left[\phi(X\_T^{t,x})\exp\left\lbrace\int\_t^Tk(s,X\_s^{t,x})ds\right\rbrace
-\int\_t^Tg(s,X\_s^{t,x})\exp\left\lbrace\int\_t^s k(u,X\_u^{t,x})du\right\rbrace ds\right]
\end{equation}
where $X\_t$ is an Itô process that is described by:
\begin{equation}
dX\_t = \mu(t,X\_t)dt + \sigma(t,X\_t)dW\_t\,,
\end{equation}
with $X\_0=x$.


The problem arises when I try to make the change of variables $v(t') = u(T-t)$.
Now, the previous Cauchy problem with final condition, becomes a Cauchy problem with initial condition:
\begin{equation}
\begin{cases}
-\frac{\partial v}{\partial t'}(t',x) + \mathcal{L}v(t',x) + k(T-t',x)v(t',x) = g(T-t',x) &\textit{in}\quad\left[0,T\right]\times\mathbb{R}\\
v(0,x)=\phi(x)&\textit{in}\quad\mathbb{R}
\end{cases}
\label{CauchyProb2}
\end{equation}
with
\begin{equation}
\mathcal{L} = \frac{1}{2}\sigma^2(T-t',x)\frac{\partial^2}{\partial x^2} + \mu(T-t',x)\frac{\partial }{\partial x}.
\end{equation}


What form does the Feynman–Kac formula take when we perform this change of variable?



Forwards Feynman–Kac formula
Given $t \in (0,T)$, define $\tilde{X}^{(t),x}$ to be the solution of the SDE
\begin{equation\*}
d\tilde{X}^{(t),x}\_{s} = \mu(t + s,\tilde{X}^{(t),x}\_{s}) \, ds + \sigma(t + s, \tilde{X}^{(t),x}\_{s}) \, d B\_{s}, \quad \tilde{X}^{(t),x}\_{0} = x.
\end{equation\*}
Notice that $\tilde{X}^{(t),x}\_{\cdot} = X^{t,x}\_{\cdot + t}$. Hence we can write
\begin{align\*}
u(t,x) &= \mathbb{E} \left(\phi(\tilde{X}^{(t),x}\_{T - t}) \exp \left \{ \int\_{0}^{T -t} k(s + t, \tilde{X}^{(t),x}\_{s} \, ds \right\}\right)\\
&\quad - \mathbb{E} \left( \int\_{0}^{T - t} g(s + t, \tilde{X}^{(t),x}\_{s}) \exp \left\{ \int\_{0}^{t} k(u + t, \tilde{X}^{(t),x}\_{u}) \,du \right\} \, ds \right)
\end{align\*}


Now if we define $v(t',x) = u(T - t,x)$, we find
\begin{align\*}
v(t',x) &= \mathbb{E} \left(\phi(\tilde{X}^{(T - t'),x}\_{t'}) \exp \left \{ \int\_{0}^{t'} k(s + T - t', \tilde{X}^{(T - t'),x}\_{s} \, ds \right\}\right)\\
&\quad - \mathbb{E} \left( \int\_{0}^{t'} g(s + T - t', \tilde{X}^{(T - t'),x}\_{s}) \exp \left\{ \int\_{0}^{T - t'} k(u + T - t', \tilde{X}^{(T - t'),x}\_{u}) \,du \right\} \, ds \right)
\end{align\*}
It's worth noticing that this formula makes a certain amount of sense when $\mu$ and $\sigma$ are temporally homogeneous, in which case $\tilde{X}^{(t)}$ is independent of $t$.


