# deriving covariance of SDE from fokker-planck

In the book 1 the covariance of an SDE is derived. I am not sure about a particular step. Let me describe it in a TLDR version, then in a longer version.

We have an SDE

$$dx = f(x,t) dt + L(x,t) d\beta$$

where $$x$$ is a vector, $$\beta$$ is a Brownian motion and $$L$$ is a matrix. In the derivation of the variance of the SDE, we want to use the following identity which holds for any function $$\phi$$ (Fokker-Planck / forward Kolmogorov) $$\frac{dE[\phi]}{dt} = E\left[\frac{\partial \phi}{\partial t} \right] +\sum_i E \left[\frac{\partial \phi}{\partial x_i} f_i(x,t)\right]+ \frac{1}{2}\sum_{i,j}E\left[\left(\frac{\partial^2 \phi}{\partial x_i \partial x_j}\right) \left[L(x,t) L^T(x,t) \right]_{ij}\right]$$

So we define $$\phi(x,t):= x_u x_v -m_u(t)m_v(t)$$ where $$x$$ is a vector $$x_u, x_v$$ are two components and $$m_u(t) := E[x_u(t)]$$ is the (time-dependent) expectation of the $$u$$-th component.

The book makes the assumption that

1. $$\frac{\partial \phi}{\partial x_u} = x_v -m_v(t)$$, so they assume in particular $$\frac{\partial m_u(t)}{\partial x_u}=1$$... but $$m_u(t)$$ is the expectation of $$x_u$$ so it is in particular independent of $$x_u$$ and hence its derivative should be 0?

2. They assume $$E[\frac{\partial \phi}{\partial t}]=0$$... but why can we say that? Both the random variables $$x_u, x_v$$ depend on time and so do their means $$m_u(t),m_v(t)$$. Further, since $$L$$ is not necessarily the identity, $$x_u$$ and $$x_v$$ may be dependent.

1 eq. 5.49 on p.70 of Simo Särkkä and Arno Solin (2019). Applied Stochastic Differential Equations. Cambridge University Press the full book has been uploaded by the author legally HERE

The description above should be complete, but let me give for context the section in the book below. My question arises in Eq. 5.49, where the described assumptions above have been made.

• What have you tried? Your assumptions $\frac{\partial m_u(t)}{\partial x_u}=1$ and $E[\frac{\partial\phi}{\partial t}]=0$ are false. Give it another try with my answer. (The first assumption does not make sense, because $m_u$ does not have $x_u$ as an argument.) Commented Mar 30 at 20:32
• Besides that, you probably want to avoid stating that the authors assume "this and that". Just communicate that you couldn't derive (5.49) and what thoughts you had along the way of trying to derive it. Commented Mar 31 at 0:34

\begin{aligned} \frac{\partial \phi}{\partial t}&=-\frac{\partial m_u}{\partial t}(t)m_v(t)-m_u(t)\frac{\partial m_v}{\partial t}(t)\\ \frac{\partial \phi}{\partial x_u}&=x_v\\ \frac{\partial \phi}{\partial x_v}&=x_u\\ \frac{\partial^2 \phi}{\partial x_v\partial x_u}&=\frac{\partial^2 \phi}{\partial x_u\partial x_v}=1\\ \end{aligned}
$$-\frac{\partial m_u}{\partial t}(t)m_v(t)=-E[f_u(x,t)]m_v(t)=E[-m_v(t)f_u(x,t)]$$ by (5.48) and since $$m_v(t)\in\mathbb{R}$$.