Fokker-Planck equation applied to $\lvert x\rvert^2$ Let us consider the Fokker-Planck equation
$$ \partial_tu_t = \Delta u_t + \nabla \cdot(xu_t) $$
for $u\in C((0,T);P_2(\mathbb{R}^n))$ ($P_2$ being the space of probability measures with finite second moment) to be understood in distributional sense as
\begin{align}\label{x} \int_0^T\int_{\mathbb{R}^n}\partial_t\varphi(x,t)d u_t(x)d t =  \int_0^T\int_{\mathbb{R}^n}\left(\Delta_x\varphi(x,t)+\nabla_x\varphi(x,t)\cdot x\right)d u_t(x)d t\end{align}
for every $\varphi\in C_c^\infty(\mathbb{R}^n\times(0,T))$.
I am reading an article in which it is then used that
$$ \frac{d}{dt} \int \lvert x\rvert^2du_t = 2n - 2\int\lvert x\rvert^2 du_t.$$
I really struggle to understand this. First, why are the integrals well defined given that $x\mapsto \lvert x\rvert^2$ does not qualify as a test function?
Secondly, even if I knew that all terms exist, I still have no clue how to check the equation.
(My useless own thoughts on this: I noticed that if one "forgets" to integrate wrt. $t$ in the formula with the $\varphi$ then the right hand side is
$ 2n - 2\int\lvert x\rvert^2 du_t = \Delta u_t(\lvert x\rvert^2) - \nabla \cdot(xu_t)(\lvert x\rvert^2) $
but seems to lead nowhere)
Any help would be greatly appreciated!
 A: The integral is well defined because we assumed that our measures of interest have finite second moment, so
$$
\varphi \rightarrow \int_{[0,T]\times\mathbb{R}^n} \varphi(x)|x|^2\,du_t
$$
is always finite for any test function, so it is a distribution, thus we can take a weak derivative of it.
As for equality we use the Fokker-Planck equation:
$$
\frac{d}{dt}\int |x|^2\,du_t = \int |x|^2\,d(\Delta_x u_t) + \int |x|^2\,d(\nabla \cdot xu_t)
$$
Then integrating by parts we arrive at
$$
\int \Delta|x|^2\,du_t - \int (\nabla|x|^2)\cdot x\,du_t = \int 2n\,du_t - \int 2x\cdot x\,du_t = 2n - 2\int |x|^2\,du_t,
$$
since these are probability measures. 
Hope I helped.
A: For anyone interested, I have also found a workaround, using that a solution to this specific Fokker-Planck equation is explicitly known as the law of the Ornstein-Uhlenbeck Process.
For the latter, its Markov semigroup $P_t$ satisfies
\begin{align*}
P_tf(x) = \int f\left(e^{-t} x+\sqrt{1-e^{-2t}}y\right) d\gamma_n(y)
\end{align*}
where $\gamma_n$ is the $n$-dimensional standard Gaussian distribution.
Then, using dominated convergence, one has for $f(x) = \lvert x\rvert^2$ it
\begin{align*} \frac{d}{dt}P_tf(x)
  \quad = \quad & \int \frac{d}{dt} \left\lvert e^{-t}x+\sigma_ty\right\rvert^2 d\gamma_n(y)\\
  = \quad &  2\int(e^{-t}x+\sigma_ty)\left(-e^{-t}x+\frac{e^{-2t}}{\sigma_t}y\right) d \gamma_n(y) \\
  = \quad & -2\int(e^{-t}x+\sigma_ty)\left(e^{-t}x+\sigma_ty-\frac{y}{\sigma_t}\right) d \gamma_n(y) \\
  = \quad & -2P_tf(x) + 2\int\sigma_t e^{-t}x\cdot y + \lvert y\rvert^2 d \gamma_n(y) \\
  = \quad & -2P_tf(x) + 2n
\end{align*}
and from that, again with dominated convergence,
\begin{align*}
  \frac{d}{dt}u_t(\lvert x\rvert^2)
  = \frac{d}{dt}\int u_0(dx) P_tf(x)
  = \int u_0(dx)\frac{d}{dt} P_tf(x)
  = -2u_0P_tf + 2n
  = -2u_t(\lvert x\rvert^2) + 2n
.\end{align*}
