TITLE: Fokker-Planck equation for Ornstein-Uhlenbeck
QUESTION [6 upvotes]: I am trying to solve the following Ornstein-Uhlenbeck SDE
$dx = -\alpha x dt + \gamma dW$
where $x$ is a stochastic process, W is a standard Wiener process (Brownian motion) and $\alpha$ and $\gamma$ are both constants. I want to derive the probability density function $p(x,t)$ by using the Fokker-Planck equation
$\dfrac{\partial p(x,t)}{\partial t} = -\dfrac{\partial}{\partial x}[-\alpha x p(x,t)] + D\dfrac{\partial^2 p(x,t)}{\partial x^2}$
with  $D = \gamma^2/2$ and initial condition $p(x,0) = \delta(x-x_0)$. I start by taking the Fourier transform with respect to $x$ of both sides, defined as
$\mathcal{F}\left\{f(x)\right\} = \dfrac{1}{\sqrt{2\pi}} \displaystyle\int_{-\infty}^{\infty} f(x) e^{-ikx}dx$
$\mathcal{F}^{-1}\left\{\hat{f}(k)\right\} = \dfrac{1}{\sqrt{2\pi}} \displaystyle\int_{-\infty}^{\infty} \hat{f}(k) e^{ikx}dk$
and using the identity 
$\mathcal{F}\left\{\dfrac{\partial}{\partial x}[x p(x,t)] \right\} = k\dfrac{\partial\hat{p}(k,t)}{\partial k}$
This gives me the transformed PDE
$\dfrac{\partial \hat{p}(k,t)}{\partial t} = \alpha k \dfrac{\partial\hat{p}(k,t)}{\partial k} - k^2 D\hat{p}(k,t)$
With transformed initial condition 
$\hat{p}(k,0) = \mathcal{F}\left\{p(x,0) \right\} = \dfrac{e^{-ix_0 k}}
{\sqrt{2\pi}}$
At this point, I try using the method of characteristics to solve for $\hat{p}(k,t)$ and I always end up with the solution
$\hat{p}(k,t) = \dfrac{1}{\sqrt{2\pi}} \exp\left\{-\dfrac{D}{2\alpha}\left(e^{2\alpha t} - 1\right)k^2 - ix_0 e^{\alpha t}k \right\}$
The problem I have is that when I go ahead to inverse Fourier transform this function, I end up with a term $x_0 e^{\alpha t}$ for the mean of the process $x(t)$, but solving for the expectation of the SDE directly gives me $\mathbb{E}\left[x(t)\right] = x_0 e^{-\alpha t}$. I can't figure out why there is a sign difference in my exponent. Is there a mistake in one of my steps? And, would it be possible to obtain $p(x,t)$ from the Kolgomorov backward equation instead? It seems it would be better suited for this problem.

REPLY [2 votes]: I noticed my mistake was in the definition of
$\mathcal{F}\left\{\dfrac{\partial}{\partial x}[x p(x,t)] \right\} = -k \dfrac{\partial \hat{p}(k,t)}{\partial k}$
I had the wrong sign there for some reason, which was the cause of all my problems. Thank you all for your help.